From f650613d06b7cfb0d8642aac241b8fa495eb6f85 Mon Sep 17 00:00:00 2001 From: jsalmon3 <> Date: Sat, 13 Apr 2002 15:28:32 +0000 Subject: [PATCH] Fixed VC++ compiling errors. --- src/game/trigger.cpp | 21 +++++++++++---------- src/map/map_fog.cpp | 6 ++++++ src/network/netconnect.cpp | 2 ++ 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/game/trigger.cpp b/src/game/trigger.cpp index d34a2594e..2048a2331 100644 --- a/src/game/trigger.cpp +++ b/src/game/trigger.cpp @@ -155,27 +155,27 @@ local CompareFunction GetCompareFunction(const char* op) { if( op[0]=='=' ) { if( (op[1]=='=' && op[2]=='\0') || (op[1]=='\0') ) { - return CompareEq; + return &CompareEq; } } else if( op[0]=='>' ) { if( op[1]=='=' && op[2]=='\0' ) { - return CompareGrEq; + return &CompareGrEq; } else if( op[1]=='\0' ) { - return CompareGr; + return &CompareGr; } } else if( op[0]=='<' ) { if( op[1]=='=' && op[2]=='\0' ) { - return CompareLeEq; + return &CompareLeEq; } else if( op[1]=='\0' ) { - return CompareLe; + return &CompareLe; } } else if( op[0]=='!' && op[1]=='=' && op[2]=='\0' ) { - return CompareNEq; + return &CompareNEq; } return NULL; } @@ -253,7 +253,8 @@ local SCM CclIfUnit(SCM player,SCM operation,SCM quantity,SCM unit) /** ** Player has the quantity of unit-type near to unit-type. */ -local SCM CclIfNearUnit(SCM player,SCM operation,SCM quantity,SCM unit,SCM near) +local SCM CclIfNearUnit(SCM player,SCM operation,SCM quantity,SCM unit, + SCM nearunit) { int plynr; int q; @@ -269,7 +270,7 @@ local SCM CclIfNearUnit(SCM player,SCM operation,SCM quantity,SCM unit,SCM near) op=get_c_string(operation); q=gh_scm2int(quantity); unittype=TriggerGetUnitType(unit); - ut2=CclGetUnitType(near); + ut2=CclGetUnitType(nearunit); Compare=GetCompareFunction(op); if( !Compare ) { @@ -341,7 +342,7 @@ local SCM CclIfNearUnit(SCM player,SCM operation,SCM quantity,SCM unit,SCM near) ** Player has the quantity of rescued unit-type near to unit-type. */ local SCM CclIfRescuedNearUnit(SCM player,SCM operation,SCM quantity,SCM unit, - SCM near) + SCM nearunit) { int plynr; int q; @@ -357,7 +358,7 @@ local SCM CclIfRescuedNearUnit(SCM player,SCM operation,SCM quantity,SCM unit, op=get_c_string(operation); q=gh_scm2int(quantity); unittype=TriggerGetUnitType(unit); - ut2=CclGetUnitType(near); + ut2=CclGetUnitType(nearunit); Compare=GetCompareFunction(op); if( !Compare ) { diff --git a/src/map/map_fog.cpp b/src/map/map_fog.cpp index ed5a5965c..bf5901d36 100644 --- a/src/map/map_fog.cpp +++ b/src/map/map_fog.cpp @@ -521,11 +521,15 @@ global void MapUpdateVisible(void) // memset(TheMap.Visible[0],0,(TheMap.Width*TheMap.Height)/8); +#ifdef DEBUG DebugLevel3Fn("Ticks Clear %lu\n",GetTicks()-t); +#endif MarkDrawEntireMap(); +#ifdef DEBUG DebugLevel3Fn("Ticks Mark %lu\n",GetTicks()-t); +#endif // // Mark all units visible range. @@ -584,7 +588,9 @@ global void MapUpdateVisible(void) } } +#ifdef DEBUG DebugLevel3Fn("Ticks Total %lu\n",GetTicks()-t); +#endif } /*---------------------------------------------------------------------------- diff --git a/src/network/netconnect.cpp b/src/network/netconnect.cpp index dd0c2bfa8..de2f8c619 100644 --- a/src/network/netconnect.cpp +++ b/src/network/netconnect.cpp @@ -664,10 +664,12 @@ local void NetworkSendRateLimitedClientMessage(InitMessage *msg, long msecs) LastStateMsgType = msg->SubType; } n = NetworkSendICMessage(NetworkServerIP, htons(NetworkServerPort), msg); +#ifdef DEBUG DebugLevel0Fn("Sending Init Message (%s:%d): %d:%d(%d) %d.%d.%d.%d:%d\n", ncconstatenames[NetLocalState], NetStateMsgCnt, msg->Type, msg->SubType, n, NIPQUAD(ntohl(NetworkServerIP)), NetworkServerPort); +#endif } }