Fixed VC++ compiling errors.

This commit is contained in:
jsalmon3 2002-04-13 15:28:32 +00:00
parent f18ad12b7c
commit f650613d06
3 changed files with 19 additions and 10 deletions

View file

@ -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 ) {

View file

@ -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
}
/*----------------------------------------------------------------------------

View file

@ -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
}
}