Przeglądaj źródła

Moved game commands into OpenRaider. Added hop cmd.

Thomas Buck 10 lat temu
rodzic
commit
4cf403d809
5 zmienionych plików z 245 dodań i 262 usunięć
  1. 1
    5
      include/Game.h
  2. 1
    1
      include/Render.h
  3. 0
    219
      src/Game.cpp
  4. 242
    36
      src/OpenRaider.cpp
  5. 1
    1
      src/Render.cpp

+ 1
- 5
include/Game.h Wyświetl plik

@@ -36,12 +36,9 @@ public:
36 36
 
37 37
     void handleMouseMotion(int xrel, int yrel);
38 38
 
39
-    void display();
40
-
41
-    int command(std::vector<char *> *args);
42
-
43 39
     //! \fixme should be private
44 40
     entity_t *mLara;
41
+    bool mLoaded;
45 42
 
46 43
 private:
47 44
 
@@ -56,7 +53,6 @@ private:
56 53
     void processRooms();
57 54
     void setupTextureColor(texture_tri_t *r_tri, float *colorf);
58 55
 
59
-    bool mLoaded;
60 56
     char *mName;
61 57
     TombRaider mTombRaider;
62 58
 

+ 1
- 1
include/Render.h Wyświetl plik

@@ -204,7 +204,7 @@ public:
204 204
     /*!
205 205
      * \brief Renders a single game frame
206 206
      */
207
-    void Display();
207
+    void display();
208 208
 
209 209
     void setSkyMesh(int index, bool rot);
210 210
 

+ 0
- 219
src/Game.cpp Wyświetl plik

@@ -169,225 +169,6 @@ void Game::handleMouseMotion(int xrel, int yrel) {
169 169
     }
170 170
 }
171 171
 
