aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2013-03-30 11:54:07 +0100
committerStrangerke2013-03-30 11:54:07 +0100
commit8b5fc0e2e543401ac308151784ae994df1c0dcef (patch)
tree0c5b8faf086658035fd19487cc26c24b412c4420
parent3648790efb6c7178ceb31cbde644f20a7cb0ff5d (diff)
downloadscummvm-rg350-8b5fc0e2e543401ac308151784ae994df1c0dcef.tar.gz
scummvm-rg350-8b5fc0e2e543401ac308151784ae994df1c0dcef.tar.bz2
scummvm-rg350-8b5fc0e2e543401ac308151784ae994df1c0dcef.zip
HOPKINS: More renaming in ObjectsManager
-rw-r--r--engines/hopkins/dialogs.cpp6
-rw-r--r--engines/hopkins/objects.cpp24
-rw-r--r--engines/hopkins/objects.h5
-rw-r--r--engines/hopkins/script.cpp4
-rw-r--r--engines/hopkins/talk.cpp10
5 files changed, 24 insertions, 25 deletions
diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp
index 712ee7b3e0..e5bc5a1e87 100644
--- a/engines/hopkins/dialogs.cpp
+++ b/engines/hopkins/dialogs.cpp
@@ -473,7 +473,7 @@ void DialogsManager::showInventory() {
_inventDisplayedFl = false;
_vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _inventX, 114, _inventWidth, _inventHeight, _vm->_graphicsManager->_vesaBuffer, _inventX, 114);
_vm->_graphicsManager->addDirtyRect(_inventX, 114, _inventX + _inventWidth, _inventWidth + 114);
- _vm->_objectsManager->BOBTOUS = true;
+ _vm->_objectsManager->_refreshBobMode10Fl = true;
}
_inventWin1 = _vm->_globals->freeMemory(_inventWin1);
@@ -596,7 +596,7 @@ void DialogsManager::showLoadGame() {
_vm->_objectsManager->_saveLoadFl = false;
_vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353, _vm->_graphicsManager->_vesaBuffer, _vm->_eventsManager->_startPos.x + 183, 60);
_vm->_graphicsManager->addDirtyRect(_vm->_eventsManager->_startPos.x + 183, 60, 457, 413);
- _vm->_objectsManager->BOBTOUS = true;
+ _vm->_objectsManager->_refreshBobMode10Fl = true;
_vm->_objectsManager->_saveLoadSprite = _vm->_globals->freeMemory(_vm->_objectsManager->_saveLoadSprite);
_vm->_objectsManager->_saveLoadSprite2 = _vm->_globals->freeMemory(_vm->_objectsManager->_saveLoadSprite2);
_vm->_objectsManager->_saveLoadX = 0;
@@ -625,7 +625,7 @@ void DialogsManager::showSaveGame() {
_vm->_objectsManager->_saveLoadFl = false;
_vm->_graphicsManager->copySurface(_vm->_graphicsManager->_vesaScreen, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353, _vm->_graphicsManager->_vesaBuffer, _vm->_eventsManager->_startPos.x + 183, 60);
_vm->_graphicsManager->addDirtyRect(_vm->_eventsManager->_startPos.x + 183, 60, _vm->_eventsManager->_startPos.x + 457, 413);
- _vm->_objectsManager->BOBTOUS = true;
+ _vm->_objectsManager->_refreshBobMode10Fl = true;
_vm->_objectsManager->_saveLoadSprite = _vm->_globals->freeMemory(_vm->_objectsManager->_saveLoadSprite);
_vm->_objectsManager->_saveLoadSprite2 = _vm->_globals->freeMemory(_vm->_objectsManager->_saveLoadSprite2);
_vm->_objectsManager->_saveLoadX = 0;
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index 428fbf1178..cdc6da18cf 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -113,8 +113,8 @@ ObjectsManager::ObjectsManager(HopkinsEngine *vm) {
_hidingActiveFl = false;
_curObjectFileNum = 0;
_objectDataBuf = g_PTRNUL;
- PERSO_ON = false;
- BOBTOUS = false;
+ _charactersEnabledFl = false;
+ _refreshBobMode10Fl = false;
}
ObjectsManager::~ObjectsManager() {
@@ -399,7 +399,7 @@ void ObjectsManager::displaySprite() {
}
}
- if (!PERSO_ON) {
+ if (!_charactersEnabledFl) {
for (int idx = 0; idx < MAX_SPRITE; ++idx) {
if (Liste[idx]._visibleFl) {
clipX = Liste[idx]._posX - 2;
@@ -421,7 +421,7 @@ void ObjectsManager::displaySprite() {
displayBobAnim();
displayVBob();
- if (!PERSO_ON) {
+ if (!_charactersEnabledFl) {
// Handle drawing characters on the screen
for (int idx = 0; idx < MAX_SPRITE; ++idx) {
Liste[idx]._visibleFl = false;
@@ -991,7 +991,7 @@ void ObjectsManager::beforeSort(SortMode sortMode, int index, int priority) {
// Display BOB Anim
void ObjectsManager::displayBobAnim() {
for (int idx = 1; idx <= 35; idx++) {
- if (idx <= 20 && PERSO_ON) {
+ if (idx <= 20 && _charactersEnabledFl) {
_bob[idx]._bobMode10 = false;
continue;
}
@@ -1024,7 +1024,7 @@ void ObjectsManager::displayBobAnim() {
_bob[idx]._xp = READ_LE_INT16(dataPtr + 2 * dataIdx);
if (_lockedAnims[idx]._enableFl)
_bob[idx]._xp = _lockedAnims[idx]._posX;
- if ( PERSO_ON && idx > 20 )
+ if ( _charactersEnabledFl && idx > 20 )
_bob[idx]._xp += _vm->_eventsManager->_startPos.x;
_bob[idx]._yp = READ_LE_INT16(dataPtr + 2 * dataIdx + 2);
@@ -1057,7 +1057,7 @@ void ObjectsManager::displayBobAnim() {
if (_lockedAnims[idx]._enableFl)
_bob[idx]._xp = _lockedAnims[idx]._posX;
- if (PERSO_ON && idx > 20)
+ if (_charactersEnabledFl && idx > 20)
_bob[idx]._xp += _vm->_eventsManager->_startPos.x;
_bob[idx]._yp = READ_LE_INT16(bobData + 2);
@@ -1081,17 +1081,17 @@ void ObjectsManager::displayBobAnim() {
_bob[idx]._bobMode10 = true;
}
- if (!PERSO_ON && BOBTOUS) {
+ if (!_charactersEnabledFl && _refreshBobMode10Fl) {
for (int i = 0; i < 35; i++) {
if (_bob[i]._bobMode == 10 && !_bob[i]._disabledAnimationFl)
_bob[i]._bobMode10 = true;
}
}
- BOBTOUS = false;
+ _refreshBobMode10Fl = false;
for (int i = 1; i <= 35; i++) {
- if (i > 20 || !PERSO_ON) {
+ if (i > 20 || !_charactersEnabledFl) {
if ((_bob[i]._bobMode == 10) && (_bob[i]._bobMode10)) {
if ((_bob[i]._bobModeChange != 2) && (_bob[i]._bobModeChange != 4)) {
if (Liste2[i]._visibleFl) {
@@ -2659,7 +2659,7 @@ void ObjectsManager::handleSpecialGames() {
_vm->_graphicsManager->_scrollOffset = 0;
_vm->_graphicsManager->NB_SCREEN(true);
_vm->_soundManager->_specialSoundNum = 198;
- PERSO_ON = true;
+ _charactersEnabledFl = true;
_vm->_animationManager->unsetClearAnimFlag();
_vm->_animationManager->playAnim("otage.ANM", 1, 24, 500, true);
_vm->_soundManager->_specialSoundNum = 0;
@@ -2668,7 +2668,7 @@ void ObjectsManager::handleSpecialGames() {
_vm->_saveLoadManager->load("TEMP1.SCR", _vm->_graphicsManager->_vesaScreen);
g_system->getSavefileManager()->removeSavefile("TEMP1.SCR");
- PERSO_ON = false;
+ _charactersEnabledFl = false;
memcpy(_vm->_graphicsManager->_palette, oldPalette, 769);
_vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette);
_vm->_globals->freeMemory(oldPalette);
diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h
index af42e03c1c..fd67de134d 100644
--- a/engines/hopkins/objects.h
+++ b/engines/hopkins/objects.h
@@ -241,9 +241,8 @@ public:
SpriteItem _sprite[6];
BobItem _bob[36];
LockAnimItem _lockedAnims[30];
-
- bool PERSO_ON;
- bool BOBTOUS;
+ bool _charactersEnabledFl;
+ bool _refreshBobMode10Fl;
ObjectsManager(HopkinsEngine *vm);
~ObjectsManager();
diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp
index a0744bc9ae..dcb77d5c2e 100644
--- a/engines/hopkins/script.cpp
+++ b/engines/hopkins/script.cpp
@@ -2313,12 +2313,12 @@ int ScriptManager::handleOpcode(byte *dataP) {
case 246:
_vm->_objectsManager->removeSprite(0);
_vm->_objectsManager->OPTI_ONE(6, 0, 15, 0);
- _vm->_objectsManager->PERSO_ON = true;
+ _vm->_objectsManager->_charactersEnabledFl = true;
_vm->_graphicsManager->NB_SCREEN(true);
_vm->_animationManager->playSequence2("TUNNEL.SEQ", 1, 18, 20, true);
_vm->_graphicsManager->_noFadingFl = true;
_vm->_graphicsManager->fadeOutLong();
- _vm->_objectsManager->PERSO_ON = false;
+ _vm->_objectsManager->_charactersEnabledFl = false;
_vm->_globals->_exitId = 100;
break;
diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp
index a9f2f678cf..191277aafa 100644
--- a/engines/hopkins/talk.cpp
+++ b/engines/hopkins/talk.cpp
@@ -91,7 +91,7 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename)
if (!_vm->_graphicsManager->_lineNbr)
_vm->_graphicsManager->_scrollOffset = 0;
_vm->_graphicsManager->NB_SCREEN(true);
- _vm->_objectsManager->PERSO_ON = true;
+ _vm->_objectsManager->_charactersEnabledFl = true;
searchCharacterPalette(_paletteBufferIdx, false);
startCharacterAnim0(_paletteBufferIdx, false);
initCharacterAnim();
@@ -129,7 +129,7 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename)
_vm->_saveLoadManager->load("TEMP.SCR", _vm->_graphicsManager->_vesaScreen);
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
- _vm->_objectsManager->PERSO_ON = false;
+ _vm->_objectsManager->_charactersEnabledFl = false;
_vm->_eventsManager->_mouseCursorId = oldMouseCursorId;
_vm->_eventsManager->changeMouseCursor(oldMouseCursorId);
@@ -1007,14 +1007,14 @@ void TalkManager::animateObject(const Common::String &filename) {
_vm->_graphicsManager->NB_SCREEN(true);
_paletteBufferIdx = 20 * READ_LE_INT16((uint16 *)_characterBuffer + 42) + 110;
_vm->_graphicsManager->NB_SCREEN(true);
- _vm->_objectsManager->PERSO_ON = true;
+ _vm->_objectsManager->_charactersEnabledFl = true;
searchCharacterPalette(_paletteBufferIdx, true);
startCharacterAnim0(_paletteBufferIdx, false);
byte *oldAnswerBufferPtr = _vm->_globals->_answerBuffer;
_vm->_globals->_answerBuffer = g_PTRNUL;
_vm->_globals->_freezeCharacterFl = true;
_vm->_objectsManager->loadLinkFile(screenFilename);
- _vm->_objectsManager->PERSO_ON = true;
+ _vm->_objectsManager->_charactersEnabledFl = true;
_vm->_globals->_actionMoveTo = false;
_vm->_objectsManager->_zoneNum = -1;
initCharacterAnim();
@@ -1063,7 +1063,7 @@ void TalkManager::animateObject(const Common::String &filename) {
_vm->_saveLoadManager->load("TEMP.SCR", _vm->_graphicsManager->_vesaScreen);
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
- _vm->_objectsManager->PERSO_ON = false;
+ _vm->_objectsManager->_charactersEnabledFl = false;
_vm->_eventsManager->_mouseCursorId = 4;
_vm->_eventsManager->changeMouseCursor(4);
_vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100);