| 216 | } |
| 217 | |
| 218 | static bool parse_bitmap(const std::vector<uint8_t> &file_data, uint32_t bm_off, |
| 219 | ParsedBitmap &bm) { |
| 220 | if (bm_off + kBitmapSize > file_data.size()) { |
| 221 | return false; |
| 222 | } |
| 223 | const uint8_t *d = file_data.data() + bm_off; |
| 224 | bm.width = read_be_s16(d + 0x00); |
| 225 | bm.actual_height = read_be_s16(d + 0x0C); |
| 226 | bm.buf_off = resolve_reloc_ptr(file_data, bm_off + 0x08); |
| 227 | return bm.buf_off != UINT32_MAX; |
| 228 | } |
| 229 | |
| 230 | static void unswizzle_rgba16_strip(std::vector<uint8_t> &strip, int width, int height) { |
| 231 | const int row_bytes = width * 2; |
no test coverage detected