Thomas Buck 10 lat temu
rodzic
commit
28367b9b24
3 zmienionych plików z 10 dodań i 17 usunięć
  1. 2
    2
      include/World.h
  2. 3
    3
      src/OpenRaider.cpp
  3. 5
    12
      src/SDLSystem.cpp

+ 2
- 2
include/World.h Wyświetl plik

@@ -81,7 +81,7 @@ typedef struct color_s
81 81
 
82 82
 typedef struct sprite_s
83 83
 {
84
-    int num_verts; // 4 == Quad, 3 == Triangle, renderered as triangles
84
+    int num_verts; // 4 == Quad, 3 == Triangle, rendered as triangles
85 85
     vertex_t vertex[4];
86 86
     texel_t texel[4];
87 87
     float pos[3];
@@ -143,7 +143,7 @@ typedef struct entity_s
143 143
 {
144 144
     int id;                    // Unique identifier
145 145
     float pos[3];              // World position
146
-    float angles[3];           // Eular angles (pitch, yaw, roll)
146
+    float angles[3];           // Euler angles (pitch, yaw, roll)
147 147
     int type;                  // {(0x00, item), (0x01, ai), (0x02, player)}
148 148
     int room;                  // Current room entity is in
149 149
     worldMoveType moveType;    // Type of motion/clipping

+ 3
- 3
src/OpenRaider.cpp Wyświetl plik

@@ -1701,7 +1701,7 @@ void OpenRaider::processMoveable(int index, int i, int *ent,
1701 1701
 
1702 1702
     if (a < 0)
1703 1703
     {
1704
-        //      continue;
1704
+        //continue;
1705 1705
         return;
1706 1706
     }
1707 1707
 
@@ -1783,7 +1783,7 @@ void OpenRaider::processMoveable(int index, int i, int *ent,
1783 1783
         printf("c"); // it's already cached
1784 1784
         fflush(stdout);
1785 1785
 
1786
-        //      continue;
1786
+        //continue;
1787 1787
         return;
1788 1788
     }
1789 1789
 
@@ -1893,7 +1893,7 @@ void OpenRaider::processMoveable(int index, int i, int *ent,
1893 1893
                 print(true, "WARNING: Bad animation frame %i > %i\n",
1894 1894
                         frame_offset, m_tombraider.NumFrames());
1895 1895
 
1896
-                // Mongoose 2002.08.15, Atempt to skip more likely bad animation data
1896
+                // Mongoose 2002.08.15, Attempt to skip more likely bad animation data
1897 1897
                 print(true, "WARNING: Handling bad animation data...");
1898 1898
                 return; //continue;
1899 1899
             }

+ 5
- 12
src/SDLSystem.cpp Wyświetl plik

@@ -83,13 +83,13 @@ void SDLSystem::initVideo(unsigned int width, unsigned int height, bool fullscre
83 83
     }
84 84
 #endif
85 85
 
86
-    flags |= SDL_WINDOW_OPENGL;
86
+    flags |= SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE;
87 87
 
88 88
     mFullscreen = fullscreen;
89 89
     if (mFullscreen)
90 90
         flags |= SDL_WINDOW_FULLSCREEN;
91 91
 
92
-    setGrabMouse(true); // Always grab mouse!
92
+    //setGrabMouse(true); // Always grab mouse!
93 93
 
94 94
     SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
95 95
     SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
@@ -101,9 +101,6 @@ void SDLSystem::initVideo(unsigned int width, unsigned int height, bool fullscre
101 101
             width, height, flags);
102 102
     mGLContext = SDL_GL_CreateContext(mWindow);
103 103
 
104
-    //SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
105
-    //SDL_EnableKeyRepeat(100, SDL_DEFAULT_REPEAT_INTERVAL);
106
-
107 104
 #ifdef UNICODE_SUPPORT
108 105
     //@JML get Unicode value of key for international keyboard
109 106
     SDL_EnableUNICODE(1);
@@ -117,15 +114,13 @@ void SDLSystem::initVideo(unsigned int width, unsigned int height, bool fullscre
117 114
 }
118 115
 
119 116
 void SDLSystem::resize(unsigned int width, unsigned int height) {
120
-    GLfloat aspect;
121
-
122 117
     m_width = width;
123 118
     m_height = height;
124 119
 
125
-    aspect = (GLfloat)width/(GLfloat)height;
126
-
127 120
     glViewport(0, 0, width, height);
128 121
 
122
+    /* All this is already done in System::resizeGL() !?
123
+    GLfloat aspect = (GLfloat)width/(GLfloat)height;
129 124
     glMatrixMode(GL_PROJECTION);
130 125
     glLoadIdentity();
131 126
 
@@ -138,6 +133,7 @@ void SDLSystem::resize(unsigned int width, unsigned int height) {
138 133
 
139 134
     glMatrixMode(GL_MODELVIEW);
140 135
     glLoadIdentity();
136
+    */
141 137
 
142 138
     // Resize context
143 139
     resizeGL(width, height);
@@ -365,7 +361,6 @@ void SDLSystem::runGame() {
365 361
                     switch(event.window.event) {
366 362
                         case SDL_WINDOWEVENT_RESIZED:
367 363
                             resizeGL(event.window.data1, event.window.data2);
368
-                            gameFrame();
369 364
                             break;
370 365
                     }
371 366
                     break;
@@ -397,8 +392,6 @@ void SDLSystem::toggleFullscreen() {
397 392
             SDL_SetWindowFullscreen(mWindow, SDL_WINDOW_FULLSCREEN_DESKTOP);
398 393
         else
399 394
             SDL_SetWindowFullscreen(mWindow, 0);
400
-
401
-        // resize(width, height); // not needed with desktop fullscreen
402 395
     }
403 396
 }
404 397
 

Ładowanie…
Anuluj
Zapisz