Auto Roll Tag - RetroKoH/S1Fixed GitHub Wiki

<- $03: Path Swapper Object List $0C: LZ Breakable Pole

The Auto Roll Tag is an object in Sonic the Hedgehog, theoretically able to appear anywhere in the game where its necessary to force Sonic into a roll state, though it only appears in Green Hill Zone. The functionality of this object is what forces Sonic to roll through the S-shaped tunnels in Green Hill Zone.

This object was backported from Sonic 2, removing the need for the dedicated subroutine found in Sonic_Loops.

Code

File: _incObj/04 Auto Roll Tag.asm

Changes from Sonic 1
  • This object replaces the original system, wherein forced roll handling was performed via a dedicated subroutine. If Sonic ran through specific chunks, he would be forced into a roll state. This object, in conjunction with Object 03, completely eliminates any need for that subroutine.
Changes from Sonic 2
  • Word-length obPriority pointer due to the new Priority Manager.
  • Word-Length obRespawnAddr added due to the S3K Object Manager.
  • The object has been slightly rewritten to process more efficiently.

Subtypes

  • Bits 0 and 1 dictate the size (in pixels) of the tag. Values 0-3 yield the sizes $20, $40, $80, and $100.
  • Bit 2 determines Orientation. If clear, the tag is vertical. If set, it's horizontal.

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 ~ ~ ~ DispWid ~ ~ ~ ~ Subtype ~ ~ ~ ~ ~ ~ ~
3x Radius Radius Flag ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Sprite Data

Later Game Equivalents

  • Obj84 - Sonic 2
  • Obj_AutoSpin - Sonic 3K
⚠️ **GitHub.com Fallback** ⚠️