From 3705064b109580103a3d13f44693503da9927281 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Thu, 12 Jun 2008 12:09:34 +0000 Subject: renamed .h to .hpp in game because they are c++ headers --- src/game/server/gs_common.h | 357 ---------------------------------------- src/game/server/gs_common.hpp | 357 ++++++++++++++++++++++++++++++++++++++++ src/game/server/gs_game.cpp | 4 +- src/game/server/gs_game_ctf.cpp | 6 +- src/game/server/gs_game_ctf.h | 35 ---- src/game/server/gs_game_ctf.hpp | 35 ++++ src/game/server/gs_game_dm.cpp | 4 +- src/game/server/gs_game_dm.h | 7 - src/game/server/gs_game_dm.hpp | 7 + src/game/server/gs_game_tdm.cpp | 4 +- src/game/server/gs_game_tdm.h | 10 -- src/game/server/gs_game_tdm.hpp | 10 ++ src/game/server/gs_server.cpp | 16 +- 13 files changed, 426 insertions(+), 426 deletions(-) delete mode 100644 src/game/server/gs_common.h create mode 100644 src/game/server/gs_common.hpp delete mode 100644 src/game/server/gs_game_ctf.h create mode 100644 src/game/server/gs_game_ctf.hpp delete mode 100644 src/game/server/gs_game_dm.h create mode 100644 src/game/server/gs_game_dm.hpp delete mode 100644 src/game/server/gs_game_tdm.h create mode 100644 src/game/server/gs_game_tdm.hpp (limited to 'src/game/server') diff --git a/src/game/server/gs_common.h b/src/game/server/gs_common.h deleted file mode 100644 index 6b307cdf..00000000 --- a/src/game/server/gs_common.h +++ /dev/null @@ -1,357 +0,0 @@ -/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ -#include "../g_game.h" -#include "../generated/gs_data.h" - - -extern TUNING_PARAMS tuning; - -void create_sound_global(int sound, int target=-1); - -inline int cmask_all() { return -1; } -inline int cmask_one(int cid) { return 1< #include #include -#include -#include "gs_common.h" +#include +#include "gs_common.hpp" GAMECONTROLLER::GAMECONTROLLER() : ENTITY(NETOBJTYPE_GAME) diff --git a/src/game/server/gs_game_ctf.cpp b/src/game/server/gs_game_ctf.cpp index 59ec3981..031be42a 100644 --- a/src/game/server/gs_game_ctf.cpp +++ b/src/game/server/gs_game_ctf.cpp @@ -1,8 +1,8 @@ /* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ #include -#include -#include "gs_common.h" -#include "gs_game_ctf.h" +#include +#include "gs_common.hpp" +#include "gs_game_ctf.hpp" GAMECONTROLLER_CTF::GAMECONTROLLER_CTF() { diff --git a/src/game/server/gs_game_ctf.h b/src/game/server/gs_game_ctf.h deleted file mode 100644 index 6d512815..00000000 --- a/src/game/server/gs_game_ctf.h +++ /dev/null @@ -1,35 +0,0 @@ -/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ - -// game object -class GAMECONTROLLER_CTF : public GAMECONTROLLER -{ -public: - class FLAG *flags[2]; - - GAMECONTROLLER_CTF(); - virtual void tick(); - - virtual bool on_entity(int index, vec2 pos); - - virtual void on_player_spawn(class PLAYER *p); - virtual int on_player_death(class PLAYER *victim, class PLAYER *killer, int weapon); -}; - -// TODO: move to seperate file -class FLAG : public ENTITY -{ -public: - static const int phys_size = 14; - PLAYER *carrying_player; - vec2 vel; - vec2 stand_pos; - - int team; - int at_stand; - int drop_tick; - - FLAG(int _team); - - virtual void reset(); - virtual void snap(int snapping_client); -}; diff --git a/src/game/server/gs_game_ctf.hpp b/src/game/server/gs_game_ctf.hpp new file mode 100644 index 00000000..6d512815 --- /dev/null +++ b/src/game/server/gs_game_ctf.hpp @@ -0,0 +1,35 @@ +/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ + +// game object +class GAMECONTROLLER_CTF : public GAMECONTROLLER +{ +public: + class FLAG *flags[2]; + + GAMECONTROLLER_CTF(); + virtual void tick(); + + virtual bool on_entity(int index, vec2 pos); + + virtual void on_player_spawn(class PLAYER *p); + virtual int on_player_death(class PLAYER *victim, class PLAYER *killer, int weapon); +}; + +// TODO: move to seperate file +class FLAG : public ENTITY +{ +public: + static const int phys_size = 14; + PLAYER *carrying_player; + vec2 vel; + vec2 stand_pos; + + int team; + int at_stand; + int drop_tick; + + FLAG(int _team); + + virtual void reset(); + virtual void snap(int snapping_client); +}; diff --git a/src/game/server/gs_game_dm.cpp b/src/game/server/gs_game_dm.cpp index 1d565372..264063bf 100644 --- a/src/game/server/gs_game_dm.cpp +++ b/src/game/server/gs_game_dm.cpp @@ -1,7 +1,7 @@ /* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ #include -#include "gs_common.h" -#include "gs_game_dm.h" +#include "gs_common.hpp" +#include "gs_game_dm.hpp" void GAMECONTROLLER_DM::tick() { diff --git a/src/game/server/gs_game_dm.h b/src/game/server/gs_game_dm.h deleted file mode 100644 index 99ceaec1..00000000 --- a/src/game/server/gs_game_dm.h +++ /dev/null @@ -1,7 +0,0 @@ -/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ -// game object -class GAMECONTROLLER_DM : public GAMECONTROLLER -{ -public: - virtual void tick(); -}; diff --git a/src/game/server/gs_game_dm.hpp b/src/game/server/gs_game_dm.hpp new file mode 100644 index 00000000..99ceaec1 --- /dev/null +++ b/src/game/server/gs_game_dm.hpp @@ -0,0 +1,7 @@ +/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ +// game object +class GAMECONTROLLER_DM : public GAMECONTROLLER +{ +public: + virtual void tick(); +}; diff --git a/src/game/server/gs_game_tdm.cpp b/src/game/server/gs_game_tdm.cpp index 10c5a7dc..c591b447 100644 --- a/src/game/server/gs_game_tdm.cpp +++ b/src/game/server/gs_game_tdm.cpp @@ -1,7 +1,7 @@ /* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ #include -#include "gs_common.h" -#include "gs_game_tdm.h" +#include "gs_common.hpp" +#include "gs_game_tdm.hpp" GAMECONTROLLER_TDM::GAMECONTROLLER_TDM() { diff --git a/src/game/server/gs_game_tdm.h b/src/game/server/gs_game_tdm.h deleted file mode 100644 index 516b581c..00000000 --- a/src/game/server/gs_game_tdm.h +++ /dev/null @@ -1,10 +0,0 @@ -/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ -// game object -class GAMECONTROLLER_TDM : public GAMECONTROLLER -{ -public: - GAMECONTROLLER_TDM(); - - int on_player_death(class PLAYER *victim, class PLAYER *killer, int weapon); - virtual void tick(); -}; diff --git a/src/game/server/gs_game_tdm.hpp b/src/game/server/gs_game_tdm.hpp new file mode 100644 index 00000000..516b581c --- /dev/null +++ b/src/game/server/gs_game_tdm.hpp @@ -0,0 +1,10 @@ +/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ +// game object +class GAMECONTROLLER_TDM : public GAMECONTROLLER +{ +public: + GAMECONTROLLER_TDM(); + + int on_player_death(class PLAYER *victim, class PLAYER *killer, int weapon); + virtual void tick(); +}; diff --git a/src/game/server/gs_server.cpp b/src/game/server/gs_server.cpp index 86d7fe32..4e7b4179 100644 --- a/src/game/server/gs_server.cpp +++ b/src/game/server/gs_server.cpp @@ -4,14 +4,14 @@ #include #include #include -#include -#include -#include -#include -#include "gs_common.h" -#include "gs_game_ctf.h" -#include "gs_game_tdm.h" -#include "gs_game_dm.h" +#include +#include +#include +#include +#include "gs_common.hpp" +#include "gs_game_ctf.hpp" +#include "gs_game_tdm.hpp" +#include "gs_game_dm.hpp" TUNING_PARAMS tuning; -- cgit 1.4.1