diff options
author | Strangerke | 2012-12-23 19:08:23 +0100 |
---|---|---|
committer | Strangerke | 2012-12-23 19:08:23 +0100 |
commit | 1f987a91ae9e7044fd1f6764d1232109028a8bd8 (patch) | |
tree | e4780691283dbb1ad3d4bfc28afdb2e050e3478b | |
parent | 0120107a6d0884ddf4655b4c22d13f2b75319152 (diff) | |
download | scummvm-rg350-1f987a91ae9e7044fd1f6764d1232109028a8bd8.tar.gz scummvm-rg350-1f987a91ae9e7044fd1f6764d1232109028a8bd8.tar.bz2 scummvm-rg350-1f987a91ae9e7044fd1f6764d1232109028a8bd8.zip |
HOPKINS: Some more renaming. Remove 2 useless palettes
-rw-r--r-- | engines/hopkins/anim.cpp | 48 | ||||
-rw-r--r-- | engines/hopkins/computer.cpp | 4 | ||||
-rw-r--r-- | engines/hopkins/graphics.cpp | 83 | ||||
-rw-r--r-- | engines/hopkins/graphics.h | 8 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 145 | ||||
-rw-r--r-- | engines/hopkins/hopkins.h | 2 | ||||
-rw-r--r-- | engines/hopkins/menu.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 6 | ||||
-rw-r--r-- | engines/hopkins/script.cpp | 10 | ||||
-rw-r--r-- | engines/hopkins/sound.cpp | 4 | ||||
-rw-r--r-- | engines/hopkins/sound.h | 2 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 18 |
12 files changed, 151 insertions, 181 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index 2f9d44a614..5b8495c84c 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -68,7 +68,7 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui error("File not found - %s", _vm->_globals.NFICHIER.c_str()); f.skip(6); - f.read(_vm->_graphicsManager.Palette, 800); + f.read(_vm->_graphicsManager._palette, 800); f.skip(4); nbytes = f.readUint32LE(); f.skip(14); @@ -87,9 +87,9 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui if (NO_SEQ) { if (hasScreenCopy) memcpy(screenCopy, _vm->_graphicsManager._vesaBuffer, 307200); - _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); + _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager._palette); } else { - _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); + _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager._palette); _vm->_graphicsManager.lockScreen(); if (hasScreenCopy) _vm->_graphicsManager.m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); @@ -174,7 +174,7 @@ EXIT: f.seek(0); f.skip(6); - f.read(_vm->_graphicsManager.Palette, 800); + f.read(_vm->_graphicsManager._palette, 800); f.skip(4); nbytes = f.readUint32LE(); f.skip(14); @@ -232,7 +232,7 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint v8 = 0; while (!_vm->shouldQuit()) { - memcpy(_vm->_graphicsManager.OLD_PAL, _vm->_graphicsManager.Palette, 769); + memcpy(_vm->_graphicsManager.OLD_PAL, _vm->_graphicsManager._palette, 769); _vm->_fileManager.constructLinuxFilename("TEMP.SCR"); @@ -251,7 +251,7 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint error("Error opening file - %s", _vm->_globals.NFICHIER.c_str()); f.read(&buf, 6); - f.read(_vm->_graphicsManager.Palette, 800); + f.read(_vm->_graphicsManager._palette, 800); f.read(&buf, 4); nbytes = f.readUint32LE(); f.readUint32LE(); @@ -263,7 +263,7 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint f.read(v12, nbytes); - _vm->_graphicsManager.Cls_Pal(); + _vm->_graphicsManager.clearPalette(); v11 = _vm->_graphicsManager.SCROLL; _vm->_graphicsManager.SCANLINE(SCREEN_WIDTH); _vm->_graphicsManager.scrollScreen(0); @@ -279,9 +279,9 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint if (_vm->_animationManager.NO_SEQ) { if (v8 == 1) memcpy(ptr, _vm->_graphicsManager._vesaBuffer, 307200); - _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); + _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager._palette); } else { - _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); + _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager._palette); _vm->_graphicsManager.lockScreen(); if (v8) _vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); @@ -314,8 +314,8 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint _vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager._vesaScreen); g_system->getSavefileManager()->removeSavefile("TEMP.SCR"); - memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 769); - _vm->_graphicsManager.Cls_Pal(); + memcpy(_vm->_graphicsManager._palette, _vm->_graphicsManager.OLD_PAL, 769); + _vm->_graphicsManager.clearPalette(); _vm->_graphicsManager.lockScreen(); _vm->_graphicsManager.clearScreen(); _vm->_graphicsManager.unlockScreen(); @@ -388,8 +388,8 @@ LABEL_88: _vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager._vesaScreen); g_system->getSavefileManager()->removeSavefile("TEMP.SCR"); - memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 769); - _vm->_graphicsManager.Cls_Pal(); + memcpy(_vm->_graphicsManager._palette, _vm->_graphicsManager.OLD_PAL, 769); + _vm->_graphicsManager.clearPalette(); _vm->_graphicsManager.lockScreen(); _vm->_graphicsManager.clearScreen(); _vm->_graphicsManager.unlockScreen(); @@ -430,8 +430,8 @@ LABEL_88: _vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager._vesaScreen); g_system->getSavefileManager()->removeSavefile("TEMP.SCR"); - memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 769); - _vm->_graphicsManager.Cls_Pal(); + memcpy(_vm->_graphicsManager._palette, _vm->_graphicsManager.OLD_PAL, 769); + _vm->_graphicsManager.clearPalette(); _vm->_graphicsManager.lockScreen(); _vm->_graphicsManager.clearScreen(); _vm->_graphicsManager.unlockScreen(); @@ -466,7 +466,7 @@ LABEL_114: f.seek(0); f.read(&buf, 6); - f.read(_vm->_graphicsManager.Palette, 800); + f.read(_vm->_graphicsManager._palette, 800); f.read(&buf, 4); nbytes = f.readUint32LE(); @@ -509,8 +509,8 @@ LABEL_114: _vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager._vesaScreen); g_system->getSavefileManager()->removeSavefile("TEMP.SCR"); - memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 769); - _vm->_graphicsManager.Cls_Pal(); + memcpy(_vm->_graphicsManager._palette, _vm->_graphicsManager.OLD_PAL, 769); + _vm->_graphicsManager.clearPalette(); _vm->_graphicsManager.lockScreen(); _vm->_graphicsManager.clearScreen(); _vm->_graphicsManager.unlockScreen(); @@ -836,7 +836,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui error("Error opening file - %s", _vm->_globals.NFICHIER.c_str()); f.skip(6); - f.read(_vm->_graphicsManager.Palette, 800); + f.read(_vm->_graphicsManager._palette, 800); f.skip(4); nbytes = f.readUint32LE(); f.skip(14); @@ -856,7 +856,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui _vm->_graphicsManager.SETCOLOR3(251, 100, 100, 100); _vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0); } - _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); + _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager._palette); } else { _vm->_graphicsManager.lockScreen(); if (v7) @@ -994,7 +994,7 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u error("File not found - %s", _vm->_globals.NFICHIER.c_str()); f.skip(6); - f.read(_vm->_graphicsManager.Palette, 800); + f.read(_vm->_graphicsManager._palette, 800); f.skip(4); nbytes = f.readUint32LE(); f.readUint32LE(); @@ -1015,10 +1015,10 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u assert(ptr != NULL); memcpy((void *)ptr, _vm->_graphicsManager._vesaBuffer, 307200); } - _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); + _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager._palette); } else { _vm->_graphicsManager.lockScreen(); - _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); + _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager._palette); if (v7) _vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); else @@ -1112,7 +1112,7 @@ LABEL_54: f.seek(0); f.skip(6); - f.read(_vm->_graphicsManager.Palette, 800); + f.read(_vm->_graphicsManager._palette, 800); f.skip(4); nbytes = f.readUint32LE(); diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp index 1efc5fce66..16cae046f6 100644 --- a/engines/hopkins/computer.cpp +++ b/engines/hopkins/computer.cpp @@ -70,7 +70,7 @@ void ComputerManager::setVideoMode() { * Sets up Textual entry mode */ void ComputerManager::setTextMode() { - _vm->_graphicsManager.Cls_Pal(); + _vm->_graphicsManager.clearPalette(); _vm->_graphicsManager.lockScreen(); _vm->_graphicsManager.clearScreen(); _vm->_graphicsManager.unlockScreen(); @@ -673,7 +673,7 @@ void ComputerManager::setModeVGA256() { _vm->_graphicsManager.lockScreen(); _vm->_graphicsManager.clearScreen(); _vm->_graphicsManager.unlockScreen(); - _vm->_graphicsManager.Cls_Pal(); + _vm->_graphicsManager.clearPalette(); _vm->_graphicsManager.SCANLINE(320); } diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 8ed4c03bc6..18f0ec8bef 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -72,8 +72,7 @@ GraphicsManager::GraphicsManager() { Common::fill(&SD_PIXELS[0], &SD_PIXELS[PALETTE_SIZE * 2], 0); Common::fill(&TABLE_COUL[0], &TABLE_COUL[PALETTE_EXT_BLOCK_SIZE], 0); - Common::fill(&cmap[0], &cmap[PALETTE_BLOCK_SIZE], 0); - Common::fill(&Palette[0], &Palette[PALETTE_EXT_BLOCK_SIZE], 0); + Common::fill(&_palette[0], &_palette[PALETTE_EXT_BLOCK_SIZE], 0); Common::fill(&OLD_PAL[0], &OLD_PAL[PALETTE_EXT_BLOCK_SIZE], 0); } @@ -117,7 +116,6 @@ void GraphicsManager::setGraphicalMode(int width, int height) { PAL_PIXELS = SD_PIXELS; _lineNbr = width; - Common::fill(&cmap[0], &cmap[256 * 3], 0); SDL_MODEYES = true; } else { error("Called SET_MODE multiple times"); @@ -159,7 +157,7 @@ void GraphicsManager::clearScreen() { void GraphicsManager::loadImage(const Common::String &file) { Common::String filename = Common::String::format("%s.PCX", file.c_str()); loadScreen(filename); - INIT_TABLE(165, 170, Palette); + INIT_TABLE(165, 170, _palette); } /** @@ -171,7 +169,7 @@ void GraphicsManager::loadVgaImage(const Common::String &file) { clearScreen(); unlockScreen(); _vm->_fileManager.constructFilename(_vm->_globals.HOPIMAGE, file); - A_PCX320(_vesaScreen, _vm->_globals.NFICHIER, Palette); + A_PCX320(_vesaScreen, _vm->_globals.NFICHIER, _palette); memcpy(_vesaBuffer, _vesaScreen, 64000); SCANLINE(320); max_x = 320; @@ -201,11 +199,11 @@ void GraphicsManager::loadScreen(const Common::String &file) { } scrollScreen(0); - A_PCX640_480((byte *)_vesaScreen, file, Palette, flag); + A_PCX640_480((byte *)_vesaScreen, file, _palette, flag); SCROLL = 0; OLD_SCROLL = 0; - Cls_Pal(); + clearPalette(); if (!DOUBLE_ECRAN) { SCANLINE(SCREEN_WIDTH); @@ -418,8 +416,7 @@ void GraphicsManager::A_PCX320(byte *surface, const Common::String &file, byte * } // Clear Palette -void GraphicsManager::Cls_Pal() { - Common::fill(&cmap[0], &cmap[PALETTE_BLOCK_SIZE], 0); +void GraphicsManager::clearPalette() { SD_PIXELS[0] = 0; } @@ -694,22 +691,22 @@ void GraphicsManager::fade_out(const byte *palette, int step, const byte *surfac void GraphicsManager::FADE_INS() { FADESPD = 1; - fade_in(Palette, 1, (const byte *)_vesaBuffer); + fade_in(_palette, 1, (const byte *)_vesaBuffer); } void GraphicsManager::FADE_OUTS() { FADESPD = 1; - fade_out(Palette, 1, (const byte *)_vesaBuffer); + fade_out(_palette, 1, (const byte *)_vesaBuffer); } void GraphicsManager::FADE_INW() { FADESPD = 15; - fade_in(Palette, 20, (const byte *)_vesaBuffer); + fade_in(_palette, 20, (const byte *)_vesaBuffer); } void GraphicsManager::FADE_OUTW() { FADESPD = 15; - fade_out(Palette, 20, (const byte *)_vesaBuffer); + fade_out(_palette, 20, (const byte *)_vesaBuffer); } void GraphicsManager::setpal_vga256(const byte *palette) { @@ -722,53 +719,27 @@ void GraphicsManager::setpal_vga256_linux(const byte *palette, const byte *surfa DD_VBL(); } -void GraphicsManager::SETCOLOR(int palIndex, int r, int g, int b) { - Palette[palIndex * 3] = 255 * r / 100; - Palette[palIndex * 3 + 1] = 255 * g / 100; - Palette[palIndex * 3 + 2] = 255 * b / 100; - - setpal_vga256(Palette); -} - -void GraphicsManager::SETCOLOR2(int palIndex, int r, int g, int b) { - return SETCOLOR(palIndex, r, g, b); -} - void GraphicsManager::SETCOLOR3(int palIndex, int r, int g, int b) { - Palette[palIndex * 3] = 255 * r / 100; - Palette[palIndex * 3 + 1] = 255 * g / 100; - Palette[palIndex * 3 + 2] = 255 * b / 100; + int palOffset = 3 * palIndex; + _palette[palOffset] = 255 * r / 100; + _palette[palOffset + 1] = 255 * g / 100; + _palette[palOffset + 2] = 255 * b / 100; } void GraphicsManager::SETCOLOR4(int palIndex, int r, int g, int b) { - int rv, gv, bv; - int palOffset; - int v8; - - rv = 255 * r / 100; - gv = 255 * g / 100; - bv = 255 * b / 100; - palOffset = 3 * palIndex; - Palette[palOffset] = 255 * r / 100; - Palette[palOffset + 1] = gv; - Palette[palOffset + 2] = bv; - - v8 = 4 * palIndex; - cmap[v8] = rv; - cmap[v8 + 1] = gv; - cmap[v8 + 2] = bv; + int rv = 255 * r / 100; + int gv = 255 * g / 100; + int bv = 255 * b / 100; + + int palOffset = 3 * palIndex; + _palette[palOffset] = rv; + _palette[palOffset + 1] = gv; + _palette[palOffset + 2] = bv; WRITE_LE_UINT16(&SD_PIXELS[2 * palIndex], MapRGB(rv, gv, bv)); } void GraphicsManager::CHANGE_PALETTE(const byte *palette) { - // Copy the palette into the PALPCX block -// TODO: Likely either one or both of the destination arrays can be removed, -// since PALPCX is only used in SAVE_IMAGE, and cmap in the original was a RGBA -// array specifically intended just for passing to the SDL palette setter - Common::copy(&palette[0], &palette[PALETTE_BLOCK_SIZE], &PALPCX[0]); - Common::copy(&palette[0], &palette[PALETTE_BLOCK_SIZE], &cmap[0]); - const byte *srcP = &palette[0]; for (int idx = 0; idx < PALETTE_SIZE; ++idx, srcP += 3) { *(uint16 *)&SD_PIXELS[2 * idx] = MapRGB(*srcP, *(srcP + 1), *(srcP + 2)); @@ -790,16 +761,16 @@ void GraphicsManager::DD_VBL() { void GraphicsManager::FADE_OUTW_LINUX(const byte *surface) { assert(surface); - fade_out(Palette, FADESPD, surface); + fade_out(_palette, FADESPD, surface); } void GraphicsManager::FADE_INW_LINUX(const byte *surface) { assert(surface); - fade_in(Palette, FADESPD, surface); + fade_in(_palette, FADESPD, surface); } void GraphicsManager::FADE_IN_CASSE() { - setpal_vga256(Palette); + setpal_vga256(_palette); lockScreen(); CopyAsm16(_vesaBuffer); unlockScreen(); @@ -2035,7 +2006,7 @@ void GraphicsManager::NB_SCREEN() { const byte *srcP; if (!_vm->_globals.NECESSAIRE) - INIT_TABLE(50, 65, Palette); + INIT_TABLE(50, 65, _palette); if (_lineNbr == SCREEN_WIDTH) Trans_bloc2(_vesaBuffer, TABLE_COUL, SCREEN_WIDTH * SCREEN_HEIGHT); @@ -2057,7 +2028,7 @@ void GraphicsManager::NB_SCREEN() { } void GraphicsManager::SHOW_PALETTE() { - setpal_vga256(Palette); + setpal_vga256(_palette); } void GraphicsManager::videkey() { diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h index b3b4e476a9..0e0963a08c 100644 --- a/engines/hopkins/graphics.h +++ b/engines/hopkins/graphics.h @@ -62,8 +62,7 @@ public: byte *PAL_PIXELS; int _lineNbr; byte TABLE_COUL[PALETTE_EXT_BLOCK_SIZE]; - byte cmap[PALETTE_BLOCK_SIZE]; - byte Palette[PALETTE_EXT_BLOCK_SIZE]; + byte _palette[PALETTE_EXT_BLOCK_SIZE]; byte OLD_PAL[PALETTE_EXT_BLOCK_SIZE]; bool Linear; Graphics::Surface *_videoPtr; @@ -81,7 +80,6 @@ public: int Agr_x, Agr_y; int Agr_Flag_x, Agr_Flag_y; int FADESPD; - byte PALPCX[PALETTE_EXT_BLOCK_SIZE]; int FADE_LINUX; bool _skipVideoLockFl; int no_scroll; @@ -117,7 +115,7 @@ public: void Trans_bloc2(byte *surface, byte *col, int size); void A_PCX640_480(byte *surface, const Common::String &file, byte *palette, bool typeFlag); void A_PCX320(byte *surface, const Common::String &file, byte *palette); - void Cls_Pal(); + void clearPalette(); void SCANLINE(int pitch); void m_scroll(const byte *surface, int xs, int ys, int width, int height, int destX, int destY); void m_scroll16(const byte *surface, int xs, int ys, int width, int height, int destX, int destY); @@ -135,8 +133,6 @@ public: void FADE_OUT_CASSE(); void setpal_vga256(const byte *palette); void setpal_vga256_linux(const byte *palette, const byte *surface); - void SETCOLOR(int palIndex, int r, int g, int b); - void SETCOLOR2(int palIndex, int r, int g, int b); void SETCOLOR3(int palIndex, int r, int g, int b); void SETCOLOR4(int palIndex, int r, int g, int b); void CHANGE_PALETTE(const byte *palette); diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index cc66415a4b..1d5691200e 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -143,13 +143,13 @@ bool HopkinsEngine::runWin95Demo() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _graphicsManager.loadImage("H2"); _graphicsManager.FADE_INW(); if (!_eventsManager._escKeyFl) - INTRORUN(); + playIntro(); warning("TODO Fin_Interrupt()"); warning("TODO TEST = 1;"); @@ -231,7 +231,7 @@ bool HopkinsEngine::runWin95Demo() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); if (!_globals.CENSURE) _animationManager.playAnim("BANQUE.ANM", 200, 28, 200); else @@ -419,7 +419,7 @@ bool HopkinsEngine::runWin95Demo() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("JOUR1A.anm", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; @@ -431,7 +431,7 @@ bool HopkinsEngine::runWin95Demo() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _graphicsManager.loadImage("njour3a"); _graphicsManager.FADE_INW(); _eventsManager.delay(5000); @@ -446,7 +446,7 @@ bool HopkinsEngine::runWin95Demo() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("JOUR4A.anm", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; @@ -484,7 +484,7 @@ bool HopkinsEngine::runLinuxDemo() { _graphicsManager.FADE_OUTW(); if (!_eventsManager._escKeyFl) - INTRORUN(); + playIntro(); _globals.iRegul = 0; _fileManager.constructFilename(_globals.HOPSYSTEM, "PERSO.SPR"); @@ -557,7 +557,7 @@ bool HopkinsEngine::runLinuxDemo() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _graphicsManager.FADE_LINUX = 2; if (!_globals.CENSURE) @@ -752,7 +752,7 @@ bool HopkinsEngine::runLinuxDemo() { _graphicsManager.DD_VBL(); memset(_graphicsManager._vesaBuffer, 0, 307200); memset(_graphicsManager._vesaScreen, 0, 307200); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _graphicsManager.RESET_SEGMENT_VESA(); break; @@ -787,7 +787,7 @@ bool HopkinsEngine::runLinuxDemo() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _graphicsManager.FADE_LINUX = 2; _animationManager.playAnim("JOUR1A.anm", 12, 12, 2000); _globals.iRegul = 0; @@ -801,7 +801,7 @@ bool HopkinsEngine::runLinuxDemo() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _graphicsManager.FADE_LINUX = 2; _animationManager.playAnim("JOUR3A.anm", 12, 12, 2000); _globals.iRegul = 0; @@ -815,7 +815,7 @@ bool HopkinsEngine::runLinuxDemo() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _graphicsManager.FADE_LINUX = 2; _animationManager.playAnim("JOUR4A.anm", 12, 12, 2000); _globals.iRegul = 0; @@ -843,11 +843,11 @@ bool HopkinsEngine::runOS2Full() { _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("MP.ANM", 10, 0, 200); _graphicsManager.FADE_OUTW(); if (!_eventsManager._escKeyFl) - INTRORUN(); + playIntro(); _graphicsManager.loadImage("H2"); _graphicsManager.FADE_INW(); _globals.iRegul = 0; @@ -893,7 +893,7 @@ bool HopkinsEngine::runOS2Full() { _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("BANQUE.ANM", 200, 12, 200); _soundManager.SPECIAL_SOUND = 0; _soundManager.DEL_SAMPLE(1); @@ -1048,7 +1048,7 @@ bool HopkinsEngine::runOS2Full() { _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); // _soundManager.WSOUND_OFF(); _soundManager.WSOUND(6); if (_globals.SVGA == 2) @@ -1095,7 +1095,7 @@ bool HopkinsEngine::runOS2Full() { _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _soundManager.WSOUND(6); if (_globals.SVGA == 2) _animationManager.playAnim("PURG2A.ANM", 12, 18, 50); @@ -1565,7 +1565,7 @@ bool HopkinsEngine::runOS2Full() { _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _soundManager.WSOUND(6); if (_globals.SVGA == 2) _animationManager.playAnim("PURG1A.ANM", 12, 18, 50); @@ -1647,7 +1647,7 @@ bool HopkinsEngine::runOS2Full() { _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("JOUR1A.ANM", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; @@ -1662,7 +1662,7 @@ bool HopkinsEngine::runOS2Full() { _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("JOUR3A.ANM", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; @@ -1677,7 +1677,7 @@ bool HopkinsEngine::runOS2Full() { _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("JOUR4A.ANM", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; @@ -1726,11 +1726,11 @@ bool HopkinsEngine::runBeOSFull() { _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("MP.ANM", 10, 0, 200); _graphicsManager.FADE_OUTW(); if (!_eventsManager._escKeyFl) - INTRORUN(); + playIntro(); _graphicsManager.FADE_OUTS(); _graphicsManager.loadImage("H2"); _graphicsManager.FADE_INW(); @@ -1782,7 +1782,7 @@ bool HopkinsEngine::runBeOSFull() { _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("BANQUE.ANM", 200, 12, 200); _soundManager.SPECIAL_SOUND = 0; _soundManager.DEL_SAMPLE(1); @@ -1935,7 +1935,7 @@ bool HopkinsEngine::runBeOSFull() { _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _soundManager.WSOUND_OFF(); _soundManager.WSOUND(6); if (_globals.SVGA == 2) @@ -1983,7 +1983,7 @@ bool HopkinsEngine::runBeOSFull() { _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _soundManager.WSOUND(6); if (_globals.SVGA == 2) _animationManager.playAnim("PURG2A.ANM", 12, 18, 50); @@ -2453,7 +2453,7 @@ bool HopkinsEngine::runBeOSFull() { _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _soundManager.WSOUND(6); if (_globals.SVGA == 2) _animationManager.playAnim("PURG1A.ANM", 12, 18, 50); @@ -2536,7 +2536,7 @@ bool HopkinsEngine::runBeOSFull() { _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("JOUR1A.ANM", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; @@ -2551,7 +2551,7 @@ bool HopkinsEngine::runBeOSFull() { _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("JOUR3A.ANM", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; @@ -2566,7 +2566,7 @@ bool HopkinsEngine::runBeOSFull() { _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("JOUR4A.ANM", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; @@ -2610,12 +2610,12 @@ bool HopkinsEngine::runWin95full() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("MP.ANM", 10, 16, 200); _graphicsManager.FADE_OUTW(); if (!_eventsManager._escKeyFl) - INTRORUN(); + playIntro(); _graphicsManager.loadImage("H2"); _graphicsManager.FADE_INW(); _eventsManager.delay(500); @@ -2669,7 +2669,7 @@ bool HopkinsEngine::runWin95full() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); if (!_globals.CENSURE) _animationManager.playAnim("BANQUE.ANM", 200, 28, 200); else @@ -2824,7 +2824,7 @@ bool HopkinsEngine::runWin95full() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _soundManager.WSOUND_OFF(); _soundManager.WSOUND(29); if (_globals.SVGA == 2) @@ -2868,7 +2868,7 @@ bool HopkinsEngine::runWin95full() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _soundManager.WSOUND(6); if (_globals.SVGA == 2) _animationManager.playAnim("PURG2A.ANM", 12, 18, 50); @@ -3334,7 +3334,7 @@ bool HopkinsEngine::runWin95full() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _soundManager.WSOUND(6); if (_globals.SVGA == 2) _animationManager.playAnim("PURG1A.ANM", 12, 18, 50); @@ -3413,7 +3413,7 @@ bool HopkinsEngine::runWin95full() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("JOUR1A.anm", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; @@ -3425,7 +3425,7 @@ bool HopkinsEngine::runWin95full() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("JOUR3A.anm", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; @@ -3437,7 +3437,7 @@ bool HopkinsEngine::runWin95full() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("JOUR4A.anm", 12, 12, 2000); _globals.iRegul = 0; _globals.SORTIE = 300; @@ -3496,7 +3496,7 @@ bool HopkinsEngine::runLinuxFull() { _animationManager.playAnim("MP.ANM", 10, 16, 200); if (!_eventsManager._escKeyFl) - INTRORUN(); + playIntro(); _globals.iRegul = 0; _fileManager.constructFilename(_globals.HOPSYSTEM, "PERSO.SPR"); @@ -3548,7 +3548,7 @@ bool HopkinsEngine::runLinuxFull() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _graphicsManager.FADE_LINUX = 2; if (!_globals.CENSURE) _animationManager.playAnim("BANQUE.ANM", 200, 28, 200); @@ -3702,7 +3702,7 @@ bool HopkinsEngine::runLinuxFull() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _soundManager.WSOUND_OFF(); _soundManager.WSOUND(29); _graphicsManager.FADE_LINUX = 2; @@ -3745,7 +3745,7 @@ bool HopkinsEngine::runLinuxFull() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _soundManager.WSOUND_OFF(); _soundManager.WSOUND(6); _graphicsManager.FADE_LINUX = 2; @@ -4213,7 +4213,7 @@ bool HopkinsEngine::runLinuxFull() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _soundManager.WSOUND(6); if (_globals.SVGA == 2) _animationManager.playAnim("PURG1A.ANM", 12, 18, 50); @@ -4269,7 +4269,7 @@ bool HopkinsEngine::runLinuxFull() { _graphicsManager.DD_VBL(); memset(_graphicsManager._vesaBuffer, 0, 307200); memset(_graphicsManager._vesaScreen, 0, 307200); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _graphicsManager.RESET_SEGMENT_VESA(); break; @@ -4303,7 +4303,7 @@ bool HopkinsEngine::runLinuxFull() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _graphicsManager.FADE_LINUX = 2; _animationManager.playAnim("JOUR1A.anm", 12, 12, 2000); _globals.iRegul = 0; @@ -4316,7 +4316,7 @@ bool HopkinsEngine::runLinuxFull() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _graphicsManager.FADE_LINUX = 2; _animationManager.playAnim("JOUR3A.anm", 12, 12, 2000); _globals.iRegul = 0; @@ -4329,7 +4329,7 @@ bool HopkinsEngine::runLinuxFull() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _graphicsManager.FADE_LINUX = 2; _animationManager.playAnim("JOUR4A.anm", 12, 12, 2000); _globals.iRegul = 0; @@ -4440,7 +4440,10 @@ void HopkinsEngine::INIT_SYSTEM() { _eventsManager._mouseOffset.y = 0; } -void HopkinsEngine::INTRORUN() { +/** + * Play the intro of the game + */ +void HopkinsEngine::playIntro() { // Win95 EN demo doesn't include the intro if ((getLanguage() == Common::EN_ANY) && (getPlatform() == Common::kPlatformWindows) && (getIsDemo())) return; @@ -4457,19 +4460,19 @@ void HopkinsEngine::INTRORUN() { _animationManager._clearAnimationFl = true; _animationManager.playAnim("J1.anm", 12, 12, 50); if (!_eventsManager._escKeyFl) { - _soundManager.VOICE_MIX(1, 3); + _soundManager.mixVoice(1, 3); _animationManager.playAnim("J2.anm", 12, 12, 50); if (!_eventsManager._escKeyFl) { - _soundManager.VOICE_MIX(2, 3); + _soundManager.mixVoice(2, 3); _animationManager.playAnim("J3.anm", 12, 12, 50); if (!_eventsManager._escKeyFl) { - _soundManager.VOICE_MIX(3, 3); + _soundManager.mixVoice(3, 3); _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _graphicsManager.DD_VBL(); _soundManager.WSOUND(11); _graphicsManager.loadImage("intro1"); @@ -4510,7 +4513,7 @@ void HopkinsEngine::INTRORUN() { return; } - _soundManager.VOICE_MIX(4, 3); + _soundManager.mixVoice(4, 3); _graphicsManager.FADE_OUTW(); _graphicsManager.no_scroll = 0; _graphicsManager.loadImage("intro2"); @@ -4537,10 +4540,10 @@ void HopkinsEngine::INTRORUN() { _eventsManager.VBL(); _objectsManager.setBobAnimation(3); - _soundManager.VOICE_MIX(5, 3); + _soundManager.mixVoice(5, 3); _objectsManager.stopBobAnimation(3); _eventsManager.VBL(); - memcpy(&paletteData2, _graphicsManager.Palette, 796); + memcpy(&paletteData2, _graphicsManager._palette, 796); // CHECKME: Useless variables? // v21 = *(uint16 *)&_graphicsManager.Palette[796]; @@ -4587,21 +4590,21 @@ void HopkinsEngine::INTRORUN() { if (v9 == 12) { _objectsManager.setBobAnimation(3); _eventsManager.VBL(); - _soundManager.VOICE_MIX(6, 3); + _soundManager.mixVoice(6, 3); _eventsManager.VBL(); _objectsManager.stopBobAnimation(3); } - Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsManager.Palette[0]); + Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsManager._palette[0]); for (int i = 1, v12 = 4 * v9; i <= PALETTE_BLOCK_SIZE; i++) { - if (_graphicsManager.Palette[i] > v12) - _graphicsManager.Palette[i] -= v12; + if (_graphicsManager._palette[i] > v12) + _graphicsManager._palette[i] -= v12; } - _graphicsManager.setpal_vga256_linux(_graphicsManager.Palette, _graphicsManager._vesaBuffer); + _graphicsManager.setpal_vga256_linux(_graphicsManager._palette, _graphicsManager._vesaBuffer); if (2 * v9 > 1) { @@ -4622,7 +4625,7 @@ void HopkinsEngine::INTRORUN() { _eventsManager.VBL(); _objectsManager.setBobAnimation(3); - _soundManager.VOICE_MIX(7, 3); + _soundManager.mixVoice(7, 3); _objectsManager.stopBobAnimation(3); for (uint k = 1; k < 60 / _globals._speed; ++k) @@ -4631,13 +4634,13 @@ void HopkinsEngine::INTRORUN() { for (uint l = 0; l < 20 / _globals._speed; ++l) _eventsManager.VBL(); - Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsManager.Palette[0]); - _graphicsManager.setpal_vga256_linux(_graphicsManager.Palette, _graphicsManager._vesaBuffer); + Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsManager._palette[0]); + _graphicsManager.setpal_vga256_linux(_graphicsManager._palette, _graphicsManager._vesaBuffer); for (uint m = 0; m < 50 / _globals._speed; ++m) { if (m == 30 / _globals._speed) { _objectsManager.setBobAnimation(3); - _soundManager.VOICE_MIX(8, 3); + _soundManager.mixVoice(8, 3); _objectsManager.stopBobAnimation(3); } @@ -4699,7 +4702,7 @@ void HopkinsEngine::PASS() { if (_soundManager.VOICEOFF) _eventsManager.delay(500); else - _soundManager.VOICE_MIX(628, 4); + _soundManager.mixVoice(628, 4); _graphicsManager.FADE_OUTW(); _globals.SORTIE = 4; @@ -4731,7 +4734,7 @@ void HopkinsEngine::BOOM() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _globals.iRegul = 1; _soundManager.SPECIAL_SOUND = 199; @@ -4856,7 +4859,7 @@ void HopkinsEngine::BASE() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager._clearAnimationFl = true; _soundManager.WSOUND(25); if (_globals.SVGA == 1) { @@ -4923,7 +4926,7 @@ void HopkinsEngine::BASED() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.NO_SEQ = false; _soundManager.WSOUND(26); _globals.iRegul = 1; @@ -5064,7 +5067,7 @@ void HopkinsEngine::JOUE_FIN() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager.playAnim("FF1a.anm", 18, 18, 9); _animationManager.playAnim("FF1a.anm", 9, 18, 9); _animationManager.playAnim("FF1a.anm", 9, 18, 18); @@ -5120,7 +5123,7 @@ void HopkinsEngine::AVION() { _graphicsManager.lockScreen(); _graphicsManager.clearScreen(); _graphicsManager.unlockScreen(); - _graphicsManager.Cls_Pal(); + _graphicsManager.clearPalette(); _animationManager._clearAnimationFl = false; if (_globals.SVGA == 1) { diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h index 7d2463531b..a895054286 100644 --- a/engines/hopkins/hopkins.h +++ b/engines/hopkins/hopkins.h @@ -167,7 +167,7 @@ public: /** * Run the introduction sequence */ - void INTRORUN(); + void playIntro(); /** * Synchronises the sound settings from ScummVM into the engine diff --git a/engines/hopkins/menu.cpp b/engines/hopkins/menu.cpp index 0e05136bf0..b48409e6b7 100644 --- a/engines/hopkins/menu.cpp +++ b/engines/hopkins/menu.cpp @@ -216,7 +216,7 @@ int MenuManager::MENU() { _vm->_graphicsManager.AFFICHE_SPEED(spriteData, 230, 354, 13); _vm->_eventsManager.VBL(); _vm->_eventsManager.delay(200); - _vm->INTRORUN(); + _vm->playIntro(); continue; } diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index a960796d86..5658371c03 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -4030,7 +4030,7 @@ void ObjectsManager::SPECIAL_JEU() { _vm->_globals.NOPARLE = false; if (!_vm->_globals.CENSURE) { v1 = _vm->_globals.allocMemory(1000); - memcpy(v1, _vm->_graphicsManager.Palette, 769); + memcpy(v1, _vm->_graphicsManager._palette, 769); _vm->_saveLoadManager.saveFile("TEMP1.SCR", _vm->_graphicsManager._vesaScreen, 307200); @@ -4052,7 +4052,7 @@ void ObjectsManager::SPECIAL_JEU() { g_system->getSavefileManager()->removeSavefile("TEMP1.SCR"); PERSO_ON = false; - memcpy(_vm->_graphicsManager.Palette, v1, 769); + memcpy(_vm->_graphicsManager._palette, v1, 769); _vm->_graphicsManager.SHOW_PALETTE(); _vm->_globals.freeMemory(v1); _vm->_graphicsManager.lockScreen(); @@ -4697,7 +4697,7 @@ void ObjectsManager::SPECIAL_INI(const Common::String &a1) { _vm->_fontManager.showText(9); } if (!_vm->_soundManager.VOICEOFF) - _vm->_soundManager.VOICE_MIX(383, 4); + _vm->_soundManager.mixVoice(383, 4); _vm->_globals.SAUVEGARDE->data[svField270] = 1; _vm->_globals.SAUVEGARDE->data[svField300] = 1; _vm->_globals.SAUVEGARDE->data[svField320] = 1; diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index 818610c892..3c865755ec 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -139,7 +139,7 @@ int ScriptManager::Traduction(byte *a1) { _vm->_fontManager.showText(9); } if (!_vm->_soundManager.VOICEOFF) - _vm->_soundManager.VOICE_MIX(v3, 4); + _vm->_soundManager.mixVoice(v3, 4); } if (TRAVAILOBJET == 1) { if (_vm->_globals.SAUVEGARDE->data[svField356]) { @@ -147,7 +147,7 @@ int ScriptManager::Traduction(byte *a1) { if (!_vm->_soundManager.TEXTOFF) _vm->_fontManager.showText(9); if (!_vm->_soundManager.VOICEOFF) - _vm->_soundManager.VOICE_MIX(635, 4); + _vm->_soundManager.mixVoice(635, 4); goto LABEL_104; } if (_vm->_globals.FR == 1 && !_vm->_soundManager.TEXTOFF) @@ -158,7 +158,7 @@ int ScriptManager::Traduction(byte *a1) { if (_vm->_soundManager.TEXTOFF) { LABEL_98: if (!_vm->_soundManager.VOICEOFF) - _vm->_soundManager.VOICE_MIX(v3, 5); + _vm->_soundManager.mixVoice(v3, 5); goto LABEL_104; } _vm->_fontManager.initTextBuffers(9, v3, "OBJETES.TXT", 2 * v67, 60, 20, 25, 6, v2, 253); @@ -637,7 +637,7 @@ LABEL_1141: } if (v76 == 607) { if (!_vm->_globals._internetFl) { - memcpy(_vm->_graphicsManager.OLD_PAL, _vm->_graphicsManager.Palette, 769); + memcpy(_vm->_graphicsManager.OLD_PAL, _vm->_graphicsManager._palette, 769); v1 = _vm->_graphicsManager.OLD_PAL[769]; _vm->_animationManager.playAnim2("PLAN.ANM", 50, 10, 800); } @@ -1929,7 +1929,7 @@ LABEL_1141: _vm->_fontManager.showText(9); } if (!_vm->_soundManager.VOICEOFF) - _vm->_soundManager.VOICE_MIX(617, 4); + _vm->_soundManager.mixVoice(617, 4); for (int i = 0; i <= 29; i++) { if (_vm->shouldQuit()) return -1; // Exiting game diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp index 1e24346f60..22c4f04f3b 100644 --- a/engines/hopkins/sound.cpp +++ b/engines/hopkins/sound.cpp @@ -148,7 +148,7 @@ void SoundManager::LOAD_ANM_SOUND() { LOAD_WAV("SOUND22.WAV", 1); break; case 200: - VOICE_MIX(682, 1); + mixVoice(682, 1); break; case 208: LOAD_WAV("SOUND77.WAV", 1); @@ -500,7 +500,7 @@ void SoundManager::DEL_MSAMPLE(int mwavIndex) { } } -bool SoundManager::VOICE_MIX(int voiceId, int voiceMode) { +bool SoundManager::mixVoice(int voiceId, int voiceMode) { int fileNumber; int oldMusicVol; bool breakFlag; diff --git a/engines/hopkins/sound.h b/engines/hopkins/sound.h index 8a151531b2..fe2e52172a 100644 --- a/engines/hopkins/sound.h +++ b/engines/hopkins/sound.h @@ -153,7 +153,7 @@ public: void DEL_MUSIC(); - bool VOICE_MIX(int voiceId, int voiceMode); + bool mixVoice(int voiceId, int voiceMode); void DEL_SAMPLE(int soundIndex); void PLAY_SOUND(const Common::String &file); void PLAY_SOUND2(const Common::String &file2); diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index fb1d4c3c97..1e4c228577 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -155,8 +155,8 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) { if (_vm->getIsDemo() == false) _vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0); - _vm->_graphicsManager.INIT_TABLE(145, 150, _vm->_graphicsManager.Palette); - _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); + _vm->_graphicsManager.INIT_TABLE(145, 150, _vm->_graphicsManager._palette); + _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager._palette); _vm->_graphicsManager.lockScreen(); _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); _vm->_graphicsManager.unlockScreen(); @@ -243,8 +243,8 @@ void TalkManager::PARLER_PERSO2(const Common::String &filename) { _vm->_eventsManager._mouseCursorId = v8; _vm->_eventsManager.changeMouseCursor(v8); - _vm->_graphicsManager.INIT_TABLE(145, 150, _vm->_graphicsManager.Palette); - _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); + _vm->_graphicsManager.INIT_TABLE(145, 150, _vm->_graphicsManager._palette); + _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager._palette); _vm->_objectsManager._disableCursorFl = false; _vm->_globals._disableInventFl = v7; STATI = 0; @@ -344,7 +344,7 @@ int TalkManager::DIALOGUE() { v6 = 0; } while (!_vm->shouldQuit() && v6 != 1); - _vm->_soundManager.VOICE_MIX(v5, 1); + _vm->_soundManager.mixVoice(v5, 1); _vm->_fontManager.hideText(5); _vm->_fontManager.hideText(6); _vm->_fontManager.hideText(7); @@ -456,7 +456,7 @@ int TalkManager::DIALOGUE_REP(int idx) { _vm->_fontManager.initTextBuffers(9, v22, _answersFilename, v25, v24, 20, 25, 5, v23, 252); _vm->_fontManager.showText(9); } - if (!_vm->_soundManager.VOICE_MIX(v22, 1)) { + if (!_vm->_soundManager.mixVoice(v22, 1)) { v14 = 0; _vm->_eventsManager._curMouseButton = 0; _vm->_eventsManager._mouseButton = 0; @@ -1266,12 +1266,12 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) { if (!_vm->getIsDemo()) _vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0); - _vm->_graphicsManager.INIT_TABLE(145, 150, _vm->_graphicsManager.Palette); - _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); + _vm->_graphicsManager.INIT_TABLE(145, 150, _vm->_graphicsManager._palette); + _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager._palette); _vm->_graphicsManager.lockScreen(); _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); _vm->_graphicsManager.unlockScreen(); - _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette); + _vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager._palette); v14 = _vm->_graphicsManager._vesaBuffer; v15 = _vm->_graphicsManager._vesaScreen; memcpy(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager._vesaScreen, 614396); |