Skip to content

Commit

Permalink
Document all actors' Param and Flags
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsteele committed Oct 20, 2024
1 parent 2cfe057 commit db6a126
Show file tree
Hide file tree
Showing 17 changed files with 53 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/actors/acid.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
;;; is removed.
;;; * State2: Unused.
;;; * State3: Unused.
;;; * State4: Unused.

;;; The OBJ tile ID for acid projectile actors.
kTileIdObjProjAcid = $80
Expand Down
2 changes: 2 additions & 0 deletions src/actors/breakball.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
;;;=========================================================================;;;

;;; State bytes for breakball projectiles:
;;; * Flags: Unused.
;;; * State1: Unused.
;;; * State2: Unused.
;;; * State3: Unused.
;;; * State4: Unused.

;;; The hit radius of a breakball projectile actor, in pixels.
kProjBreakballRadius = 3
Expand Down
1 change: 1 addition & 0 deletions src/actors/breakbomb.inc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
;;; breakbomb expires.
;;; * State2: Unused.
;;; * State3: Unused.
;;; * State4: Unused.

;;; The first tile ID for drawing breakbomb projectile actors.
kTileIdObjProjBreakbombFirst = $80
Expand Down
1 change: 1 addition & 0 deletions src/actors/breakfire.inc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
;;; somehow wraps back around to zero without the breakfire bouncing, then
;;; the breakfire will expire. Resets to zero when the breakfire bounces.
;;; * State3: Unused.
;;; * State4: Unused.

;;; The first tile ID for drawing breakfire projectile actors.
kTileIdObjProjBreakfireFirst = $ab
Expand Down
2 changes: 2 additions & 0 deletions src/actors/bullet.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
;;;=========================================================================;;;

;;; State bytes for bullet projectiles:
;;; * Flags: Unused.
;;; * State1: Counter that starts at zero and increments every frame; if it
;;; wraps back around to zero before the bullet hits anything, then the
;;; bullet is removed.
;;; * State2: Unused.
;;; * State3: Unused.
;;; * State4: Unused.

;;; OBJ tile IDs for bullet projectile actors:
kTileIdObjProjBulletFirst = $8e
Expand Down
1 change: 1 addition & 0 deletions src/actors/child.inc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
;;; unchanged; if false ($00), the child is automatically drawn facing the
;;; player avatar.
;;; * State3: Unused.
;;; * State4: Unused.

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

Expand Down
13 changes: 13 additions & 0 deletions src/actors/crawler.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@
;;;=========================================================================;;;

;;; State bytes for beetle and hothead baddies:
;;; * Param: The initial flags to set (0 or bObj::FlipH and/or bObj::FlipV).
;;; * Flags: The meaning of these depends on if the baddie is crawling
;;; horizontally (on a floor or ceiling) or vertically (on a wall):
;;; * If the baddie is crawling horizontally, then the bObj::FlipH bit is
;;; set if the baddie is facing left, or cleared if it is facing right;
;;; and the bObj::FlipV bit is set if the baddie is crawling
;;; upside-down on the ceiling, or cleared if it is crawling
;;; right-side-up on the floor.
;;; * If the baddie is crawling vertically, then the bObj::FlipH bit is
;;; set if the baddie is just to the left of the wall, or cleared if it
;;; is just to the right of the wall; and the bObj::FlipV bit is set if
;;; the baddie is crawling downwards, or cleared if it is crawling
;;; upwards.
;;; * State1: Toggles between 1 and 0 each frame; used to make baddie move
;;; by one pixel every other frame.
;;; * State2: Unused for beetles; for hotheads, this is the number of
Expand Down
1 change: 1 addition & 0 deletions src/actors/ember.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
;;; ember is removed.
;;; * State2: Unused.
;;; * State3: Unused.
;;; * State4: Unused.

;;; The OBJ tile ID for ember projectile actors.
kTileIdObjProjEmber = $86
Expand Down
1 change: 1 addition & 0 deletions src/actors/flamestrike.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
;;; * State2: The current visual height of the flamestrike, in tiles.
;;; * State3: A timer that counts up or down each frame, depending on the
;;; current mode.
;;; * State4: Unused.

;;; Possible values for a flamestrike projectile actor's State1 byte.
.ENUM eProjFlamestrike
Expand Down
2 changes: 2 additions & 0 deletions src/actors/grenade.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
;;;=========================================================================;;;

