aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2015-02-17 11:22:12 +0200
committerEugene Sandulenko2015-12-15 00:05:02 +0100
commit7f80a4ff63f5314d3f9b13d124c279e18ca06d73 (patch)
tree585f92e0a4a0688e00ede9c47a3a269e93772864
parentd70819fa6751ad37170b4cbc13cc6106ad1bb8d4 (diff)
downloadscummvm-rg350-7f80a4ff63f5314d3f9b13d124c279e18ca06d73.tar.gz
scummvm-rg350-7f80a4ff63f5314d3f9b13d124c279e18ca06d73.tar.bz2
scummvm-rg350-7f80a4ff63f5314d3f9b13d124c279e18ca06d73.zip
LAB: Change the "action" parameter of doActionRule to lowercase
This avoids a name clash with the Action struct
-rw-r--r--engines/lab/parsefun.h2
-rw-r--r--engines/lab/processroom.cpp18
2 files changed, 10 insertions, 10 deletions
diff --git a/engines/lab/parsefun.h b/engines/lab/parsefun.h
index e6794ee8eb..2c48311090 100644
--- a/engines/lab/parsefun.h
+++ b/engines/lab/parsefun.h
@@ -77,7 +77,7 @@ void setCurClose(uint16 x, uint16 y, CloseDataPtr *cptr);
bool takeItem(uint16 x, uint16 y, CloseDataPtr *cptr);
-bool doActionRule(int16 x, int16 y, int16 Action, int16 RoomNum, CloseDataPtr *LCPtr);
+bool doActionRule(int16 x, int16 y, int16 action, int16 RoomNum, CloseDataPtr *LCPtr);
bool doOperateRule(int16 x, int16 y, int16 ItemNum, CloseDataPtr *LCPtr);
diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp
index 5699c63880..70eac05cc7 100644
--- a/engines/lab/processroom.cpp
+++ b/engines/lab/processroom.cpp
@@ -716,10 +716,10 @@ static void doActions(ActionPtr APtr, CloseDataPtr *LCPtr) {
/*****************************************************************************/
/* Does the work for doActionRule. */
/*****************************************************************************/
-static bool doActionRuleSub(int16 Action, int16 roomNum, CloseDataPtr LCPtr, CloseDataPtr *Set, bool AllowDefaults) {
+static bool doActionRuleSub(int16 action, int16 roomNum, CloseDataPtr LCPtr, CloseDataPtr *Set, bool AllowDefaults) {
RulePtr RPtr;
- Action++;
+ action++;
if (LCPtr) {
RPtr = Rooms[roomNum].RuleList;
@@ -732,11 +732,11 @@ static bool doActionRuleSub(int16 Action, int16 roomNum, CloseDataPtr LCPtr, Clo
while (RPtr) {
if ((RPtr->RuleType == ACTION) &&
- ((RPtr->Param1 == Action) || ((RPtr->Param1 == 0) && AllowDefaults))) {
+ ((RPtr->Param1 == action) || ((RPtr->Param1 == 0) && AllowDefaults))) {
if (((RPtr->Param2 == LCPtr->CloseUpType) ||
((RPtr->Param2 == 0) && AllowDefaults))
||
- ((Action == 1) && (RPtr->Param2 == (-LCPtr->CloseUpType)))) {
+ ((action == 1) && (RPtr->Param2 == (-LCPtr->CloseUpType)))) {
if (checkConditions(RPtr->Condition)) {
doActions(RPtr->ActionList, Set);
return true;
@@ -754,7 +754,7 @@ static bool doActionRuleSub(int16 Action, int16 roomNum, CloseDataPtr LCPtr, Clo
/*****************************************************************************/
/* Goes through the rules if an action is taken. */
/*****************************************************************************/
-bool doActionRule(int16 x, int16 y, int16 Action, int16 roomNum, CloseDataPtr *LCPtr) {
+bool doActionRule(int16 x, int16 y, int16 action, int16 roomNum, CloseDataPtr *LCPtr) {
CloseDataPtr TLCPtr;
if (roomNum)
@@ -764,13 +764,13 @@ bool doActionRule(int16 x, int16 y, int16 Action, int16 roomNum, CloseDataPtr *L
TLCPtr = getObject(x, y, *LCPtr);
- if (doActionRuleSub(Action, roomNum, TLCPtr, LCPtr, false))
+ if (doActionRuleSub(action, roomNum, TLCPtr, LCPtr, false))
return true;
- else if (doActionRuleSub(Action, roomNum, *LCPtr, LCPtr, false))
+ else if (doActionRuleSub(action, roomNum, *LCPtr, LCPtr, false))
return true;
- else if (doActionRuleSub(Action, roomNum, TLCPtr, LCPtr, true))
+ else if (doActionRuleSub(action, roomNum, TLCPtr, LCPtr, true))
return true;
- else if (doActionRuleSub(Action, roomNum, *LCPtr, LCPtr, true))
+ else if (doActionRuleSub(action, roomNum, *LCPtr, LCPtr, true))
return true;
return false;