aboutsummaryrefslogtreecommitdiff
path: root/entity/display.gbasm
diff options
context:
space:
mode:
authorAstatin <[email protected]>2025-01-10 16:08:06 +0900
committerAstatin <[email protected]>2025-01-10 16:08:06 +0900
commitdc5a9431bf4438000dcd028aa6b9c17c9ca492d8 (patch)
tree8a63e04d017dc58d8c88f9842e2cd2ca7273ab05 /entity/display.gbasm
parent48f765802fc16071d1d605b1fd940bda4562d472 (diff)
Use new relative label thingy
Diffstat (limited to 'entity/display.gbasm')
-rw-r--r--entity/display.gbasm100
1 files changed, 50 insertions, 50 deletions
diff --git a/entity/display.gbasm b/entity/display.gbasm
index d6899ff..d9baff7 100644
--- a/entity/display.gbasm
+++ b/entity/display.gbasm
@@ -38,7 +38,7 @@ Display_Entity:
LD E, A
CP $00
- JP Z, =Display_Entity.skip
+ JP Z, =.skip
LD A, (HL+)
ADD $80
@@ -47,10 +47,10 @@ Display_Entity:
LD B, A
SUB $82
CP D
- JP NC, =Display_Entity.skip
+ JP NC, =.skip
ADD $0e
CP D
- JP C, =Display_Entity.skip
+ JP C, =.skip
LD A, D
SUB $80
SUB B
@@ -66,10 +66,10 @@ Display_Entity:
LD C, A
SUB $82
CP D
- JP NC, =Display_Entity.skip
+ JP NC, =.skip
ADD $0d
CP D
- JP C, =Display_Entity.skip
+ JP C, =.skip
LD A, D
SUB $80
SUB C
@@ -83,18 +83,18 @@ Display_Entity:
LD A, (HL+)
BIT 3, A
LD D, A
- Display_Entity.Moving_Animation:
- JR Z, =Display_Entity.Moving_Animation.end
+ .Moving_Animation:
+ JR Z, =.Moving_Animation.end
LD A, $mem_moving_animation_step
.ADD_A_TO_DIRECTION_BC
- Display_Entity.Moving_Animation.end:
+ .Moving_Animation.end:
- Display_Entity.Blinking_Animation:
+ .Blinking_Animation:
LD A, D
AND $f0
CP $50
- JR NZ, =Display_Entity.Blinking_Animation.end
+ JR NZ, =.Blinking_Animation.end
LD A, $mem_moving_animation_step
PUSH DE
@@ -104,49 +104,49 @@ Display_Entity:
POP DE
AND $02
CP $00
- JP Z, =Display_Entity.skip
+ JP Z, =.skip
- Display_Entity.Blinking_Animation.end:
+ .Blinking_Animation.end:
- Display_Entity.Action_Animation:
+ .Action_Animation:
LD A, D
AND $f0
CP $10
- JR NZ, =Display_Entity.Action_Animation.end
+ JR NZ, =.Action_Animation.end
LD A, $mem_moving_animation_step
CP $04
- JR C, =Display_Entity.Action_Animation.Step1
+ JR C, =.Action_Animation.Step1
CP $0c
- JR C, =Display_Entity.Action_Animation.Step2
- JR =Display_Entity.Action_Animation.end
+ JR C, =.Action_Animation.Step2
+ JR =.Action_Animation.end
- Display_Entity.Action_Animation.Step1:
+ .Action_Animation.Step1:
SLA A
SLA A
- JR =Display_Entity.Action_Animation.Apply
+ JR =.Action_Animation.Apply
- Display_Entity.Action_Animation.Step2:
+ .Action_Animation.Step2:
SUB $04
SLA A
XOR $ff
INC A
ADD $10
- Display_Entity.Action_Animation.Apply:
+ .Action_Animation.Apply:
.ADD_A_TO_DIRECTION_BC
- Display_Entity.Action_Animation.end:
+ .Action_Animation.end:
- Display_Entity.SuperJump_Animation:
+ .SuperJump_Animation:
LD A, D
AND $f0
CP $30
- JR NZ, =Display_Entity.SuperJump_Animation.end
+ JR NZ, =.SuperJump_Animation.end
LD A, $mem_moving_animation_step
CP $00
- JR Z, =Display_Entity.SuperJump_Animation.end
+ JR Z, =.SuperJump_Animation.end
.ADD_A_TO_DIRECTION_BC
LD A, $mem_moving_animation_step
SUB $08
@@ -159,35 +159,35 @@ Display_Entity:
INC A
ADD C
LD C, A
- Display_Entity.SuperJump_Animation.end:
+ .SuperJump_Animation.end:
- Display_Entity.Shaking_Animation:
+ .Shaking_Animation:
LD A, D
AND $f0
CP $40
- JR NZ, =Display_Entity.Shaking_Animation.end
+ JR NZ, =.Shaking_Animation.end
LD A, $mem_moving_animation_step
CP $00
- JR Z, =Display_Entity.Shaking_Animation.end
+ JR Z, =.Shaking_Animation.end
LD A, $mem_moving_animation_step
SRA A
AND $03
BIT 1, A
RES 1, A
- JR NZ, =Display_Entity.Shaking_Animation.skip_invert
+ JR NZ, =.Shaking_Animation.skip_invert
CPL
INC A
- Display_Entity.Shaking_Animation.skip_invert:
+ .Shaking_Animation.skip_invert:
ADD B
LD B, A
- Display_Entity.Shaking_Animation.end:
+ .Shaking_Animation.end:
- Display_Entity.Moving_Hops:
+ .Moving_Hops:
LD A, D
AND $f8
CP $08
- JR NZ, =Display_Entity.Moving_Hops.end
+ JR NZ, =.Moving_Hops.end
LD A, $mem_moving_animation_step
SUB $08
@@ -201,50 +201,50 @@ Display_Entity:
INC A
ADD C
LD C, A
- Display_Entity.Moving_Hops.end:
+ .Moving_Hops.end:
LD A, D
AND $07
CP $enum_direction_left
- JR Z, =Display_Entity.Left_Direction_sprite
+ JR Z, =.Left_Direction_sprite
CP $enum_direction_right
- JR Z, =Display_Entity.Right_Direction_sprite
+ JR Z, =.Right_Direction_sprite
CP $enum_direction_up
- JR Z, =Display_Entity.Up_Direction_sprite
- JP =Display_Entity.Down_Direction_sprite
+ JR Z, =.Up_Direction_sprite
+ JP =.Down_Direction_sprite
- Display_Entity.Left_Direction_sprite:
+ .Left_Direction_sprite:
CALL =Flags_From_Animation ; Uses and changes HL
LD D, A
- JP =Display_Entity.Write_OBJ
+ JP =.Write_OBJ
- Display_Entity.Right_Direction_sprite:
+ .Right_Direction_sprite:
LD A, $02
ADD E
LD E, A
CALL =Flags_From_Animation ; Uses and changes HL
OR $20
LD D, A
- JP =Display_Entity.Write_OBJ
+ JP =.Write_OBJ
- Display_Entity.Up_Direction_sprite:
+ .Up_Direction_sprite:
LD A, $04
ADD E
LD E, A
CALL =Flags_From_Animation ; Uses and changes HL
LD D, A
- JP =Display_Entity.Write_OBJ
+ JP =.Write_OBJ
- Display_Entity.Down_Direction_sprite:
+ .Down_Direction_sprite:
LD A, $08
ADD E
LD E, A
CALL =Flags_From_Animation ; Uses and changes HL
LD D, A
- JP =Display_Entity.Write_OBJ
+ JP =.Write_OBJ
- Display_Entity.Write_OBJ:
+ .Write_OBJ:
PUSH HL
; First OBJ (left)
LD HL, $mem_oam_buffer
@@ -259,7 +259,7 @@ Display_Entity:
LD (HL+), A
LD A, D
LD (HL+), A
-
+
; Second OBJ
LD A, B
ADD $08
@@ -279,7 +279,7 @@ Display_Entity:
LD $mem_oam_buffer_low, A
POP HL
- Display_Entity.skip:
+ .skip:
LD A, L
AND $f0
ADD $10