| 68 | } |
| 69 | |
| 70 | void 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 | |
| 104 | void ROMFont::InitGX() |
| 105 | { |
nothing calls this directly
no test coverage detected