User Tools

Site Tools


super:data_locations:sprite_obj_locations

This is an old revision of the document!


Sprite objects



Sprite objects are general use spritemaps, driven by an instruction set. Generally, they are utilized as 'particle effects', such as dust, explosions, or flashes, but they are also utilized by certain enemies to allow for additional sprite-maps to be drawn simultaneously without requiring additional enemies. If you're programming a custom item, enemy, or other such thing, sprite objects are a great, simple way to add graphical effects to your custom code.

Spawning a Sprite Object

To spawn a sprite object, you first need to set 4 addresses in ram with parameters for that sprite object:

$12: The X position to spawn your sprite object
$14: The Y position to spawn your sprite object
$16: the Sprite object ID (see table below)
$18: The base tile number and palette bits to spawn your sprite object with

To actually spawn the sprite object, you need to call the routine in bank $B4 which does so, using the following operation:

 JSL $B4BC26 

For any sprite object that uses graphics from the game's uncompressed, general use sprite graphic set, you're most likely going to need to store zero to $18. In cases where sprite objects need to use different palettes or graphics sets, the value stored to $18 will vary.

Sprite object list

Sprite Object ID Description Base tile number / palette bits
00 Grapple Flash #$0000
01 Charge beam sparks #$0000
02 Charge beam sparks + flash #$0000
03 Super missile explosion #$0000
04 Bomb explosion #$0000
05 Ice beam particles #$0000
06 Dud shot #$0000
07 Power bomb #$0000
08 Some sort of energy shot, only 1 frame #$0000
09 Smoke plume #$0000
0A Dust 1 #$0000
0B Dust 2 #$0000
0C Unused? Explosion #$0000
0D Small health pickup #$0000
0E Large health pickup #$0000
0F Morph bomb #$0000
10 Slower small health pickup #$0000
11 Screw attack kill particles #$0000
12 Large, fast dust #$0000
13 Large, fast dust with a glitchy end frame #$0000
14 Large, fast dust with an extended glitchy end frame #$0000
15 Large, slow dust #$0000
16 Glitched space pirate shot? #$0000
17 Glitched space pirate shot? #$0000
18 Bubbles #$0000
19 Save station electricity? #$0000
1A Slowly extending vertical shutter #$0000
1B Somewhat quickly contracting vertical shutter #$0000
1C Elevator platform, permanent #$0000
1D Large enemy explosion #$0000
32 Metroid electricity $0F96,X : ORA $0F98,X
34 Metroid shell $0F96,X : ORA $0F98,X
super/data_locations/sprite_obj_locations.1583278625.txt.gz · Last modified: 2020/03/03 23:37 by mccad