aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hopkins/globals.cpp4
-rw-r--r--engines/hopkins/globals.h2
-rw-r--r--engines/hopkins/hopkins.cpp8
-rw-r--r--engines/hopkins/menu.cpp2
-rw-r--r--engines/hopkins/objects.cpp2
5 files changed, 9 insertions, 9 deletions
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp
index 2283c6b10a..5a24a5f207 100644
--- a/engines/hopkins/globals.cpp
+++ b/engines/hopkins/globals.cpp
@@ -141,7 +141,7 @@ Globals::Globals() {
nbrligne = 0;
largeur_boite = 0;
hauteur_boite = 0;
- FORET = 0;
+ FORET = false;
OBJL = OBJH = 0;
HELICO = 0;
CAT_POSI = 0;
@@ -419,7 +419,7 @@ void Globals::clearAll() {
ADR_FICHIER_OBJ = g_PTRNUL;
FORETSPR = g_PTRNUL;
- FORET = 0;
+ FORET = false;
cache_souris = dos_malloc2(2500);
GESTE = g_PTRNUL;
diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h
index 382487a822..84eca3b688 100644
--- a/engines/hopkins/globals.h
+++ b/engines/hopkins/globals.h
@@ -388,7 +388,7 @@ public:
int hauteur_boite;
int GESTE_FLAG;
byte *FORETSPR;
- int FORET;
+ bool FORET;
byte *COUCOU;
int16 *chemin;
byte *cache_souris;
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index a513be7889..de8f41e895 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -930,7 +930,7 @@ LABEL_140:
_globals.Max_Propre_Gen = 20;
_globals.Max_Perso_Y = 435;
_globals.DESACTIVE_INVENT = false;
- _globals.FORET = 1;
+ _globals.FORET = true;
_globals.NOSPRECRAN = true;
Common::String im = Common::String::format("IM%d", _globals.SORTIE);
_soundManager.WSOUND(13);
@@ -941,10 +941,10 @@ LABEL_140:
}
_objectsManager.PERSONAGE2(im, im, "BANDIT", im, 13);
_globals.NOSPRECRAN = false;
- if (_globals.SORTIE - 35 > 14) {
+ if ((uint)(_globals.SORTIE - 35) > 14) {
_globals.dos_free2(_globals.FORETSPR);
_globals.FORETSPR = g_PTRNUL;
- _globals.FORET = 0;
+ _globals.FORET = false;
_soundManager.DEL_SAMPLE(1);
}
} else if (_globals.SORTIE == 32) {
@@ -1856,7 +1856,7 @@ void HopkinsEngine::REST_SYSTEM() {
void HopkinsEngine::PUBQUIT() {
_globals.PUBEXIT = true;
_graphicsManager.RESET_SEGMENT_VESA();
- _globals.FORET = 0;
+ _globals.FORET = false;
_eventsManager.CASSE = false;
_globals.DESACTIVE_INVENT = true;
_globals.FLAG_VISIBLE = false;
diff --git a/engines/hopkins/menu.cpp b/engines/hopkins/menu.cpp
index b8ec31d67c..7f7e3803cc 100644
--- a/engines/hopkins/menu.cpp
+++ b/engines/hopkins/menu.cpp
@@ -54,7 +54,7 @@ int MenuManager::MENU() {
result = 0;
while (!g_system->getEventManager()->shouldQuit()) {
- _vm->_globals.FORET = 0;
+ _vm->_globals.FORET = false;
_vm->_eventsManager.CASSE = false;
_vm->_globals.DESACTIVE_INVENT = true;
_vm->_globals.FLAG_VISIBLE = false;
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index ec052dba35..9b46b3d03d 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -2940,7 +2940,7 @@ void ObjectsManager::PARADISE() {
result = _vm->_globals.SAUVEGARDE->data[svField1];
if (result && _vm->_globals.SAUVEGARDE->data[svField2] && result != 4 && result > 3) {
_vm->_fontManager.TEXTE_OFF(5);
- if (_vm->_globals.FORET != 1 || ((uint16)(NUMZONE - 20) > 1u && (uint16)(NUMZONE - 22) > 1u)) {
+ if (!_vm->_globals.FORET || ((uint16)(NUMZONE - 20) > 1u && (uint16)(NUMZONE - 22) > 1u)) {
if (_vm->_graphicsManager.DOUBLE_ECRAN == true) {
_vm->_graphicsManager.no_scroll = 2;
if (_vm->_eventsManager.start_x >= XSPR(0) - 320)