summaryrefslogtreecommitdiff
path: root/src/code/z_cheap_proc.c
blob: 82303a1724d514421a2f5003415115faf2b1cd26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "global.h"

/**
 * Draws a display list to the opaque display buffer
 */
void Gfx_DrawDListOpa(PlayState* play, Gfx* dlist) {
    Gfx* dl;

    OPEN_DISPS(play->state.gfxCtx);

    dl = POLY_OPA_DISP;

    gSPDisplayList(&dl[0], gSetupDLs[SETUPDL_25]);
    gSPMatrix(&dl[1], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    gSPDisplayList(&dl[2], dlist);

    POLY_OPA_DISP = &dl[3];

    CLOSE_DISPS(play->state.gfxCtx);
}

/**
 * Draws a display list to the translucent display buffer
 */
void Gfx_DrawDListXlu(PlayState* play, Gfx* dlist) {
    Gfx* dl;

    OPEN_DISPS(play->state.gfxCtx);

    dl = POLY_XLU_DISP;

    gSPDisplayList(&dl[0], gSetupDLs[SETUPDL_25]);
    gSPMatrix(&dl[1], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    gSPDisplayList(&dl[2], dlist);

    POLY_XLU_DISP = &dl[3];

    CLOSE_DISPS(play->state.gfxCtx);
}