A bitfield of sprite attribute goodness...ugly to look at but not so bad to use. [詳細]
#include <sprite.h>
Public 変数 | |
struct { | |
struct { | |
u16 y:8 | |
union { | |
struct { | |
u8 __pad0__:1 | |
bool isHidden:1 | |
u8 __pad1__:6 | |
} | |
struct { | |
bool isRotateScale:1 | |
bool isSizeDouble:1 | |
ObjBlendMode blendMode:2 | |
bool isMosaic:1 | |
ObjColMode colorMode:1 | |
ObjShape shape:2 | |
} | |
} | |
} | |
union { | |
struct { | |
u16 x:9 | |
u8 __pad0__:7 | |
} | |
struct { | |
u8 __pad0__:8 | |
union { | |
struct { | |
u8 __pad0__:4 | |
bool hFlip:1 | |
bool vFlip:1 | |
u8 __pad1__:2 | |
} | |
struct { | |
u8 __pad0__:1 | |
u8 rotationIndex:5 | |
ObjSize size:2 | |
} | |
} | |
} | |
} | |
struct { | |
u16 gfxIndex:10 | |
ObjPriority priority:2 | |
u8 palette:4 | |
} | |
u16 attribute3 | |
}; | |
struct { | |
uint16 attribute [3] | |
uint16 filler | |
}; |
A bitfield of sprite attribute goodness...ugly to look at but not so bad to use.
Unused! Four of those are used as a sprite rotation matrice
Sprite object mode.
Sprite color mode.
Upper-left tile index.
Flip sprite horizontally (isRotoscale cleared).
Sprite is hidden (isRotoscale cleared).
Enables mosaic effect if set.
Sprite uses affine parameters if set.
Sprite bounds is doubled (isRotoscale set).
Sprite palette to use in paletted color modes.
Sprite priority.
Affine parameter number to use (isRotoscale set).
Sprite shape.
Sprite size.
Flip sprite vertically (isRotoscale cleared).
u16 SpriteEntry::x |
Sprite X position.
u16 SpriteEntry::y |
Sprite Y position.