Pārlūkot izejas kodu

Removed cmake windows.h detection

Thomas Buck 10 gadus atpakaļ
vecāks
revīzija
d8e3f8df9e
9 mainītis faili ar 14 papildinājumiem un 35 dzēšanām
  1. 2
    1
      TODO.md
  2. 0
    6
      include/TombRaider.h
  3. 0
    5
      include/config.h.in
  4. 1
    1
      include/global.h
  5. 0
    6
      src/CMakeLists.txt
  6. 1
    0
      src/Command.cpp
  7. 1
    1
      src/Menu.cpp
  8. 9
    9
      src/TombRaider.cpp
  9. 0
    6
      src/WindowSDL.cpp

+ 2
- 1
TODO.md Parādīt failu

4
 
4
 
5
 * Endian dependence ugly, shouldn't dereference to different types?
5
 * Endian dependence ugly, shouldn't dereference to different types?
6
     * TombRaider.h/cpp structs aren't aligned... unportable to some big endian & other archs?!
6
     * TombRaider.h/cpp structs aren't aligned... unportable to some big endian & other archs?!
7
+    * Maybe replace loader with [VT](http://icculus.org/vt/), also used by OpenTomb.
7
 * Use more asserts
8
 * Use more asserts
8
 * Don't use C-Style code, try to replace with C++ lib
9
 * Don't use C-Style code, try to replace with C++ lib
9
     * Use std::strings
10
     * Use std::strings
24
 ## Future Features
25
 ## Future Features
25
 
26
 
26
 * Cut TGA image reader, currently only used for menu background?!
27
 * Cut TGA image reader, currently only used for menu background?!
27
-    * Abstract image reading/writing, like Font Engine selection
28
+    * Need useful, always available image writer alternative for screenshots then
28
 * When cutscene rendering is working, use TR4/5 style menu?
29
 * When cutscene rendering is working, use TR4/5 style menu?
29
 
30
 

+ 0
- 6
include/TombRaider.h Parādīt failu

12
 #include <cstdint>
12
 #include <cstdint>
13
 #include <cstdio>
13
 #include <cstdio>
14
 
14
 
15
-#ifdef WIN32
16
-typedef uint8_t u_int8_t;
17
-typedef uint16_t u_int16_t;
18
-typedef uint32_t u_int32_t;
19
-#endif
20
-
21
 #include "TombRaiderData.h"
15
 #include "TombRaiderData.h"
22
 
16
 
23
 /*!
17
 /*!

+ 0
- 5
include/config.h.in Parādīt failu

24
 #cmakedefine HAVE_CLOSEDIR
24
 #cmakedefine HAVE_CLOSEDIR
25
 #cmakedefine HAVE_DT_DIR
25
 #cmakedefine HAVE_DT_DIR
26
 
26
 
27
-#cmakedefine HAVE_WINDOWS_H
28
-#cmakedefine HAVE_FINDFIRSTFILE
29
-#cmakedefine HAVE_FINDNEXTFILE
30
-#cmakedefine HAVE_FINDCLOSE
31
-
32
 #endif
27
 #endif
33
 
28
 

+ 1
- 1
include/global.h Parādīt failu

98
 #ifdef __APPLE__
98
 #ifdef __APPLE__
99
 #include <OpenGL/gl.h>
99
 #include <OpenGL/gl.h>
100
 #else
100
 #else
101
-#ifdef HAVE_WINDOWS_H
101
+#ifdef _WIN32
102
 #include <windows.h>
102
 #include <windows.h>
103
 #endif
103
 #endif
104
 #include <GL/gl.h>
104
 #include <GL/gl.h>

+ 0
- 6
src/CMakeLists.txt Parādīt failu

120
 check_function_exists (closedir HAVE_CLOSEDIR)
120
 check_function_exists (closedir HAVE_CLOSEDIR)
121
 check_symbol_exists (DT_DIR "dirent.h" HAVE_DT_DIR)
121
 check_symbol_exists (DT_DIR "dirent.h" HAVE_DT_DIR)
122
 
122
 
123
-# recursive folder traversal for Windows
124
-check_include_files (windows.h HAVE_WINDOWS_H)
125
-check_function_exists (FindFirstFile HAVE_FINDFIRSTFILE)
126
-check_function_exists (FindNextFile HAVE_FINDNEXTFILE)
127
-check_function_exists (FindClose HAVE_FINDCLOSE)
128
-
129
 #################################################################
123
 #################################################################
130
 
124
 
131
 # Configuration Header file
125
 # Configuration Header file

+ 1
- 0
src/Command.cpp Parādīt failu

439
         getConsole().print("  crouch");
439
         getConsole().print("  crouch");
440
         getConsole().print("  use");
440
         getConsole().print("  use");
441
         getConsole().print("  holster");
441
         getConsole().print("  holster");
442
+        getConsole().print("  walk");
442
         getConsole().print("Key-Format:");
443
         getConsole().print("Key-Format:");
443
         getConsole().print("  'a' or '1'    for character/number keys");
444
         getConsole().print("  'a' or '1'    for character/number keys");
444
         getConsole().print("  \"leftctrl\"  for symbols and special keys");
445
         getConsole().print("  \"leftctrl\"  for symbols and special keys");

+ 1
- 1
src/Menu.cpp Parādīt failu

18
 #if defined(HAVE_DIRENT_H) && defined(HAVE_OPENDIR) && defined(HAVE_READDIR_R) && defined(HAVE_CLOSEDIR) && defined(HAVE_DT_DIR)
18
 #if defined(HAVE_DIRENT_H) && defined(HAVE_OPENDIR) && defined(HAVE_READDIR_R) && defined(HAVE_CLOSEDIR) && defined(HAVE_DT_DIR)
19
 #include <dirent.h>
19
 #include <dirent.h>
20
 #define USE_DIRENT
20
 #define USE_DIRENT
21
-#elif (defined(HAVE_WINDOWS_H) && defined(HAVE_FINDFIRSTFILE) && defined(HAVE_FINDNEXTFILE) && defined(HAVE_FINDCLOSE)) || defined (_WIN32)
21
+#elif defined (_WIN32)
22
 #include <windows.h>
22
 #include <windows.h>
23
 #define USE_FINDFILE
23
 #define USE_FINDFILE
24
 #else
24
 #else

+ 9
- 9
src/TombRaider.cpp Parādīt failu

1782
             mFreadMode = TR_FREAD_NORMAL;
1782
             mFreadMode = TR_FREAD_NORMAL;
1783
             // 0x46464952
1783
             // 0x46464952
1784
 
1784
 
1785
-            //! \fixme (Endian) Read bitu32 / u_int32_t
1785
+            //! \fixme (Endian) Read bitu32 / uint32_t
1786
             Fread(&mNumTR4Samples, 4, 1, f);
1786
             Fread(&mNumTR4Samples, 4, 1, f);
1787
             printDebug("Load", "mNumTR4Samples = %i", mNumTR4Samples);
1787
             printDebug("Load", "mNumTR4Samples = %i", mNumTR4Samples);
1788
 
1788
 
4931
     unsigned int level_data_sz, riffOffset, seperator0;
4931
     unsigned int level_data_sz, riffOffset, seperator0;
4932
     unsigned int portalOffset, nextRoomOffset, thisRoomOffset;
4932
     unsigned int portalOffset, nextRoomOffset, thisRoomOffset;
4933
     int i, j, k;
4933
     int i, j, k;
4934
-    u_int16_t us;
4934
+    uint16_t us;
4935
 
4935
 
4936
-    u_int32_t numMeshData, numMeshPointers, u;
4937
-    u_int32_t *meshPointers;
4938
-    u_int8_t *meshData;
4936
+    uint32_t numMeshData, numMeshPointers, u;
4937
+    uint32_t *meshPointers;
4938
+    uint8_t *meshData;
4939
     char check[32];
4939
     char check[32];
4940
 
4940
 
4941
     printDebug("Load", "mEngineVersion = 0x%x", mPakVersion);
4941
     printDebug("Load", "mEngineVersion = 0x%x", mPakVersion);
5107
 
5107
 
5108
     // Mongoose 2002.01.08, Michiel has discovered the
5108
     // Mongoose 2002.01.08, Michiel has discovered the
5109
     //   first 4 bytes here are 2 bitu16 flags for Lara type and weather
5109
     //   first 4 bytes here are 2 bitu16 flags for Lara type and weather
5110
-    u_int16_t laraType, weather;
5110
+    uint16_t laraType, weather;
5111
 
5111
 
5112
     Fread(&laraType, 2, 1, f);
5112
     Fread(&laraType, 2, 1, f);
5113
     printDebug("LoadTR5", "laraType = 0x%x", laraType);
5113
     printDebug("LoadTR5", "laraType = 0x%x", laraType);
5850
     // Use pointers array to index in meshData array for tr5_mesh_t's
5850
     // Use pointers array to index in meshData array for tr5_mesh_t's
5851
     Fread(&numMeshPointers, 4, 1, f);
5851
     Fread(&numMeshPointers, 4, 1, f);
5852
     printDebug("LoadTR5", "numMeshPointers = %u", numMeshPointers);
5852
     printDebug("LoadTR5", "numMeshPointers = %u", numMeshPointers);
5853
-    meshPointers = new u_int32_t[numMeshPointers];
5853
+    meshPointers = new uint32_t[numMeshPointers];
5854
     Fread(meshPointers, 4, numMeshPointers, f);
5854
     Fread(meshPointers, 4, numMeshPointers, f);
5855
 
5855
 
5856
     Fread(&numAnimationsTR5, 4, 1, f);
5856
     Fread(&numAnimationsTR5, 4, 1, f);
5885
     Fread(&u, 4, 1, f);
5885
     Fread(&u, 4, 1, f);
5886
     _num_frames = u;
5886
     _num_frames = u;
5887
     printDebug("LoadTR5", "_num_frames = %u", _num_frames);
5887
     printDebug("LoadTR5", "_num_frames = %u", _num_frames);
5888
-    _frames = new u_int16_t[_num_frames];
5888
+    _frames = new uint16_t[_num_frames];
5889
     Fread(_frames, 2, _num_frames, f);
5889
     Fread(_frames, 2, _num_frames, f);
5890
 
5890
 
5891
     Fread(&numMoveablesTR5, 4, 1, f);
5891
     Fread(&numMoveablesTR5, 4, 1, f);
6068
         fseek(f, u, SEEK_SET);
6068
         fseek(f, u, SEEK_SET);
6069
     }
6069
     }
6070
 
6070
 
6071
-    //! \fixme (Endian) Read bitu32 / u_int32_t
6071
+    //! \fixme (Endian) Read bitu32 / uint32_t
6072
     Fread(&mNumTR4Samples, 4, 1, f);
6072
     Fread(&mNumTR4Samples, 4, 1, f);
6073
     printDebug("Load", "mNumTR4Samples = %i", mNumTR4Samples);
6073
     printDebug("Load", "mNumTR4Samples = %i", mNumTR4Samples);
6074
 
6074
 

+ 0
- 6
src/WindowSDL.cpp Parādīt failu

24
     mTextInput = false;
24
     mTextInput = false;
25
     mWindow = NULL;
25
     mWindow = NULL;
26
     mGLContext = NULL;
26
     mGLContext = NULL;
27
-
28
-#ifdef _WIN32
29
-    setDriver("libGL32.dll");
30
-#elif !defined(__APPLE__)
31
-    setDriver("/usr/lib/libGL.so.1");
32
-#endif
33
 }
27
 }
34
 
28
 
35
 WindowSDL::~WindowSDL() {
29
 WindowSDL::~WindowSDL() {

Notiek ielāde…
Atcelt
Saglabāt