aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins/globals.cpp
diff options
context:
space:
mode:
authorStrangerke2013-01-27 22:28:10 +0100
committerStrangerke2013-01-27 22:28:10 +0100
commit0f13ff5cc1984a9748ce666d89d46c7d80624de0 (patch)
tree25d9a525797038fdd1e3ce55774a68557ed9928f /engines/hopkins/globals.cpp
parentb9f9b2c75b372194122dfae4d8b75d7c3a5dc254 (diff)
downloadscummvm-rg350-0f13ff5cc1984a9748ce666d89d46c7d80624de0.tar.gz
scummvm-rg350-0f13ff5cc1984a9748ce666d89d46c7d80624de0.tar.bz2
scummvm-rg350-0f13ff5cc1984a9748ce666d89d46c7d80624de0.zip
HOPKINS: More private members in LinesManager
Diffstat (limited to 'engines/hopkins/globals.cpp')
-rw-r--r--engines/hopkins/globals.cpp33
1 files changed, 2 insertions, 31 deletions
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp
index e132457ac0..a8ee4e4063 100644
--- a/engines/hopkins/globals.cpp
+++ b/engines/hopkins/globals.cpp
@@ -161,14 +161,13 @@ Globals::Globals() {
_oceanDirection = 0;
- // Initialise pointers
+ // Initialize pointers
ICONE = NULL;
BUF_ZONE = NULL;
for (int idx = 0; idx < 6; ++idx)
CACHE_BANQUE[idx] = NULL;
SPRITE_ECRAN = NULL;
_saveData = NULL;
- BUFFERTAPE = NULL;
inventaire2 = NULL;
GESTE = NULL;
_inventoryObject = NULL;
@@ -214,7 +213,6 @@ Globals::~Globals() {
CACHE_BANQUE[idx] = freeMemory(CACHE_BANQUE[idx]);
freeMemory(SPRITE_ECRAN);
freeMemory((byte *)_saveData);
- freeMemory(BUFFERTAPE);
freeMemory(inventaire2);
freeMemory(GESTE);
freeMemory(_inventoryObject);
@@ -299,38 +297,11 @@ void Globals::clearAll() {
ZONEP[idx]._spriteIndex = 0;
}
- _vm->_linesManager.essai0 = (int16 *)g_PTRNUL;
- _vm->_linesManager.essai1 = (int16 *)g_PTRNUL;
- _vm->_linesManager.essai2 = (int16 *)g_PTRNUL;
- _vm->_linesManager.BufLig = (int16 *)g_PTRNUL;
- _vm->_linesManager._route = (int16 *)g_PTRNUL;
-
- for (int idx = 0; idx < MAX_LINES; ++idx) {
- _vm->_linesManager.Ligne[idx]._lineDataEndIdx = 0;
- _vm->_linesManager.Ligne[idx].field2 = 0;
- _vm->_linesManager.Ligne[idx]._direction = 0;
- _vm->_linesManager.Ligne[idx].field6 = 0;
- _vm->_linesManager.Ligne[idx].field8 = 0;
- _vm->_linesManager.Ligne[idx]._lineData = (int16 *)g_PTRNUL;
-
- _vm->_linesManager._zoneLine[idx]._count = 0;
- _vm->_linesManager._zoneLine[idx].field2 = 0;
- _vm->_linesManager._zoneLine[idx]._zoneData = (int16 *)g_PTRNUL;
- }
-
- for (int idx = 0; idx < 100; ++idx) {
- _vm->_linesManager.CarreZone[idx]._enabledFl = 0;
- }
-
- BUFFERTAPE = allocMemory(85000);
+ _vm->_linesManager.clearAll();
_saveData = (Sauvegarde *)malloc(sizeof(Sauvegarde));
memset(_saveData, 0, sizeof(Sauvegarde));
- _vm->_linesManager.essai0 = (int16 *)BUFFERTAPE;
- _vm->_linesManager.essai1 = (int16 *)(BUFFERTAPE + 25000);
- _vm->_linesManager.essai2 = (int16 *)(BUFFERTAPE + 50000);
- _vm->_linesManager.BufLig = (int16 *)(BUFFERTAPE + 75000);
_boxWidth = 240;
_vm->_eventsManager._objectBuf = allocMemory(2500);