diff options
author | Robert Göffringmann | 2003-07-14 09:16:12 +0000 |
---|---|---|
committer | Robert Göffringmann | 2003-07-14 09:16:12 +0000 |
commit | d971845fab4473e6e2f609cd9463993223f55f80 (patch) | |
tree | 58e2b9b935c6c5ec0a9130279188e35af093e2dd | |
parent | 40eac8b182143586e4e336ff3a1412c6c27ec697 (diff) | |
download | scummvm-rg350-d971845fab4473e6e2f609cd9463993223f55f80.tar.gz scummvm-rg350-d971845fab4473e6e2f609cd9463993223f55f80.tar.bz2 scummvm-rg350-d971845fab4473e6e2f609cd9463993223f55f80.zip |
fixed text drawing bug and made sure autosave doesn't save if engine is in logic_choose mode
svn-id: r9006
-rw-r--r-- | sky/control.cpp | 10 | ||||
-rw-r--r-- | sky/sky.cpp | 8 |
2 files changed, 10 insertions, 8 deletions
diff --git a/sky/control.cpp b/sky/control.cpp index 23cdbd21a0..4d20239a54 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 dd5b11b50d..d59d3595b4 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); |