LAB: Remove parameters from processMainButton and performAction
This commit is contained in:
parent
a7afc80e18
commit
b3b3c0cfd5
2 changed files with 8 additions and 12 deletions
|
@ -649,7 +649,7 @@ bool LabEngine::fromCrumbs(uint32 tmpClass, uint16 code, uint16 qualifier, Commo
|
||||||
_graphics->screenUpdate();
|
_graphics->screenUpdate();
|
||||||
}
|
}
|
||||||
} else if ((msgClass == kMessageButtonUp) && !_alternate) {
|
} else if ((msgClass == kMessageButtonUp) && !_alternate) {
|
||||||
processMainButton(wrkClosePtr, curInv, lastInv, oldDirection, forceDraw, buttonId, actionMode);
|
processMainButton(curInv, lastInv, oldDirection, forceDraw, buttonId, actionMode);
|
||||||
} else if ((msgClass == kMessageButtonUp) && _alternate) {
|
} else if ((msgClass == kMessageButtonUp) && _alternate) {
|
||||||
processAltButton(curInv, lastInv, buttonId, actionMode);
|
processAltButton(curInv, lastInv, buttonId, actionMode);
|
||||||
} else if (leftButtonClick && _mainDisplay) {
|
} else if (leftButtonClick && _mainDisplay) {
|
||||||
|
@ -667,11 +667,11 @@ bool LabEngine::fromCrumbs(uint32 tmpClass, uint16 code, uint16 qualifier, Commo
|
||||||
_tilePuzzle->mouseTile(curPos);
|
_tilePuzzle->mouseTile(curPos);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
performAction(wrkClosePtr, actionMode, curPos, curInv);
|
performAction(actionMode, curPos, curInv);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
performAction(wrkClosePtr, actionMode, curPos, curInv);
|
performAction(actionMode, curPos, curInv);
|
||||||
|
|
||||||
mayShowCrumbIndicator();
|
mayShowCrumbIndicator();
|
||||||
_graphics->screenUpdate();
|
_graphics->screenUpdate();
|
||||||
|
@ -700,7 +700,7 @@ bool LabEngine::fromCrumbs(uint32 tmpClass, uint16 code, uint16 qualifier, Commo
|
||||||
ViewData *vptr = getViewData(_roomNum, _direction);
|
ViewData *vptr = getViewData(_roomNum, _direction);
|
||||||
CloseDataPtr oldClosePtr = vptr->_closeUps;
|
CloseDataPtr oldClosePtr = vptr->_closeUps;
|
||||||
|
|
||||||
if (!wrkClosePtr) {
|
if (!wrkClosePtr) { // CHECKME: Always true?
|
||||||
CloseDataPtr tmpClosePtr = _closeDataPtr;
|
CloseDataPtr tmpClosePtr = _closeDataPtr;
|
||||||
setCurrentClose(curPos, &tmpClosePtr, true);
|
setCurrentClose(curPos, &tmpClosePtr, true);
|
||||||
|
|
||||||
|
@ -815,7 +815,7 @@ bool LabEngine::processKey(IntuiMessage *curMsg, uint32 &msgClass, uint16 &quali
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LabEngine::processMainButton(CloseDataPtr wrkClosePtr, uint16 &curInv, uint16 &lastInv, uint16 &oldDirection, bool &forceDraw, uint16 buttonId, uint16 &actionMode) {
|
void LabEngine::processMainButton(uint16 &curInv, uint16 &lastInv, uint16 &oldDirection, bool &forceDraw, uint16 buttonId, uint16 &actionMode) {
|
||||||
uint16 newDir;
|
uint16 newDir;
|
||||||
uint16 oldRoomNum;
|
uint16 oldRoomNum;
|
||||||
|
|
||||||
|
@ -829,7 +829,6 @@ void LabEngine::processMainButton(CloseDataPtr wrkClosePtr, uint16 &curInv, uint
|
||||||
doMainView(&_closeDataPtr);
|
doMainView(&_closeDataPtr);
|
||||||
|
|
||||||
_anim->_doBlack = true;
|
_anim->_doBlack = true;
|
||||||
wrkClosePtr = nullptr;
|
|
||||||
_closeDataPtr = nullptr;
|
_closeDataPtr = nullptr;
|
||||||
mayShowCrumbIndicator();
|
mayShowCrumbIndicator();
|
||||||
} else {
|
} else {
|
||||||
|
@ -868,7 +867,6 @@ void LabEngine::processMainButton(CloseDataPtr wrkClosePtr, uint16 &curInv, uint
|
||||||
case kButtonLeft:
|
case kButtonLeft:
|
||||||
case kButtonRight:
|
case kButtonRight:
|
||||||
_closeDataPtr = nullptr;
|
_closeDataPtr = nullptr;
|
||||||
wrkClosePtr = nullptr;
|
|
||||||
if (buttonId == kButtonLeft)
|
if (buttonId == kButtonLeft)
|
||||||
drawStaticMessage(kTextTurnLeft);
|
drawStaticMessage(kTextTurnLeft);
|
||||||
else
|
else
|
||||||
|
@ -887,7 +885,6 @@ void LabEngine::processMainButton(CloseDataPtr wrkClosePtr, uint16 &curInv, uint
|
||||||
|
|
||||||
case kButtonForward:
|
case kButtonForward:
|
||||||
_closeDataPtr = nullptr;
|
_closeDataPtr = nullptr;
|
||||||
wrkClosePtr = nullptr;
|
|
||||||
oldRoomNum = _roomNum;
|
oldRoomNum = _roomNum;
|
||||||
|
|
||||||
if (doGoForward(&_closeDataPtr)) {
|
if (doGoForward(&_closeDataPtr)) {
|
||||||
|
@ -1080,8 +1077,7 @@ void LabEngine::processAltButton(uint16 &curInv, uint16 &lastInv, uint16 buttonI
|
||||||
_graphics->screenUpdate();
|
_graphics->screenUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LabEngine::performAction(CloseDataPtr wrkClosePtr, uint16 actionMode, Common::Point curPos, uint16 &curInv) {
|
void LabEngine::performAction(uint16 actionMode, Common::Point curPos, uint16 &curInv) {
|
||||||
wrkClosePtr = nullptr;
|
|
||||||
eatMessages();
|
eatMessages();
|
||||||
|
|
||||||
switch (actionMode) {
|
switch (actionMode) {
|
||||||
|
|
|
@ -252,9 +252,9 @@ private:
|
||||||
bool takeItem(Common::Point pos, CloseDataPtr *closePtrList);
|
bool takeItem(Common::Point pos, CloseDataPtr *closePtrList);
|
||||||
void turnPage(bool fromLeft);
|
void turnPage(bool fromLeft);
|
||||||
bool processKey(IntuiMessage *curMsg, uint32 &msgClass, uint16 &qualifier, Common::Point &curPos, uint16 &curInv, bool &forceDraw, uint16 code);
|
bool processKey(IntuiMessage *curMsg, uint32 &msgClass, uint16 &qualifier, Common::Point &curPos, uint16 &curInv, bool &forceDraw, uint16 code);
|
||||||
void processMainButton(CloseDataPtr wrkClosePtr, uint16 &curInv, uint16 &lastInv, uint16 &oldDirection, bool &forceDraw, uint16 buttonId, uint16 &actionMode);
|
void processMainButton(uint16 &curInv, uint16 &lastInv, uint16 &oldDirection, bool &forceDraw, uint16 buttonId, uint16 &actionMode);
|
||||||
void processAltButton(uint16 &curInv, uint16 &lastInv, uint16 buttonId, uint16 &actionMode);
|
void processAltButton(uint16 &curInv, uint16 &lastInv, uint16 buttonId, uint16 &actionMode);
|
||||||
void performAction(CloseDataPtr wrkClosePtr, uint16 actionMode, Common::Point curPos, uint16 &curInv);
|
void performAction(uint16 actionMode, Common::Point curPos, uint16 &curInv);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool saveGame(int slot, Common::String desc);
|
bool saveGame(int slot, Common::String desc);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue