gSPObjLoadTxRectR

gSPObjLoadTxRectR [Macro]

Function

gSPObjLoadTxRectR

Loads a texture and draws a non-rotating sprite (referencing the 2D matrix) in a compound process

Syntax

#include <ultra64.h>        /* gs2dex.h */
gSPObjLoadTxRectR(Gfx *gdl, uObjTxSprite *txsp)
gsSPObjLoadTxRectR(         uObjTxSprite *txsp)

Arguments

gdl
the pointer to the display list.
txsp
the prointer to the structure holding the texture-loading and sprite-drawing data.

Description

Loads a texture and then draws a non-rotating sprite referencing the 2D matrix. This macro performs the successive processes of g*SPObjLoadTxtr and g*SPObjRectangleR as if they were a single macro.In other words, the results of process (A) below are the same as process (B):

(A)
gsSPObjLoadTxRectR(txsp),
(B)
gsSPObjLoadTxtr(&(txsp->txtr)),
gsSPObjRectangleR(&(txsp->sprite)),

The only difference between this macro and g*SPObjLoadTxRect is that this macro references the 2D matrix settings to change the screen coordinates for drawing. Use g*SPObjLoadTxSprite to draw a rotating-sprite.

Note

The uObjTxSprite structure is shown below:

typedef struct {
  uObjTxtr      txtr;
  uObjSprite    sprite;
} uObjTxSprite;

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 gSPObjRectangleR.

See Also

gSPObjLoadTxRect, gSPObjLoadTxSprite, gSPObjLoadTxtr, and gSPObjRectangleR

Revision History

02/01/99 Entirely revised.