mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 10:17:14 +00:00
GRIFFON: Fix regressions in newsaveload function
This commit is contained in:
parent
a4ffe2cf55
commit
6e7260c3f8
@ -475,6 +475,8 @@ void GriffonEngine::saveLoadNew() {
|
|||||||
int curRow = 0;
|
int curRow = 0;
|
||||||
int curCol = 0;
|
int curCol = 0;
|
||||||
|
|
||||||
|
bool lowerlock = false;
|
||||||
|
|
||||||
_ticks = g_system->getMillis();
|
_ticks = g_system->getMillis();
|
||||||
int ticks1 = _ticks;
|
int ticks1 = _ticks;
|
||||||
|
|
||||||
@ -592,9 +594,11 @@ void GriffonEngine::saveLoadNew() {
|
|||||||
return;
|
return;
|
||||||
} else if (curCol == 1) {
|
} else if (curCol == 1) {
|
||||||
// LOAD GAME
|
// LOAD GAME
|
||||||
|
lowerlock = true;
|
||||||
curRow = 1 + _saveSlot;
|
curRow = 1 + _saveSlot;
|
||||||
} else if (curCol == 2) {
|
} else if (curCol == 2) {
|
||||||
// SAVE GAME
|
// SAVE GAME
|
||||||
|
lowerlock = true;
|
||||||
curRow = 1;
|
curRow = 1;
|
||||||
} else if (curCol == 3) {
|
} else if (curCol == 3) {
|
||||||
// RETURN
|
// RETURN
|
||||||
@ -604,10 +608,12 @@ void GriffonEngine::saveLoadNew() {
|
|||||||
_shouldQuit = true;
|
_shouldQuit = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
if (lowerlock && curRow == 1) {
|
||||||
if ((curCol == 1) && saveState(curRow - 1)) {
|
if ((curCol == 1) && saveState(curRow - 1)) {
|
||||||
_secStart += _secsingame;
|
_secStart += _secsingame;
|
||||||
_secsingame = 0;
|
_secsingame = 0;
|
||||||
|
lowerlock = false;
|
||||||
_saveSlot = curRow - 1;
|
_saveSlot = curRow - 1;
|
||||||
curRow = 0;
|
curRow = 0;
|
||||||
} else if ((curCol == 2) && loadState(curRow - 1)) {
|
} else if ((curCol == 2) && loadState(curRow - 1)) {
|
||||||
@ -633,10 +639,11 @@ void GriffonEngine::saveLoadNew() {
|
|||||||
case Common::KEYCODE_ESCAPE:
|
case Common::KEYCODE_ESCAPE:
|
||||||
if (curRow == 0)
|
if (curRow == 0)
|
||||||
return;
|
return;
|
||||||
|
lowerlock = false;
|
||||||
curRow = 0;
|
curRow = 0;
|
||||||
break;
|
break;
|
||||||
case Common::KEYCODE_DOWN:
|
case Common::KEYCODE_DOWN:
|
||||||
if (curRow != 0) {
|
if (lowerlock) {
|
||||||
++curRow;
|
++curRow;
|
||||||
if (curRow == 5)
|
if (curRow == 5)
|
||||||
curRow = 1;
|
curRow = 1;
|
||||||
@ -644,7 +651,7 @@ void GriffonEngine::saveLoadNew() {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Common::KEYCODE_UP:
|
case Common::KEYCODE_UP:
|
||||||
if (curRow != 0) {
|
if (lowerlock) {
|
||||||
--curRow;
|
--curRow;
|
||||||
if (curRow == 0)
|
if (curRow == 0)
|
||||||
curRow = 4;
|
curRow = 4;
|
||||||
@ -652,7 +659,7 @@ void GriffonEngine::saveLoadNew() {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Common::KEYCODE_LEFT:
|
case Common::KEYCODE_LEFT:
|
||||||
if (curRow == 0) {
|
if (!lowerlock) {
|
||||||
--curCol;
|
--curCol;
|
||||||
if (curCol == -1)
|
if (curCol == -1)
|
||||||
curCol = 3;
|
curCol = 3;
|
||||||
@ -660,7 +667,7 @@ void GriffonEngine::saveLoadNew() {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Common::KEYCODE_RIGHT:
|
case Common::KEYCODE_RIGHT:
|
||||||
if (curRow == 0) {
|
if (!lowerlock) {
|
||||||
++curCol;
|
++curCol;
|
||||||
if (curCol == 4)
|
if (curCol == 4)
|
||||||
curCol = 0;
|
curCol = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user