|
@@ -24,10 +24,19 @@
|
24
|
24
|
|
25
|
25
|
// Old Code compatibility
|
26
|
26
|
#define TexelScale 256.0f
|
27
|
|
-#define TextureLimit 24
|
28
|
|
-std::map<int, int> gMapTex2Bump;
|
29
|
27
|
skeletal_model_t *gLaraModel;
|
|
28
|
+
|
|
29
|
+#ifndef EXPERIMENTAL_UNFIFIED_ROOM_GEOMETERY
|
|
30
|
+#define TextureLimit 24
|
|
31
|
+#endif
|
|
32
|
+
|
|
33
|
+#ifdef EXPERIMENTAL
|
30
|
34
|
std::vector<unsigned int> gColorTextureHACK;
|
|
35
|
+#endif
|
|
36
|
+
|
|
37
|
+#ifdef MULTITEXTURE
|
|
38
|
+std::map<int, int> gMapTex2Bump;
|
|
39
|
+#endif
|
31
|
40
|
|
32
|
41
|
Game::Game() {
|
33
|
42
|
mLoaded = false;
|
|
@@ -314,6 +323,7 @@ int Game::command(std::vector<char *> *args) {
|
314
|
323
|
getConsole().print(" sound INT");
|
315
|
324
|
getConsole().print(" mode MODE");
|
316
|
325
|
getConsole().print(" animate [BOOL|n|p]");
|
|
326
|
+ getConsole().print(" light BOOL");
|
317
|
327
|
} else if (strcmp(args->at(1), "sound") == 0) {
|
318
|
328
|
getConsole().print("game-sound-command Usage:");
|
319
|
329
|
getConsole().print(" game sound INT");
|
|
@@ -345,9 +355,25 @@ int Game::command(std::vector<char *> *args) {
|
345
|
355
|
getConsole().print("No help available for game %s.", args->at(1));
|
346
|
356
|
return -14;
|
347
|
357
|
}
|
|
358
|
+ } else if (strcmp(cmd, "light") == 0) {
|
|
359
|
+ if (args->size() >= 2) {
|
|
360
|
+ bool b;
|
|
361
|
+ if (readBool(args->at(1), &b) < 0) {
|
|
362
|
+ getConsole().print("Pass BOOL to light command!");
|
|
363
|
+ return -15;
|
|
364
|
+ }
|
|
365
|
+ if (b)
|
|
366
|
+ mRender->setFlags(Render::fGL_Lights);
|
|
367
|
+ else
|
|
368
|
+ mRender->clearFlags(Render::fGL_Lights);
|
|
369
|
+ getConsole().print("GL-Lights are now %s", b ? "on" : "off");
|
|
370
|
+ } else {
|
|
371
|
+ getConsole().print("Invalid use of game-light-command!");
|
|
372
|
+ return -16;
|
|
373
|
+ }
|
348
|
374
|
} else {
|
349
|
375
|
getConsole().print("Invalid use of game-command (%s)!", cmd);
|
350
|
|
- return -15;
|
|
376
|
+ return -17;
|
351
|
377
|
}
|
352
|
378
|
|
353
|
379
|
return 0;
|
|
@@ -418,12 +444,16 @@ void Game::processTextures()
|
418
|
444
|
// Overwrite any previous level textures on load
|
419
|
445
|
mRender->loadTexture(image, 256, 256, mTextureLevelOffset + i);
|
420
|
446
|
|
|
447
|
+#ifdef MULTITEXTURE
|
421
|
448
|
gMapTex2Bump[mTextureLevelOffset + i] = -1;
|
|
449
|
+#endif
|
422
|
450
|
|
423
|
451
|
if (bumpmap)
|
424
|
452
|
{
|
|
453
|
+#ifdef MULTITEXTURE
|
425
|
454
|
gMapTex2Bump[mTextureLevelOffset + i] = mTextureLevelOffset + i +
|
426
|
455
|
mTombRaider.NumTextures();
|
|
456
|
+#endif
|
427
|
457
|
mRender->loadTexture(bumpmap, 256, 256, mTextureLevelOffset + i +
|
428
|
458
|
mTombRaider.NumTextures());
|
429
|
459
|
}
|