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

Method J2DWindowEx

libs/JSystem/J2DGraph/J2DWindowEx.cpp:13–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11
12
13J2DWindowEx::J2DWindowEx(J2DPane* parent, JSURandomInputStream* input, u32 flags, J2DMaterial* materials)
14{
15 mAnmVisibility = nullptr;
16 mAnmVtxColor = nullptr;
17 int position = input->getPosition();
18 int uStack_88[2];
19 input->read(uStack_88, 8);
20 mBloBlockType = uStack_88[0];
21 int iVar2 = input->getPosition();
22 int auStack_90[2];
23 input->peek(auStack_90, 8);
24 makePaneExStream(parent, input);
25 input->seek(iVar2 + auStack_90[1], SEEK_SET);
26 J2DWindowData windowData;
27 input->read(&windowData, sizeof(J2DWindowData));
28
29 JUTColor* colors[4] = { nullptr };
30 colors[0] = &mContentsColorA;
31 colors[1] = &mContentsColorB;
32 colors[2] = &mContentsColorC;
33 colors[3] = &mContentsColorD;
34
35 for (int i = 0; i < 4; i++) {
36 _158[i] = windowData.mContentIds[i];
37 mFrameMaterials[i] = nullptr;
38 if (_158[i] != 0xffff) {
39 mFrameMaterials[i] = materials + _158[i];
40 (materials + _158[i])->mPane = this;
41 }
42 _168[i] = windowData._28[i];
43 *(colors[i]) = JUTColor(windowData.mContentColors[i]);
44 }
45
46 mWrapFlags = windowData._18;
47 mWindowArea.set(windowData.mMinX, windowData.mMinY, windowData.mMinX + windowData.mOffsetX, windowData.mMinY + windowData.mOffsetY);
48 _166 = windowData._22;
49 mMaterialID = windowData.mParentId;
50 mContentsMaterial = nullptr;
51
52 if (mMaterialID != 0xffff) {
53 mContentsMaterial = &materials[mMaterialID];
54 materials[mMaterialID].mPane = this;
55 }
56
57 input->seek(position + uStack_88[1], SEEK_SET);
58 rewriteAlpha();
59 mFrameTextureA = nullptr;
60 mFrameTextureB = nullptr;
61 mFrameTextureC = nullptr;
62 mFrameTextureD = nullptr;
63 mPalette = nullptr;
64 mContentsTexture = nullptr;
65 mMaterialFlags = 0;
66 setMinSize();
67}
68
69void J2DWindowEx::initialize(u32, const ResTIMG**, const JGeometry::TBox2f* box)
70{

Callers

nothing calls this directly

Calls 5

peekMethod · 0.80
seekMethod · 0.80
getPositionMethod · 0.45
readMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected