1 | #ifndef UTIL_H |
1 | #ifndef UTIL_H |
2 | #define UTIL_H |
2 | #define UTIL_H |
3 | |
3 | |
4 | #include <GL/gl.h> |
4 | #include <cmath> |
5 | |
|
|
6 | #include <vector> |
5 | #include <vector> |
7 | |
6 | |
8 | using namespace std; |
7 | using namespace std; |
|
|
8 | |
|
|
9 | #include <GL/gl.h> |
9 | |
10 | |
10 | typedef int soffs; // 32 bit |
11 | typedef int soffs; // 32 bit |
11 | typedef unsigned int uoffs; |
12 | typedef unsigned int uoffs; |
12 | #define OFFS_BITS 31 |
13 | #define OFFS_BITS 31 |
13 | #define SOFFS_MIN (soffs)-(1 << (OFFS_BITS - 1)) |
14 | #define SOFFS_MIN (soffs)-(1 << (OFFS_BITS - 1)) |
… | |
… | |
141 | }; |
142 | }; |
142 | |
143 | |
143 | struct entity_base; |
144 | struct entity_base; |
144 | struct draw_context; |
145 | struct draw_context; |
145 | |
146 | |
|
|
147 | extern struct timer { |
|
|
148 | static double now; |
|
|
149 | static double diff; |
|
|
150 | |
|
|
151 | static void frame (); |
|
|
152 | timer (); |
|
|
153 | } timer; |
|
|
154 | |
146 | #endif |
155 | #endif |
147 | |
156 | |