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

Method makePaneStream

libs/JSystem/J2DGraph/J2DPane.cpp:97–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97void J2DPane::makePaneStream(J2DPane* parent, JSURandomInputStream* input)
98{
99 u8 valuesRemaining;
100 input->read(&valuesRemaining, 1);
101 input->read(&mIsVisible, 1);
102 input->skip(2);
103 u32 tag;
104 input->read(&tag, 4);
105 mTag = tag;
106
107 JGeometry::TVec2f topLeft;
108 topLeft.x = input->readS16();
109 topLeft.y = input->readS16();
110 JGeometry::TVec2f bottomRight;
111 bottomRight.x = input->readS16() + topLeft.x;
112 bottomRight.y = input->readS16() + topLeft.y;
113 mBounds.set(topLeft, bottomRight);
114 valuesRemaining -= 6;
115 mAngleX = 0.0f;
116 mAngleY = 0.0f;
117 mAngleZ = 0.0f;
118 if (valuesRemaining != 0) {
119 mAngleZ = input->readU16();
120 valuesRemaining--;
121 }
122 if (valuesRemaining != 0) {
123 u8 basePosition = input->readU8();
124 mBasePosition = (J2DBasePosition)basePosition;
125 valuesRemaining--;
126 } else {
127 mBasePosition = J2DPOS_TopLeft;
128 }
129 mRotationAxis = J2DROTATE_Z;
130 mAlpha = 255;
131 if (valuesRemaining != 0) {
132 mAlpha = input->readU8();
133 valuesRemaining--;
134 }
135 mIsInfluencedAlpha = true;
136 if (valuesRemaining != 0) {
137 mIsInfluencedAlpha = input->readU8();
138 valuesRemaining--;
139 }
140 input->align(4);
141 if (parent) {
142 parent->mTree.appendChild(&mTree);
143 }
144 mCullMode = 0;
145 mColorAlpha = 255;
146 mIsConnected = 0;
147 mAnimPaneIndex = -1;
148 mScale.x = 1.0f;
149 mScale.y = 1.0f;
150 mMessageID = 0;
151 changeUseTrans(parent);
152 calcMtx();
153}
154

Callers

nothing calls this directly

Calls 8

skipMethod · 0.80
readS16Method · 0.80
readU16Method · 0.80
readU8Method · 0.80
alignMethod · 0.80
readMethod · 0.45
setMethod · 0.45
appendChildMethod · 0.45

Tested by

no test coverage detected