Function
gSPObjLoadTxRect
Loads a texture and draws a non-rotating sprite in a compound process.
Syntax
#include <ultra64.h> /* gs2dex.h */
gSPObjLoadTxRect(Gfx *gdl, uObjTxSprite *txsp)
gsSPObjLoadTxRect( uObjTxSprite *txsp)
Arguments
Description
Loads a texture and then draws a non-rotating sprite. This macro performs the successive processes of g*SPObjLoadTxtr and g*SPObjRectangle as if they were a single macro. In other words, the results of process (A) below are the same as process (B):
The uObjTxSprite structure is a concatenation of the uObjTxtr structure and the uObjSprite structure, so it holds both texture load data and sprite drawing data. For details, see gSPObjLoadTxtr and gSPObjRectangle.
Comment
The uObjTxSprite structure is shown below:
typedef struct {
uObjTxtr txtr;
uObjSprite sprite;
} uObjTxSprite;
The g*SPObjLoadTxRect does not reference the 2D matrix settings, so these settings do not affect the drawing results with this macro. Use g*SPObjLoadTxRectR if you want to reference the 2D matrix settings to change the screen coordinates for drawing. Use g*SPObjLoadTxSprite to draw a rotating sprite.
See Also
gSPObjLoadTxRectR, gSPObjLoadTxSprite, gSPObjLoadTxtr, and gSPObjRectangle
Revision History
02/01/99 Entirely revised.