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

   

guS2DEmuSetScissor

Format
void guS2DEmuSetScissor (u32 ulx,
   u32 uly, u32 lrx, u32 lry,
   u8 bilerp);
Arguments
  • ulx is the upper-left X coordinate of scissor box (u10.0)
  • uly is the upper-left Y coordinate of scissor box (u10.0)
  • lrx is the lower-right X coordinate of scissor box (u10.0)
  • lry is the lower-right Y coordinate of scissor box (u10.0)
  • bilerp is set to a value other than 0 to perform Bilerp interpolation processing on the image, or it is set to 0 for PointSample
What This Macro Does
This function sets the scissoring parameters and texture filter referenced by the guS2DEmuBgRect1Cyc function. It is one of the following two new emulation functions that came with the S2DEX microcode that you can use to have the CPU emulate the S2DEX microcode:
  • guS2DEmuGBgRect1Cyc
  • guS2DEmuSetScissor
Usually, the range of the scissor box set by gDPSetScissor is handled by this function as parameters. In addition, the initial values for ulx, uly, lrx, lry, and bilerp are 0, 0, 320, 340, 0, respectively, which are settings that draw to a 320x240 pixel frame buffer with PointSample.

This function need only be called once before guS2DEmuBgRect1Cyc is called. As long as there is no change in the scissor box and texture filter, it need only be called once during game initialization. In other words, you don't need to call it every time a frame is drawn.

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

See Also
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