Skip to content

Commit

Permalink
rfk: Finally fix the bugs with newer versions of fox32os!
Browse files Browse the repository at this point in the history
  • Loading branch information
ry755 committed May 4, 2024
1 parent 51e0550 commit 6a1a265
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions demos/robotfindskitten/game.asm
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ game_loop:
cmp r0, EVENT_TYPE_KEY_DOWN
ifz call key_down_event

call yield_task
jmp game_loop

; called when the robot finds the kitten :3
Expand Down Expand Up @@ -143,14 +142,12 @@ found_kitten_loop:
cmp r0, EVENT_TYPE_KEY_DOWN
ifz jmp found_kitten_key_down_event

call yield_task
jmp found_kitten_loop
found_kitten_key_down_event:
cmp r1, 0x15 ; Y key
ifz jmp game_setup
cmp r1, 0x31 ; N key
ifz icl
ifz halt
ifz jmp 0xF0000000

jmp found_kitten_loop

Expand All @@ -162,8 +159,7 @@ found_kitten_key_down_event:
key_down_event:
; check if the user wants to quit (Q key)
cmp.8 r1, 0x10
ifz icl
ifz halt
ifz jmp 0xF0000000

; check for arrow keys
cmp.8 r1, 0x67 ; up
Expand Down
2 changes: 1 addition & 1 deletion demos/robotfindskitten/splash.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

splash_setup:
; disable the overlays used during the game and clear the background
call disable_menu_bar
mov r0, 0
call disable_overlay
mov r0, 1
Expand Down Expand Up @@ -67,7 +68,6 @@ splash_loop:
cmp r0, EVENT_TYPE_KEY_DOWN
ifz jmp game_setup

call yield_task
jmp splash_loop

version_string: data.str "robotfindskitten v2.7182818.701/fox32" data.8 0
Expand Down

0 comments on commit 6a1a265

Please sign in to comment.