| 581 | } |
| 582 | |
| 583 | void DDSFile::SurfaceData::readNextMip(DDSFile *dds, Stream &s, U32 height, U32 width, U32 mipLevel, bool skip) |
| 584 | { |
| 585 | U32 size = dds->getSurfaceSize(height, width, mipLevel); |
| 586 | |
| 587 | // If we're skipping this mip then seek forward. |
| 588 | if ( skip ) |
| 589 | s.setPosition( s.getPosition() + size ); |
| 590 | else |
| 591 | { |
| 592 | mMips.push_back(new U8[size]); |
| 593 | if(!s.read(size, mMips.last())) |
| 594 | Con::errorf("DDSFile::SurfaceData::addNextMip - failed to read mip!"); |
| 595 | } |
| 596 | } |
| 597 | |
| 598 | void DDSFile::SurfaceData::writeNextMip(DDSFile *dds, Stream &s, U32 height, U32 width, U32 mipLevel) |
| 599 | { |
no test coverage detected