aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/lab/graphics.cpp21
-rw-r--r--engines/lab/interface.cpp12
-rw-r--r--engines/lab/interface.h4
-rw-r--r--engines/lab/lab.h2
-rw-r--r--engines/lab/map.cpp18
-rw-r--r--engines/lab/special.cpp8
-rw-r--r--engines/lab/vga.cpp4
7 files changed, 35 insertions, 34 deletions
diff --git a/engines/lab/graphics.cpp b/engines/lab/graphics.cpp
index 6fa29d8fdf..9e65fa9424 100644
--- a/engines/lab/graphics.cpp
+++ b/engines/lab/graphics.cpp
@@ -652,7 +652,7 @@ void LabEngine::doTransWipe(CloseDataPtr *cPtr, char *filename) {
linesdone = 0;
}
- ghoastRect(0, 0, curY, _screenWidth - 1, curY + 1);
+ overlayRect(0, 0, curY, _screenWidth - 1, curY + 1);
curY += 4;
linesdone++;
}
@@ -708,7 +708,7 @@ void LabEngine::doTransWipe(CloseDataPtr *cPtr, char *filename) {
imDest._imageData = getCurrentDrawingBuffer();
imSource.bltBitMap(0, curY, &imDest, 0, curY, _screenWidth, 2);
- ghoastRect(0, 0, curY, _screenWidth - 1, curY + 1);
+ overlayRect(0, 0, curY, _screenWidth - 1, curY + 1);
curY += 4;
linesdone++;
}
@@ -756,14 +756,13 @@ void LabEngine::doWipe(uint16 wipeType, CloseDataPtr *cPtr, char *filename) {
_anim->diffNextFrame();
}
-static byte blackbuffer[256 * 3];
-
/*****************************************************************************/
/* Changes the front screen to black. */
/*****************************************************************************/
void blackScreen() {
- memset(blackbuffer, 0, 248 * 3);
- g_lab->writeColorRegs(blackbuffer, 8, 248);
+ byte pal[256 * 3];
+ memset(pal, 0, 248 * 3);
+ g_lab->writeColorRegs(pal, 8, 248);
g_system->delayMillis(32);
}
@@ -772,16 +771,18 @@ void blackScreen() {
/* Changes the front screen to white. */
/*****************************************************************************/
void whiteScreen() {
- memset(blackbuffer, 255, 248 * 3);
- g_lab->writeColorRegs(blackbuffer, 8, 248);
+ byte pal[256 * 3];
+ memset(pal, 255, 248 * 3);
+ g_lab->writeColorRegs(pal, 8, 248);
}
/*****************************************************************************/
/* Changes the entire screen to black. */
/*****************************************************************************/
void blackAllScreen() {
- memset(blackbuffer, 0, 256 * 3);
- g_lab->writeColorRegs(blackbuffer, 0, 256);
+ byte pal[256 * 3];
+ memset(pal, 0, 256 * 3);
+ g_lab->writeColorRegs(pal, 0, 256);
g_system->delayMillis(32);
}
diff --git a/engines/lab/interface.cpp b/engines/lab/interface.cpp
index 9a51978bdf..7352b61017 100644
--- a/engines/lab/interface.cpp
+++ b/engines/lab/interface.cpp
@@ -84,7 +84,7 @@ void drawGadgetList(Gadget *gadlist) {
gadlist->_image->drawImage(gadlist->x, gadlist->y);
if (GADGETOFF & gadlist->GadgetFlags)
- ghoastGadget(gadlist, 1);
+ disableGadget(gadlist, 1);
gadlist = gadlist->NextGadget;
}
@@ -92,19 +92,19 @@ void drawGadgetList(Gadget *gadlist) {
/*****************************************************************************/
-/* Ghoasts a gadget, and makes it unavailable for using. */
+/* Dims a gadget, and makes it unavailable for using. */
/*****************************************************************************/
-void ghoastGadget(Gadget *curgad, uint16 pencolor) {
- g_lab->ghoastRect(pencolor, curgad->x, curgad->y, curgad->x + curgad->_image->_width - 1, curgad->y + curgad->_image->_height - 1);
+void disableGadget(Gadget *curgad, uint16 pencolor) {
+ g_lab->overlayRect(pencolor, curgad->x, curgad->y, curgad->x + curgad->_image->_width - 1, curgad->y + curgad->_image->_height - 1);
curgad->GadgetFlags |= GADGETOFF;
}
/*****************************************************************************/
-/* Unghoasts a gadget, and makes it available again. */
+/* Undims a gadget, and makes it available again. */
/*****************************************************************************/
-void unGhoastGadget(Gadget *curgad) {
+void enableGadget(Gadget *curgad) {
curgad->_image->drawImage(curgad->x, curgad->y);
curgad->GadgetFlags &= !(GADGETOFF);
}
diff --git a/engines/lab/interface.h b/engines/lab/interface.h
index ceeb4a8327..de770f0ae1 100644
--- a/engines/lab/interface.h
+++ b/engines/lab/interface.h
@@ -113,8 +113,8 @@ extern Common::KeyState _keyPressed;
Gadget *createButton(uint16 x, uint16 y, uint16 id, uint16 key, Image *im, Image *imalt);
void freeButtonList(void *gptrlist);
void drawGadgetList(Gadget *gadlist);
-void ghoastGadget(Gadget *curgad, uint16 pencolor);
-void unGhoastGadget(Gadget *curgad);
+void disableGadget(Gadget *curgad, uint16 pencolor);
+void enableGadget(Gadget *curgad);
IntuiMessage *getMsg();
} // End of namespace Lab
diff --git a/engines/lab/lab.h b/engines/lab/lab.h
index 9586a48a36..f19a1bacff 100644
--- a/engines/lab/lab.h
+++ b/engines/lab/lab.h
@@ -147,7 +147,7 @@ public:
void rectFill(uint16 x1, uint16 y1, uint16 x2, uint16 y2);
void scrollDisplayX(int16 dx, uint16 x1, uint16 y1, uint16 x2, uint16 y2);
void scrollDisplayY(int16 dy, uint16 x1, uint16 y1, uint16 x2, uint16 y2);
- void ghoastRect(uint16 pencolor, uint16 x1, uint16 y1, uint16 x2, uint16 y2);
+ void overlayRect(uint16 pencolor, uint16 x1, uint16 y1, uint16 x2, uint16 y2);
void setPalette(void *cmap, uint16 numcolors);
void drawHLine(uint16 x, uint16 y1, uint16 y2);
void drawVLine(uint16 x1, uint16 y, uint16 x2);
diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp
index 9ce9f0889b..7471b1f0ea 100644
--- a/engines/lab/map.cpp
+++ b/engines/lab/map.cpp
@@ -491,7 +491,7 @@ void LabEngine::drawMap(uint16 CurRoom, uint16 CurMsg, uint16 Floor, bool fadeou
char *sptr;
uint16 tempfloor;
- bool noghoast;
+ bool noOverlay;
_event->mouseHide();
@@ -517,20 +517,20 @@ void LabEngine::drawMap(uint16 CurRoom, uint16 CurMsg, uint16 Floor, bool fadeou
drawRoom(CurRoom, true);
tempfloor = Floor;
- getUpFloor(&tempfloor, &noghoast);
+ getUpFloor(&tempfloor, &noOverlay);
- if (noghoast)
- unGhoastGadget(&upgadget);
+ if (noOverlay)
+ enableGadget(&upgadget);
else
- ghoastGadget(&upgadget, 12);
+ disableGadget(&upgadget, 12);
tempfloor = Floor;
- getDownFloor(&tempfloor, &noghoast);
+ getDownFloor(&tempfloor, &noOverlay);
- if (noghoast)
- unGhoastGadget(&downgadget);
+ if (noOverlay)
+ enableGadget(&downgadget);
else
- ghoastGadget(&downgadget, 12);
+ disableGadget(&downgadget, 12);
// Labyrinth specific code
if (Floor == LOWERFLOOR) {
diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp
index 18810566bf..50cf0fe259 100644
--- a/engines/lab/special.cpp
+++ b/engines/lab/special.cpp
@@ -657,14 +657,14 @@ void LabEngine::drawJournal(uint16 wipenum, bool needFade) {
turnPage((bool)(wipenum == 1));
if (JPage == 0)
- ghoastGadget(&BackG, 15);
+ disableGadget(&BackG, 15);
else
- unGhoastGadget(&BackG);
+ enableGadget(&BackG);
if (lastpage)
- ghoastGadget(&ForwardG, 15);
+ disableGadget(&ForwardG, 15);
else
- unGhoastGadget(&ForwardG);
+ enableGadget(&ForwardG);
if (needFade)
diff --git a/engines/lab/vga.cpp b/engines/lab/vga.cpp
index 73f80b29f8..0248bb823c 100644
--- a/engines/lab/vga.cpp
+++ b/engines/lab/vga.cpp
@@ -270,9 +270,9 @@ void LabEngine::drawHLine(uint16 x1, uint16 y, uint16 x2) {
}
/*****************************************************************************/
-/* Ghoasts a region on the screen using the desired pen color. */
+/* Overlays a region on the screen using the desired pen color. */
/*****************************************************************************/
-void LabEngine::ghoastRect(uint16 pencolor, uint16 x1, uint16 y1, uint16 x2, uint16 y2) {
+void LabEngine::overlayRect(uint16 pencolor, uint16 x1, uint16 y1, uint16 x2, uint16 y2) {
int dx = x1;
int dy = y1;
int w = x2 - x1 + 1;