Merge remote-tracking branch 'offical/master'

# Conflicts:
#	core/os/os_darwin.odin
#	core/os/os_freebsd.odin
#	core/os/os_js.odin
#	core/os/os_linux.odin
#	core/os/os_openbsd.odin
#	core/os/os_windows.odin
This commit is contained in:
ed
2024-08-04 18:49:08 -04:00
354 changed files with 22202 additions and 4803 deletions
+2 -9
View File
@@ -28,13 +28,6 @@ when ODIN_OS == .Windows {
RAYGUI_VERSION :: "4.0"
// Style property
GuiStyleProp :: struct {
controlId: u16,
propertyId: u16,
propertyValue: c.int,
}
// Gui control state
GuiState :: enum c.int {
STATE_NORMAL = 0,
@@ -236,8 +229,8 @@ foreign lib {
// Style set/get functions
GuiSetStyle :: proc(control: GuiControl, property: GuiStyleProp, value: c.int) --- // Set one style property
GuiGetStyle :: proc(control: GuiControl, property: GuiStyleProp) -> c.int --- // Get one style property
GuiSetStyle :: proc(control: GuiControl, property: GuiControlProperty, value: c.int) --- // Set one style property
GuiGetStyle :: proc(control: GuiControl, property: GuiControlProperty) -> c.int --- // Get one style property
// Styles loading functions
+6 -6
View File
@@ -1015,8 +1015,8 @@ foreign lib {
SetRandomSeed :: proc(seed: c.uint) --- // Set the seed for the random number generator
GetRandomValue :: proc(min, max: c.int) -> c.int --- // Get a random value between min and max (both included)
LoadRandomSequence :: proc(count : c.uint, min, max: c.int) --- // Load random values sequence, no values repeated
UnloadRandomSequence :: proc(sequence : ^c.int) --- // Unload random values sequence
LoadRandomSequence :: proc(count: c.uint, min, max: c.int) --- // Load random values sequence, no values repeated
UnloadRandomSequence :: proc(sequence: ^c.int) --- // Unload random values sequence
// Misc. functions
TakeScreenshot :: proc(fileName: cstring) --- // Takes a screenshot of current screen (filename extension defines format)
@@ -1424,9 +1424,9 @@ foreign lib {
LoadUTF8 :: proc(codepoints: [^]rune, length: c.int) -> [^]byte --- // Load UTF-8 text encoded from codepoints array
UnloadUTF8 :: proc(text: [^]byte) --- // Unload UTF-8 text encoded from codepoints array
LoadCodepoints :: proc(text: rawptr, count: ^c.int) -> [^]rune --- // Load all codepoints from a UTF-8 text string, codepoints count returned by parameter
LoadCodepoints :: proc(text: cstring, count: ^c.int) -> [^]rune --- // Load all codepoints from a UTF-8 text string, codepoints count returned by parameter
UnloadCodepoints :: proc(codepoints: [^]rune) --- // Unload codepoints data from memory
GetCodepointCount :: proc(text : cstring) -> c.int --- // Get total number of codepoints in a UTF-8 encoded string
GetCodepointCount :: proc(text: cstring) -> c.int --- // Get total number of codepoints in a UTF-8 encoded string
GetCodepoint :: proc(text: cstring, codepointSize: ^c.int) -> rune --- // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
GetCodepointNext :: proc(text: cstring, codepointSize: ^c.int) -> rune --- // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
GetCodepointPrevious :: proc(text: cstring, codepointSize: ^c.int) -> rune --- // Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
@@ -1667,7 +1667,7 @@ IsGestureDetected :: proc "c" (gesture: Gesture) -> bool {
// Text formatting with variables (sprintf style)
TextFormat :: proc(text: cstring, args: ..any) -> cstring {
TextFormat :: proc(text: cstring, args: ..any) -> cstring {
@static buffers: [MAX_TEXTFORMAT_BUFFERS][MAX_TEXT_BUFFER_LENGTH]byte
@static index: u32
@@ -1683,7 +1683,7 @@ TextFormat :: proc(text: cstring, args: ..any) -> cstring {
}
// Text formatting with variables (sprintf style) and allocates (must be freed with 'MemFree')
TextFormatAlloc :: proc(text: cstring, args: ..any) -> cstring {
TextFormatAlloc :: proc(text: cstring, args: ..any) -> cstring {
str := fmt.tprintf(string(text), ..args)
return strings.clone_to_cstring(str, MemAllocator())
}