| 152 | } |
| 153 | |
| 154 | void J2DPicture::private_readStream(J2DPane* parent, JSURandomInputStream* input, JKRArchive* archive) |
| 155 | { |
| 156 | J2DScrnBlockHeader header; |
| 157 | int headerPosition = input->getPosition(); |
| 158 | input->read(&header, sizeof(J2DScrnBlockHeader)); |
| 159 | mBloBlockType = header.mBloBlockType; |
| 160 | makePaneStream(parent, input); |
| 161 | |
| 162 | ResTIMG* img; |
| 163 | ResTLUT* lut; |
| 164 | u32 v1 = 0; |
| 165 | u8 v2 = input->readU8(); |
| 166 | |
| 167 | img = (ResTIMG*)getPointer(input, 'TIMG', archive); |
| 168 | lut = (ResTLUT*)getPointer(input, 'TLUT', archive); |
| 169 | |
| 170 | u8 v3 = input->read8b(); |
| 171 | v2 -= 3; |
| 172 | if (v2 != 0) { |
| 173 | v1 = input->read8b(); |
| 174 | v2--; |
| 175 | } |
| 176 | |
| 177 | if (v2 != 0) { |
| 178 | input->read8b(); |
| 179 | v2--; |
| 180 | } |
| 181 | |
| 182 | mBlack = TCOLOR_BLACK_U32; |
| 183 | mWhite = TCOLOR_WHITE_U32; |
| 184 | |
| 185 | if (v2 != 0) { |
| 186 | mBlack = input->readU32(); |
| 187 | v2--; |
| 188 | } |
| 189 | |
| 190 | if (v2 != 0) { |
| 191 | mWhite = input->readU32(); |
| 192 | v2--; |
| 193 | } |
| 194 | |
| 195 | setCornerColor(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF); |
| 196 | for (int i = 0; v2 != 0 && i < 4; i++) { |
| 197 | mCornerColors[i] = input->readU32(); |
| 198 | v2--; |
| 199 | } |
| 200 | |
| 201 | input->seek(headerPosition + header.mBlockLength, SEEK_SET); |
| 202 | |
| 203 | for (int i = 0; i < 4; i++) { |
| 204 | mTextures[i] = nullptr; |
| 205 | } |
| 206 | mTextureCount = 0; |
| 207 | mUsedTextureFlags = 1; |
| 208 | |
| 209 | if (img) { |
| 210 | mTextures[0] = new JUTTexture(img); |
| 211 | mTextureCount++; |
nothing calls this directly
no test coverage detected