Przeglądaj źródła

gWorld and LARA for Render now moved to Game

Thomas Buck 11 lat temu
rodzic
commit
452fe3ce8b
3 zmienionych plików z 13 dodań i 3 usunięć
  1. 5
    0
      include/Game.h
  2. 2
    0
      src/Game.cpp
  3. 6
    3
      src/Render.cpp

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

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

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

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

+ 6
- 3
src/Render.cpp Wyświetl plik

24
 #include "Emitter.h"
24
 #include "Emitter.h"
25
 #endif
25
 #endif
26
 
26
 
27
+#include "main.h"
28
+#include "Game.h"
29
+#include "OpenRaider.h"
27
 #include "Render.h"
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
 // Colors
36
 // Colors
34
 const float BLACK[]       = {  0.0f,  0.0f,  0.0f, 1.0f };
37
 const float BLACK[]       = {  0.0f,  0.0f,  0.0f, 1.0f };

Ładowanie…
Anuluj
Zapisz