Skip to content

Commit

Permalink
Implement flower baddie for ShadowFlower room
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsteele committed Oct 27, 2024
1 parent c2772a5 commit bca4613
Show file tree
Hide file tree
Showing 24 changed files with 969 additions and 67 deletions.
8 changes: 8 additions & 0 deletions src/actor.asm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
.IMPORT FuncA_Actor_TickBadCrab
.IMPORT FuncA_Actor_TickBadFirefly
.IMPORT FuncA_Actor_TickBadFish
.IMPORT FuncA_Actor_TickBadFlower
.IMPORT FuncA_Actor_TickBadFlydrop
.IMPORT FuncA_Actor_TickBadGhostMermaid
.IMPORT FuncA_Actor_TickBadGhostOrc
Expand Down Expand Up @@ -92,6 +93,7 @@
.IMPORT FuncA_Objects_DrawActorBadCrab
.IMPORT FuncA_Objects_DrawActorBadFirefly
.IMPORT FuncA_Objects_DrawActorBadFish
.IMPORT FuncA_Objects_DrawActorBadFlower
.IMPORT FuncA_Objects_DrawActorBadFlydrop
.IMPORT FuncA_Objects_DrawActorBadGhostMermaid
.IMPORT FuncA_Objects_DrawActorBadGhostOrc
Expand Down Expand Up @@ -480,6 +482,7 @@ _NoHit:
d_byte BadCrab, 6
d_byte BadFirefly, 6
d_byte BadFish, 6
d_byte BadFlower, 14
d_byte BadFlydrop, 6
d_byte BadGhostMermaid, 13
d_byte BadGhostOrc, kOrcBoundingBoxUp
Expand Down Expand Up @@ -548,6 +551,7 @@ _NoHit:
d_byte BadCrab, 8
d_byte BadFirefly, 8
d_byte BadFish, 4
d_byte BadFlower, 8
d_byte BadFlydrop, 6
d_byte BadGhostMermaid, 7
d_byte BadGhostOrc, kOrcBoundingBoxDown
Expand Down Expand Up @@ -616,6 +620,7 @@ _NoHit:
d_byte BadCrab, 7
d_byte BadFirefly, 6
d_byte BadFish, 6
d_byte BadFlower, 12
d_byte BadFlydrop, 6
d_byte BadGhostMermaid, 6
d_byte BadGhostOrc, kOrcBoundingBoxSide
Expand Down Expand Up @@ -752,6 +757,7 @@ _TypeSpecificTick:
d_entry table, BadCrab, FuncA_Actor_TickBadCrab
d_entry table, BadFirefly, FuncA_Actor_TickBadFirefly
d_entry table, BadFish, FuncA_Actor_TickBadFish
d_entry table, BadFlower, FuncA_Actor_TickBadFlower
d_entry table, BadFlydrop, FuncA_Actor_TickBadFlydrop
d_entry table, BadGhostMermaid, FuncA_Actor_TickBadGhostMermaid
d_entry table, BadGhostOrc, FuncA_Actor_TickBadGhostOrc
Expand Down Expand Up @@ -925,6 +931,7 @@ _Finish:
d_entry table, eActor::BadCrab, Func_InitActorDefault
d_entry table, eActor::BadFirefly, FuncA_Room_InitActorBadFirefly
d_entry table, eActor::BadFish, Func_InitActorWithFlags
d_entry table, eActor::BadFlower, Func_InitActorDefault
d_entry table, eActor::BadFlydrop, FuncA_Room_InitActorBadFlydrop
d_entry table, eActor::BadGhostMermaid, Func_InitActorWithState1
d_entry table, eActor::BadGhostOrc, Func_InitActorWithState1
Expand Down Expand Up @@ -994,6 +1001,7 @@ _Finish:
d_entry table, BadCrab, FuncA_Objects_DrawActorBadCrab
d_entry table, BadFirefly, FuncA_Objects_DrawActorBadFirefly
d_entry table, BadFish, FuncA_Objects_DrawActorBadFish
d_entry table, BadFlower, FuncA_Objects_DrawActorBadFlower
d_entry table, BadFlydrop, FuncA_Objects_DrawActorBadFlydrop
d_entry table, BadGhostMermaid, FuncA_Objects_DrawActorBadGhostMermaid
d_entry table, BadGhostOrc, FuncA_Objects_DrawActorBadGhostOrc
Expand Down
1 change: 1 addition & 0 deletions src/actor.inc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ kMaxActors = 16
BadCrab ; moves left/right randomly on a floor
BadFirefly ; flies up and down, and shoots horizontally
BadFish ; swims back and forth in water
BadFlower ; grows and shoots fireballs
BadFlydrop ; flies left/right randomly, and drops acid
BadGhostMermaid ; part of the shadow boss
BadGhostOrc ; part of the shadow boss
Expand Down
19 changes: 19 additions & 0 deletions src/actors/explosion.asm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
.IMPORT FuncA_Objects_MoveShapeUpByA
.IMPORT FuncA_Objects_MoveShapeUpOneTile
.IMPORT FuncA_Objects_SetShapePosToActorCenter
.IMPORT Func_FindEmptyActorSlot
.IMPORT Func_InitActorDefault
.IMPORT Func_SetActorCenterToPoint
.IMPORT Ram_ActorState1_byte_arr
.IMPORT Ram_ActorType_eActor_arr

Expand Down Expand Up @@ -58,6 +60,23 @@ kPaletteObjExplosion = 0

;;;=========================================================================;;;

.SEGMENT "PRGA_Room"

;;; Spawns a new smoke explosion actor (if possible), starting it at the
;;; room pixel position stored in Zp_PointX_i16 and Zp_PointY_i16.
;;; @preserve T0+
.EXPORT FuncA_Room_SpawnExplosionAtPoint
.PROC FuncA_Room_SpawnExplosionAtPoint
jsr Func_FindEmptyActorSlot ; preserves T0+, returns C and X
bcs @done
jsr Func_SetActorCenterToPoint ; preserves X and T0+
jmp Func_InitActorSmokeExplosion ; preserves T0+
@done:
rts
.ENDPROC

;;;=========================================================================;;;

.SEGMENT "PRGA_Actor"

;;; Performs per-frame updates for a smoke explosion actor.
Expand Down
Loading

0 comments on commit bca4613

Please sign in to comment.