Spikes - RetroKoH/S1Fixed GitHub Wiki
| <- $33: Pushable Blocks | Object List | $3B: Purple Rock -> |
|---|
The Spikes are objects in Sonic the Hedgehog, appearing in every zone of the game, except for Final Zone (though they can be spawned in via Debug Mode). They are a solid object, with one side being painful to the touch. Due to a collision bug, Sonic can actually take damage from two side of the object: The pointed end, and the flat end on the opposite side of the pointed end.
File: _incObj/36 Spikes.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.
This object's subtype follows the following bit format: %0SSSMMMM.
-
MMMM - The lower nybble dictates spike movement behavior.
- If the value == 0: The spikes don't move.
- If the value == 1: The spikes move up and down.
- If the value > 1: The spikes move left and right.
-
0SSS - The upper nybble dictates the size and orientation of the spikes.
- 0x - 3 vertical spikes (pointed up by default)
- 1x - 3 horizontal spikes (pointed left by default)
- 2x - 1 vertical spike
- 3x - 3 wide vertical spikes
- 4x - 6 wide vertical spikes
- 5x - 1 horizontal spike
- Type: Full
The solidity for this object is dependent on its subtype.
- Width: 31px
- Height (jumping): 16px
- Height (walking): 17px
- Width: 27px
- Height (jumping): 32px
- Height (walking): 33px
- Width: 15px
- Height (jumping): 16px
- Height (walking): 17px
- Width: 39px
- Height (jumping): 16px
- Height (walking): 17px
- Width: 75px
- Height (jumping): 16px
- Height (walking): 17px
- Width: 27px
- Height (jumping): 4px
- Height (walking): 5px
| 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 | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ |
| 3x | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ |