2.2 KiB
2.2 KiB
Pedestals: spawn wait, appear and item placement (parity pass)
Collectible wait
- Entity_Pickup::Init 006e02f0: zeroes
_wait(+0x544), then sets it to 20 (0x14) for variant 100. A collectible plays "Idle" straight away with_entityCollisionClass4 (no Appear; 005.100_collectible.anm2 has none). - Entity_Pickup::Update 006e3940:
if (_wait > 0) --_waitonce an update (it is also set to 30 when an Eternal Chest recloses). - Entity_Pickup::HandleCollision 006e8ae0: a collectible (variant 100 or 0x6e) with a subtype is taken only when the
player is not IsHoldingItem (007bf490: body anim "Pickup"/"Pickup_Online"), CanAddCollectible, and
_wait < 1. A restocked shop item gets_wait = 20again. The familiar branch also skips while_wait > 0. - The collectible branch returns 0, so the player still collides physically while the wait runs.
Other pickups' Appear
- Init: a pickup spawned after the room's first frame plays "Appear" with collision class 0; spawned on the room's first frame (or the room check at stage 0x23), "Idle" with class 4.
- Update: when Appear ends, "Idle" (a subtype-0 chest: "Opened") and class 4. While Appear/AppearFast/Reappear plays, the anm2's "DropSound" event plays the drop sound and (non-chests) sets class 4.
- DropSound frames (Rep+ dump): hearts 25, coins 23 (sticky nickel 9), keys 25, bombs 25 (giga 17), sacks 25, pills 26, chests 7.
Render (variant 100)
- Entity_Pickup::Render 006e69b0: the overlay (the altar, "Alternates") and the main animation are drawn at
_renderPositionwith layer 1 (the item, "head") hidden, then layer 1 alone is drawn on top at the same position (+2.6 when Flip's ghost pedestal is drawn). The altar and item share one origin: Idle's head frames sit at y -6..-10 with pivot (16, 32), Alternates frame 0 (the stone) pivot (16, 16).
Placement
- Room::FindFreePickupSpawnPosition 00813520 (outPos, pos, step, isAvoidActiveEntities, isAllowPits, isAvoidDoors): 125 tries, xorshift (1, 9, 29) from 0x441c1dfd, step += 5 (back to 0 past 500), candidates snapped to cell centres (40 + 40i, 120 + 40j), gridPaths below 600/700/800/900/1000 by try, and rejected within 20 of types 4/5/6 (and players/NPCs when avoiding). UseActiveItem's Pandora case passes (40, 0, 0, 0).