Modified the loadScreen method to accommodate some screens decoding to a single byte more than the actual screen size

svn-id: r29691
This commit is contained in:
Paul Gilbert 2007-12-02 07:24:41 +00:00
parent 11e29ca4d4
commit bc58491c75

View File

@ -96,10 +96,12 @@ Surface::~Surface() {
void Surface::loadScreen(uint16 resourceId) {
MemoryBlock *rawData = Disk::getReference().getEntry(resourceId);
PictureDecoder decoder;
MemoryBlock *tmpScreen = decoder.decode(rawData, FULL_SCREEN_HEIGHT * FULL_SCREEN_WIDTH);
MemoryBlock *tmpScreen = decoder.decode(rawData, FULL_SCREEN_HEIGHT * FULL_SCREEN_WIDTH + 1);
delete rawData;
empty();
copyFrom(tmpScreen, MENUBAR_Y_SIZE * FULL_SCREEN_WIDTH);
_data->copyFrom(tmpScreen, 0, MENUBAR_Y_SIZE * FULL_SCREEN_WIDTH,
(FULL_SCREEN_HEIGHT - MENUBAR_Y_SIZE) * FULL_SCREEN_WIDTH);
delete tmpScreen;
}