MCPcopy Create free account
hub / github.com/doldecomp/mkdd / drawFrame

Method drawFrame

libs/JSystem/J2DGraph/J2DGrafContext.cpp:178–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178void J2DGrafContext::drawFrame(const JGeometry::TBox2f& box)
179{
180 GXSetBlendMode((GXBlendMode)mBoxPart.mType, (GXBlendFactor)mBoxPart.mSrcFactor, (GXBlendFactor)mBoxPart.mDestFactor, GX_LO_SET);
181 GXLoadPosMtxImm(mPosMtx, 0);
182 GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
183
184 GXBegin(GX_LINESTRIP, GX_VTXFMT0, 5);
185 f32 z = 0;
186 GXPosition3f32(box.i.x, box.i.y, z);
187 GXColor1u32(mColorTL);
188 GXPosition3f32(box.f.x, box.i.y, z);
189 GXColor1u32(mColorTR);
190 GXPosition3f32(box.f.x, box.f.y, z);
191 GXColor1u32(mColorBL);
192 GXPosition3f32(box.i.x, box.f.y, z);
193 GXColor1u32(mColorBR);
194 GXPosition3f32(box.i.x, box.i.y, z);
195 GXColor1u32(mColorTL);
196 GXEnd();
197
198 GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_RGBA4, 0);
199}
200
201void J2DGrafContext::line(JGeometry::TVec2f start, JGeometry::TVec2f end)
202{

Callers 1

J2DDrawFrameFunction · 0.80

Calls 3

GXPosition3f32Function · 0.85
GXColor1u32Function · 0.85
GXEndFunction · 0.85

Tested by

no test coverage detected