Skip to content

Commit

Permalink
HOPKINS: Get rid of the NOSPRECRAN global variable
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegr committed Jan 7, 2013
1 parent 60e1193 commit e57c82f
Show file tree
Hide file tree
Showing 9 changed files with 367 additions and 618 deletions.
1 change: 0 additions & 1 deletion engines/hopkins/globals.cpp
Expand Up @@ -140,7 +140,6 @@ Globals::Globals() {
PLANI = 0;
PERSO = 0;
_screenId = 0;
NOSPRECRAN = false;
_prevScreenId = 0;
_maxLineLength = 0;
Max_Perso_Y = 0;
Expand Down
1 change: 0 additions & 1 deletion engines/hopkins/globals.h
Expand Up @@ -377,7 +377,6 @@ class Globals {
int _exitId;
int PLANX, PLANY;
int PLANI;
bool NOSPRECRAN;
int _screenId;
int _prevScreenId;
int Max_Propre;
Expand Down
12 changes: 6 additions & 6 deletions engines/hopkins/graphics.cpp
Expand Up @@ -1753,16 +1753,16 @@ void GraphicsManager::displayFont(byte *surface, const byte *spriteData, int xp,
}

// Init Screen
void GraphicsManager::INI_ECRAN(const Common::String &file) {
OPTI_INI(file, 0);
void GraphicsManager::INI_ECRAN(const Common::String &file, bool initializeScreen) {
OPTI_INI(file, 0, initializeScreen);
}

// Init Screen 2
void GraphicsManager::INI_ECRAN2(const Common::String &file) {
OPTI_INI(file, 2);
void GraphicsManager::INI_ECRAN2(const Common::String &file, bool initializeScreen) {
OPTI_INI(file, 2, initializeScreen);
}

void GraphicsManager::OPTI_INI(const Common::String &file, int mode) {
void GraphicsManager::OPTI_INI(const Common::String &file, int mode, bool initializeScreen) {
Common::String filename = file + ".ini";
byte *ptr = _vm->_fileManager.searchCat(filename, 1);

Expand All @@ -1773,7 +1773,7 @@ void GraphicsManager::OPTI_INI(const Common::String &file, int mode) {
if (!mode) {
filename = file + ".spr";
_vm->_globals.SPRITE_ECRAN = _vm->_globals.freeMemory(_vm->_globals.SPRITE_ECRAN);
if (!_vm->_globals.NOSPRECRAN) {
if (initializeScreen) {
_vm->_globals.SPRITE_ECRAN = _vm->_fileManager.searchCat(filename, 8);
if (_vm->_globals.SPRITE_ECRAN) {
_vm->_fileManager.constructFilename("LINK", filename);
Expand Down
6 changes: 3 additions & 3 deletions engines/hopkins/graphics.h
Expand Up @@ -163,9 +163,9 @@ class GraphicsManager {
void SCOPY(const byte *surface, int x1, int y1, int width, int height, byte *destSurface, int destX, int destY);
void Copy_Mem(const byte *srcSurface, int x1, int y1, unsigned int width, int height, byte *destSurface, int destX, int destY);
void displayFont(byte *surface, const byte *spriteData, int xp, int yp, int characterIndex, int colour);
void INI_ECRAN(const Common::String &file);
void INI_ECRAN2(const Common::String &file);
void OPTI_INI(const Common::String &file, int mode);
void INI_ECRAN(const Common::String &file, bool initializeScreen);
void INI_ECRAN2(const Common::String &file, bool initializeScreen);
void OPTI_INI(const Common::String &file, int mode, bool initializeScreen);
void NB_SCREEN(bool initPalette);
void SHOW_PALETTE();
void Copy_WinScan_Vbe(const byte *srcP, byte *destP);
Expand Down

0 comments on commit e57c82f

Please sign in to comment.