172
-void Game::display() {
173
-    getRender().Display();
174
-}
175
-
176
-int Game::command(std::vector<char *> *args) {
177
-    if (args->size() < 1) {
178
-        getConsole().print("Invalid use of game-command!");
179
-        return -1;
180
-    }
181
-
182
-    char *cmd = args->at(0);
183
-    if (strcmp(cmd, "mode") == 0) {
184
-        if (args->size() > 1) {
185
-            char *mode = args->at(1);
186
-            if (strcmp(mode, "wireframe") == 0) {
187
-                if (mLoaded) {
188
-                    getRender().setMode(Render::modeWireframe);
189
-                    getConsole().print("Wireframe mode");
190
-                } else {
191
-                    getConsole().print("Load a level to set this mode!");
192
-                    return -2;
193
-                }
194
-            } else if (strcmp(mode, "solid") == 0) {
195
-                if (mLoaded) {
196
-                    getRender().setMode(Render::modeSolid);
197
-                    getConsole().print("Solid mode");
198
-                } else {
199
-                    getConsole().print("Load a level to set this mode!");
200
-                    return -3;
201
-                }
202
-            } else if (strcmp(mode, "texture") == 0) {
203
-                if (mLoaded) {
204
-                    getRender().setMode(Render::modeTexture);
205
-                    getConsole().print("Texture mode");
206
-                } else {
207
-                    getConsole().print("Load a level to set this mode!");
208
-                    return -4;
209
-                }
210
-            } else if (strcmp(mode, "vertexlight") == 0) {
211
-                if (mLoaded) {
212
-                    getRender().setMode(Render::modeVertexLight);
213
-                    getConsole().print("Vertexlight mode");
214
-                } else {
215
-                    getConsole().print("Load a level to set this mode!");
216
-                    return -5;
217
-                }
218
-            } else if (strcmp(mode, "titlescreen") == 0) {
219
-                getRender().setMode(Render::modeLoadScreen);
220
-                getConsole().print("Titlescreen mode");
221
-            } else {
222
-                getConsole().print("Invalid use of mode command (%s)!", mode);
223
-                return -6;
224
-            }
225
-        } else {
226
-            getConsole().print("Invalid use of mode command!");
227
-            return -7;
228
-        }
229
-    } else if (strcmp(cmd, "move") == 0) {
230
-        if (args->size() > 1) {
231
-            if (mLoaded) {
232
-                char *move = args->at(1);
233
-                if (strcmp(move, "walk") == 0) {
234
-                    mLara->moveType = worldMoveType_walk;
235
-                    getConsole().print("Lara is walking...");
236
-                } else if (strcmp(move, "fly") == 0) {
237
-                    mLara->moveType = worldMoveType_fly;
238
-                    getConsole().print("Lara is flying...");
239
-                } else if (strcmp(move, "noclip") == 0) {
240
-                    mLara->moveType = worldMoveType_noClipping;
241
-                    getConsole().print("Lara is noclipping...");
242
-                } else {
243
-                    getConsole().print("Invalid use of move command (%s)!", move);
244
-                    return -8;
245
-                }
246
-            } else {
247
-                getConsole().print("Load a level to change the movement type!");
248
-                return -9;
249
-            }
250
-        } else {
251
-            getConsole().print("Invalid use of move command!");
252
-            return -10;
253
-        }
254
-    } else if (strcmp(cmd, "sound") == 0) {
255
-        if (args->size() > 1) {
256
-            getSound().play(atoi(args->at(1)));
257
-        } else {
258
-            getConsole().print("Invalid use of sound command!");
259
-            return -11;
260
-        }
261
-    } else if (strcmp(cmd, "animate") == 0) {
262
-        if (args->size() > 1) {
263
-            char c = args->at(1)[0];
264
-            if (c == 'n') {
265
-                // Step all skeletal models to their next animation
266
-                if (getRender().getFlags() & Render::fAnimateAllModels) {
267
-                    for (unsigned int i = 0; i < getRender().mModels.size(); i++) {
268
-                        SkeletalModel *m = getRender().mModels[i];
269
-                        if (m->getAnimation() < ((int)m->model->animation.size() - 1))
270
-                            m->setAnimation(m->getAnimation() + 1);
271
-                        else
272
-                            if (m->getAnimation() != 0)
273
-                                m->setAnimation(0);
274
-                    }
275
-                } else {
276
-                    getConsole().print("Animations need to be enabled!");
277
-                }
278
-            } else if (c == 'p') {
279
-                // Step all skeletal models to their previous animation
280
-                if (getRender().getFlags() & Render::fAnimateAllModels) {
281
-                    for (unsigned int i = 0; i < getRender().mModels.size(); i++) {
282
-                        SkeletalModel *m = getRender().mModels[i];
283
-                        if (m->getAnimation() > 0)
284
-                            m->setAnimation(m->getAnimation() - 1);
285
-                        else
286
-                            if (m->model->animation.size() > 0)
287
-                                m->setAnimation(m->model->animation.size() - 1);
288
-                    }
289
-                } else {
290
-                    getConsole().print("Animations need to be enabled!");
291
-                }
292
-            } else {
293
-                // Enable or disable animating all skeletal models
294
-                bool b;
295
-                if (readBool(args->at(1), &b) < 0) {
296
-                    getConsole().print("Pass BOOL to animate command!");
297
-                    return -12;
298
-                }
299
-                if (b)
300
-                    getRender().setFlags(Render::fAnimateAllModels);
301
-                else
302
-                    getRender().clearFlags(Render::fAnimateAllModels);
303
-                getConsole().print(b ? "Animating all models" : "No longer animating all models");
304
-            }
305
-        } else {
306
-            getConsole().print("Invalid use of animate command!");
307
-            return -13;
308
-        }
309
-    } else if (strcmp(cmd, "help") == 0) {
310
-        if (args->size() < 2) {
311
-            getConsole().print("game-command Usage:");
312
-            getConsole().print("  game COMMAND");
313
-            getConsole().print("Available commands:");
314
-            getConsole().print("  move [walk|fly|noclip]");
315
-            getConsole().print("  sound INT");
316
-            getConsole().print("  mode MODE");
317
-            getConsole().print("  animate [BOOL|n|p]");
318
-            getConsole().print("  light BOOL");
319
-            getConsole().print("  fog BOOL");
320
-        } else if (strcmp(args->at(1), "sound") == 0) {
321
-            getConsole().print("game-sound-command Usage:");
322
-            getConsole().print("  game sound INT");
323
-            getConsole().print("Where INT is a valid sound ID integer");
324
-        } else if (strcmp(args->at(1), "move") == 0) {
325
-            getConsole().print("game-move-command Usage:");
326
-            getConsole().print("  game move COMMAND");
327
-            getConsole().print("Where COMMAND is one of the following:");
328
-            getConsole().print("  walk");
329
-            getConsole().print("  fly");
330
-            getConsole().print("  noclip");
331
-        } else if (strcmp(args->at(1), "mode") == 0) {
332
-            getConsole().print("game-mode-command Usage:");
333
-            getConsole().print("  game mode MODE");
334
-            getConsole().print("Where MODE is one of the following:");
335
-            getConsole().print("  wireframe");
336
-            getConsole().print("  solid");
337
-            getConsole().print("  texture");
338
-            getConsole().print("  vertexlight");
339
-            getConsole().print("  titlescreen");
340
-        } else if (strcmp(args->at(1), "animate") == 0) {
341
-            getConsole().print("game-animate-command Usage:");
342
-            getConsole().print("  game animate [n|p|BOOL]");
343
-            getConsole().print("Where the commands have the following meaning:");
344
-            getConsole().print("  BOOL to (de)activate animating all models");
345
-            getConsole().print("  n to step all models to their next animation");
346
-            getConsole().print("  p to step all models to their previous animation");
347
-        } else {
348
-            getConsole().print("No help available for game %s.", args->at(1));
349
-            return -14;
350
-        }
351
-    } else if (strcmp(cmd, "light") == 0) {
352
-        if (args->size() >= 2) {
353
-            bool b;
354
-            if (readBool(args->at(1), &b) < 0) {
355
-                getConsole().print("Pass BOOL to light command!");
356
-                return -15;
357
-            }
358
-            if (b)
359
-                getRender().setFlags(Render::fGL_Lights);
360
-            else
361
-                getRender().clearFlags(Render::fGL_Lights);
362
-            getConsole().print("GL-Lights are now %s", b ? "on" : "off");
363
-        } else {
364
-            getConsole().print("Invalid use of game-light-command!");
365
-            return -16;
366
-        }
367
-    } else if (strcmp(cmd, "fog") == 0) {
368
-        if (args->size() >= 2) {
369
-            bool b;
370
-            if (readBool(args->at(1), &b) < 0) {
371
-                getConsole().print("Pass BOOL to fog command!");
372
-                return -17;
373
-            }
374
-            if (b)
375
-                getRender().setFlags(Render::fFog);
376
-            else
377
-                getRender().clearFlags(Render::fFog);
378
-            getConsole().print("Fog is now %s", b ? "on" : "off");
379
-        } else {
380
-            getConsole().print("Invalid use of game-fog-command!");
381
-            return -18;
382
-        }
383
-    } else {
384
-        getConsole().print("Invalid use of game-command (%s)!", cmd);
385
-        return -19;
386
-    }
387
-
388
-    return 0;
389
-}
390
-
391 172
 void Game::processPakSounds()
