mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-22 18:37:01 +00:00
fixed text drawing bug and made sure autosave doesn't save if engine is in logic_choose mode
svn-id: r9006
This commit is contained in:
parent
40eac8b182
commit
d971845fab
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user