mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
HOPKINS: Rename methods in ObjectsManager, Globals and GraphicsManager
This commit is contained in:
parent
5678fbd321
commit
c1aafc9b47
@ -60,7 +60,7 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui
|
||||
return;
|
||||
|
||||
hasScreenCopy = false;
|
||||
screenP = _vm->_graphicsManager.VESA_SCREEN;
|
||||
screenP = _vm->_graphicsManager._vesaScreen;
|
||||
ptr = _vm->_globals.allocMemory(0x14u);
|
||||
|
||||
_vm->_fileManager.constructFilename(_vm->_globals.HOPANM, filename);
|
||||
@ -75,9 +75,9 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui
|
||||
f.read(screenP, nbytes);
|
||||
|
||||
if (_clearAnimationFl) {
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.Cls_Video();
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.clearScreen();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
}
|
||||
if (_vm->_graphicsManager.WinScan / 2 > SCREEN_WIDTH) {
|
||||
hasScreenCopy = true;
|
||||
@ -86,16 +86,16 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui
|
||||
}
|
||||
if (NO_SEQ) {
|
||||
if (hasScreenCopy)
|
||||
memcpy(screenCopy, _vm->_graphicsManager.VESA_BUFFER, 0x4B000u);
|
||||
memcpy(screenCopy, _vm->_graphicsManager._vesaBuffer, 0x4B000u);
|
||||
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
|
||||
} else {
|
||||
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
if (hasScreenCopy)
|
||||
_vm->_graphicsManager.m_scroll16A(screenCopy, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll16(screenP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.DD_VBL();
|
||||
}
|
||||
_vm->_eventsManager._rateCounter = 0;
|
||||
@ -141,7 +141,7 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui
|
||||
}
|
||||
|
||||
_vm->_eventsManager._rateCounter = 0;
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
if (hasScreenCopy) {
|
||||
if (*screenP != kByteStop) {
|
||||
_vm->_graphicsManager.Copy_WinScan_Vbe3(screenP, screenCopy);
|
||||
@ -150,7 +150,7 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui
|
||||
} else if (*screenP != kByteStop) {
|
||||
_vm->_graphicsManager.Copy_Video_Vbe16(screenP);
|
||||
}
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.DD_VBL();
|
||||
_vm->_soundManager.VERIF_SOUND();
|
||||
}
|
||||
@ -209,7 +209,7 @@ EXIT:
|
||||
_vm->_graphicsManager.FADE_LINUX = 0;
|
||||
f.close();
|
||||
ptr = _vm->_globals.freeMemory(ptr);
|
||||
_vm->_graphicsManager.NOLOCK = false;
|
||||
_vm->_graphicsManager._skipVideoLockFl = false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -237,13 +237,13 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint
|
||||
_vm->_fileManager.constructLinuxFilename("TEMP.SCR");
|
||||
|
||||
if (_vm->_graphicsManager.nbrligne == SCREEN_WIDTH)
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN, 0x4B000u);
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager._vesaScreen, 0x4B000u);
|
||||
else if (_vm->_graphicsManager.nbrligne == 1280)
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN, 0x96000u);
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager._vesaScreen, 0x96000u);
|
||||
if (!_vm->_graphicsManager.nbrligne)
|
||||
_vm->_graphicsManager.ofscroll = 0;
|
||||
|
||||
v12 = _vm->_graphicsManager.VESA_SCREEN;
|
||||
v12 = _vm->_graphicsManager._vesaScreen;
|
||||
v13 = _vm->_globals.allocMemory(0x14u);
|
||||
_vm->_fileManager.constructFilename(_vm->_globals.HOPANM, filename);
|
||||
|
||||
@ -266,10 +266,10 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint
|
||||
_vm->_graphicsManager.Cls_Pal();
|
||||
v11 = _vm->_graphicsManager.SCROLL;
|
||||
_vm->_graphicsManager.SCANLINE(SCREEN_WIDTH);
|
||||
_vm->_graphicsManager.SCROLL_ECRAN(0);
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.Cls_Video();
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.scrollScreen(0);
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.clearScreen();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.max_x = SCREEN_WIDTH;
|
||||
if (_vm->_graphicsManager.WinScan / 2 > SCREEN_WIDTH) {
|
||||
v8 = 1;
|
||||
@ -278,16 +278,16 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint
|
||||
}
|
||||
if (_vm->_animationManager.NO_SEQ) {
|
||||
if (v8 == 1)
|
||||
memcpy(ptr, _vm->_graphicsManager.VESA_BUFFER, 0x4B000u);
|
||||
memcpy(ptr, _vm->_graphicsManager._vesaBuffer, 0x4B000u);
|
||||
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
|
||||
} else {
|
||||
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
if (v8)
|
||||
_vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll16(v12, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.DD_VBL();
|
||||
}
|
||||
_vm->_eventsManager._rateCounter = 0;
|
||||
@ -304,37 +304,37 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint
|
||||
if (_vm->_eventsManager._rateCounter >= a2)
|
||||
goto LABEL_48;
|
||||
}
|
||||
if (_vm->_graphicsManager.NOLOCK == true)
|
||||
if (_vm->_graphicsManager._skipVideoLockFl == true)
|
||||
goto LABEL_114;
|
||||
if (v8 == 1)
|
||||
ptr = _vm->_globals.freeMemory(ptr);
|
||||
_vm->_globals.freeMemory(v13);
|
||||
f.close();
|
||||
|
||||
_vm->_saveLoadManager.bload("TEMP.SCR", _vm->_graphicsManager.VESA_SCREEN);
|
||||
_vm->_saveLoadManager.bload("TEMP.SCR", _vm->_graphicsManager._vesaScreen);
|
||||
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
|
||||
|
||||
memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 0x301u);
|
||||
_vm->_graphicsManager.Cls_Pal();
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.Cls_Video();
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.clearScreen();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.SCROLL = v11;
|
||||
_vm->_graphicsManager.SCROLL_ECRAN(v11);
|
||||
_vm->_graphicsManager.scrollScreen(v11);
|
||||
if (_vm->_graphicsManager.DOUBLE_ECRAN) {
|
||||
_vm->_graphicsManager.SCANLINE(0x500u);
|
||||
_vm->_graphicsManager.max_x = 1280;
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaBuffer, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
} else {
|
||||
_vm->_graphicsManager.SCANLINE(SCREEN_WIDTH * 2);
|
||||
_vm->_graphicsManager.max_x = SCREEN_WIDTH;
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.Cls_Video();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.clearScreen();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
LABEL_112:
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_eventsManager.VBL();
|
||||
_vm->_graphicsManager.FADE_INS();
|
||||
}
|
||||
@ -361,7 +361,7 @@ LABEL_48:
|
||||
break;
|
||||
LABEL_77:
|
||||
_vm->_eventsManager._rateCounter = 0;
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
if (v8) {
|
||||
if (*v12 != kByteStop) {
|
||||
_vm->_graphicsManager.Copy_WinScan_Vbe3(v12, ptr);
|
||||
@ -370,7 +370,7 @@ LABEL_77:
|
||||
} else if (*v12 != kByteStop) {
|
||||
_vm->_graphicsManager.Copy_Video_Vbe16(v12);
|
||||
}
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.DD_VBL();
|
||||
_vm->_soundManager.VERIF_SOUND();
|
||||
LABEL_88:
|
||||
@ -378,34 +378,34 @@ LABEL_88:
|
||||
if (_vm->_globals.iRegul == 1) {
|
||||
while (_vm->_eventsManager._escKeyFl != true) {
|
||||
if (redrawAnim() == true) {
|
||||
if (_vm->_graphicsManager.NOLOCK == true)
|
||||
if (_vm->_graphicsManager._skipVideoLockFl == true)
|
||||
goto LABEL_114;
|
||||
if (v8 == 1)
|
||||
ptr = _vm->_globals.freeMemory(ptr);
|
||||
_vm->_globals.freeMemory(v13);
|
||||
f.close();
|
||||
|
||||
_vm->_saveLoadManager.bload("TEMP.SCR", _vm->_graphicsManager.VESA_SCREEN);
|
||||
_vm->_saveLoadManager.bload("TEMP.SCR", _vm->_graphicsManager._vesaScreen);
|
||||
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
|
||||
|
||||
memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 0x301u);
|
||||
_vm->_graphicsManager.Cls_Pal();
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.Cls_Video();
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.clearScreen();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.SCROLL = v11;
|
||||
_vm->_graphicsManager.SCROLL_ECRAN(v11);
|
||||
_vm->_graphicsManager.scrollScreen(v11);
|
||||
if (_vm->_graphicsManager.DOUBLE_ECRAN) {
|
||||
_vm->_graphicsManager.SCANLINE(0x500u);
|
||||
_vm->_graphicsManager.max_x = 1280;
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaBuffer, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
} else {
|
||||
_vm->_graphicsManager.SCANLINE(SCREEN_WIDTH * 2);
|
||||
_vm->_graphicsManager.max_x = SCREEN_WIDTH;
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.Cls_Video();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.clearScreen();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
goto LABEL_112;
|
||||
}
|
||||
@ -420,34 +420,34 @@ LABEL_88:
|
||||
}
|
||||
while (_vm->_eventsManager._escKeyFl != true) {
|
||||
if (redrawAnim() == true) {
|
||||
if (_vm->_graphicsManager.NOLOCK == true)
|
||||
if (_vm->_graphicsManager._skipVideoLockFl == true)
|
||||
break;
|
||||
if (v8 == 1)
|
||||
ptr = _vm->_globals.freeMemory(ptr);
|
||||
_vm->_globals.freeMemory(v13);
|
||||
f.close();
|
||||
|
||||
_vm->_saveLoadManager.bload("TEMP.SCR", _vm->_graphicsManager.VESA_SCREEN);
|
||||
_vm->_saveLoadManager.bload("TEMP.SCR", _vm->_graphicsManager._vesaScreen);
|
||||
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
|
||||
|
||||
memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 0x301u);
|
||||
_vm->_graphicsManager.Cls_Pal();
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.Cls_Video();
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.clearScreen();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.SCROLL = v11;
|
||||
_vm->_graphicsManager.SCROLL_ECRAN(v11);
|
||||
_vm->_graphicsManager.scrollScreen(v11);
|
||||
if (_vm->_graphicsManager.DOUBLE_ECRAN) {
|
||||
_vm->_graphicsManager.SCANLINE(0x500u);
|
||||
_vm->_graphicsManager.max_x = 1280;
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaBuffer, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
} else {
|
||||
_vm->_graphicsManager.SCANLINE(SCREEN_WIDTH * 2);
|
||||
_vm->_graphicsManager.max_x = SCREEN_WIDTH;
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.Cls_Video();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.clearScreen();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
goto LABEL_112;
|
||||
}
|
||||
@ -457,7 +457,7 @@ LABEL_88:
|
||||
goto LABEL_77;
|
||||
}
|
||||
LABEL_114:
|
||||
_vm->_graphicsManager.NOLOCK = false;
|
||||
_vm->_graphicsManager._skipVideoLockFl = false;
|
||||
f.close();
|
||||
|
||||
if (_vm->_graphicsManager.FADE_LINUX == 2 && !v8) {
|
||||
@ -506,29 +506,29 @@ LABEL_114:
|
||||
_vm->_graphicsManager.FADE_LINUX = 0;
|
||||
_vm->_globals.freeMemory(v13);
|
||||
|
||||
_vm->_saveLoadManager.bload("TEMP.SCR", _vm->_graphicsManager.VESA_SCREEN);
|
||||
_vm->_saveLoadManager.bload("TEMP.SCR", _vm->_graphicsManager._vesaScreen);
|
||||
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
|
||||
|
||||
memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 0x301u);
|
||||
_vm->_graphicsManager.Cls_Pal();
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.Cls_Video();
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.clearScreen();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.SCROLL = v11;
|
||||
_vm->_graphicsManager.SCROLL_ECRAN(v11);
|
||||
_vm->_graphicsManager.scrollScreen(v11);
|
||||
if (_vm->_graphicsManager.DOUBLE_ECRAN) {
|
||||
_vm->_graphicsManager.SCANLINE(0x500u);
|
||||
_vm->_graphicsManager.max_x = 1280;
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaBuffer, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
} else {
|
||||
_vm->_graphicsManager.SCANLINE(SCREEN_WIDTH);
|
||||
_vm->_graphicsManager.max_x = SCREEN_WIDTH;
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.Cls_Video();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.clearScreen();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.FADE_INS();
|
||||
_vm->_graphicsManager.DD_VBL();
|
||||
}
|
||||
@ -828,13 +828,13 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
|
||||
|
||||
_vm->_fileManager.constructLinuxFilename("TEMP.SCR");
|
||||
if (_vm->_graphicsManager.nbrligne == SCREEN_WIDTH)
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN, 0x4B000u);
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager._vesaScreen, 0x4B000u);
|
||||
else if (_vm->_graphicsManager.nbrligne == (SCREEN_WIDTH * 2))
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN, 0x96000u);
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager._vesaScreen, 0x96000u);
|
||||
if (!_vm->_graphicsManager.nbrligne)
|
||||
_vm->_graphicsManager.ofscroll = 0;
|
||||
}
|
||||
v9 = _vm->_graphicsManager.VESA_SCREEN;
|
||||
v9 = _vm->_graphicsManager._vesaScreen;
|
||||
v10 = _vm->_globals.allocMemory(0x16u);
|
||||
_vm->_fileManager.constructFilename(_vm->_globals.HOPSEQ, file);
|
||||
if (!f.open(_vm->_globals.NFICHIER))
|
||||
@ -854,7 +854,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
|
||||
}
|
||||
if (_vm->_animationManager.NO_SEQ) {
|
||||
if (v7 == 1)
|
||||
memcpy(ptr, _vm->_graphicsManager.VESA_BUFFER, 0x4B000u);
|
||||
memcpy(ptr, _vm->_graphicsManager._vesaBuffer, 0x4B000u);
|
||||
if (!_vm->getIsDemo()) {
|
||||
_vm->_graphicsManager.SETCOLOR3(252, 100, 100, 100);
|
||||
_vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100);
|
||||
@ -863,12 +863,12 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
|
||||
}
|
||||
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
|
||||
} else {
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
if (v7)
|
||||
_vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll16(v9, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.DD_VBL();
|
||||
}
|
||||
if (_vm->getIsDemo()) {
|
||||
@ -930,7 +930,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
|
||||
} while (_vm->_eventsManager._rateCounter < rate2);
|
||||
}
|
||||
_vm->_eventsManager._rateCounter = 0;
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
if (v7) {
|
||||
if (*v9 != kByteStop) {
|
||||
_vm->_graphicsManager.Copy_WinScan_Vbe(v9, ptr);
|
||||
@ -939,7 +939,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
|
||||
} else if (*v9 != kByteStop) {
|
||||
_vm->_graphicsManager.Copy_Video_Vbe16a(v9);
|
||||
}
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.DD_VBL();
|
||||
_vm->_soundManager.VERIF_SOUND();
|
||||
}
|
||||
@ -958,11 +958,11 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
|
||||
}
|
||||
_vm->_eventsManager._rateCounter = 0;
|
||||
LABEL_59:
|
||||
_vm->_graphicsManager.NOLOCK = false;
|
||||
_vm->_graphicsManager._skipVideoLockFl = false;
|
||||
f.close();
|
||||
|
||||
if (!NO_COUL) {
|
||||
_vm->_saveLoadManager.bload("TEMP.SCR", _vm->_graphicsManager.VESA_SCREEN);
|
||||
_vm->_saveLoadManager.bload("TEMP.SCR", _vm->_graphicsManager._vesaScreen);
|
||||
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
|
||||
|
||||
_vm->_eventsManager._mouseFl = true;
|
||||
@ -991,7 +991,7 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u
|
||||
return;
|
||||
|
||||
_vm->_eventsManager._mouseFl = false;
|
||||
v10 = _vm->_graphicsManager.VESA_SCREEN;
|
||||
v10 = _vm->_graphicsManager._vesaScreen;
|
||||
v11 = _vm->_globals.allocMemory(0x16u);
|
||||
_vm->_fileManager.constructFilename(_vm->_globals.HOPSEQ, file);
|
||||
|
||||
@ -1018,17 +1018,17 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u
|
||||
if (_vm->_animationManager.NO_SEQ) {
|
||||
if (v7 == 1) {
|
||||
assert(ptr != NULL);
|
||||
memcpy((void *)ptr, _vm->_graphicsManager.VESA_BUFFER, 0x4B000u);
|
||||
memcpy((void *)ptr, _vm->_graphicsManager._vesaBuffer, 0x4B000u);
|
||||
}
|
||||
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
|
||||
} else {
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
|
||||
if (v7)
|
||||
_vm->_graphicsManager.m_scroll16A(ptr, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll16(v10, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.DD_VBL();
|
||||
}
|
||||
_vm->_eventsManager._rateCounter = 0;
|
||||
@ -1047,7 +1047,7 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u
|
||||
goto LABEL_23;
|
||||
}
|
||||
LABEL_48:
|
||||
if (_vm->_graphicsManager.NOLOCK == true)
|
||||
if (_vm->_graphicsManager._skipVideoLockFl == true)
|
||||
goto LABEL_54;
|
||||
if (v7 == 1)
|
||||
ptr = _vm->_globals.freeMemory(ptr);
|
||||
@ -1074,7 +1074,7 @@ LABEL_23:
|
||||
break;
|
||||
LABEL_33:
|
||||
_vm->_eventsManager._rateCounter = 0;
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
if (v7) {
|
||||
if (*v10 != kByteStop) {
|
||||
_vm->_graphicsManager.Copy_WinScan_Vbe(v10, ptr);
|
||||
@ -1083,7 +1083,7 @@ LABEL_33:
|
||||
} else if (*v10 != kByteStop) {
|
||||
_vm->_graphicsManager.Copy_Video_Vbe16a(v10);
|
||||
}
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.DD_VBL();
|
||||
_vm->_soundManager.VERIF_SOUND();
|
||||
LABEL_44:
|
||||
|
@ -71,9 +71,9 @@ void ComputerManager::setVideoMode() {
|
||||
*/
|
||||
void ComputerManager::setTextMode() {
|
||||
_vm->_graphicsManager.Cls_Pal();
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.Cls_Video();
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.clearScreen();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
//SET_MODE(SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
|
||||
_vm->_graphicsManager.nbrligne = SCREEN_WIDTH;
|
||||
@ -82,7 +82,7 @@ void ComputerManager::setTextMode() {
|
||||
_vm->_globals.police = _vm->_fileManager.loadFile(_vm->_globals.NFICHIER);
|
||||
_vm->_globals.police_l = 8;
|
||||
_vm->_globals.police_h = 8;
|
||||
_vm->_graphicsManager.LOAD_IMAGE("WINTEXT");
|
||||
_vm->_graphicsManager.loadImage("WINTEXT");
|
||||
_vm->_graphicsManager.FADE_INW();
|
||||
loadMenu();
|
||||
_vm->_eventsManager._mouseFl = false;
|
||||
@ -92,7 +92,7 @@ void ComputerManager::setTextMode() {
|
||||
* Clear the screen
|
||||
*/
|
||||
void ComputerManager::clearScreen() {
|
||||
_vm->_graphicsManager.LOAD_IMAGE("WINTEXT");
|
||||
_vm->_graphicsManager.loadImage("WINTEXT");
|
||||
_vm->_graphicsManager.FADE_INW();
|
||||
}
|
||||
|
||||
@ -284,9 +284,9 @@ void ComputerManager::showComputer(ComputerEnum mode) {
|
||||
}
|
||||
}
|
||||
}
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.Cls_Video();
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.clearScreen();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.DD_VBL();
|
||||
restoreFBIRoom();
|
||||
} else {
|
||||
@ -297,10 +297,10 @@ void ComputerManager::showComputer(ComputerEnum mode) {
|
||||
_vm->_eventsManager.VBL();
|
||||
_vm->_eventsManager.delay(1000);
|
||||
|
||||
memset(_vm->_graphicsManager.VESA_BUFFER, 0, 0x4AFFFu);
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.Cls_Video();
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
memset(_vm->_graphicsManager._vesaBuffer, 0, 0x4AFFFu);
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.clearScreen();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.DD_VBL();
|
||||
restoreFBIRoom();
|
||||
_vm->_eventsManager.mouseOff();
|
||||
@ -452,13 +452,13 @@ void ComputerManager::TXT4(int xp, int yp, int textIdx) {
|
||||
_inputBuf[textIndex--] = 0;
|
||||
x1 -= _vm->_globals.police_l;
|
||||
x2 = x1 + 2 * _vm->_globals.police_l;
|
||||
_vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager.VESA_SCREEN, x1, yp, 3 * _vm->_globals.police_l, 12, _vm->_graphicsManager.VESA_BUFFER, x1, yp);
|
||||
_vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager._vesaScreen, x1, yp, 3 * _vm->_globals.police_l, 12, _vm->_graphicsManager._vesaBuffer, x1, yp);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(x1, yp, x2, yp + 12);
|
||||
_vm->_fontManager.displayTextVesa(x1, yp, "_", -4);
|
||||
}
|
||||
if (mappedChar != '*') {
|
||||
newChar = mappedChar;
|
||||
_vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager.VESA_SCREEN, x1, yp, _vm->_globals.police_l, 12, _vm->_graphicsManager.VESA_BUFFER, x1, yp);
|
||||
_vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager._vesaScreen, x1, yp, _vm->_globals.police_l, 12, _vm->_graphicsManager._vesaBuffer, x1, yp);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(x1, yp, _vm->_globals.police_l + x1, yp + 12);
|
||||
_inputBuf[textIndex] = newChar;
|
||||
|
||||
@ -470,8 +470,8 @@ void ComputerManager::TXT4(int xp, int yp, int textIdx) {
|
||||
_vm->_eventsManager.VBL();
|
||||
} while (textIndex != textIdx && curChar != 13);
|
||||
|
||||
_vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager.VESA_SCREEN, x1, yp, _vm->_globals.police_l,
|
||||
12, _vm->_graphicsManager.VESA_BUFFER, x1, yp);
|
||||
_vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager._vesaScreen, x1, yp, _vm->_globals.police_l,
|
||||
12, _vm->_graphicsManager._vesaBuffer, x1, yp);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(x1, yp, _vm->_globals.police_l + x1, yp + 12);
|
||||
|
||||
_vm->_eventsManager.VBL();
|
||||
@ -670,9 +670,9 @@ void ComputerManager::loadHiscore() {
|
||||
* VGA 256 col
|
||||
*/
|
||||
void ComputerManager::setModeVGA256() {
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.Cls_Video();
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.clearScreen();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.Cls_Pal();
|
||||
_vm->_graphicsManager.SCANLINE(0x140u);
|
||||
}
|
||||
@ -689,7 +689,7 @@ void ComputerManager::newLevel() {
|
||||
++_breakoutLives;
|
||||
if (_breakoutLives > 11)
|
||||
_breakoutLives = 11;
|
||||
_vm->_graphicsManager.LOAD_IMAGEVGA("CASSEF.PCX");
|
||||
_vm->_graphicsManager.loadVgaImage("CASSEF.PCX");
|
||||
displayLives();
|
||||
_breakoutLevel = (int16 *)_vm->_globals.freeMemory((byte *)_breakoutLevel);
|
||||
|
||||
@ -885,7 +885,7 @@ int ComputerManager::displayHiscores() {
|
||||
|
||||
_vm->_graphicsManager.RESET_SEGMENT_VESA();
|
||||
loadHiscore();
|
||||
_vm->_graphicsManager.LOAD_IMAGEVGA("HISCORE.PCX");
|
||||
_vm->_graphicsManager.loadVgaImage("HISCORE.PCX");
|
||||
_vm->_fileManager.constructFilename(_vm->_globals.HOPSYSTEM, "ALPHA.SPR");
|
||||
ptr = _vm->_fileManager.loadFile(_vm->_globals.NFICHIER);
|
||||
_vm->_graphicsManager.SETCOLOR3(252, 100, 100, 100);
|
||||
@ -936,7 +936,7 @@ void ComputerManager::getScoreName() {
|
||||
char curChar;
|
||||
byte *ptr;
|
||||
|
||||
_vm->_graphicsManager.LOAD_IMAGEVGA("NAME.PCX");
|
||||
_vm->_graphicsManager.loadVgaImage("NAME.PCX");
|
||||
_vm->_graphicsManager.SETCOLOR3(252, 100, 100, 100);
|
||||
_vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100);
|
||||
_vm->_graphicsManager.SETCOLOR3(251, 100, 100, 100);
|
||||
|
@ -240,10 +240,10 @@ void DialogsManager::showOptionsDialog() {
|
||||
doneFlag = true;
|
||||
}
|
||||
|
||||
if (!_vm->_graphicsManager.MANU_SCROLL)
|
||||
_vm->_globals.opt_scrtype = 2;
|
||||
else if (_vm->_graphicsManager.MANU_SCROLL == 1)
|
||||
if (_vm->_graphicsManager.MANU_SCROLL)
|
||||
_vm->_globals.opt_scrtype = 1;
|
||||
else
|
||||
_vm->_globals.opt_scrtype = 2;
|
||||
|
||||
if (_vm->_globals._speed == 1)
|
||||
_vm->_globals.opt_vitesse = 6;
|
||||
@ -292,8 +292,8 @@ void DialogsManager::showOptionsDialog() {
|
||||
_vm->_eventsManager.VBL();
|
||||
} while (!doneFlag);
|
||||
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager.VESA_SCREEN, _vm->_graphicsManager.ofscroll + 164,
|
||||
107, 335, 215, _vm->_graphicsManager.VESA_BUFFER, _vm->_graphicsManager.ofscroll + 164, 107);
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager._vesaScreen, _vm->_graphicsManager.ofscroll + 164,
|
||||
107, 335, 215, _vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager.ofscroll + 164, 107);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_graphicsManager.ofscroll + 164, 107,
|
||||
_vm->_graphicsManager.ofscroll + 498, 320);
|
||||
|
||||
@ -349,7 +349,7 @@ LABEL_7:
|
||||
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._inventWin1,
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_dialogsManager._inventWin1,
|
||||
v19 + 300, 414, 0, 0, 0, 0);
|
||||
int v15 = 0;
|
||||
int v4 = 0;
|
||||
@ -360,7 +360,7 @@ LABEL_7:
|
||||
int v6 = _vm->_globals._inventory[v4];
|
||||
if (v6 && v4 <= 29) {
|
||||
byte *v7 = _vm->_objectsManager.CAPTURE_OBJET(v6, 0);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, v7, v19 + v16 + 6,
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, v7, v19 + v16 + 6,
|
||||
v15 + 120, _vm->_globals.OBJL, _vm->_globals.OBJH);
|
||||
_vm->_globals.freeMemory(v7);
|
||||
}
|
||||
@ -368,7 +368,7 @@ LABEL_7:
|
||||
};
|
||||
v15 += 38;
|
||||
}
|
||||
_vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_dialogsManager._inventWin1, _inventX, _inventY, _inventWidth, _inventHeight);
|
||||
_vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager._vesaBuffer, _vm->_dialogsManager._inventWin1, _inventX, _inventY, _inventWidth, _inventHeight);
|
||||
_vm->_eventsManager._curMouseButton = 0;
|
||||
bool v20 = false;
|
||||
int v13 = 0;
|
||||
@ -444,7 +444,7 @@ LABEL_7:
|
||||
if (_inventDisplayedFl) {
|
||||
_inventDisplayedFl = false;
|
||||
// v9 = 114;
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager.VESA_SCREEN, v19, 114, v18, v17, _vm->_graphicsManager.VESA_BUFFER, v19, 114);
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager._vesaScreen, v19, 114, v18, v17, _vm->_graphicsManager._vesaBuffer, v19, 114);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(v19, 114, v19 + v18, v18 + 114);
|
||||
_vm->_objectsManager.BOBTOUS = true;
|
||||
}
|
||||
@ -474,8 +474,8 @@ LABEL_7:
|
||||
void DialogsManager::inventAnim() {
|
||||
if (!_vm->_globals._disableInventFl) {
|
||||
if (_vm->_objectsManager.FLAG_VISIBLE_EFFACE && !_vm->_objectsManager._visibleFl) {
|
||||
_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);
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager._vesaScreen, _vm->_objectsManager.I_old_x, 27, 48, 38,
|
||||
_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager.I_old_x, 27);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_objectsManager.I_old_x, 27, _vm->_objectsManager.I_old_x + 48, 65);
|
||||
--_vm->_objectsManager.FLAG_VISIBLE_EFFACE;
|
||||
}
|
||||
@ -483,32 +483,32 @@ void DialogsManager::inventAnim() {
|
||||
if (_vm->_objectsManager._visibleFl) {
|
||||
if (_vm->_objectsManager.I_old_x <= 1)
|
||||
_vm->_objectsManager.I_old_x = 2;
|
||||
_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);
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager._vesaScreen, _vm->_objectsManager.I_old_x, 27, 48, 38,
|
||||
_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager.I_old_x, 27);
|
||||
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_objectsManager.I_old_x, 27, _vm->_objectsManager.I_old_x + 48, 65);
|
||||
int v0 = _vm->_graphicsManager.ofscroll + 2;
|
||||
int v1 = _vm->_graphicsManager.ofscroll + 2;
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.ICONE, v1 + 300, 327, 0);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals.ICONE, v1 + 300, 327, 0);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(v1, 27, v1 + 45, 62);
|
||||
_vm->_objectsManager.I_old_x = v0;
|
||||
}
|
||||
|
||||
if (_vm->_globals.SAUVEGARDE->data[svField357] == 1) {
|
||||
if (_vm->_globals.SAUVEGARDE->data[svField353] == 1)
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.TETE, 832, 325, 0, 0, 0, 0);
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.TETE, 832, 325, 0, 0, 0, 0);
|
||||
if (_vm->_globals.SAUVEGARDE->data[svField355] == 1)
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.TETE, 866, 325, 1, 0, 0, 0);
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.TETE, 866, 325, 1, 0, 0, 0);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(532, 25, 560, 60);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(566, 25, 594, 60);
|
||||
}
|
||||
if (_vm->_globals.SAUVEGARDE->data[svField356] == 1) {
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.TETE, 832, 325, 0, 0, 0, 0);
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.TETE, 832, 325, 0, 0, 0, 0);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(532, 25, 560, 60);
|
||||
}
|
||||
|
||||
if (_vm->_globals.SAUVEGARDE->data[svField354] == 1) {
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.TETE, 832, 325, 0, 0, 0, 0);
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _vm->_globals.TETE, 832, 325, 0, 0, 0, 0);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(532, 25, 560, 60);
|
||||
}
|
||||
}
|
||||
@ -571,7 +571,7 @@ void DialogsManager::showLoadGame() {
|
||||
} while (_vm->_eventsManager.getMouseButton() != 1);
|
||||
} while (!slotNumber);
|
||||
_vm->_objectsManager.SL_FLAG = false;
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x + 183, 60, 274, 353, _vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x + 183, 60);
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager._startPos.x + 183, 60, 274, 353, _vm->_graphicsManager._vesaBuffer, _vm->_eventsManager._startPos.x + 183, 60);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_eventsManager._startPos.x + 183, 60, 457, 413);
|
||||
_vm->_objectsManager.BOBTOUS = true;
|
||||
_vm->_objectsManager.SL_SPR = _vm->_globals.freeMemory(_vm->_objectsManager.SL_SPR);
|
||||
@ -604,7 +604,7 @@ void DialogsManager::showSaveGame() {
|
||||
} while (!_vm->shouldQuit() && !slotNumber);
|
||||
|
||||
_vm->_objectsManager.SL_FLAG = false;
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x + 183, 60, 274, 353, _vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x + 183, 60);
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager._startPos.x + 183, 60, 274, 353, _vm->_graphicsManager._vesaBuffer, _vm->_eventsManager._startPos.x + 183, 60);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_eventsManager._startPos.x + 183, 60, _vm->_eventsManager._startPos.x + 457, 413);
|
||||
_vm->_objectsManager.BOBTOUS = true;
|
||||
_vm->_objectsManager.SL_SPR = _vm->_globals.freeMemory(_vm->_objectsManager.SL_SPR);
|
||||
@ -644,18 +644,18 @@ void DialogsManager::showSaveLoad(int a1) {
|
||||
_vm->_objectsManager.SL_SPR = _vm->_objectsManager.loadSprite(_vm->_globals.NFICHIER);
|
||||
_vm->_fileManager.constructFilename(_vm->_globals.HOPSYSTEM, "SAVE2.SPR");
|
||||
_vm->_objectsManager.SL_SPR2 = _vm->_objectsManager.loadSprite(_vm->_globals.NFICHIER);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 483, 360, 0);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 483, 360, 0);
|
||||
|
||||
if (_vm->_globals.FR) {
|
||||
if (a1 == 1)
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 525, 375, 1);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 525, 375, 1);
|
||||
if (a1 == 2)
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 515, 375, 2);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 515, 375, 2);
|
||||
} else {
|
||||
if (a1 == 1)
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 535, 372, 1);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 535, 372, 1);
|
||||
if (a1 == 2)
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 539, 372, 2);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 539, 372, 2);
|
||||
}
|
||||
|
||||
for (slotNumber = 1; slotNumber <= 6; ++slotNumber) {
|
||||
@ -667,22 +667,22 @@ void DialogsManager::showSaveLoad(int a1) {
|
||||
|
||||
switch (slotNumber) {
|
||||
case 1:
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager._startPos.x + 190, 112, 0x80u, 87);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 190, 112, 0x80u, 87);
|
||||
break;
|
||||
case 2:
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager._startPos.x + 323, 112, 0x80u, 87);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 323, 112, 0x80u, 87);
|
||||
break;
|
||||
case 3:
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager._startPos.x + 190, 203, 0x80u, 87);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 190, 203, 0x80u, 87);
|
||||
break;
|
||||
case 4:
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager._startPos.x + 323, 203, 0x80u, 87);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 323, 203, 0x80u, 87);
|
||||
break;
|
||||
case 5:
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager._startPos.x + 190, 294, 0x80u, 87);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 190, 294, 0x80u, 87);
|
||||
break;
|
||||
case 6:
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager._startPos.x + 323, 294, 0x80u, 87);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 323, 294, 0x80u, 87);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -692,7 +692,7 @@ void DialogsManager::showSaveLoad(int a1) {
|
||||
}
|
||||
}
|
||||
|
||||
_vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 183, 60, 0x112u, 353);
|
||||
_vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 183, 60, 0x112u, 353);
|
||||
_vm->_objectsManager.SL_FLAG = true;
|
||||
_vm->_objectsManager.SL_MODE = a1;
|
||||
_vm->_objectsManager.SL_X = 0;
|
||||
|
@ -316,18 +316,18 @@ void EventsManager::VBL() {
|
||||
int yp = 0;
|
||||
|
||||
if (_vm->_graphicsManager.REDRAW) {
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
if (_breakoutFl) {
|
||||
_vm->_graphicsManager.CopyAsm(_vm->_graphicsManager.VESA_BUFFER);
|
||||
_vm->_graphicsManager.CopyAsm(_vm->_graphicsManager._vesaBuffer);
|
||||
_vm->_graphicsManager.REDRAW = 0;
|
||||
} else {
|
||||
if (_vm->_globals.iRegul == 3)
|
||||
_vm->_graphicsManager.m_scroll(_vm->_graphicsManager.VESA_BUFFER, _vm->_graphicsManager.ofscroll, 50, 0x280u, 340, 0, 50);
|
||||
_vm->_graphicsManager.m_scroll(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager.ofscroll, 50, 0x280u, 340, 0, 50);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll(_vm->_graphicsManager.VESA_BUFFER, _vm->_graphicsManager.ofscroll, 20, 0x280u, 440, 0, 20);
|
||||
_vm->_graphicsManager.m_scroll(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager.ofscroll, 20, 0x280u, 440, 0, 20);
|
||||
--_vm->_graphicsManager.REDRAW;
|
||||
}
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
}
|
||||
if (_mouseFl == true) {
|
||||
v1 = 20;
|
||||
@ -441,9 +441,9 @@ LABEL_65:
|
||||
_vm->_graphicsManager.Affiche_Segment_Vesa();
|
||||
} else {
|
||||
_vm->_fontManager.hideText(9);
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_graphicsManager.SCROLL, 20, SCREEN_WIDTH, 440, 0, 20);
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager.SCROLL, 20, SCREEN_WIDTH, 440, 0, 20);
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
_vm->_graphicsManager.dstrect[0] = Common::Rect(0, 20, SCREEN_WIDTH, 460);
|
||||
|
||||
if (_vm->_globals.NBBLOC) {
|
||||
|
@ -156,7 +156,7 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in
|
||||
int height = _text[idx]._height;
|
||||
int width = _text[idx]._width;
|
||||
_vm->_graphicsManager.Restore_Mem(
|
||||
_vm->_graphicsManager.VESA_BUFFER,
|
||||
_vm->_graphicsManager._vesaBuffer,
|
||||
_text[idx]._textBlock,
|
||||
xp,
|
||||
yp,
|
||||
@ -393,15 +393,15 @@ LABEL_57:
|
||||
if (ptrd == g_PTRNUL) {
|
||||
error("Cutting a block for text box (%d)", v49);
|
||||
}
|
||||
_vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager.VESA_BUFFER, ptrd, v56, v55, v53, v51);
|
||||
_vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager._vesaBuffer, ptrd, v56, v55, v53, v51);
|
||||
_vm->_graphicsManager.Trans_bloc2(ptrd, _vm->_graphicsManager.TABLE_COUL, v49);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, ptrd, v56, v55, v53, v51);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, ptrd, v56, v55, v53, v51);
|
||||
_vm->_globals.freeMemory(ptrd);
|
||||
|
||||
_vm->_graphicsManager.drawHorizontalLine(_vm->_graphicsManager.VESA_BUFFER, v56, v55, v53, (byte)-2);
|
||||
_vm->_graphicsManager.drawHorizontalLine(_vm->_graphicsManager.VESA_BUFFER, v56, v51 + v55, v53, (byte)-2);
|
||||
_vm->_graphicsManager.drawVerticalLine(_vm->_graphicsManager.VESA_BUFFER, v56, v70, v51, (byte)-2);
|
||||
_vm->_graphicsManager.drawVerticalLine(_vm->_graphicsManager.VESA_BUFFER, v53 + v56, v70, v51, (byte)-2);
|
||||
_vm->_graphicsManager.drawHorizontalLine(_vm->_graphicsManager._vesaBuffer, v56, v55, v53, (byte)-2);
|
||||
_vm->_graphicsManager.drawHorizontalLine(_vm->_graphicsManager._vesaBuffer, v56, v51 + v55, v53, (byte)-2);
|
||||
_vm->_graphicsManager.drawVerticalLine(_vm->_graphicsManager._vesaBuffer, v56, v70, v51, (byte)-2);
|
||||
_vm->_graphicsManager.drawVerticalLine(_vm->_graphicsManager._vesaBuffer, v53 + v56, v70, v51, (byte)-2);
|
||||
}
|
||||
_text[idx]._lineCount = lineCount;
|
||||
int v75 = v73 + 5;
|
||||
@ -430,7 +430,7 @@ LABEL_57:
|
||||
_text[idx]._textBlock = ptre;
|
||||
_text[idx]._width = blockWidth;
|
||||
_text[idx]._height = blockHeight;
|
||||
_vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager.VESA_BUFFER, _text[idx]._textBlock, v56, v55, _text[idx]._width, blockHeight);
|
||||
_vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager._vesaBuffer, _text[idx]._textBlock, v56, v55, _text[idx]._width, blockHeight);
|
||||
}
|
||||
_tempText = _vm->_globals.freeMemory(_tempText);
|
||||
}
|
||||
@ -452,7 +452,7 @@ void FontManager::displayTextVesa(int xp, int yp, const Common::String &message,
|
||||
break;
|
||||
if (currChar >= 32) {
|
||||
charIndex = currChar - 32;
|
||||
_vm->_graphicsManager.Affiche_Fonte(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.police,
|
||||
_vm->_graphicsManager.Affiche_Fonte(_vm->_graphicsManager._vesaBuffer, _vm->_globals.police,
|
||||
currentX, yp, currChar - 32, col);
|
||||
currentX += _vm->_objectsManager.getWidth(_vm->_globals.police, charIndex);
|
||||
}
|
||||
@ -470,7 +470,7 @@ void FontManager::displayText(int xp, int yp, const Common::String &message, int
|
||||
|
||||
if (currentChar > 31) {
|
||||
int characterIndex = currentChar - 32;
|
||||
_vm->_graphicsManager.Affiche_Fonte(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.police,
|
||||
_vm->_graphicsManager.Affiche_Fonte(_vm->_graphicsManager._vesaBuffer, _vm->_globals.police,
|
||||
xp, yp, characterIndex, col);
|
||||
xp += _vm->_objectsManager.getWidth(_vm->_globals.police, characterIndex);
|
||||
}
|
||||
@ -502,7 +502,7 @@ void FontManager::TEXT_COMPUT(int xp, int yp, const Common::String &msg, int col
|
||||
break;
|
||||
if (v7 >= 32) {
|
||||
v5 = v7 - 32;
|
||||
_vm->_graphicsManager.Affiche_Fonte(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.police, v9, yp, v7 - 32, fontCol);
|
||||
_vm->_graphicsManager.Affiche_Fonte(_vm->_graphicsManager._vesaBuffer, _vm->_globals.police, v9, yp, v7 - 32, fontCol);
|
||||
v9 += _vm->_objectsManager.getWidth(_vm->_globals.police, v5);
|
||||
v6 = _vm->_objectsManager.getWidth(_vm->_globals.police, v5);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(v9 - v6, yp, v9, yp + 12);
|
||||
|
@ -171,7 +171,7 @@ Globals::Globals() {
|
||||
AFFIVBL = false;
|
||||
NOT_VERIF = 0;
|
||||
PERSO_TYPE = 0;
|
||||
GOACTION = 0;
|
||||
GOACTION = false;
|
||||
NECESSAIRE = false;
|
||||
Compteur = 0;
|
||||
ACTION_SENS = 0;
|
||||
@ -555,7 +555,7 @@ void Globals::CACHE_ADD(int idx) {
|
||||
}
|
||||
|
||||
// Load Cache
|
||||
void Globals::CHARGE_CACHE(const Common::String &file) {
|
||||
void Globals::loadCache(const Common::String &file) {
|
||||
byte *v2 = g_PTRNUL;
|
||||
byte *spriteData;
|
||||
byte *ptr;
|
||||
|
@ -444,7 +444,7 @@ public:
|
||||
bool NOPARLE;
|
||||
bool PLAN_FLAG;
|
||||
bool NECESSAIRE;
|
||||
int GOACTION;
|
||||
bool GOACTION;
|
||||
int Compteur;
|
||||
int ACTION_SENS;
|
||||
int SegmentEnCours;
|
||||
@ -499,7 +499,7 @@ public:
|
||||
void CACHE_OFF(int v1 = 0);
|
||||
void CACHE_SUB(int idx);
|
||||
void CACHE_ADD(int idx);
|
||||
void CHARGE_CACHE(const Common::String &file);
|
||||
void loadCache(const Common::String &file);
|
||||
void B_CACHE_OFF(int idx);
|
||||
};
|
||||
|
||||
|
@ -34,14 +34,14 @@
|
||||
namespace Hopkins {
|
||||
|
||||
GraphicsManager::GraphicsManager() {
|
||||
_lockCtr = 0;
|
||||
_lockCounter = 0;
|
||||
SDL_MODEYES = false;
|
||||
XSCREEN = YSCREEN = 0;
|
||||
WinScan = 0;
|
||||
PAL_PIXELS = NULL;
|
||||
nbrligne = 0;
|
||||
Linear = false;
|
||||
VideoPtr = NULL;
|
||||
_videoPtr = NULL;
|
||||
ofscroll = 0;
|
||||
SCROLL = 0;
|
||||
PCX_L = PCX_H = 0;
|
||||
@ -53,7 +53,7 @@ GraphicsManager::GraphicsManager() {
|
||||
Agr_Flag_x = Agr_Flag_y = 0;
|
||||
FADESPD = 15;
|
||||
FADE_LINUX = 0;
|
||||
NOLOCK = false;
|
||||
_skipVideoLockFl = false;
|
||||
no_scroll = 0;
|
||||
REDRAW = false;
|
||||
min_x = 0;
|
||||
@ -78,8 +78,8 @@ GraphicsManager::GraphicsManager() {
|
||||
}
|
||||
|
||||
GraphicsManager::~GraphicsManager() {
|
||||
_vm->_globals.freeMemory(VESA_SCREEN);
|
||||
_vm->_globals.freeMemory(VESA_BUFFER);
|
||||
_vm->_globals.freeMemory(_vesaScreen);
|
||||
_vm->_globals.freeMemory(_vesaBuffer);
|
||||
}
|
||||
|
||||
void GraphicsManager::setParent(HopkinsEngine *vm) {
|
||||
@ -88,26 +88,26 @@ void GraphicsManager::setParent(HopkinsEngine *vm) {
|
||||
if (_vm->getIsDemo()) {
|
||||
if (_vm->getPlatform() == Common::kPlatformLinux)
|
||||
// CHECKME: Should be 0?
|
||||
MANU_SCROLL = 1;
|
||||
MANU_SCROLL = true;
|
||||
else
|
||||
MANU_SCROLL = 0;
|
||||
MANU_SCROLL = false;
|
||||
SPEED_SCROLL = 16;
|
||||
} else {
|
||||
MANU_SCROLL = 0;
|
||||
MANU_SCROLL = false;
|
||||
SPEED_SCROLL = 32;
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsManager::SET_MODE(int width, int height) {
|
||||
void GraphicsManager::setGraphicalMode(int width, int height) {
|
||||
if (!SDL_MODEYES) {
|
||||
Graphics::PixelFormat pixelFormat16(2, 5, 6, 5, 0, 11, 5, 0, 0);
|
||||
initGraphics(width, height, true, &pixelFormat16);
|
||||
|
||||
// Init surfaces
|
||||
VESA_SCREEN = _vm->_globals.allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
|
||||
VESA_BUFFER = _vm->_globals.allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
|
||||
_vesaScreen = _vm->_globals.allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
|
||||
_vesaBuffer = _vm->_globals.allocMemory(SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
|
||||
|
||||
VideoPtr = NULL;
|
||||
_videoPtr = NULL;
|
||||
XSCREEN = width;
|
||||
YSCREEN = height;
|
||||
|
||||
@ -124,70 +124,84 @@ void GraphicsManager::SET_MODE(int width, int height) {
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsManager::DD_Lock() {
|
||||
if (!NOLOCK) {
|
||||
if (_lockCtr++ == 0)
|
||||
VideoPtr = g_system->lockScreen();
|
||||
/**
|
||||
* (try to) Lock Screen
|
||||
*/
|
||||
void GraphicsManager::lockScreen() {
|
||||
if (!_skipVideoLockFl) {
|
||||
if (_lockCounter++ == 0)
|
||||
_videoPtr = g_system->lockScreen();
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsManager::DD_Unlock() {
|
||||
assert(VideoPtr);
|
||||
if (--_lockCtr == 0) {
|
||||
/**
|
||||
* (try to) Unlock Screen
|
||||
*/
|
||||
void GraphicsManager::unlockScreen() {
|
||||
assert(_videoPtr);
|
||||
if (--_lockCounter == 0) {
|
||||
g_system->unlockScreen();
|
||||
VideoPtr = NULL;
|
||||
_videoPtr = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// Clear Screen
|
||||
void GraphicsManager::Cls_Video() {
|
||||
assert(VideoPtr);
|
||||
|
||||
VideoPtr->fillRect(Common::Rect(0, 0, XSCREEN, YSCREEN), 0);
|
||||
/**
|
||||
* Clear Screen
|
||||
*/
|
||||
void GraphicsManager::clearScreen() {
|
||||
assert(_videoPtr);
|
||||
_videoPtr->fillRect(Common::Rect(0, 0, XSCREEN, YSCREEN), 0);
|
||||
}
|
||||
|
||||
void GraphicsManager::LOAD_IMAGE(const Common::String &file) {
|
||||
/**
|
||||
* Load Image
|
||||
*/
|
||||
void GraphicsManager::loadImage(const Common::String &file) {
|
||||
Common::String filename = Common::String::format("%s.PCX", file.c_str());
|
||||
CHARGE_ECRAN(filename);
|
||||
loadScreen(filename);
|
||||
INIT_TABLE(165, 170, Palette);
|
||||
}
|
||||
|
||||
|
||||
void GraphicsManager::LOAD_IMAGEVGA(const Common::String &file) {
|
||||
/**
|
||||
* Load VGA Image
|
||||
*/
|
||||
void GraphicsManager::loadVgaImage(const Common::String &file) {
|
||||
SCANLINE(SCREEN_WIDTH);
|
||||
DD_Lock();
|
||||
Cls_Video();
|
||||
DD_Unlock();
|
||||
lockScreen();
|
||||
clearScreen();
|
||||
unlockScreen();
|
||||
_vm->_fileManager.constructFilename(_vm->_globals.HOPIMAGE, file);
|
||||
A_PCX320(VESA_SCREEN, _vm->_globals.NFICHIER, Palette);
|
||||
memcpy(VESA_BUFFER, VESA_SCREEN, 0xFA00u);
|
||||
A_PCX320(_vesaScreen, _vm->_globals.NFICHIER, Palette);
|
||||
memcpy(_vesaBuffer, _vesaScreen, 0xFA00u);
|
||||
SCANLINE(320);
|
||||
max_x = 320;
|
||||
|
||||
DD_Lock();
|
||||
CopyAsm16(VESA_BUFFER);
|
||||
DD_Unlock();
|
||||
lockScreen();
|
||||
CopyAsm16(_vesaBuffer);
|
||||
unlockScreen();
|
||||
|
||||
FADE_IN_CASSE();
|
||||
}
|
||||
|
||||
// Load Screen
|
||||
void GraphicsManager::CHARGE_ECRAN(const Common::String &file) {
|
||||
/**
|
||||
* Load Screen
|
||||
*/
|
||||
void GraphicsManager::loadScreen(const Common::String &file) {
|
||||
Common::File f;
|
||||
|
||||
bool flag = true;
|
||||
if (_vm->_fileManager.searchCat(file, 6) == g_PTRNUL) {
|
||||
_vm->_fileManager.constructFilename(_vm->_globals.HOPIMAGE, file);
|
||||
if (!f.open(_vm->_globals.NFICHIER))
|
||||
error("CHARGE_ECRAN - %s", file.c_str());
|
||||
error("loadScreen - %s", file.c_str());
|
||||
|
||||
f.seek(0, SEEK_END);
|
||||
f.close();
|
||||
flag = false;
|
||||
}
|
||||
|
||||
SCROLL_ECRAN(0);
|
||||
A_PCX640_480((byte *)VESA_SCREEN, file, Palette, flag);
|
||||
scrollScreen(0);
|
||||
A_PCX640_480((byte *)_vesaScreen, file, Palette, flag);
|
||||
|
||||
SCROLL = 0;
|
||||
OLD_SCROLL = 0;
|
||||
@ -196,25 +210,25 @@ void GraphicsManager::CHARGE_ECRAN(const Common::String &file) {
|
||||
if (!DOUBLE_ECRAN) {
|
||||
SCANLINE(SCREEN_WIDTH);
|
||||
max_x = SCREEN_WIDTH;
|
||||
DD_Lock();
|
||||
Cls_Video();
|
||||
m_scroll16(VESA_SCREEN, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
DD_Unlock();
|
||||
lockScreen();
|
||||
clearScreen();
|
||||
m_scroll16(_vesaScreen, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
unlockScreen();
|
||||
} else {
|
||||
SCANLINE(SCREEN_WIDTH * 2);
|
||||
max_x = SCREEN_WIDTH * 2;
|
||||
DD_Lock();
|
||||
Cls_Video();
|
||||
DD_Unlock();
|
||||
lockScreen();
|
||||
clearScreen();
|
||||
unlockScreen();
|
||||
|
||||
if (MANU_SCROLL == 1) {
|
||||
DD_Lock();
|
||||
m_scroll16(VESA_SCREEN, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
DD_Unlock();
|
||||
if (MANU_SCROLL) {
|
||||
lockScreen();
|
||||
m_scroll16(_vesaScreen, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
unlockScreen();
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(VESA_BUFFER, VESA_SCREEN, SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
|
||||
memcpy(_vesaBuffer, _vesaScreen, SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
|
||||
}
|
||||
|
||||
void GraphicsManager::INIT_TABLE(int minIndex, int maxIndex, byte *palette) {
|
||||
@ -234,13 +248,14 @@ void GraphicsManager::INIT_TABLE(int minIndex, int maxIndex, byte *palette) {
|
||||
TABLE_COUL[0] = 1;
|
||||
}
|
||||
|
||||
// Scroll Screen
|
||||
int GraphicsManager::SCROLL_ECRAN(int amount) {
|
||||
/**
|
||||
* Scroll Screen
|
||||
*/
|
||||
void GraphicsManager::scrollScreen(int amount) {
|
||||
int result = CLIP(amount, 0, SCREEN_WIDTH);
|
||||
_vm->_eventsManager._startPos.x = result;
|
||||
ofscroll = result;
|
||||
SCROLL = result;
|
||||
return result;
|
||||
}
|
||||
|
||||
void GraphicsManager::Trans_bloc(byte *destP, const byte *srcP, int count, int minThreshold, int maxThreshold) {
|
||||
@ -421,9 +436,9 @@ void GraphicsManager::m_scroll(const byte *surface, int xs, int ys, int width, i
|
||||
const byte *src2P;
|
||||
unsigned int widthRemaining;
|
||||
|
||||
assert(VideoPtr);
|
||||
assert(_videoPtr);
|
||||
srcP = xs + nbrligne2 * ys + surface;
|
||||
destP = destX + WinScan * destY + (byte *)VideoPtr->pixels;
|
||||
destP = destX + WinScan * destY + (byte *)_videoPtr->pixels;
|
||||
yNext = height;
|
||||
do {
|
||||
yCtr = yNext;
|
||||
@ -442,11 +457,11 @@ void GraphicsManager::m_scroll(const byte *surface, int xs, int ys, int width, i
|
||||
* Copies data from a 8-bit palette surface into the 16-bit screen
|
||||
*/
|
||||
void GraphicsManager::m_scroll16(const byte *surface, int xs, int ys, int width, int height, int destX, int destY) {
|
||||
DD_Lock();
|
||||
lockScreen();
|
||||
|
||||
assert(VideoPtr);
|
||||
assert(_videoPtr);
|
||||
const byte *srcP = xs + nbrligne2 * ys + surface;
|
||||
uint16 *destP = (uint16 *)((byte *)VideoPtr->pixels + destX * 2 + WinScan * destY);
|
||||
uint16 *destP = (uint16 *)((byte *)_videoPtr->pixels + destX * 2 + WinScan * destY);
|
||||
|
||||
for (int yp = 0; yp < height; ++yp) {
|
||||
// Copy over the line, using the source pixels as lookups into the pixels palette
|
||||
@ -461,7 +476,7 @@ void GraphicsManager::m_scroll16(const byte *surface, int xs, int ys, int width,
|
||||
destP += WinScan / 2;
|
||||
}
|
||||
|
||||
DD_Unlock();
|
||||
unlockScreen();
|
||||
}
|
||||
|
||||
// TODO: See if PAL_PIXELS can be converted to a uint16 array
|
||||
@ -476,9 +491,9 @@ void GraphicsManager::m_scroll16A(const byte *surface, int xs, int ys, int width
|
||||
const byte *srcCopyP;
|
||||
const byte *destCopyP;
|
||||
|
||||
assert(VideoPtr);
|
||||
assert(_videoPtr);
|
||||
srcP = xs + nbrligne2 * ys + surface;
|
||||
destP = destX + destX + WinScan * destY + (byte *)VideoPtr->pixels;
|
||||
destP = destX + destX + WinScan * destY + (byte *)_videoPtr->pixels;
|
||||
yNext = height;
|
||||
Agr_x = 0;
|
||||
Agr_y = 0;
|
||||
@ -541,9 +556,9 @@ void GraphicsManager::Copy_Vga16(const byte *surface, int xp, int yp, int width,
|
||||
const byte *loopSrcP;
|
||||
int yCtr;
|
||||
|
||||
assert(VideoPtr);
|
||||
assert(_videoPtr);
|
||||
srcP = xp + 320 * yp + surface;
|
||||
destP = (uint16 *)(30 * WinScan + destX + destX + destX + destX + WinScan * 2 * destY + (byte *)VideoPtr->pixels);
|
||||
destP = (uint16 *)(30 * WinScan + destX + destX + destX + destX + WinScan * 2 * destY + (byte *)_videoPtr->pixels);
|
||||
yCount = height;
|
||||
xCount = width;
|
||||
|
||||
@ -681,22 +696,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 *)VESA_BUFFER);
|
||||
fade_in(Palette, 1, (const byte *)_vesaBuffer);
|
||||
}
|
||||
|
||||
void GraphicsManager::FADE_OUTS() {
|
||||
FADESPD = 1;
|
||||
fade_out(Palette, 1, (const byte *)VESA_BUFFER);
|
||||
fade_out(Palette, 1, (const byte *)_vesaBuffer);
|
||||
}
|
||||
|
||||
void GraphicsManager::FADE_INW() {
|
||||
FADESPD = 15;
|
||||
fade_in(Palette, 20, (const byte *)VESA_BUFFER);
|
||||
fade_in(Palette, 20, (const byte *)_vesaBuffer);
|
||||
}
|
||||
|
||||
void GraphicsManager::FADE_OUTW() {
|
||||
FADESPD = 15;
|
||||
fade_out(Palette, 20, (const byte *)VESA_BUFFER);
|
||||
fade_out(Palette, 20, (const byte *)_vesaBuffer);
|
||||
}
|
||||
|
||||
void GraphicsManager::setpal_vga256(const byte *palette) {
|
||||
@ -787,9 +802,9 @@ void GraphicsManager::FADE_INW_LINUX(const byte *surface) {
|
||||
|
||||
void GraphicsManager::FADE_IN_CASSE() {
|
||||
setpal_vga256(Palette);
|
||||
DD_Lock();
|
||||
CopyAsm16(VESA_BUFFER);
|
||||
DD_Unlock();
|
||||
lockScreen();
|
||||
CopyAsm16(_vesaBuffer);
|
||||
unlockScreen();
|
||||
DD_VBL();
|
||||
}
|
||||
|
||||
@ -799,9 +814,9 @@ void GraphicsManager::FADE_OUT_CASSE() {
|
||||
memset(palette, 0, PALETTE_EXT_BLOCK_SIZE);
|
||||
setpal_vga256(palette);
|
||||
|
||||
DD_Lock();
|
||||
CopyAsm16(VESA_BUFFER);
|
||||
DD_Unlock();
|
||||
lockScreen();
|
||||
CopyAsm16(_vesaBuffer);
|
||||
unlockScreen();
|
||||
DD_VBL();
|
||||
}
|
||||
|
||||
@ -875,7 +890,7 @@ void GraphicsManager::Copy_Video_Vbe3(const byte *srcData) {
|
||||
int destLen2;
|
||||
byte *destSlice2P;
|
||||
|
||||
assert(VideoPtr);
|
||||
assert(_videoPtr);
|
||||
rleValue = 0;
|
||||
destOffset = 0;
|
||||
srcP = srcData;
|
||||
@ -907,20 +922,20 @@ Video_Cont3_Vbe:
|
||||
if (srcByte == 211) {
|
||||
destLen1 = *(srcP + 1);
|
||||
rleValue = *(srcP + 2);
|
||||
destSlice1P = destOffset + (byte *)VideoPtr->pixels;
|
||||
destSlice1P = destOffset + (byte *)_videoPtr->pixels;
|
||||
destOffset += destLen1;
|
||||
memset(destSlice1P, rleValue, destLen1);
|
||||
srcP += 3;
|
||||
} else {
|
||||
destLen2 = (byte)(*srcP + 45);
|
||||
rleValue = *(srcP + 1);
|
||||
destSlice2P = (byte *)(destOffset + (byte *)VideoPtr->pixels);
|
||||
destSlice2P = (byte *)(destOffset + (byte *)_videoPtr->pixels);
|
||||
destOffset += destLen2;
|
||||
memset(destSlice2P, rleValue, destLen2);
|
||||
srcP += 2;
|
||||
}
|
||||
} else {
|
||||
*(destOffset + (byte *)VideoPtr->pixels) = srcByte;
|
||||
*(destOffset + (byte *)_videoPtr->pixels) = srcByte;
|
||||
++srcP;
|
||||
++destOffset;
|
||||
}
|
||||
@ -930,7 +945,7 @@ Video_Cont3_Vbe:
|
||||
void GraphicsManager::Copy_Video_Vbe16(const byte *srcData) {
|
||||
const byte *srcP = srcData;
|
||||
int destOffset = 0;
|
||||
assert(VideoPtr);
|
||||
assert(_videoPtr);
|
||||
|
||||
for (;;) {
|
||||
byte srcByte = *srcP;
|
||||
@ -964,7 +979,7 @@ void GraphicsManager::Copy_Video_Vbe16(const byte *srcData) {
|
||||
if (srcByte == 211) {
|
||||
int pixelCount = *(srcP + 1);
|
||||
int pixelIndex = *(srcP + 2);
|
||||
uint16 *destP = (uint16 *)((byte *)VideoPtr->pixels + destOffset * 2);
|
||||
uint16 *destP = (uint16 *)((byte *)_videoPtr->pixels + destOffset * 2);
|
||||
uint16 pixelValue = *(uint16 *)(PAL_PIXELS + 2 * pixelIndex);
|
||||
destOffset += pixelCount;
|
||||
|
||||
@ -975,7 +990,7 @@ void GraphicsManager::Copy_Video_Vbe16(const byte *srcData) {
|
||||
} else {
|
||||
int pixelCount = srcByte - 211;
|
||||
int pixelIndex = *(srcP + 1);
|
||||
uint16 *destP = (uint16 *)((byte *)VideoPtr->pixels + destOffset * 2);
|
||||
uint16 *destP = (uint16 *)((byte *)_videoPtr->pixels + destOffset * 2);
|
||||
uint16 pixelValue = *(uint16 *)(PAL_PIXELS + 2 * pixelIndex);
|
||||
destOffset += pixelCount;
|
||||
|
||||
@ -985,7 +1000,7 @@ void GraphicsManager::Copy_Video_Vbe16(const byte *srcData) {
|
||||
srcP += 2;
|
||||
}
|
||||
} else {
|
||||
*((uint16 *)VideoPtr->pixels + destOffset) = *(uint16 *)(PAL_PIXELS + 2 * srcByte);
|
||||
*((uint16 *)_videoPtr->pixels + destOffset) = *(uint16 *)(PAL_PIXELS + 2 * srcByte);
|
||||
++srcP;
|
||||
++destOffset;
|
||||
}
|
||||
@ -1019,7 +1034,7 @@ void GraphicsManager::Copy_Video_Vbe16a(const byte *srcData) {
|
||||
srcP += 5;
|
||||
}
|
||||
Video_Cont_Vbe16a:
|
||||
WRITE_LE_UINT16((byte *)VideoPtr->pixels + destOffset * 2, READ_LE_UINT16(PAL_PIXELS + 2 * pixelIndex));
|
||||
WRITE_LE_UINT16((byte *)_videoPtr->pixels + destOffset * 2, READ_LE_UINT16(PAL_PIXELS + 2 * pixelIndex));
|
||||
++srcP;
|
||||
++destOffset;
|
||||
}
|
||||
@ -1273,7 +1288,7 @@ void GraphicsManager::Affiche_Segment_Vesa() {
|
||||
return;
|
||||
|
||||
SDL_NBLOCS = _vm->_globals.NBBLOC;
|
||||
DD_Lock();
|
||||
lockScreen();
|
||||
|
||||
for (int idx = 1; idx <= _vm->_globals.NBBLOC; ++idx) {
|
||||
BlocItem &bloc = _vm->_globals.BLOC[idx];
|
||||
@ -1282,7 +1297,7 @@ void GraphicsManager::Affiche_Segment_Vesa() {
|
||||
continue;
|
||||
|
||||
if (_vm->_eventsManager._breakoutFl) {
|
||||
Copy_Vga16(VESA_BUFFER, bloc._x1, bloc._y1, bloc._x2 - bloc._x1, bloc._y2 - bloc._y1, bloc._x1, bloc._y1);
|
||||
Copy_Vga16(_vesaBuffer, bloc._x1, bloc._y1, bloc._x2 - bloc._x1, bloc._y2 - bloc._y1, bloc._x1, bloc._y1);
|
||||
dstRect.left = bloc._x1 * 2;
|
||||
dstRect.top = bloc._y1 * 2 + 30;
|
||||
dstRect.setWidth((bloc._x2 - bloc._x1) * 2);
|
||||
@ -1294,22 +1309,22 @@ void GraphicsManager::Affiche_Segment_Vesa() {
|
||||
bloc._x2 = _vm->_eventsManager._startPos.x + SCREEN_WIDTH;
|
||||
|
||||
// WORKAROUND: Original didn't lock the screen for access
|
||||
DD_Lock();
|
||||
m_scroll16(VESA_BUFFER, bloc._x1, bloc._y1, bloc._x2 - bloc._x1, bloc._y2 - bloc._y1, bloc._x1 - _vm->_eventsManager._startPos.x, bloc._y1);
|
||||
lockScreen();
|
||||
m_scroll16(_vesaBuffer, bloc._x1, bloc._y1, bloc._x2 - bloc._x1, bloc._y2 - bloc._y1, bloc._x1 - _vm->_eventsManager._startPos.x, bloc._y1);
|
||||
|
||||
dstRect.left = bloc._x1 - _vm->_eventsManager._startPos.x;
|
||||
dstRect.top = bloc._y1;
|
||||
dstRect.setWidth(bloc._x2 - bloc._x1);
|
||||
dstRect.setHeight(bloc._y2 - bloc._y1);
|
||||
|
||||
DD_Unlock();
|
||||
unlockScreen();
|
||||
}
|
||||
|
||||
_vm->_globals.BLOC[idx]._activeFl = false;
|
||||
}
|
||||
|
||||
_vm->_globals.NBBLOC = 0;
|
||||
DD_Unlock();
|
||||
unlockScreen();
|
||||
if (!_vm->_globals.BPP_NOAFF) {
|
||||
// SDL_UpdateRects(LinuxScr, SDL_NBLOCS, dstrect);
|
||||
}
|
||||
@ -1322,11 +1337,11 @@ void GraphicsManager::AFFICHE_SPEEDVGA(const byte *objectData, int xp, int yp, i
|
||||
width = _vm->_objectsManager.getWidth(objectData, idx);
|
||||
height = _vm->_objectsManager.getHeight(objectData, idx);
|
||||
if (*objectData == 78) {
|
||||
Affiche_Perfect(VESA_SCREEN, objectData, xp + 300, yp + 300, idx, 0, 0, 0);
|
||||
Affiche_Perfect(VESA_BUFFER, objectData, xp + 300, yp + 300, idx, 0, 0, 0);
|
||||
Affiche_Perfect(_vesaScreen, objectData, xp + 300, yp + 300, idx, 0, 0, 0);
|
||||
Affiche_Perfect(_vesaBuffer, objectData, xp + 300, yp + 300, idx, 0, 0, 0);
|
||||
} else {
|
||||
Sprite_Vesa(VESA_BUFFER, objectData, xp + 300, yp + 300, idx);
|
||||
Sprite_Vesa(VESA_SCREEN, objectData, xp + 300, yp + 300, idx);
|
||||
Sprite_Vesa(_vesaBuffer, objectData, xp + 300, yp + 300, idx);
|
||||
Sprite_Vesa(_vesaScreen, objectData, xp + 300, yp + 300, idx);
|
||||
}
|
||||
if (!_vm->_globals.NO_VISU)
|
||||
Ajoute_Segment_Vesa(xp, yp, xp + width, yp + height);
|
||||
@ -1342,10 +1357,10 @@ void GraphicsManager::CopyAsm(const byte *surface) {
|
||||
byte *destPitch;
|
||||
const byte *srcPitch;
|
||||
|
||||
assert(VideoPtr);
|
||||
assert(_videoPtr);
|
||||
srcP = surface;
|
||||
srcByte = 30 * WinScan;
|
||||
destP = (byte *)VideoPtr->pixels + 30 * WinScan;
|
||||
destP = (byte *)_videoPtr->pixels + 30 * WinScan;
|
||||
for (int yCtr = 200; yCtr != 0; yCtr--) {
|
||||
srcPitch = srcP;
|
||||
destPitch = destP;
|
||||
@ -1379,9 +1394,9 @@ void GraphicsManager::CopyAsm16(const byte *surface) {
|
||||
byte *v10;
|
||||
const byte *v11;
|
||||
|
||||
assert(VideoPtr);
|
||||
assert(_videoPtr);
|
||||
v1 = surface;
|
||||
v2 = 30 * WinScan + (byte *)VideoPtr->pixels;
|
||||
v2 = 30 * WinScan + (byte *)_videoPtr->pixels;
|
||||
v3 = 200;
|
||||
do {
|
||||
v11 = v1;
|
||||
@ -1829,11 +1844,11 @@ void GraphicsManager::AFFICHE_SPEED(const byte *spriteData, int xp, int yp, int
|
||||
width = _vm->_objectsManager.getWidth(spriteData, spriteIndex);
|
||||
height = _vm->_objectsManager.getHeight(spriteData, spriteIndex);
|
||||
if (*spriteData == 78) {
|
||||
Affiche_Perfect(VESA_SCREEN, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, 0);
|
||||
Affiche_Perfect(VESA_BUFFER, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, 0);
|
||||
Affiche_Perfect(_vesaScreen, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, 0);
|
||||
Affiche_Perfect(_vesaBuffer, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, 0);
|
||||
} else {
|
||||
Sprite_Vesa(VESA_BUFFER, spriteData, xp + 300, yp + 300, spriteIndex);
|
||||
Sprite_Vesa(VESA_SCREEN, spriteData, xp + 300, yp + 300, spriteIndex);
|
||||
Sprite_Vesa(_vesaBuffer, spriteData, xp + 300, yp + 300, spriteIndex);
|
||||
Sprite_Vesa(_vesaScreen, spriteData, xp + 300, yp + 300, spriteIndex);
|
||||
}
|
||||
if (!_vm->_globals.NO_VISU)
|
||||
Ajoute_Segment_Vesa(xp, yp, xp + width, yp + height);
|
||||
@ -2027,16 +2042,16 @@ void GraphicsManager::NB_SCREEN() {
|
||||
if (!_vm->_globals.NECESSAIRE)
|
||||
INIT_TABLE(50, 65, Palette);
|
||||
if (nbrligne == SCREEN_WIDTH)
|
||||
Trans_bloc2(VESA_BUFFER, TABLE_COUL, 307200);
|
||||
Trans_bloc2(_vesaBuffer, TABLE_COUL, 307200);
|
||||
if (nbrligne == 1280)
|
||||
Trans_bloc2(VESA_BUFFER, TABLE_COUL, 614400);
|
||||
DD_Lock();
|
||||
m_scroll16(VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
DD_Unlock();
|
||||
Trans_bloc2(_vesaBuffer, TABLE_COUL, 614400);
|
||||
lockScreen();
|
||||
m_scroll16(_vesaBuffer, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
unlockScreen();
|
||||
|
||||
destP = VESA_SCREEN;
|
||||
srcP = VESA_BUFFER;
|
||||
memcpy(VESA_SCREEN, VESA_BUFFER, 0x95FFCu);
|
||||
destP = _vesaScreen;
|
||||
srcP = _vesaBuffer;
|
||||
memcpy(_vesaScreen, _vesaBuffer, 0x95FFCu);
|
||||
srcP = srcP + 614396;
|
||||
destP = destP + 614396;
|
||||
*destP = *srcP;
|
||||
@ -2092,7 +2107,7 @@ void GraphicsManager::Copy_Video_Vbe(const byte *src) {
|
||||
const byte *srcP;
|
||||
byte byteVal;
|
||||
|
||||
assert(VideoPtr);
|
||||
assert(_videoPtr);
|
||||
destOffset = 0;
|
||||
srcP = src;
|
||||
for (;;) {
|
||||
@ -2115,7 +2130,7 @@ void GraphicsManager::Copy_Video_Vbe(const byte *src) {
|
||||
srcP += 5;
|
||||
}
|
||||
Video_Cont_Vbe:
|
||||
*((byte *)VideoPtr->pixels + destOffset) = byteVal;
|
||||
*((byte *)_videoPtr->pixels + destOffset) = byteVal;
|
||||
++srcP;
|
||||
++destOffset;
|
||||
}
|
||||
@ -2178,7 +2193,7 @@ void GraphicsManager::drawVerticalLine(byte *surface, int xp, int yp, int height
|
||||
}
|
||||
|
||||
void GraphicsManager::MODE_VESA() {
|
||||
SET_MODE(640, 480);
|
||||
setGraphicalMode(640, 480);
|
||||
}
|
||||
|
||||
} // End of namespace Hopkins
|
||||
|
@ -51,9 +51,9 @@ class GraphicsManager {
|
||||
private:
|
||||
HopkinsEngine *_vm;
|
||||
|
||||
void CHARGE_ECRAN(const Common::String &file);
|
||||
void loadScreen(const Common::String &file);
|
||||
public:
|
||||
int _lockCtr;
|
||||
int _lockCounter;
|
||||
bool SDL_MODEYES;
|
||||
int XSCREEN;
|
||||
int YSCREEN;
|
||||
@ -66,16 +66,16 @@ public:
|
||||
byte Palette[PALETTE_EXT_BLOCK_SIZE];
|
||||
byte OLD_PAL[PALETTE_EXT_BLOCK_SIZE];
|
||||
bool Linear;
|
||||
Graphics::Surface *VideoPtr;
|
||||
byte *VESA_SCREEN;
|
||||
byte *VESA_BUFFER;
|
||||
Graphics::Surface *_videoPtr;
|
||||
byte *_vesaScreen;
|
||||
byte *_vesaBuffer;
|
||||
int ofscroll;
|
||||
int SCROLL;
|
||||
byte HEADER_PCX[128];
|
||||
int PCX_L, PCX_H;
|
||||
bool DOUBLE_ECRAN;
|
||||
int OLD_SCROLL;
|
||||
int MANU_SCROLL;
|
||||
bool MANU_SCROLL;
|
||||
int SPEED_SCROLL;
|
||||
int nbrligne2;
|
||||
int Agr_x, Agr_y;
|
||||
@ -83,7 +83,7 @@ public:
|
||||
int FADESPD;
|
||||
byte PALPCX[PALETTE_EXT_BLOCK_SIZE];
|
||||
int FADE_LINUX;
|
||||
bool NOLOCK;
|
||||
bool _skipVideoLockFl;
|
||||
int no_scroll;
|
||||
Common::Rect dstrect[50];
|
||||
int REDRAW;
|
||||
@ -105,16 +105,14 @@ public:
|
||||
~GraphicsManager();
|
||||
void setParent(HopkinsEngine *vm);
|
||||
|
||||
void SET_MODE(int width, int height);
|
||||
void DD_Lock();
|
||||
void DD_Unlock();
|
||||
void DD_LOCK() { DD_Lock(); }
|
||||
void DD_UNLOCK() { DD_Unlock(); }
|
||||
void Cls_Video();
|
||||
void LOAD_IMAGE(const Common::String &file);
|
||||
void LOAD_IMAGEVGA(const Common::String &file);
|
||||
void setGraphicalMode(int width, int height);
|
||||
void lockScreen();
|
||||
void unlockScreen();
|
||||
void clearScreen();
|
||||
void loadImage(const Common::String &file);
|
||||
void loadVgaImage(const Common::String &file);
|
||||
void INIT_TABLE(int minIndex, int maxIndex, byte *palette);
|
||||
int SCROLL_ECRAN(int amount);
|
||||
void scrollScreen(int amount);
|
||||
void Trans_bloc(byte *destP, const byte *srcP, int count, int minThreshold, int maxThreshold);
|
||||
void Trans_bloc2(byte *surface, byte *col, int size);
|
||||
void A_PCX640_480(byte *surface, const Common::String &file, byte *palette, bool typeFlag);
|
||||
|
@ -137,12 +137,12 @@ bool HopkinsEngine::runWin95Demo() {
|
||||
|
||||
warning("TODO Affiche_Version(1)");
|
||||
|
||||
_graphicsManager.DD_LOCK();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_UNLOCK();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
|
||||
_graphicsManager.LOAD_IMAGE("H2");
|
||||
_graphicsManager.loadImage("H2");
|
||||
_graphicsManager.FADE_INW();
|
||||
|
||||
if (!_eventsManager._escKeyFl)
|
||||
@ -158,7 +158,7 @@ bool HopkinsEngine::runWin95Demo() {
|
||||
_globals._speed = 1;
|
||||
|
||||
for (int i = 1; i < 50; i++) {
|
||||
_graphicsManager.SCOPY(_graphicsManager.VESA_SCREEN, 0, 0, 640, 440, _graphicsManager.VESA_BUFFER, 0, 0);
|
||||
_graphicsManager.SCOPY(_graphicsManager._vesaScreen, 0, 0, 640, 440, _graphicsManager._vesaBuffer, 0, 0);
|
||||
_eventsManager.VBL();
|
||||
}
|
||||
|
||||
@ -217,17 +217,17 @@ bool HopkinsEngine::runWin95Demo() {
|
||||
if (!_globals.SAUVEGARDE->data[svField170]) {
|
||||
_soundManager.WSOUND(3);
|
||||
if (_globals.FR == 1)
|
||||
_graphicsManager.LOAD_IMAGE("fondfr");
|
||||
_graphicsManager.loadImage("fondfr");
|
||||
if (!_globals.FR)
|
||||
_graphicsManager.LOAD_IMAGE("fondan");
|
||||
_graphicsManager.loadImage("fondan");
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.delay(500);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
_globals.iRegul = 1;
|
||||
_soundManager.SPECIAL_SOUND = 2;
|
||||
_graphicsManager.DD_LOCK();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_UNLOCK();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
if (!_globals.CENSURE)
|
||||
_animationManager.playAnim("BANQUE.ANM", 200, 28, 200);
|
||||
@ -329,9 +329,9 @@ bool HopkinsEngine::runWin95Demo() {
|
||||
_globals.Max_Ligne_Long = 20;
|
||||
if (_globals.SAUVEGARDE->data[svField225]) {
|
||||
if (_globals.FR == 1)
|
||||
_graphicsManager.LOAD_IMAGE("ENDFR");
|
||||
_graphicsManager.loadImage("ENDFR");
|
||||
else if (!_globals.FR)
|
||||
_graphicsManager.LOAD_IMAGE("ENDUK");
|
||||
_graphicsManager.loadImage("ENDUK");
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.mouseOn();
|
||||
do
|
||||
@ -413,9 +413,9 @@ bool HopkinsEngine::runWin95Demo() {
|
||||
case 150:
|
||||
_soundManager.WSOUND(28);
|
||||
_globals.iRegul = 4; // CHECKME!
|
||||
_graphicsManager.DD_LOCK();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_UNLOCK();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_animationManager.playAnim("JOUR1A.anm", 12, 12, 2000);
|
||||
_globals.iRegul = 0;
|
||||
@ -425,11 +425,11 @@ bool HopkinsEngine::runWin95Demo() {
|
||||
case 151:
|
||||
_soundManager.WSOUND(28);
|
||||
_globals.iRegul = 4; // CHECKME!
|
||||
_graphicsManager.DD_LOCK();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_UNLOCK();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_graphicsManager.LOAD_IMAGE("njour3a");
|
||||
_graphicsManager.loadImage("njour3a");
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.delay(5000);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
@ -440,9 +440,9 @@ bool HopkinsEngine::runWin95Demo() {
|
||||
case 152:
|
||||
_soundManager.WSOUND(28);
|
||||
_globals.iRegul = 4; // CHECKME!
|
||||
_graphicsManager.DD_LOCK();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_UNLOCK();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_animationManager.playAnim("JOUR4A.anm", 12, 12, 2000);
|
||||
_globals.iRegul = 0;
|
||||
@ -461,11 +461,11 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
_globals.HELICO = 0;
|
||||
_eventsManager.mouseOff();
|
||||
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
|
||||
_graphicsManager.LOAD_IMAGE("LINUX");
|
||||
_graphicsManager.loadImage("LINUX");
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.delay(1500);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
@ -475,7 +475,7 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
_animationManager.playAnim("MP.ANM", 10, 16, 200);
|
||||
}
|
||||
|
||||
_graphicsManager.LOAD_IMAGE("H2");
|
||||
_graphicsManager.loadImage("H2");
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.delay(500);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
@ -540,20 +540,20 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
if (!_globals.SAUVEGARDE->data[svField170]) {
|
||||
_soundManager.WSOUND(3);
|
||||
if (_globals.FR == 1)
|
||||
_graphicsManager.LOAD_IMAGE("fondfr");
|
||||
_graphicsManager.loadImage("fondfr");
|
||||
if (!_globals.FR)
|
||||
_graphicsManager.LOAD_IMAGE("fondan");
|
||||
_graphicsManager.loadImage("fondan");
|
||||
if (_globals.FR == 2)
|
||||
_graphicsManager.LOAD_IMAGE("fondes");
|
||||
_graphicsManager.loadImage("fondes");
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.delay(500);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
_globals.iRegul = 1;
|
||||
_soundManager.SPECIAL_SOUND = 2;
|
||||
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
|
||||
@ -743,12 +743,12 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
_globals.SAUVEGARDE->data[svField5] = 113;
|
||||
_computerManager.showComputer(COMPUTER_HOPKINS);
|
||||
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.DD_VBL();
|
||||
memset(_graphicsManager.VESA_BUFFER, 0, 0x4B000u);
|
||||
memset(_graphicsManager.VESA_SCREEN, 0, 0x4B000u);
|
||||
memset(_graphicsManager._vesaBuffer, 0, 0x4B000u);
|
||||
memset(_graphicsManager._vesaScreen, 0, 0x4B000u);
|
||||
_graphicsManager.Cls_Pal();
|
||||
_graphicsManager.RESET_SEGMENT_VESA();
|
||||
break;
|
||||
@ -760,9 +760,9 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
_globals.ECRAN = 114;
|
||||
_globals.SAUVEGARDE->data[svField5] = 114;
|
||||
_computerManager.showComputer(COMPUTER_SAMANTHAS);
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
break;
|
||||
|
||||
case 115:
|
||||
@ -772,18 +772,18 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
_globals.ECRAN = 115;
|
||||
_globals.SAUVEGARDE->data[svField5] = 115;
|
||||
_computerManager.showComputer(COMPUTER_PUBLIC);
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
break;
|
||||
|
||||
case 150:
|
||||
_soundManager.WSOUND(16);
|
||||
_globals.iRegul = 1;
|
||||
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
_animationManager.playAnim("JOUR1A.anm", 12, 12, 2000);
|
||||
@ -795,9 +795,9 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
_soundManager.WSOUND(16);
|
||||
_globals.iRegul = 1;
|
||||
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
_animationManager.playAnim("JOUR3A.anm", 12, 12, 2000);
|
||||
@ -809,9 +809,9 @@ bool HopkinsEngine::runLinuxDemo() {
|
||||
_soundManager.WSOUND(16);
|
||||
_globals.iRegul = 1;
|
||||
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
_animationManager.playAnim("JOUR4A.anm", 12, 12, 2000);
|
||||
@ -833,14 +833,14 @@ bool HopkinsEngine::runBeOSFull() {
|
||||
_eventsManager.delay(500);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_animationManager.playAnim("MP.ANM", 10, 0, 200);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
if (!_eventsManager._escKeyFl)
|
||||
INTRORUN();
|
||||
_graphicsManager.FADE_OUTS();
|
||||
_graphicsManager.LOAD_IMAGE("H2");
|
||||
_graphicsManager.loadImage("H2");
|
||||
_graphicsManager.FADE_INW();
|
||||
_graphicsManager.FADE_OUTW();
|
||||
_globals.iRegul = 0;
|
||||
@ -878,13 +878,13 @@ bool HopkinsEngine::runBeOSFull() {
|
||||
case 3:
|
||||
if (!_globals.SAUVEGARDE->data[svField170]) {
|
||||
_soundManager.WSOUND(3);
|
||||
_graphicsManager.LOAD_IMAGE("FOND");
|
||||
_graphicsManager.loadImage("FOND");
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.delay(5000);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
_globals.iRegul = 1;
|
||||
_soundManager.SPECIAL_SOUND = 2;
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_animationManager.playAnim("BANQUE.ANM", 200, 12, 200);
|
||||
_soundManager.SPECIAL_SOUND = 0;
|
||||
@ -1032,7 +1032,7 @@ bool HopkinsEngine::runBeOSFull() {
|
||||
}
|
||||
if (_globals.SORTIE == 18) {
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_soundManager.WSOUND_OFF();
|
||||
_soundManager.WSOUND(6);
|
||||
@ -1075,7 +1075,7 @@ bool HopkinsEngine::runBeOSFull() {
|
||||
if (_globals.SORTIE == 17) {
|
||||
_globals.iRegul = 1;
|
||||
_soundManager.WSOUND_OFF();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_soundManager.WSOUND(6);
|
||||
if (_globals.SVGA == 2)
|
||||
@ -1540,7 +1540,7 @@ bool HopkinsEngine::runBeOSFull() {
|
||||
if (_globals.SORTIE == 18) {
|
||||
_globals.iRegul = 1;
|
||||
_soundManager.WSOUND_OFF();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_soundManager.WSOUND(6);
|
||||
if (_globals.SVGA == 2)
|
||||
@ -1618,7 +1618,7 @@ bool HopkinsEngine::runBeOSFull() {
|
||||
case 150:
|
||||
_soundManager.WSOUND(16);
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_animationManager.playAnim("JOUR1A.ANM", 12, 12, 2000);
|
||||
_globals.iRegul = 0;
|
||||
@ -1628,7 +1628,7 @@ bool HopkinsEngine::runBeOSFull() {
|
||||
case 151:
|
||||
_soundManager.WSOUND(16);
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_animationManager.playAnim("JOUR3A.ANM", 12, 12, 2000);
|
||||
_globals.iRegul = 0;
|
||||
@ -1638,7 +1638,7 @@ bool HopkinsEngine::runBeOSFull() {
|
||||
case 152:
|
||||
_soundManager.WSOUND(16);
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_animationManager.playAnim("JOUR4A.ANM", 12, 12, 2000);
|
||||
_globals.iRegul = 0;
|
||||
@ -1680,16 +1680,16 @@ bool HopkinsEngine::runWin95full() {
|
||||
|
||||
warning("TODO: Affiche_Version();");
|
||||
|
||||
_graphicsManager.DD_LOCK();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_UNLOCK();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
|
||||
_animationManager.playAnim("MP.ANM", 10, 16, 200);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
if (!_eventsManager._escKeyFl)
|
||||
INTRORUN();
|
||||
_graphicsManager.LOAD_IMAGE("H2");
|
||||
_graphicsManager.loadImage("H2");
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.delay(500);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
@ -1731,17 +1731,17 @@ bool HopkinsEngine::runWin95full() {
|
||||
if (!_globals.SAUVEGARDE->data[svField170]) {
|
||||
_soundManager.WSOUND(3);
|
||||
if (_globals.FR == 1)
|
||||
_graphicsManager.LOAD_IMAGE("fondfr");
|
||||
_graphicsManager.loadImage("fondfr");
|
||||
else if (!_globals.FR)
|
||||
_graphicsManager.LOAD_IMAGE("fondan");
|
||||
_graphicsManager.loadImage("fondan");
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.delay(500);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
_soundManager.SPECIAL_SOUND = 2;
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.DD_LOCK();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_UNLOCK();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
if (!_globals.CENSURE)
|
||||
_animationManager.playAnim("BANQUE.ANM", 200, 28, 200);
|
||||
@ -1894,9 +1894,9 @@ bool HopkinsEngine::runWin95full() {
|
||||
}
|
||||
if (_globals.SORTIE == 18) {
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.DD_LOCK();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_UNLOCK();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_soundManager.WSOUND_OFF();
|
||||
_soundManager.WSOUND(29);
|
||||
@ -1938,9 +1938,9 @@ bool HopkinsEngine::runWin95full() {
|
||||
if (_globals.SORTIE == 17) {
|
||||
_globals.iRegul = 1;
|
||||
_soundManager.WSOUND_OFF();
|
||||
_graphicsManager.DD_LOCK();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_UNLOCK();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_soundManager.WSOUND(6);
|
||||
if (_globals.SVGA == 2)
|
||||
@ -2404,9 +2404,9 @@ bool HopkinsEngine::runWin95full() {
|
||||
if (_globals.SORTIE == 18) {
|
||||
_globals.iRegul = 1;
|
||||
_soundManager.WSOUND_OFF();
|
||||
_graphicsManager.DD_LOCK();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_UNLOCK();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_soundManager.WSOUND(6);
|
||||
if (_globals.SVGA == 2)
|
||||
@ -2483,9 +2483,9 @@ bool HopkinsEngine::runWin95full() {
|
||||
case 150:
|
||||
_soundManager.WSOUND(16);
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.DD_LOCK();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_UNLOCK();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_animationManager.playAnim("JOUR1A.anm", 12, 12, 2000);
|
||||
_globals.iRegul = 0;
|
||||
@ -2495,9 +2495,9 @@ bool HopkinsEngine::runWin95full() {
|
||||
case 151:
|
||||
_soundManager.WSOUND(16);
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.DD_LOCK();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_UNLOCK();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_animationManager.playAnim("JOUR3A.anm", 12, 12, 2000);
|
||||
_globals.iRegul = 0;
|
||||
@ -2507,9 +2507,9 @@ bool HopkinsEngine::runWin95full() {
|
||||
case 152:
|
||||
_soundManager.WSOUND(16);
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.DD_LOCK();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_UNLOCK();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_animationManager.playAnim("JOUR4A.anm", 12, 12, 2000);
|
||||
_globals.iRegul = 0;
|
||||
@ -2554,11 +2554,11 @@ bool HopkinsEngine::runLinuxFull() {
|
||||
_globals.HELICO = 0;
|
||||
_eventsManager.mouseOff();
|
||||
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
|
||||
_graphicsManager.LOAD_IMAGE("H2");
|
||||
_graphicsManager.loadImage("H2");
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.delay(500);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
@ -2608,19 +2608,19 @@ bool HopkinsEngine::runLinuxFull() {
|
||||
if (!_globals.SAUVEGARDE->data[svField170]) {
|
||||
_soundManager.WSOUND(3);
|
||||
if (_globals.FR == 1)
|
||||
_graphicsManager.LOAD_IMAGE("fondfr");
|
||||
_graphicsManager.loadImage("fondfr");
|
||||
else if (!_globals.FR)
|
||||
_graphicsManager.LOAD_IMAGE("fondan");
|
||||
_graphicsManager.loadImage("fondan");
|
||||
else if (_globals.FR == 2)
|
||||
_graphicsManager.LOAD_IMAGE("fondes");
|
||||
_graphicsManager.loadImage("fondes");
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.delay(500);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
_globals.iRegul = 1;
|
||||
_soundManager.SPECIAL_SOUND = 2;
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
if (!_globals.CENSURE)
|
||||
@ -2772,9 +2772,9 @@ bool HopkinsEngine::runLinuxFull() {
|
||||
}
|
||||
if (_globals.SORTIE == 18) {
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_soundManager.WSOUND_OFF();
|
||||
_soundManager.WSOUND(29);
|
||||
@ -2815,9 +2815,9 @@ bool HopkinsEngine::runLinuxFull() {
|
||||
_objectsManager.PERSONAGE2("IM20", "IM20", "ANIM20", "IM20", 6);
|
||||
if (_globals.SORTIE == 17) {
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_soundManager.WSOUND_OFF();
|
||||
_soundManager.WSOUND(6);
|
||||
@ -3283,9 +3283,9 @@ bool HopkinsEngine::runLinuxFull() {
|
||||
if (_globals.SORTIE == 18) {
|
||||
_globals.iRegul = 1;
|
||||
_soundManager.WSOUND_OFF();
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_soundManager.WSOUND(6);
|
||||
if (_globals.SVGA == 2)
|
||||
@ -3336,12 +3336,12 @@ bool HopkinsEngine::runLinuxFull() {
|
||||
_globals.ECRAN = 113;
|
||||
_globals.SAUVEGARDE->data[svField5] = 113;
|
||||
_computerManager.showComputer(COMPUTER_HOPKINS);
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.DD_VBL();
|
||||
memset(_graphicsManager.VESA_BUFFER, 0, 0x4B000u);
|
||||
memset(_graphicsManager.VESA_SCREEN, 0, 0x4B000u);
|
||||
memset(_graphicsManager._vesaBuffer, 0, 0x4B000u);
|
||||
memset(_graphicsManager._vesaScreen, 0, 0x4B000u);
|
||||
_graphicsManager.Cls_Pal();
|
||||
_graphicsManager.RESET_SEGMENT_VESA();
|
||||
break;
|
||||
@ -3353,9 +3353,9 @@ bool HopkinsEngine::runLinuxFull() {
|
||||
_globals.ECRAN = 114;
|
||||
_globals.SAUVEGARDE->data[svField5] = 114;
|
||||
_computerManager.showComputer(COMPUTER_SAMANTHAS);
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
break;
|
||||
|
||||
case 115:
|
||||
@ -3365,17 +3365,17 @@ bool HopkinsEngine::runLinuxFull() {
|
||||
_globals.ECRAN = 115;
|
||||
_globals.SAUVEGARDE->data[svField5] = 115;
|
||||
_computerManager.showComputer(COMPUTER_PUBLIC);
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
break;
|
||||
|
||||
case 150:
|
||||
_soundManager.WSOUND(16);
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
_animationManager.playAnim("JOUR1A.anm", 12, 12, 2000);
|
||||
@ -3386,9 +3386,9 @@ bool HopkinsEngine::runLinuxFull() {
|
||||
case 151:
|
||||
_soundManager.WSOUND(16);
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
_animationManager.playAnim("JOUR3A.anm", 12, 12, 2000);
|
||||
@ -3399,9 +3399,9 @@ bool HopkinsEngine::runLinuxFull() {
|
||||
case 152:
|
||||
_soundManager.WSOUND(16);
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
_animationManager.playAnim("JOUR4A.anm", 12, 12, 2000);
|
||||
@ -3441,7 +3441,7 @@ int HopkinsEngine::getRandomNumber(int maxNumber) {
|
||||
|
||||
void HopkinsEngine::INIT_SYSTEM() {
|
||||
// Set graphics mode
|
||||
_graphicsManager.SET_MODE(SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
_graphicsManager.setGraphicalMode(SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
|
||||
// Synchronise the sound settings from ScummVM
|
||||
_soundManager.syncSoundSettings();
|
||||
@ -3539,14 +3539,14 @@ void HopkinsEngine::INTRORUN() {
|
||||
|
||||
if (!_eventsManager._escKeyFl) {
|
||||
_soundManager.VOICE_MIX(3, 3);
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_graphicsManager.DD_VBL();
|
||||
_soundManager.WSOUND(11);
|
||||
_graphicsManager.LOAD_IMAGE("intro1");
|
||||
_graphicsManager.SCROLL_ECRAN(0);
|
||||
_graphicsManager.loadImage("intro1");
|
||||
_graphicsManager.scrollScreen(0);
|
||||
_graphicsManager.ofscroll = 0;
|
||||
_graphicsManager.SETCOLOR3(252, 100, 100, 100);
|
||||
_graphicsManager.SETCOLOR3(253, 100, 100, 100);
|
||||
@ -3586,8 +3586,8 @@ void HopkinsEngine::INTRORUN() {
|
||||
_soundManager.VOICE_MIX(4, 3);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
_graphicsManager.no_scroll = 0;
|
||||
_graphicsManager.LOAD_IMAGE("intro2");
|
||||
_graphicsManager.SCROLL_ECRAN(0);
|
||||
_graphicsManager.loadImage("intro2");
|
||||
_graphicsManager.scrollScreen(0);
|
||||
_animationManager.loadAnim("INTRO2");
|
||||
_graphicsManager.VISU_ALL();
|
||||
_soundManager.WSOUND(23);
|
||||
@ -3618,7 +3618,7 @@ void HopkinsEngine::INTRORUN() {
|
||||
// CHECKME: Useless variables?
|
||||
// v21 = *(uint16 *)&_graphicsManager.Palette[796];
|
||||
// v22 = _graphicsManager.Palette[798];
|
||||
_graphicsManager.setpal_vga256_linux(paletteData, _graphicsManager.VESA_BUFFER);
|
||||
_graphicsManager.setpal_vga256_linux(paletteData, _graphicsManager._vesaBuffer);
|
||||
_graphicsManager.FIN_VISU();
|
||||
|
||||
if (shouldQuit())
|
||||
@ -3633,8 +3633,8 @@ void HopkinsEngine::INTRORUN() {
|
||||
_soundManager.SPECIAL_SOUND = 0;
|
||||
|
||||
if (!_eventsManager._escKeyFl) {
|
||||
_graphicsManager.LOAD_IMAGE("intro2");
|
||||
_graphicsManager.SCROLL_ECRAN(0);
|
||||
_graphicsManager.loadImage("intro2");
|
||||
_graphicsManager.scrollScreen(0);
|
||||
_animationManager.loadAnim("INTRO2");
|
||||
_graphicsManager.VISU_ALL();
|
||||
_soundManager.WSOUND(23);
|
||||
@ -3653,7 +3653,7 @@ void HopkinsEngine::INTRORUN() {
|
||||
|
||||
_globals.BPP_NOAFF = false;
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.setpal_vga256_linux(paletteData2, _graphicsManager.VESA_BUFFER);
|
||||
_graphicsManager.setpal_vga256_linux(paletteData2, _graphicsManager._vesaBuffer);
|
||||
|
||||
int v9 = 0;
|
||||
while (!shouldQuit() && !_eventsManager._escKeyFl) {
|
||||
@ -3674,7 +3674,7 @@ void HopkinsEngine::INTRORUN() {
|
||||
_graphicsManager.Palette[i] -= v12;
|
||||
}
|
||||
|
||||
_graphicsManager.setpal_vga256_linux(_graphicsManager.Palette, _graphicsManager.VESA_BUFFER);
|
||||
_graphicsManager.setpal_vga256_linux(_graphicsManager.Palette, _graphicsManager._vesaBuffer);
|
||||
|
||||
|
||||
if (2 * v9 > 1) {
|
||||
@ -3682,7 +3682,7 @@ void HopkinsEngine::INTRORUN() {
|
||||
_eventsManager.VBL();
|
||||
}
|
||||
|
||||
_graphicsManager.setpal_vga256_linux(paletteData2, _graphicsManager.VESA_BUFFER);
|
||||
_graphicsManager.setpal_vga256_linux(paletteData2, _graphicsManager._vesaBuffer);
|
||||
if (20 - v9 > 1) {
|
||||
for (int i = 1; i < 20 - v9; i++)
|
||||
_eventsManager.VBL();
|
||||
@ -3690,7 +3690,7 @@ void HopkinsEngine::INTRORUN() {
|
||||
|
||||
v9 += 2;
|
||||
if (v9 > 15) {
|
||||
_graphicsManager.setpal_vga256_linux(paletteData, _graphicsManager.VESA_BUFFER);
|
||||
_graphicsManager.setpal_vga256_linux(paletteData, _graphicsManager._vesaBuffer);
|
||||
for (uint j = 1; j < 100 / _globals._speed; ++j)
|
||||
_eventsManager.VBL();
|
||||
|
||||
@ -3705,7 +3705,7 @@ void HopkinsEngine::INTRORUN() {
|
||||
_eventsManager.VBL();
|
||||
|
||||
Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsManager.Palette[0]);
|
||||
_graphicsManager.setpal_vga256_linux(_graphicsManager.Palette, _graphicsManager.VESA_BUFFER);
|
||||
_graphicsManager.setpal_vga256_linux(_graphicsManager.Palette, _graphicsManager._vesaBuffer);
|
||||
|
||||
for (uint m = 0; m < 50 / _globals._speed; ++m) {
|
||||
if (m == 30 / _globals._speed) {
|
||||
@ -3764,9 +3764,9 @@ void HopkinsEngine::PASS() {
|
||||
return;
|
||||
|
||||
if (_globals.FR == 1)
|
||||
_graphicsManager.LOAD_IMAGE("ndfr");
|
||||
_graphicsManager.loadImage("ndfr");
|
||||
else
|
||||
_graphicsManager.LOAD_IMAGE("nduk");
|
||||
_graphicsManager.loadImage("nduk");
|
||||
|
||||
_graphicsManager.FADE_INW();
|
||||
if (_soundManager.VOICEOFF)
|
||||
@ -3788,9 +3788,9 @@ void HopkinsEngine::NO_DISPO(int sortie) {
|
||||
void HopkinsEngine::ENDEMO() {
|
||||
_soundManager.WSOUND(28);
|
||||
if (_globals.FR == 1)
|
||||
_graphicsManager.LOAD_IMAGE("endfr");
|
||||
_graphicsManager.loadImage("endfr");
|
||||
else
|
||||
_graphicsManager.LOAD_IMAGE("enduk");
|
||||
_graphicsManager.loadImage("enduk");
|
||||
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.delay(1500);
|
||||
@ -3801,9 +3801,9 @@ void HopkinsEngine::ENDEMO() {
|
||||
void HopkinsEngine::BOOM() {
|
||||
_graphicsManager.nbrligne = SCREEN_WIDTH;
|
||||
_graphicsManager.SCANLINE(SCREEN_WIDTH);
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
|
||||
_globals.iRegul = 1;
|
||||
@ -3815,7 +3815,7 @@ void HopkinsEngine::BOOM() {
|
||||
_animationManager.playAnim("BOMBE2A.ANM", 50, 14, 500);
|
||||
|
||||
_soundManager.SPECIAL_SOUND = 0;
|
||||
_graphicsManager.LOAD_IMAGE("IM15");
|
||||
_graphicsManager.loadImage("IM15");
|
||||
_animationManager.loadAnim("ANIM15");
|
||||
_graphicsManager.VISU_ALL();
|
||||
_objectsManager.BOBANIM_OFF(7);
|
||||
@ -3860,7 +3860,7 @@ void HopkinsEngine::PUBQUIT() {
|
||||
_eventsManager._breakoutFl = false;
|
||||
_globals._disableInventFl = true;
|
||||
_globals.FLAG_VISIBLE = false;
|
||||
_graphicsManager.LOAD_IMAGE("BOX");
|
||||
_graphicsManager.loadImage("BOX");
|
||||
_soundManager.WSOUND(28);
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.mouseOn();
|
||||
@ -3891,7 +3891,7 @@ void HopkinsEngine::PUBQUIT() {
|
||||
void HopkinsEngine::INCENDIE() {
|
||||
_globals._disableInventFl = true;
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.LOAD_IMAGE("IM71");
|
||||
_graphicsManager.loadImage("IM71");
|
||||
_animationManager.loadAnim("ANIM71");
|
||||
_graphicsManager.SETCOLOR3(252, 100, 100, 100);
|
||||
_graphicsManager.SETCOLOR3(253, 100, 100, 100);
|
||||
@ -3926,9 +3926,9 @@ void HopkinsEngine::INCENDIE() {
|
||||
void HopkinsEngine::BASE() {
|
||||
_globals.iRegul = 1;
|
||||
_graphicsManager.nbrligne = SCREEN_WIDTH;
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_animationManager._clearAnimationFl = true;
|
||||
_soundManager.WSOUND(25);
|
||||
@ -3993,9 +3993,9 @@ void HopkinsEngine::BASE() {
|
||||
}
|
||||
|
||||
void HopkinsEngine::BASED() {
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_animationManager.NO_SEQ = false;
|
||||
_soundManager.WSOUND(26);
|
||||
@ -4005,7 +4005,7 @@ void HopkinsEngine::BASED() {
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
_animationManager.playSequence("abase.seq", 50, 15, 50);
|
||||
_animationManager.NO_COUL = false;
|
||||
_graphicsManager.LOAD_IMAGE("IM92");
|
||||
_graphicsManager.loadImage("IM92");
|
||||
_animationManager.loadAnim("ANIM92");
|
||||
_graphicsManager.VISU_ALL();
|
||||
_objectsManager.INILINK("IM92");
|
||||
@ -4044,7 +4044,7 @@ void HopkinsEngine::JOUE_FIN() {
|
||||
_globals.AFFLI = false;
|
||||
_globals.AFFIVBL = false;
|
||||
_soundManager.CHARGE_SAMPLE(1, "SOUND90.WAV");
|
||||
_graphicsManager.LOAD_IMAGE("IM100");
|
||||
_graphicsManager.loadImage("IM100");
|
||||
_animationManager.loadAnim("ANIM100");
|
||||
_graphicsManager.VISU_ALL();
|
||||
_eventsManager.mouseOn();
|
||||
@ -4118,7 +4118,7 @@ void HopkinsEngine::JOUE_FIN() {
|
||||
_animationManager.playAnim("BERM.ANM", 100, 24, 300);
|
||||
_graphicsManager.FIN_VISU();
|
||||
_soundManager.DEL_SAMPLE(1);
|
||||
_graphicsManager.LOAD_IMAGE("PLAN3");
|
||||
_graphicsManager.loadImage("PLAN3");
|
||||
_graphicsManager.FADE_INW();
|
||||
|
||||
_eventsManager._rateCounter = 0;
|
||||
@ -4134,9 +4134,9 @@ void HopkinsEngine::JOUE_FIN() {
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
_animationManager.playAnim("JOUR2A.anm", 12, 12, 1000);
|
||||
_soundManager.WSOUND(11);
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
_animationManager.playAnim("FF1a.anm", 18, 18, 9);
|
||||
_animationManager.playAnim("FF1a.anm", 9, 18, 9);
|
||||
@ -4190,9 +4190,9 @@ void HopkinsEngine::AVION() {
|
||||
_soundManager.WSOUND(28);
|
||||
_globals.iRegul = 1;
|
||||
_globals.nbrligne = SCREEN_WIDTH;
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
_graphicsManager.DD_Unlock();
|
||||
_graphicsManager.lockScreen();
|
||||
_graphicsManager.clearScreen();
|
||||
_graphicsManager.unlockScreen();
|
||||
_graphicsManager.Cls_Pal();
|
||||
|
||||
_animationManager._clearAnimationFl = false;
|
||||
@ -4268,7 +4268,7 @@ void HopkinsEngine::AVION() {
|
||||
|
||||
int HopkinsEngine::PWBASE() {
|
||||
_globals._disableInventFl = true;
|
||||
_graphicsManager.LOAD_IMAGE("PBASE");
|
||||
_graphicsManager.loadImage("PBASE");
|
||||
_graphicsManager.SETCOLOR3(252, 100, 100, 100);
|
||||
_graphicsManager.SETCOLOR3(253, 100, 100, 100);
|
||||
_graphicsManager.SETCOLOR3(251, 100, 100, 100);
|
||||
@ -4452,7 +4452,7 @@ void HopkinsEngine::CREDIT_AFFICHE(int startPosY, byte *buffer, char colour) {
|
||||
if (!curChar)
|
||||
break;
|
||||
if (curChar > 31) {
|
||||
_graphicsManager.Affiche_Fonte(_graphicsManager.VESA_BUFFER, _globals.police, startPosX, startPosY, curChar - 32, colour);
|
||||
_graphicsManager.Affiche_Fonte(_graphicsManager._vesaBuffer, _globals.police, startPosX, startPosY, curChar - 32, colour);
|
||||
startPosX += _objectsManager.getWidth(_globals.police, curChar - 32);
|
||||
}
|
||||
}
|
||||
@ -4461,7 +4461,7 @@ void HopkinsEngine::CREDIT_AFFICHE(int startPosY, byte *buffer, char colour) {
|
||||
void HopkinsEngine::Credits() {
|
||||
Charge_Credits();
|
||||
_globals.Credit_y = 436;
|
||||
_graphicsManager.LOAD_IMAGE("GENERIC");
|
||||
_graphicsManager.loadImage("GENERIC");
|
||||
_graphicsManager.FADE_INW();
|
||||
_soundManager.WSOUND(28);
|
||||
_eventsManager._mouseFl = false;
|
||||
@ -4499,7 +4499,7 @@ void HopkinsEngine::Credits() {
|
||||
--_globals.Credit_y;
|
||||
if (_globals.Credit_bx != -1 || _globals.Credit_bx1 != -1 || _globals.Credit_by != -1 || _globals.Credit_by1 != -1) {
|
||||
_eventsManager.VBL();
|
||||
_graphicsManager.SCOPY(_graphicsManager.VESA_SCREEN, 60, 50, 520, 380, _graphicsManager.VESA_BUFFER, 60, 50);
|
||||
_graphicsManager.SCOPY(_graphicsManager._vesaScreen, 60, 50, 520, 380, _graphicsManager._vesaBuffer, 60, 50);
|
||||
} else {
|
||||
_eventsManager.VBL();
|
||||
}
|
||||
@ -4731,7 +4731,7 @@ void HopkinsEngine::OCEAN(int16 a1, Common::String a2, Common::String a3, int16
|
||||
_fileManager.constructFilename(_globals.HOPSYSTEM, "VAISSEAU.SPR");
|
||||
_globals.PERSO = _fileManager.loadFile(_globals.NFICHIER);
|
||||
if (a2.size())
|
||||
_graphicsManager.LOAD_IMAGE(a2);
|
||||
_graphicsManager.loadImage(a2);
|
||||
|
||||
if ((a1 != 77) && (a1 != 84) && (a1 != 91))
|
||||
_objectsManager.INILINK("ocean");
|
||||
@ -4835,7 +4835,7 @@ bool HopkinsEngine::ADULT() {
|
||||
_globals._disableInventFl = true;
|
||||
_globals.SORTIE = 0;
|
||||
|
||||
_graphicsManager.LOAD_IMAGE("ADULT");
|
||||
_graphicsManager.loadImage("ADULT");
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.mouseOn();
|
||||
_eventsManager.changeMouseCursor(0);
|
||||
|
@ -76,11 +76,11 @@ int MenuManager::MENU() {
|
||||
|
||||
|
||||
if (_vm->_globals.FR == 0)
|
||||
_vm->_graphicsManager.LOAD_IMAGE("MENUAN");
|
||||
_vm->_graphicsManager.loadImage("MENUAN");
|
||||
else if (_vm->_globals.FR == 1)
|
||||
_vm->_graphicsManager.LOAD_IMAGE("MENUFR");
|
||||
_vm->_graphicsManager.loadImage("MENUFR");
|
||||
else if (_vm->_globals.FR == 2)
|
||||
_vm->_graphicsManager.LOAD_IMAGE("MENUES");
|
||||
_vm->_graphicsManager.loadImage("MENUES");
|
||||
|
||||
_vm->_graphicsManager.FADE_INW();
|
||||
if (_vm->_globals.FR == 0)
|
||||
|
@ -350,9 +350,9 @@ void ObjectsManager::displaySprite() {
|
||||
if (destY < _vm->_graphicsManager.min_y)
|
||||
destY = _vm->_graphicsManager.min_y;
|
||||
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager.VESA_SCREEN, x1_1, y1_1,
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager._vesaScreen, x1_1, y1_1,
|
||||
_vm->_fontManager._textList[idx]._width + 4, _vm->_fontManager._textList[idx]._height + 4,
|
||||
_vm->_graphicsManager.VESA_BUFFER,
|
||||
_vm->_graphicsManager._vesaBuffer,
|
||||
destX, destY);
|
||||
_vm->_fontManager._textList[idx]._enabledFl = false;
|
||||
}
|
||||
@ -376,9 +376,9 @@ void ObjectsManager::displaySprite() {
|
||||
if (v9 < _vm->_graphicsManager.min_y)
|
||||
v9 = _vm->_graphicsManager.min_y;
|
||||
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager.VESA_SCREEN, x1_2, y1_2,
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager._vesaScreen, x1_2, y1_2,
|
||||
_vm->_globals.Liste[idx]._width + 4, _vm->_globals.Liste[idx]._height + 4,
|
||||
_vm->_graphicsManager.VESA_BUFFER, v8, v9);
|
||||
_vm->_graphicsManager._vesaBuffer, v8, v9);
|
||||
_vm->_globals.Liste[idx].field0 = 0;
|
||||
}
|
||||
}
|
||||
@ -473,39 +473,39 @@ void ObjectsManager::displaySprite() {
|
||||
|
||||
_vm->_globals.NBTRI = 0;
|
||||
if (_vm->_dialogsManager._inventDisplayedFl) {
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_dialogsManager._inventWin1, _vm->_dialogsManager._inventX, _vm->_dialogsManager._inventY, _vm->_dialogsManager._inventWidth, _vm->_dialogsManager._inventHeight);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, _vm->_dialogsManager._inventWin1, _vm->_dialogsManager._inventX, _vm->_dialogsManager._inventY, _vm->_dialogsManager._inventWidth, _vm->_dialogsManager._inventHeight);
|
||||
if (_oldBorderPos.x && _oldBorderPos.y)
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_dialogsManager._inventBuf2, _oldBorderPos.x + 300, _oldBorderPos.y + 300, _oldBorderSpriteIndex + 1);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_dialogsManager._inventBuf2, _oldBorderPos.x + 300, _oldBorderPos.y + 300, _oldBorderSpriteIndex + 1);
|
||||
if (_borderPos.x && _borderPos.y)
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_dialogsManager._inventBuf2, _borderPos.x + 300, _borderPos.y + 300, _borderSpriteIndex);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_dialogsManager._inventBuf2, _borderPos.x + 300, _borderPos.y + 300, _borderSpriteIndex);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_dialogsManager._inventX, _vm->_dialogsManager._inventY, _vm->_dialogsManager._inventX + _vm->_dialogsManager._inventWidth, _vm->_dialogsManager._inventY + _vm->_dialogsManager._inventHeight);
|
||||
}
|
||||
|
||||
if (SL_FLAG == true) {
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, SL_SPR, _vm->_eventsManager._startPos.x + 183, 60, 274, 353);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, SL_SPR, _vm->_eventsManager._startPos.x + 183, 60, 274, 353);
|
||||
if (SL_X && SL_Y)
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, SL_SPR2, SL_X + _vm->_eventsManager._startPos.x + 300, SL_Y + 300, 0);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, SL_SPR2, SL_X + _vm->_eventsManager._startPos.x + 300, SL_Y + 300, 0);
|
||||
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_eventsManager._startPos.x + 183, 60, _vm->_eventsManager._startPos.x + 457, 413);
|
||||
}
|
||||
|
||||
// If the Options dialog is activated, draw the elements
|
||||
if (_vm->_globals._optionDialogFl) {
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals.OPTION_SPR,
|
||||
_vm->_eventsManager._startPos.x + 464, 407, 0);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals.OPTION_SPR,
|
||||
_vm->_eventsManager._startPos.x + 657, 556, _vm->_globals.opt_vitesse);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals.OPTION_SPR,
|
||||
_vm->_eventsManager._startPos.x + 731, 495, _vm->_globals.opt_txt);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals.OPTION_SPR,
|
||||
_vm->_eventsManager._startPos.x + 731, 468, _vm->_globals.opt_voice);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals.OPTION_SPR,
|
||||
_vm->_eventsManager._startPos.x + 731, 441, _vm->_globals.opt_sound);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals.OPTION_SPR,
|
||||
_vm->_eventsManager._startPos.x + 731, 414, _vm->_globals.opt_music);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals.OPTION_SPR,
|
||||
_vm->_eventsManager._startPos.x + 600, 522, _vm->_globals.opt_anm);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals.OPTION_SPR,
|
||||
_vm->_eventsManager._startPos.x + 611, 502, _vm->_globals.opt_scrspeed);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_eventsManager._startPos.x + 164, 107, _vm->_eventsManager._startPos.x + 498, 320);
|
||||
}
|
||||
@ -600,10 +600,10 @@ void ObjectsManager::DEF_BOB(int idx) {
|
||||
int yp = _vm->_globals.Bob[idx]._oldY;
|
||||
|
||||
if (_vm->_globals.Bob[idx]._isSpriteFl)
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.Bob[idx]._spriteData,
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals.Bob[idx]._spriteData,
|
||||
xp + 300, yp + 300, _vm->_globals.Bob[idx]._frameIndex);
|
||||
else
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager.VESA_BUFFER,
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer,
|
||||
_vm->_globals.Bob[idx]._spriteData, xp + 300, yp + 300, _vm->_globals.Bob[idx]._frameIndex,
|
||||
_vm->_globals.Bob[idx].field4A, _vm->_globals.Bob[idx]._oldY2,
|
||||
_vm->_globals.Bob[idx].field38);
|
||||
@ -948,10 +948,10 @@ void ObjectsManager::DEF_SPRITE(int idx) {
|
||||
v3 = _sprite[v2].field2C;
|
||||
v4 = _sprite[v2].field2E;
|
||||
if (_sprite[v2].field28)
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _sprite[v2]._spriteData,
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _sprite[v2]._spriteData,
|
||||
v3 + 300, v4 + 300, _sprite[v2]._spriteIndex);
|
||||
else
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager.VESA_BUFFER, _sprite[v2]._spriteData,
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, _sprite[v2]._spriteData,
|
||||
v3 + 300, v4 + 300, _sprite[v2]._spriteIndex, _sprite[v2].field36, _sprite[v2].field34, _sprite[v2].fieldE);
|
||||
|
||||
v5 = idx;
|
||||
@ -992,7 +992,7 @@ void ObjectsManager::DEF_SPRITE(int idx) {
|
||||
}
|
||||
|
||||
void ObjectsManager::DEF_CACHE(int idx) {
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.CACHE_BANQUE[1],
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals.CACHE_BANQUE[1],
|
||||
_vm->_globals.Cache[idx].field0 + 300, _vm->_globals.Cache[idx].field4 + 300,
|
||||
_vm->_globals.Cache[idx].field2);
|
||||
|
||||
@ -1271,10 +1271,10 @@ LABEL_38:
|
||||
|
||||
if ((v14 != 2) && (v14 != 4)) {
|
||||
if (_vm->_globals.Liste2[v27]._visibleFl) {
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager.VESA_SCREEN,
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager._vesaScreen,
|
||||
_vm->_globals.Liste2[v27]._xp, _vm->_globals.Liste2[v27]._yp,
|
||||
_vm->_globals.Liste2[v27]._width, _vm->_globals.Liste2[v27]._height,
|
||||
_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.Liste2[v27]._xp,
|
||||
_vm->_graphicsManager._vesaBuffer, _vm->_globals.Liste2[v27]._xp,
|
||||
_vm->_globals.Liste2[v27]._yp);
|
||||
_vm->_globals.Liste2[v27]._visibleFl = false;
|
||||
}
|
||||
@ -1283,10 +1283,10 @@ LABEL_38:
|
||||
|
||||
if (_vm->_globals.Bob[v27].field0 == 11) {
|
||||
if (_vm->_globals.Liste2[v27]._visibleFl) {
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager.VESA_SCREEN,
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager._vesaScreen,
|
||||
_vm->_globals.Liste2[v27]._xp, _vm->_globals.Liste2[v27]._yp,
|
||||
_vm->_globals.Liste2[v27]._width, _vm->_globals.Liste2[v27]._height,
|
||||
_vm->_graphicsManager.VESA_BUFFER,
|
||||
_vm->_graphicsManager._vesaBuffer,
|
||||
_vm->_globals.Liste2[v27]._xp, _vm->_globals.Liste2[v27]._yp);
|
||||
_vm->_globals.Liste2[v27]._visibleFl = false;
|
||||
}
|
||||
@ -1321,12 +1321,12 @@ void ObjectsManager::AFF_VBOB() {
|
||||
width = getWidth(_vm->_globals.VBob[idx].spriteData, _vm->_globals.VBob[idx]._frameIndex);
|
||||
height = getHeight(_vm->_globals.VBob[idx].spriteData, _vm->_globals.VBob[idx]._frameIndex);
|
||||
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_SCREEN,
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaScreen,
|
||||
_vm->_globals.VBob[idx]._surface, _vm->_globals.VBob[idx]._xp,
|
||||
_vm->_globals.VBob[idx]._yp, width, height);
|
||||
|
||||
_vm->_graphicsManager.Restore_Mem(
|
||||
_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.VBob[idx]._surface,
|
||||
_vm->_graphicsManager._vesaBuffer, _vm->_globals.VBob[idx]._surface,
|
||||
_vm->_globals.VBob[idx]._xp, _vm->_globals.VBob[idx]._yp,
|
||||
width, height);
|
||||
|
||||
@ -1351,12 +1351,12 @@ void ObjectsManager::AFF_VBOB() {
|
||||
width = getWidth(_vm->_globals.VBob[idx]._oldSpriteData, _vm->_globals.VBob[idx]._oldFrameIndex);
|
||||
height = getHeight(_vm->_globals.VBob[idx]._oldSpriteData, _vm->_globals.VBob[idx]._oldFrameIndex);
|
||||
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_SCREEN,
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaScreen,
|
||||
_vm->_globals.VBob[idx]._surface, _vm->_globals.VBob[idx]._oldX,
|
||||
_vm->_globals.VBob[idx]._oldY,
|
||||
width, height);
|
||||
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER,
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer,
|
||||
_vm->_globals.VBob[idx]._surface, _vm->_globals.VBob[idx]._oldX,
|
||||
_vm->_globals.VBob[idx]._oldY, width, height);
|
||||
|
||||
@ -1383,27 +1383,27 @@ void ObjectsManager::AFF_VBOB() {
|
||||
byte *surface = _vm->_globals.allocMemory(height * width);
|
||||
_vm->_globals.VBob[idx]._surface = surface;
|
||||
|
||||
_vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager.VESA_SCREEN, surface,
|
||||
_vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager._vesaScreen, surface,
|
||||
_vm->_globals.VBob[idx]._xp, _vm->_globals.VBob[idx]._yp, width, height);
|
||||
|
||||
byte *v10 = _vm->_globals.VBob[idx].spriteData;
|
||||
if (*v10 == 78) {
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager.VESA_SCREEN, v10,
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaScreen, v10,
|
||||
_vm->_globals.VBob[idx]._xp + 300, _vm->_globals.VBob[idx]._yp + 300,
|
||||
_vm->_globals.VBob[idx]._frameIndex,
|
||||
0, 0, 0);
|
||||
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager.VESA_BUFFER,
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer,
|
||||
_vm->_globals.VBob[idx].spriteData,
|
||||
_vm->_globals.VBob[idx]._xp + 300, _vm->_globals.VBob[idx]._yp + 300,
|
||||
_vm->_globals.VBob[idx]._frameIndex,
|
||||
0, 0, 0);
|
||||
} else {
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER,
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer,
|
||||
v10, _vm->_globals.VBob[idx]._xp + 300, _vm->_globals.VBob[idx]._yp + 300,
|
||||
_vm->_globals.VBob[idx]._frameIndex);
|
||||
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_SCREEN, _vm->_globals.VBob[idx].spriteData,
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaScreen, _vm->_globals.VBob[idx].spriteData,
|
||||
_vm->_globals.VBob[idx]._xp + 300, _vm->_globals.VBob[idx]._yp + 300,
|
||||
_vm->_globals.VBob[idx]._frameIndex);
|
||||
}
|
||||
@ -1433,7 +1433,7 @@ int ObjectsManager::getSpriteY(int idx) {
|
||||
}
|
||||
|
||||
void ObjectsManager::SPRITE_NOW(const byte *spriteData, int a2, int a3, int a4, int a5, int a6, int a7, int a8) {
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager.VESA_BUFFER, spriteData, a2, a3, a5, a6, a7, a8);
|
||||
_vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager._vesaBuffer, spriteData, a2, a3, a5, a6, a7, a8);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1546,10 +1546,10 @@ void ObjectsManager::SETTAILLESPR(int idx, int a2) {
|
||||
_sprite[idx].fieldC = a2;
|
||||
}
|
||||
|
||||
void ObjectsManager::SETFLIPSPR(int idx, int a2) {
|
||||
void ObjectsManager::setFlipSprite(int idx, bool flip) {
|
||||
if (!_sprite[idx].field28) {
|
||||
assert (idx <= MAX_SPRITE);
|
||||
_sprite[idx].fieldE = a2;
|
||||
_sprite[idx].fieldE = flip;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1647,7 +1647,7 @@ LABEL_54:
|
||||
if (_vm->_eventsManager._mouseCursorId == 4) {
|
||||
v1 = v4 + 1;
|
||||
if ((uint16)(v4 + 1) > 1u)
|
||||
BTDROITE();
|
||||
handleRightButton();
|
||||
}
|
||||
}
|
||||
if ((_vm->_globals.PLAN_FLAG == true && v4 == -1) || !v4) {
|
||||
@ -1752,13 +1752,13 @@ void ObjectsManager::GOHOME() {
|
||||
} else {
|
||||
setSpriteIndex(0, _vm->_globals.g_old_sens + 59);
|
||||
_vm->_globals.ACTION_SENS = 0;
|
||||
if (_vm->_globals.GOACTION == 1)
|
||||
if (_vm->_globals.GOACTION)
|
||||
v54 = _vm->_globals.SAUVEGARDE->data[svField2];
|
||||
else
|
||||
v54 = NUMZONE;
|
||||
_vm->_globals.chemin = (int16 *)g_PTRNUL;
|
||||
VERIFTAILLE();
|
||||
SETFLIPSPR(0, 0);
|
||||
setFlipSprite(0, false);
|
||||
_vm->_globals.Compteur = 0;
|
||||
_vm->_globals.chemin = (int16 *)g_PTRNUL;
|
||||
_vm->_globals.g_old_sens = -1;
|
||||
@ -2093,7 +2093,7 @@ LABEL_153:
|
||||
_vm->_globals.chemin++;
|
||||
|
||||
if (nouveau_x == -1 && v48 == -1) {
|
||||
if (_vm->_globals.GOACTION == 1)
|
||||
if (_vm->_globals.GOACTION)
|
||||
v49 = _vm->_globals.SAUVEGARDE->data[svField2];
|
||||
else
|
||||
v49 = NUMZONE;
|
||||
@ -2101,7 +2101,7 @@ LABEL_153:
|
||||
_vm->_globals.ACTION_SENS = 0;
|
||||
_vm->_globals.chemin = (int16 *)g_PTRNUL;
|
||||
VERIFTAILLE();
|
||||
SETFLIPSPR(0, 0);
|
||||
setFlipSprite(0, false);
|
||||
_vm->_globals.Compteur = 0;
|
||||
_vm->_globals.g_old_sens = -1;
|
||||
g_old_x = getSpriteX(0);
|
||||
@ -2150,41 +2150,41 @@ LABEL_153:
|
||||
if (v47 == 1) {
|
||||
VERIFTAILLE();
|
||||
if (_vm->_globals.g_old_sens == 7)
|
||||
SETFLIPSPR(0, 1);
|
||||
setFlipSprite(0, true);
|
||||
if (_vm->_globals.g_old_sens == 3)
|
||||
SETFLIPSPR(0, 0);
|
||||
setFlipSprite(0, false);
|
||||
if (_vm->_globals.g_old_sens == 1)
|
||||
SETFLIPSPR(0, 0);
|
||||
setFlipSprite(0, false);
|
||||
if (_vm->_globals.g_old_sens == 5)
|
||||
SETFLIPSPR(0, 0);
|
||||
setFlipSprite(0, false);
|
||||
if (_vm->_globals.g_old_sens == 2)
|
||||
SETFLIPSPR(0, 0);
|
||||
setFlipSprite(0, false);
|
||||
if (_vm->_globals.g_old_sens == 8)
|
||||
SETFLIPSPR(0, 1);
|
||||
setFlipSprite(0, true);
|
||||
if (_vm->_globals.g_old_sens == 4)
|
||||
SETFLIPSPR(0, 0);
|
||||
setFlipSprite(0, false);
|
||||
if (_vm->_globals.g_old_sens == 6)
|
||||
SETFLIPSPR(0, 1);
|
||||
setFlipSprite(0, true);
|
||||
setSpriteX(0, nouveau_x);
|
||||
setSpriteY(0, nouveau_y);
|
||||
setSpriteIndex(0, v1);
|
||||
} else {
|
||||
if (_vm->_globals.g_old_sens == 7)
|
||||
SETFLIPSPR(0, 1);
|
||||
setFlipSprite(0, true);
|
||||
if (_vm->_globals.g_old_sens == 3)
|
||||
SETFLIPSPR(0, 0);
|
||||
setFlipSprite(0, false);
|
||||
if (_vm->_globals.g_old_sens == 1)
|
||||
SETFLIPSPR(0, 0);
|
||||
setFlipSprite(0, false);
|
||||
if (_vm->_globals.g_old_sens == 5)
|
||||
SETFLIPSPR(0, 0);
|
||||
setFlipSprite(0, false);
|
||||
if (_vm->_globals.g_old_sens == 2)
|
||||
SETFLIPSPR(0, 0);
|
||||
setFlipSprite(0, false);
|
||||
if (_vm->_globals.g_old_sens == 8)
|
||||
SETFLIPSPR(0, 1);
|
||||
setFlipSprite(0, true);
|
||||
if (_vm->_globals.g_old_sens == 4)
|
||||
SETFLIPSPR(0, 0);
|
||||
setFlipSprite(0, false);
|
||||
if (_vm->_globals.g_old_sens == 6)
|
||||
SETFLIPSPR(0, 1);
|
||||
setFlipSprite(0, true);
|
||||
_vm->_globals.Compteur = 0;
|
||||
}
|
||||
_vm->_globals.g_old_sens = nouveau_sens;
|
||||
@ -2293,8 +2293,10 @@ void ObjectsManager::CHARGE_OBSTACLE(const Common::String &file) {
|
||||
_vm->_globals.freeMemory(ptr);
|
||||
}
|
||||
|
||||
// Load Zone
|
||||
void ObjectsManager::CHARGE_ZONE(const Common::String &file) {
|
||||
/**
|
||||
* Load Zone
|
||||
*/
|
||||
void ObjectsManager::loadZone(const Common::String &file) {
|
||||
int v3;
|
||||
int v4;
|
||||
int v5;
|
||||
@ -2471,10 +2473,10 @@ void ObjectsManager::PLAN_BETA() {
|
||||
_vm->_globals.NOT_VERIF = 1;
|
||||
_vm->_soundManager.WSOUND(31);
|
||||
_vm->_globals.iRegul = 1;
|
||||
_vm->_graphicsManager.LOAD_IMAGE("PLAN");
|
||||
_vm->_graphicsManager.loadImage("PLAN");
|
||||
CHARGE_OBSTACLE("PLAN.OB2");
|
||||
_vm->_globals.CHARGE_CACHE("PLAN.CA2");
|
||||
CHARGE_ZONE("PLAN.ZO2");
|
||||
_vm->_globals.loadCache("PLAN.CA2");
|
||||
loadZone("PLAN.ZO2");
|
||||
_vm->_fileManager.constructFilename(_vm->_globals.HOPSYSTEM, "VOITURE.SPR");
|
||||
_spritePtr = _vm->_fileManager.loadFile(_vm->_globals.NFICHIER);
|
||||
_vm->_animationManager.loadAnim("PLAN");
|
||||
@ -2496,7 +2498,7 @@ void ObjectsManager::PLAN_BETA() {
|
||||
my_anim = 0;
|
||||
_vm->_eventsManager.mouseOn();
|
||||
v3 = getSpriteX(0);
|
||||
_vm->_graphicsManager.SCROLL_ECRAN(v3 - 320);
|
||||
_vm->_graphicsManager.scrollScreen(v3 - 320);
|
||||
_vm->_graphicsManager.ofscroll = getSpriteX(0) - 320;
|
||||
SPRITE_ON(0);
|
||||
_vm->_globals.chemin = (int16 *)g_PTRNUL;
|
||||
@ -2534,13 +2536,13 @@ void ObjectsManager::PLAN_BETA() {
|
||||
_vm->_eventsManager._curMouseButton = 0;
|
||||
}
|
||||
if (v5 == 1)
|
||||
BTGAUCHE();
|
||||
handleLeftButton();
|
||||
}
|
||||
|
||||
VERIFZONE();
|
||||
GOHOME2();
|
||||
|
||||
if (_vm->_globals.chemin == (int16 *)g_PTRNUL && _vm->_globals.GOACTION == 1)
|
||||
if (_vm->_globals.chemin == (int16 *)g_PTRNUL && _vm->_globals.GOACTION)
|
||||
PARADISE();
|
||||
_vm->_eventsManager.VBL();
|
||||
|
||||
@ -2563,8 +2565,10 @@ void ObjectsManager::PLAN_BETA() {
|
||||
_vm->_globals.PLAN_FLAG = false;
|
||||
}
|
||||
|
||||
// Left Button
|
||||
void ObjectsManager::BTGAUCHE() {
|
||||
/**
|
||||
* Handle Left button
|
||||
*/
|
||||
void ObjectsManager::handleLeftButton() {
|
||||
int srcX, srcY;
|
||||
int destX, destY;
|
||||
int v1;
|
||||
@ -2631,7 +2635,7 @@ void ObjectsManager::BTGAUCHE() {
|
||||
}
|
||||
}
|
||||
if (_vm->_globals.PLAN_FLAG == true) {
|
||||
if (_vm->_globals.GOACTION != 1)
|
||||
if (!_vm->_globals.GOACTION)
|
||||
goto LABEL_38;
|
||||
VERIFZONE();
|
||||
if (NUMZONE <= 0)
|
||||
@ -2650,9 +2654,9 @@ void ObjectsManager::BTGAUCHE() {
|
||||
v5[v2 + 2] = -1;
|
||||
v5[v2 + 3] = -1;
|
||||
}
|
||||
if (_vm->_globals.GOACTION == 1) {
|
||||
if (_vm->_globals.GOACTION) {
|
||||
VERIFZONE();
|
||||
_vm->_globals.GOACTION = 0;
|
||||
_vm->_globals.GOACTION = false;
|
||||
_vm->_globals.SAUVEGARDE->data[svField1] = 0;
|
||||
_vm->_globals.SAUVEGARDE->data[svField2] = 0;
|
||||
}
|
||||
@ -2672,7 +2676,7 @@ LABEL_38:
|
||||
}
|
||||
}
|
||||
}
|
||||
_vm->_globals.GOACTION = 0;
|
||||
_vm->_globals.GOACTION = false;
|
||||
v9 = _vm->_globals.chemin;
|
||||
_vm->_globals.chemin = (int16 *)g_PTRNUL;
|
||||
if (_vm->_globals.FORET && ((uint16)(NUMZONE - 20) <= 1u || (uint16)(NUMZONE - 22) <= 1u)) {
|
||||
@ -2699,7 +2703,7 @@ LABEL_64:
|
||||
_vm->_globals.ACTION_SENS = 0;
|
||||
_vm->_globals.chemin = (int16 *)g_PTRNUL;
|
||||
VERIFTAILLE();
|
||||
SETFLIPSPR(0, 0);
|
||||
setFlipSprite(0, false);
|
||||
_vm->_globals.Compteur = 0;
|
||||
_vm->_globals.g_old_sens = -1;
|
||||
goto LABEL_65;
|
||||
@ -2735,7 +2739,7 @@ LABEL_65:
|
||||
_vm->_globals.SAUVEGARDE->data[svField1] = 6;
|
||||
_vm->_globals.SAUVEGARDE->data[svField2] = NUMZONE;
|
||||
_vm->_globals.SAUVEGARDE->data[svField3] = _vm->_globals._curObjectIndex;
|
||||
_vm->_globals.GOACTION = 1;
|
||||
_vm->_globals.GOACTION = true;
|
||||
}
|
||||
_vm->_fontManager.hideText(5);
|
||||
_vm->_graphicsManager.SETCOLOR4(251, 100, 100, 100);
|
||||
@ -2858,10 +2862,10 @@ LABEL_64:
|
||||
if (_vm->_eventsManager._mouseCursorId == 4) {
|
||||
result = NUMZONE + 1;
|
||||
if ((uint16)(NUMZONE + 1) > 1u)
|
||||
BTDROITE();
|
||||
handleRightButton();
|
||||
}
|
||||
}
|
||||
_vm->_globals.GOACTION = 0;
|
||||
_vm->_globals.GOACTION = false;
|
||||
}
|
||||
|
||||
// Clear Screen
|
||||
@ -2899,7 +2903,7 @@ void ObjectsManager::CLEAR_ECRAN() {
|
||||
Vold_taille = 200;
|
||||
_vm->_globals.SAUVEGARDE->data[svField1] = 0;
|
||||
_vm->_globals.SAUVEGARDE->data[svField2] = 0;
|
||||
_vm->_globals.GOACTION = 0;
|
||||
_vm->_globals.GOACTION = false;
|
||||
_forceZoneFl = true;
|
||||
_changeVerbFl = false;
|
||||
_vm->_globals.NOSPRECRAN = false;
|
||||
@ -2922,7 +2926,7 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha
|
||||
CharacterLocation *loc;
|
||||
|
||||
CH_TETE = 1;
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager.VESA_SCREEN, 532, 25, 65, 40, _vm->_graphicsManager.VESA_BUFFER, 532, 25);
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager._vesaScreen, 532, 25, 65, 40, _vm->_graphicsManager._vesaBuffer, 532, 25);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(532, 25, 597, 65);
|
||||
_vm->_globals.NOT_VERIF = 1;
|
||||
_vm->_globals.chemin = (int16 *)g_PTRNUL;
|
||||
@ -3670,7 +3674,10 @@ LABEL_67:
|
||||
} while (_vm->_globals.ZONEP[NUMZONE].fieldE != 2);
|
||||
}
|
||||
|
||||
void ObjectsManager::BTDROITE() {
|
||||
/**
|
||||
* Handle Right button
|
||||
*/
|
||||
void ObjectsManager::handleRightButton() {
|
||||
if ((uint16)(NUMZONE + 1) > 1u) {
|
||||
VERBEPLUS();
|
||||
if (_vm->_eventsManager._mouseCursorId != 23)
|
||||
@ -4049,7 +4056,7 @@ void ObjectsManager::SPECIAL_JEU() {
|
||||
v1 = _vm->_globals.allocMemory(0x3E8u);
|
||||
memcpy(v1, _vm->_graphicsManager.Palette, 0x301u);
|
||||
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER("TEMP1.SCR", _vm->_graphicsManager.VESA_SCREEN, 0x4B000u);
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER("TEMP1.SCR", _vm->_graphicsManager._vesaScreen, 0x4B000u);
|
||||
|
||||
if (!_vm->_graphicsManager.nbrligne)
|
||||
_vm->_graphicsManager.ofscroll = 0;
|
||||
@ -4065,19 +4072,19 @@ void ObjectsManager::SPECIAL_JEU() {
|
||||
_vm->_graphicsManager.NB_SCREEN();
|
||||
_vm->_globals.NECESSAIRE = false;
|
||||
|
||||
_vm->_saveLoadManager.bload("TEMP1.SCR", _vm->_graphicsManager.VESA_SCREEN);
|
||||
_vm->_saveLoadManager.bload("TEMP1.SCR", _vm->_graphicsManager._vesaScreen);
|
||||
g_system->getSavefileManager()->removeSavefile("TEMP1.SCR");
|
||||
|
||||
PERSO_ON = false;
|
||||
memcpy(_vm->_graphicsManager.Palette, v1, 0x301u);
|
||||
_vm->_graphicsManager.SHOW_PALETTE();
|
||||
_vm->_globals.freeMemory(v1);
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
v2 = _vm->_graphicsManager.VESA_BUFFER;
|
||||
v3 = _vm->_graphicsManager.VESA_SCREEN;
|
||||
memcpy(_vm->_graphicsManager.VESA_BUFFER, _vm->_graphicsManager.VESA_SCREEN, 0x95FFCu);
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
v2 = _vm->_graphicsManager._vesaBuffer;
|
||||
v3 = _vm->_graphicsManager._vesaScreen;
|
||||
memcpy(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager._vesaScreen, 0x95FFCu);
|
||||
v3 = v3 + 614396;
|
||||
v2 = v2 + 614396;
|
||||
*v2 = *v3;
|
||||
@ -5268,7 +5275,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
|
||||
_vm->_globals.AFFLI = false;
|
||||
_vm->_globals.AFFIVBL = false;
|
||||
if (!backgroundFile.empty())
|
||||
_vm->_graphicsManager.LOAD_IMAGE(backgroundFile);
|
||||
_vm->_graphicsManager.loadImage(backgroundFile);
|
||||
if (!linkFile.empty())
|
||||
INILINK(linkFile);
|
||||
if (!animFile.empty())
|
||||
@ -5318,14 +5325,14 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
|
||||
do {
|
||||
v9 = _vm->_eventsManager.getMouseButton();
|
||||
if (v9 == 1) {
|
||||
BTGAUCHE();
|
||||
handleLeftButton();
|
||||
v9 = 1;
|
||||
}
|
||||
if (v9 == 2)
|
||||
BTDROITE();
|
||||
handleRightButton();
|
||||
_vm->_dialogsManager.testDialogOpening();
|
||||
VERIFZONE();
|
||||
if (_vm->_globals.GOACTION == 1)
|
||||
if (_vm->_globals.GOACTION)
|
||||
PARADISE();
|
||||
if (!_vm->_globals.SORTIE) {
|
||||
_vm->_eventsManager.VBL();
|
||||
@ -5368,7 +5375,7 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm
|
||||
_vm->_soundManager.WSOUND(v);
|
||||
_vm->_globals.iRegul = 1;
|
||||
if (!backgroundFile.empty())
|
||||
_vm->_graphicsManager.LOAD_IMAGE(backgroundFile);
|
||||
_vm->_graphicsManager.loadImage(backgroundFile);
|
||||
if (!linkFile.empty())
|
||||
INILINK(linkFile);
|
||||
if (!animFile.empty()) {
|
||||
@ -5464,9 +5471,9 @@ LABEL_70:
|
||||
xCheck = xp;
|
||||
yCheck = yp;
|
||||
}
|
||||
BTGAUCHE();
|
||||
handleLeftButton();
|
||||
} else if (mouseButtons == 2) {
|
||||
BTDROITE();
|
||||
handleRightButton();
|
||||
}
|
||||
}
|
||||
if (!_vm->_globals.SORTIE) {
|
||||
@ -5474,7 +5481,7 @@ LABEL_70:
|
||||
VERIFZONE();
|
||||
if (_vm->_globals.chemin == (int16 *)g_PTRNUL
|
||||
|| (GOHOME(), _vm->_globals.chemin == (int16 *)g_PTRNUL)) {
|
||||
if (_vm->_globals.GOACTION == 1)
|
||||
if (_vm->_globals.GOACTION)
|
||||
PARADISE();
|
||||
}
|
||||
SPECIAL_JEU();
|
||||
|
@ -172,16 +172,16 @@ public:
|
||||
void setSpriteIndex(int idx, int spriteIndex);
|
||||
void setSpriteY(int idx, int yp);
|
||||
void SETTAILLESPR(int idx, int a2);
|
||||
void SETFLIPSPR(int idx, int a2);
|
||||
void setFlipSprite(int idx, bool flip);
|
||||
|
||||
void VERIFZONE();
|
||||
void GOHOME();
|
||||
void GOHOME2();
|
||||
void CHARGE_OBSTACLE(const Common::String &file);
|
||||
void CHARGE_ZONE(const Common::String &file);
|
||||
void loadZone(const Common::String &file);
|
||||
void CARRE_ZONE();
|
||||
void PLAN_BETA();
|
||||
void BTGAUCHE();
|
||||
void handleLeftButton();
|
||||
void PARADISE();
|
||||
void CLEAR_ECRAN();
|
||||
|
||||
@ -196,7 +196,7 @@ public:
|
||||
void PACOURS_PROPRE(int16 *a1);
|
||||
int16 *PARC_VOITURE(int a1, int a2, int a3, int a4);
|
||||
void VERBEPLUS();
|
||||
void BTDROITE();
|
||||
void handleRightButton();
|
||||
int MZONE();
|
||||
void initBorder(int a1);
|
||||
void OBJETPLUS(int a1);
|
||||
|
@ -228,7 +228,7 @@ void SaveLoadManager::createThumbnail(Graphics::Surface *s) {
|
||||
Graphics::Surface thumb8;
|
||||
thumb8.create(w, h, Graphics::PixelFormat::createFormatCLUT8());
|
||||
|
||||
_vm->_graphicsManager.Reduc_Ecran(_vm->_graphicsManager.VESA_BUFFER, (byte *)thumb8.pixels,
|
||||
_vm->_graphicsManager.Reduc_Ecran(_vm->_graphicsManager._vesaBuffer, (byte *)thumb8.pixels,
|
||||
_vm->_eventsManager._startPos.x, 20, SCREEN_WIDTH, SCREEN_HEIGHT - 40, 80);
|
||||
|
||||
// Convert the 8-bit pixel to 16 bit surface
|
||||
|
@ -555,7 +555,7 @@ LABEL_1141:
|
||||
else if (_vm->_globals.SVGA == 1)
|
||||
_vm->_animationManager.playAnim("BOMBE1.ANM", 100, 18, 100);
|
||||
}
|
||||
_vm->_graphicsManager.LOAD_IMAGE("BOMBEB");
|
||||
_vm->_graphicsManager.loadImage("BOMBEB");
|
||||
_vm->_graphicsManager.SETCOLOR3(252, 100, 100, 100);
|
||||
_vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100);
|
||||
_vm->_graphicsManager.SETCOLOR3(251, 100, 100, 100);
|
||||
@ -587,7 +587,7 @@ LABEL_1141:
|
||||
else if (_vm->_globals.SVGA == 2)
|
||||
_vm->_animationManager.playAnim("BOMBE2A.ANM", 50, 14, 500);
|
||||
_vm->_soundManager.SPECIAL_SOUND = 0;
|
||||
memset(_vm->_graphicsManager.VESA_BUFFER, 0, 0x96000u);
|
||||
memset(_vm->_graphicsManager._vesaBuffer, 0, 0x96000u);
|
||||
_vm->_graphicsManager.NOFADE = true;
|
||||
_vm->_globals.SORTIE = 151;
|
||||
}
|
||||
@ -603,7 +603,7 @@ LABEL_1141:
|
||||
_vm->_animationManager.playAnim("BOMBE2A.ANM", 50, 14, 500);
|
||||
_vm->_soundManager.SPECIAL_SOUND = 0;
|
||||
_vm->_graphicsManager.NOFADE = true;
|
||||
memset(_vm->_graphicsManager.VESA_BUFFER, 0, 0x96000u);
|
||||
memset(_vm->_graphicsManager._vesaBuffer, 0, 0x96000u);
|
||||
_vm->_globals.SORTIE = 151;
|
||||
}
|
||||
if (v76 == 605) {
|
||||
@ -620,7 +620,7 @@ LABEL_1141:
|
||||
_vm->_animationManager.playAnim("BOMBE2A.ANM", 50, 14, 500);
|
||||
_vm->_soundManager.SPECIAL_SOUND = 0;
|
||||
_vm->_graphicsManager.NOFADE = true;
|
||||
memset(_vm->_graphicsManager.VESA_BUFFER, 0, 0x96000u);
|
||||
memset(_vm->_graphicsManager._vesaBuffer, 0, 0x96000u);
|
||||
_vm->_globals.SORTIE = 151;
|
||||
}
|
||||
if (v76 == 606) {
|
||||
@ -633,7 +633,7 @@ LABEL_1141:
|
||||
_vm->_animationManager.playAnim("BOMBE3.ANM", 50, 14, 500);
|
||||
else if (_vm->_globals.SVGA == 2)
|
||||
_vm->_animationManager.playAnim("BOMBE3A.ANM", 50, 14, 500);
|
||||
memset(_vm->_graphicsManager.VESA_BUFFER, 0, 0x96000u);
|
||||
memset(_vm->_graphicsManager._vesaBuffer, 0, 0x96000u);
|
||||
}
|
||||
_vm->_globals.SORTIE = 6;
|
||||
}
|
||||
@ -707,7 +707,7 @@ LABEL_1141:
|
||||
}
|
||||
|
||||
_vm->_animationManager.loadAnim("otage");
|
||||
_vm->_graphicsManager.LOAD_IMAGE("IM05");
|
||||
_vm->_graphicsManager.loadImage("IM05");
|
||||
_vm->_graphicsManager.VISU_ALL();
|
||||
|
||||
for (int i = 0; i <= 4; i++) {
|
||||
@ -718,14 +718,14 @@ LABEL_1141:
|
||||
}
|
||||
|
||||
_vm->_eventsManager.mouseOff();
|
||||
_vm->_graphicsManager.FADE_INW_LINUX(_vm->_graphicsManager.VESA_BUFFER);
|
||||
_vm->_graphicsManager.FADE_INW_LINUX(_vm->_graphicsManager._vesaBuffer);
|
||||
do {
|
||||
if (_vm->shouldQuit())
|
||||
return -1; // Exiting game
|
||||
|
||||
_vm->_eventsManager.VBL();
|
||||
} while (_vm->_objectsManager.BOBPOSI(3) != 100);
|
||||
_vm->_graphicsManager.FADE_OUTW_LINUX(_vm->_graphicsManager.VESA_BUFFER);
|
||||
_vm->_graphicsManager.FADE_OUTW_LINUX(_vm->_graphicsManager._vesaBuffer);
|
||||
_vm->_graphicsManager.FIN_VISU();
|
||||
|
||||
// If uncensored, rip the throat of the hostage
|
||||
@ -737,7 +737,7 @@ LABEL_1141:
|
||||
}
|
||||
_vm->_animationManager.loadAnim("ASCEN");
|
||||
_vm->_eventsManager.mouseOff();
|
||||
_vm->_graphicsManager.LOAD_IMAGE("ASCEN");
|
||||
_vm->_graphicsManager.loadImage("ASCEN");
|
||||
_vm->_graphicsManager.VISU_ALL();
|
||||
|
||||
for (int i = 0; i <= 4; i++) {
|
||||
@ -748,9 +748,9 @@ LABEL_1141:
|
||||
}
|
||||
|
||||
_vm->_eventsManager.mouseOff();
|
||||
_vm->_graphicsManager.FADE_INW_LINUX(_vm->_graphicsManager.VESA_BUFFER);
|
||||
_vm->_graphicsManager.FADE_INW_LINUX(_vm->_graphicsManager._vesaBuffer);
|
||||
_vm->_objectsManager.SCI_OPTI_ONE(1, 0, 17, 3);
|
||||
_vm->_graphicsManager.FADE_OUTW_LINUX(_vm->_graphicsManager.VESA_BUFFER);
|
||||
_vm->_graphicsManager.FADE_OUTW_LINUX(_vm->_graphicsManager._vesaBuffer);
|
||||
_vm->_graphicsManager.FIN_VISU();
|
||||
|
||||
if ((_vm->getPlatform() == Common::kPlatformWindows) && _vm->getIsDemo())
|
||||
@ -1994,7 +1994,7 @@ LABEL_1141:
|
||||
_vm->_fontManager.hideText(5);
|
||||
_vm->_fontManager.hideText(9);
|
||||
_vm->_graphicsManager.FIN_VISU();
|
||||
_vm->_graphicsManager.LOAD_IMAGE("IM20f");
|
||||
_vm->_graphicsManager.loadImage("IM20f");
|
||||
_vm->_animationManager.loadAnim("ANIM20f");
|
||||
_vm->_graphicsManager.VISU_ALL();
|
||||
_vm->_eventsManager.mouseOff();
|
||||
|
@ -103,9 +103,9 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) {
|
||||
|
||||
_vm->_fileManager.constructLinuxFilename("TEMP.SCR");
|
||||
if (_vm->_graphicsManager.nbrligne == SCREEN_WIDTH)
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN, 0x4B000u);
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager._vesaScreen, 0x4B000u);
|
||||
else if (_vm->_graphicsManager.nbrligne == (SCREEN_WIDTH * 2))
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN, 0x96000u);
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager._vesaScreen, 0x96000u);
|
||||
|
||||
if (!_vm->_graphicsManager.nbrligne)
|
||||
_vm->_graphicsManager.ofscroll = 0;
|
||||
@ -146,7 +146,7 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) {
|
||||
_vm->_graphicsManager.NB_SCREEN();
|
||||
_vm->_globals.NECESSAIRE = false;
|
||||
|
||||
_vm->_saveLoadManager.bload("TEMP.SCR", _vm->_graphicsManager.VESA_SCREEN);
|
||||
_vm->_saveLoadManager.bload("TEMP.SCR", _vm->_graphicsManager._vesaScreen);
|
||||
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
|
||||
|
||||
_vm->_objectsManager.PERSO_ON = false;
|
||||
@ -160,12 +160,12 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) {
|
||||
|
||||
_vm->_graphicsManager.INIT_TABLE(145, 150, _vm->_graphicsManager.Palette);
|
||||
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
|
||||
_vm->_graphicsManager.DD_LOCK();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.DD_UNLOCK();
|
||||
v8 = _vm->_graphicsManager.VESA_BUFFER;
|
||||
v9 = _vm->_graphicsManager.VESA_SCREEN;
|
||||
memcpy(_vm->_graphicsManager.VESA_BUFFER, _vm->_graphicsManager.VESA_SCREEN, 0x95FFCu);
|
||||
_vm->_graphicsManager.lockScreen();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.unlockScreen();
|
||||
v8 = _vm->_graphicsManager._vesaBuffer;
|
||||
v9 = _vm->_graphicsManager._vesaScreen;
|
||||
memcpy(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager._vesaScreen, 0x95FFCu);
|
||||
v9 = v9 + 614396;
|
||||
v8 = v8 + 614396;
|
||||
*v8 = *v9;
|
||||
@ -1059,7 +1059,7 @@ void TalkManager::REPONSE2(int a1, int a2) {
|
||||
v3 = 0;
|
||||
if (a2 == 5 && _vm->_globals.SAUVEGARDE->data[svField3] == 4) {
|
||||
if ((uint16)(a1 - 22) <= 1u) {
|
||||
_vm->_objectsManager.SETFLIPSPR(0, 0);
|
||||
_vm->_objectsManager.setFlipSprite(0, false);
|
||||
_vm->_objectsManager.setSpriteIndex(0, 62);
|
||||
_vm->_objectsManager.SPACTION(_vm->_globals.FORETSPR, "2,3,4,5,6,7,8,9,10,11,12,-1,", 0, 0, 4, 0);
|
||||
if (a1 == 22) {
|
||||
@ -1107,7 +1107,7 @@ void TalkManager::REPONSE2(int a1, int a2) {
|
||||
_vm->_objectsManager.ZONE_OFF(23);
|
||||
}
|
||||
if ((uint16)(a1 - 20) <= 1u) {
|
||||
_vm->_objectsManager.SETFLIPSPR(0, 1);
|
||||
_vm->_objectsManager.setFlipSprite(0, true);
|
||||
_vm->_objectsManager.setSpriteIndex(0, 62);
|
||||
_vm->_objectsManager.SPACTION(_vm->_globals.FORETSPR, "2,3,4,5,6,7,8,9,10,11,12,-1,", 0, 0, 4, 1);
|
||||
if (a1 == 20) {
|
||||
@ -1216,9 +1216,9 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) {
|
||||
|
||||
_vm->_fileManager.constructLinuxFilename("TEMP.SCR");
|
||||
if (_vm->_graphicsManager.nbrligne == SCREEN_WIDTH)
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN, 0x4B000u);
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager._vesaScreen, 0x4B000u);
|
||||
if (_vm->_graphicsManager.nbrligne == (SCREEN_WIDTH * 2))
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager.VESA_SCREEN, 0x96000u);
|
||||
_vm->_saveLoadManager.SAUVE_FICHIER(_vm->_globals.NFICHIER, _vm->_graphicsManager._vesaScreen, 0x96000u);
|
||||
|
||||
if (!_vm->_graphicsManager.nbrligne)
|
||||
_vm->_graphicsManager.ofscroll = 0;
|
||||
@ -1234,7 +1234,7 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) {
|
||||
_vm->_globals.NOMARCHE = true;
|
||||
_vm->_objectsManager.INILINK(v22);
|
||||
_vm->_objectsManager.PERSO_ON = true;
|
||||
_vm->_globals.GOACTION = 0;
|
||||
_vm->_globals.GOACTION = false;
|
||||
_vm->_objectsManager.NUMZONE = -1;
|
||||
initCharacterAnim();
|
||||
VISU_PARLE();
|
||||
@ -1246,13 +1246,13 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) {
|
||||
do {
|
||||
v12 = _vm->_eventsManager.getMouseButton();
|
||||
if (v12 == 1) {
|
||||
_vm->_objectsManager.BTGAUCHE();
|
||||
_vm->_objectsManager.handleLeftButton();
|
||||
v12 = 1;
|
||||
}
|
||||
if (v12 == 2)
|
||||
_vm->_objectsManager.BTDROITE();
|
||||
_vm->_objectsManager.handleRightButton();
|
||||
_vm->_objectsManager.VERIFZONE();
|
||||
if (_vm->_globals.GOACTION == 1)
|
||||
if (_vm->_globals.GOACTION)
|
||||
_vm->_objectsManager.PARADISE();
|
||||
_vm->_eventsManager.VBL();
|
||||
} while (!_vm->_globals.SORTIE);
|
||||
@ -1282,7 +1282,7 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) {
|
||||
if (_vm->_globals.SORTIE == 101)
|
||||
_vm->_globals.SORTIE = 0;
|
||||
|
||||
_vm->_saveLoadManager.bload("TEMP.SCR", _vm->_graphicsManager.VESA_SCREEN);
|
||||
_vm->_saveLoadManager.bload("TEMP.SCR", _vm->_graphicsManager._vesaScreen);
|
||||
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
|
||||
|
||||
_vm->_objectsManager.PERSO_ON = false;
|
||||
@ -1295,13 +1295,13 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) {
|
||||
|
||||
_vm->_graphicsManager.INIT_TABLE(145, 150, _vm->_graphicsManager.Palette);
|
||||
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_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);
|
||||
v14 = _vm->_graphicsManager.VESA_BUFFER;
|
||||
v15 = _vm->_graphicsManager.VESA_SCREEN;
|
||||
memcpy(_vm->_graphicsManager.VESA_BUFFER, _vm->_graphicsManager.VESA_SCREEN, 0x95FFCu);
|
||||
v14 = _vm->_graphicsManager._vesaBuffer;
|
||||
v15 = _vm->_graphicsManager._vesaScreen;
|
||||
memcpy(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager._vesaScreen, 0x95FFCu);
|
||||
v15 = v15 + 614396;
|
||||
v14 = v14 + 614396;
|
||||
WRITE_LE_UINT16(v14, (int16)READ_LE_UINT16(v15));
|
||||
|
Loading…
Reference in New Issue
Block a user