aboutsummaryrefslogtreecommitdiff
path: root/entity
diff options
context:
space:
mode:
authorAstatin <[email protected]>2025-05-09 10:28:14 +0200
committerAstatin <[email protected]>2025-05-09 10:28:14 +0200
commit507a9876b85f47ff81cc9150bea858eec064ba05 (patch)
tree5b24e7836ce07ad8768d9c7ad7a1c6a2b3e92106 /entity
parent4b02238d88af30c98b2f8d44e5200fb80b04bcad (diff)
Refactor viewport to not need Fix_Bunny_Screen anymore and "fix" it before every frame
Diffstat (limited to 'entity')
-rw-r--r--entity/bunny.gbasm28
-rw-r--r--entity/display.gbasm9
-rw-r--r--entity/init.gbasm1
3 files changed, 1 insertions, 37 deletions
diff --git a/entity/bunny.gbasm b/entity/bunny.gbasm
index 46854b8..c58a645 100644
--- a/entity/bunny.gbasm
+++ b/entity/bunny.gbasm
@@ -167,29 +167,6 @@ Move_Bunny:
LD $mem_entity_being_attacked_low, A
.Delayed_Attack.end:
- .2x_speed_middle_update:
- LD A, $mem_bunny_flags
- BIT 0, A
- JR Z, =.2x_speed_middle_update.end
- LD A, $mem_moving_animation_step
- CP $07
- JR NZ, =.2x_speed_middle_update.end
-
- LD A, $mem_bunny_x
- LD B, A
- LD A, $mem_bunny_y
- LD C, A
- LD A, $mem_bunny_direction
- LD D, A
- LD A, $02
- .ADD_A_TO_DIRECTION_BC
- LD A, B
- LD $mem_bunny_x, A
- LD A, C
- LD $mem_bunny_y, A
- DBG
- .2x_speed_middle_update.end:
-
.End_movement:
LD A, $mem_map_loading_flags
BIT 3, A
@@ -208,7 +185,7 @@ Move_Bunny:
LD B, A
LD A, $mem_bunny_y
LD C, A
- LD A, $01
+ LD A, E
.ADD_A_TO_DIRECTION_BC
LD A, B
LD $mem_bunny_x, A
@@ -407,9 +384,6 @@ Center_viewport_around_entity: ; Entity pointer in HL
BIT 0, (HL)
JR Z, =.moving_animation_end
SLA E
- LD A, E
- AND $0f
- LD E, A
.moving_animation_end:
LD A, B
diff --git a/entity/display.gbasm b/entity/display.gbasm
index 0a38755..42f4740 100644
--- a/entity/display.gbasm
+++ b/entity/display.gbasm
@@ -152,16 +152,7 @@ Display_Entity:
CP $30
JR NZ, =.SuperJump_Animation.end
- PUSH BC
- LD A, $mem_moving_animation_step
- CPL
- INC A
- LD B, A
LD A, $mem_moving_animation_step
- SLA A
- AND $0f
- ADD B
- POP BC
CP $00
JR Z, =.SuperJump_Animation.end
.ADD_A_TO_DIRECTION_BC
diff --git a/entity/init.gbasm b/entity/init.gbasm
index 1e39456..80e3848 100644
--- a/entity/init.gbasm
+++ b/entity/init.gbasm
@@ -108,7 +108,6 @@ Initialize_Entities:
CALL =Reset_Entities_Collision_Map
-Fix_Bunny_screen:
LD A, $mem_bunny_x
SUB $05
LD $mem_viewport_x, A