diff options
author | Eugene Sandulenko | 2014-12-14 17:46:40 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2015-12-15 00:05:02 +0100 |
commit | bbddd32d38a03544ddab6e36e6853ddc128d0254 (patch) | |
tree | ec9b1595a7bdf14cc145045852543b07502586b0 | |
parent | 11a7ffaabe89920b6481e0efeb744b5efc222996 (diff) | |
download | scummvm-rg350-bbddd32d38a03544ddab6e36e6853ddc128d0254.tar.gz scummvm-rg350-bbddd32d38a03544ddab6e36e6853ddc128d0254.tar.bz2 scummvm-rg350-bbddd32d38a03544ddab6e36e6853ddc128d0254.zip |
LAB: Further rendering pipeline fixes
-rw-r--r-- | engines/lab/engine.cpp | 54 | ||||
-rw-r--r-- | engines/lab/graphics.cpp | 15 | ||||
-rw-r--r-- | engines/lab/lab.cpp | 2 | ||||
-rw-r--r-- | engines/lab/labmusic.cpp | 3 | ||||
-rw-r--r-- | engines/lab/map.cpp | 17 | ||||
-rw-r--r-- | engines/lab/mouse.cpp | 6 | ||||
-rw-r--r-- | engines/lab/processroom.cpp | 2 | ||||
-rw-r--r-- | engines/lab/readdiff.cpp | 6 | ||||
-rw-r--r-- | engines/lab/special.cpp | 15 | ||||
-rw-r--r-- | engines/lab/stddefines.h | 2 | ||||
-rw-r--r-- | engines/lab/vga.cpp | 132 | ||||
-rw-r--r-- | engines/lab/vga.h | 8 |
12 files changed, 116 insertions, 146 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index b0b8614d74..3edf89631e 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -786,7 +786,7 @@ static void process(void) { CPtr = NULL; #if !defined(DOSCODE) mayShowCrumbIndicator(); - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } @@ -824,7 +824,7 @@ static void process(void) { #if !defined(DOSCODE) mayShowCrumbIndicator(); - g_system->updateScreen(); + WSDL_UpdateScreen(); if (!FollowingCrumbs) eatMessages(); @@ -838,7 +838,7 @@ static void process(void) { drawRoomMessage(CurInv, CPtr); ForceDraw = false; #if !defined(DOSCODE) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } } @@ -878,13 +878,13 @@ static void process(void) { GotMessage = true; mayShowCrumbIndicator(); - g_system->updateScreen(); + WSDL_UpdateScreen(); goto from_crumbs; } } mayShowCrumbIndicator(); - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } else { GotMessage = true; @@ -918,7 +918,7 @@ from_crumbs: NumCrumbs = 0; DroppingCrumbs = true; mayShowCrumbIndicator(); - g_system->updateScreen(); + WSDL_UpdateScreen(); } else if (Code == 'f' || Code == 'F' || @@ -941,7 +941,7 @@ from_crumbs: interfaceOn(); /* Sets the correct gadget list */ drawPanel(); drawRoomMessage(CurInv, CPtr); - g_system->updateScreen(); + WSDL_UpdateScreen(); } } else { BreadCrumbs[0].RoomNum = 0; @@ -949,7 +949,7 @@ from_crumbs: // Need to hide indicator!!!! mayShowCrumbIndicatorOff(); - g_system->updateScreen(); + WSDL_UpdateScreen(); } } } @@ -1068,7 +1068,7 @@ from_crumbs: drawPanel(); drawRoomMessage(CurInv, CPtr); #if !defined(DOSCODE) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } } @@ -1083,7 +1083,7 @@ from_crumbs: CPtr = NULL; #if !defined(DOSCODE) mayShowCrumbIndicator(); - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } @@ -1107,7 +1107,7 @@ from_crumbs: drawRoomMessage(CurInv, CPtr); #if !defined(DOSCODE) mayShowCrumbIndicator(); - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } else { Old = ActionMode; @@ -1130,7 +1130,7 @@ from_crumbs: drawMessage(LOOKWHAT); #if !defined(DOSCODE) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } } @@ -1139,7 +1139,7 @@ from_crumbs: doUse(MAPNUM); #if !defined(DOSCODE) mayShowCrumbIndicator(); - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } @@ -1165,7 +1165,7 @@ from_crumbs: ForceDraw = true; #if !defined(DOSCODE) mayShowCrumbIndicator(); - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } else if (GadID == 7) { OldRoomNum = RoomNum; @@ -1241,7 +1241,7 @@ from_crumbs: } mayShowCrumbIndicator(); - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } } @@ -1261,7 +1261,7 @@ from_crumbs: drawPanel(); drawRoomMessage(CurInv, CPtr); #if !defined(DOSCODE) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } @@ -1288,14 +1288,14 @@ from_crumbs: drawMessage("Disk operation failed."); VGASetPal(initcolors, 8); #if !defined(DOSCODE) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif g_system->delayMillis(1000); } #if !defined(DOSCODE) else { - g_system->updateScreen(); + WSDL_UpdateScreen(); } #endif @@ -1312,7 +1312,7 @@ from_crumbs: drawMessage(USEONWHAT); MainDisplay = true; #if !defined(DOSCODE) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } } @@ -1332,7 +1332,7 @@ from_crumbs: Test = getInvName(CurInv); #if !defined(DOSCODE) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } @@ -1342,7 +1342,7 @@ from_crumbs: DoNotDrawMessage = false; drawRoomMessage(CurInv, CPtr); #if !defined(DOSCODE) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } @@ -1352,7 +1352,7 @@ from_crumbs: DoNotDrawMessage = false; drawRoomMessage(CurInv, CPtr); #if !defined(DOSCODE) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } @@ -1362,7 +1362,7 @@ from_crumbs: NumCrumbs = 0; DroppingCrumbs = true; mayShowCrumbIndicator(); - g_system->updateScreen(); + WSDL_UpdateScreen(); } else if (GadID == 6) { /* follow crumbs */ @@ -1383,14 +1383,14 @@ from_crumbs: interfaceOn(); /* Sets the correct gadget list */ drawPanel(); drawRoomMessage(CurInv, CPtr); - g_system->updateScreen(); + WSDL_UpdateScreen(); } else { BreadCrumbs[0].RoomNum = 0; DroppingCrumbs = false; // Need to hide indicator!!!! mayShowCrumbIndicatorOff(); - g_system->updateScreen(); + WSDL_UpdateScreen(); } } } @@ -1474,7 +1474,7 @@ from_crumbs: #if !defined(DOSCODE) mayShowCrumbIndicator(); - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } @@ -1527,7 +1527,7 @@ from_crumbs: drawRoomMessage(CurInv, CPtr); #if !defined(DOSCODE) mayShowCrumbIndicator(); - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } } diff --git a/engines/lab/graphics.cpp b/engines/lab/graphics.cpp index bcaed9ceab..dba28113af 100644 --- a/engines/lab/graphics.cpp +++ b/engines/lab/graphics.cpp @@ -336,7 +336,8 @@ uint32 flowText(void *font, /* the TextAttr pointer */ } -extern uint32 VGABASEADDRESS, VGABytesPerPage; +extern uint32 VGABytesPerPage; +extern byte *VGABASEADDRESS; /******************************************************************************/ @@ -353,13 +354,15 @@ uint32 flowTextToMem(struct Image *DestIm, void *font, /* the TextAttr point uint16 x1, /* Cords */ uint16 y1, uint16 x2, uint16 y2, const char *str) { /* The text itself */ uint32 res, vgabyte = VGABytesPerPage; + byte *tmp = VGABASEADDRESS; - //VGABASEADDRESS = (uint32)(DestIm->ImageData); + VGABASEADDRESS = DestIm->ImageData; VGABytesPerPage = (uint32) DestIm->Width * (int32) DestIm->Height; res = flowText(font, spacing, pencolor, backpen, fillback, centerh, centerv, output, x1, y1, x2, y2, str); VGABytesPerPage = vgabyte; + VGABASEADDRESS = tmp; return res; } @@ -593,7 +596,7 @@ static void doScrollBlack(void) { setAPen(0); rectFill(0, nheight, width - 1, nheight + by - 1); - g_system->updateScreen(); + WSDL_UpdateScreen(); if (!IsHiRes) { if (nheight <= (height / 8)) @@ -695,7 +698,7 @@ static void doScrollWipe(char *filename) { copyPage(width, height, nheight, startline, mem); - g_system->updateScreen(); + WSDL_UpdateScreen(); if (!nheight) startline += by; @@ -741,7 +744,7 @@ static void doScrollBounce(void) { startline -= newby[counter]; copyPage(width, height, 0, startline, mem); - g_system->updateScreen(); + WSDL_UpdateScreen(); waitTOF(); } @@ -750,7 +753,7 @@ static void doScrollBounce(void) { startline += newby1[counter - 1]; copyPage(width, height, 0, startline, mem); - g_system->updateScreen(); + WSDL_UpdateScreen(); waitTOF(); } diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp index edde50bb5d..7054072210 100644 --- a/engines/lab/lab.cpp +++ b/engines/lab/lab.cpp @@ -56,7 +56,7 @@ LabEngine::~LabEngine() { Common::Error LabEngine::run() { // Initialize graphics using following: - initGraphics(320, 200, false); + initGraphics(640, 480, true); g_music = new Music(); diff --git a/engines/lab/labmusic.cpp b/engines/lab/labmusic.cpp index e15dfa70f4..d7edc2b746 100644 --- a/engines/lab/labmusic.cpp +++ b/engines/lab/labmusic.cpp @@ -102,6 +102,9 @@ void Music::updateMusic(void) { void Music::fillbuffer(uint16 unit) { + return; + + warning("STUB: Music::fillbuffer"); uint32 Size = MUSICBUFSIZE; void *ptr = _musicBuffer[unit]; #if defined(DOSCODE) diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp index f6e94990b5..d32154e700 100644 --- a/engines/lab/map.cpp +++ b/engines/lab/map.cpp @@ -60,7 +60,7 @@ extern uint16 RoomNum; /* the VGA palette. */ /*****************************************************************************/ void setAmigaPal(uint16 *pal, uint16 numcolors) { - char vgapal[16 * 3]; + byte vgapal[16 * 3]; uint16 counter, vgacount; if (numcolors > 16) @@ -69,11 +69,11 @@ void setAmigaPal(uint16 *pal, uint16 numcolors) { vgacount = 0; for (counter = 0; counter < numcolors; counter++) { - vgapal[vgacount] = (char)(((pal[counter] & 0xf00) >> 8) << 2); + vgapal[vgacount] = (byte)(((pal[counter] & 0xf00) >> 8) << 2); vgacount++; - vgapal[vgacount] = (char)(((pal[counter] & 0x0f0) >> 4) << 2); + vgapal[vgacount] = (byte)(((pal[counter] & 0x0f0) >> 4) << 2); vgacount++; - vgapal[vgacount] = (char)(((pal[counter] & 0x00f)) << 2); + vgapal[vgacount] = (byte)(((pal[counter] & 0x00f)) << 2); vgacount++; } @@ -733,7 +733,8 @@ static void drawMap(LargeSet RoomsFound, uint16 CurRoom, uint16 CurMsg, uint16 F void processMap(uint16 CurRoom, LargeSet RoomsFound) { uint32 Class, place = 1; uint16 Code, Qualifier, MouseX, MouseY, GadgetID, CurFloor, OldFloor, OldMsg, CurMsg, drawroom, x1, y1, x2, y2; - char *sptr, newcolor[3]; + char *sptr; + byte newcolor[3]; bool drawmap; struct IntuiMessage *Msg; @@ -894,7 +895,7 @@ void processMap(uint16 CurRoom, LargeSet RoomsFound) { } #if !defined(DOSCODE) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } } @@ -935,7 +936,7 @@ void doMap(LargeSet RoomsFound, uint16 CurRoom) { mouseShow(); attachGadgetList(MapGadgetList); #if !defined(DOSCODE) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif processMap(CurRoom, RoomsFound); attachGadgetList(NULL); @@ -948,7 +949,7 @@ void doMap(LargeSet RoomsFound, uint16 CurRoom) { blackAllScreen(); mouseShow(); #if !defined(DOSCODE) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } diff --git a/engines/lab/mouse.cpp b/engines/lab/mouse.cpp index 857a39726e..ff2474ed38 100644 --- a/engines/lab/mouse.cpp +++ b/engines/lab/mouse.cpp @@ -295,7 +295,7 @@ void updateMouse(void) { #if !defined(DOSCODE) if (doUpdateDisplay) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif } @@ -431,7 +431,7 @@ void mouseShowXY(uint16 MouseX, uint16 MouseY) { getBackMouse(); drawMouse(); #if !defined(DOSCODE) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif MouseHidden = false; } @@ -522,7 +522,7 @@ void mouseMove(uint16 x, uint16 y) { drawMouse(); VGARestorePage(); #if !defined(DOSCODE) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif QuitMouseHandler = false; } diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp index 2af9fa05d9..d9f40b4e1d 100644 --- a/engines/lab/processroom.cpp +++ b/engines/lab/processroom.cpp @@ -629,7 +629,7 @@ static void doActions(ActionPtr APtr, CloseDataPtr *LCPtr) { addCurTime(APtr->Param1, 0, &StartSecs, &StartMicros); #if !defined(DOSCODE) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif while (1) { diff --git a/engines/lab/readdiff.cpp b/engines/lab/readdiff.cpp index 2af49e9f43..1ceeb44769 100644 --- a/engines/lab/readdiff.cpp +++ b/engines/lab/readdiff.cpp @@ -110,7 +110,7 @@ void unDiff(byte *NewBuf, byte *OldBuf, byte *DiffData, uint16 bytesperrow, bool } -static char blackbuffer[256 * 3]; +static byte blackbuffer[256 * 3]; /*****************************************************************************/ /* Changes the front screen to black. */ @@ -220,7 +220,7 @@ void diffNextFrame(void) { #if !defined(DOSCODE) if (DispBitMap->Flags & BITMAPF_VIDEO) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif @@ -366,7 +366,7 @@ void diffNextFrame(void) { ungetVGABaseAddr(); if (!didTOF) - g_system->updateScreen(); + WSDL_UpdateScreen(); #endif return; diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index 8275517f47..4e842a1de0 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -1284,10 +1284,9 @@ static void addSaveSlot() { makeThumbnail(info); mouseHide(); - warning("STUB: addSaveSlot()"); - //SDL_IgnoreUpdateDisplay(1); + WSDL_IgnoreUpdateDisplay(1); loadBackPict("P:ModSave", false); - //SDL_IgnoreUpdateDisplay(0); + WSDL_IgnoreUpdateDisplay(0); drawSaveLoad(); mouseShow(); } @@ -1299,10 +1298,9 @@ static void selectSave(int n) { g_CurSaveGameNumber = n; mouseHide(); - warning("STUB: selectSave()"); - //SDL_IgnoreUpdateDisplay(1); + WSDL_IgnoreUpdateDisplay(1); loadBackPict("P:ModSave", false); - //SDL_IgnoreUpdateDisplay(0); + WSDL_IgnoreUpdateDisplay(0); drawSaveLoad(); mouseShow(); } @@ -1312,10 +1310,9 @@ static void selectSaveSet(int n) { g_CurSaveSet = n; mouseHide(); - warning("STUB: selectSaveSet"); - //SDL_IgnoreUpdateDisplay(1); + WSDL_IgnoreUpdateDisplay(1); loadBackPict("P:ModSave", false); - //SDL_IgnoreUpdateDisplay(0); + WSDL_IgnoreUpdateDisplay(0); drawSaveLoad(); mouseShow(); } diff --git a/engines/lab/stddefines.h b/engines/lab/stddefines.h index b7e5fa6dda..cd3156fabd 100644 --- a/engines/lab/stddefines.h +++ b/engines/lab/stddefines.h @@ -38,7 +38,7 @@ namespace Lab { #define IS_MACOSX 1 -#define USE_SWAP 1 +#define USE_NOSWAP 1 #define INCL(BITSET,BIT) ((BITSET) |= (BIT)) diff --git a/engines/lab/vga.cpp b/engines/lab/vga.cpp index 728b15271e..8badc7072f 100644 --- a/engines/lab/vga.cpp +++ b/engines/lab/vga.cpp @@ -32,6 +32,8 @@ #include "lab/stddefines.h"
#include "lab/storage.h"
+#include "graphics/palette.h"
+
namespace Lab {
//static uint16 NotInRefresh = 0;
@@ -41,11 +43,15 @@ uint32 VGAScreenWidth = 320UL, VGAPages = 1UL,
VGABytesPerPage = 65536UL;
-uint32 VGABASEADDRESS = 0xA0000L;
+byte *VGABASEADDRESS = 0;
byte *g_DisplayBuffer = 0;
byte *g_Pixels = 0;
+int g_ScreenWasLocked = 0;
+int g_IgnoreUpdateDisplay = 0;
+int g_LastWaitTOFTicks = 0;
+
/*****************************************************************************/
/* Sets the display mode. */
@@ -58,8 +64,8 @@ void setMode(char mode) { /* Sets up either a low-res or a high-res 256 color screen. */
/*****************************************************************************/
bool createScreen(bool HiRes) {
-// VGABASEADDRESS = (unsigned long)malloc(640 * 480);
- VGABASEADDRESS = 1;
+ //VGABASEADDRESS = (unsigned long)malloc(640 * 480);
+ VGABASEADDRESS = 0;
VGAScreenWidth = 640;
VGAScreenHeight = 480;
VGAPages = 1;
@@ -91,29 +97,37 @@ void VGARestorePage(void) { // does nothing in SDL
}
-void WSDL_ProcessInput() {
+void WSDL_ProcessInput(int state) {
}
void waitTOF() {
int untilOutOfRefresh = 1;
- g_ScreenIsLocked = 0;
-
if (g_ScreenWasLocked || untilOutOfRefresh) {
g_system->copyRectToScreen(g_DisplayBuffer, VGAScreenWidth, 0, 0, VGAScreenWidth, VGAScreenHeight);
g_system->updateScreen();
}
g_ScreenWasLocked = 0;
- WSDL_ProcessInput();
+ WSDL_ProcessInput(0);
- for (uint32 now = g_system->getMillis(); now - g_LastWaitTOFTicks <= 0xF; now = g_system->getMillis() )
+ uint32 now;
+
+ for (now = g_system->getMillis(); now - g_LastWaitTOFTicks <= 0xF; now = g_system->getMillis() )
g_system->delayMillis(g_LastWaitTOFTicks - now + 17);
g_LastWaitTOFTicks = now;
}
-static char curvgapal[256 * 3];
+void WSDL_SetColors(byte *buf, uint16 first, uint16 numreg, uint16 slow) {
+
+ g_system->getPaletteManager()->setPalette(buf, first, numreg);
+
+ if (slow)
+ waitTOF();
+}
+
+static byte curvgapal[256 * 3];
/*****************************************************************************/
/* Writes any number of the 256 color registers. */
@@ -126,57 +140,41 @@ static char curvgapal[256 * 3]; /* The length of the buffer is 3 times the number of registers */
/* selected. */
/*****************************************************************************/
-void writeColorRegs(char *buf,
- uint16 first,
- uint16 numreg) {
- warning("STUB: writeColorRegs");
- //WSDL_SetColors(buf, first, numreg, 0);
+void writeColorRegs(byte *buf, uint16 first, uint16 numreg) {
+ WSDL_SetColors(buf, first, numreg, 0);
memcpy(&(curvgapal[first * 3]), buf, numreg * 3);
}
-
-
-
-void writeColorRegsSmooth(char *buf,
- uint16 first,
- uint16 numreg) {
- warning("STUB: writeColorRegsSmooth");
- //WSDL_SetColors(buf, first, numreg, 1);
+void writeColorRegsSmooth(byte *buf, uint16 first, uint16 numreg) {
+ WSDL_SetColors(buf, first, numreg, 1);
memcpy(&(curvgapal[first * 3]), buf, numreg * 3);
}
-
-
-
/*****************************************************************************/
/* Sets one of the 256 (0..255) color registers. buf is a char pointer, */
/* the first character in the string is the red value, then green, then */
/* blue. Each color value is a 6 bit value. */
/*****************************************************************************/
-void writeColorReg(char *buf,
- uint16 regnum) {
+void writeColorReg(byte *buf, uint16 regnum) {
writeColorRegs(buf, regnum, 1);
}
-
-
-
-
-void VGASetPal(void *cmap,
- uint16 numcolors) {
+void VGASetPal(void *cmap, uint16 numcolors) {
if (memcmp(cmap, curvgapal, numcolors * 3) != 0)
- writeColorRegs((char *) cmap, 0, numcolors);
+ writeColorRegs((byte *)cmap, 0, numcolors);
}
byte *WSDL_LockVideo() {
g_ScreenWasLocked = 1;
- g_ScreenIsLocked = 1;
return g_DisplayBuffer;
}
void WSDL_UnlockVideo() {
- g_ScreenIsLocked = 0;
+}
+
+void WSDL_IgnoreUpdateDisplay(int state) {
+ g_IgnoreUpdateDisplay = state;
}
void WSDL_UpdateScreen() {
@@ -195,14 +193,14 @@ void WSDL_UpdateScreen() { /* Returns the base address of the current VGA display. */
/*****************************************************************************/
byte *getVGABaseAddr(void) {
- if (VGABASEADDRESS != 1)
- return (byte *)VGABASEADDRESS;
+ if (VGABASEADDRESS)
+ return VGABASEADDRESS;
return WSDL_LockVideo();
}
void ungetVGABaseAddr() {
- if (VGABASEADDRESS == 1)
+ if (!VGABASEADDRESS)
WSDL_UnlockVideo();
}
@@ -213,15 +211,10 @@ void getMode(uint16 *Mode) { // Only one mode in SDL.
}
-
-
-
/*****************************************************************************/
/* Draws an image to the screen. */
/*****************************************************************************/
-void drawImage(struct Image *Im,
- uint16 x,
- uint16 y) {
+void drawImage(struct Image *Im, uint16 x, uint16 y) {
#if !defined(DOSCODE)
int sx, sy, dx, dy, w, h;
@@ -337,9 +330,7 @@ void drawImage(struct Image *Im, /*****************************************************************************/
/* Draws an image to the screen. */
/*****************************************************************************/
-void drawMaskImage(struct Image *Im,
- uint16 x,
- uint16 y) {
+void drawMaskImage(struct Image *Im, uint16 x, uint16 y) {
#if !defined(DOSCODE)
int sx, sy, dx, dy, w, h;
@@ -469,9 +460,7 @@ void drawMaskImage(struct Image *Im, /*****************************************************************************/
/* Reads an image from the screen. */
/*****************************************************************************/
-void readScreenImage(struct Image *Im,
- uint16 x,
- uint16 y) {
+void readScreenImage(struct Image *Im, uint16 x, uint16 y) {
#if !defined(DOSCODE)
int sx, sy, dx, dy, w, h;
@@ -588,14 +577,8 @@ void readScreenImage(struct Image *Im, /* Blits a piece of one image to another. */
/* NOTE: for our purposes, assumes that ImDest is to be in VGA memory. */
/*****************************************************************************/
-void bltBitMap(struct Image *ImSource,
- uint16 xs,
- uint16 ys,
- struct Image *ImDest,
- uint16 xd,
- uint16 yd,
- uint16 width,
- uint16 height) {
+void bltBitMap(Image *ImSource, uint16 xs, uint16 ys, Image *ImDest,
+ uint16 xd, uint16 yd, uint16 width, uint16 height) {
#if !defined(DOSCODE)
// I think the old code assumed that the source image data was valid for the given box.
// I will proceed on that assumption.
@@ -727,11 +710,7 @@ byte *TempScrollData; /* The TempScrollData variable must be initialized to some memory, or this */
/* function will fail. */
/*****************************************************************************/
-void scrollDisplayX(int16 dx,
- uint16 x1,
- uint16 y1,
- uint16 x2,
- uint16 y2) {
+void scrollDisplayX(int16 dx, uint16 x1, uint16 y1, uint16 x2, uint16 y2) {
struct Image Im;
uint16 temp;
@@ -777,11 +756,7 @@ void scrollDisplayX(int16 dx, /*****************************************************************************/
/* Scrolls the display in the y direction by blitting. */
/*****************************************************************************/
-void scrollDisplayY(int16 dy,
- uint16 x1,
- uint16 y1,
- uint16 x2,
- uint16 y2) {
+void scrollDisplayY(int16 dy, uint16 x1, uint16 y1, uint16 x2, uint16 y2) {
struct Image Im;
uint16 temp;
@@ -837,10 +812,7 @@ void setAPen(uint16 pennum) { /*****************************************************************************/
/* Fills in a rectangle. */
/*****************************************************************************/
-void rectFill(uint16 x1,
- uint16 y1,
- uint16 x2,
- uint16 y2) {
+void rectFill(uint16 x1, uint16 y1, uint16 x2, uint16 y2) {
#if !defined(DOSCODE)
int dx, dy, w, h;
@@ -952,9 +924,7 @@ void rectFill(uint16 x1, /*****************************************************************************/
/* Draws a horizontal line. */
/*****************************************************************************/
-void drawVLine(uint16 x,
- uint16 y1,
- uint16 y2) {
+void drawVLine(uint16 x, uint16 y1, uint16 y2) {
rectFill(x, y1, x, y2);
}
@@ -964,9 +934,7 @@ void drawVLine(uint16 x, /*****************************************************************************/
/* Draws a vertical line. */
/*****************************************************************************/
-void drawHLine(uint16 x1,
- uint16 y,
- uint16 x2) {
+void drawHLine(uint16 x1, uint16 y, uint16 x2) {
rectFill(x1, y, x2, y);
}
@@ -976,11 +944,7 @@ void drawHLine(uint16 x1, /*****************************************************************************/
/* Ghoasts a region on the screen using the desired pen color. */
/*****************************************************************************/
-void ghoastRect(uint16 pencolor,
- uint16 x1,
- uint16 y1,
- uint16 x2,
- uint16 y2) {
+void ghoastRect(uint16 pencolor, uint16 x1, uint16 y1, uint16 x2, uint16 y2) {
#if !defined(DOSCODE)
int dx, dy, w, h;
diff --git a/engines/lab/vga.h b/engines/lab/vga.h index 6ed7347dcf..fc5f981531 100644 --- a/engines/lab/vga.h +++ b/engines/lab/vga.h @@ -63,11 +63,11 @@ byte *getVGABaseAddr(void); void ungetVGABaseAddr(); #endif -void writeColorReg(char *buf, uint16 regnum); +void writeColorReg(byte *buf, uint16 regnum); -void writeColorRegs(char *buf, uint16 first, uint16 numreg); +void writeColorRegs(byte *buf, uint16 first, uint16 numreg); -void writeColorRegsSmooth(char *buf, uint16 first, uint16 numreg); +void writeColorRegsSmooth(byte *buf, uint16 first, uint16 numreg); void VGASetPal(void *cmap, uint16 numcolors); @@ -97,6 +97,8 @@ void ghoastRect(uint16 pencolor, uint16 x1, uint16 y1, uint16 x2, uint16 y2); void WSDL_UpdateScreen(); +void WSDL_IgnoreUpdateDisplay(int state); + } // End of namespace Lab #endif /* LAB_VGA_H */ |