aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2012-12-21 08:12:02 +0100
committerStrangerke2012-12-21 08:12:02 +0100
commitd80790a8d848a69acc6809885a6d9663012cae05 (patch)
treef06472dde52f4fa68cf462fbe530a97213ca6037
parent2f77e933bab83b2415b623d2b594cee9daf4a2dc (diff)
downloadscummvm-rg350-d80790a8d848a69acc6809885a6d9663012cae05.tar.gz
scummvm-rg350-d80790a8d848a69acc6809885a6d9663012cae05.tar.bz2
scummvm-rg350-d80790a8d848a69acc6809885a6d9663012cae05.zip
HOPKINS: Remove remaining hexa values
-rw-r--r--engines/hopkins/anim.cpp104
-rw-r--r--engines/hopkins/computer.cpp12
-rw-r--r--engines/hopkins/dialogs.cpp30
-rw-r--r--engines/hopkins/events.cpp4
-rw-r--r--engines/hopkins/font.cpp22
-rw-r--r--engines/hopkins/lines.cpp108
-rw-r--r--engines/hopkins/saveload.cpp2
7 files changed, 137 insertions, 145 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp
index a45c49e45e..d278f15a8d 100644
--- a/engines/hopkins/anim.cpp
+++ b/engines/hopkins/anim.cpp
@@ -61,14 +61,14 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui
hasScreenCopy = false;
screenP = _vm->_graphicsManager._vesaScreen;
- ptr = _vm->_globals.allocMemory(0x14u);
+ ptr = _vm->_globals.allocMemory(20);
_vm->_fileManager.constructFilename(_vm->_globals.HOPANM, filename);
if (!f.open(_vm->_globals.NFICHIER))
error("File not found - %s", _vm->_globals.NFICHIER.c_str());
f.skip(6);
- f.read(_vm->_graphicsManager.Palette, 0x320u);
+ f.read(_vm->_graphicsManager.Palette, 800);
f.skip(4);
nbytes = f.readUint32LE();
f.skip(14);
@@ -81,12 +81,12 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui
}
if (_vm->_graphicsManager.WinScan / 2 > SCREEN_WIDTH) {
hasScreenCopy = true;
- screenCopy = _vm->_globals.allocMemory(0x4B000u);
- memcpy(screenCopy, screenP, 0x4B000u);
+ screenCopy = _vm->_globals.allocMemory(307200);
+ memcpy(screenCopy, screenP, 307200);
}
if (NO_SEQ) {
if (hasScreenCopy)
- memcpy(screenCopy, _vm->_graphicsManager._vesaBuffer, 0x4B000u);
+ memcpy(screenCopy, _vm->_graphicsManager._vesaBuffer, 307200);
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
} else {
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
@@ -170,17 +170,17 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui
_vm->_soundManager.VERIF_SOUND();
EXIT:
if (_vm->_graphicsManager.FADE_LINUX == 2 && !hasScreenCopy) {
- screenCopy = _vm->_globals.allocMemory(0x4B000u);
+ screenCopy = _vm->_globals.allocMemory(307200);
f.seek(0);
f.skip(6);
- f.read(_vm->_graphicsManager.Palette, 0x320u);
+ f.read(_vm->_graphicsManager.Palette, 800);
f.skip(4);
nbytes = f.readUint32LE();
f.skip(14);
f.read(screenP, nbytes);
- memcpy(screenCopy, screenP, 0x4B000u);
+ memcpy(screenCopy, screenP, 307200);
breakFlag = false;
do {
@@ -232,26 +232,26 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint
v8 = 0;
while (!_vm->shouldQuit()) {
- memcpy(_vm->_graphicsManager.OLD_PAL, _vm->_graphicsManager.Palette, 0x301u);
+ memcpy(_vm->_graphicsManager.OLD_PAL, _vm->_graphicsManager.Palette, 769);
_vm->_fileManager.constructLinuxFilename("TEMP.SCR");
if (_vm->_graphicsManager._lineNbr == SCREEN_WIDTH)
- _vm->_saveLoadManager.saveFile(_vm->_globals.NFICHIER, _vm->_graphicsManager._vesaScreen, 0x4B000u);
+ _vm->_saveLoadManager.saveFile(_vm->_globals.NFICHIER, _vm->_graphicsManager._vesaScreen, 307200);
else if (_vm->_graphicsManager._lineNbr == (SCREEN_WIDTH * 2))
- _vm->_saveLoadManager.saveFile(_vm->_globals.NFICHIER, _vm->_graphicsManager._vesaScreen, 0x96000u);
+ _vm->_saveLoadManager.saveFile(_vm->_globals.NFICHIER, _vm->_graphicsManager._vesaScreen, 614400);
if (!_vm->_graphicsManager._lineNbr)
_vm->_graphicsManager.ofscroll = 0;
v12 = _vm->_graphicsManager._vesaScreen;
- v13 = _vm->_globals.allocMemory(0x14u);
+ v13 = _vm->_globals.allocMemory(20);
_vm->_fileManager.constructFilename(_vm->_globals.HOPANM, filename);
if (!f.open(_vm->_globals.NFICHIER))
error("Error opening file - %s", _vm->_globals.NFICHIER.c_str());
f.read(&buf, 6);
- f.read(_vm->_graphicsManager.Palette, 0x320u);
+ f.read(_vm->_graphicsManager.Palette, 800);
f.read(&buf, 4);
nbytes = f.readUint32LE();
f.readUint32LE();
@@ -273,12 +273,12 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint
_vm->_graphicsManager.max_x = SCREEN_WIDTH;
if (_vm->_graphicsManager.WinScan / 2 > SCREEN_WIDTH) {
v8 = 1;
- ptr = _vm->_globals.allocMemory(0x4B000u);
- memcpy(ptr, v12, 0x4B000u);
+ ptr = _vm->_globals.allocMemory(307200);
+ memcpy(ptr, v12, 307200);
}
if (_vm->_animationManager.NO_SEQ) {
if (v8 == 1)
- memcpy(ptr, _vm->_graphicsManager._vesaBuffer, 0x4B000u);
+ memcpy(ptr, _vm->_graphicsManager._vesaBuffer, 307200);
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
} else {
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
@@ -314,7 +314,7 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint
_vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager._vesaScreen);
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
- memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 0x301u);
+ memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 769);
_vm->_graphicsManager.Cls_Pal();
_vm->_graphicsManager.lockScreen();
_vm->_graphicsManager.clearScreen();
@@ -322,7 +322,7 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint
_vm->_graphicsManager.SCROLL = v11;
_vm->_graphicsManager.scrollScreen(v11);
if (_vm->_graphicsManager.DOUBLE_ECRAN) {
- _vm->_graphicsManager.SCANLINE(0x500u);
+ _vm->_graphicsManager.SCANLINE(1280);
_vm->_graphicsManager.max_x = 1280;
_vm->_graphicsManager.lockScreen();
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaBuffer, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
@@ -345,10 +345,10 @@ LABEL_48:
for (;;) {
++v15;
_vm->_soundManager.playAnim_SOUND(v15);
- memset(&buf, 0, 6u);
- memset(v13, 0, 0x13u);
+ memset(&buf, 0, 6);
+ memset(v13, 0, 19);
- if (f.read(v13, 0x10) != 0x10)
+ if (f.read(v13, 16) != 16)
v5 = -1;
if (strncmp((const char *)v13, "IMAGE=", 6))
@@ -388,7 +388,7 @@ LABEL_88:
_vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager._vesaScreen);
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
- memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 0x301u);
+ memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 769);
_vm->_graphicsManager.Cls_Pal();
_vm->_graphicsManager.lockScreen();
_vm->_graphicsManager.clearScreen();
@@ -396,7 +396,7 @@ LABEL_88:
_vm->_graphicsManager.SCROLL = v11;
_vm->_graphicsManager.scrollScreen(v11);
if (_vm->_graphicsManager.DOUBLE_ECRAN) {
- _vm->_graphicsManager.SCANLINE(0x500u);
+ _vm->_graphicsManager.SCANLINE(1280);
_vm->_graphicsManager.max_x = 1280;
_vm->_graphicsManager.lockScreen();
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaBuffer, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
@@ -430,7 +430,7 @@ LABEL_88:
_vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager._vesaScreen);
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
- memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 0x301u);
+ memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 769);
_vm->_graphicsManager.Cls_Pal();
_vm->_graphicsManager.lockScreen();
_vm->_graphicsManager.clearScreen();
@@ -438,7 +438,7 @@ LABEL_88:
_vm->_graphicsManager.SCROLL = v11;
_vm->_graphicsManager.scrollScreen(v11);
if (_vm->_graphicsManager.DOUBLE_ECRAN) {
- _vm->_graphicsManager.SCANLINE(0x500u);
+ _vm->_graphicsManager.SCANLINE(1280);
_vm->_graphicsManager.max_x = 1280;
_vm->_graphicsManager.lockScreen();
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaBuffer, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
@@ -462,12 +462,12 @@ LABEL_114:
if (_vm->_graphicsManager.FADE_LINUX == 2 && !v8) {
byte *ptra;
- ptra = _vm->_globals.allocMemory(0x4B000u);
+ ptra = _vm->_globals.allocMemory(307200);
f.seek(0);
f.read(&buf, 6);
- f.read(_vm->_graphicsManager.Palette, 0x320u);
- f.read(&buf, 4u);
+ f.read(_vm->_graphicsManager.Palette, 800);
+ f.read(&buf, 4);
nbytes = f.readUint32LE();
f.readUint32LE();
@@ -478,12 +478,12 @@ LABEL_114:
f.readUint16LE();
f.read(v12, nbytes);
- memcpy(ptra, v12, 0x4B000u);
+ memcpy(ptra, v12, 307200);
int v6 = 0;
do {
- memset(&buf, 0, 6u);
- memset(v13, 0, 0x13u);
+ memset(&buf, 0, 6);
+ memset(v13, 0, 19);
if (f.read(v13, 16) != 16)
v6 = -1;
if (strncmp((const char *)v13, "IMAGE=", 6))
@@ -509,7 +509,7 @@ LABEL_114:
_vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager._vesaScreen);
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
- memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 0x301u);
+ memcpy(_vm->_graphicsManager.Palette, _vm->_graphicsManager.OLD_PAL, 769);
_vm->_graphicsManager.Cls_Pal();
_vm->_graphicsManager.lockScreen();
_vm->_graphicsManager.clearScreen();
@@ -517,7 +517,7 @@ LABEL_114:
_vm->_graphicsManager.SCROLL = v11;
_vm->_graphicsManager.scrollScreen(v11);
if (_vm->_graphicsManager.DOUBLE_ECRAN) {
- _vm->_graphicsManager.SCANLINE(0x500u);
+ _vm->_graphicsManager.SCANLINE(1280);
_vm->_graphicsManager.max_x = 1280;
_vm->_graphicsManager.lockScreen();
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaBuffer, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
@@ -761,7 +761,7 @@ void AnimationManager::searchAnim(const byte *data, int animIndex, int count) {
} while (v8 != 1);
_vm->_globals.Bqe_Anim[v19]._data = _vm->_globals.allocMemory(v7 + 50);
_vm->_globals.Bqe_Anim[animIndex].field4 = 1;
- memcpy(_vm->_globals.Bqe_Anim[v19]._data, v21 + data + 5, 0x14u);
+ memcpy(_vm->_globals.Bqe_Anim[v19]._data, v21 + data + 5, 20);
byte *dataP = _vm->_globals.Bqe_Anim[v19]._data;
v9 = dataP + 20;
@@ -828,20 +828,20 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
_vm->_fileManager.constructLinuxFilename("TEMP.SCR");
if (_vm->_graphicsManager._lineNbr == SCREEN_WIDTH)
- _vm->_saveLoadManager.saveFile(_vm->_globals.NFICHIER, _vm->_graphicsManager._vesaScreen, 0x4B000u);
+ _vm->_saveLoadManager.saveFile(_vm->_globals.NFICHIER, _vm->_graphicsManager._vesaScreen, 307200);
else if (_vm->_graphicsManager._lineNbr == (SCREEN_WIDTH * 2))
- _vm->_saveLoadManager.saveFile(_vm->_globals.NFICHIER, _vm->_graphicsManager._vesaScreen, 0x96000u);
+ _vm->_saveLoadManager.saveFile(_vm->_globals.NFICHIER, _vm->_graphicsManager._vesaScreen, 614400);
if (!_vm->_graphicsManager._lineNbr)
_vm->_graphicsManager.ofscroll = 0;
}
v9 = _vm->_graphicsManager._vesaScreen;
- v10 = _vm->_globals.allocMemory(0x16u);
+ v10 = _vm->_globals.allocMemory(22);
_vm->_fileManager.constructFilename(_vm->_globals.HOPSEQ, file);
if (!f.open(_vm->_globals.NFICHIER))
error("Error opening file - %s", _vm->_globals.NFICHIER.c_str());
f.skip(6);
- f.read(_vm->_graphicsManager.Palette, 0x320u);
+ f.read(_vm->_graphicsManager.Palette, 800);
f.skip(4);
nbytes = f.readUint32LE();
f.skip(14);
@@ -849,12 +849,12 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
if (_vm->_graphicsManager.WinScan / 2 > SCREEN_WIDTH) {
v7 = 1;
- ptr = _vm->_globals.allocMemory(0x4B000u);
- memcpy(ptr, v9, 0x4B000u);
+ ptr = _vm->_globals.allocMemory(307200);
+ memcpy(ptr, v9, 307200);
}
if (_vm->_animationManager.NO_SEQ) {
if (v7 == 1)
- memcpy(ptr, _vm->_graphicsManager._vesaBuffer, 0x4B000u);
+ memcpy(ptr, _vm->_graphicsManager._vesaBuffer, 307200);
if (!_vm->getIsDemo()) {
_vm->_graphicsManager.SETCOLOR3(252, 100, 100, 100);
_vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100);
@@ -910,7 +910,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
do {
++soundNumber;
_vm->_soundManager.playAnim_SOUND(soundNumber);
- memset(v10, 0, 0x13u);
+ memset(v10, 0, 19);
if (f.read(v10, 16) != 16)
readError = true;
@@ -992,14 +992,14 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u
_vm->_eventsManager._mouseFl = false;
v10 = _vm->_graphicsManager._vesaScreen;
- v11 = _vm->_globals.allocMemory(0x16u);
+ v11 = _vm->_globals.allocMemory(22);
_vm->_fileManager.constructFilename(_vm->_globals.HOPSEQ, file);
if (!f.open(_vm->_globals.NFICHIER))
error("File not found - %s", _vm->_globals.NFICHIER.c_str());
f.skip(6);
- f.read(_vm->_graphicsManager.Palette, 0x320u);
+ f.read(_vm->_graphicsManager.Palette, 800);
f.skip(4);
nbytes = f.readUint32LE();
f.readUint32LE();
@@ -1012,13 +1012,13 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u
if (_vm->_graphicsManager.WinScan / 2 > SCREEN_WIDTH) {
v7 = 1;
- ptr = _vm->_globals.allocMemory(0x4B000u);
- memcpy((void *)ptr, v10, 0x4B000u);
+ ptr = _vm->_globals.allocMemory(307200);
+ memcpy((void *)ptr, v10, 307200);
}
if (_vm->_animationManager.NO_SEQ) {
if (v7 == 1) {
assert(ptr != NULL);
- memcpy((void *)ptr, _vm->_graphicsManager._vesaBuffer, 0x4B000u);
+ memcpy((void *)ptr, _vm->_graphicsManager._vesaBuffer, 307200);
}
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
} else {
@@ -1061,7 +1061,7 @@ LABEL_23:
while (!_vm->shouldQuit()) {
_vm->_soundManager.playAnim_SOUND(v13++);
- memset(v11, 0, 0x13u);
+ memset(v11, 0, 19);
if (f.read(v11, 16) != 16)
v4 = true;
@@ -1113,11 +1113,11 @@ LABEL_53:
}
LABEL_54:
if (_vm->_graphicsManager.FADE_LINUX == 2 && !v7) {
- byte *ptra = _vm->_globals.allocMemory(0x4B000u);
+ byte *ptra = _vm->_globals.allocMemory(307200);
f.seek(0);
f.skip(6);
- f.read(_vm->_graphicsManager.Palette, 0x320u);
+ f.read(_vm->_graphicsManager.Palette, 800);
f.skip(4);
nbytes = f.readUint32LE();
@@ -1130,10 +1130,10 @@ LABEL_54:
f.read(v10, nbytes);
- memcpy(ptra, v10, 0x4B000u);
+ memcpy(ptra, v10, 307200);
bool v5 = false;
do {
- memset(v11, 0, 0x13u);
+ memset(v11, 0, 19);
if (f.read(v11, 16) != 16)
v5 = true;
diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp
index 610629e439..1efc5fce66 100644
--- a/engines/hopkins/computer.cpp
+++ b/engines/hopkins/computer.cpp
@@ -297,7 +297,7 @@ void ComputerManager::showComputer(ComputerEnum mode) {
_vm->_eventsManager.VBL();
_vm->_eventsManager.delay(1000);
- memset(_vm->_graphicsManager._vesaBuffer, 0, 0x4AFFFu);
+ memset(_vm->_graphicsManager._vesaBuffer, 0, 307199);
_vm->_graphicsManager.lockScreen();
_vm->_graphicsManager.clearScreen();
_vm->_graphicsManager.unlockScreen();
@@ -674,7 +674,7 @@ void ComputerManager::setModeVGA256() {
_vm->_graphicsManager.clearScreen();
_vm->_graphicsManager.unlockScreen();
_vm->_graphicsManager.Cls_Pal();
- _vm->_graphicsManager.SCANLINE(0x140u);
+ _vm->_graphicsManager.SCANLINE(320);
}
/**
@@ -1077,8 +1077,8 @@ void ComputerManager::saveScore() {
} while (!v3);
}
- ptr = _vm->_globals.allocMemory(0x64u);
- memset(ptr, 0, 0x63u);
+ ptr = _vm->_globals.allocMemory(100);
+ memset(ptr, 0, 99);
for (int v5 = 0; v5 <= 5; v5++) {
v6 = 16 * v5;
v14 = v16[v5];
@@ -1102,7 +1102,7 @@ void ComputerManager::saveScore() {
}
_vm->_fileManager.constructLinuxFilename("HISCORE.DAT");
- _vm->_saveLoadManager.saveFile(_vm->_globals.NFICHIER, ptr, 0x64u);
+ _vm->_saveLoadManager.saveFile(_vm->_globals.NFICHIER, ptr, 100);
_vm->_globals.freeMemory(ptr);
}
@@ -1121,7 +1121,7 @@ void ComputerManager::displayHiscoreLine(byte *objectData, int x, int y, int a4)
v5 = 0;
if ((byte)(v4 - 48) <= 9u)
v5 = (byte)v4 - 48;
- if ((byte)(v4 - 65) <= 0x19u)
+ if ((byte)(v4 - 65) <= 25)
v5 = (byte)v4 - 55;
if (v4 == 32)
v5 = 36;
diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp
index 6efd7b7191..a22f01470b 100644
--- a/engines/hopkins/dialogs.cpp
+++ b/engines/hopkins/dialogs.cpp
@@ -236,7 +236,7 @@ void DialogsManager::showOptionsDialog() {
_vm->_globals._speed = 2;
if (mousePos.x >= _vm->_graphicsManager.ofscroll + 300 && mousePos.y > 221 && mousePos.x <= _vm->_graphicsManager.ofscroll + 358 && mousePos.y <= 246)
_vm->_globals.SVGA = 2;
- if (mousePos.x < _vm->_graphicsManager.ofscroll + 165 || mousePos.x > _vm->_graphicsManager.ofscroll + 496 || (uint)(mousePos.y - 107) > 0xD3u)
+ if (mousePos.x < _vm->_graphicsManager.ofscroll + 165 || mousePos.x > _vm->_graphicsManager.ofscroll + 496 || (uint)(mousePos.y - 107) > 211)
doneFlag = true;
}
@@ -667,22 +667,22 @@ void DialogsManager::showSaveLoad(int a1) {
switch (slotNumber) {
case 1:
- _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 190, 112, 0x80u, 87);
+ _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 190, 112, 128, 87);
break;
case 2:
- _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 323, 112, 0x80u, 87);
+ _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 323, 112, 128, 87);
break;
case 3:
- _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 190, 203, 0x80u, 87);
+ _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 190, 203, 128, 87);
break;
case 4:
- _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 323, 203, 0x80u, 87);
+ _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 323, 203, 128, 87);
break;
case 5:
- _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 190, 294, 0x80u, 87);
+ _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 190, 294, 128, 87);
break;
case 6:
- _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 323, 294, 0x80u, 87);
+ _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 323, 294, 128, 87);
break;
}
@@ -692,7 +692,7 @@ void DialogsManager::showSaveLoad(int a1) {
}
}
- _vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager._vesaBuffer, _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, 274, 353);
_vm->_objectsManager.SL_FLAG = true;
_vm->_objectsManager.SL_MODE = a1;
_vm->_objectsManager.SL_X = 0;
@@ -708,25 +708,25 @@ int DialogsManager::searchSavegames() {
int yp = _vm->_eventsManager.getMouseY();
_vm->_graphicsManager.ofscroll = _vm->_eventsManager._startPos.x;
- if ((uint16)(yp - 112) <= 0x56u) {
+ if ((uint16)(yp - 112) <= 86) {
if (xp > _vm->_eventsManager._startPos.x + 189 && xp < _vm->_eventsManager._startPos.x + 318)
slotNumber = 1;
- if ((uint16)(yp - 112) <= 0x56u && xp > _vm->_graphicsManager.ofscroll + 322 && xp < _vm->_graphicsManager.ofscroll + 452)
+ if ((uint16)(yp - 112) <= 86 && xp > _vm->_graphicsManager.ofscroll + 322 && xp < _vm->_graphicsManager.ofscroll + 452)
slotNumber = 2;
}
- if ((uint16)(yp - 203) <= 0x56u) {
+ if ((uint16)(yp - 203) <= 86) {
if (xp > _vm->_graphicsManager.ofscroll + 189 && xp < _vm->_graphicsManager.ofscroll + 318)
slotNumber = 3;
- if ((uint16)(yp - 203) <= 0x56u && xp > _vm->_graphicsManager.ofscroll + 322 && xp < _vm->_graphicsManager.ofscroll + 452)
+ if ((uint16)(yp - 203) <= 86 && xp > _vm->_graphicsManager.ofscroll + 322 && xp < _vm->_graphicsManager.ofscroll + 452)
slotNumber = 4;
}
- if ((uint16)(yp - 294) <= 0x56u) {
+ if ((uint16)(yp - 294) <= 86) {
if (xp > _vm->_graphicsManager.ofscroll + 189 && xp < _vm->_graphicsManager.ofscroll + 318)
slotNumber = 5;
- if ((uint16)(yp - 294) <= 0x56u && xp > _vm->_graphicsManager.ofscroll + 322 && xp < _vm->_graphicsManager.ofscroll + 452)
+ if ((uint16)(yp - 294) <= 86 && xp > _vm->_graphicsManager.ofscroll + 322 && xp < _vm->_graphicsManager.ofscroll + 452)
slotNumber = 6;
}
- if ((uint16)(yp - 388) <= 0x10u && xp > _vm->_graphicsManager.ofscroll + 273 && xp < _vm->_graphicsManager.ofscroll + 355)
+ if ((uint16)(yp - 388) <= 16 && xp > _vm->_graphicsManager.ofscroll + 273 && xp < _vm->_graphicsManager.ofscroll + 355)
slotNumber = 7;
switch (slotNumber) {
diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp
index 2def49cfbf..4667577237 100644
--- a/engines/hopkins/events.cpp
+++ b/engines/hopkins/events.cpp
@@ -322,9 +322,9 @@ void EventsManager::VBL() {
_vm->_graphicsManager.REDRAW = 0;
} else {
if (_vm->_globals.iRegul == 3)
- _vm->_graphicsManager.m_scroll(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager.ofscroll, 50, 0x280u, 340, 0, 50);
+ _vm->_graphicsManager.m_scroll(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager.ofscroll, 50, 640, 340, 0, 50);
else
- _vm->_graphicsManager.m_scroll(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager.ofscroll, 20, 0x280u, 440, 0, 20);
+ _vm->_graphicsManager.m_scroll(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager.ofscroll, 20, 640, 440, 0, 20);
--_vm->_graphicsManager.REDRAW;
}
_vm->_graphicsManager.unlockScreen();
diff --git a/engines/hopkins/font.cpp b/engines/hopkins/font.cpp
index 03f513fa64..d4d6e8d770 100644
--- a/engines/hopkins/font.cpp
+++ b/engines/hopkins/font.cpp
@@ -194,23 +194,23 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in
v69 = 2048;
f.seek(_index[messageId]);
- _tempText = _vm->_globals.allocMemory(0x80Au);
+ _tempText = _vm->_globals.allocMemory(2058);
if (_tempText == g_PTRNUL)
error("Error allocating text");
- Common::fill(&_tempText[0], &_tempText[0x80a], 0);
- f.read(_tempText, 0x800u);
+ Common::fill(&_tempText[0], &_tempText[2058], 0);
+ f.read(_tempText, 2048);
f.close();
_vm->_globals.texte_long = 2048;
} else {
v69 = 100;
_vm->_globals.texte_long = 100;
- v9 = _vm->_globals.allocMemory(0x6Eu);
- Common::fill(&v9[0], &v9[0x6e], 0);
+ v9 = _vm->_globals.allocMemory(110);
+ Common::fill(&v9[0], &v9[110], 0);
_tempText = v9;
const byte *v10 = _vm->_globals.BUF_ZONE + _index[messageId];
- memcpy(v9, v10, 0x60u);
+ memcpy(v9, v10, 96);
v11 = 0;
WRITE_LE_UINT16((uint16 *)v9 + 48, (int16)READ_LE_UINT16(v10 + 96));
}
@@ -220,9 +220,9 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in
goto LABEL_43;
for (int v63 = 0; v63 < v69; v63++) {
byte v13 = *v59;
- if ((byte)(*v59 + 46) > 0x1Bu) {
- if ((byte)(v13 + 80) > 0x1Bu) {
- if ((byte)(v13 - 65) <= 0x19u || (byte)(v13 - 97) <= 0x19u)
+ if ((byte)(*v59 + 46) > 27) {
+ if ((byte)(v13 + 80) > 27) {
+ if ((byte)(v13 - 65) <= 25 || (byte)(v13 - 97) <= 25)
v13 = 32;
} else {
v13 -= 79;
@@ -254,9 +254,9 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in
if (v64 + 1 > 0) {
for (int v15 = 0; v15 < v64 + 1; v15++) {
byte v16 = *(v60 + v15);
- if ((byte)v16 <= 0x1Fu)
+ if (v16 <= 31)
v16 = 32;
- _vm->_globals.largeur_boite += _vm->_objectsManager.getWidth(_vm->_globals.police, (byte)v16 - 32);
+ _vm->_globals.largeur_boite += _vm->_objectsManager.getWidth(_vm->_globals.police, v16 - 32);
}
}
_vm->_globals.largeur_boite += 2;
diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp
index 63ea1ef8e5..5b8c930ed2 100644
--- a/engines/hopkins/lines.cpp
+++ b/engines/hopkins/lines.cpp
@@ -64,23 +64,23 @@ int LinesManager::ZONE_OBJET(int a1, int a2) {
int v2;
v2 = 0;
- if ((uint)(a2 - 120) <= 0x21u)
+ if ((uint)(a2 - 120) <= 33)
v2 = OPTI_ZONE(a1, 1, 0);
- if ((uint)(a2 - 154) <= 0x25u)
+ if ((uint)(a2 - 154) <= 37)
v2 = OPTI_ZONE(a1, 7, 0);
- if ((uint)(a2 - 192) <= 0x25u)
+ if ((uint)(a2 - 192) <= 37)
v2 = OPTI_ZONE(a1, 13, 0);
- if ((uint)(a2 - 230) <= 0x25u)
+ if ((uint)(a2 - 230) <= 37)
v2 = OPTI_ZONE(a1, 19, 0);
- if ((uint)(a2 - 268) <= 0x25u)
+ if ((uint)(a2 - 268) <= 37)
v2 = OPTI_ZONE(a1, 25, 1);
- if ((uint)(a2 - 268) <= 0x14u && a1 >= _vm->_graphicsManager.ofscroll + 424 && a1 <= _vm->_graphicsManager.ofscroll + 478)
+ if ((uint)(a2 - 268) <= 20 && a1 >= _vm->_graphicsManager.ofscroll + 424 && a1 <= _vm->_graphicsManager.ofscroll + 478)
v2 = 30;
- if ((uint)(a2 - 290) <= 0x10u && a1 >= _vm->_graphicsManager.ofscroll + 424 && a1 <= _vm->_graphicsManager.ofscroll + 478)
+ if ((uint)(a2 - 290) <= 16 && a1 >= _vm->_graphicsManager.ofscroll + 424 && a1 <= _vm->_graphicsManager.ofscroll + 478)
v2 = 31;
if (a1 < _vm->_graphicsManager.ofscroll + 152 || a1 > _vm->_graphicsManager.ofscroll + 484)
v2 = 32;
- if ((uint)(a2 - 114) > 0xC0u)
+ if ((uint)(a2 - 114) > 192)
v2 = 32;
return v2;
}
@@ -313,15 +313,15 @@ void LinesManager::AJOUTE_LIGNE(int idx, int a2, int a3, int a4, int a5, int a6,
Ligne[idx].field8 = 4;
}
}
- if (v11 == 1 && (unsigned int)(v37 - 251) <= 0x2EC) {
+ if (v11 == 1 && (unsigned int)(v37 - 251) <= 748) {
Ligne[idx].field6 = 4;
Ligne[idx].field8 = 8;
}
- if (v11 == -1 && (unsigned int)(v37 - 251) <= 0x2EC) {
+ if (v11 == -1 && (unsigned int)(v37 - 251) <= 748) {
Ligne[idx].field6 = 6;
Ligne[idx].field8 = 2;
}
- if (v11 == 1 && (unsigned int)(v37 + 999) <= 0x2EC) {
+ if (v11 == 1 && (unsigned int)(v37 + 999) <= 748) {
Ligne[idx].field6 = 2;
Ligne[idx].field8 = 6;
}
@@ -2458,27 +2458,27 @@ LABEL_150:
v13 = (int16)v101 / 1000;
v94 = (int16)v99 / 1000;
v91 = -1;
- if ((int16)v99 / 1000 == -1 && (unsigned int)v101 <= 0x96)
+ if ((int16)v99 / 1000 == -1 && (unsigned int)v101 <= 150)
v91 = 1;
if (v13 == 1) {
- if ((unsigned int)(v99 + 1) <= 0x97)
+ if ((unsigned int)(v99 + 1) <= 151)
v91 = 3;
- if ((unsigned int)v99 <= 0x96)
+ if ((unsigned int)v99 <= 150)
v91 = 3;
}
if (v94 == 1) {
- if ((unsigned int)v101 <= 0x96)
+ if ((unsigned int)v101 <= 150)
v91 = 5;
- if ((unsigned int)(v101 + 150) <= 0x96)
+ if ((unsigned int)(v101 + 150) <= 150)
v91 = 5;
}
if (v13 == -1) {
- if ((unsigned int)v99 <= 0x96)
+ if ((unsigned int)v99 <= 150)
v91 = 7;
- if ((unsigned int)(v99 + 150) <= 0x96)
+ if ((unsigned int)(v99 + 150) <= 150)
v91 = 7;
}
- if (v94 == -1 && (unsigned int)(v101 + 150) <= 0x96)
+ if (v94 == -1 && (unsigned int)(v101 + 150) <= 150)
v91 = 1;
if (v91 == -1 && !VERIF_SMOOTH(v7, v109, a3, a4) && SMOOTH_MOVE(v7, v109, a3, a4) != -1)
break;
@@ -2530,47 +2530,47 @@ LABEL_72:
v91 = 8;
LABEL_103:
if (v96 == -1) {
- if ((unsigned int)v102 <= 0x1FE)
+ if ((unsigned int)v102 <= 510)
v91 = 1;
- if ((unsigned int)(v102 - 510) <= 0x1EA)
+ if ((unsigned int)(v102 - 510) <= 490)
v91 = 2;
}
}
if (v22 == 1) {
- if ((unsigned int)(v100 + 1) <= 0x1FF)
+ if ((unsigned int)(v100 + 1) <= 511)
v91 = 2;
- if ((unsigned int)(v100 + 510) <= 0x1FE)
+ if ((unsigned int)(v100 + 510) <= 510)
v91 = 3;
- if ((unsigned int)v100 <= 0x1FE)
+ if ((unsigned int)v100 <= 510)
v91 = 3;
- if ((unsigned int)(v100 - 510) <= 0x1EA)
+ if ((unsigned int)(v100 - 510) <= 490)
v91 = 4;
}
if (v96 == 1) {
- if ((unsigned int)(v102 - 510) <= 0x1EA)
+ if ((unsigned int)(v102 - 510) <= 490)
v91 = 4;
- if ((unsigned int)v102 <= 0x1FE)
+ if ((unsigned int)v102 <= 510)
v91 = 5;
// CHECKME: The two conditions on v102 are not compatible!
if (v102 >= -1 && v102 <= -510)
v91 = 6;
- if ((unsigned int)(v102 + 510) <= 0x1FE)
+ if ((unsigned int)(v102 + 510) <= 510)
v91 = 5;
}
if (v22 == -1) {
- if ((unsigned int)(v100 - 510) <= 0x1EA)
+ if ((unsigned int)(v100 - 510) <= 490)
v91 = 6;
- if ((unsigned int)v100 <= 0x1FE)
+ if ((unsigned int)v100 <= 510)
v91 = 7;
- if ((unsigned int)(v100 + 1000) <= 0x1EA)
+ if ((unsigned int)(v100 + 1000) <= 490)
v91 = 8;
- if ((unsigned int)(v100 + 510) <= 0x1FE)
+ if ((unsigned int)(v100 + 510) <= 510)
v91 = 7;
}
if (v96 == -1) {
- if ((unsigned int)(v102 + 1000) <= 0x1EA)
+ if ((unsigned int)(v102 + 1000) <= 490)
v91 = 8;
- if ((unsigned int)(v102 + 510) <= 0x1FE)
+ if ((unsigned int)(v102 + 510) <= 510)
v91 = 1;
}
v23 = 0;
@@ -3133,10 +3133,8 @@ int LinesManager::SMOOTH_MOVE(int a3, int a4, int a5, int a6) {
int v15;
int v16;
int v17;
- int v18;
int v19;
int v20;
- int v21;
int v22;
int v23;
int v24;
@@ -3144,10 +3142,8 @@ int LinesManager::SMOOTH_MOVE(int a3, int a4, int a5, int a6) {
int v26;
int v27;
int v28;
- int v29;
int v30;
int v31;
- int v32;
int v33;
int v34;
int v35;
@@ -3200,10 +3196,9 @@ int LinesManager::SMOOTH_MOVE(int a3, int a4, int a5, int a6) {
v48 = _vm->_globals.STAILLE[v63];
v45 = v63;
v25 = _vm->_graphicsManager.zoomOut(v25, v28);
- v29 = v27;
- if ((v27 & 0x80000000u) != 0)
- v29 = -v27;
- v40 = _vm->_graphicsManager.zoomOut(v40, v29);
+ if (v27 < 0)
+ v27 = -v27;
+ v40 = _vm->_graphicsManager.zoomOut(v40, v27);
v63 = v45;
v26 = v48;
}
@@ -3214,10 +3209,9 @@ int LinesManager::SMOOTH_MOVE(int a3, int a4, int a5, int a6) {
v31 = -v26;
v46 = v63;
v25 = _vm->_graphicsManager.zoomIn(v25, v31);
- v32 = v30;
- if ((v30 & 0x80000000u) != 0)
- v32 = -v30;
- v40 = _vm->_graphicsManager.zoomIn(v40, v32);
+ if (v30 < 0)
+ v30 = -v30;
+ v40 = _vm->_graphicsManager.zoomIn(v40, v30);
v63 = v46;
}
v33 = v63 + v40;
@@ -3263,10 +3257,9 @@ int LinesManager::SMOOTH_MOVE(int a3, int a4, int a5, int a6) {
v47 = _vm->_globals.STAILLE[v63];
v43 = v63;
v14 = _vm->_graphicsManager.zoomOut(v14, v17);
- v18 = v16;
- if ((v16 & 0x80000000u) != 0)
- v18 = -v16;
- v39 = _vm->_graphicsManager.zoomOut(v39, v18);
+ if (v16 < 0)
+ v16 = -v16;
+ v39 = _vm->_graphicsManager.zoomOut(v39, v16);
v63 = v43;
v15 = v47;
}
@@ -3277,10 +3270,9 @@ int LinesManager::SMOOTH_MOVE(int a3, int a4, int a5, int a6) {
v20 = -v15;
v44 = v63;
v14 = _vm->_graphicsManager.zoomIn(v14, v20);
- v21 = v19;
- if ((v19 & 0x80000000u) != 0)
- v21 = -v19;
- v39 = _vm->_graphicsManager.zoomIn(v39, v21);
+ if (v19 < 0)
+ v19 = -v19;
+ v39 = _vm->_graphicsManager.zoomIn(v39, v19);
v63 = v44;
}
v22 = v63 + v39;
@@ -3317,8 +3309,8 @@ int LinesManager::SMOOTH_MOVE(int a3, int a4, int a5, int a6) {
do {
v10 = _vm->_globals.Hopkins[v51].field2;
v42 = v63;
- v11 = _vm->_graphicsManager.zoomOut(_vm->_globals.Hopkins[v51].field0, 0x19u);
- v38 = _vm->_graphicsManager.zoomOut(v10, 0x19u);
+ v11 = _vm->_graphicsManager.zoomOut(_vm->_globals.Hopkins[v51].field0, 25);
+ v38 = _vm->_graphicsManager.zoomOut(v10, 25);
v63 = v42;
v12 = 0;
if (v11 > 0) {
@@ -3353,8 +3345,8 @@ int LinesManager::SMOOTH_MOVE(int a3, int a4, int a5, int a6) {
do {
v6 = _vm->_globals.Hopkins[v50].field2;
v41 = v63;
- v7 = _vm->_graphicsManager.zoomOut(_vm->_globals.Hopkins[v50].field0, 0x19u);
- v37 = _vm->_graphicsManager.zoomOut(v6, 0x19u);
+ v7 = _vm->_graphicsManager.zoomOut(_vm->_globals.Hopkins[v50].field0, 25);
+ v37 = _vm->_graphicsManager.zoomOut(v6, 25);
v63 = v41;
v8 = 0;
if (v7 > 0) {
diff --git a/engines/hopkins/saveload.cpp b/engines/hopkins/saveload.cpp
index 1510e8e248..0b95f11e5a 100644
--- a/engines/hopkins/saveload.cpp
+++ b/engines/hopkins/saveload.cpp
@@ -253,7 +253,7 @@ void SaveLoadManager::createThumbnail(Graphics::Surface *s) {
}
void SaveLoadManager::syncSavegameData(Common::Serializer &s) {
- s.syncBytes(&_vm->_globals.SAUVEGARDE->data[0], 0x802);
+ s.syncBytes(&_vm->_globals.SAUVEGARDE->data[0], 2050);
syncCharacterLocation(s, _vm->_globals.SAUVEGARDE->_cloneHopkins);
syncCharacterLocation(s, _vm->_globals.SAUVEGARDE->_realHopkins);
syncCharacterLocation(s, _vm->_globals.SAUVEGARDE->_samantha);