mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Make syscall names closer to libc
This commit is contained in:
parent
1b868adf87
commit
6735b159ac
17 changed files with 103 additions and 79 deletions
|
|
@ -18,7 +18,7 @@ export fn main() void {
|
|||
|
||||
while(gameRunning) {
|
||||
const now = uvm.millis();
|
||||
if (uvm.getch()) |key| {
|
||||
if (uvm.getc()) |key| {
|
||||
switch(key) {
|
||||
' ' => nextEvent = mibu.events.Event{.key = .{.code = .{.char = ' '}}},
|
||||
'a' => nextEvent = mibu.events.Event{.key = .{.code = .left}},
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ pub inline fn syscall(id: u32, param: u32) u32 {
|
|||
return val;
|
||||
}
|
||||
|
||||
pub inline fn getch() ?u8 {
|
||||
pub inline fn getc() ?u8 {
|
||||
const key = syscall(uvm32.UVM32_SYSCALL_GETC, 0);
|
||||
if (key == 0xFFFFFFFF) {
|
||||
return null;
|
||||
|
|
@ -49,7 +49,7 @@ pub inline fn yield() void {
|
|||
_ = syscall(uvm32.UVM32_SYSCALL_YIELD, 0);
|
||||
}
|
||||
|
||||
pub inline fn printc(c:u8) void {
|
||||
_ = syscall(uvm32.UVM32_SYSCALL_PRINTC, c);
|
||||
pub inline fn putc(c:u8) void {
|
||||
_ = syscall(uvm32.UVM32_SYSCALL_PUTC, c);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue