about summary refs log tree commit diff
path: root/src/game/g_game.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_game.h')
-rw-r--r--src/game/g_game.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/game/g_game.h b/src/game/g_game.h
index 5cece9d9..a9fddde7 100644
--- a/src/game/g_game.h
+++ b/src/game/g_game.h
@@ -4,12 +4,35 @@
 
 #include <engine/e_system.h>
 #include <engine/e_common_interface.h>
-#include <game/g_math.h>
 #include <math.h>
+#include "g_math.h"
 #include "g_collision.h"
-
 #include "g_protocol.h"
 
+struct tuning_params
+{
+	tuning_params()
+	{
+		const float ticks_per_second = 50.0f;
+		#define MACRO_TUNING_PARAM(name,value) name = value;
+		#include "g_tuning.h"
+		#undef MACRO_TUNING_PARAM
+	}
+
+	static const char *names[];
+	
+	#define MACRO_TUNING_PARAM(name,value) tune_param name;
+	#include "g_tuning.h"
+	#undef MACRO_TUNING_PARAM
+	
+	static int num() { return sizeof(tuning_params)/sizeof(int); }
+	bool set(int index, float value);
+	bool set(const char *name, float value);
+	bool get(int index, float *value);
+	bool get(const char *name, float *value);
+};
+
+
 inline vec2 get_direction(int angle)
 {
 	float a = angle/256.0f;
@@ -90,7 +113,8 @@ public:
 	{
 		mem_zero(players, sizeof(players));
 	}
-		
+	
+	tuning_params tuning;
 	class player_core *players[MAX_CLIENTS];
 };