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

Method draw

libs/JSystem/J2DGraph/J2DTextBox.cpp:287–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287void J2DTextBox::draw(f32 x, f32 y)
288{
289 if (!isVisible()) {
290 return;
291 }
292
293 J2DPrint printer(mFont, mCharSpacing, mLineSpacing, mCharColor, mGradientColor, mBlack, mWhite);
294 printer.setFontSize(mFontSize.x, mFontSize.y);
295
296 makeMatrix(x, y, 0.0f, 0.0f);
297
298 GXLoadPosMtxImm(mPositionMtx, GX_PNMTX0);
299 GXSetCurrentMtx(GX_PNMTX0);
300 GXSetNumIndStages(0);
301
302 for (int i = 0; i < GX_MAX_TEVSTAGE; i++) {
303 GXSetTevDirect((GXTevStageID)i);
304 }
305 GXSetNumTexGens(1);
306 GXSetTexCoordGen2(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY, GX_FALSE, GX_PTIDENTITY);
307 if (mStringPtr) {
308 printer.print(0.0f, 0.0f, mAlpha, "%s", mStringPtr);
309 }
310
311 Mtx mtx;
312 PSMTXIdentity(mtx);
313 GXLoadPosMtxImm(mtx, GX_PNMTX0);
314}
315
316void J2DTextBox::draw(f32 x, f32 y, f32 p3, J2DTextBoxHBinding hb)
317{

Callers

nothing calls this directly

Calls 3

printReturnMethod · 0.80
setFontSizeMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected