LZ Flapping Door - RetroKoH/S1Fixed GitHub Wiki

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

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).

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).

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 Render Addr Addr Addr Gfx Gfx Map Map Map Map XPos XPos XPos XPos YPos YPos
1x YPos YPos ~ ~ ~ ~ RespawnAddr RespawnAddr ~ ~ Priority Priority Frame Anim AniFrame FrameTime
2x ~ ~ ~ DispWid Routine ~ ~ ~ Subtype ~ ~ ~ ~ ~ ~ ~
3x Wait Wait Time Time ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Sprite Data

Later Game Equivalents

  • ???
⚠️ **GitHub.com Fallback** ⚠️