gSPObjSubMatrix

gSPObjSubMatrix [Macro]

Function

gSPObjSubMatrix

Sets the 2D matrix for a rotating sprite

Syntax

#include <ultra64.h>        /* gs2dex.h */
gSPObjSubMatrix(Gfx *gdl, uObjSubMtx *mtx) 
gsSPObjSubMatrix(         uObjSubMtx *mtx)

Arguments

gdl
the pointer to the display list.
mtx
the pointer to the 2D matrix structure

Description

Loads the 2D matrix parameters of the uObjSubMtx structure into the 2D matrix area in the RSP. The uObjSubMtx structure is a subset of the uObjMtx structure. It holds the 2D matrix elements {X, Y, BaseScaleX, BaseScaleY} used by g*SPObjRectangleR. This macro is used primarily in concert with g*SPObjRectangleR.

Comment

The uObjSubMtx structure is shown below:

typedef struct {
  s16 X, Y;        /* s10.2 */
  u16 BaseScaleX;  /* u5.10 */
  u16 BaseScaleY;  /* u5.10 */
} uObjSubMtx_t; 
typedef union {
  uObjSubMtx_t   m;
  long long int  force_structure_alignment;
} uObjSubMtx;

This macro only changes the 2D matrix parameters that are member variables of the uObjSubMtx structure {X, Y, BaseScaleX, BaseScaleY}. It has no effect on the values of the other parameters {A, B, C, D}.

See Also

gSPObjMatrix, gSPObjRectangleR

Revision History

02/01/99 Entirely revised.