al - Audio Library Functions gDP - DP GBI Macros gdSP - General GBI Macros gSP - SP GBI Macros gt - Turbo Microcode RDP gu - Graphics Utilities Math - Math Functions nuSys - NuSystem os - N64 Operating System sp - Sprite Library Functions uh - Host to Target IO 64DD - N64 Disk Drive
|
gSPObjRectangleR [macro]Draws a sprite referencing a 2D matrix. Syntax
Arguments
Explanation
Notes
By changing X and Y in these settings, the three sprites can move together as one large sprite. However, gaps may appear between A & B and B & C, as shown below, due to an error in multiplication or other calculations.
Cautions
typedef struct { s16 X, Y; /* s10.2 */ u16 BaseScaleX; /* u5.10 */ u16 BaseScaleY; /* u5.10 */ } uObjSubMtx_t; /* 8 bytes */ This macro references the values of the 2D matrix elements X, Y, BaseScaleX and BaseScaleY, and determines the vertex coordinates of the sprite using the following formulas: Upper-left coordinates: (X+objX/BaseScaleX, Y+objY/BaseScaleY) Lower-right coordinates: (X+(objX+imageW/scaleW)/BaseScaleX-1, Y+(objY+imageH/scaleH)/BaseScaleY-1) Use g*SPObjSubMatrix to change X, Y, BaseScaleX and BaseScaleY. When X = Y = 0 and BaseScaleX = BaseScaleY = 1.0, the result will be the same as with g*SPObjRectangle. Changing the settings of the 2D matrix elements {X, Y, BaseScaleX and BaseScaleY} enables several sprites to be moved or scaled as a unit. For other functions, see g*SPObjRectangle. See Also
Revision History
|