Sprite Table: Difference between revisions
From NerdConsole
Jump to navigationJump to search
NerdOfEpic (talk | contribs) No edit summary |
NerdOfEpic (talk | contribs) No edit summary |
||
Line 18: | Line 18: | ||
| i || i || i || i || i || i || i || i | | i || i || i || i || i || i || i || i | ||
|} | |} | ||
''' Key ''' | |||
* x - x-axis position of the upper left corner of the sprite on the screen | * x - x-axis position of the upper left corner of the sprite on the screen | ||
* y - y-axis position of the upper left corner of the sprite on the screen* | * y - y-axis position of the upper left corner of the sprite on the screen* |
Revision as of 22:02, 23 January 2024
The Sprite Table describes the forground layer for a game. You can think of this as the objects that move around such as the player, enemies, and projectiles. NerdConsole has a single Sprite Table that supports up to 256 sprites.
Sprite Table Format
Sprite Tables in NerdConsole use a 4-byte structure for each entry.
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|
Byte 0 | x | x | x | x | x | x | x | x |
Byte 1 | y | y | y | y | y | y | y | y |
Byte 2 | M | F | D | C | p | p | p | p |
Byte 3 | i | i | i | i | i | i | i | i |
Key
- x - x-axis position of the upper left corner of the sprite on the screen
- y - y-axis position of the upper left corner of the sprite on the screen*
- M - Mirror (Left/Right)
- F - Flip (Top/Bottom)
- D - Depth Flag (0 = Over BG, 1 = Under BG)
- C - Color Cycling
- p - Sub-Palette Index
- i - Tile Table Index