diff --git a/src/include/depend.h b/src/include/depend.h index d58e15a02..f2e7439f9 100644 --- a/src/include/depend.h +++ b/src/include/depend.h @@ -9,11 +9,10 @@ // FreeCraft - A free fantasy real time strategy game engine // /**@name depend.h - The units/upgrade dependencies headerfile. */ -/* -** (c) Copyright 2000 by Vladi Belperchinov-Shabanski -** -** $Id$ -*/ +// +// (c) Copyright 2000,2001 by Vladi Belperchinov-Shabanski +// +// $Id$ #ifndef __DEPEND_H__ #define __DEPEND_H__ @@ -47,7 +46,7 @@ struct _depend_rule_ { union { UnitType* UnitType; /// unit type pointer int Upgrade; /// upgrade number - } Kind; /// required object + } Kind; /// required object DependRule* Rule; /// next and/or rule }; diff --git a/src/include/missile.h b/src/include/missile.h index 44f3906d5..71a6409a6 100644 --- a/src/include/missile.h +++ b/src/include/missile.h @@ -9,11 +9,10 @@ // FreeCraft - A free fantasy real time strategy game engine // /**@name missile.h - The missile headerfile. */ -/* -** (c) Copyright 1998-2000 by Lutz Sammer -** -** $Id$ -*/ +// +// (c) Copyright 1998-2001 by Lutz Sammer +// +// $Id$ #ifndef __MISSILE_H__ #define __MISSILE_H__ @@ -58,7 +57,7 @@ struct _missile_type_ { // SoundConfig FiredSound; /// fired sound (FIXME: must write this) SoundConfig ImpactSound; /// impact sound for this missile type - int Class; /// missile class + int Class; /// missile class int Speed; /// missile speed char* ImpactName; /// Impact missile type name @@ -92,16 +91,16 @@ typedef struct _missile_ { int Wait; /// delay Unit* SourceUnit; /// unit that fires (could be killed) - Unit* TargetUnit; /// target unit, used for spells + Unit* TargetUnit; /// target unit, used for spells + + int Damage; /// direct damage that missile applies - int Damage; /// direct damage that missile applies - int D; /// for point to point missiles int Dx; /// delta x int Dy; /// delta y int Xstep; /// X step int Ystep; /// Y step - + int TTL; /// time to live (ticks) used for spells int (*Controller)( void* this_missile ); /// used to controll spells } Missile; @@ -119,7 +118,7 @@ extern MissileType* MissileTypeGreenCross; /// Green cross missile type -- Functions ----------------------------------------------------------------------------*/ - /// load the graphics for the missiles + /// load the graphics for the missiles extern void LoadMissileSprites(void); /// Get missile type by ident. extern MissileType* MissileTypeByIdent(const char*); diff --git a/src/include/script_sound.h b/src/include/script_sound.h index 25cf0865a..656baa5ca 100644 --- a/src/include/script_sound.h +++ b/src/include/script_sound.h @@ -9,11 +9,10 @@ // FreeCraft - A free fantasy real time strategy game engine // /**@name ccl_sound.h - The Ccl sound header file. */ -/* -** (c) Copyright 1999,2000 by Lutz Sammer and Fabrice Rossi -** -** $Id$ -*/ +// +// (c) Copyright 1999-2001 by Lutz Sammer and Fabrice Rossi +// +// $Id$ #ifndef __CCL_SOUND_H__ #define __CCL_SOUND_H__ @@ -38,7 +37,7 @@ extern SoundId ccl_sound_id(SCM sound); /// scheme -> sound id extern void SoundCclRegister(void); /// register ccl features -#endif // } !defined(USE_CCL) && defined(WITH_SOUND) +#endif // } !defined(USE_CCL) && defined(WITH_SOUND) #if defined(USE_CCL2) && defined(WITH_SOUND) // { @@ -55,7 +54,7 @@ extern SoundId ccl_sound_id(SCM sound); /// scheme -> sound id extern void SoundCclRegister(void); /// register ccl features -#endif // { defined(USE_CCL2) && defined(WITH_SOUND) +#endif // { defined(USE_CCL2) && defined(WITH_SOUND) //----------------------------------------------------------------------------- diff --git a/src/network/commands.cpp b/src/network/commands.cpp index 9668d6fb8..fc9f2a151 100644 --- a/src/network/commands.cpp +++ b/src/network/commands.cpp @@ -633,7 +633,7 @@ global void ParseCommand(unsigned short Type,UnitRef Unum,unsigned short x,unsig } CommandMineGold(unit,dest,status); break; - case MessageCommandHaul: + case MessageCommandHaul: dest=NoUnitP; if( Dest!=(unsigned short)0xFFFF ) { dest=UnitSlots[Dest]; @@ -641,20 +641,20 @@ global void ParseCommand(unsigned short Type,UnitRef Unum,unsigned short x,unsig } CommandHaulOil(unit,dest,status); break; - case MessageCommandReturn: + case MessageCommandReturn: CommandReturnGoods(unit,status); break; - case MessageCommandTrain: + case MessageCommandTrain: CommandTrainUnit(unit,UnitTypes+Dest,status); break; case MessageCommandCancelTrain: // FIXME: cancel slot? CommandCancelTraining(unit,0); break; - case MessageCommandUpgrade: + case MessageCommandUpgrade: CommandUpgradeTo(unit,UnitTypes+Dest,status); break; - case MessageCommandResearch: + case MessageCommandResearch: CommandResearch(unit,Upgrades+x,status); break; case MessageCommandDemolish: diff --git a/src/network/network.cpp b/src/network/network.cpp index 6af1ca938..084d8eb9a 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -79,7 +79,7 @@ typedef struct _network_command_ { UnitRef Unit; /// Command for unit. unsigned short X; /// Map position X. unsigned short Y; /// Map position Y. - UnitRef Dest; /// Destination unit. + UnitRef Dest; /// Destination unit. } NetworkCommand; /** @@ -397,7 +397,7 @@ local void NetworkClientSetup(void) // Wait on answer (timeout 1s) if( NetSocketReady(NetworkFildes,1000) ) { - + if( !NetRecvUDP(NetworkFildes,&message,sizeof(message)) ) { exit(-1); } @@ -423,7 +423,7 @@ local void NetworkClientSetup(void) DebugLevel0Fn(" waiting for clients\n"); NetRecvUDP(NetworkFildes,&message,sizeof(message)); - if( NetLastHost!=host || NetLastPort!=port + if( NetLastHost!=host || NetLastPort!=port || message.Type!=MessageInitConfig ) { DebugLevel0Fn(" received wrong packet\n"); continue; @@ -545,7 +545,7 @@ global void ExitNetwork1(void) NetCloseUDP(NetworkFildes); NetExit(); // machine dependend setup - + NetworkFildes=-1; NetworkInSync=1; } @@ -690,7 +690,7 @@ global void NetworkEvent(void) // Both directions are same fast/slow ncq=(NetworkCommandQueue*)(CommandsOut->last); while( ncq->List->prev ) { - DebugLevel3Fn(" resend %d? %d\n",ncq->Time,n); + DebugLevel3Fn(" resend %d? %d\n",ncq->Time,n); if( ncq->Time==n ) { NetworkSendPacket(ncq); break; @@ -704,7 +704,7 @@ global void NetworkEvent(void) #else ncq=(NetworkCommandQueue*)(CommandsOut->first); while( ncq->List->next ) { - DebugLevel3Fn(" resend %d? %d\n",ncq->Time,n); + DebugLevel3Fn(" resend %d? %d\n",ncq->Time,n); if( ncq->Time==n ) { NetworkSendPacket(ncq); break; @@ -891,7 +891,7 @@ local void NetworkResendCommands(void) // packet.Commands[0].Type=MessageResend; packet.Commands[0].Frame= - (FrameCounter/NetworkUpdates)*NetworkUpdates+NetworkUpdates; + (FrameCounter/NetworkUpdates)*NetworkUpdates+NetworkUpdates; ncq=(NetworkCommandQueue*)(CommandsOut->last); @@ -961,7 +961,7 @@ local void NetworkExecCommands(void) ncq=(NetworkCommandQueue*)(CommandsOut->last); // FIXME: how many packets must be kept exactly? //if( ncq->Time+NetworkLag+NetworkUpdates>=FrameCounter ) - // THIS is too much if( ncq->Time>=FrameCounter ) + // THIS is too much if( ncq->Time>=FrameCounter ) if( ncq->Time+NetworkLag>=FrameCounter ) { break; } @@ -1019,7 +1019,7 @@ local void NetworkSyncCommands(void) for( i=0; i<HostsCount; ++i ) { DebugLevel3Fn(" sync %d\n",NetPlyNr[i]); ncq=&NetworkIn[n&0xFF][NetPlyNr[i]]; - DebugLevel3Fn(" sync %d==%d\n",ncq->Time,n); + DebugLevel3Fn(" sync %d==%d\n",ncq->Time,n); if( ncq->Time!=n ) { NetworkInSync=0; NetworkDelay=NetworkUpdates;