;;; State bytes for grenade projectiles:
;;; * Flags: Unused.
;;; * State1: Counter that starts at zero and increments every frame; if it
;;; wraps back around to zero before the grenade hits anything, then the
;;; grenade explodes.
;;; * State2: Unused.
;;; * State3: Unused.
;;; * State4: Unused.

;;; How many frames the room shakes for when a grenade hits the ground.
kGrenadeShakeFrames = 4
Expand Down
2 changes: 2 additions & 0 deletions src/actors/particle.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
;;;=========================================================================;;;

;;; State bytes for smoke particles:
;;; * Flags: Unused.
;;; * State1: Counter that starts at zero and increments every frame; once it
;;; reaches kParticleNumFrames, the particle expires.
;;; * State2: Unused.
;;; * State3: Unused.
;;; * State4: Unused.

;;; How long a smoke particle actor animates before disappearing, in frames.
kSmokeParticleNumFrames = 12
Expand Down
3 changes: 3 additions & 0 deletions src/actors/rhino.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
;;;=========================================================================;;;

;;; State bytes for rhino baddies:
;;; * Param: The initial flags to set (0 or bObj::FlipH).
;;; * Flags: The bObj::FlipH bit is set if the rhino is facing left, or
;;; cleared if it is facing right.
;;; * State1: The current eBadRhino state value.
;;; * State2: A timer that counts up/down each frame, depending on the
;;; current eBadRhino value.
Expand Down
5 changes: 5 additions & 0 deletions src/actors/rocket.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@
;;;=========================================================================;;;

;;; State bytes for rocket projectiles:
;;; * Flags: For a horizontally-moving rocket, the bObj::FlipH bit will be
;;; set if the rocket is moving left, or cleared if it is moving right.
;;; For a vertically-moving rocket, the bObj::FlipV bit will be set if the
;;; rocket is moving up, or cleared if it is moving down.
;;; * State1: Counter that starts at zero and increments every frame; if it
;;; wraps back around to zero before the rocket hits anything, then the
;;; rocket is removed.
;;; * State2: Unused.
;;; * State3: Unused.
;;; * State4: Unused.

;;; How many frames the room shakes for when a rocket hits the ground.
kRocketShakeFrames = 30
Expand Down
12 changes: 12 additions & 0 deletions src/actors/rodent.inc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@

;;; State bytes for rodent baddies:
;;; * Param: Unused.
;;; * Flags: The meaning of these depends on if the rodent is running
;;; horizontally (on a floor or ceiling) or vertically (on a wall):
;;; * If the rodent is running horizontally, then the bObj::FlipH bit is
;;; set if the rodent is facing left, or cleared if it is facing right;
;;; and the bObj::FlipV bit is set if the rodent is running
;;; upside-down on the ceiling, or cleared if it is running
;;; right-side-up on the floor.
;;; * If the rodent is running vertically, then the bObj::FlipH bit is
;;; set if the rodent is just to the left of the wall, or cleared if it
;;; is just to the right of the wall; and the bObj::FlipV bit is set if
;;; the rodent is running downwards, or cleared if it is running
;;; upwards.
;;; * State1: The current eBadRodent state value.
;;; * State2: A timer that counts up/down each frame, depending on the
;;; current eBadRodent value.
Expand Down
1 change: 1 addition & 0 deletions src/actors/spine.inc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
;;; wraps back around to zero before the spine hits anything, then the
;;; spine is removed.
;;; * State3: Unused.
;;; * State4: Unused.

;;; Tile IDs for drawing spine projectile actors.
kTileIdObjProjSpineFirst = $b8
Expand Down
5 changes: 5 additions & 0 deletions src/actors/toddler.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@
;;;=========================================================================;;;

;;; State bytes for toddler NPCs:
;;; * Param: The bNpcToddler parameter.
;;; * Flags: The bObj::FlipH bit is set if the toddler is facing left, or
;;; cleared if they are facing right. The Pri bit is set if the toddler
;;; should appear behind the background.
;;; * State1: How many more frames until the toddler turns around.
;;; * State2: Unused.
;;; * State3: Unused.
;;; * State4: Unused.

;;; The first tile ID for toddler NPC actors.
kTileIdObjToddlerFirst = $80
Expand Down
1 change: 0 additions & 1 deletion src/actors/waterfall.inc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

;;; State bytes for waterfall smoke:
;;; * Flags: Unused.
;;; * Param: The platform index for the water below.
;;; * State1: The platform index for the water below.
;;; * State2: The current height of the waterfall, in pixels.
;;; * State3: Boolean; true ($ff) if this waterfall has been shut off and the
Expand Down

0 comments on commit db6a126

Please sign in to comment.