Skip to content

Commit

Permalink
HOPKINS: Move some more variables from Globals to LinesManager
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Jan 27, 2013
1 parent 68f5da1 commit 8de1b1b
Show file tree
Hide file tree
Showing 5 changed files with 284 additions and 288 deletions.
17 changes: 6 additions & 11 deletions engines/hopkins/globals.cpp
Expand Up @@ -99,8 +99,6 @@ Globals::Globals() {
}
for (int i = 0; i < 500; ++i)
_spriteSize[i] = 0;
for (int i = 0; i < 32002; ++i)
super_parcours[i] = 0;
for (int i = 0; i < 70; ++i)
Common::fill((byte *)&Hopkins[i], (byte *)&Hopkins[i] + sizeof(HopkinsItem), 0);

Expand Down Expand Up @@ -176,9 +174,6 @@ Globals::Globals() {
SPRITE_ECRAN = NULL;
_saveData = NULL;
BUFFERTAPE = NULL;
essai0 = NULL;
essai1 = NULL;
essai2 = NULL;
inventaire2 = NULL;
GESTE = NULL;
_inventoryObject = NULL;
Expand Down Expand Up @@ -311,9 +306,9 @@ void Globals::clearAll() {
ZONEP[idx]._spriteIndex = 0;
}

essai0 = (int16 *)g_PTRNUL;
essai1 = (int16 *)g_PTRNUL;
essai2 = (int16 *)g_PTRNUL;
_vm->_linesManager.essai0 = (int16 *)g_PTRNUL;
_vm->_linesManager.essai1 = (int16 *)g_PTRNUL;
_vm->_linesManager.essai2 = (int16 *)g_PTRNUL;
BufLig = (int16 *)g_PTRNUL;
_route = (int16 *)g_PTRNUL;

Expand All @@ -339,9 +334,9 @@ void Globals::clearAll() {
_saveData = (Sauvegarde *)malloc(sizeof(Sauvegarde));
memset(_saveData, 0, sizeof(Sauvegarde));

essai0 = (int16 *)BUFFERTAPE;
essai1 = (int16 *)(BUFFERTAPE + 25000);
essai2 = (int16 *)(BUFFERTAPE + 50000);
_vm->_linesManager.essai0 = (int16 *)BUFFERTAPE;
_vm->_linesManager.essai1 = (int16 *)(BUFFERTAPE + 25000);
_vm->_linesManager.essai2 = (int16 *)(BUFFERTAPE + 50000);
BufLig = (int16 *)(BUFFERTAPE + 75000);
_boxWidth = 240;

Expand Down
4 changes: 0 additions & 4 deletions engines/hopkins/globals.h
Expand Up @@ -301,7 +301,6 @@ class Globals {
int BOBZONE[105];
bool BOBZONE_FLAG[105];
int _spriteSize[500];
int16 super_parcours[32002];
HopkinsItem Hopkins[70];
int _inventory[36];
SortItem _sortedDisplay[51];
Expand All @@ -324,9 +323,6 @@ class Globals {
byte *SPRITE_ECRAN;
Sauvegarde *_saveData;
byte *BUFFERTAPE;
int16 *essai0;
int16 *essai1;
int16 *essai2;
byte *inventaire2;
byte *GESTE;
int _curObjectIndex;
Expand Down

0 comments on commit 8de1b1b

Please sign in to comment.