diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lab/graphics.cpp | 8 | ||||
-rw-r--r-- | engines/lab/special.cpp | 6 | ||||
-rw-r--r-- | engines/lab/vga.cpp | 48 |
3 files changed, 31 insertions, 31 deletions
diff --git a/engines/lab/graphics.cpp b/engines/lab/graphics.cpp index 40b9aa1031..62963137bb 100644 --- a/engines/lab/graphics.cpp +++ b/engines/lab/graphics.cpp @@ -290,7 +290,7 @@ uint32 flowText(void *font, /* the TextAttr pointer */ } -extern byte *VGABASEADDRESS; +extern byte *_currentDsplayBuffer; /******************************************************************************/ @@ -307,15 +307,15 @@ uint32 flowTextToMem(Image *DestIm, void *font, /* the TextAttr pointer */ uint16 x1, /* Cords */ uint16 y1, uint16 x2, uint16 y2, const char *str) { /* The text itself */ uint32 res, vgabyte = g_lab->_screenBytesPerPage; - byte *tmp = VGABASEADDRESS; + byte *tmp = _currentDsplayBuffer; - VGABASEADDRESS = DestIm->ImageData; + _currentDsplayBuffer = DestIm->ImageData; g_lab->_screenBytesPerPage = (uint32) DestIm->Width * (int32) DestIm->Height; res = flowText(font, spacing, pencolor, backpen, fillback, centerh, centerv, output, x1, y1, x2, y2, str); g_lab->_screenBytesPerPage = vgabyte; - VGABASEADDRESS = tmp; + _currentDsplayBuffer = tmp; return res; } diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index 41d938bdb8..0104e3ee3f 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -89,7 +89,7 @@ extern uint16 *FadePalette; extern bool nopalchange, DoBlack, IsHiRes; extern BitMap *DispBitMap, *DrawBitMap; extern char diffcmap[3 * 256]; -extern byte *TempScrollData; +extern byte *_tempScrollData; extern CloseDataPtr CPtr; extern InventoryData *Inventory; extern uint16 RoomNum, Direction; @@ -164,7 +164,7 @@ void showCombination(const char *filename) { for (CurBit = 0; CurBit < 10; CurBit++) readImage(buffer, &(Images[CurBit])); - allocFile((void **)&TempScrollData, Images[0]->Width * Images[0]->Height * 2L, "tempdata"); + allocFile((void **)&_tempScrollData, Images[0]->Width * Images[0]->Height * 2L, "tempdata"); doCombination(); @@ -315,7 +315,7 @@ void showTile(const char *filename, bool showsolution) { for (CurBit = start; CurBit < 16; CurBit++) readImage(buffer, &(Tiles[CurBit])); - allocFile((void **)&TempScrollData, Tiles[1]->Width * Tiles[1]->Height * 2L, "tempdata"); + allocFile((void **)&_tempScrollData, Tiles[1]->Width * Tiles[1]->Height * 2L, "tempdata"); doTile(showsolution); diff --git a/engines/lab/vga.cpp b/engines/lab/vga.cpp index cf4ccc77f7..54cb50756d 100644 --- a/engines/lab/vga.cpp +++ b/engines/lab/vga.cpp @@ -42,19 +42,19 @@ namespace Lab { static byte _curvgapal[256 * 3]; static unsigned char _curapen = 0; -byte *VGABASEADDRESS = 0; +byte *_currentDsplayBuffer = 0; byte *_displayBuffer = 0; -int g_LastWaitTOFTicks = 0; +int _lastWaitTOFTicks = 0; uint32 _mouseX = 0; uint32 _mouseY = 0; -uint16 g_NextKeyIn = 0; -uint16 g_KeyBuf[64]; -uint16 g_NextKeyOut = 0; +uint16 _nextKeyIn = 0; +uint16 _keyBuf[64]; +uint16 _nextKeyOut = 0; bool _mouseAtEdge = false; -byte *TempScrollData; +byte *_tempScrollData; /*****************************************************************************/ /* Sets up either a low-res or a high-res 256 color screen. */ @@ -85,10 +85,10 @@ uint16 WSDL_GetNextChar() { uint16 c = 0; WSDL_ProcessInput(0); - if (g_NextKeyIn != g_NextKeyOut) { - c = g_KeyBuf[g_NextKeyOut]; - g_NextKeyOut = ((((unsigned int)((g_NextKeyOut + 1) >> 31) >> 26) + (byte)g_NextKeyOut + 1) & 0x3F) - - ((unsigned int)((g_NextKeyOut + 1) >> 31) >> 26); + if (_nextKeyIn != _nextKeyOut) { + c = _keyBuf[_nextKeyOut]; + _nextKeyOut = ((((unsigned int)((_nextKeyOut + 1) >> 31) >> 26) + (byte)_nextKeyOut + 1) & 0x3F) + - ((unsigned int)((_nextKeyOut + 1) >> 31) >> 26); } return c; @@ -96,7 +96,7 @@ uint16 WSDL_GetNextChar() { bool WSDL_HasNextChar() { WSDL_ProcessInput(0); - return g_NextKeyIn != g_NextKeyOut; + return _nextKeyIn != _nextKeyOut; } void WSDL_ProcessInput(bool can_delay) { @@ -162,11 +162,11 @@ void WSDL_ProcessInput(bool can_delay) { break; default: - n = ((((unsigned int)((g_NextKeyIn + 1) >> 31) >> 26) + (byte)g_NextKeyIn + 1) & 0x3F) - - ((unsigned int)((g_NextKeyIn + 1) >> 31) >> 26); - if (n != g_NextKeyOut) { - g_KeyBuf[g_NextKeyIn] = event.kbd.keycode; - g_NextKeyIn = n; + n = ((((unsigned int)((_nextKeyIn + 1) >> 31) >> 26) + (byte)_nextKeyIn + 1) & 0x3F) + - ((unsigned int)((_nextKeyIn + 1) >> 31) >> 26); + if (n != _nextKeyOut) { + _keyBuf[_nextKeyIn] = event.kbd.keycode; + _nextKeyIn = n; } } break; @@ -201,10 +201,10 @@ void waitTOF() { uint32 now; - for (now = g_system->getMillis(); now - g_LastWaitTOFTicks <= 0xF; now = g_system->getMillis() ) - g_system->delayMillis(g_LastWaitTOFTicks - now + 17); + for (now = g_system->getMillis(); now - _lastWaitTOFTicks <= 0xF; now = g_system->getMillis() ) + g_system->delayMillis(_lastWaitTOFTicks - now + 17); - g_LastWaitTOFTicks = now; + _lastWaitTOFTicks = now; } void WSDL_SetColors(byte *buf, uint16 first, uint16 numreg, uint16 slow) { @@ -266,8 +266,8 @@ void WSDL_UpdateScreen() { /* Returns the base address of the current VGA display. */ /*****************************************************************************/ byte *getVGABaseAddr() { - if (VGABASEADDRESS) - return VGABASEADDRESS; + if (_currentDsplayBuffer) + return _currentDsplayBuffer; return _displayBuffer; } @@ -458,14 +458,14 @@ void bltBitMap(Image *ImSource, uint16 xs, uint16 ys, Image *ImDest, /*****************************************************************************/ /* Scrolls the display in the x direction by blitting. */ -/* The TempScrollData variable must be initialized to some memory, or this */ +/* 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) { Image Im; uint16 temp; - Im.ImageData = TempScrollData; + Im.ImageData = _tempScrollData; if (x1 > x2) { temp = x2; @@ -507,7 +507,7 @@ void scrollDisplayY(int16 dy, uint16 x1, uint16 y1, uint16 x2, uint16 y2) { Image Im; uint16 temp; - Im.ImageData = TempScrollData; + Im.ImageData = _tempScrollData; if (x1 > x2) { temp = x2; |