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

Method drawMain

src/Shiraiwa/WipeCheck.cpp:45–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void TWipeCheck::drawMain(int camNo, f32 rate, JUTColor colorRGB)
46{
47 if (camNo != 0 || mVp.getWidth() <= 0.0f || mVp.getHeight() <= 0.0f)
48 return;
49
50 mGraph[camNo]->place(mVp);
51
52 mGraph[camNo]->setOrtho(mVp.i.x, mVp.i.y, mVp.getWidth(), mVp.getHeight(), -1.0f, 1.0f);
53 mGraph[camNo]->setPort();
54
55 f32 w = sWipeWidthOrg;
56 f32 h = sWipeHeightOrg;
57
58 JUTColor color;
59 color.setRGBA(colorRGB, mAlpha[camNo]);
60
61 int i = 0;
62 for (f32 y = 0.0f; y < mVp.getHeight(); i++, y += h)
63 {
64 bool j = i & 1;
65 for (f32 x = 0.0f; x < mVp.getWidth(); j = !j, x += w)
66 {
67 if (!j)
68 {
69 color.a = mAlphaDiff[camNo];
70 drawQuad(x, y, w, h, color);
71 }
72 }
73 }
74
75 drawQuad(mVp.i.x, mVp.i.y, mVp.f.x - mVp.i.x, mVp.f.y - mVp.i.y, mAlpha[camNo]); // works because of u32 operator(sets RGB to 0)
76}
77
78void TWipeCheck::drawQuad(f32 l, f32 t, f32 w, f32 h, const JUTColor &color)
79{

Callers

nothing calls this directly

Calls 6

setRGBAMethod · 0.80
getWidthMethod · 0.45
getHeightMethod · 0.45
placeMethod · 0.45
setOrthoMethod · 0.45
setPortMethod · 0.45

Tested by

no test coverage detected