392 173
 {
393 174
     unsigned char *riff;

+ 242
- 36
src/OpenRaider.cpp Wyświetl plik

@@ -127,36 +127,19 @@ int OpenRaider::command(const char *command, std::vector<char *> *args) {
127 127
     if (strcmp(command, "set") == 0) {
128 128
         if (args->size() != 2) {
129 129
             getConsole().print("Invalid use of set-command");
130
-            return -2;
130
+            return -1;
131 131
         } else {
132 132
             return set(args->at(0), args->at(1));
133 133
         }
134 134
     } else if (strcmp(command, "bind") == 0) {
135 135
         if (args->size() != 2) {
136 136
             getConsole().print("Invalid use of bind-command");
137
-            return -3;
137
+            return -2;
138 138
         } else {
139 139
             return bind(args->at(0), args->at(1));
140 140
         }
141 141
     } else if (strcmp(command, "quit") == 0) {
142 142
         exit(0);
143
-    } else if (strcmp(command, "help") == 0) {
144
-        if (args->size() == 0) {
145
-            getConsole().print("Available commands:");
146
-            getConsole().print("  load  - load a level");
147
-            getConsole().print("  set   - set a parameter");
148
-            getConsole().print("  bind  - bind a keyboard/mouse action");
149
-            getConsole().print("  sshot - make a screenshot");
150
-            getConsole().print("  game  - send a command to the game engine");
151
-            getConsole().print("  help  - print command help");
152
-            getConsole().print("  quit  - exit OpenRaider");
153
-            getConsole().print("Use help COMMAND to get additional info");
154
-        } else if (args->size() == 1) {
155
-            return help(args->at(0));
156
-        } else {
157
-            getConsole().print("Invalid use of help-command");
158
-            return -4;
159
-        }
160 143
     } else if (strcmp(command, "load") == 0) {
161 144
         char *tmp = bufferString("%s/%s", mPakDir, args->at(0));
162 145
         int error = getGame().loadLevel(tmp);
@@ -181,11 +164,207 @@ int OpenRaider::command(const char *command, std::vector<char *> *args) {
181 164
         }
182 165
         getConsole().print("Screenshot stored...");
183 166
         delete filename;
184
-    } else if (strcmp(command, "game") == 0) {
185
-        return getGame().command(args);
167
+    } else if (strcmp(command, "mode") == 0) {
168
+        if (args->size() > 0) {
169
+            char *mode = args->at(0);
170
+            if (strcmp(mode, "wireframe") == 0) {
171
+                if (getGame().mLoaded) {
172
+                    getRender().setMode(Render::modeWireframe);
173
+                    getConsole().print("Wireframe mode");
174
+                } else {
175
+                    getConsole().print("Load a level to set this mode!");
176
+                    return -3;
177
+                }
178
+            } else if (strcmp(mode, "solid") == 0) {
179
+                if (getGame().mLoaded) {
180
+                    getRender().setMode(Render::modeSolid);
181
+                    getConsole().print("Solid mode");
182
+                } else {
183
+                    getConsole().print("Load a level to set this mode!");
184
+                    return -4;
185
+                }
186
+            } else if (strcmp(mode, "texture") == 0) {
187
+                if (getGame().mLoaded) {
188
+                    getRender().setMode(Render::modeTexture);
189
+                    getConsole().print("Texture mode");
190
+                } else {
191
+                    getConsole().print("Load a level to set this mode!");
192
+                    return -5;
193
+                }
194
+            } else if (strcmp(mode, "vertexlight") == 0) {
195
+                if (getGame().mLoaded) {
196
+                    getRender().setMode(Render::modeVertexLight);
197
+                    getConsole().print("Vertexlight mode");
198
+                } else {
199
+                    getConsole().print("Load a level to set this mode!");
200
+                    return -6;
201
+                }
202
+            } else if (strcmp(mode, "titlescreen") == 0) {
203
+                getRender().setMode(Render::modeLoadScreen);
204
+                getConsole().print("Titlescreen mode");
205
+            } else {
206
+                getConsole().print("Invalid use of mode command (%s)!", mode);
207
+                return -7;
208
+            }
209
+        } else {
210
+            getConsole().print("Invalid use of mode command!");
211
+            return -8;
212
+        }
213
+    } else if (strcmp(command, "move") == 0) {
214
+        if (args->size() > 0) {
215
+            if (getGame().mLoaded) {
216
+                char *move = args->at(0);
217
+                if (strcmp(move, "walk") == 0) {
218
+                    getGame().mLara->moveType = worldMoveType_walk;
219
+                    getConsole().print("Lara is walking...");
220
+                } else if (strcmp(move, "fly") == 0) {
221
+                    getGame().mLara->moveType = worldMoveType_fly;
222
+                    getConsole().print("Lara is flying...");
223
+                } else if (strcmp(move, "noclip") == 0) {
224
+                    getGame().mLara->moveType = worldMoveType_noClipping;
225
+                    getConsole().print("Lara is noclipping...");
226
+                } else {
227
+                    getConsole().print("Invalid use of move command (%s)!", move);
228
+                    return -9;
229
+                }
230
+            } else {
231
+                getConsole().print("Load a level to change the movement type!");
232
+                return -10;
233
+            }
234
+        } else {
235
+            getConsole().print("Invalid use of move command!");
236
+            return -11;
237
+        }
238
+    } else if (strcmp(command, "sound") == 0) {
239
+        if (args->size() > 0) {
240
+            getSound().play(atoi(args->at(0)));
241
+        } else {
242
+            getConsole().print("Invalid use of sound command!");
243
+            return -12;
244
+        }
245
+    } else if (strcmp(command, "animate") == 0) {
246
+        if (args->size() > 0) {
247
+            char c = args->at(0)[0];
248
+            if (c == 'n') {
249
+                // Step all skeletal models to their next animation
250
+                if (getRender().getFlags() & Render::fAnimateAllModels) {
251
+                    for (unsigned int i = 0; i < getRender().mModels.size(); i++) {
252
+                        SkeletalModel *m = getRender().mModels[i];
253
+                        if (m->getAnimation() < ((int)m->model->animation.size() - 1))
254
+                            m->setAnimation(m->getAnimation() + 1);
255
+                        else
256
+                            if (m->getAnimation() != 0)
257
+                                m->setAnimation(0);
258
+                    }
259
+                } else {
260
+                    getConsole().print("Animations need to be enabled!");
261
+                }
262
+            } else if (c == 'p') {
263
+                // Step all skeletal models to their previous animation
264
+                if (getRender().getFlags() & Render::fAnimateAllModels) {
265
+                    for (unsigned int i = 0; i < getRender().mModels.size(); i++) {
266
+                        SkeletalModel *m = getRender().mModels[i];
267
+                        if (m->getAnimation() > 0)
268
+                            m->setAnimation(m->getAnimation() - 1);
269
+                        else
270
+                            if (m->model->animation.size() > 0)
271
+                                m->setAnimation(m->model->animation.size() - 1);
272
+                    }
273
+                } else {
274
+                    getConsole().print("Animations need to be enabled!");
275
+                }
276
+            } else {
277
+                // Enable or disable animating all skeletal models
278
+                bool b;
279
+                if (readBool(args->at(0), &b) < 0) {
280
+                    getConsole().print("Pass BOOL to animate command!");
281
+                    return -13;
282
+                }
283
+                if (b)
284
+                    getRender().setFlags(Render::fAnimateAllModels);
285
+                else
286
+                    getRender().clearFlags(Render::fAnimateAllModels);
287
+                getConsole().print(b ? "Animating all models" : "No longer animating all models");
288
+            }
289
+        } else {
290
+            getConsole().print("Invalid use of animate command!");
291
+            return -14;
292
+        }
293
+
294
+    } else if (strcmp(command, "light") == 0) {
295
+        if (args->size() > 0) {
296
+            bool b;
297
+            if (readBool(args->at(0), &b) < 0) {
298
+                getConsole().print("Pass BOOL to light command!");
299
+                return -15;
300
+            }
301
+            if (b)
302
+                getRender().setFlags(Render::fGL_Lights);
303
+            else
304
+                getRender().clearFlags(Render::fGL_Lights);
305
+            getConsole().print("GL-Lights are now %s", b ? "on" : "off");
306
+        } else {
307
+            getConsole().print("Invalid use of light-command!");
308
+            return -16;
309
+        }
310
+    } else if (strcmp(command, "fog") == 0) {
311
+        if (args->size() > 0) {
312
+            bool b;
313
+            if (readBool(args->at(0), &b) < 0) {
314
+                getConsole().print("Pass BOOL to fog command!");
315
+                return -17;
316
+            }
317
+            if (b)
318
+                getRender().setFlags(Render::fFog);
319
+            else
320
+                getRender().clearFlags(Render::fFog);
321
+            getConsole().print("Fog is now %s", b ? "on" : "off");
322
+        } else {
323
+            getConsole().print("Invalid use of fog-command!");
324
+            return -18;
325
+        }
326
+    } else if (strcmp(command, "hop") == 0) {
327
+        if (args->size() > 0) {
328
+            bool b;
329
+            if (readBool(args->at(0), &b) < 0) {
330
+                getConsole().print("Pass BOOL to hop command!");
331
+                return -19;
332
+            }
333
+            if (b)
334
+                getWorld().setFlag(World::fEnableHopping);
335
+            else
336
+                getWorld().clearFlag(World::fEnableHopping);
337
+            getConsole().print("Room hopping is now %s", b ? "on" : "off");
338
+        } else {
339
+            getConsole().print("Invalid use of hop-command!");
340
+            return -20;
341
+        }
342
+    } else if (strcmp(command, "help") == 0) {
343
+        if (args->size() == 0) {
344
+            getConsole().print("Available commands:");
345
+            getConsole().print("  load    - load a level");
346
+            getConsole().print("  set     - set a parameter");
347
+            getConsole().print("  bind    - bind a keyboard/mouse action");
348
+            getConsole().print("  sshot   - make a screenshot");
349
+            getConsole().print("  move    - [walk|fly|noclip]");
350
+            getConsole().print("  sound   - INT - Test play sound");
351
+            getConsole().print("  mode    - MODE - Render mode");
352
+            getConsole().print("  animate - [BOOL|n|p] - Animate models");
353
+            getConsole().print("  light   - BOOL - GL Lights");
354
+            getConsole().print("  fog     - BOOL - GL Fog");
355
+            getConsole().print("  hop     - BOOL - Room hop");
356
+            getConsole().print("  help    - print command help");
357
+            getConsole().print("  quit    - exit OpenRaider");
358
+            getConsole().print("Use help COMMAND to get additional info");
359
+        } else if (args->size() == 1) {
360
+            return help(args->at(0));
361
+        } else {
362
+            getConsole().print("Invalid use of help-command");
363
+            return -21;
364
+        }
186 365
     } else {
187 366
         getConsole().print("Unknown command: %s ", command);
188
-        return -1;
367
+        return -22;
189 368
     }
190 369
 
191 370
     return 0;
@@ -199,19 +378,19 @@ int OpenRaider::help(const char *cmd) {
199 378
         getConsole().print("set-Command Usage:");
200 379
         getConsole().print("  set VAR VAL");
201 380
         getConsole().print("Available Variables:");
202
-        getConsole().print("  basedir     STRING");
203
-        getConsole().print("  pakdir      STRING");
204
-        getConsole().print("  audiodir    STRING");
205
-        getConsole().print("  datadir     STRING");
206
-        getConsole().print("  font        STRING");
207
-        getConsole().print("  gldriver    STRING");
208
-        getConsole().print("  size        \"INTxINT\"");
209
-        getConsole().print("  fullscreen  BOOL");
210
-        getConsole().print("  audio       BOOL");
211
-        getConsole().print("  volume      BOOL");
212
-        getConsole().print("  mouse_x     FLOAT");
213
-        getConsole().print("  mouse_y     FLOAT");
214
-        getConsole().print("  fps         BOOL");
381
+        getConsole().print("  basedir    STRING");
382
+        getConsole().print("  pakdir     STRING");
383
+        getConsole().print("  audiodir   STRING");
384
+        getConsole().print("  datadir    STRING");
385
+        getConsole().print("  font       STRING");
386
+        getConsole().print("  gldriver   STRING");
387
+        getConsole().print("  size       \"INTxINT\"");
388
+        getConsole().print("  fullscreen BOOL");
389
+        getConsole().print("  audio      BOOL");
390
+        getConsole().print("  volume     BOOL");
391
+        getConsole().print("  mouse_x    FLOAT");
392
+        getConsole().print("  mouse_y    FLOAT");
393
+        getConsole().print("  fps        BOOL");
215 394
         getConsole().print("Enclose STRINGs with \"\"!");
216 395
         getConsole().print("size expects a STRING in the specified format");
217 396
     } else if (strcmp(cmd, "bind") == 0) {
@@ -240,6 +419,33 @@ int OpenRaider::help(const char *cmd) {
240 419
         getConsole().print("sshot-Command Usage:");
241 420
         getConsole().print("  sshot [console|menu]");
242 421
         getConsole().print("Add console/menu to capture them too");
422
+    } else if (strcmp(cmd, "sound") == 0) {
423
+        getConsole().print("sound-Command Usage:");
424
+        getConsole().print("  sound INT");
425
+        getConsole().print("Where INT is a valid sound ID integer");
426
+    } else if (strcmp(cmd, "move") == 0) {
427
+        getConsole().print("move-Command Usage:");
428
+        getConsole().print("  move COMMAND");
429
+        getConsole().print("Where COMMAND is one of the following:");
430
+        getConsole().print("  walk");
431
+        getConsole().print("  fly");
432
+        getConsole().print("  noclip");
433
+    } else if (strcmp(cmd, "mode") == 0) {
434
+        getConsole().print("mode-Command Usage:");
435
+        getConsole().print("  mode MODE");
436
+        getConsole().print("Where MODE is one of the following:");
437
+        getConsole().print("  wireframe");
438
+        getConsole().print("  solid");
439
+        getConsole().print("  texture");
440
+        getConsole().print("  vertexlight");
441
+        getConsole().print("  titlescreen");
442
+    } else if (strcmp(cmd, "animate") == 0) {
443
+        getConsole().print("animate-Command Usage:");
444
+        getConsole().print("  animate [n|p|BOOL]");
445
+        getConsole().print("Where the commands have the following meaning:");
446
+        getConsole().print("  BOOL to (de)activate animating all models");
447
+        getConsole().print("  n to step all models to their next animation");
448
+        getConsole().print("  p to step all models to their previous animation");
243 449
     } else {
244 450
         getConsole().print("No help available for %s", cmd);
245 451
         return -1;
@@ -638,7 +844,7 @@ void OpenRaider::frame() {
638 844
     glClear(GL_COLOR_BUFFER_BIT);
639 845
 
640 846
     // Draw game scene
641
-    getGame().display();
847
+    getRender().display();
642 848
 
643 849
     // Draw 2D overlays (console and menu)
644 850
     getWindow().glEnter2D();

+ 1
- 1
src/Render.cpp Wyświetl plik

@@ -477,7 +477,7 @@ void gluLookAt(float eyeX, float eyeY, float eyeZ,
477 477
     glTranslatef(-eyeX, -eyeY, -eyeZ);
478 478
 }
479 479
 
480
-void Render::Display()
480
+void Render::display()
481 481
 {
482 482
     vec3_t curPos;
483 483
     vec3_t camPos;

Ładowanie…
Anuluj
Zapisz