LAB: Renames in vga.cpp
This commit is contained in:
parent
8dbdc70de4
commit
6d4b71e2ce
12 changed files with 78 additions and 78 deletions
|
@ -516,7 +516,7 @@ bool LabEngine::doUse(uint16 CurInv) {
|
||||||
CurFileName = " ";
|
CurFileName = " ";
|
||||||
CPtr = NULL;
|
CPtr = NULL;
|
||||||
doMap(_roomNum);
|
doMap(_roomNum);
|
||||||
VGASetPal(initcolors, 8);
|
setPalette(initcolors, 8);
|
||||||
drawMessage(NULL);
|
drawMessage(NULL);
|
||||||
drawPanel();
|
drawPanel();
|
||||||
} else if (CurInv == JOURNALNUM) { /* LAB: Labyrinth specific */
|
} else if (CurInv == JOURNALNUM) { /* LAB: Labyrinth specific */
|
||||||
|
@ -623,7 +623,7 @@ void LabEngine::mainGameLoop() {
|
||||||
|
|
||||||
bool forceDraw = false, GotMessage = true;
|
bool forceDraw = false, GotMessage = true;
|
||||||
|
|
||||||
VGASetPal(initcolors, 8);
|
setPalette(initcolors, 8);
|
||||||
|
|
||||||
CPtr = NULL;
|
CPtr = NULL;
|
||||||
_roomNum = 1;
|
_roomNum = 1;
|
||||||
|
@ -648,7 +648,7 @@ void LabEngine::mainGameLoop() {
|
||||||
/* Set up initial picture. */
|
/* Set up initial picture. */
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
WSDL_ProcessInput(1);
|
processInput(true);
|
||||||
|
|
||||||
if (GotMessage) {
|
if (GotMessage) {
|
||||||
if (QuitLab || g_engine->shouldQuit()) {
|
if (QuitLab || g_engine->shouldQuit()) {
|
||||||
|
@ -663,7 +663,7 @@ void LabEngine::mainGameLoop() {
|
||||||
CPtr = NULL;
|
CPtr = NULL;
|
||||||
|
|
||||||
mayShowCrumbIndicator();
|
mayShowCrumbIndicator();
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sets the current picture properly on the screen */
|
/* Sets the current picture properly on the screen */
|
||||||
|
@ -699,7 +699,7 @@ void LabEngine::mainGameLoop() {
|
||||||
forceDraw = false;
|
forceDraw = false;
|
||||||
|
|
||||||
mayShowCrumbIndicator();
|
mayShowCrumbIndicator();
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
|
|
||||||
if (!_followingCrumbs)
|
if (!_followingCrumbs)
|
||||||
eatMessages();
|
eatMessages();
|
||||||
|
@ -708,7 +708,7 @@ void LabEngine::mainGameLoop() {
|
||||||
if (forceDraw) {
|
if (forceDraw) {
|
||||||
drawRoomMessage(curInv, CPtr);
|
drawRoomMessage(curInv, CPtr);
|
||||||
forceDraw = false;
|
forceDraw = false;
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -736,14 +736,14 @@ void LabEngine::mainGameLoop() {
|
||||||
|
|
||||||
GotMessage = true;
|
GotMessage = true;
|
||||||
mayShowCrumbIndicator();
|
mayShowCrumbIndicator();
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
if (!from_crumbs(GADGETUP, code, 0, WSDL_GetMousePos(), curInv, curMsg, forceDraw, code, actionMode))
|
if (!from_crumbs(GADGETUP, code, 0, WSDL_GetMousePos(), curInv, curMsg, forceDraw, code, actionMode))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mayShowCrumbIndicator();
|
mayShowCrumbIndicator();
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
} else {
|
} else {
|
||||||
GotMessage = true;
|
GotMessage = true;
|
||||||
|
|
||||||
|
@ -803,7 +803,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
|
||||||
_numCrumbs = 0;
|
_numCrumbs = 0;
|
||||||
_droppingCrumbs = true;
|
_droppingCrumbs = true;
|
||||||
mayShowCrumbIndicator();
|
mayShowCrumbIndicator();
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
} else if (code == 'f' || code == 'F' ||
|
} else if (code == 'f' || code == 'F' ||
|
||||||
code == 'r' || code == 'R') { /* Follow bread crumbs */
|
code == 'r' || code == 'R') { /* Follow bread crumbs */
|
||||||
if (_droppingCrumbs) {
|
if (_droppingCrumbs) {
|
||||||
|
@ -824,7 +824,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
|
||||||
interfaceOn(); /* Sets the correct gadget list */
|
interfaceOn(); /* Sets the correct gadget list */
|
||||||
drawPanel();
|
drawPanel();
|
||||||
drawRoomMessage(curInv, CPtr);
|
drawRoomMessage(curInv, CPtr);
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_breadCrumbs[0]._roomNum = 0;
|
_breadCrumbs[0]._roomNum = 0;
|
||||||
|
@ -832,7 +832,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
|
||||||
|
|
||||||
// Need to hide indicator!!!!
|
// Need to hide indicator!!!!
|
||||||
mayShowCrumbIndicatorOff();
|
mayShowCrumbIndicatorOff();
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ((code == 315) || (code == 'x') || (code == 'X')
|
} else if ((code == 315) || (code == 'x') || (code == 'X')
|
||||||
|
@ -889,7 +889,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
|
||||||
DoNotDrawMessage = false;
|
DoNotDrawMessage = false;
|
||||||
drawPanel();
|
drawPanel();
|
||||||
drawRoomMessage(curInv, CPtr);
|
drawRoomMessage(curInv, CPtr);
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
}
|
}
|
||||||
} else if ((msgClass == GADGETUP) && !Alternate) {
|
} else if ((msgClass == GADGETUP) && !Alternate) {
|
||||||
if (gadgetId <= 5) {
|
if (gadgetId <= 5) {
|
||||||
|
@ -900,7 +900,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
|
||||||
HCPtr = NULL;
|
HCPtr = NULL;
|
||||||
CPtr = NULL;
|
CPtr = NULL;
|
||||||
mayShowCrumbIndicator();
|
mayShowCrumbIndicator();
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
} else if (gadgetId == 5) {
|
} else if (gadgetId == 5) {
|
||||||
eatMessages();
|
eatMessages();
|
||||||
|
|
||||||
|
@ -921,7 +921,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
|
||||||
drawRoomMessage(curInv, CPtr);
|
drawRoomMessage(curInv, CPtr);
|
||||||
|
|
||||||
mayShowCrumbIndicator();
|
mayShowCrumbIndicator();
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
} else {
|
} else {
|
||||||
Old = actionMode;
|
Old = actionMode;
|
||||||
actionMode = gadgetId;
|
actionMode = gadgetId;
|
||||||
|
@ -942,13 +942,13 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
|
||||||
else if (gadgetId == 4)
|
else if (gadgetId == 4)
|
||||||
drawStaticMessage(kTextLookWhat);
|
drawStaticMessage(kTextLookWhat);
|
||||||
|
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
}
|
}
|
||||||
} else if (gadgetId == 9) {
|
} else if (gadgetId == 9) {
|
||||||
doUse(MAPNUM);
|
doUse(MAPNUM);
|
||||||
|
|
||||||
mayShowCrumbIndicator();
|
mayShowCrumbIndicator();
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
} else if (gadgetId >= 6) { /* Arrow Gadgets */
|
} else if (gadgetId >= 6) { /* Arrow Gadgets */
|
||||||
CPtr = NULL;
|
CPtr = NULL;
|
||||||
HCPtr = NULL;
|
HCPtr = NULL;
|
||||||
|
@ -971,7 +971,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
|
||||||
forceDraw = true;
|
forceDraw = true;
|
||||||
|
|
||||||
mayShowCrumbIndicator();
|
mayShowCrumbIndicator();
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
} else if (gadgetId == 7) {
|
} else if (gadgetId == 7) {
|
||||||
OldRoomNum = _roomNum;
|
OldRoomNum = _roomNum;
|
||||||
|
|
||||||
|
@ -1035,7 +1035,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
|
||||||
}
|
}
|
||||||
|
|
||||||
mayShowCrumbIndicator();
|
mayShowCrumbIndicator();
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ((msgClass == GADGETUP) && Alternate) {
|
} else if ((msgClass == GADGETUP) && Alternate) {
|
||||||
|
@ -1052,7 +1052,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
|
||||||
drawPanel();
|
drawPanel();
|
||||||
drawRoomMessage(curInv, CPtr);
|
drawRoomMessage(curInv, CPtr);
|
||||||
|
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
gadgetId--;
|
gadgetId--;
|
||||||
|
@ -1076,13 +1076,13 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
|
||||||
|
|
||||||
if (doit) {
|
if (doit) {
|
||||||
drawMessage("Disk operation failed.");
|
drawMessage("Disk operation failed.");
|
||||||
VGASetPal(initcolors, 8);
|
setPalette(initcolors, 8);
|
||||||
|
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
|
|
||||||
g_system->delayMillis(1000);
|
g_system->delayMillis(1000);
|
||||||
} else {
|
} else {
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
}
|
}
|
||||||
} else if (gadgetId == 1) {
|
} else if (gadgetId == 1) {
|
||||||
if (!doUse(curInv)) {
|
if (!doUse(curInv)) {
|
||||||
|
@ -1095,7 +1095,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
|
||||||
drawStaticMessage(kTextUseOnWhat);
|
drawStaticMessage(kTextUseOnWhat);
|
||||||
MainDisplay = true;
|
MainDisplay = true;
|
||||||
|
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
}
|
}
|
||||||
} else if (gadgetId == 2) {
|
} else if (gadgetId == 2) {
|
||||||
MainDisplay = !MainDisplay;
|
MainDisplay = !MainDisplay;
|
||||||
|
@ -1111,27 +1111,27 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
|
||||||
Inventory[curInv].BInvName)
|
Inventory[curInv].BInvName)
|
||||||
Test = getInvName(curInv);
|
Test = getInvName(curInv);
|
||||||
|
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
} else if (gadgetId == 3) { /* Left gadget */
|
} else if (gadgetId == 3) { /* Left gadget */
|
||||||
decIncInv(&curInv, true);
|
decIncInv(&curInv, true);
|
||||||
LastInv = curInv;
|
LastInv = curInv;
|
||||||
DoNotDrawMessage = false;
|
DoNotDrawMessage = false;
|
||||||
drawRoomMessage(curInv, CPtr);
|
drawRoomMessage(curInv, CPtr);
|
||||||
|
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
} else if (gadgetId == 4) { /* Right gadget */
|
} else if (gadgetId == 4) { /* Right gadget */
|
||||||
decIncInv(&curInv, false);
|
decIncInv(&curInv, false);
|
||||||
LastInv = curInv;
|
LastInv = curInv;
|
||||||
DoNotDrawMessage = false;
|
DoNotDrawMessage = false;
|
||||||
drawRoomMessage(curInv, CPtr);
|
drawRoomMessage(curInv, CPtr);
|
||||||
|
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
} else if (gadgetId == 5) { /* bread crumbs */
|
} else if (gadgetId == 5) { /* bread crumbs */
|
||||||
_breadCrumbs[0]._roomNum = 0;
|
_breadCrumbs[0]._roomNum = 0;
|
||||||
_numCrumbs = 0;
|
_numCrumbs = 0;
|
||||||
_droppingCrumbs = true;
|
_droppingCrumbs = true;
|
||||||
mayShowCrumbIndicator();
|
mayShowCrumbIndicator();
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
} else if (gadgetId == 6) { /* follow crumbs */
|
} else if (gadgetId == 6) { /* follow crumbs */
|
||||||
if (_droppingCrumbs) {
|
if (_droppingCrumbs) {
|
||||||
if (_numCrumbs > 0) {
|
if (_numCrumbs > 0) {
|
||||||
|
@ -1150,14 +1150,14 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
|
||||||
interfaceOn(); /* Sets the correct gadget list */
|
interfaceOn(); /* Sets the correct gadget list */
|
||||||
drawPanel();
|
drawPanel();
|
||||||
drawRoomMessage(curInv, CPtr);
|
drawRoomMessage(curInv, CPtr);
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
} else {
|
} else {
|
||||||
_breadCrumbs[0]._roomNum = 0;
|
_breadCrumbs[0]._roomNum = 0;
|
||||||
_droppingCrumbs = false;
|
_droppingCrumbs = false;
|
||||||
|
|
||||||
// Need to hide indicator!!!!
|
// Need to hide indicator!!!!
|
||||||
mayShowCrumbIndicatorOff();
|
mayShowCrumbIndicatorOff();
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1230,7 +1230,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
|
||||||
}
|
}
|
||||||
|
|
||||||
mayShowCrumbIndicator();
|
mayShowCrumbIndicator();
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
} else if (msgClass == DELTAMOVE) {
|
} else if (msgClass == DELTAMOVE) {
|
||||||
VPtr = getViewData(_roomNum, Direction);
|
VPtr = getViewData(_roomNum, Direction);
|
||||||
OldCPtr = VPtr->closeUps;
|
OldCPtr = VPtr->closeUps;
|
||||||
|
@ -1278,7 +1278,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
|
||||||
drawRoomMessage(curInv, CPtr);
|
drawRoomMessage(curInv, CPtr);
|
||||||
|
|
||||||
mayShowCrumbIndicator();
|
mayShowCrumbIndicator();
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -465,7 +465,7 @@ void LabEngine::doScrollBlack() {
|
||||||
g_lab->setAPen(0);
|
g_lab->setAPen(0);
|
||||||
g_lab->rectFill(0, nheight, width - 1, nheight + by - 1);
|
g_lab->rectFill(0, nheight, width - 1, nheight + by - 1);
|
||||||
|
|
||||||
g_lab->WSDL_UpdateScreen();
|
g_lab->screenUpdate();
|
||||||
|
|
||||||
if (!_isHiRes) {
|
if (!_isHiRes) {
|
||||||
if (nheight <= (height / 8))
|
if (nheight <= (height / 8))
|
||||||
|
@ -530,7 +530,7 @@ void LabEngine::doScrollWipe(char *filename) {
|
||||||
|
|
||||||
IsBM = true;
|
IsBM = true;
|
||||||
readPict(filename, true);
|
readPict(filename, true);
|
||||||
g_lab->VGASetPal(diffcmap, 256);
|
g_lab->setPalette(diffcmap, 256);
|
||||||
IsBM = false;
|
IsBM = false;
|
||||||
mem = RawDiffBM.Planes[0];
|
mem = RawDiffBM.Planes[0];
|
||||||
|
|
||||||
|
@ -552,7 +552,7 @@ void LabEngine::doScrollWipe(char *filename) {
|
||||||
|
|
||||||
copyPage(width, height, nheight, startline, mem);
|
copyPage(width, height, nheight, startline, mem);
|
||||||
|
|
||||||
g_lab->WSDL_UpdateScreen();
|
g_lab->screenUpdate();
|
||||||
|
|
||||||
if (!nheight)
|
if (!nheight)
|
||||||
startline += by;
|
startline += by;
|
||||||
|
@ -601,7 +601,7 @@ void LabEngine::doScrollBounce() {
|
||||||
startline -= newby[i];
|
startline -= newby[i];
|
||||||
copyPage(width, height, 0, startline, mem);
|
copyPage(width, height, 0, startline, mem);
|
||||||
|
|
||||||
g_lab->WSDL_UpdateScreen();
|
g_lab->screenUpdate();
|
||||||
g_lab->waitTOF();
|
g_lab->waitTOF();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -610,7 +610,7 @@ void LabEngine::doScrollBounce() {
|
||||||
startline += newby1[i - 1];
|
startline += newby1[i - 1];
|
||||||
copyPage(width, height, 0, startline, mem);
|
copyPage(width, height, 0, startline, mem);
|
||||||
|
|
||||||
g_lab->WSDL_UpdateScreen();
|
g_lab->screenUpdate();
|
||||||
g_lab->waitTOF();
|
g_lab->waitTOF();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -675,7 +675,7 @@ void LabEngine::doTransWipe(CloseDataPtr *CPtr, char *filename) {
|
||||||
CurFileName = getPictName(CPtr);
|
CurFileName = getPictName(CPtr);
|
||||||
|
|
||||||
byte *BitMapMem = readPictToMem(CurFileName, g_lab->_screenWidth, LastY + 5);
|
byte *BitMapMem = readPictToMem(CurFileName, g_lab->_screenWidth, LastY + 5);
|
||||||
g_lab->VGASetPal(diffcmap, 256);
|
g_lab->setPalette(diffcmap, 256);
|
||||||
|
|
||||||
if (BitMapMem) {
|
if (BitMapMem) {
|
||||||
ImSource.Width = g_lab->_screenWidth;
|
ImSource.Width = g_lab->_screenWidth;
|
||||||
|
|
|
@ -155,8 +155,8 @@ Gadget *LabEngine::checkNumGadgetHit(Gadget *gadlist, uint16 key) {
|
||||||
/* Checks whether or not a key has been pressed. */
|
/* Checks whether or not a key has been pressed. */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
static bool keyPress(uint16 *KeyCode) {
|
static bool keyPress(uint16 *KeyCode) {
|
||||||
if (g_lab->WSDL_HasNextChar()) {
|
if (g_lab->haveNextChar()) {
|
||||||
*KeyCode = g_lab->WSDL_GetNextChar();
|
*KeyCode = g_lab->getNextChar();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -400,7 +400,7 @@ void Intro::introSequence() {
|
||||||
|
|
||||||
g_lab->_music->updateMusic();
|
g_lab->_music->updateMusic();
|
||||||
g_lab->waitTOF();
|
g_lab->waitTOF();
|
||||||
g_lab->VGASetPal(diffcmap, 256);
|
g_lab->setPalette(diffcmap, 256);
|
||||||
g_lab-> waitTOF();
|
g_lab-> waitTOF();
|
||||||
g_lab->waitTOF();
|
g_lab->waitTOF();
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,19 +139,19 @@ public:
|
||||||
void writeColorRegs(byte *buf, uint16 first, uint16 numreg);
|
void writeColorRegs(byte *buf, uint16 first, uint16 numreg);
|
||||||
byte *getVGABaseAddr();
|
byte *getVGABaseAddr();
|
||||||
void readScreenImage(Image *Im, uint16 x, uint16 y);
|
void readScreenImage(Image *Im, uint16 x, uint16 y);
|
||||||
void WSDL_UpdateScreen();
|
void screenUpdate();
|
||||||
void rectFill(uint16 x1, uint16 y1, uint16 x2, uint16 y2);
|
void rectFill(uint16 x1, uint16 y1, uint16 x2, uint16 y2);
|
||||||
void scrollDisplayX(int16 dx, 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 scrollDisplayY(int16 dy, uint16 x1, uint16 y1, uint16 x2, uint16 y2);
|
||||||
void ghoastRect(uint16 pencolor, uint16 x1, uint16 y1, uint16 x2, uint16 y2);
|
void ghoastRect(uint16 pencolor, uint16 x1, uint16 y1, uint16 x2, uint16 y2);
|
||||||
void bltBitMap(Image *ImSource, uint16 xs, uint16 ys, 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);
|
||||||
void VGASetPal(void *cmap, uint16 numcolors);
|
void setPalette(void *cmap, uint16 numcolors);
|
||||||
void drawHLine(uint16 x, uint16 y1, uint16 y2);
|
void drawHLine(uint16 x, uint16 y1, uint16 y2);
|
||||||
void drawVLine(uint16 x1, uint16 y, uint16 x2);
|
void drawVLine(uint16 x1, uint16 y, uint16 x2);
|
||||||
void drawImage(Image *Im, uint16 x, uint16 y);
|
void drawImage(Image *Im, uint16 x, uint16 y);
|
||||||
bool WSDL_HasNextChar();
|
bool haveNextChar();
|
||||||
uint16 WSDL_GetNextChar();
|
uint16 getNextChar();
|
||||||
void WSDL_ProcessInput(bool can_delay);
|
void processInput(bool can_delay = false);
|
||||||
void writeColorReg(byte *buf, uint16 regnum);
|
void writeColorReg(byte *buf, uint16 regnum);
|
||||||
void writeColorRegsSmooth(byte *buf, uint16 first, uint16 numreg);
|
void writeColorRegsSmooth(byte *buf, uint16 first, uint16 numreg);
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ private:
|
||||||
void drawMaskImage(Image *Im, uint16 x, uint16 y);
|
void drawMaskImage(Image *Im, uint16 x, uint16 y);
|
||||||
Common::Point WSDL_GetMousePos();
|
Common::Point WSDL_GetMousePos();
|
||||||
void changeVolume(int delta);
|
void changeVolume(int delta);
|
||||||
void WSDL_SetColors(byte *buf, uint16 first, uint16 numreg, uint16 slow);
|
void applyPalette(byte *buf, uint16 first, uint16 numreg, uint16 slow);
|
||||||
|
|
||||||
// engine.cpp
|
// engine.cpp
|
||||||
bool setUpScreens();
|
bool setUpScreens();
|
||||||
|
|
|
@ -820,7 +820,7 @@ void LabEngine::processMap(uint16 CurRoom) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -848,7 +848,7 @@ void LabEngine::doMap(uint16 CurRoom) {
|
||||||
drawMap(CurRoom, CurRoom, Maps[CurRoom].PageNumber, false, true);
|
drawMap(CurRoom, CurRoom, Maps[CurRoom].PageNumber, false, true);
|
||||||
_event->mouseShow();
|
_event->mouseShow();
|
||||||
_event->attachGadgetList(MapGadgetList);
|
_event->attachGadgetList(MapGadgetList);
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
processMap(CurRoom);
|
processMap(CurRoom);
|
||||||
_event->attachGadgetList(NULL);
|
_event->attachGadgetList(NULL);
|
||||||
fade(false, 0);
|
fade(false, 0);
|
||||||
|
@ -859,7 +859,7 @@ void LabEngine::doMap(uint16 CurRoom) {
|
||||||
freeMapData();
|
freeMapData();
|
||||||
blackAllScreen();
|
blackAllScreen();
|
||||||
_event->mouseShow();
|
_event->mouseShow();
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // End of namespace Lab
|
} // End of namespace Lab
|
||||||
|
|
|
@ -150,7 +150,7 @@ void EventManager::updateMouse() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doUpdateDisplay)
|
if (doUpdateDisplay)
|
||||||
_vm->WSDL_UpdateScreen();
|
_vm->screenUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ void EventManager::mouseShow() {
|
||||||
NumHidden--;
|
NumHidden--;
|
||||||
|
|
||||||
if ((NumHidden == 0) && MouseHidden) {
|
if ((NumHidden == 0) && MouseHidden) {
|
||||||
_vm->WSDL_ProcessInput(0);
|
_vm->processInput();
|
||||||
MouseHidden = false;
|
MouseHidden = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ void EventManager::setMousePos(Common::Point pos) {
|
||||||
g_system->warpMouse(pos.x * 2, pos.y);
|
g_system->warpMouse(pos.x * 2, pos.y);
|
||||||
|
|
||||||
if (!MouseHidden)
|
if (!MouseHidden)
|
||||||
_vm->WSDL_ProcessInput(0);
|
_vm->processInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ Music::Music(LabEngine *vm) : _vm(vm) {
|
||||||
/* it from the Audio device. */
|
/* it from the Audio device. */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void Music::updateMusic() {
|
void Music::updateMusic() {
|
||||||
_vm->WSDL_ProcessInput(0);
|
_vm->processInput();
|
||||||
|
|
||||||
_vm->_event->updateMouse();
|
_vm->_event->updateMouse();
|
||||||
|
|
||||||
|
|
|
@ -482,7 +482,7 @@ static void doActions(Action * APtr, CloseDataPtr *LCPtr) {
|
||||||
case WAITSECS:
|
case WAITSECS:
|
||||||
g_lab->addCurTime(APtr->Param1, 0, &StartSecs, &StartMicros);
|
g_lab->addCurTime(APtr->Param1, 0, &StartSecs, &StartMicros);
|
||||||
|
|
||||||
g_lab->WSDL_UpdateScreen();
|
g_lab->screenUpdate();
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
g_lab->_music->updateMusic();
|
g_lab->_music->updateMusic();
|
||||||
|
@ -566,7 +566,7 @@ static void doActions(Action * APtr, CloseDataPtr *LCPtr) {
|
||||||
diffcmap[idx] = 255 - diffcmap[idx];
|
diffcmap[idx] = 255 - diffcmap[idx];
|
||||||
|
|
||||||
g_lab->waitTOF();
|
g_lab->waitTOF();
|
||||||
g_lab->VGASetPal(diffcmap, 256);
|
g_lab->setPalette(diffcmap, 256);
|
||||||
g_lab->waitTOF();
|
g_lab->waitTOF();
|
||||||
g_lab->waitTOF();
|
g_lab->waitTOF();
|
||||||
} else if (APtr->Param1 == 4) { /* white the palette */
|
} else if (APtr->Param1 == 4) { /* white the palette */
|
||||||
|
@ -575,7 +575,7 @@ static void doActions(Action * APtr, CloseDataPtr *LCPtr) {
|
||||||
g_lab->waitTOF();
|
g_lab->waitTOF();
|
||||||
} else if (APtr->Param1 == 6) { /* Restore the palette */
|
} else if (APtr->Param1 == 6) { /* Restore the palette */
|
||||||
g_lab->waitTOF();
|
g_lab->waitTOF();
|
||||||
g_lab->VGASetPal(diffcmap, 256);
|
g_lab->setPalette(diffcmap, 256);
|
||||||
g_lab->waitTOF();
|
g_lab->waitTOF();
|
||||||
g_lab->waitTOF();
|
g_lab->waitTOF();
|
||||||
} else if (APtr->Param1 == 7) { /* Quick pause */
|
} else if (APtr->Param1 == 7) { /* Quick pause */
|
||||||
|
|
|
@ -140,7 +140,7 @@ void LabEngine::diffNextFrame() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsPal && !nopalchange) {
|
if (IsPal && !nopalchange) {
|
||||||
VGASetPal(diffcmap, 256);
|
setPalette(diffcmap, 256);
|
||||||
IsPal = false;
|
IsPal = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ void LabEngine::diffNextFrame() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsPal && !nopalchange && !IsBM && !donepal) {
|
if (IsPal && !nopalchange && !IsBM && !donepal) {
|
||||||
VGASetPal(diffcmap, 256);
|
setPalette(diffcmap, 256);
|
||||||
IsPal = false;
|
IsPal = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ void LabEngine::diffNextFrame() {
|
||||||
CurBit = 0;
|
CurBit = 0;
|
||||||
|
|
||||||
if (DispBitMap->Flags & BITMAPF_VIDEO)
|
if (DispBitMap->Flags & BITMAPF_VIDEO)
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
|
|
||||||
return; /* done with the next frame. */
|
return; /* done with the next frame. */
|
||||||
}
|
}
|
||||||
|
@ -268,7 +268,7 @@ void LabEngine::diffNextFrame() {
|
||||||
_event->mouseShow();
|
_event->mouseShow();
|
||||||
|
|
||||||
if (!didTOF)
|
if (!didTOF)
|
||||||
WSDL_UpdateScreen();
|
screenUpdate();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@ void showCombination(const char *filename) {
|
||||||
|
|
||||||
doCombination();
|
doCombination();
|
||||||
|
|
||||||
g_lab->VGASetPal(diffcmap, 256);
|
g_lab->setPalette(diffcmap, 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ void showTile(const char *filename, bool showsolution) {
|
||||||
|
|
||||||
doTile(showsolution);
|
doTile(showsolution);
|
||||||
|
|
||||||
g_lab->VGASetPal(diffcmap, 256);
|
g_lab->setPalette(diffcmap, 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void scrollRaster(int16 dx, int16 dy, uint16 x1, uint16 y1, uint16 x2, uint16 y2) {
|
static void scrollRaster(int16 dx, int16 dy, uint16 x1, uint16 y1, uint16 x2, uint16 y2) {
|
||||||
|
@ -471,7 +471,7 @@ void doNotes() {
|
||||||
|
|
||||||
flowText(BigMsgFont, -2 + SVGACord(1), 0, 0, false, false, true, true, VGAScaleX(25) + SVGACord(15), VGAScaleY(50), VGAScaleX(295) - SVGACord(15), VGAScaleY(148), ntext);
|
flowText(BigMsgFont, -2 + SVGACord(1), 0, 0, false, false, true, true, VGAScaleX(25) + SVGACord(15), VGAScaleY(50), VGAScaleX(295) - SVGACord(15), VGAScaleY(148), ntext);
|
||||||
|
|
||||||
g_lab->VGASetPal(diffcmap, 256);
|
g_lab->setPalette(diffcmap, 256);
|
||||||
freeAllStolenMem();
|
freeAllStolenMem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -533,7 +533,7 @@ void doWestPaper() {
|
||||||
|
|
||||||
CharsPrinted = flowText(BigMsgFont, -4, 0, 0, false, false, false, true, VGAScaleX(162), VGAScaleY(y), VGAScaleX(275), VGAScaleY(148), ntext);
|
CharsPrinted = flowText(BigMsgFont, -4, 0, 0, false, false, false, true, VGAScaleX(162), VGAScaleY(y), VGAScaleX(275), VGAScaleY(148), ntext);
|
||||||
|
|
||||||
g_lab->VGASetPal(diffcmap, 256);
|
g_lab->setPalette(diffcmap, 256);
|
||||||
freeAllStolenMem();
|
freeAllStolenMem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -841,7 +841,7 @@ bool saveRestoreGame() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_lab->WSDL_UpdateScreen();
|
g_lab->screenUpdate();
|
||||||
|
|
||||||
return isOK;
|
return isOK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,10 +63,10 @@ void LabEngine::changeVolume(int delta) {
|
||||||
warning("STUB: changeVolume()");
|
warning("STUB: changeVolume()");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 LabEngine::WSDL_GetNextChar() {
|
uint16 LabEngine::getNextChar() {
|
||||||
uint16 c = 0;
|
uint16 c = 0;
|
||||||
|
|
||||||
WSDL_ProcessInput(0);
|
processInput();
|
||||||
if (_nextKeyIn != _nextKeyOut) {
|
if (_nextKeyIn != _nextKeyOut) {
|
||||||
c = _keyBuf[_nextKeyOut];
|
c = _keyBuf[_nextKeyOut];
|
||||||
_nextKeyOut = ((((unsigned int)((_nextKeyOut + 1) >> 31) >> 26) + (byte)_nextKeyOut + 1) & 0x3F)
|
_nextKeyOut = ((((unsigned int)((_nextKeyOut + 1) >> 31) >> 26) + (byte)_nextKeyOut + 1) & 0x3F)
|
||||||
|
@ -76,12 +76,12 @@ uint16 LabEngine::WSDL_GetNextChar() {
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LabEngine::WSDL_HasNextChar() {
|
bool LabEngine::haveNextChar() {
|
||||||
WSDL_ProcessInput(0);
|
processInput();
|
||||||
return _nextKeyIn != _nextKeyOut;
|
return _nextKeyIn != _nextKeyOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LabEngine::WSDL_ProcessInput(bool can_delay) {
|
void LabEngine::processInput(bool can_delay) {
|
||||||
Common::Event event;
|
Common::Event event;
|
||||||
|
|
||||||
if (1 /*!g_IgnoreProcessInput*/) {
|
if (1 /*!g_IgnoreProcessInput*/) {
|
||||||
|
@ -167,7 +167,7 @@ void LabEngine::WSDL_ProcessInput(bool can_delay) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::Point LabEngine::WSDL_GetMousePos() {
|
Common::Point LabEngine::WSDL_GetMousePos() {
|
||||||
WSDL_ProcessInput(0);
|
processInput();
|
||||||
|
|
||||||
return _mousePos;
|
return _mousePos;
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ void LabEngine::waitTOF() {
|
||||||
g_system->copyRectToScreen(_displayBuffer, _screenWidth, 0, 0, _screenWidth, _screenHeight);
|
g_system->copyRectToScreen(_displayBuffer, _screenWidth, 0, 0, _screenWidth, _screenHeight);
|
||||||
g_system->updateScreen();
|
g_system->updateScreen();
|
||||||
|
|
||||||
WSDL_ProcessInput(0);
|
processInput();
|
||||||
|
|
||||||
uint32 now;
|
uint32 now;
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ void LabEngine::waitTOF() {
|
||||||
_lastWaitTOFTicks = now;
|
_lastWaitTOFTicks = now;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LabEngine::WSDL_SetColors(byte *buf, uint16 first, uint16 numreg, uint16 slow) {
|
void LabEngine::applyPalette(byte *buf, uint16 first, uint16 numreg, uint16 slow) {
|
||||||
byte tmp[256 * 3];
|
byte tmp[256 * 3];
|
||||||
|
|
||||||
for (int i = 0; i < 256 * 3; i++) {
|
for (int i = 0; i < 256 * 3; i++) {
|
||||||
|
@ -211,12 +211,12 @@ void LabEngine::WSDL_SetColors(byte *buf, uint16 first, uint16 numreg, uint16 sl
|
||||||
/* selected. */
|
/* selected. */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void LabEngine::writeColorRegs(byte *buf, uint16 first, uint16 numreg) {
|
void LabEngine::writeColorRegs(byte *buf, uint16 first, uint16 numreg) {
|
||||||
WSDL_SetColors(buf, first, numreg, 0);
|
applyPalette(buf, first, numreg, 0);
|
||||||
memcpy(&(_curvgapal[first * 3]), buf, numreg * 3);
|
memcpy(&(_curvgapal[first * 3]), buf, numreg * 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LabEngine::writeColorRegsSmooth(byte *buf, uint16 first, uint16 numreg) {
|
void LabEngine::writeColorRegsSmooth(byte *buf, uint16 first, uint16 numreg) {
|
||||||
WSDL_SetColors(buf, first, numreg, 1);
|
applyPalette(buf, first, numreg, 1);
|
||||||
memcpy(&(_curvgapal[first * 3]), buf, numreg * 3);
|
memcpy(&(_curvgapal[first * 3]), buf, numreg * 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,16 +229,16 @@ void LabEngine::writeColorReg(byte *buf, uint16 regnum) {
|
||||||
writeColorRegs(buf, regnum, 1);
|
writeColorRegs(buf, regnum, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LabEngine::VGASetPal(void *cmap, uint16 numcolors) {
|
void LabEngine::setPalette(void *cmap, uint16 numcolors) {
|
||||||
if (memcmp(cmap, _curvgapal, numcolors * 3) != 0)
|
if (memcmp(cmap, _curvgapal, numcolors * 3) != 0)
|
||||||
writeColorRegs((byte *)cmap, 0, numcolors);
|
writeColorRegs((byte *)cmap, 0, numcolors);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LabEngine::WSDL_UpdateScreen() {
|
void LabEngine::screenUpdate() {
|
||||||
g_system->copyRectToScreen(_displayBuffer, _screenWidth, 0, 0, _screenWidth, _screenHeight);
|
g_system->copyRectToScreen(_displayBuffer, _screenWidth, 0, 0, _screenWidth, _screenHeight);
|
||||||
g_system->updateScreen();
|
g_system->updateScreen();
|
||||||
|
|
||||||
WSDL_ProcessInput(0);
|
processInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue