LZ Breakable Pole - RetroKoH/S1Fixed GitHub Wiki

<- $04: Auto Roll Tag Object List $0C: LZ Flapping Door ->
S1Fixed_002

The Breakable Pole is an object in Sonic the Hedgehog, appearing in Labyrinth Zone. It appears in water tunnels, where Sonic can latch onto them and hang on for a short time. Pressing one of the jump buttons releases Sonic's hold on the pole. If the player doesn't press one of the jump buttons, the pole will snap. In either case, Sonic is sent further down the current of the water tunnel.

Code

File: _incObj/0B Pole That Breaks.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.
  • Routine 02: Pole_Action has had the logic for handling Sonic grabbing onto and hanging from it split off into their own separate routines: Pole_Grab and Pole_Hang, respectively. This reduces the amount of processing the object does on a given frame. Pole_Action now only runs RememberState. Sonic's object collision handling has been modified so that when he collides with the pole, the pole's routine will advance to Pole_Grab, which then immediately falls through to Pole_Hang.

Subtypes

This object's subtype dictates how long Sonic can hold onto it before it snaps.

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 ~ ~ ~
2x ColType ~ ~ DispWid Routine ~ ~ ~ Subtype ~ ~ ~ ~ ~ ~ ~
3x GrabTime GrabTime ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Sprite Data

Later Game Equivalents

  • ObjC1 - Sonic 2 (Wing Fortress Zone)
  • Obj_HCZBreakableBar - Sonic 3 & Knuckles (Hydrocity Zone)
⚠️ **GitHub.com Fallback** ⚠️