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





gSPSelectDL

Syntax
#include <ultra64.h>  /* gs2dex.h */
gSPSelectDL(Gfx *gdl, Gfx *ldl, u8 sid, u32 flag, u32 mask)
gsSPSelectDL(Gfx *ldl, u8 sid, u32 flag, u32 mask)
Arguments
  • gdl is the display list pointer.

  • ldl is the pointer to the display list to link.

  • sid is the status ID (0, 4, 8 or 12).

  • flag is the status flag.

  • mask is the status mask.

Explanation
Using a method similar to the texture loading decision process, this macro evaluates the status [status ID] and then calls another display list according to the True/False result. The macro uses the following processes to decide whether or not to call the other display list:

  • Checks (Status[sid] & mask) == flag.
  • If the result is true, the macro terminates without doing anything.
  • If the result is false, it updates Status[sid] so Status[sid] = (Status[sid] & ~mask) | (flag & mask)
    and calls the display list specified by ldl.

The status region is set using gSPSetStatus. Please see Section 25.5.4.7.1, "gSPSetStatus" in the N64 Online Programming Manual.

Like a sub-routine call, this macro returns to the processing of the calling display list after the linked-to display list is completed.

See also
gSPSelectBranchDL

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