Skip to content

Commit

Permalink
Update text and trace functions
Browse files Browse the repository at this point in the history
Previously they used probably deprecated functions which are no longer present in the reference
  • Loading branch information
greenfork authored Jan 13, 2024
1 parent 632137a commit e83c71b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cli/assets/templates/odin/src/w4/wasm4_wasm32.odin
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ foreign wasm4 {
rect :: proc(x, y: i32, width, height: u32) ---

// Draws text using the built-in system font.
@(link_name="textUtf8")
text :: proc(text: string, x, y: i32) ---
text :: proc(text: cstring, x, y: i32) ---
}

// ┌───────────────────────────────────────────────────────────────────────────┐
Expand Down Expand Up @@ -174,8 +173,7 @@ foreign wasm4 {
@(default_calling_convention="c")
foreign wasm4 {
// Prints a message to the debug console.
@(link_name="traceUtf8")
trace :: proc(text: string) ---
trace :: proc(text: cstring) ---
// Prints a message to the debug console, with a format string.
// These formats are supported:
// %c: Character
Expand Down

0 comments on commit e83c71b

Please sign in to comment.