mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Update procs
This commit is contained in:
+18
-11
@@ -1,21 +1,28 @@
|
|||||||
package vendor_kb_text_shape
|
package vendor_kb_text_shape
|
||||||
|
|
||||||
|
when ODIN_OS == .Windows {
|
||||||
|
foreign import lib {
|
||||||
|
"lib/kb_text_shape.lib",
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
foreign import lib {
|
||||||
|
"kb_text_shape.a"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
import "core:c"
|
import "core:c"
|
||||||
|
|
||||||
#assert(size_of(c.int) == size_of(b32))
|
#assert(size_of(c.int) == size_of(b32))
|
||||||
#assert(size_of(u32) == size_of(b32))
|
#assert(size_of(u32) == size_of(b32))
|
||||||
|
|
||||||
TEXT_SHAPE_NO_CRT :: #config(KB_TEXT_SHAPE_NO_CRT, false)
|
|
||||||
|
|
||||||
@(default_calling_convention="c", link_prefix="kbts_")
|
@(default_calling_convention="c", link_prefix="kbts_")
|
||||||
foreign {
|
foreign lib {
|
||||||
when !TEXT_SHAPE_NO_CRT {
|
// when !TEXT_SHAPE_NO_CRT {
|
||||||
FontFromFile :: proc(FileName: cstring) -> font ---
|
FontFromFile :: proc(FileName: cstring) -> font ---
|
||||||
FreeFont :: proc(Font: ^font) ---
|
FreeFont :: proc(Font: ^font) ---
|
||||||
CreateShapeState :: proc(Font: ^font) -> ^shape_state ---
|
CreateShapeState :: proc(Font: ^font) -> ^shape_state ---
|
||||||
FreeShapeState :: proc(State: ^shape_state) ---
|
FreeShapeState :: proc(State: ^shape_state) ---
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
FontIsValid :: proc(Font: ^font) -> int ---
|
FontIsValid :: proc(Font: ^font) -> int ---
|
||||||
ReadFontHeader :: proc(Font: ^font, Data: rawptr, Size: un) -> un ---
|
ReadFontHeader :: proc(Font: ^font, Data: rawptr, Size: un) -> un ---
|
||||||
|
|||||||
+2
-2
@@ -22279,8 +22279,8 @@ KBTS_EXPORT kbts_decode kbts_DecodeUtf8(const char *Utf8, size_t Length)
|
|||||||
FollowupCharacterCount = 3;
|
FollowupCharacterCount = 3;
|
||||||
Result.Codepoint = First & 7;
|
Result.Codepoint = First & 7;
|
||||||
Result.Valid = 1;
|
Result.Valid = 1;
|
||||||
}
|
|
||||||
break;
|
} break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Length > FollowupCharacterCount)
|
if(Length > FollowupCharacterCount)
|
||||||
|
|||||||
Reference in New Issue
Block a user