Difference between revisions of "Sprites"
From TLoZ: ALTTP Hacking Resources
m (→Important Hex Addresses) |
m |
||
Line 26: | Line 26: | ||
After the first byte, you will see 3 byte clusters that break down thus: | After the first byte, you will see 3 byte clusters that break down thus: | ||
− | {| | + | {|{{Prettytable}} |
! scope="col"| Bit | ! scope="col"| Bit | ||
! scope="col"| First Byte | ! scope="col"| First Byte | ||
Line 56: | Line 56: | ||
==Sprites== | ==Sprites== | ||
− | {| | + | {|{{Prettytable}} |
!Value | !Value | ||
!Description | !Description |
Revision as of 01:14, 19 December 2016
Contents
Important Hex Addresses
Sprite Stats And 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 |