mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 12:48:16 +00:00
HOPKINS: Misc renaming
This commit is contained in:
parent
9aa7e136f8
commit
f9f6133851
@ -468,8 +468,8 @@ void AnimationManager::loadAnim(const Common::String &animName) {
|
||||
*/
|
||||
void AnimationManager::clearAnim() {
|
||||
for (int idx = 0; idx < 35; ++idx) {
|
||||
_vm->_globals.Bqe_Anim[idx]._data = _vm->_globals.freeMemory(_vm->_globals.Bqe_Anim[idx]._data);
|
||||
_vm->_globals.Bqe_Anim[idx]._enabledFl = false;
|
||||
_vm->_globals._animBqe[idx]._data = _vm->_globals.freeMemory(_vm->_globals._animBqe[idx]._data);
|
||||
_vm->_globals._animBqe[idx]._enabledFl = false;
|
||||
}
|
||||
|
||||
for (int idx = 0; idx < 8; ++idx) {
|
||||
@ -564,18 +564,18 @@ void AnimationManager::searchAnim(const byte *data, int animIndex, int bufSize)
|
||||
if (READ_BE_UINT32(&data[curBufferPos]) == MKTAG('A', 'N', 'I', 'M') || READ_BE_UINT24(&data[curBufferPos]) == MKTAG24('F', 'I', 'N'))
|
||||
innerLoopCond = true;
|
||||
if (bufSize < curBufferPos) {
|
||||
_vm->_globals.Bqe_Anim[animIndex]._enabledFl = false;
|
||||
_vm->_globals.Bqe_Anim[animIndex]._data = g_PTRNUL;
|
||||
_vm->_globals._animBqe[animIndex]._enabledFl = false;
|
||||
_vm->_globals._animBqe[animIndex]._data = g_PTRNUL;
|
||||
return;
|
||||
}
|
||||
++curBufferPos;
|
||||
++count;
|
||||
} while (!innerLoopCond);
|
||||
_vm->_globals.Bqe_Anim[animIndex]._data = _vm->_globals.allocMemory(count + 50);
|
||||
_vm->_globals.Bqe_Anim[animIndex]._enabledFl = true;
|
||||
memcpy(_vm->_globals.Bqe_Anim[animIndex]._data, data + dataIdx + 5, 20);
|
||||
_vm->_globals._animBqe[animIndex]._data = _vm->_globals.allocMemory(count + 50);
|
||||
_vm->_globals._animBqe[animIndex]._enabledFl = true;
|
||||
memcpy(_vm->_globals._animBqe[animIndex]._data, data + dataIdx + 5, 20);
|
||||
|
||||
byte *dataP = _vm->_globals.Bqe_Anim[animIndex]._data;
|
||||
byte *dataP = _vm->_globals._animBqe[animIndex]._data;
|
||||
int curDestDataIndx = 20;
|
||||
int curSrcDataIndx = dataIdx + 25;
|
||||
|
||||
|
@ -412,12 +412,12 @@ void DialogsManager::showInventory() {
|
||||
if (_vm->_eventsManager._mouseCursorId == 8)
|
||||
break;
|
||||
|
||||
_vm->_scriptManager.TRAVAILOBJET = true;
|
||||
_vm->_scriptManager._tempObjectFl = true;
|
||||
_vm->_globals._saveData->_data[svField3] = _vm->_objectsManager._curObjectIndex;
|
||||
_vm->_globals._saveData->_data[svField8] = _vm->_globals._inventory[newInventoryItem];
|
||||
_vm->_globals._saveData->_data[svField9] = _vm->_eventsManager._mouseCursorId;
|
||||
_vm->_objectsManager.OPTI_OBJET();
|
||||
_vm->_scriptManager.TRAVAILOBJET = false;
|
||||
_vm->_scriptManager._tempObjectFl = false;
|
||||
|
||||
if (_vm->_soundManager._voiceOffFl) {
|
||||
do
|
||||
|
@ -71,7 +71,7 @@ Globals::Globals() {
|
||||
for (int i = 0; i < 6; ++i)
|
||||
CACHE_BANQUE[i] = g_PTRNUL;
|
||||
for (int i = 0; i < 35; ++i)
|
||||
Common::fill((byte *)&Bqe_Anim[i], (byte *)&Bqe_Anim[i] + sizeof(BqeAnimItem), 0);
|
||||
Common::fill((byte *)&_animBqe[i], (byte *)&_animBqe[i] + sizeof(BqeAnimItem), 0);
|
||||
for (int i = 0; i < 8; ++i)
|
||||
Common::fill((byte *)&Bank[i], (byte *)&Bank[i] + sizeof(BankItem), 0);
|
||||
for (int i = 0; i < 6; ++i)
|
||||
@ -285,8 +285,8 @@ void Globals::loadCharacterData() {
|
||||
|
||||
void Globals::INIT_ANIM() {
|
||||
for (int idx = 0; idx < 35; ++idx) {
|
||||
Bqe_Anim[idx]._data = g_PTRNUL;
|
||||
Bqe_Anim[idx]._enabledFl = false;
|
||||
_animBqe[idx]._data = g_PTRNUL;
|
||||
_animBqe[idx]._enabledFl = false;
|
||||
}
|
||||
|
||||
for (int idx = 0; idx < 8; ++idx) {
|
||||
|
@ -308,7 +308,7 @@ public:
|
||||
bool NOMARCHE;
|
||||
int iRegul;
|
||||
byte *BUF_ZONE;
|
||||
BqeAnimItem Bqe_Anim[35];
|
||||
BqeAnimItem _animBqe[35];
|
||||
byte *SPRITE_ECRAN;
|
||||
byte *PERSO;
|
||||
bool NOT_VERIF;
|
||||
|
@ -1043,17 +1043,17 @@ void GraphicsManager::Sprite_Vesa(byte *surface, const byte *spriteData, int xp,
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsManager::FIN_VISU() {
|
||||
void GraphicsManager::endDisplayBob() {
|
||||
for (int idx = 1; idx <= 20; ++idx) {
|
||||
if (_vm->_globals.Bqe_Anim[idx]._enabledFl)
|
||||
_vm->_objectsManager.BOB_OFF(idx);
|
||||
if (_vm->_globals._animBqe[idx]._enabledFl)
|
||||
_vm->_objectsManager.hideBob(idx);
|
||||
}
|
||||
|
||||
_vm->_eventsManager.VBL();
|
||||
_vm->_eventsManager.VBL();
|
||||
|
||||
for (int idx = 1; idx <= 20; ++idx) {
|
||||
if (_vm->_globals.Bqe_Anim[idx]._enabledFl)
|
||||
if (_vm->_globals._animBqe[idx]._enabledFl)
|
||||
_vm->_objectsManager.resetBob(idx);
|
||||
}
|
||||
|
||||
@ -1062,14 +1062,14 @@ void GraphicsManager::FIN_VISU() {
|
||||
}
|
||||
|
||||
for (int idx = 1; idx <= 20; ++idx) {
|
||||
_vm->_globals.Bqe_Anim[idx]._enabledFl = false;
|
||||
_vm->_globals._animBqe[idx]._enabledFl = false;
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsManager::VISU_ALL() {
|
||||
void GraphicsManager::displayAllBob() {
|
||||
for (int idx = 1; idx <= 20; ++idx) {
|
||||
if (_vm->_globals.Bqe_Anim[idx]._enabledFl)
|
||||
_vm->_objectsManager.BOB_VISU(idx);
|
||||
if (_vm->_globals._animBqe[idx]._enabledFl)
|
||||
_vm->_objectsManager.displayBob(idx);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,6 +123,8 @@ public:
|
||||
void unlockScreen();
|
||||
void clearPalette();
|
||||
void clearScreen();
|
||||
void addVesaSegment(int x1, int y1, int x2, int y2);
|
||||
void copySurface(const byte *surface, int x1, int y1, int width, int height, byte *destSurface, int destX, int destY);
|
||||
void loadImage(const Common::String &file);
|
||||
void loadVgaImage(const Common::String &file);
|
||||
void fadeInLong();
|
||||
@ -146,10 +148,10 @@ public:
|
||||
int zoomIn(int v, int percentage);
|
||||
int zoomOut(int v, int percentage);
|
||||
void initScreen(const Common::String &file, int mode, bool initializeScreen);
|
||||
void displayAllBob();
|
||||
void endDisplayBob();
|
||||
|
||||
void Restore_Mem(byte *destSurface, const byte *src, int xp, int yp, int width, int height);
|
||||
void addVesaSegment(int x1, int y1, int x2, int y2);
|
||||
void copySurface(const byte *surface, int x1, int y1, int width, int height, byte *destSurface, int destX, int destY);
|
||||
void SETCOLOR3(int palIndex, int r, int g, int b);
|
||||
void SETCOLOR4(int palIndex, int r, int g, int b);
|
||||
void AFFICHE_SPEEDVGA(const byte *objectData, int xp, int yp, int idx, bool addSegment = true);
|
||||
@ -163,8 +165,6 @@ public:
|
||||
void m_scroll16(const byte *surface, int xs, int ys, int width, int height, int destX, int destY);
|
||||
void m_scroll16A(const byte *surface, int xs, int ys, int width, int height, int destX, int destY);
|
||||
void Trans_bloc2(byte *surface, byte *col, int size);
|
||||
void VISU_ALL();
|
||||
void FIN_VISU();
|
||||
void NB_SCREEN(bool initPalette);
|
||||
void Reduc_Ecran(const byte *srcSruface, byte *destSurface, int xp, int yp, int width, int height, int zoom);
|
||||
void Copy_WinScan_Vbe3(const byte *srcData, byte *destSurface);
|
||||
|
@ -1670,7 +1670,7 @@ void HopkinsEngine::playIntro() {
|
||||
_graphicsManager.loadImage("intro2");
|
||||
_graphicsManager.scrollScreen(0);
|
||||
_animationManager.loadAnim("INTRO2");
|
||||
_graphicsManager.VISU_ALL();
|
||||
_graphicsManager.displayAllBob();
|
||||
_soundManager.playSound(23);
|
||||
_objectsManager.stopBobAnimation(3);
|
||||
_objectsManager.stopBobAnimation(5);
|
||||
@ -1695,7 +1695,7 @@ void HopkinsEngine::playIntro() {
|
||||
memcpy(&paletteData2, _graphicsManager._palette, 796);
|
||||
|
||||
_graphicsManager.setPaletteVGA256WithRefresh(paletteData, _graphicsManager._vesaBuffer);
|
||||
_graphicsManager.FIN_VISU();
|
||||
_graphicsManager.endDisplayBob();
|
||||
|
||||
if (shouldQuit() || _eventsManager._escKeyFl)
|
||||
return;
|
||||
@ -1711,7 +1711,7 @@ void HopkinsEngine::playIntro() {
|
||||
_graphicsManager.loadImage("intro2");
|
||||
_graphicsManager.scrollScreen(0);
|
||||
_animationManager.loadAnim("INTRO2");
|
||||
_graphicsManager.VISU_ALL();
|
||||
_graphicsManager.displayAllBob();
|
||||
_soundManager.playSound(23);
|
||||
_objectsManager.stopBobAnimation(3);
|
||||
_objectsManager.stopBobAnimation(5);
|
||||
@ -1785,7 +1785,7 @@ void HopkinsEngine::playIntro() {
|
||||
}
|
||||
|
||||
_graphicsManager.fadeOutLong();
|
||||
_graphicsManager.FIN_VISU();
|
||||
_graphicsManager.endDisplayBob();
|
||||
_animationManager._clearAnimationFl = true;
|
||||
_soundManager.playSound(3);
|
||||
_soundManager._specialSoundNum = 1;
|
||||
@ -1869,7 +1869,7 @@ void HopkinsEngine::bombExplosion() {
|
||||
_soundManager._specialSoundNum = 0;
|
||||
_graphicsManager.loadImage("IM15");
|
||||
_animationManager.loadAnim("ANIM15");
|
||||
_graphicsManager.VISU_ALL();
|
||||
_graphicsManager.displayAllBob();
|
||||
_objectsManager.stopBobAnimation(7);
|
||||
|
||||
for (int idx = 0; idx < 5; ++idx) {
|
||||
@ -1893,7 +1893,7 @@ void HopkinsEngine::bombExplosion() {
|
||||
}
|
||||
|
||||
_graphicsManager.fadeOutLong();
|
||||
_graphicsManager.FIN_VISU();
|
||||
_graphicsManager.endDisplayBob();
|
||||
_globals.iRegul = 0;
|
||||
_globals._exitId = 151;
|
||||
}
|
||||
@ -1941,7 +1941,7 @@ void HopkinsEngine::handleConflagration() {
|
||||
_graphicsManager.SETCOLOR3(253, 100, 100, 100);
|
||||
_graphicsManager.SETCOLOR3(251, 100, 100, 100);
|
||||
_graphicsManager.SETCOLOR3(254, 0, 0, 0);
|
||||
_graphicsManager.VISU_ALL();
|
||||
_graphicsManager.displayAllBob();
|
||||
|
||||
for (int cpt = 0; cpt <= 4; cpt++)
|
||||
_eventsManager.VBL();
|
||||
@ -1960,7 +1960,7 @@ void HopkinsEngine::handleConflagration() {
|
||||
_eventsManager.VBL();
|
||||
|
||||
_graphicsManager.fadeOutLong();
|
||||
_graphicsManager.FIN_VISU();
|
||||
_graphicsManager.endDisplayBob();
|
||||
_globals._saveData->_data[svField312] = 1;
|
||||
_globals._disableInventFl = false;
|
||||
}
|
||||
@ -2021,7 +2021,7 @@ void HopkinsEngine::BASED() {
|
||||
_animationManager.NO_COUL = false;
|
||||
_graphicsManager.loadImage("IM92");
|
||||
_animationManager.loadAnim("ANIM92");
|
||||
_graphicsManager.VISU_ALL();
|
||||
_graphicsManager.displayAllBob();
|
||||
_objectsManager.loadLinkFile("IM92");
|
||||
|
||||
for (int cpt = 0; cpt <= 4; cpt++)
|
||||
@ -2035,7 +2035,7 @@ void HopkinsEngine::BASED() {
|
||||
while (_objectsManager.getBobAnimDataIdx(8) != 22);
|
||||
|
||||
_graphicsManager.fadeOutLong();
|
||||
_graphicsManager.FIN_VISU();
|
||||
_graphicsManager.endDisplayBob();
|
||||
_globals.resetCache();
|
||||
_globals._disableInventFl = false;
|
||||
_globals._exitId = 93;
|
||||
@ -2056,7 +2056,7 @@ void HopkinsEngine::playEnding() {
|
||||
_soundManager.loadSample(1, "SOUND90.WAV");
|
||||
_graphicsManager.loadImage("IM100");
|
||||
_animationManager.loadAnim("ANIM100");
|
||||
_graphicsManager.VISU_ALL();
|
||||
_graphicsManager.displayAllBob();
|
||||
_eventsManager.mouseOn();
|
||||
_objectsManager.stopBobAnimation(7);
|
||||
_objectsManager.stopBobAnimation(8);
|
||||
@ -2124,7 +2124,7 @@ void HopkinsEngine::playEnding() {
|
||||
_soundManager._skipRefreshFl = true;
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
_animationManager.playAnim("BERM.ANM", 100, 24, 300);
|
||||
_graphicsManager.FIN_VISU();
|
||||
_graphicsManager.endDisplayBob();
|
||||
_soundManager.removeSample(1);
|
||||
_graphicsManager.loadImage("PLAN3");
|
||||
_graphicsManager.fadeInLong();
|
||||
@ -2177,7 +2177,7 @@ void HopkinsEngine::playEnding() {
|
||||
while (_objectsManager.getBobAnimDataIdx(8) != 21);
|
||||
|
||||
_graphicsManager.fadeOutLong();
|
||||
_graphicsManager.FIN_VISU();
|
||||
_graphicsManager.endDisplayBob();
|
||||
_soundManager.removeSample(1);
|
||||
_soundManager.playSound(16);
|
||||
_globals.iRegul = 1;
|
||||
|
@ -573,7 +573,7 @@ void ObjectsManager::setBobInfo(int idx) {
|
||||
_vm->_globals.Liste2[idx]._posY + _vm->_globals.Liste2[idx]._height);
|
||||
}
|
||||
|
||||
void ObjectsManager::BOB_VISU(int idx) {
|
||||
void ObjectsManager::displayBob(int idx) {
|
||||
_priorityFl = true;
|
||||
|
||||
if (_bob[idx].field0)
|
||||
@ -581,7 +581,7 @@ void ObjectsManager::BOB_VISU(int idx) {
|
||||
|
||||
resetBob(idx);
|
||||
|
||||
const byte *data = _vm->_globals.Bqe_Anim[idx]._data;
|
||||
const byte *data = _vm->_globals._animBqe[idx]._data;
|
||||
int bankIdx = READ_LE_INT16(data);
|
||||
if (!bankIdx)
|
||||
return;
|
||||
@ -607,7 +607,7 @@ void ObjectsManager::BOB_VISU(int idx) {
|
||||
_bob[idx]._flipFl = false;
|
||||
}
|
||||
|
||||
_bob[idx]._animData = _vm->_globals.Bqe_Anim[idx]._data;
|
||||
_bob[idx]._animData = _vm->_globals._animBqe[idx]._data;
|
||||
_bob[idx].field0 = 10;
|
||||
_bob[idx]._spriteData = _vm->_globals.Bank[bankIdx]._data;
|
||||
|
||||
@ -617,7 +617,7 @@ void ObjectsManager::BOB_VISU(int idx) {
|
||||
_bob[idx]._offsetY = offsetY;
|
||||
}
|
||||
|
||||
void ObjectsManager::BOB_OFF(int idx) {
|
||||
void ObjectsManager::hideBob(int idx) {
|
||||
if ((_bob[idx].field0 == 3) || (_bob[idx].field0 == 10))
|
||||
_bob[idx].field0++;
|
||||
}
|
||||
@ -1753,7 +1753,7 @@ void ObjectsManager::handleCityMap() {
|
||||
loadZone("PLAN.ZO2");
|
||||
_spritePtr = _vm->_fileManager.loadFile("VOITURE.SPR");
|
||||
_vm->_animationManager.loadAnim("PLAN");
|
||||
_vm->_graphicsManager.VISU_ALL();
|
||||
_vm->_graphicsManager.displayAllBob();
|
||||
_vm->_graphicsManager.initScreen("PLAN", 2, false);
|
||||
for (int i = 0; i <= 15; i++)
|
||||
_vm->_globals.B_CACHE_OFF(i);
|
||||
@ -2063,7 +2063,7 @@ void ObjectsManager::PARADISE() {
|
||||
*/
|
||||
void ObjectsManager::clearScreen() {
|
||||
clearSprite();
|
||||
_vm->_graphicsManager.FIN_VISU();
|
||||
_vm->_graphicsManager.endDisplayBob();
|
||||
_vm->_fontManager.hideText(5);
|
||||
_vm->_fontManager.hideText(9);
|
||||
_vm->_globals.CLEAR_VBOB();
|
||||
@ -2098,7 +2098,9 @@ void ObjectsManager::clearScreen() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Change character Face / Head
|
||||
* Change the currently active player face / Head
|
||||
* @param oldCharacter Previously played character
|
||||
* @param newCharacter New character to play
|
||||
*/
|
||||
void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCharacter newCharacter) {
|
||||
CharacterLocation *loc;
|
||||
@ -3654,10 +3656,10 @@ void ObjectsManager::handleForest(int screenId, int minX, int maxX, int minY, in
|
||||
_vm->_animationManager.playAnim("CREVE2.ANM", 100, 24, 500);
|
||||
_vm->_globals._exitId = 150;
|
||||
_vm->_graphicsManager._noFadingFl = true;
|
||||
BOB_OFF(1);
|
||||
BOB_OFF(2);
|
||||
BOB_OFF(3);
|
||||
BOB_OFF(4);
|
||||
hideBob(1);
|
||||
hideBob(2);
|
||||
hideBob(3);
|
||||
hideBob(4);
|
||||
}
|
||||
} else if (minX < getSpriteX(0)
|
||||
&& maxX > getSpriteX(0)
|
||||
@ -3695,7 +3697,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
|
||||
loadLinkFile(linkFile);
|
||||
if (!animFile.empty())
|
||||
_vm->_animationManager.loadAnim(animFile);
|
||||
_vm->_graphicsManager.VISU_ALL();
|
||||
_vm->_graphicsManager.displayAllBob();
|
||||
if (!s4.empty()) {
|
||||
if (initializeScreen)
|
||||
_vm->_graphicsManager.initScreen(s4, 0, initializeScreen);
|
||||
@ -3755,7 +3757,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
|
||||
|
||||
_vm->_graphicsManager.fadeOutLong();
|
||||
if (!animFile.empty())
|
||||
_vm->_graphicsManager.FIN_VISU();
|
||||
_vm->_graphicsManager.endDisplayBob();
|
||||
if (_vm->_globals._screenId == 61)
|
||||
removeSprite(0);
|
||||
clearScreen();
|
||||
@ -3785,7 +3787,7 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm
|
||||
loadLinkFile(linkFile);
|
||||
if (!animFile.empty()) {
|
||||
_vm->_animationManager.loadAnim(animFile);
|
||||
_vm->_graphicsManager.VISU_ALL();
|
||||
_vm->_graphicsManager.displayAllBob();
|
||||
}
|
||||
if (!s4.empty()) {
|
||||
if (initializeScreen)
|
||||
@ -3903,7 +3905,7 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm
|
||||
_twoCharactersFl = false;
|
||||
}
|
||||
if (!animFile.empty())
|
||||
_vm->_graphicsManager.FIN_VISU();
|
||||
_vm->_graphicsManager.endDisplayBob();
|
||||
clearScreen();
|
||||
} else {
|
||||
_helicopterFl = false;
|
||||
|
@ -122,12 +122,6 @@ private:
|
||||
|
||||
void GOHOME2();
|
||||
void loadZone(const Common::String &file);
|
||||
|
||||
/**
|
||||
* Change the currently active player
|
||||
* @param oldCharacter Previously played character
|
||||
* @param newCharacter New character to play
|
||||
*/
|
||||
void changeCharacterHead(PlayerCharacter oldCharacter, PlayerCharacter newCharacter);
|
||||
|
||||
void nextVerbIcon();
|
||||
@ -233,8 +227,8 @@ public:
|
||||
const Common::String &animFile, const Common::String &s4, int soundNum, bool initializeScreen);
|
||||
byte *CAPTURE_OBJET(int objIndex, bool mode);
|
||||
void OPTI_OBJET();
|
||||
void BOB_OFF(int idx);
|
||||
void BOB_VISU(int idx);
|
||||
void hideBob(int idx);
|
||||
void displayBob(int idx);
|
||||
void SPACTION(byte *spriteData, const Common::String &animationSeq, int a3, int a4, int speed, bool flipFl);
|
||||
void BOB_VIVANT(int idx);
|
||||
void VBOB(byte *src, int idx, int xp, int yp, int frameIndex);
|
||||
|
@ -36,7 +36,7 @@
|
||||
namespace Hopkins {
|
||||
|
||||
ScriptManager::ScriptManager() {
|
||||
TRAVAILOBJET = false;
|
||||
_tempObjectFl = false;
|
||||
}
|
||||
|
||||
void ScriptManager::setParent(HopkinsEngine *vm) {
|
||||
@ -56,7 +56,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
vbobFrameIndex = dataP[6];
|
||||
int mesgId = READ_LE_INT16(dataP + 13);
|
||||
opcodeType = 1;
|
||||
if (!TRAVAILOBJET) {
|
||||
if (!_tempObjectFl) {
|
||||
if (_vm->_globals._saveData->_data[svField356] == 1) {
|
||||
if (mesgId == 53)
|
||||
mesgId = 644;
|
||||
@ -543,7 +543,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
_vm->_objectsManager.removeSprite(0);
|
||||
_vm->_fontManager.hideText(5);
|
||||
_vm->_fontManager.hideText(9);
|
||||
_vm->_graphicsManager.FIN_VISU();
|
||||
_vm->_graphicsManager.endDisplayBob();
|
||||
_vm->_objectsManager.clearScreen();
|
||||
|
||||
if ((_vm->getPlatform() == Common::kPlatformWindows) && _vm->getIsDemo()) {
|
||||
@ -556,7 +556,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
|
||||
_vm->_animationManager.loadAnim("otage");
|
||||
_vm->_graphicsManager.loadImage("IM05");
|
||||
_vm->_graphicsManager.VISU_ALL();
|
||||
_vm->_graphicsManager.displayAllBob();
|
||||
|
||||
for (int i = 0; i <= 4; i++) {
|
||||
if (_vm->shouldQuit())
|
||||
@ -574,7 +574,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
_vm->_eventsManager.VBL();
|
||||
} while (_vm->_objectsManager.getBobAnimDataIdx(3) != 100);
|
||||
_vm->_graphicsManager.fadeOutDefaultLength(_vm->_graphicsManager._vesaBuffer);
|
||||
_vm->_graphicsManager.FIN_VISU();
|
||||
_vm->_graphicsManager.endDisplayBob();
|
||||
|
||||
// If uncensored, rip the throat of the hostage
|
||||
if (!_vm->_globals._censorshipFl) {
|
||||
@ -586,7 +586,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
_vm->_animationManager.loadAnim("ASCEN");
|
||||
_vm->_eventsManager.mouseOff();
|
||||
_vm->_graphicsManager.loadImage("ASCEN");
|
||||
_vm->_graphicsManager.VISU_ALL();
|
||||
_vm->_graphicsManager.displayAllBob();
|
||||
|
||||
for (int i = 0; i <= 4; i++) {
|
||||
if (_vm->shouldQuit())
|
||||
@ -599,7 +599,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
_vm->_graphicsManager.fadeInDefaultLength(_vm->_graphicsManager._vesaBuffer);
|
||||
_vm->_objectsManager.SCI_OPTI_ONE(1, 0, 17, 3);
|
||||
_vm->_graphicsManager.fadeOutDefaultLength(_vm->_graphicsManager._vesaBuffer);
|
||||
_vm->_graphicsManager.FIN_VISU();
|
||||
_vm->_graphicsManager.endDisplayBob();
|
||||
|
||||
if ((_vm->getPlatform() == Common::kPlatformWindows) && _vm->getIsDemo())
|
||||
_vm->_soundManager.playSoundFile("SOUND17.WAV");
|
||||
@ -876,10 +876,10 @@ int ScriptManager::handleOpcode(byte *dataP) {
|
||||
_vm->_objectsManager.removeSprite(0);
|
||||
_vm->_fontManager.hideText(5);
|
||||
_vm->_fontManager.hideText(9);
|
||||
_vm->_graphicsManager.FIN_VISU();
|
||||
_vm->_graphicsManager.endDisplayBob();
|
||||
_vm->_graphicsManager.loadImage("IM20f");
|
||||
_vm->_animationManager.loadAnim("ANIM20f");
|
||||
_vm->_graphicsManager.VISU_ALL();
|
||||
_vm->_graphicsManager.displayAllBob();
|
||||
_vm->_eventsManager.mouseOff();
|
||||
_vm->_graphicsManager.fadeInLong();
|
||||
bool v52 = false;
|
||||
|
@ -36,7 +36,7 @@ private:
|
||||
HopkinsEngine *_vm;
|
||||
int checkOpcode(const byte *dataP);
|
||||
public:
|
||||
bool TRAVAILOBJET;
|
||||
bool _tempObjectFl;
|
||||
|
||||
ScriptManager();
|
||||
void setParent(HopkinsEngine *vm);
|
||||
|
@ -473,34 +473,34 @@ void TalkManager::searchCharacterPalette(int startIdx, bool dark) {
|
||||
|
||||
void TalkManager::dialogWait() {
|
||||
for (int idx = 26; idx <= 30; ++idx) {
|
||||
if (_vm->_globals.Bqe_Anim[idx]._enabledFl)
|
||||
if (_vm->_globals._animBqe[idx]._enabledFl)
|
||||
BOB_VISU_PARLE(idx);
|
||||
}
|
||||
}
|
||||
|
||||
void TalkManager::dialogTalk() {
|
||||
for (int idx = 26; idx <= 30; ++idx) {
|
||||
if (_vm->_globals.Bqe_Anim[idx]._enabledFl)
|
||||
_vm->_objectsManager.BOB_OFF(idx);
|
||||
if (_vm->_globals._animBqe[idx]._enabledFl)
|
||||
_vm->_objectsManager.hideBob(idx);
|
||||
}
|
||||
|
||||
for (int idx = 26; idx <= 30; ++idx) {
|
||||
if (_vm->_globals.Bqe_Anim[idx]._enabledFl)
|
||||
if (_vm->_globals._animBqe[idx]._enabledFl)
|
||||
_vm->_objectsManager.resetBob(idx);
|
||||
}
|
||||
}
|
||||
|
||||
void TalkManager::dialogEndTalk() {
|
||||
for (int idx = 21; idx <= 25; ++idx) {
|
||||
if (_vm->_globals.Bqe_Anim[idx]._enabledFl)
|
||||
_vm->_objectsManager.BOB_OFF(idx);
|
||||
if (_vm->_globals._animBqe[idx]._enabledFl)
|
||||
_vm->_objectsManager.hideBob(idx);
|
||||
}
|
||||
|
||||
_vm->_eventsManager.VBL();
|
||||
_vm->_eventsManager.VBL();
|
||||
|
||||
for (int idx = 21; idx <= 25; ++idx) {
|
||||
if (_vm->_globals.Bqe_Anim[idx]._enabledFl)
|
||||
if (_vm->_globals._animBqe[idx]._enabledFl)
|
||||
_vm->_objectsManager.resetBob(idx);
|
||||
}
|
||||
}
|
||||
@ -595,7 +595,7 @@ int TalkManager::countBoxLines(int idx, const Common::String &file) {
|
||||
|
||||
void TalkManager::VISU_PARLE() {
|
||||
for (int idx = 21; idx <= 25; ++idx) {
|
||||
if (_vm->_globals.Bqe_Anim[idx]._enabledFl)
|
||||
if (_vm->_globals._animBqe[idx]._enabledFl)
|
||||
BOB_VISU_PARLE(idx);
|
||||
}
|
||||
}
|
||||
@ -604,7 +604,7 @@ void TalkManager::BOB_VISU_PARLE(int idx) {
|
||||
_vm->_objectsManager._priorityFl = true;
|
||||
if (!_vm->_objectsManager._bob[idx].field0) {
|
||||
_vm->_objectsManager.resetBob(idx);
|
||||
byte *v5 = _vm->_globals.Bqe_Anim[idx]._data;
|
||||
byte *v5 = _vm->_globals._animBqe[idx]._data;
|
||||
int v4 = READ_LE_INT16(v5 + 2);
|
||||
if (!v4)
|
||||
v4 = 1;
|
||||
@ -612,7 +612,7 @@ void TalkManager::BOB_VISU_PARLE(int idx) {
|
||||
_vm->_objectsManager._bob[idx]._isSpriteFl = true;
|
||||
_vm->_objectsManager._bob[idx]._zoomFactor = 0;
|
||||
_vm->_objectsManager._bob[idx]._flipFl = false;
|
||||
_vm->_objectsManager._bob[idx]._animData = _vm->_globals.Bqe_Anim[idx]._data;
|
||||
_vm->_objectsManager._bob[idx]._animData = _vm->_globals._animBqe[idx]._data;
|
||||
_vm->_objectsManager._bob[idx].field0 = 10;
|
||||
v5 = _characterSprite;
|
||||
_vm->_objectsManager._bob[idx]._spriteData = _characterSprite;
|
||||
@ -699,8 +699,8 @@ void TalkManager::initCharacterAnim() {
|
||||
|
||||
void TalkManager::clearCharacterAnim() {
|
||||
for (int idx = 21; idx <= 34; ++idx) {
|
||||
_vm->_globals.Bqe_Anim[idx]._data = _vm->_globals.freeMemory(_vm->_globals.Bqe_Anim[idx]._data);
|
||||
_vm->_globals.Bqe_Anim[idx]._enabledFl = false;
|
||||
_vm->_globals._animBqe[idx]._data = _vm->_globals.freeMemory(_vm->_globals._animBqe[idx]._data);
|
||||
_vm->_globals._animBqe[idx]._enabledFl = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -717,25 +717,25 @@ bool TalkManager::searchCharacterAnim(int idx, const byte *bufPerso, int animId,
|
||||
if (READ_BE_UINT32(curPtr) == MKTAG('A', 'N', 'I', 'M') || READ_BE_UINT24(curPtr) == MKTAG24('F', 'I', 'N'))
|
||||
loopCond = true;
|
||||
if (bufIndx > bufferSize) {
|
||||
_vm->_globals.Bqe_Anim[idx]._enabledFl = false;
|
||||
_vm->_globals.Bqe_Anim[idx]._data = g_PTRNUL;
|
||||
_vm->_globals._animBqe[idx]._enabledFl = false;
|
||||
_vm->_globals._animBqe[idx]._data = g_PTRNUL;
|
||||
return false;
|
||||
}
|
||||
++bufIndx;
|
||||
++animLength;
|
||||
++curPtr;
|
||||
} while (!loopCond);
|
||||
_vm->_globals.Bqe_Anim[idx]._data = _vm->_globals.allocMemory(animLength + 50);
|
||||
_vm->_globals.Bqe_Anim[idx]._enabledFl = true;
|
||||
memcpy(_vm->_globals.Bqe_Anim[idx]._data, (const byte *)(bufPerso + bufPos + 5), 20);
|
||||
_vm->_globals._animBqe[idx]._data = _vm->_globals.allocMemory(animLength + 50);
|
||||
_vm->_globals._animBqe[idx]._enabledFl = true;
|
||||
memcpy(_vm->_globals._animBqe[idx]._data, (const byte *)(bufPerso + bufPos + 5), 20);
|
||||
int v23 = READ_LE_INT16(bufPos + bufPerso + 29);
|
||||
WRITE_LE_UINT16(_vm->_globals.Bqe_Anim[idx]._data + 20, READ_LE_INT16(bufPos + bufPerso + 25));
|
||||
WRITE_LE_UINT16(_vm->_globals.Bqe_Anim[idx]._data + 22, READ_LE_INT16(bufPos + bufPerso + 27));
|
||||
WRITE_LE_UINT16(_vm->_globals.Bqe_Anim[idx]._data + 24, v23);
|
||||
WRITE_LE_UINT16(_vm->_globals.Bqe_Anim[idx]._data + 26, READ_LE_INT16(bufPos + bufPerso + 31));
|
||||
_vm->_globals.Bqe_Anim[idx]._data[28] = bufPerso[bufPos + 33];
|
||||
_vm->_globals.Bqe_Anim[idx]._data[29] = bufPerso[bufPos + 34];
|
||||
byte *bqeCurData = _vm->_globals.Bqe_Anim[idx]._data + 20;
|
||||
WRITE_LE_UINT16(_vm->_globals._animBqe[idx]._data + 20, READ_LE_INT16(bufPos + bufPerso + 25));
|
||||
WRITE_LE_UINT16(_vm->_globals._animBqe[idx]._data + 22, READ_LE_INT16(bufPos + bufPerso + 27));
|
||||
WRITE_LE_UINT16(_vm->_globals._animBqe[idx]._data + 24, v23);
|
||||
WRITE_LE_UINT16(_vm->_globals._animBqe[idx]._data + 26, READ_LE_INT16(bufPos + bufPerso + 31));
|
||||
_vm->_globals._animBqe[idx]._data[28] = bufPerso[bufPos + 33];
|
||||
_vm->_globals._animBqe[idx]._data[29] = bufPerso[bufPos + 34];
|
||||
byte *bqeCurData = _vm->_globals._animBqe[idx]._data + 20;
|
||||
const byte *curBufPerso = bufPos + bufPerso + 25;
|
||||
for (int i = 1; i < 5000; i++) {
|
||||
bqeCurData += 10;
|
||||
|
@ -70,9 +70,10 @@ public:
|
||||
|
||||
void startStaticCharacterDialogue(const Common::String &filename);
|
||||
void startAnimatedCharacterDialogue(const Common::String &filename);
|
||||
void animateObject(const Common::String &a2);
|
||||
|
||||
void REPONSE(int zone, int verb);
|
||||
void REPONSE2(int zone, int verb);
|
||||
void animateObject(const Common::String &a2);
|
||||
};
|
||||
|
||||
} // End of namespace Hopkins
|
||||
|
Loading…
x
Reference in New Issue
Block a user