diff options
author | Astatin <[email protected]> | 2025-03-25 19:01:47 +0900 |
---|---|---|
committer | Astatin <[email protected]> | 2025-03-25 19:01:47 +0900 |
commit | fb8e853fd0c6660696e762f67877b4d24a9f4c22 (patch) | |
tree | 4c2c69bd5e13bebfe02534541e4adcf2b67f335f /entity | |
parent | 2df3daa5128a27381fe5208fa4eac59ab10bdd9c (diff) |
Separate modes VBlank functions
Diffstat (limited to 'entity')
-rw-r--r-- | entity/actions.gbasm | 60 | ||||
-rw-r--r-- | entity/bunny.gbasm | 13 | ||||
-rw-r--r-- | entity/list.gbasm | 2 | ||||
-rw-r--r-- | entity/penguin.gbasm | 13 |
4 files changed, 21 insertions, 67 deletions
diff --git a/entity/actions.gbasm b/entity/actions.gbasm index 8b9e3a6..57b9e78 100644 --- a/entity/actions.gbasm +++ b/entity/actions.gbasm @@ -54,66 +54,6 @@ Entity_Action: LD L, A RET -Update_Animation_Steps: - LD A, $mem_blinking_animation_counter - DEC A - CP $ff - JR Z, =.Skip_blinking_update - LD $mem_blinking_animation_counter, A - .Skip_blinking_update: - - LD A, $mem_map_loading_flags - BIT 3, A - JR Z, =.update_mode - - LD A, $mem_moving_animation_step - INC A - AND $0f - LD $mem_moving_animation_step, A - - CP $00 - JR NZ, =.end - - LD A, $mem_map_loading_flags - RES 3, A - SET 1, A - LD $mem_map_loading_flags, A - - .update_mode: - - ; We need to make sure that the mode doesn't change to a mode with objects update while a dialogue box refresh is currently being done - LD A, $mem_current_mode - BIT 7, A - JR Z, =.set_current_mode - LD A, $mem_display_flag - AND 0b00010100 - CP $00 - JR NZ, =.end - - .set_current_mode: - LD A, $mem_requested_mode - LD $mem_current_mode, A - - .end: - LD A, $mem_bunny_health - CP $00 - RET NZ - LD A, $mem_moving_animation_step - CP $00 - RET NZ - - .Dead_mode: - - LD A, $20 - LD $mem_bunny_direction, A - - LD A, $enum_dead_mode - LD $mem_current_mode, A - - .CLOSE_DIALOGUE - - RET - Turn_Jump_table: ; 00 RET diff --git a/entity/bunny.gbasm b/entity/bunny.gbasm index 29f66d9..7789ec5 100644 --- a/entity/bunny.gbasm +++ b/entity/bunny.gbasm @@ -6,6 +6,17 @@ Move_Bunny: LD E, $02 .Normal_speed: + .Finish_unfreeze: + LD A, $mem_moving_animation_step + CP $00 + JR NZ, =.Finish_unfreeze.end + LD A, $mem_bunny_status + CP $04 + JR NZ, =.Finish_unfreeze.end + LD A, $00 + LD $mem_bunny_status, A + .Finish_unfreeze.end: + .Freeze_shiver: LD A, $mem_moving_animation_step CP $00 @@ -35,7 +46,7 @@ Move_Bunny: JP NC, =.Skip_turn .Unfreeze: - LD A, $00 + LD A, $04 LD $mem_bunny_status, A LD A, $mem_bunny_flags RES 1, A diff --git a/entity/list.gbasm b/entity/list.gbasm index 7f09455..5aa71bd 100644 --- a/entity/list.gbasm +++ b/entity/list.gbasm @@ -79,7 +79,7 @@ Entity_list: .DB $00 ; Starting mana - .DB $03 + .DB $05 .PADTO =.Penguin+8 diff --git a/entity/penguin.gbasm b/entity/penguin.gbasm index 0078fb9..75bba8c 100644 --- a/entity/penguin.gbasm +++ b/entity/penguin.gbasm @@ -88,11 +88,9 @@ Penguin_Turn: LD A, $mem_bunny_status CP $01 - JR NZ, =.Try_Freeze_Attack - .Run_away: - CALL =Walking_Away - - JR =.Start_action_or_movement.end + JR Z, =.Run_away + CP $04 + JR Z, =.Run_away .Try_Freeze_Attack: LD A, L @@ -118,6 +116,11 @@ Penguin_Turn: JR =.Start_action_or_movement.end + .Run_away: + CALL =Walking_Away + + JR =.Start_action_or_movement.end + .Try_Walking: CALL =Walking .Start_action_or_movement.end: |