aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2012-10-28 18:04:06 +1100
committerPaul Gilbert2012-10-28 18:04:06 +1100
commita8e217a7b8296d40f658583579edc68d86f1dd3f (patch)
treeaae414c99ade77e8d647fc766ccb5d9cec829758 /engines
parent1dff18f4b9fd77d5aaf90c37eca0f22e4368eb26 (diff)
downloadscummvm-rg350-a8e217a7b8296d40f658583579edc68d86f1dd3f.tar.gz
scummvm-rg350-a8e217a7b8296d40f658583579edc68d86f1dd3f.tar.bz2
scummvm-rg350-a8e217a7b8296d40f658583579edc68d86f1dd3f.zip
HOPKINS: Added code to delete saved temporary screen .SCR files
Diffstat (limited to 'engines')
-rw-r--r--engines/hopkins/anim.cpp29
-rw-r--r--engines/hopkins/objects.cpp7
-rw-r--r--engines/hopkins/talk.cpp12
3 files changed, 30 insertions, 18 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp
index 7622302fc3..400d695637 100644
--- a/engines/hopkins/anim.cpp
+++ b/engines/hopkins/anim.cpp
@@ -271,6 +271,7 @@ void AnimationManager::PLAY_ANM2(const Common::String &filename, uint32 a2, uint
v18 = 0;
v20 = 1;
memcpy(_vm->_graphicsManager.OLD_PAL, _vm->_graphicsManager.Palette, 0x301u);
+
_vm->_fileManager.CONSTRUIT_LINUX("TEMP.SCR");
if (_vm->_graphicsManager.nbrligne == SCREEN_WIDTH)
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN, 0x4B000u);
@@ -278,6 +279,7 @@ void AnimationManager::PLAY_ANM2(const Common::String &filename, uint32 a2, uint
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN, 0x96000u);
if (!_vm->_graphicsManager.nbrligne)
_vm->_graphicsManager.ofscroll = 0;
+
v12 = _vm->_graphicsManager.VESA_SCREEN;
v13 = _vm->_globals.dos_malloc2(0x14u);
_vm->_fileManager.CONSTRUIT_FICHIER(_vm->_globals.HOPANM, filename);
@@ -354,8 +356,9 @@ void AnimationManager::PLAY_ANM2(const Common::String &filename, uint32 a2, uint
_vm->_globals.dos_free2(v13);
f.close();
- _vm->_fileManager.CONSTRUIT_LINUX("TEMP.SCR");
- _vm->_fileManager.bload(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN);
+ _vm->_fileManager.bload("TEMP.SCR", _vm->_graphicsManager.VESA_SCREEN);
+ g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
+
memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 0x301u);
v4 = &_vm->_graphicsManager.Palette[769];
_vm->_graphicsManager.Cls_Pal();
@@ -459,8 +462,9 @@ LABEL_88:
_vm->_globals.dos_free2(v13);
f.close();
- _vm->_fileManager.CONSTRUIT_LINUX("TEMP.SCR");
- _vm->_fileManager.bload(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN);
+ _vm->_fileManager.bload("TEMP.SCR", _vm->_graphicsManager.VESA_SCREEN);
+ g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
+
memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 0x301u);
v4 = &_vm->_graphicsManager.Palette[769];
_vm->_graphicsManager.Cls_Pal();
@@ -523,8 +527,9 @@ LABEL_88:
_vm->_globals.dos_free2(v13);
f.close();
- _vm->_fileManager.CONSTRUIT_LINUX("TEMP.SCR");
- _vm->_fileManager.bload(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN);
+ _vm->_fileManager.bload("TEMP.SCR", _vm->_graphicsManager.VESA_SCREEN);
+ g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
+
memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 0x301u);
v4 = &_vm->_graphicsManager.Palette[769];
_vm->_graphicsManager.Cls_Pal();
@@ -620,8 +625,10 @@ LABEL_114:
}
_vm->_graphicsManager.FADE_LINUX = 0;
_vm->_globals.dos_free2(v13);
- _vm->_fileManager.CONSTRUIT_LINUX("TEMP.SCR");
- _vm->_fileManager.bload(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN);
+
+ _vm->_fileManager.bload("TEMP.SCR", _vm->_graphicsManager.VESA_SCREEN);
+ g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
+
memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 0x301u);
_vm->_graphicsManager.Cls_Pal();
_vm->_graphicsManager.DD_Lock();
@@ -970,6 +977,7 @@ void AnimationManager::PLAY_SEQ(int a1, const Common::String &a2, uint32 a3, uin
_vm->_eventsManager.souris_flag = 0;
if (!NO_COUL) {
_vm->_eventsManager.VBL();
+
_vm->_fileManager.CONSTRUIT_LINUX("TEMP.SCR");
if (_vm->_graphicsManager.nbrligne == SCREEN_WIDTH)
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN, 0x4B000u);
@@ -1100,8 +1108,9 @@ LABEL_59:
f.close();
if (!NO_COUL) {
- _vm->_fileManager.CONSTRUIT_LINUX("TEMP.SCR");
- _vm->_fileManager.bload(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN);
+ _vm->_fileManager.bload("TEMP.SCR", _vm->_graphicsManager.VESA_SCREEN);
+ g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
+
_vm->_eventsManager.souris_flag = 1;
}
if (v7 == 1)
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index d63ee39f40..2913a69866 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -4265,8 +4265,7 @@ void ObjectsManager::SPECIAL_JEU() {
v1 = _vm->_globals.dos_malloc2(0x3E8u);
memcpy(v1, _vm->_graphicsManager.Palette, 0x301u);
- _vm->_fileManager.CONSTRUIT_LINUX("TEMP1.SCR");
- _vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN, 0x4B000u);
+ _vm->_saveLoadManager.SAUVE_FICHIER("TEMP1.SCR", _vm->_graphicsManager.VESA_SCREEN, 0x4B000u);
if (!_vm->_graphicsManager.nbrligne)
_vm->_graphicsManager.ofscroll = 0;
@@ -4282,8 +4281,8 @@ void ObjectsManager::SPECIAL_JEU() {
_vm->_graphicsManager.NB_SCREEN();
_vm->_globals.NECESSAIRE = 0;
- _vm->_fileManager.CONSTRUIT_LINUX("TEMP1.SCR");
- _vm->_saveLoadManager.bload(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN);
+ _vm->_saveLoadManager.bload("TEMP1.SCR", _vm->_graphicsManager.VESA_SCREEN);
+ g_system->getSavefileManager()->removeSavefile("TEMP1.SCR");
PERSO_ON = 0;
memcpy(_vm->_graphicsManager.Palette, v1, 0x301u);
diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp
index f8dbe848f8..756effbfaf 100644
--- a/engines/hopkins/talk.cpp
+++ b/engines/hopkins/talk.cpp
@@ -149,8 +149,8 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) {
_vm->_graphicsManager.NB_SCREEN();
_vm->_globals.NECESSAIRE = 0;
- _vm->_fileManager.CONSTRUIT_LINUX("TEMP.SCR");
- _vm->_saveLoadManager.bload(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN);
+ _vm->_saveLoadManager.bload("TEMP.SCR", _vm->_graphicsManager.VESA_SCREEN);
+ g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
_vm->_objectsManager.PERSO_ON = 0;
_vm->_eventsManager.btsouris = v14;
@@ -1233,11 +1233,13 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) {
}
PERSOSPR = _vm->_objectsManager.CHARGE_SPRITE(_vm->_globals.NFICHIER);
_vm->_globals.CAT_FLAG = 0;
+
_vm->_fileManager.CONSTRUIT_LINUX("TEMP.SCR");
if (_vm->_graphicsManager.nbrligne == SCREEN_WIDTH)
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN, 0x4B000u);
if (_vm->_graphicsManager.nbrligne == (SCREEN_WIDTH * 2))
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN, 0x96000u);
+
if (!_vm->_graphicsManager.nbrligne)
_vm->_graphicsManager.ofscroll = 0;
_vm->_graphicsManager.NB_SCREEN();
@@ -1300,8 +1302,10 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) {
_vm->_globals.NOMARCHE = 0;
if (_vm->_globals.SORTIE == 101)
_vm->_globals.SORTIE = 0;
- _vm->_fileManager.CONSTRUIT_LINUX("TEMP.SCR");
- _vm->_fileManager.bload(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN);
+
+ _vm->_fileManager.bload("TEMP.SCR", _vm->_graphicsManager.VESA_SCREEN);
+ g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
+
_vm->_objectsManager.PERSO_ON = 0;
_vm->_eventsManager.btsouris = 4;
_vm->_eventsManager.CHANGE_MOUSE(4);