Difference between revisions of "Sprites"
From TLoZ: ALTTP Hacking Resources
m |
|||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | == Drawing == | ||
+ | Sprites vary on how they are drawn to the screen. 8{{x}}8 and 16{{x}}16 sprites tend to use {{hex|Sprite_PrepAndDrawSingleLarge}} to draw. Larger sprites uses their custom OAM. | ||
+ | |||
==Important Hex Addresses== | ==Important Hex Addresses== | ||
===Sprite Stats And Properties=== | ===Sprite Stats And Properties=== | ||
− | See | + | {{See|Sprite Properties}} |
===Dungeon Sprite Data=== | ===Dungeon Sprite Data=== | ||
Line 556: | Line 559: | ||
|- | |- | ||
|{{$|A5}} | |{{$|A5}} | ||
− | |[[Zazak | + | |[[Blue Zazak]] |
|- | |- | ||
|{{$|A6}} | |{{$|A6}} | ||
Line 789: | Line 792: | ||
|[[Medallion Tablet]] | |[[Medallion Tablet]] | ||
|} | |} | ||
+ | |||
+ | {{toc}} |
Latest revision as of 22:36, 16 September 2017
Contents
Drawing
Sprites vary on how they are drawn to the screen. 8×8 and 16×16 sprites tend to use Sprite_PrepAndDrawSingleLarge to draw. Larger sprites uses their custom OAM.
Important Hex Addresses
Sprite Stats And Properties
See also: Sprite Properties
Dungeon Sprite Data
- $04D62E = Pointer Table, 2 byte local addresses, indexed by room ID
- $04D92E = Data
Overworld Sprite Data
There are separate pointer tables for each phase of the game. The "phase of the game" refers to the byte located at $7EF3C5.
Phase 0/1
- $04C881 = Pointer Table, 2 byte local addresses, indexed by screen ID
- This is the stage of the game whilst rain still falls
- Only has values only for the light world screens, thus dark world screens will roll over to the light world data from the following table and of course be incorrect.
Phase 2
- $04C901 = Pointer Table, 2 byte local addresses, indexed by screen ID
- Phase 2 begins when Zelda is rescued and given protection by the Sage in the Sanctuary
Phase 3
- $04CA21 = Pointer Table, 2 byte local addresses, indexed by screen ID
- Phase 3 begins after the player has defeated Agahnim for the first time.
Sprite Data Format
- First Byte: Stored to $FB3. Not sure what the purpose of that is yet.
After the first byte, you will see 3 byte clusters that break down thus:
Bit | First Byte | Second Byte | Third Byte |
---|---|---|---|
7 | If set, the sprite is on BG2, if not it's on BG1 | If all these bits are set then this is an Overlord, otherwise it's a normal sprite. If only some of them are set they can be used to generate a subtype, stored at $E30, X. | Sprite or Overlord type. If a sprite, this will get loaded into a slot at $E20, X. If an Overlord, will get loaded to $B00, X. |
6 | If these are set, they will be used to generate a subtype, stored to $E30, X. | ||
5 | |||
4 | X coordinate (in pixels from the far left, starting at 0) of the sprite divided by 16. | Y coordinate (in pixels from the top, starting at 0) of the sprite divided by 16. | |
3 | |||
2 | |||
1 | |||
0 |
Sprites
Table of Contents |
---|