N64® Functions Menu

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

Nintendo® Confidential





gSPObjSubMatrix [macro]

Sets the 2D matrix for a rotating sprite.

Syntax

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

Arguments

  • gdl is the pointer to the graphics display list.

  • mtx is the pointer to the 2D matrix structure

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

Cautions
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
2/1/1999 Completely rewritten


Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.


Copyright © 1998-1999
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated March 1999