diff --git a/sky/control.cpp b/sky/control.cpp index 23cdbd21a09..4d20239a549 100644 --- a/sky/control.cpp +++ b/sky/control.cpp @@ -122,18 +122,16 @@ void SkyTextResource::drawToScreen(bool doMask) { _oldX = _x; _oldY = _y; cpWidth = (PAN_LINE_WIDTH > (GAME_SCREEN_WIDTH - _x))?(GAME_SCREEN_WIDTH - _x):(PAN_LINE_WIDTH); - if (_spriteData && (cpWidth > _spriteData->s_width)) + if (cpWidth > _spriteData->s_width) cpWidth = _spriteData->s_width; - if (_spriteData) - cpHeight = (_spriteData->s_height > (GAME_SCREEN_HEIGHT - _y))?(GAME_SCREEN_HEIGHT - _y):(_spriteData->s_height); - else - cpHeight = PAN_CHAR_HEIGHT; + cpHeight = (_spriteData->s_height > (GAME_SCREEN_HEIGHT - _y))?(GAME_SCREEN_HEIGHT - _y):(_spriteData->s_height); + uint8 *screenPos = _screen + _y * GAME_SCREEN_WIDTH + _x; uint8 *copyDest = _oldScreen; uint8 *copySrc = ((uint8 *)_spriteData) + sizeof(dataFileHeader); for (cnty = 0; cnty < cpHeight; cnty++) { memcpy(copyDest, screenPos, cpWidth); - for (cntx = 0; cntx < PAN_LINE_WIDTH; cntx++) + for (cntx = 0; cntx < cpWidth; cntx++) if (copySrc[cntx]) screenPos[cntx] = copySrc[cntx]; copySrc += _spriteData->s_width; copyDest += PAN_LINE_WIDTH; diff --git a/sky/sky.cpp b/sky/sky.cpp index dd5b11b50d0..d59d3595b40 100644 --- a/sky/sky.cpp +++ b/sky/sky.cpp @@ -194,8 +194,12 @@ void SkyState::go() { delay(_systemVars.gameSpeed); if (_system->get_msecs() - _lastSaveTime > 5 * 60 * 1000) { - _lastSaveTime = _system->get_msecs(); - _skyControl->doAutoSave(); + if (_systemVars.systemFlags & SF_CHOOSING) + _lastSaveTime += 30 * 1000; + else { + _lastSaveTime = _system->get_msecs(); + _skyControl->doAutoSave(); + } } _skySound->checkFxQueue(); _skyMouse->mouseEngine((uint16)_sdl_mouse_x, (uint16)_sdl_mouse_y);