|
@@ -1,19 +1,19 @@
|
1
|
1
|
/* -*- Mode: C++; tab-width: 3; indent-tabs-mode: t; c-basic-offset: 3 -*- */
|
2
|
2
|
/*================================================================
|
3
|
|
- *
|
|
3
|
+ *
|
4
|
4
|
* Project : OpenRaider
|
5
|
5
|
* Author : Terry 'Mongoose' Hendrix II
|
6
|
6
|
* Website : http://www.westga.edu/~stu7440/
|
7
|
7
|
* Email : stu7440@westga.edu
|
8
|
8
|
* Object : SDLSystem
|
9
|
9
|
* License : No use w/o permission (C) 2002 Mongoose
|
10
|
|
- * Comments:
|
|
10
|
+ * Comments:
|
11
|
11
|
*
|
12
|
12
|
*
|
13
|
|
- * This file was generated using Mongoose's C++
|
|
13
|
+ * This file was generated using Mongoose's C++
|
14
|
14
|
* template generator script. <stu7440@westga.edu>
|
15
|
|
- *
|
16
|
|
- *-- History ------------------------------------------------
|
|
15
|
+ *
|
|
16
|
+ *-- History ------------------------------------------------
|
17
|
17
|
*
|
18
|
18
|
* 2002.06.06:
|
19
|
19
|
* Mongoose - Created
|
|
@@ -41,12 +41,12 @@ class SDLSystem : public System
|
41
|
41
|
|
42
|
42
|
SDLSystem();
|
43
|
43
|
/*------------------------------------------------------
|
44
|
|
- * Pre :
|
|
44
|
+ * Pre :
|
45
|
45
|
* Post : Constructs an object of SDLSystem
|
46
|
46
|
*
|
47
|
47
|
*-- History ------------------------------------------
|
48
|
48
|
*
|
49
|
|
- * 2002.06.06:
|
|
49
|
+ * 2002.06.06:
|
50
|
50
|
* Mongoose - Created
|
51
|
51
|
------------------------------------------------------*/
|
52
|
52
|
|
|
@@ -57,7 +57,7 @@ class SDLSystem : public System
|
57
|
57
|
*
|
58
|
58
|
*-- History ------------------------------------------
|
59
|
59
|
*
|
60
|
|
- * 2002.06.06:
|
|
60
|
+ * 2002.06.06:
|
61
|
61
|
* Mongoose - Created
|
62
|
62
|
------------------------------------------------------*/
|
63
|
63
|
|
|
@@ -68,13 +68,13 @@ class SDLSystem : public System
|
68
|
68
|
|
69
|
69
|
virtual unsigned int getTicks();
|
70
|
70
|
/*------------------------------------------------------
|
71
|
|
- * Pre :
|
|
71
|
+ * Pre :
|
72
|
72
|
* Post : Returns number of milliseconds since start of
|
73
|
73
|
* program
|
74
|
74
|
*
|
75
|
75
|
*-- History ------------------------------------------
|
76
|
76
|
*
|
77
|
|
- * 2002.06.06:
|
|
77
|
+ * 2002.06.06:
|
78
|
78
|
* Mongoose - Created
|
79
|
79
|
------------------------------------------------------*/
|
80
|
80
|
|
|
@@ -83,13 +83,13 @@ class SDLSystem : public System
|
83
|
83
|
// Public Mutators
|
84
|
84
|
////////////////////////////////////////////////////////////
|
85
|
85
|
|
86
|
|
- //FIXME: void bindKeyCommand(char *cmd, int key, int event);
|
|
86
|
+ //FIXME: void bindKeyCommand(const char *cmd, int key, int event);
|
87
|
87
|
/*------------------------------------------------------
|
88
|
88
|
* Pre : <Cmd> is a valid command string
|
89
|
89
|
* <Key> is a valid keyboard code
|
90
|
90
|
* <Event> is a valid game event Id
|
91
|
91
|
*
|
92
|
|
- * Post : Sets <Event> binding <Cmd> to <Key> press
|
|
92
|
+ * Post : Sets <Event> binding <Cmd> to <Key> press
|
93
|
93
|
*
|
94
|
94
|
*-- History ------------------------------------------
|
95
|
95
|
*
|
|
@@ -101,7 +101,7 @@ class SDLSystem : public System
|
101
|
101
|
/*------------------------------------------------------
|
102
|
102
|
* Pre : <X>, and <Y> are valid world coordinates
|
103
|
103
|
* <String> is a valid string
|
104
|
|
- *
|
|
104
|
+ *
|
105
|
105
|
* Requires glEnterMode2d() call before entry
|
106
|
106
|
*
|
107
|
107
|
* System::bufferString(..) can cache printf()
|
|
@@ -117,7 +117,7 @@ class SDLSystem : public System
|
117
|
117
|
* 2003.06.03:
|
118
|
118
|
* Mongoose - Ported to SDL_TTF
|
119
|
119
|
*
|
120
|
|
- * 2001.12.31:
|
|
120
|
+ * 2001.12.31:
|
121
|
121
|
* Mongoose - Created
|
122
|
122
|
------------------------------------------------------*/
|
123
|
123
|
|
|
@@ -136,11 +136,11 @@ class SDLSystem : public System
|
136
|
136
|
* 2003.06.03:
|
137
|
137
|
* Mongoose - Ported to SDL_TTF
|
138
|
138
|
*
|
139
|
|
- * 2001.12.31:
|
|
139
|
+ * 2001.12.31:
|
140
|
140
|
* Mongoose - Created
|
141
|
141
|
------------------------------------------------------*/
|
142
|
142
|
|
143
|
|
- void initVideo(unsigned int width, unsigned int height,
|
|
143
|
+ void initVideo(unsigned int width, unsigned int height,
|
144
|
144
|
bool fullscreen);
|
145
|
145
|
/*------------------------------------------------------
|
146
|
146
|
* Pre : Video mode request <Width> x <Height>
|
|
@@ -150,36 +150,36 @@ class SDLSystem : public System
|
150
|
150
|
*
|
151
|
151
|
*-- History ------------------------------------------
|
152
|
152
|
*
|
153
|
|
- * 2002.06.06:
|
|
153
|
+ * 2002.06.06:
|
154
|
154
|
* Mongoose - Created
|
155
|
155
|
------------------------------------------------------*/
|
156
|
156
|
|
157
|
157
|
void resize(unsigned int width, unsigned int height);
|
158
|
158
|
/*------------------------------------------------------
|
159
|
|
- * Pre :
|
|
159
|
+ * Pre :
|
160
|
160
|
* Post : Resizes game window
|
161
|
161
|
*
|
162
|
162
|
*-- History ------------------------------------------
|
163
|
163
|
*
|
164
|
|
- * 2002.06.06:
|
|
164
|
+ * 2002.06.06:
|
165
|
165
|
* Mongoose - Created, from old SDLUnitTest code
|
166
|
166
|
------------------------------------------------------*/
|
167
|
167
|
|
168
|
168
|
void runGame();
|
169
|
169
|
/*------------------------------------------------------
|
170
|
|
- * Pre :
|
|
170
|
+ * Pre :
|
171
|
171
|
* Post : Start game loop
|
172
|
172
|
*
|
173
|
173
|
*-- History ------------------------------------------
|
174
|
174
|
*
|
175
|
|
- * 2002.06.06:
|
|
175
|
+ * 2002.06.06:
|
176
|
176
|
* Mongoose - Created
|
177
|
177
|
------------------------------------------------------*/
|
178
|
178
|
|
179
|
179
|
void setGrabMouse(bool on);
|
180
|
180
|
/*------------------------------------------------------
|
181
|
|
- * Pre :
|
182
|
|
- * Post :
|
|
181
|
+ * Pre :
|
|
182
|
+ * Post :
|
183
|
183
|
*
|
184
|
184
|
*-- History ------------------------------------------
|
185
|
185
|
*
|
|
@@ -189,34 +189,34 @@ class SDLSystem : public System
|
189
|
189
|
|
190
|
190
|
void shutdown(int i);
|
191
|
191
|
/*------------------------------------------------------
|
192
|
|
- * Pre :
|
|
192
|
+ * Pre :
|
193
|
193
|
* Post : Shutsdown the game subsystems, exits game loop
|
194
|
194
|
*
|
195
|
195
|
*-- History ------------------------------------------
|
196
|
196
|
*
|
197
|
|
- * 2002.06.06:
|
|
197
|
+ * 2002.06.06:
|
198
|
198
|
* Mongoose - Created
|
199
|
199
|
------------------------------------------------------*/
|
200
|
200
|
|
201
|
201
|
void swapBuffersGL();
|
202
|
202
|
/*------------------------------------------------------
|
203
|
|
- * Pre :
|
|
203
|
+ * Pre :
|
204
|
204
|
* Post : Swaps OpenGL buufers ( call at end of frame )
|
205
|
205
|
*
|
206
|
206
|
*-- History ------------------------------------------
|
207
|
207
|
*
|
208
|
|
- * 2002.06.06:
|
|
208
|
+ * 2002.06.06:
|
209
|
209
|
* Mongoose - Created
|
210
|
210
|
------------------------------------------------------*/
|
211
|
211
|
|
212
|
212
|
void toggleFullscreen();
|
213
|
213
|
/*------------------------------------------------------
|
214
|
|
- * Pre :
|
|
214
|
+ * Pre :
|
215
|
215
|
* Post : Toggle fullscreen windowing mode
|
216
|
216
|
*
|
217
|
217
|
*-- History ------------------------------------------
|
218
|
218
|
*
|
219
|
|
- * 2002.06.06:
|
|
219
|
+ * 2002.06.06:
|
220
|
220
|
* Mongoose - Created
|
221
|
221
|
------------------------------------------------------*/
|
222
|
222
|
|
|
@@ -231,7 +231,7 @@ class SDLSystem : public System
|
231
|
231
|
////////////////////////////////////////////////////////////
|
232
|
232
|
// Private Mutators
|
233
|
233
|
////////////////////////////////////////////////////////////
|
234
|
|
-
|
|
234
|
+
|
235
|
235
|
SDL_Surface *mWindow; /* This is the pointer to the SDL surface */
|
236
|
236
|
};
|
237
|
237
|
#endif
|