LZ Flapping Door - RetroKoH/S1Fixed GitHub Wiki

<- $0B: LZ Breakable Pole Object List $0D: Signpost ->

The Flapping Door is an object in Sonic the Hedgehog, appearing in Labyrinth Zone. It appears just before water tunnels, opening and closing at timed intervals. When closed, the water tunnel is disabled. When it opens, the tunnel is enabled, resulting in Sonic being dragged into the tunnel if he is within range. The object is solid, and can be pushed, as well as stood upon (though the latter is not possible in normal gameplay).

Subtypes

This object's subtype dictates how long it waits before opening/closing.

The formula is subtype*60.

Object Status Table

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF
0x ID Render Gfx Gfx Map Map Map Map XPos XPos XPos XPos YPos YPos YPos YPos
1x ~ ~ ~ ~ RespawnAddr RespawnAddr ~ ~ Priority Priority Frame AniFrame Anim PrevAnim FrameTime DelayTime
2x ~ ~ ~ DispWid Routine ~ ~ ~ Subtype ~ ~ ~ ~ ~ ~ ~
3x Wait Wait Time Time ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Code File

_incObj/0C Flapping Door.asm

Changes from Sonic 1

  • Word-length obPriority pointer due to the new Priority Manager.
  • Word-Length obRespawnAddr added due to the S3K Object Manager.
  • Faster timer calculation during object initialization.
  • Optimal Animation loading (changed addressing mode).
  • The object has been completely reworked so that it is solid on both sides, and works correctly if mirrored horizontally. The animation script was also altered slightly as a part of this rework. (Credit: Hivebrain).

Sprite Data

Later Game Equivalents

  • ???