1241 | | //if (saveState(slot, _saveTemporaryState)) |
1242 | | // result = 0; // sucess |
1243 | | //else |
| 1242 | // Save dialogs of old SCUMM games except Loom are cutscene, hence |
| 1243 | // we can easily break the cutscene and save the state after the cutscene |
| 1244 | // has terminated. Loom doesn't use cutscene so we would run inside an endless |
| 1245 | // loop. |
| 1246 | if (_game.version <= 3 && _game.id != GID_LOOM) { |
| 1247 | char name[32]; |
| 1248 | if (_game.version <= 2) { |
| 1249 | // use generic name |
| 1250 | sprintf(name, "Game %c", 'A'+slot-1); |
| 1251 | } else { |
| 1252 | // use name entered by the user |
| 1253 | char* ptr; |
| 1254 | int firstSlot = (_game.id == GID_LOOM) ? RESID_SAVENAME1_LOOM : RESID_SAVENAME1; |
| 1255 | ptr = (char*)getStringAddress(slot + firstSlot - 1); |
| 1256 | strncpy(name, ptr, sizeof(name)); |
| 1257 | } |
| 1258 | // HACK: works without a temporary savegame but does not behave |
| 1259 | // like the original SAVE-dialog (does not work with LOOM) |
| 1260 | if (_game.id == GID_INDY3) |
| 1261 | saveIQPoints(); |
| 1262 | abortCutscene(); |
| 1263 | getScriptEntryPoint(); |
| 1264 | requestSave(slot, name, false); |
| 1265 | // we do not have to return a result actually because we have already |
| 1266 | // jumped to the end of the cutscene. |
| 1267 | } else { |
| 1268 | //if (saveState(slot, _saveTemporaryState)) |
| 1269 | // result = 0; // sucess |
| 1270 | //else |