Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MainLoop
- moveq #0,d0 ; clear d0
- move.w game_state,d0 ; get game state on d0
- add.w d0,d0 ; multiply ID by 2 (if d0 = 1 -> d0 = 2)
- add.w d0,d0 ; multiply previous by 2 (if d0 = 2 -> d0 = 4)
- jsr @index(pc,d0.w) ; jump to @index addr + d0
- bra MainLoop
- @index:
- bra.w TitleScreen_Init ; (0) each bra is 4 bytes long
- bra.w TitleScreen ; (1) each bra is 4 bytes long
- bra.w GameMode_Init ; (2)
- bra.w GameMode ; (3)
- TitleScreen_Init:
- ; <Initialization, plane loading, etc>
- move.w #1,game_state ; change game state
- rts ; load it
- TitleScreen:
- ; "main" status...
- move.w #2,game_state ; change game state
- rts ; load it
- GameMode_Init:
- ; <Initialization, plane loading, etc>
- move.w #3,game_state ; change game state
- rts ; load it
- GameMode:
- ; "main" status...
- ; (...)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement