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

   

gSPZMixS16
gSPZMixS8
gSPZMixU8

Format
gSPZMixS16(Gfx *gp, u32 src1,
   u32 src2, u32 num, u16 factor)
gSPZMixS8(Gfx *gp, u32 src1,
   u32 src2, u32 num, u16 factor)
gSPZMixU8(Gfx *gp, u32 src1,
   u32 src2, u32 num, u16 factor)
Arguments
  • gp is the pointer to the graphics display list
  • src1 is the start of address 1 in the user area that holds the data to be interpolated, and it is the starting address in the user area where the interpolation results will be placed
  • src2 is the start of address 2 in the user area that holds the data to be interpolated
  • num is the number of data element (a multiple of 8)
  • factor holds the mixed factors (u.15 format 0x0000-0x7fff value)
What These Macro Do
These Z-Sort microcode GBI macros perform linear interpolation on two numbers using the following formula. The s16, s8, and u8 data types are handled by their respective GBI.
(*src1)=(*src1)*factor+(*src2)*(1.0*factor);
In gSPZMixS16, src1 and src2 combined are limited to 16 bytes. In gSPZMixS8 and gSPZMixU8, src1 and src2 combined are limited to 8 bytes.

The num value must be a multiple of 8. If a number that is not a multiple of 8 is specified, meaningless data is returned to src1 until the number becomes a multiple of 8.

For detailed information on Z-Sort microcode's GBI macros and data structures, please see the "Z-Sort Microcode" area of the N64 Programming Manual.

See Also
Z-Sort Microcode
gSPZRdpCmd
gSPZSetUMem
gSPZGetUMem
gSPZSetMtx
gSPZGetMtx
gSPZMtxCat
gSPZMtxTrnsp3x3
gSPZViewPort
gSPZMultMPMtx
gSPZSetAmbient
gSPZSetDefuse
gSPZSetLookAt
gSPZXfmLights
gSPZLight
gSPZLightMaterial
gSPZMixS16
gSPZMixS8
gSPZMixU8
gSPZSegment
gSPZSetSubDL
gSPZLinkSubDL
gSPZSendMessage
gSPZWaitSignal
gSPZSegment
gSPZPerspNormalize



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