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

   

gSPObjMatrix

Format
gSPObjMatrix(Gfx *gdl, uObjMtx *mtx)
gsSPObjMatrix(uObjMtx *mtx)
Arguments
  • gdl is the pointer to the display list
  • mtx is the pointer to the 2D matrix structure
What This Macro Does
It is an S2DEX microcode macro that loads the 2D matrix data that exists in the uObjMtx data structure to the 2D matrix area in the RSP.

The S2DEX microcode uses a 2D matrix to hold the drawing data. This macro is one of the following two macros provided for the purpose of modifying this 2D matrix:
  • gSPObjMatrix
  • gSPObjSubMatrix
Usually, this macro is used for a rotating sprite. Only six matrix elements (A, B, C, D, X, Y) are needed for rotation processing, so it appears that there is no need to transfer the entire 2D matrix. However, 24 bytes including {BaseScaleX and , BaseScaleY} are transferred, because an 8-byte unit must be maintained for transfer from main memory to the RSP matrix region. For this reason, the values of BaseScaleX and BaseScaleY are always overwritten. If you are not using these parameters (that is, you are not using gSPObjRectangleR immediately after calling gSPObjMatrix), Nintendo recommends assigning the default value of 1024 (1.0 for s5.10 format) to BaseScaleX and BaseScaleY.

For detailed information on S2DEX microcode GBI macros and data structures, please see the "S2DEX Microcode" area of the N64 Programming Manual.

See Also
S2DEX Microcode
guS2DInitBg


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
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated January 1998