misc.h

changeset 124
7962744759ad
parent 117
7eb7a43a511b
child 133
5a8073d713a3
--- a/misc.h	Sun Apr 21 19:03:53 2013 +0300
+++ b/misc.h	Mon Apr 22 03:53:21 2013 +0300
@@ -36,6 +36,35 @@
 // Simplifies the given fraction.
 void simplify (short& dNum, short& dDenom);
 
+// Grid stuff
+typedef struct {
+	const char* const name;
+	floatconfig* const confs[4];
+} gridinfo;
+
+namespace Grid {
+	enum Type {
+		Coarse,
+		Medium,
+		Fine
+	};
+	
+	enum Config {
+		X,
+		Y,
+		Z,
+		Angle
+	};
+};
+
+extern_cfg (int, grid);
+static const short g_NumGrids = 3;
+extern const gridinfo g_GridInfo[3];
+
+inline const gridinfo& currentGrid () {
+	return g_GridInfo[grid];
+}
+
 // =============================================================================
 // StringParser
 //

mercurial