gSPSelectBranchDL

gSPSelectBranchDL [Macro]

Function

gSPSelectBranchDL

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
the pointer to the graphics display list.
bdl
the pointer to the display list branch.
sid
the status ID (0, 4, 8 or 12).
flag
the status flag.
mask
the status mask.

Description

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:

The status region is set using gSPSetStatus (see the "4.7.1 gSPSetStatus" in 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.

Note

Unlike gSPSelectDL, there is no return to the calling display list even when the target display list after the branch is completed.

See Also

gSPSelectDL

Revision History

02/01/99 Entirely revised.