HOPKINS: Rename functions in DialogManager

This commit is contained in:
Strangerke 2012-12-10 23:57:59 +01:00
parent 78cf8296e0
commit af667771a9
9 changed files with 116 additions and 114 deletions

View File

@ -36,17 +36,17 @@
namespace Hopkins {
DialogsManager::DialogsManager() {
INVENTFLAG = false;
_inventFl = false;
_inventDisplayedFl = false;
VIRE_INVENT = false;
_removeInventFl = false;
_inventX = _inventY = 0;
_inventWidth = _inventHeight = 0;
Winventaire = NULL;
inventaire2 = g_PTRNUL;
_inventWin1 = g_PTRNUL;
_inventBuf2 = g_PTRNUL;
}
DialogsManager::~DialogsManager() {
_vm->_globals.dos_free2(Winventaire);
_vm->_globals.dos_free2(_inventWin1);
}
void DialogsManager::setParent(HopkinsEngine *vm) {
@ -67,7 +67,7 @@ void DialogsManager::showOptionsDialog() {
_vm->_fileManager.constructFilename(_vm->_globals.HOPSYSTEM, "OPTIES.SPR");
_vm->_globals.OPTION_SPR = _vm->_fileManager.loadFile(_vm->_globals.NFICHIER);
_vm->_globals.OPTION_FLAG = true;
_vm->_globals._optionDialogFl = true;
do {
if (_vm->_eventsManager.BMOUSE()) {
@ -298,26 +298,26 @@ void DialogsManager::showOptionsDialog() {
_vm->_graphicsManager.ofscroll + 498, 320);
_vm->_globals.OPTION_SPR = _vm->_globals.dos_free2(_vm->_globals.OPTION_SPR);
_vm->_globals.OPTION_FLAG = false;
_vm->_globals._optionDialogFl = false;
}
void DialogsManager::showInventory() {
if (!VIRE_INVENT && !_inventDisplayedFl && !_vm->_globals.DESACTIVE_INVENT) {
if (!_removeInventFl && !_inventDisplayedFl && !_vm->_globals._disableInventFl) {
_vm->_graphicsManager.no_scroll = 1;
_vm->_objectsManager.FLAG_VISIBLE_EFFACE = 4;
_vm->_objectsManager.FLAG_VISIBLE = false;
for (int v1 = 0; v1 <= 1; v1++) {
INVENT_ANIM();
inventAnim();
_vm->_eventsManager.XMOUSE();
_vm->_eventsManager.YMOUSE();
_vm->_eventsManager.VBL();
}
_vm->_dialogsManager.Winventaire = g_PTRNUL;
_vm->_dialogsManager._inventWin1 = g_PTRNUL;
LABEL_7:
_vm->_eventsManager.souris_bb = 0;
_vm->_eventsManager.souris_b = 0;
_vm->_globals.DESACTIVE_INVENT = true;
_vm->_globals._disableInventFl = true;
_vm->_graphicsManager.SETCOLOR4(251, 100, 100, 100);
switch (_vm->_globals.FR) {
@ -337,19 +337,19 @@ LABEL_7:
error("Error opening file - %s", _vm->_globals.NFICHIER.c_str());
size_t filesize = f.size();
_vm->_dialogsManager.Winventaire = _vm->_globals.dos_malloc2(filesize);
_vm->_fileManager.readStream(f, _vm->_dialogsManager.Winventaire, filesize);
_vm->_dialogsManager._inventWin1 = _vm->_globals.dos_malloc2(filesize);
_vm->_fileManager.readStream(f, _vm->_dialogsManager._inventWin1, filesize);
f.close();
_vm->_fileManager.constructFilename(_vm->_globals.HOPSYSTEM, "INVENT2.SPR");
inventaire2 = _vm->_fileManager.loadFile(_vm->_globals.NFICHIER);
_inventBuf2 = _vm->_fileManager.loadFile(_vm->_globals.NFICHIER);
int v19 = _inventX = _vm->_graphicsManager.ofscroll + 152;
_inventY = 114;
int v18 = _inventWidth = _vm->_objectsManager.getWidth(_vm->_dialogsManager.Winventaire, 0);
int v17 = _inventHeight = _vm->_objectsManager.getHeight(_vm->_dialogsManager.Winventaire, 0);
int v18 = _inventWidth = _vm->_objectsManager.getWidth(_vm->_dialogsManager._inventWin1, 0);
int v17 = _inventHeight = _vm->_objectsManager.getHeight(_vm->_dialogsManager._inventWin1, 0);
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager.VESA_BUFFER, _vm->_dialogsManager.Winventaire,
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager.VESA_BUFFER, _vm->_dialogsManager._inventWin1,
v19 + 300, 414, 0, 0, 0, 0);
int v15 = 0;
int v4 = 0;
@ -368,7 +368,7 @@ LABEL_7:
};
v15 += 38;
}
_vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_dialogsManager.Winventaire, _inventX, _inventY, _inventWidth, _inventHeight);
_vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_dialogsManager._inventWin1, _inventX, _inventY, _inventWidth, _inventHeight);
_vm->_eventsManager.souris_bb = 0;
bool v20 = false;
int v13 = 0;
@ -423,9 +423,9 @@ LABEL_7:
v20 = true;
_vm->_globals.SORTIE = 0;
if (!v20) {
inventaire2 = _vm->_globals.dos_free2(inventaire2);
if (g_PTRNUL != _vm->_dialogsManager.Winventaire)
_vm->_dialogsManager.Winventaire = _vm->_globals.dos_free2(_vm->_dialogsManager.Winventaire);
_inventBuf2 = _vm->_globals.dos_free2(_inventBuf2);
if (g_PTRNUL != _vm->_dialogsManager._inventWin1)
_vm->_dialogsManager._inventWin1 = _vm->_globals.dos_free2(_vm->_dialogsManager._inventWin1);
goto LABEL_7;
}
} else if (!v20) {
@ -433,7 +433,7 @@ LABEL_7:
}
}
}
if (VIRE_INVENT == true)
if (_removeInventFl == true)
v20 = true;
if (v20)
break;
@ -449,9 +449,9 @@ LABEL_7:
_vm->_graphicsManager.Ajoute_Segment_Vesa(v19, 114, v19 + v18, v18 + 114);
_vm->_objectsManager.BOBTOUS = true;
}
if (_vm->_dialogsManager.Winventaire != g_PTRNUL)
_vm->_dialogsManager.Winventaire = _vm->_globals.dos_free2(_vm->_dialogsManager.Winventaire);
inventaire2 = _vm->_globals.dos_free2(inventaire2);
if (_vm->_dialogsManager._inventWin1 != g_PTRNUL)
_vm->_dialogsManager._inventWin1 = _vm->_globals.dos_free2(_vm->_dialogsManager._inventWin1);
_inventBuf2 = _vm->_globals.dos_free2(_inventBuf2);
if (_vm->_eventsManager.btsouris == 1)
showOptionsDialog();
@ -466,13 +466,16 @@ LABEL_7:
_vm->_objectsManager.cady = 0;
_vm->_objectsManager.old_cadx = 0;
_vm->_objectsManager.cadx = 0;
_vm->_globals.DESACTIVE_INVENT = false;
_vm->_globals._disableInventFl = false;
_vm->_graphicsManager.no_scroll = 0;
}
}
void DialogsManager::INVENT_ANIM() {
if (!_vm->_globals.DESACTIVE_INVENT) {
/**
* Inventory Animations
*/
void DialogsManager::inventAnim() {
if (!_vm->_globals._disableInventFl) {
if (_vm->_objectsManager.FLAG_VISIBLE_EFFACE && !_vm->_objectsManager.FLAG_VISIBLE) {
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager.VESA_SCREEN, _vm->_objectsManager.I_old_x, 27, 48, 38,
_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.I_old_x, 27);
@ -522,10 +525,10 @@ void DialogsManager::testDialogOpening() {
_vm->_eventsManager.GAME_KEY = KEY_NONE;
if (_vm->_eventsManager.GAME_KEY != KEY_NONE) {
if (!INVENTFLAG) {
if (!_inventFl) {
DIALOG_KEY key = _vm->_eventsManager.GAME_KEY;
_vm->_eventsManager.GAME_KEY = KEY_NONE;
INVENTFLAG = true;
_inventFl = true;
switch (key) {
case KEY_INVENTORY:
@ -550,7 +553,7 @@ void DialogsManager::testDialogOpening() {
break;
}
INVENTFLAG = false;
_inventFl = false;
_vm->_eventsManager.GAME_KEY = KEY_NONE;
}
}

View File

@ -41,11 +41,11 @@ public:
int _inventX, _inventY;
int _inventWidth, _inventHeight;
bool INVENTFLAG;
bool _inventFl;
bool _inventDisplayedFl;
bool VIRE_INVENT;
byte *Winventaire;
byte *inventaire2;
bool _removeInventFl;
byte *_inventWin1;
byte *_inventBuf2;
public:
DialogsManager();
~DialogsManager();
@ -57,8 +57,7 @@ public:
void showInventory();
int searchSavegames();
void testDialogOpening();
void INVENT_ANIM();
void inventAnim();
};
} // End of namespace Hopkins

View File

@ -233,12 +233,12 @@ Globals::Globals() {
CENSURE = false;
GESTE_FLAG = false;
BPP_NOAFF = false;
DESACTIVE_INVENT = false;
_disableInventFl = false;
FLAG_VISIBLE = false;
netscape = false;
NOMARCHE = false;
NO_VISU = false;
OPTION_FLAG = false;
_optionDialogFl = false;
CACHEFLAG = false;
NOPARLE = false;
couleur_40 = 50;
@ -368,8 +368,8 @@ void Globals::clearAll() {
NUM_FICHIER_OBJ = 0;
Bufferdecor = g_PTRNUL;
_vm->_eventsManager.Bufferobjet = g_PTRNUL;
_vm->_dialogsManager.Winventaire = g_PTRNUL;
_vm->_dialogsManager.inventaire2 = g_PTRNUL;
_vm->_dialogsManager._inventWin1 = g_PTRNUL;
_vm->_dialogsManager._inventBuf2 = g_PTRNUL;
COUCOU = g_PTRNUL;
SPRITE_ECRAN = g_PTRNUL;
SAUVEGARDE = (Sauvegarde *)g_PTRNUL;

View File

@ -428,14 +428,14 @@ public:
int Max_Propre_Gen;
int Max_Ligne_Long;
int Max_Perso_Y;
bool DESACTIVE_INVENT;
bool _disableInventFl;
bool FLAG_VISIBLE;
bool netscape; // CHECKME: Useless variable?
bool NOMARCHE;
int NBBLOC;
bool NO_VISU;
byte *OPTION_SPR;
bool OPTION_FLAG;
bool _optionDialogFl;
int opt_anm;
int opt_vitesse;
int opt_scrtype;

View File

@ -248,9 +248,9 @@ bool HopkinsEngine::runWin95Demo() {
break;
case 4:
_globals.DESACTIVE_INVENT = true;
_globals._disableInventFl = true;
_objectsManager.PLAN_BETA();
_globals.DESACTIVE_INVENT = false;
_globals._disableInventFl = false;
break;
case 5:
@ -576,9 +576,9 @@ bool HopkinsEngine::runLinuxDemo() {
break;
case 4:
_globals.DESACTIVE_INVENT = true;
_globals._disableInventFl = true;
_objectsManager.PLAN_BETA();
_globals.DESACTIVE_INVENT = false;
_globals._disableInventFl = false;
break;
case 5:
@ -919,9 +919,9 @@ bool HopkinsEngine::runWin95full() {
break;
case 4:
_globals.DESACTIVE_INVENT = true;
_globals._disableInventFl = true;
_objectsManager.PLAN_BETA();
_globals.DESACTIVE_INVENT = false;
_globals._disableInventFl = false;
break;
case 5:
@ -1230,7 +1230,7 @@ bool HopkinsEngine::runWin95full() {
_globals.Max_Propre = 50;
_globals.Max_Ligne_Long = 40;
_globals.Max_Perso_Y = 435;
_globals.DESACTIVE_INVENT = false;
_globals._disableInventFl = false;
_globals.FORET = true;
_globals.NOSPRECRAN = true;
Common::String im = Common::String::format("IM%d", _globals.SORTIE);
@ -1800,9 +1800,9 @@ bool HopkinsEngine::runLinuxFull() {
break;
case 4:
_globals.DESACTIVE_INVENT = true;
_globals._disableInventFl = true;
_objectsManager.PLAN_BETA();
_globals.DESACTIVE_INVENT = false;
_globals._disableInventFl = false;
break;
case 5:
@ -2109,7 +2109,7 @@ bool HopkinsEngine::runLinuxFull() {
_globals.Max_Ligne_Long = 40;
_globals.Max_Propre_Gen = 20;
_globals.Max_Perso_Y = 435;
_globals.DESACTIVE_INVENT = false;
_globals._disableInventFl = false;
_globals.FORET = true;
_globals.NOSPRECRAN = true;
Common::String im = Common::String::format("IM%d", _globals.SORTIE);
@ -3036,7 +3036,7 @@ void HopkinsEngine::PUBQUIT() {
_graphicsManager.RESET_SEGMENT_VESA();
_globals.FORET = false;
_eventsManager.CASSE = false;
_globals.DESACTIVE_INVENT = true;
_globals._disableInventFl = true;
_globals.FLAG_VISIBLE = false;
_graphicsManager.LOAD_IMAGE("BOX");
_soundManager.WSOUND(28);
@ -3067,7 +3067,7 @@ void HopkinsEngine::PUBQUIT() {
}
void HopkinsEngine::INCENDIE() {
_globals.DESACTIVE_INVENT = true;
_globals._disableInventFl = true;
_globals.iRegul = 1;
_graphicsManager.LOAD_IMAGE("IM71");
_animationManager.loadAnim("ANIM71");
@ -3098,7 +3098,7 @@ void HopkinsEngine::INCENDIE() {
_graphicsManager.FADE_OUTW();
_graphicsManager.FIN_VISU();
_globals.SAUVEGARDE->data[svField312] = 1;
_globals.DESACTIVE_INVENT = false;
_globals._disableInventFl = false;
}
void HopkinsEngine::BASE() {
@ -3178,7 +3178,7 @@ void HopkinsEngine::BASED() {
_animationManager.NO_SEQ = false;
_soundManager.WSOUND(26);
_globals.iRegul = 1;
_globals.DESACTIVE_INVENT = true;
_globals._disableInventFl = true;
_animationManager.NO_COUL = true;
_graphicsManager.FADE_LINUX = 2;
_animationManager.playSequence("abase.seq", 50, 15, 50);
@ -3203,15 +3203,15 @@ void HopkinsEngine::BASED() {
_graphicsManager.FADE_OUTW();
_graphicsManager.FIN_VISU();
_globals.RESET_CACHE();
_globals.DESACTIVE_INVENT = false;
_globals._disableInventFl = false;
_globals.SORTIE = 93;
_globals.iRegul = 0;
}
void HopkinsEngine::JOUE_FIN() {
_globals.PERSO = _globals.dos_free2(_globals.PERSO);
_dialogsManager.VIRE_INVENT = true;
_globals.DESACTIVE_INVENT = true;
_dialogsManager._removeInventFl = true;
_globals._disableInventFl = true;
_graphicsManager.ofscroll = 0;
_globals.PLAN_FLAG = false;
_globals.iRegul = 1;
@ -3249,7 +3249,7 @@ void HopkinsEngine::JOUE_FIN() {
_globals.NOPARLE = true;
_talkManager.PARLER_PERSO("GM4.PE2");
_globals.DESACTIVE_INVENT = true;
_globals._disableInventFl = true;
_objectsManager.BOBANIM_OFF(6);
_objectsManager.BOBANIM_OFF(10);
_objectsManager.BOBANIM_ON(9);
@ -3268,7 +3268,7 @@ void HopkinsEngine::JOUE_FIN() {
_globals.NOPARLE = true;
_talkManager.PARLER_PERSO("DUELB4.PE2");
_eventsManager.MOUSE_OFF();
_globals.DESACTIVE_INVENT = true;
_globals._disableInventFl = true;
do
_eventsManager.VBL();
@ -3324,8 +3324,8 @@ void HopkinsEngine::JOUE_FIN() {
Credits();
_globals.iRegul = 0;
_globals.SORTIE = 300;
_dialogsManager.VIRE_INVENT = false;
_globals.DESACTIVE_INVENT = false;
_dialogsManager._removeInventFl = false;
_globals._disableInventFl = false;
} else {
_soundManager.SPECIAL_SOUND = 200;
_soundManager.VBL_MERDE = true;
@ -3334,7 +3334,7 @@ void HopkinsEngine::JOUE_FIN() {
_objectsManager.BOBANIM_ON(8);
_globals.NOPARLE = true;
_talkManager.PARLER_PERSO("GM5.PE2");
_globals.DESACTIVE_INVENT = true;
_globals._disableInventFl = true;
do
_eventsManager.VBL();
@ -3352,8 +3352,8 @@ void HopkinsEngine::JOUE_FIN() {
_soundManager.WSOUND(16);
_globals.iRegul = 1;
_soundManager.SPECIAL_SOUND = 0;
_dialogsManager.VIRE_INVENT = false;
_globals.DESACTIVE_INVENT = false;
_dialogsManager._removeInventFl = false;
_globals._disableInventFl = false;
_animationManager.playAnim("JOUR4A.anm", 12, 12, 1000);
_globals.iRegul = 0;
_globals.SORTIE = 300;
@ -3445,7 +3445,7 @@ void HopkinsEngine::AVION() {
}
int HopkinsEngine::PWBASE() {
_globals.DESACTIVE_INVENT = true;
_globals._disableInventFl = true;
_graphicsManager.LOAD_IMAGE("PBASE");
_graphicsManager.SETCOLOR3(252, 100, 100, 100);
_graphicsManager.SETCOLOR3(253, 100, 100, 100);
@ -3496,7 +3496,7 @@ int HopkinsEngine::PWBASE() {
loopCond = true;
} while (!loopCond);
_globals.DESACTIVE_INVENT = false;
_globals._disableInventFl = false;
_graphicsManager.FADE_OUTW();
int result;
@ -3904,7 +3904,7 @@ void HopkinsEngine::OCEAN(int16 a1, Common::String a2, Common::String a3, int16
_globals.SORTIE = 0;
_globals.AFFLI = false;
_globals.AFFIVBL = true;
_globals.DESACTIVE_INVENT = true;
_globals._disableInventFl = true;
_soundManager.WSOUND(a9);
_fileManager.constructFilename(_globals.HOPSYSTEM, "VAISSEAU.SPR");
_globals.PERSO = _fileManager.loadFile(_globals.NFICHIER);
@ -4010,7 +4010,7 @@ bool HopkinsEngine::ADULT() {
_eventsManager.CASSE = false;
_globals.FORET = false;
_globals.FLAG_VISIBLE = false;
_globals.DESACTIVE_INVENT = true;
_globals._disableInventFl = true;
_globals.SORTIE = false;
_graphicsManager.LOAD_IMAGE("ADULT");
@ -4033,7 +4033,7 @@ bool HopkinsEngine::ADULT() {
_eventsManager.VBL();
} while (!shouldQuit() && (buttonIndex == 0 || _eventsManager.BMOUSE() != 1));
_globals.DESACTIVE_INVENT = false;
_globals._disableInventFl = false;
_globals.FLAG_VISIBLE = false;
_graphicsManager.FADE_OUTW();

View File

@ -59,7 +59,7 @@ int MenuManager::MENU() {
while (!g_system->getEventManager()->shouldQuit()) {
_vm->_globals.FORET = false;
_vm->_eventsManager.CASSE = false;
_vm->_globals.DESACTIVE_INVENT = true;
_vm->_globals._disableInventFl = true;
_vm->_globals.FLAG_VISIBLE = false;
_vm->_globals.SORTIE = 0;
@ -230,7 +230,7 @@ int MenuManager::MENU() {
}
_vm->_globals.LIBERE_FICHIER(spriteData);
_vm->_globals.DESACTIVE_INVENT = false;
_vm->_globals._disableInventFl = false;
_vm->_globals.FLAG_VISIBLE = false;
_vm->_graphicsManager.FADE_OUTW();
return result;

View File

@ -482,11 +482,11 @@ void ObjectsManager::AFF_SPRITES() {
_vm->_globals.NBTRI = 0;
if (_vm->_dialogsManager._inventDisplayedFl) {
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_dialogsManager.Winventaire, _vm->_dialogsManager._inventX, _vm->_dialogsManager._inventY, _vm->_dialogsManager._inventWidth, _vm->_dialogsManager._inventHeight);
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_dialogsManager._inventWin1, _vm->_dialogsManager._inventX, _vm->_dialogsManager._inventY, _vm->_dialogsManager._inventWidth, _vm->_dialogsManager._inventHeight);
if (old_cadx && old_cady)
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_dialogsManager.inventaire2, old_cadx + 300, old_cady + 300, old_cadi + 1);
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_dialogsManager._inventBuf2, old_cadx + 300, old_cady + 300, old_cadi + 1);
if (cadx && cady)
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_dialogsManager.inventaire2, cadx + 300, cady + 300, cadi);
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_dialogsManager._inventBuf2, cadx + 300, cady + 300, cadi);
_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_dialogsManager._inventX, _vm->_dialogsManager._inventY, _vm->_dialogsManager._inventX + _vm->_dialogsManager._inventWidth, _vm->_dialogsManager._inventY + _vm->_dialogsManager._inventHeight);
}
@ -499,7 +499,7 @@ void ObjectsManager::AFF_SPRITES() {
}
// If the Options dialog is activated, draw the elements
if (_vm->_globals.OPTION_FLAG) {
if (_vm->_globals._optionDialogFl) {
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
_vm->_eventsManager.start_x + 464, 407, 0);
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
@ -560,7 +560,7 @@ void ObjectsManager::AFF_SPRITES() {
}
}
_vm->_dialogsManager.INVENT_ANIM();
_vm->_dialogsManager.inventAnim();
}
void ObjectsManager::INIT_BOB() {
@ -2553,7 +2553,7 @@ void ObjectsManager::PLAN_BETA() {
int v5;
v1 = 0;
_vm->_dialogsManager.INVENTFLAG = false;
_vm->_dialogsManager._inventFl = false;
_vm->_eventsManager.GAME_KEY = KEY_NONE;
_vm->_globals.Max_Propre = 1;
_vm->_globals.Max_Ligne_Long = 1;
@ -2692,14 +2692,14 @@ void ObjectsManager::BTGAUCHE() {
destX = _vm->_eventsManager.XMOUSE();
destY = _vm->_eventsManager.YMOUSE();
if (!_vm->_dialogsManager.INVENTFLAG && !_vm->_globals.PLAN_FLAG && destX > _vm->_graphicsManager.ofscroll - 30 && destX < _vm->_graphicsManager.ofscroll + 50 && (uint16)(destY + 29) <= 0x4Eu) {
if (!_vm->_dialogsManager._inventFl && !_vm->_globals.PLAN_FLAG && destX > _vm->_graphicsManager.ofscroll - 30 && destX < _vm->_graphicsManager.ofscroll + 50 && (uint16)(destY + 29) <= 0x4Eu) {
v1 = _vm->_eventsManager.btsouris;
_vm->_dialogsManager.INVENTFLAG = true;
_vm->_dialogsManager._inventFl = true;
_vm->_dialogsManager.showInventory();
_vm->_dialogsManager.INVENTFLAG = false;
_vm->_dialogsManager._inventFl = false;
_vm->_eventsManager.GAME_KEY = KEY_NONE;
if (!_vm->_globals.SORTIE) {
_vm->_dialogsManager.INVENTFLAG = false;
_vm->_dialogsManager._inventFl = false;
_vm->_eventsManager.btsouris = v1;
}
return;
@ -4259,7 +4259,7 @@ void ObjectsManager::SPECIAL_JEU() {
&& YSPR(0) > 372
&& YSPR(0) <= 398;
if (_vm->_globals.ECRAN == 57) {
_vm->_globals.DESACTIVE_INVENT = true;
_vm->_globals._disableInventFl = true;
if (_vm->_globals.SAUVEGARDE->data[svField261] == 1 && BOBPOSI(5) == 37) {
BOBANIM_OFF(5);
SET_BOBPOSI(5, 0);
@ -4275,10 +4275,10 @@ void ObjectsManager::SPECIAL_JEU() {
ZONE_ON(14);
_vm->_globals.SAUVEGARDE->data[svField261] = 3;
}
_vm->_globals.DESACTIVE_INVENT = false;
_vm->_globals._disableInventFl = false;
}
if (_vm->_globals.ECRAN == 93 && !_vm->_globals.SAUVEGARDE->data[svField333]) {
_vm->_globals.DESACTIVE_INVENT = true;
_vm->_globals._disableInventFl = true;
do
_vm->_eventsManager.VBL();
while (BOBPOSI(8) != 3);
@ -4286,7 +4286,7 @@ void ObjectsManager::SPECIAL_JEU() {
_vm->_talkManager.PARLER_PERSO("GM3.PE2");
BOBANIM_OFF(8);
_vm->_globals.SAUVEGARDE->data[svField333] = 1;
_vm->_globals.DESACTIVE_INVENT = false;
_vm->_globals._disableInventFl = false;
}
}
@ -4896,15 +4896,15 @@ void ObjectsManager::SPECIAL_INI(const Common::String &a1) {
_vm->_globals.BPP_NOAFF = false;
_vm->_graphicsManager.FADE_INW();
_vm->_globals.iRegul = 1;
_vm->_globals.DESACTIVE_INVENT = false;
_vm->_globals._disableInventFl = false;
_vm->_graphicsManager.NOFADE = true;
_vm->_globals.NOPARLE = true;
_vm->_talkManager.PARLER_PERSO("MAGE1.pe2");
_vm->_graphicsManager.NOFADE = true;
_vm->_globals.DESACTIVE_INVENT = false;
_vm->_globals._disableInventFl = false;
}
if (_vm->_globals.ECRAN == 17 && _vm->_globals.OLD_ECRAN == 20) {
_vm->_globals.DESACTIVE_INVENT = true;
_vm->_globals._disableInventFl = true;
_vm->_graphicsManager.SETCOLOR3(252, 100, 100, 100);
_vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100);
_vm->_graphicsManager.SETCOLOR3(251, 100, 100, 100);
@ -4950,7 +4950,7 @@ void ObjectsManager::SPECIAL_INI(const Common::String &a1) {
++v7;
} while (v7 <= 3);
_vm->_graphicsManager.NOFADE = true;
_vm->_globals.DESACTIVE_INVENT = false;
_vm->_globals._disableInventFl = false;
}
}
@ -5431,24 +5431,24 @@ void ObjectsManager::TEST_FORET(int a1, int a2, int a3, int a4, int a5, int a6)
if (v7) {
if (v7 == 1) {
if (a6 == 1 && BOBPOSI(1) == 26) {
_vm->_dialogsManager.VIRE_INVENT = true;
_vm->_dialogsManager._removeInventFl = true;
_vm->_soundManager.PLAY_SAMPLE2(1);
_vm->_globals.SAUVEGARDE->data[v6] = 4;
}
if (a6 == 2 && BOBPOSI(2) == 26) {
_vm->_dialogsManager.VIRE_INVENT = true;
_vm->_dialogsManager._removeInventFl = true;
_vm->_soundManager.PLAY_SAMPLE2(1);
_vm->_globals.SAUVEGARDE->data[v6] = 4;
}
if (a6 == 3 && BOBPOSI(3) == 27) {
_vm->_dialogsManager.VIRE_INVENT = true;
_vm->_dialogsManager._removeInventFl = true;
_vm->_soundManager.PLAY_SAMPLE2(1);
_vm->_globals.SAUVEGARDE->data[v6] = 4;
}
if (a6 == 4 && BOBPOSI(4) == 27) {
_vm->_dialogsManager.VIRE_INVENT = true;
_vm->_dialogsManager._removeInventFl = true;
_vm->_soundManager.PLAY_SAMPLE2(1);
_vm->_dialogsManager.VIRE_INVENT = true;
_vm->_dialogsManager._removeInventFl = true;
_vm->_globals.SAUVEGARDE->data[v6] = 4;
}
}
@ -5504,9 +5504,9 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
int v9;
v5 = 0;
_vm->_dialogsManager.INVENTFLAG = false;
_vm->_dialogsManager._inventFl = false;
_vm->_eventsManager.GAME_KEY = KEY_NONE;
_vm->_dialogsManager.VIRE_INVENT = false;
_vm->_dialogsManager._removeInventFl = false;
_vm->_graphicsManager.ofscroll = 0;
_vm->_globals.PLAN_FLAG = false;
_vm->_globals.iRegul = 1;
@ -5604,12 +5604,12 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm
bool breakFlag;
int xp, yp;
_vm->_dialogsManager.INVENTFLAG = false;
_vm->_dialogsManager._inventFl = false;
_vm->_eventsManager.GAME_KEY = KEY_NONE;
verbe = 4;
_vm->_globals.MAX_COMPTE = 6;
_vm->_graphicsManager.ofscroll = 0;
_vm->_dialogsManager.VIRE_INVENT = false;
_vm->_dialogsManager._removeInventFl = false;
_vm->_globals.PLAN_FLAG = false;
_vm->_graphicsManager.NOFADE = false;
_vm->_globals.NOMARCHE = false;

View File

@ -691,7 +691,7 @@ LABEL_1141:
_vm->_talkManager.PARLER_PERSO("fjour.pe2");
if (v76 == 13) {
_vm->_eventsManager.souris_b = _vm->_eventsManager.souris_bb;
_vm->_globals.DESACTIVE_INVENT = true;
_vm->_globals._disableInventFl = true;
_vm->_graphicsManager.FADE_OUTW();
_vm->_globals.CACHE_OFF();
_vm->_objectsManager.SPRITE_OFF(0);
@ -766,7 +766,7 @@ LABEL_1141:
if ((_vm->getPlatform() == Common::kPlatformWindows) && _vm->getIsDemo())
_vm->_graphicsManager.FADE_OUTW();
_vm->_globals.DESACTIVE_INVENT = false;
_vm->_globals._disableInventFl = false;
_vm->_globals.HELICO = 1;
}
if (v76 == 36) {
@ -805,9 +805,9 @@ LABEL_1141:
_vm->_graphicsManager.NOFADE = true;
}
if (v76 == 29) {
_vm->_globals.DESACTIVE_INVENT = true;
_vm->_globals._disableInventFl = true;
_vm->_talkManager.OBJET_VIVANT("TELEP.pe2");
_vm->_globals.DESACTIVE_INVENT = false;
_vm->_globals._disableInventFl = false;
}
if (v76 == 22)
_vm->_talkManager.OBJET_VIVANT("CADAVRE1.pe2");
@ -1521,7 +1521,7 @@ LABEL_1141:
if (v76 == 207)
_vm->_talkManager.OBJET_VIVANT("PANNEAU.PE2");
if (v76 == 208) {
_vm->_globals.DESACTIVE_INVENT = true;
_vm->_globals._disableInventFl = true;
if (_vm->_globals.SAUVEGARDE->data[svField6] != _vm->_globals.SAUVEGARDE->data[svField401]) {
_vm->_soundManager.SPECIAL_SOUND = 208;
_vm->_eventsManager.NOESC = true;
@ -1545,7 +1545,7 @@ LABEL_1141:
} while (_vm->_globals.chemin != (int16 *)g_PTRNUL);
_vm->_objectsManager.SETANISPR(0, 64);
_vm->_globals.SORTIE = _vm->_globals.SAUVEGARDE->data[svField401];
_vm->_globals.DESACTIVE_INVENT = false;
_vm->_globals._disableInventFl = false;
}
if (v76 == 209) {
_vm->_objectsManager.SET_BOBPOSI(1, 0);

View File

@ -69,8 +69,8 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) {
_vm->_fontManager.TEXTE_OFF(9);
_vm->_eventsManager.VBL();
_vm->_graphicsManager.no_scroll = 1;
bool old_DESACTIVE_INVENT = _vm->_globals.DESACTIVE_INVENT;
_vm->_globals.DESACTIVE_INVENT = true;
bool oldDisableInventFl = _vm->_globals._disableInventFl;
_vm->_globals._disableInventFl = true;
BUFFERPERSO = _vm->_fileManager.searchCat(filename, 5);
TAILLEPERSO = _vm->_globals.CAT_TAILLE;
if (BUFFERPERSO == g_PTRNUL) {
@ -185,7 +185,7 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) {
v8 = v8 + 2;
*v8 = *(v9 + 2);
v10 = v8 + 1;
_vm->_globals.DESACTIVE_INVENT = old_DESACTIVE_INVENT;
_vm->_globals._disableInventFl = oldDisableInventFl;
_vm->_graphicsManager.DD_VBL();
v11 = 0;
do {
@ -198,8 +198,8 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) {
void TalkManager::PARLER_PERSO2(const Common::String &filename) {
_vm->_objectsManager.DESACTIVE_CURSOR = 1;
STATI = 1;
bool v7 = _vm->_globals.DESACTIVE_INVENT;
_vm->_globals.DESACTIVE_INVENT = 1;
bool v7 = _vm->_globals._disableInventFl;
_vm->_globals._disableInventFl = true;
BUFFERPERSO = _vm->_fileManager.searchCat(filename, 5);
TAILLEPERSO = _vm->_globals.CAT_TAILLE;
if (BUFFERPERSO == g_PTRNUL) {
@ -265,7 +265,7 @@ void TalkManager::PARLER_PERSO2(const Common::String &filename) {
_vm->_graphicsManager.INIT_TABLE(145, 150, _vm->_graphicsManager.Palette);
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
_vm->_objectsManager.DESACTIVE_CURSOR = 0;
_vm->_globals.DESACTIVE_INVENT = v7;
_vm->_globals._disableInventFl = v7;
STATI = 0;
}
@ -1353,7 +1353,7 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) {
v14 = v14 + 2;
*v14 = *(v15 + 2);
v16 = v14 + 1;
_vm->_globals.DESACTIVE_INVENT = false;
_vm->_globals._disableInventFl = false;
_vm->_graphicsManager.DD_VBL();
v17 = 0;
do {