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





gSPSelectBranchDL [macro]

Conditionally branches the display list.

Syntax

#include <ultra64.h> /* gs2dex.h */
gSPSelectBranchDL(Gfx *gdl, Gfx *bdl, u8 sid, u32 flag, u32 mask)
gsSPSelectBranchDL(Gfx *bdl, u8 sid, u32 flag, u32 mask)

Arguments

  • gdl is the pointer to the graphics display list.

  • bdl is the pointer to the display list branch.

  • 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 branches to another display list according to the True/False result. The macro uses the following processes to decide whether or not to branch to the other display list:

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

The status region is set using gSPSetStatus (see the Readme of the latest version of the S2DEX microcode).

This macro differs from gSPSelectDL in that the display list to be used is not pushed on the calling stack. In other words, this macro's call is a "jump" and not a "call" like the gSPSelectDL macro. Both macros are used to link long lists.

Cautions
Unlike gSPSelectDL, there is no return to the calling display list even when the branched-to display list is completed.

See Also
gSPSelectDL

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