LAB: Change the "action" parameter of doActionRule to lowercase

This avoids a name clash with the Action struct
This commit is contained in:
Filippos Karapetis 2015-02-17 11:22:12 +02:00 committed by Eugene Sandulenko
parent d70819fa67
commit 7f80a4ff63
2 changed files with 10 additions and 10 deletions

View file

@ -77,7 +77,7 @@ void setCurClose(uint16 x, uint16 y, CloseDataPtr *cptr);
bool takeItem(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); bool doOperateRule(int16 x, int16 y, int16 ItemNum, CloseDataPtr *LCPtr);

View file

@ -716,10 +716,10 @@ static void doActions(ActionPtr APtr, CloseDataPtr *LCPtr) {
/*****************************************************************************/ /*****************************************************************************/
/* Does the work for doActionRule. */ /* 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; RulePtr RPtr;
Action++; action++;
if (LCPtr) { if (LCPtr) {
RPtr = Rooms[roomNum].RuleList; RPtr = Rooms[roomNum].RuleList;
@ -732,11 +732,11 @@ static bool doActionRuleSub(int16 Action, int16 roomNum, CloseDataPtr LCPtr, Clo
while (RPtr) { while (RPtr) {
if ((RPtr->RuleType == ACTION) && if ((RPtr->RuleType == ACTION) &&
((RPtr->Param1 == Action) || ((RPtr->Param1 == 0) && AllowDefaults))) { ((RPtr->Param1 == action) || ((RPtr->Param1 == 0) && AllowDefaults))) {
if (((RPtr->Param2 == LCPtr->CloseUpType) || if (((RPtr->Param2 == LCPtr->CloseUpType) ||
((RPtr->Param2 == 0) && AllowDefaults)) ((RPtr->Param2 == 0) && AllowDefaults))
|| ||
((Action == 1) && (RPtr->Param2 == (-LCPtr->CloseUpType)))) { ((action == 1) && (RPtr->Param2 == (-LCPtr->CloseUpType)))) {
if (checkConditions(RPtr->Condition)) { if (checkConditions(RPtr->Condition)) {
doActions(RPtr->ActionList, Set); doActions(RPtr->ActionList, Set);
return true; 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. */ /* 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; CloseDataPtr TLCPtr;
if (roomNum) if (roomNum)
@ -764,13 +764,13 @@ bool doActionRule(int16 x, int16 y, int16 Action, int16 roomNum, CloseDataPtr *L
TLCPtr = getObject(x, y, *LCPtr); TLCPtr = getObject(x, y, *LCPtr);
if (doActionRuleSub(Action, roomNum, TLCPtr, LCPtr, false)) if (doActionRuleSub(action, roomNum, TLCPtr, LCPtr, false))
return true; return true;
else if (doActionRuleSub(Action, roomNum, *LCPtr, LCPtr, false)) else if (doActionRuleSub(action, roomNum, *LCPtr, LCPtr, false))
return true; return true;
else if (doActionRuleSub(Action, roomNum, TLCPtr, LCPtr, true)) else if (doActionRuleSub(action, roomNum, TLCPtr, LCPtr, true))
return true; return true;
else if (doActionRuleSub(Action, roomNum, *LCPtr, LCPtr, true)) else if (doActionRuleSub(action, roomNum, *LCPtr, LCPtr, true))
return true; return true;
return false; return false;