| 266 | // |
| 267 | //***************************************************************************** |
| 268 | bool ROMFileCompressed::ReadChunk( u32 offset, u8 * p_dst, u32 length ) |
| 269 | { |
| 270 | #ifdef DAEDALUS_ENABLE_ASSERTS |
| 271 | DAEDALUS_ASSERT( mZipFile != NULL, "No open zipfile?" ); |
| 272 | DAEDALUS_ASSERT( mFoundRom, "Why are we loading data when no rom was found?" ); |
| 273 | #endif |
| 274 | if( !Seek( offset, p_dst, length ) ) |
| 275 | { |
| 276 | return false; |
| 277 | } |
| 278 | |
| 279 | if( u32( unzReadCurrentFile( mZipFile, p_dst, length ) ) != length) |
| 280 | { |
| 281 | return false; |
| 282 | } |
| 283 | |
| 284 | // Apply the bytesswapping before returning the buffer |
| 285 | CorrectSwap( p_dst, length ); |
| 286 | return true; |
| 287 | } |
| 288 | |
| 289 | #endif // DAEDALUS_COMPRESSED_ROM_SUPPORT |
no outgoing calls
no test coverage detected