guSprite2DInit
Initializes a sprite data structure
#include <ultra64.h> /* gu.h */
void guSprite2DInit(
uSprite *SpritePointer,
void *SourceImagePointer,
void *TlutPointer,
int Stride,
int SubImageWidth,
int SubImageHeight,
int SourceImageType,
int SourceImageBitSize,
int SourceImageOffsetS,
int SourceImageOffsetT);
None.
Initializes the Sprite structure according to the specified arguments for use with the sprite microcode.
G_IM_SIZ_ (Size) | |||||
4b | 8b | 16b | 32b | ||
G_IM_FMT_ (Format) |
RGBA | -- | -- | X (5/5/5/1) |
X (8/8/8/8) |
YUV | -- | -- | X | -- | |
CI | X | X | -- | -- | |
IA | X (3/1) |
X (4/4) |
X (8/8) |
-- | |
I | X | X | -- | -- |
We currently cannot guarantee operation of G_IM_FMT_YUV (YUV format). At the present time, this function is only useful for simply copying each argument into the appropriate location of the specified SpritePointer. Instead of using this function, you can directly initialize the sprite structure.
The uSprite structure looks like this:
typedef struct {
void *SourceImagePointer;
void *TlutPointer;
short Stride;
short SubImageWidth;
short SubImageHeight;
char SourceImageType;
char SourceImageBitSize;
short SourceImageOffsetS;
short SourceImageOffsetT;
char dummy[4];
} uSprite_t;
typedef union {
uSprite_t s;
long long int force_structure_alignment[3];
} uSprite;
gSPSprite2DBase, gSPSprite2DDraw, and gSPSprite2DScaleFlip
03/01/99 Completely rewritten.