aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2013-04-09 09:17:11 -0400
committerPaul Gilbert2013-04-09 09:17:11 -0400
commitbfe63b71e9f0c2ee5b17022f37d8a189cb19516a (patch)
tree724656a60c6d97ef6f2747f786ea18745c98ba4d /engines
parent4d3748fb24950d3d62b84bd7655742608e606894 (diff)
downloadscummvm-rg350-bfe63b71e9f0c2ee5b17022f37d8a189cb19516a.tar.gz
scummvm-rg350-bfe63b71e9f0c2ee5b17022f37d8a189cb19516a.tar.bz2
scummvm-rg350-bfe63b71e9f0c2ee5b17022f37d8a189cb19516a.zip
HOPKINS: Renaming some of the remaining graphics methods
Diffstat (limited to 'engines')
-rw-r--r--engines/hopkins/anim.cpp8
-rw-r--r--engines/hopkins/computer.cpp40
-rw-r--r--engines/hopkins/dialogs.cpp28
-rw-r--r--engines/hopkins/events.cpp12
-rw-r--r--engines/hopkins/graphics.cpp85
-rw-r--r--engines/hopkins/graphics.h14
-rw-r--r--engines/hopkins/hopkins.cpp60
-rw-r--r--engines/hopkins/lines.cpp6
-rw-r--r--engines/hopkins/objects.cpp70
-rw-r--r--engines/hopkins/saveload.cpp4
-rw-r--r--engines/hopkins/script.cpp24
-rw-r--r--engines/hopkins/talk.cpp8
12 files changed, 180 insertions, 179 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp
index 09e392d4f5..b66f6fa318 100644
--- a/engines/hopkins/anim.cpp
+++ b/engines/hopkins/anim.cpp
@@ -590,10 +590,10 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
if (skipSeqFl) {
if (!_vm->getIsDemo()) {
- _vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(251, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _vm->_graphicsManager->setColorPercentage(252, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(251, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0);
}
_vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette);
} else {
diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp
index 341fa4726f..1dcfb61315 100644
--- a/engines/hopkins/computer.cpp
+++ b/engines/hopkins/computer.cpp
@@ -681,25 +681,25 @@ void ComputerManager::displayBricks() {
switch (cellType) {
case 1:
- _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 21);
+ _vm->_graphicsManager->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 21);
break;
case 2:
- _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 22);
+ _vm->_graphicsManager->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 22);
break;
case 3:
- _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 17);
+ _vm->_graphicsManager->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 17);
break;
case 4:
- _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 20);
+ _vm->_graphicsManager->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 20);
break;
case 5:
- _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 19);
+ _vm->_graphicsManager->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 19);
break;
case 6:
- _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 18);
+ _vm->_graphicsManager->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 18);
break;
case 31:
- _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellTop, 23);
+ _vm->_graphicsManager->fastDisplay2(_breakoutSpr, cellLeft, cellTop, 23);
break;
}
}
@@ -712,10 +712,10 @@ void ComputerManager::displayBricks() {
*/
void ComputerManager::displayLives() {
for (int i = 0, xp = 10; i <= 11; i++, xp += 7)
- _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, xp, 10, 15);
+ _vm->_graphicsManager->fastDisplay2(_breakoutSpr, xp, 10, 15);
for (int i = 0, xp = 10; i < _breakoutLives - 1; i++, xp += 7)
- _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, xp, 10, 14);
+ _vm->_graphicsManager->fastDisplay2(_breakoutSpr, xp, 10, 14);
_vm->_graphicsManager->updateScreen();
}
@@ -814,10 +814,10 @@ int ComputerManager::displayHiscores() {
loadHiscore();
_vm->_graphicsManager->loadVgaImage("HISCORE.PCX");
byte *ptr = _vm->_fileManager->loadFile("ALPHA.SPR");
- _vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(251, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _vm->_graphicsManager->setColorPercentage(252, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(251, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0);
int yp;
int xp;
@@ -862,10 +862,10 @@ int ComputerManager::displayHiscores() {
*/
void ComputerManager::getScoreName() {
_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);
- _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _vm->_graphicsManager->setColorPercentage(252, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(251, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0);
byte *ptr = _vm->_fileManager->loadFile("ALPHA.SPR");
_vm->_graphicsManager->fadeInBreakout();
for (int strPos = 0; strPos <= 4; strPos++) {
@@ -944,7 +944,7 @@ void ComputerManager::displayScoreChar(int charPos, int charDisp) {
if (charDisp >= '0' && charDisp <= '9')
idx = charDisp - 45;
- _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, xp, 11, idx);
+ _vm->_graphicsManager->fastDisplay2(_breakoutSpr, xp, 11, idx);
}
/**
@@ -1013,7 +1013,7 @@ void ComputerManager::displayHiscoreLine(byte *objectData, int x, int y, int cur
idx = curChar - 'A' + 10;
else if (curChar == 1)
idx = 37;
- _vm->_graphicsManager->AFFICHE_SPEEDVGA(objectData, x, y, idx);
+ _vm->_graphicsManager->fastDisplay2(objectData, x, y, idx);
}
/**
@@ -1186,7 +1186,7 @@ void ComputerManager::checkBallCollisions() {
_vm->_soundManager->playSample(2, 6);
} else {
_vm->_soundManager->playSample(1, 5);
- _vm->_graphicsManager->AFFICHE_SPEEDVGA(_breakoutSpr, cellLeft, cellUp, 16);
+ _vm->_graphicsManager->fastDisplay2(_breakoutSpr, cellLeft, cellUp, 16);
switch (cellType) {
case 1:
_breakoutScore += 10;
diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp
index a162c87e76..a623ec911f 100644
--- a/engines/hopkins/dialogs.cpp
+++ b/engines/hopkins/dialogs.cpp
@@ -70,9 +70,9 @@ void DialogsManager::drawInvent(Common::Point oldBorder, int oldBorderSpriteInde
_vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, _inventWin1, _inventX, _inventY, _inventWidth, _inventHeight);
if (oldBorder.x && oldBorder.y)
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _vm->_dialogsManager->_inventBuf2, oldBorder.x + 300, oldBorder.y + 300, oldBorderSpriteIndex + 1);
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_dialogsManager->_inventBuf2, oldBorder.x + 300, oldBorder.y + 300, oldBorderSpriteIndex + 1);
if (newBorder.x && newBorder.y)
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _vm->_dialogsManager->_inventBuf2, newBorder.x + 300, newBorder.y + 300, newBorderSpriteIndex);
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_dialogsManager->_inventBuf2, newBorder.x + 300, newBorder.y + 300, newBorderSpriteIndex);
_vm->_graphicsManager->addDirtyRect(_vm->_dialogsManager->_inventX, _vm->_dialogsManager->_inventY, _vm->_dialogsManager->_inventX + _vm->_dialogsManager->_inventWidth, _vm->_dialogsManager->_inventY + _vm->_dialogsManager->_inventHeight);
}
@@ -349,7 +349,7 @@ void DialogsManager::showInventory() {
_vm->_eventsManager->_curMouseButton = 0;
_vm->_eventsManager->_mouseButton = 0;
_vm->_globals->_disableInventFl = true;
- _vm->_graphicsManager->SETCOLOR4(251, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage2(251, 100, 100, 100);
Common::String filename;
if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS)
@@ -384,7 +384,7 @@ void DialogsManager::showInventory() {
_inventWidth = _vm->_objectsManager->getWidth(_inventWin1, 0);
_inventHeight = _vm->_objectsManager->getHeight(_inventWin1, 0);
- _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_frontBuffer, _inventWin1, _inventX + 300, 414, 0, 0, 0, false);
+ _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_frontBuffer, _inventWin1, _inventX + 300, 414, 0, 0, 0, false);
int curPosY = 0;
int inventCount = 0;
for (int inventLine = 1; inventLine <= 5; inventLine++) {
@@ -516,26 +516,26 @@ void DialogsManager::inventAnim() {
_vm->_graphicsManager->addDirtyRect(_vm->_objectsManager->_oldInventoryPosX, 27, _vm->_objectsManager->_oldInventoryPosX + 48, 65);
int newOffset = _vm->_graphicsManager->_scrollOffset + 2;
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _inventoryIcons, newOffset + 300, 327, 0);
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _inventoryIcons, newOffset + 300, 327, 0);
_vm->_graphicsManager->addDirtyRect(newOffset, 27, newOffset + 45, 62);
_vm->_objectsManager->_oldInventoryPosX = newOffset;
}
if (_vm->_globals->_saveData->_data[svField357] == 1) {
if (_vm->_globals->_saveData->_data[svField353] == 1)
- _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false);
+ _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false);
if (_vm->_globals->_saveData->_data[svField355] == 1)
- _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_headSprites, 866, 325, 1, 0, 0, false);
+ _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_headSprites, 866, 325, 1, 0, 0, false);
_vm->_graphicsManager->addDirtyRect(532, 25, 560, 60);
_vm->_graphicsManager->addDirtyRect(566, 25, 594, 60);
}
if (_vm->_globals->_saveData->_data[svField356] == 1) {
- _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false);
+ _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false);
_vm->_graphicsManager->addDirtyRect(532, 25, 560, 60);
}
if (_vm->_globals->_saveData->_data[svField354] == 1) {
- _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false);
+ _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_headSprites, 832, 325, 0, 0, 0, false);
_vm->_graphicsManager->addDirtyRect(532, 25, 560, 60);
}
}
@@ -664,18 +664,18 @@ void DialogsManager::showSaveLoad(SaveLoadMode mode) {
_vm->_objectsManager->_saveLoadSprite = _vm->_objectsManager->loadSprite(filename);
_vm->_objectsManager->_saveLoadSprite2 = _vm->_objectsManager->loadSprite("SAVE2.SPR");
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 483, 360, 0);
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 483, 360, 0);
if (_vm->_globals->_language == LANG_FR) {
if (mode == MODE_SAVE)
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 525, 375, 1);
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 525, 375, 1);
else if (mode == MODE_LOAD)
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 515, 375, 2);
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 515, 375, 2);
} else {
if (mode == MODE_SAVE)
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 535, 372, 1);
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 535, 372, 1);
else if (mode == MODE_LOAD)
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 539, 372, 2);
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_objectsManager->_saveLoadSprite, _vm->_eventsManager->_startPos.x + 539, 372, 2);
}
for (int slotNumber = 1; slotNumber <= 6; ++slotNumber) {
diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp
index c37e3677ea..8652f500e1 100644
--- a/engines/hopkins/events.cpp
+++ b/engines/hopkins/events.cpp
@@ -212,9 +212,9 @@ void EventsManager::refreshEvents() {
}
void EventsManager::checkForNextFrameCounter() {
- int32 delay = 10 - (g_system->getMillis() - _priorCounterTime);
- if (delay > 0)
- _vm->_system->delayMillis(delay);
+ int32 delayAmount = 10 - (g_system->getMillis() - _priorCounterTime);
+ if (delayAmount > 0)
+ _vm->_system->delayMillis(delayAmount);
// Check for whether to increment the game counter
uint32 milli = g_system->getMillis();
@@ -503,10 +503,10 @@ void EventsManager::updateCursor() {
if (_mouseCursorId != 23) {
// Draw standard cursor
- _vm->_graphicsManager->Sprite_Vesa(cursorSurface, _mouseCursor, 300, 300, _mouseSpriteId);
+ _vm->_graphicsManager->drawVesaSprite(cursorSurface, _mouseCursor, 300, 300, _mouseSpriteId);
} else {
// Draw the active inventory object
- _vm->_graphicsManager->Affiche_Perfect(cursorSurface, _objectBuf, 300, 300, 0, 0, 0, false);
+ _vm->_graphicsManager->drawCompressedSprite(cursorSurface, _objectBuf, 300, 300, 0, 0, 0, false);
}
// Reset the clipping bounds
@@ -520,7 +520,7 @@ void EventsManager::updateCursor() {
Graphics::PixelFormat pixelFormat = g_system->getScreenFormat();
byte *cursorPalette = new byte[3 * PALETTE_SIZE];
- uint16 *paletteColors = (uint16 *)_vm->_graphicsManager->PAL_PIXELS;
+ uint16 *paletteColors = (uint16 *)_vm->_graphicsManager->_palettePixels;
for (int i = 0; i < PALETTE_SIZE; i++) {
uint8 r, g, b;
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index 019d5a5ae8..45ae3414b0 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -42,7 +42,7 @@ GraphicsManager::GraphicsManager(HopkinsEngine *vm) {
_initGraphicsFl = false;
_screenWidth = _screenHeight = 0;
_screenLineSize = 0;
- PAL_PIXELS = NULL;
+ _palettePixels = NULL;
_lineNbr = 0;
_videoPtr = NULL;
_scrollOffset = 0;
@@ -116,7 +116,7 @@ void GraphicsManager::setGraphicalMode(int width, int height) {
_screenHeight = height;
_screenLineSize = SCREEN_WIDTH * 2;
- PAL_PIXELS = SD_PIXELS;
+ _palettePixels = SD_PIXELS;
_lineNbr = width;
_initGraphicsFl = true;
@@ -430,8 +430,8 @@ void GraphicsManager::m_scroll16(const byte *surface, int xs, int ys, int width,
byte *lineDestP = destP;
for (int xp = 0; xp < width; ++xp) {
- lineDestP[0] = PAL_PIXELS[lineSrcP[0] * 2];
- lineDestP[1] = PAL_PIXELS[(lineSrcP[0] * 2) + 1];
+ lineDestP[0] = _palettePixels[lineSrcP[0] * 2];
+ lineDestP[1] = _palettePixels[(lineSrcP[0] * 2) + 1];
lineDestP += 2;
lineSrcP++;
}
@@ -444,7 +444,7 @@ void GraphicsManager::m_scroll16(const byte *surface, int xs, int ys, int width,
addRefreshRect(destX, destY, destX + width, destY + height);
}
-void GraphicsManager::Copy_Vga16(const byte *surface, int xp, int yp, int width, int height, int destX, int destY) {
+void GraphicsManager::copyTo16Bit(const byte *surface, int xp, int yp, int width, int height, int destX, int destY) {
int xCtr;
const byte *palette;
int savedXCount;
@@ -464,7 +464,7 @@ void GraphicsManager::Copy_Vga16(const byte *surface, int xp, int yp, int width,
loopSrcP = srcP;
loopDestP = destP;
savedXCount = xCount;
- palette = PAL_PIXELS;
+ palette = _palettePixels;
do {
destP[0] = destP[2] = destP[_screenLineSize] = destP[_screenLineSize + 2] = palette[2 * srcP[0]];
@@ -640,14 +640,14 @@ void GraphicsManager::setPaletteVGA256WithRefresh(const byte *palette, const byt
updateScreen();
}
-void GraphicsManager::SETCOLOR3(int palIndex, int r, int g, int b) {
+void GraphicsManager::setColorPercentage(int palIndex, int r, int g, int b) {
int palOffset = 3 * palIndex;
_palette[palOffset] = 255 * r / 100;
_palette[palOffset + 1] = 255 * g / 100;
_palette[palOffset + 2] = 255 * b / 100;
}
-void GraphicsManager::SETCOLOR4(int palIndex, int r, int g, int b) {
+void GraphicsManager::setColorPercentage2(int palIndex, int r, int g, int b) {
int rv = 255 * r / 100;
int gv = 255 * g / 100;
int bv = 255 * b / 100;
@@ -776,8 +776,8 @@ void GraphicsManager::copyVideoVbe16(const byte *srcData) {
destOffset += pixelCount;
while (pixelCount--) {
- destP[0] = PAL_PIXELS[2 * pixelIndex];
- destP[1] = PAL_PIXELS[(2 * pixelIndex) + 1];
+ destP[0] = _palettePixels[2 * pixelIndex];
+ destP[1] = _palettePixels[(2 * pixelIndex) + 1];
destP += 2;
}
@@ -789,8 +789,8 @@ void GraphicsManager::copyVideoVbe16(const byte *srcData) {
destOffset += pixelCount;
while (pixelCount--) {
- destP[0] = PAL_PIXELS[2 * pixelIndex];
- destP[1] = PAL_PIXELS[(2 * pixelIndex) + 1];
+ destP[0] = _palettePixels[2 * pixelIndex];
+ destP[1] = _palettePixels[(2 * pixelIndex) + 1];
destP += 2;
}
@@ -798,8 +798,8 @@ void GraphicsManager::copyVideoVbe16(const byte *srcData) {
}
} else {
byte *destP = (byte *)_videoPtr + destOffset * 2;
- destP[0] = PAL_PIXELS[2 * srcByte];
- destP[1] = PAL_PIXELS[(2 * srcByte) + 1];
+ destP[0] = _palettePixels[2 * srcByte];
+ destP[1] = _palettePixels[(2 * srcByte) + 1];
++srcP;
++destOffset;
}
@@ -831,7 +831,7 @@ void GraphicsManager::copyVideoVbe16a(const byte *srcData) {
}
}
- WRITE_LE_UINT16((byte *)_videoPtr + destOffset * 2, READ_LE_UINT16(PAL_PIXELS + 2 * srcByte));
+ WRITE_LE_UINT16((byte *)_videoPtr + destOffset * 2, READ_LE_UINT16(_palettePixels + 2 * srcByte));
++srcP;
++destOffset;
}
@@ -879,7 +879,7 @@ void GraphicsManager::copySurfaceRect(const byte *srcSurface, byte *destSurface,
* @param yp Y co-ordinate. FOr some reason, starts from 300 = top row
* @param spriteIndex Index of the sprite to draw
*/
-void GraphicsManager::Sprite_Vesa(byte *surface, const byte *spriteData, int xp, int yp, int spriteIndex) {
+void GraphicsManager::drawVesaSprite(byte *surface, const byte *spriteData, int xp, int yp, int spriteIndex) {
// Get a pointer to the start of the desired sprite
const byte *spriteP = spriteData + 3;
for (int i = spriteIndex; i; --i)
@@ -1115,7 +1115,7 @@ void GraphicsManager::displayDirtyRects() {
Common::Rect dstRect;
if (_vm->_eventsManager->_breakoutFl) {
- Copy_Vga16(_frontBuffer, r.left, r.top, r.right - r.left, r.bottom - r.top, r.left, r.top);
+ copyTo16Bit(_frontBuffer, r.left, r.top, r.right - r.left, r.bottom - r.top, r.left, r.top);
dstRect.left = r.left * 2;
dstRect.top = r.top * 2 + 30;
dstRect.setWidth((r.right - r.left) * 2);
@@ -1168,15 +1168,34 @@ void GraphicsManager::displayRefreshRects() {
resetRefreshRects();
}
-void GraphicsManager::AFFICHE_SPEEDVGA(const byte *objectData, int xp, int yp, int idx, bool addSegment) {
+
+/**
+ * Fast Display of either a compressed or vesa sprite
+ */
+void GraphicsManager::fastDisplay(const byte *spriteData, int xp, int yp, int spriteIndex, bool addSegment) {
+ int width = _vm->_objectsManager->getWidth(spriteData, spriteIndex);
+ int height = _vm->_objectsManager->getHeight(spriteData, spriteIndex);
+
+ if (*spriteData == 78) {
+ drawCompressedSprite(_backBuffer, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, false);
+ drawCompressedSprite(_frontBuffer, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, false);
+ } else {
+ drawVesaSprite(_frontBuffer, spriteData, xp + 300, yp + 300, spriteIndex);
+ drawVesaSprite(_backBuffer, spriteData, xp + 300, yp + 300, spriteIndex);
+ }
+ if (addSegment)
+ addDirtyRect(xp, yp, xp + width, yp + height);
+}
+
+void GraphicsManager::fastDisplay2(const byte *objectData, int xp, int yp, int idx, bool addSegment) {
int width = _vm->_objectsManager->getWidth(objectData, idx);
int height = _vm->_objectsManager->getHeight(objectData, idx);
if (*objectData == 78) {
- Affiche_Perfect(_backBuffer, objectData, xp + 300, yp + 300, idx, 0, 0, false);
- Affiche_Perfect(_frontBuffer, objectData, xp + 300, yp + 300, idx, 0, 0, false);
+ drawCompressedSprite(_backBuffer, objectData, xp + 300, yp + 300, idx, 0, 0, false);
+ drawCompressedSprite(_frontBuffer, objectData, xp + 300, yp + 300, idx, 0, 0, false);
} else {
- Sprite_Vesa(_frontBuffer, objectData, xp + 300, yp + 300, idx);
- Sprite_Vesa(_backBuffer, objectData, xp + 300, yp + 300, idx);
+ drawVesaSprite(_frontBuffer, objectData, xp + 300, yp + 300, idx);
+ drawVesaSprite(_backBuffer, objectData, xp + 300, yp + 300, idx);
}
if (addSegment)
addDirtyRect(xp, yp, xp + width, yp + height);
@@ -1196,7 +1215,7 @@ void GraphicsManager::copy16bFromSurfaceScaleX2(const byte *surface) {
byte *oldDestPtr = destPtr;
for (int x = 320; x; x--) {
curPixel = 2 * *curSurface;
- palPtr = PAL_PIXELS + curPixel;
+ palPtr = _palettePixels + curPixel;
destPtr[0] = destPtr[2] = destPtr[_screenLineSize] = destPtr[_screenLineSize + 2] = palPtr[0];
destPtr[1] = destPtr[3] = destPtr[_screenLineSize + 1] = destPtr[_screenLineSize + 3] = palPtr[1];
++curSurface;
@@ -1256,7 +1275,7 @@ int GraphicsManager::zoomOut(int val, int percentage) {
}
// Display 'Perfect?'
-void GraphicsManager::Affiche_Perfect(byte *surface, const byte *srcData, int xp300, int yp300, int frameIndex, int zoom1, int zoom2, bool flipFl) {
+void GraphicsManager::drawCompressedSprite(byte *surface, const byte *srcData, int xp300, int yp300, int frameIndex, int zoom1, int zoom2, bool flipFl) {
const byte *spriteStartP = srcData + 3;
for (int i = frameIndex; i; --i)
spriteStartP += READ_LE_UINT32(spriteStartP) + 16;
@@ -1581,24 +1600,6 @@ void GraphicsManager::Affiche_Perfect(byte *surface, const byte *srcData, int xp
}
}
-/**
- * Fast Display
- */
-void GraphicsManager::fastDisplay(const byte *spriteData, int xp, int yp, int spriteIndex, bool addSegment) {
- int width = _vm->_objectsManager->getWidth(spriteData, spriteIndex);
- int height = _vm->_objectsManager->getHeight(spriteData, spriteIndex);
-
- if (*spriteData == 78) {
- Affiche_Perfect(_backBuffer, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, false);
- Affiche_Perfect(_frontBuffer, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, false);
- } else {
- Sprite_Vesa(_frontBuffer, spriteData, xp + 300, yp + 300, spriteIndex);
- Sprite_Vesa(_backBuffer, spriteData, xp + 300, yp + 300, spriteIndex);
- }
- if (addSegment)
- addDirtyRect(xp, yp, xp + width, yp + height);
-}
-
void GraphicsManager::copySurface(const byte *surface, int x1, int y1, int width, int height, byte *destSurface, int destX, int destY) {
int left = x1;
int top = y1;
diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h
index 89504bb512..fd4391bf10 100644
--- a/engines/hopkins/graphics.h
+++ b/engines/hopkins/graphics.h
@@ -82,7 +82,7 @@ private:
void copy16bFromSurfaceScaleX2(const byte *surface);
void Trans_bloc(byte *destP, const byte *srcP, int count, int minThreshold, int maxThreshold);
- void Copy_Vga16(const byte *surface, int xp, int yp, int width, int height, int destX, int destY);
+ void copyTo16Bit(const byte *surface, int xp, int yp, int width, int height, int destX, int destY);
public:
byte _colorTable[PALETTE_EXT_BLOCK_SIZE];
byte _palette[PALETTE_EXT_BLOCK_SIZE];
@@ -116,7 +116,7 @@ public:
Common::Array<Common::Rect> _refreshRects;
bool _showDirtyRects;
- byte *PAL_PIXELS;
+ byte *_palettePixels;
public:
GraphicsManager(HopkinsEngine *vm);
~GraphicsManager();
@@ -169,12 +169,12 @@ public:
void reduceScreenPart(const byte *srcSruface, byte *destSurface, int xp, int yp, int width, int height, int zoom);
void setScreenWidth(int pitch);
- void SETCOLOR3(int palIndex, int r, int g, int b);
- void SETCOLOR4(int palIndex, int r, int g, int b);
- void AFFICHE_SPEEDVGA(const byte *objectData, int xp, int yp, int idx, bool addSegment = true);
- void Affiche_Perfect(byte *surface, const byte *srcData, int xp300, int yp300, int frameIndex, int zoom1, int zoom2, bool flipFl);
+ void setColorPercentage(int palIndex, int r, int g, int b);
+ void setColorPercentage2(int palIndex, int r, int g, int b);
+ void fastDisplay2(const byte *objectData, int xp, int yp, int idx, bool addSegment = true);
+ void drawCompressedSprite(byte *surface, const byte *srcData, int xp300, int yp300, int frameIndex, int zoom1, int zoom2, bool flipFl);
void Copy_Mem(const byte *srcSurface, int x1, int y1, uint16 width, int height, byte *destSurface, int destX, int destY);
- void Sprite_Vesa(byte *surface, const byte *spriteData, int xp, int yp, int spriteIndex);
+ void drawVesaSprite(byte *surface, const byte *spriteData, int xp, int yp, int spriteIndex);
void m_scroll16(const byte *surface, int xs, int ys, int width, int height, int destX, int destY);
void Trans_bloc2(byte *surface, byte *col, int size);
void NB_SCREEN(bool initPalette);
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index 4c4839cc82..368b3fc9e8 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -1679,10 +1679,10 @@ void HopkinsEngine::playIntro() {
_graphicsManager->loadImage("intro1");
_graphicsManager->scrollScreen(0);
_graphicsManager->_scrollOffset = 0;
- _graphicsManager->SETCOLOR3(252, 100, 100, 100);
- _graphicsManager->SETCOLOR3(253, 100, 100, 100);
- _graphicsManager->SETCOLOR3(251, 100, 100, 100);
- _graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _graphicsManager->setColorPercentage(252, 100, 100, 100);
+ _graphicsManager->setColorPercentage(253, 100, 100, 100);
+ _graphicsManager->setColorPercentage(251, 100, 100, 100);
+ _graphicsManager->setColorPercentage(254, 0, 0, 0);
for (int i = 0; i <= 4; i++)
_eventsManager->refreshScreenAndEvents();
@@ -1723,10 +1723,10 @@ void HopkinsEngine::playIntro() {
_objectsManager->stopBobAnimation(3);
_objectsManager->stopBobAnimation(5);
_graphicsManager->_scrollOffset = 0;
- _graphicsManager->SETCOLOR3(252, 100, 100, 100);
- _graphicsManager->SETCOLOR3(253, 100, 100, 100);
- _graphicsManager->SETCOLOR3(251, 100, 100, 100);
- _graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _graphicsManager->setColorPercentage(252, 100, 100, 100);
+ _graphicsManager->setColorPercentage(253, 100, 100, 100);
+ _graphicsManager->setColorPercentage(251, 100, 100, 100);
+ _graphicsManager->setColorPercentage(254, 0, 0, 0);
for (int i = 0; i <= 4; i++)
_eventsManager->refreshScreenAndEvents();
@@ -1765,10 +1765,10 @@ void HopkinsEngine::playIntro() {
_objectsManager->stopBobAnimation(5);
_objectsManager->stopBobAnimation(1);
_graphicsManager->_scrollOffset = 0;
- _graphicsManager->SETCOLOR3(252, 100, 100, 100);
- _graphicsManager->SETCOLOR3(253, 100, 100, 100);
- _graphicsManager->SETCOLOR3(251, 100, 100, 100);
- _graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _graphicsManager->setColorPercentage(252, 100, 100, 100);
+ _graphicsManager->setColorPercentage(253, 100, 100, 100);
+ _graphicsManager->setColorPercentage(251, 100, 100, 100);
+ _graphicsManager->setColorPercentage(254, 0, 0, 0);
for (int i = 0; i <= 3; i++)
_eventsManager->refreshScreenAndEvents();
@@ -1985,10 +1985,10 @@ void HopkinsEngine::handleConflagration() {
_globals->_eventMode = EVENTMODE_IGNORE;
_graphicsManager->loadImage("IM71");
_animationManager->loadAnim("ANIM71");
- _graphicsManager->SETCOLOR3(252, 100, 100, 100);
- _graphicsManager->SETCOLOR3(253, 100, 100, 100);
- _graphicsManager->SETCOLOR3(251, 100, 100, 100);
- _graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _graphicsManager->setColorPercentage(252, 100, 100, 100);
+ _graphicsManager->setColorPercentage(253, 100, 100, 100);
+ _graphicsManager->setColorPercentage(251, 100, 100, 100);
+ _graphicsManager->setColorPercentage(254, 0, 0, 0);
_graphicsManager->displayAllBob();
for (int cpt = 0; cpt <= 4; cpt++)
@@ -2108,10 +2108,10 @@ void HopkinsEngine::playEnding() {
_objectsManager->stopBobAnimation(7);
_objectsManager->stopBobAnimation(8);
_objectsManager->stopBobAnimation(9);
- _graphicsManager->SETCOLOR3(252, 100, 100, 100);
- _graphicsManager->SETCOLOR3(253, 100, 100, 100);
- _graphicsManager->SETCOLOR3(251, 100, 100, 100);
- _graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _graphicsManager->setColorPercentage(252, 100, 100, 100);
+ _graphicsManager->setColorPercentage(253, 100, 100, 100);
+ _graphicsManager->setColorPercentage(251, 100, 100, 100);
+ _graphicsManager->setColorPercentage(254, 0, 0, 0);
_eventsManager->changeMouseCursor(0);
for (int cpt = 0; cpt <= 4; cpt++)
@@ -2336,10 +2336,10 @@ int HopkinsEngine::handleBaseMap() {
loadBaseMap();
// Set needed colors
- _graphicsManager->SETCOLOR3(252, 100, 100, 100);
- _graphicsManager->SETCOLOR3(253, 100, 100, 100);
- _graphicsManager->SETCOLOR3(251, 100, 100, 100);
- _graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _graphicsManager->setColorPercentage(252, 100, 100, 100);
+ _graphicsManager->setColorPercentage(253, 100, 100, 100);
+ _graphicsManager->setColorPercentage(251, 100, 100, 100);
+ _graphicsManager->setColorPercentage(254, 0, 0, 0);
_eventsManager->changeMouseCursor(0);
_graphicsManager->fadeInLong();
bool loopCond = false;
@@ -2375,10 +2375,10 @@ int HopkinsEngine::handleBaseMap() {
_globals->_baseMapColor += 25;
if (_globals->_baseMapColor > 100)
_globals->_baseMapColor = 0;
- _graphicsManager->SETCOLOR4(251, _globals->_baseMapColor, _globals->_baseMapColor, _globals->_baseMapColor);
+ _graphicsManager->setColorPercentage2(251, _globals->_baseMapColor, _globals->_baseMapColor, _globals->_baseMapColor);
} else {
_eventsManager->changeMouseCursor(0);
- _graphicsManager->SETCOLOR4(251, 100, 100, 100);
+ _graphicsManager->setColorPercentage2(251, 100, 100, 100);
}
_eventsManager->refreshScreenAndEvents();
if ((mouseButton == 1) && zone)
@@ -2825,10 +2825,10 @@ void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFi
}
_objectsManager->addStaticSprite(_globals->_characterSpriteBuf, Common::Point(_objectsManager->_characterPos.x, 110), 0, _objectsManager->_startSpriteIndex, 0, false, 0, 0);
- _graphicsManager->SETCOLOR3(252, 100, 100, 100);
- _graphicsManager->SETCOLOR3(253, 100, 100, 100);
- _graphicsManager->SETCOLOR3(251, 100, 100, 100);
- _graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _graphicsManager->setColorPercentage(252, 100, 100, 100);
+ _graphicsManager->setColorPercentage(253, 100, 100, 100);
+ _graphicsManager->setColorPercentage(251, 100, 100, 100);
+ _graphicsManager->setColorPercentage(254, 0, 0, 0);
_objectsManager->animateSprite(0);
_linesManager->_route = NULL;
_eventsManager->mouseOn();
diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp
index 6e5ab07f57..ab981a3c7f 100644
--- a/engines/hopkins/lines.cpp
+++ b/engines/hopkins/lines.cpp
@@ -2858,7 +2858,7 @@ void LinesManager::checkZone() {
zoneId = _oldMouseZoneId;
}
if (_oldMouseZoneId != zoneId) {
- _vm->_graphicsManager->SETCOLOR4(251, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage2(251, 100, 100, 100);
_vm->_eventsManager->_mouseCursorId = 4;
_vm->_eventsManager->changeMouseCursor(4);
if (_forceHideText) {
@@ -2881,7 +2881,7 @@ void LinesManager::checkZone() {
_hotspotTextColor += 25;
if (_hotspotTextColor > 100)
_hotspotTextColor = 0;
- _vm->_graphicsManager->SETCOLOR4(251, _hotspotTextColor, _hotspotTextColor, _hotspotTextColor);
+ _vm->_graphicsManager->setColorPercentage2(251, _hotspotTextColor, _hotspotTextColor, _hotspotTextColor);
if (_vm->_eventsManager->_mouseCursorId == 4) {
if (_zone[zoneId]._verbFl1 == 2) {
_vm->_eventsManager->changeMouseCursor(16);
@@ -2890,7 +2890,7 @@ void LinesManager::checkZone() {
}
}
} else {
- _vm->_graphicsManager->SETCOLOR4(251, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage2(251, 100, 100, 100);
_vm->_eventsManager->_mouseCursorId = 4;
_vm->_eventsManager->changeMouseCursor(4);
}
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index b6012e1182..18b6398b44 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -500,28 +500,28 @@ void ObjectsManager::displaySprite() {
if (_saveLoadFl) {
_vm->_graphicsManager->restoreSurfaceRect(_vm->_graphicsManager->_frontBuffer, _saveLoadSprite, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353);
if (_saveLoadX && _saveLoadY)
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _saveLoadSprite2, _saveLoadX + _vm->_eventsManager->_startPos.x + 300, _saveLoadY + 300, 0);
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _saveLoadSprite2, _saveLoadX + _vm->_eventsManager->_startPos.x + 300, _saveLoadY + 300, 0);
_vm->_graphicsManager->addDirtyRect(_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->_frontBuffer, _vm->_globals->_optionDialogSpr,
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr,
_vm->_eventsManager->_startPos.x + 464, 407, 0);
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr,
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr,
_vm->_eventsManager->_startPos.x + 657, 556, _vm->_globals->_menuSpeed);
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr,
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr,
_vm->_eventsManager->_startPos.x + 731, 495, _vm->_globals->_menuTextOff);
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr,
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr,
_vm->_eventsManager->_startPos.x + 731, 468, _vm->_globals->_menuVoiceOff);
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr,
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr,
_vm->_eventsManager->_startPos.x + 731, 441, _vm->_globals->_menuSoundOff);
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr,
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr,
_vm->_eventsManager->_startPos.x + 731, 414, _vm->_globals->_menuMusicOff);
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr,
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr,
_vm->_eventsManager->_startPos.x + 600, 522, _vm->_globals->_menuDisplayType);
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr,
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _vm->_globals->_optionDialogSpr,
_vm->_eventsManager->_startPos.x + 611, 502, _vm->_globals->_menuScrollSpeed);
_vm->_graphicsManager->addDirtyRect(_vm->_eventsManager->_startPos.x + 164, 107, _vm->_eventsManager->_startPos.x + 498, 320);
}
@@ -605,10 +605,10 @@ void ObjectsManager::setBobInfo(int idx) {
int yp = _bob[idx]._oldY;
if (_bob[idx]._isSpriteFl)
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _bob[idx]._spriteData,
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _bob[idx]._spriteData,
xp + 300, yp + 300, _bob[idx]._frameIndex);
else
- _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_frontBuffer,
+ _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_frontBuffer,
_bob[idx]._spriteData, xp + 300, yp + 300, _bob[idx]._frameIndex,
_bob[idx]._zoomOutFactor, _bob[idx]._zooInmFactor,
_bob[idx]._flipFl);
@@ -854,10 +854,10 @@ void ObjectsManager::showSprite(int idx) {
return;
if (spr->_rleFl)
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, spr->_spriteData,
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, spr->_spriteData,
spr->_destX + 300, spr->_destY + 300, spr->_spriteIndex);
else
- _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_frontBuffer, spr->_spriteData,
+ _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_frontBuffer, spr->_spriteData,
spr->_destX + 300, spr->_destY + 300, spr->_spriteIndex, spr->_reducePct, spr->_zoomPct, spr->_flipFl);
ListeItem *list = &Liste[idx];
@@ -887,7 +887,7 @@ void ObjectsManager::showSprite(int idx) {
void ObjectsManager::displayHiding(int idx) {
HidingItem *hid = &_hidingItem[idx];
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _hidingItemData[1],
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, _hidingItemData[1],
hid->_x + 300, hid->_y + 300, hid->_spriteIndex);
_vm->_graphicsManager->addDirtyRect(hid->_x, hid->_y, hid->_x + hid->_width, hid->_y + hid->_height);
}
@@ -1200,16 +1200,16 @@ void ObjectsManager::displayVBob() {
vbob->_xp, vbob->_yp, width, height);
if (*vbob->_spriteData == 78) {
- _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_backBuffer, vbob->_spriteData,
+ _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_backBuffer, vbob->_spriteData,
vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex, 0, 0, false);
- _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_frontBuffer, vbob->_spriteData,
+ _vm->_graphicsManager->drawCompressedSprite(_vm->_graphicsManager->_frontBuffer, vbob->_spriteData,
vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex, 0, 0, false);
} else {
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, vbob->_spriteData,
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_frontBuffer, vbob->_spriteData,
vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex);
- _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_backBuffer, vbob->_spriteData,
+ _vm->_graphicsManager->drawVesaSprite(_vm->_graphicsManager->_backBuffer, vbob->_spriteData,
vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex);
}
@@ -1825,10 +1825,10 @@ void ObjectsManager::handleCityMap() {
_vm->_graphicsManager->_scrollOffset = getSpriteX(0) - 320;
animateSprite(0);
_vm->_linesManager->_route = NULL;
- _vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(251, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _vm->_graphicsManager->setColorPercentage(252, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(251, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0);
for (int i = 0; i <= 4; i++)
_vm->_eventsManager->refreshScreenAndEvents();
@@ -2015,7 +2015,7 @@ void ObjectsManager::handleLeftButton() {
_vm->_globals->_actionMoveTo = true;
}
_vm->_fontManager->hideText(5);
- _vm->_graphicsManager->SETCOLOR4(251, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage2(251, 100, 100, 100);
if (_vm->_globals->_screenId == 20 && _vm->_globals->_saveData->_data[svField132] == 1
&& _curObjectIndex == 20 && _zoneNum == 12
&& _vm->_eventsManager->_mouseCursorId == 23) {
@@ -3264,10 +3264,10 @@ void ObjectsManager::sceneSpecialIni() {
case 17:
if (_vm->_globals->_prevScreenId == 20) {
_vm->_globals->_disableInventFl = true;
- _vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(251, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _vm->_graphicsManager->setColorPercentage(252, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(251, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0);
for (int i = 0; i <= 4; i++)
_vm->_eventsManager->refreshScreenAndEvents();
_vm->_graphicsManager->fadeInLong();
@@ -3748,10 +3748,10 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
_vm->_linesManager->_route = NULL;
computeAndSetSpriteSize();
}
- _vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(251, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _vm->_graphicsManager->setColorPercentage(252, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(251, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0);
_vm->_eventsManager->changeMouseCursor(4);
for (int i = 0; i <= 4; i++)
_vm->_eventsManager->refreshScreenAndEvents();
@@ -3834,10 +3834,10 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm
}
_vm->_eventsManager->mouseOn();
_vm->_eventsManager->_mouseCursorId = 4;
- _vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(251, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _vm->_graphicsManager->setColorPercentage(252, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(251, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0);
if (_vm->_globals->_characterType) {
if (!_vm->_globals->_saveData->_data[svAlternateSpriteFl] && !_vm->_globals->_saveData->_data[svField356]) {
_vm->_globals->_characterSpriteBuf = _vm->_fileManager->loadFile("PERSO.SPR");
diff --git a/engines/hopkins/saveload.cpp b/engines/hopkins/saveload.cpp
index 1d3421ad2e..a823eee352 100644
--- a/engines/hopkins/saveload.cpp
+++ b/engines/hopkins/saveload.cpp
@@ -249,7 +249,7 @@ void SaveLoadManager::createThumbnail(Graphics::Surface *s) {
uint16 *lineDestP = destP;
for (int xp = 0; xp < w; ++xp)
- *lineDestP++ = *(uint16 *)&_vm->_graphicsManager->PAL_PIXELS[*lineSrcP++ * 2];
+ *lineDestP++ = *(uint16 *)&_vm->_graphicsManager->_palettePixels[*lineSrcP++ * 2];
// Move to the start of the next line
srcP += w;
@@ -292,7 +292,7 @@ void SaveLoadManager::convertThumb16To8(Graphics::Surface *thumb16, Graphics::Su
byte paletteG[PALETTE_SIZE];
byte paletteB[PALETTE_SIZE];
for (int palIndex = 0; palIndex < PALETTE_SIZE; ++palIndex) {
- uint16 p = READ_LE_UINT16(&_vm->_graphicsManager->PAL_PIXELS[palIndex * 2]);
+ uint16 p = READ_LE_UINT16(&_vm->_graphicsManager->_palettePixels[palIndex * 2]);
pixelFormat16.colorToRGB(p, paletteR[palIndex], paletteG[palIndex], paletteB[palIndex]);
}
diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp
index 1c9e18db70..4dbe23eeb6 100644
--- a/engines/hopkins/script.cpp
+++ b/engines/hopkins/script.cpp
@@ -1944,10 +1944,10 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_objectsManager->enableHidingBehavior();
_vm->_objectsManager->setHidingUseCount(0);
_vm->_objectsManager->setHidingUseCount(1);
- _vm->_graphicsManager->SETCOLOR4(252, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR4(253, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR4(251, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR4(254, 0, 0, 0);
+ _vm->_graphicsManager->setColorPercentage2(252, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage2(253, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage2(251, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage2(254, 0, 0, 0);
break;
case 211:
@@ -1966,10 +1966,10 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_eventsManager->refreshScreenAndEvents();
}
- _vm->_graphicsManager->SETCOLOR4(252, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR4(253, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR4(251, 100, 100, 100);
- _vm->_graphicsManager->SETCOLOR4(254, 0, 0, 0);
+ _vm->_graphicsManager->setColorPercentage2(252, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage2(253, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage2(251, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage2(254, 0, 0, 0);
break;
case 215:
@@ -2329,10 +2329,10 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_animationManager->playAnim("BOMBE1A.ANM", 100, 18, 100);
}
_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);
- _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _vm->_graphicsManager->setColorPercentage(252, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(251, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0);
_vm->_graphicsManager->initScreen("BOMBE", 2, true);
_vm->_graphicsManager->fadeInShort();
break;
diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp
index 24be12da6d..49b0ae27b7 100644
--- a/engines/hopkins/talk.cpp
+++ b/engines/hopkins/talk.cpp
@@ -131,10 +131,10 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename)
_vm->_eventsManager->_mouseCursorId = oldMouseCursorId;
_vm->_eventsManager->changeMouseCursor(oldMouseCursorId);
- _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100);
if (_vm->getIsDemo() == false)
- _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0);
_vm->_graphicsManager->initColorTable(145, 150, _vm->_graphicsManager->_palette);
_vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette);
@@ -1063,10 +1063,10 @@ void TalkManager::animateObject(const Common::String &filename) {
_vm->_objectsManager->_charactersEnabledFl = false;
_vm->_eventsManager->_mouseCursorId = 4;
_vm->_eventsManager->changeMouseCursor(4);
- _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100);
+ _vm->_graphicsManager->setColorPercentage(253, 100, 100, 100);
if (!_vm->getIsDemo())
- _vm->_graphicsManager->SETCOLOR3(254, 0, 0, 0);
+ _vm->_graphicsManager->setColorPercentage(254, 0, 0, 0);
_vm->_graphicsManager->initColorTable(145, 150, _vm->_graphicsManager->_palette);
_vm->_graphicsManager->setPaletteVGA256(_vm->_graphicsManager->_palette);