forked from 0xGlitchbyte/TinyNightmare64
-
Notifications
You must be signed in to change notification settings - Fork 0
/
graphic.c
46 lines (40 loc) · 1.43 KB
/
graphic.c
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
40
41
42
43
44
45
46
/***************************************************************
graphic.c
Graphic related display lists, need to be in their own object.
***************************************************************/
#include <nusys.h>
#include "config.h"
// Display list
Gfx glist[GLIST_LENGTH];
Gfx* glistp;
// Initializes the game camera
static Vp viewport = {
SCREEN_WD*2, SCREEN_HT*2, G_MAXZ/2, 0,
SCREEN_WD*2, SCREEN_HT*2, G_MAXZ/2, 0,
};
// Initializes the RSP
Gfx rspinit_dl[] = {
gsSPViewport(&viewport),
gsSPClearGeometryMode(G_SHADE | G_SHADING_SMOOTH | G_CULL_BOTH |
G_FOG | G_LIGHTING | G_TEXTURE_GEN |
G_TEXTURE_GEN_LINEAR | G_LOD),
gsSPTexture(0, 0, 0, 0, G_OFF),
gsSPEndDisplayList(),
};
// Initializes the RDP
Gfx rdpinit_dl[] = {
gsDPSetCycleType(G_CYC_1CYCLE),
gsDPPipelineMode(G_PM_1PRIMITIVE),
gsDPSetScissor(G_SC_NON_INTERLACE, 0, 0, SCREEN_WD, SCREEN_HT),
gsDPSetCombineMode(G_CC_PRIMITIVE, G_CC_PRIMITIVE),
gsDPSetCombineKey(G_CK_NONE),
gsDPSetAlphaCompare(G_AC_NONE),
gsDPSetRenderMode(G_RM_NOOP, G_RM_NOOP2),
gsDPSetColorDither(G_CD_DISABLE),
gsDPSetAlphaDither(G_AD_DISABLE),
gsDPSetTextureFilter(G_TF_POINT),
gsDPSetTextureConvert(G_TC_FILT),
gsDPSetTexturePersp(G_TP_NONE),
gsDPPipeSync(),
gsSPEndDisplayList(),
};