Skip to content

Commit

Permalink
HOPKINS: More full version initialization, change 2 variables to boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Nov 8, 2012
1 parent 96ca3ba commit c2a5b4b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
11 changes: 9 additions & 2 deletions engines/hopkins/globals.cpp
Expand Up @@ -116,8 +116,9 @@ Globals::Globals() {
// Initialise fields
FR = 0;
SVGA = 2;
internet = 1;
PUBEXIT = 0;
internet = true;

PUBEXIT = false;
vitesse = 1;
INSTALL_TYPE = 1;
MUSICVOL = 6;
Expand Down Expand Up @@ -298,6 +299,12 @@ void Globals::setConfig() {
break;
}

if (_vm->getIsDemo())
internet = true;
else
internet = false;
// End of CHECKME

switch (FR) {
case 0:
FICH_ZONE = "ZONEAN.TXT";
Expand Down
4 changes: 2 additions & 2 deletions engines/hopkins/globals.h
Expand Up @@ -316,8 +316,8 @@ class Globals {
TriItem Tri[51];
int FR;
int SVGA;
int internet;
int PUBEXIT;
bool internet;
bool PUBEXIT;
bool XFULLSCREEN;
int XSETMODE;
int XZOOM;
Expand Down
10 changes: 8 additions & 2 deletions engines/hopkins/graphics.cpp
Expand Up @@ -48,8 +48,14 @@ GraphicsManager::GraphicsManager() {
PCX_L = PCX_H = 0;
DOUBLE_ECRAN = false;
OLD_SCROLL = 0;
MANU_SCROLL = 1;
SPEED_SCROLL = 16;
if (_vm->getIsDemo()) {
// CHECKME: Should be 0?
MANU_SCROLL = 1;
SPEED_SCROLL = 16;
} else {
MANU_SCROLL = 0;
SPEED_SCROLL = 32;
}
nbrligne2 = 0;
Agr_x = Agr_y = 0;
Agr_Flag_x = Agr_Flag_y = 0;
Expand Down
2 changes: 1 addition & 1 deletion engines/hopkins/hopkins.cpp
Expand Up @@ -980,7 +980,7 @@ void HopkinsEngine::REST_SYSTEM() {
}

void HopkinsEngine::PUBQUIT() {
_globals.PUBEXIT = 1;
_globals.PUBEXIT = true;
_graphicsManager.RESET_SEGMENT_VESA();
_globals.FORET = 0;
_eventsManager.CASSE = false;
Expand Down
2 changes: 1 addition & 1 deletion engines/hopkins/script.cpp
Expand Up @@ -722,7 +722,7 @@ int ScriptManager::Traduction(byte *a1) {
if (!_vm->_globals.internet) {
memcpy(_vm->_graphicsManager.OLD_PAL, _vm->_graphicsManager.Palette, 0x301u);
v1 = _vm->_graphicsManager.OLD_PAL[769];
_vm->_animationManager.PLAY_ANM2("plan.ANm", 50, 10, 800);
_vm->_animationManager.PLAY_ANM2("PLAN.ANM", 50, 10, 800);
}
_vm->_globals.NBBLOC = 0;
}
Expand Down

0 comments on commit c2a5b4b

Please sign in to comment.