MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / InitDisplay

Method InitDisplay

src/SB/Core/gc/iTRC.cpp:70–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70void ROMFont::InitDisplay(_GXRenderModeObj* InRenderMode)
71{
72 GXColor clr = { 0 };
73 Mtx44 mtx;
74 Mtx idt;
75
76 mRenderMode = InRenderMode;
77 void** xfb = &mXFBs[1];
78 RwGameCubeGetXFBs(&mXFBs[0], &mXFBs[1]);
79 mCurrentFrameBuffer = *xfb;
80
81 ROMFont::InitGX();
82 ROMFont::InitVI();
83
84 GXSetCopyClear(clr, 0xffffff);
85 C_MTXOrtho(mtx, 0.0f, mRenderMode->efbHeight, 0.0f, mRenderMode->fbWidth, 0.0f, -100.0f);
86 GXSetProjection(mtx, GX_ORTHOGRAPHIC);
87 PSMTXIdentity(idt);
88 GXLoadPosMtxImm(idt, 0);
89 GXSetCurrentMtx(0);
90 GXSetZMode(TRUE, GX_ALWAYS, TRUE);
91 GXSetNumChans(0);
92 GXSetNumTevStages(1);
93 GXSetTevOp(GX_TEVSTAGE0, GX_REPLACE);
94 GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR_NULL);
95 GXSetBlendMode(GX_BM_BLEND, GX_BL_ONE, GX_BL_ONE, GX_LO_CLEAR);
96 GXClearVtxDesc();
97 GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
98 GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
99 GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_NRM_NBT, GX_RGBA4, 0);
100 GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_NRM_NBT, GX_RGBA4, 0);
101 return;
102}
103
104void ROMFont::InitGX()
105{

Callers

nothing calls this directly

Calls 15

GXSetCopyClearFunction · 0.85
C_MTXOrthoFunction · 0.85
GXSetProjectionFunction · 0.85
PSMTXIdentityFunction · 0.85
GXLoadPosMtxImmFunction · 0.85
GXSetCurrentMtxFunction · 0.85
GXSetZModeFunction · 0.85
GXSetNumChansFunction · 0.85
GXSetNumTevStagesFunction · 0.85
GXSetTevOpFunction · 0.85
GXSetTevOrderFunction · 0.85
GXSetBlendModeFunction · 0.85

Tested by

no test coverage detected