Getting the "spaceball" demo to build properly in Windows
[freeglut] / progs / demos / spaceball / vmath.h
index 3d8a4ca..249a504 100644 (file)
@@ -1,6 +1,13 @@
 #ifndef VMATH_H_\r
 #define VMATH_H_\r
 \r
+#if defined(WIN32)\r
+#define INLINE\r
+#else\r
+#define INLINE  inline\r
+#endif\r
+\r
+\r
 typedef struct { float x, y, z; } vec3_t;\r
 typedef struct { float x, y, z, w; } vec4_t;\r
 \r
@@ -9,18 +16,18 @@ typedef vec4_t quat_t;
 typedef float mat4_t[4][4];\r
 \r
 /* vector functions */\r
-static inline vec3_t v3_cons(float x, float y, float z);\r
-static inline float v3_dot(vec3_t v1, vec3_t v2);\r
+static INLINE vec3_t v3_cons(float x, float y, float z);\r
+static INLINE float v3_dot(vec3_t v1, vec3_t v2);\r
 \r
 /* quaternion functions */\r
-static inline quat_t quat_cons(float s, float x, float y, float z);\r
-static inline vec3_t quat_vec(quat_t q);\r
-static inline quat_t quat_mul(quat_t q1, quat_t q2);\r
-static inline void quat_to_mat(mat4_t res, quat_t q);\r
+static INLINE quat_t quat_cons(float s, float x, float y, float z);\r
+static INLINE vec3_t quat_vec(quat_t q);\r
+static INLINE quat_t quat_mul(quat_t q1, quat_t q2);\r
+static INLINE void quat_to_mat(mat4_t res, quat_t q);\r
 quat_t quat_rotate(quat_t q, float angle, float x, float y, float z);\r
 \r
 /* matrix functions */\r
-static inline void m4_cons(mat4_t m,\r
+static INLINE void m4_cons(mat4_t m,\r
     float m11, float m12, float m13, float m14,\r
     float m21, float m22, float m23, float m24,\r
     float m31, float m32, float m33, float m34,\r