Преглед изворни кода

gWorld and LARA for Render now moved to Game

Thomas Buck пре 10 година
родитељ
комит
452fe3ce8b
3 измењених фајлова са 13 додато и 3 уклоњено
  1. 5
    0
      include/Game.h
  2. 2
    0
      src/Game.cpp
  3. 6
    3
      src/Render.cpp

+ 5
- 0
include/Game.h Прегледај датотеку

@@ -10,6 +10,7 @@
10 10
 
11 11
 #include "global.h"
12 12
 #include "TombRaider.h"
13
+#include "World.h"
13 14
 
14 15
 /*!
15 16
  * \brief Game abstraction
@@ -30,10 +31,14 @@ public:
30 31
 
31 32
     void percentCallback(int percent);
32 33
 
34
+    World mWorld;
35
+    entity_t *mLara;
36
+
33 37
 private:
34 38
 
35 39
     char *mName;
36 40
     TombRaider mTombRaider;
41
+
37 42
 };
38 43
 
39 44
 #endif

+ 2
- 0
src/Game.cpp Прегледај датотеку

@@ -29,6 +29,8 @@ void Game::percentCallback(int percent) {
29 29
 
30 30
 // Throw exception with negative integer error code if fails
31 31
 Game::Game(const char *level) {
32
+    mLara = NULL;
33
+
32 34
     mName = bufferString("%s", level);
33 35
 
34 36
     // Load the level pak into TombRaider

+ 6
- 3
src/Render.cpp Прегледај датотеку

@@ -24,11 +24,14 @@
24 24
 #include "Emitter.h"
25 25
 #endif
26 26
 
27
+#include "main.h"
28
+#include "Game.h"
29
+#include "OpenRaider.h"
27 30
 #include "Render.h"
28 31
 
29
-//! \fixme really should be changed!
30
-entity_t *LARA = NULL;
31
-World gWorld;
32
+//! \fixme Should be changed
33
+#define LARA gOpenRaider->mGame->mLara
34
+#define gWorld gOpenRaider->mGame->mWorld
32 35
 
33 36
 // Colors
34 37
 const float BLACK[]       = {  0.0f,  0.0f,  0.0f, 1.0f };

Loading…
Откажи
Сачувај