Browse Source

Much faster startup.

Just increased the animation speed.
Thomas Buck 11 years ago
parent
commit
f1dba07ade
4 changed files with 19 additions and 70 deletions
  1. 5
    4
      src/OpenRaider.cpp
  2. 6
    2
      src/Render.cpp
  3. 5
    26
      src/hel/CollisionObject.cpp
  4. 3
    38
      src/hel/CollisionObject.h

+ 5
- 4
src/OpenRaider.cpp View File

@@ -144,7 +144,7 @@ OpenRaider::~OpenRaider()
144 144
 	// Mongoose 2002.01.02, FIXME GL call to critical section,
145 145
 	//   needs mutex really
146 146
 	m_render.setMode(Render::modeDisabled);
147
-	sleep(1);
147
+	//sleep(1); // Why should we sleep here? -- xythobuz
148 148
 
149 149
 	printf("Removing World...\n");
150 150
 	gWorld.destroy();
@@ -920,7 +920,8 @@ void OpenRaider::start()
920 920
 	//gWorld.setFlag(World::fEnableHopping);
921 921
 
922 922
 	resetTicks();
923
-	runGame();
923
+
924
+    runGame();
924 925
 }
925 926
 
926 927
 
@@ -1102,7 +1103,7 @@ void OpenRaider::loadLevel(char *mapname)
1102 1103
 	// Mongoose 2002.08.16, Used to cache TR4 textures at 10% of file load
1103 1104
 	//   in a callback - then with other engines process them here
1104 1105
 	m_render.setMode(Render::modeDisabled);
1105
-	sleep(1);
1106
+	//sleep(1); // Why should we sleep here? -- xythobuz
1106 1107
 	processTextures();
1107 1108
 	m_render.setMode(Render::modeLoadScreen);
1108 1109
 	print(true, "Level textures cached\n");
@@ -1157,7 +1158,7 @@ void OpenRaider::loadLevel(char *mapname)
1157 1158
 	// Mongoose 2002.01.02, FIXME GL call to critical section,
1158 1159
 	//   needs mutex really
1159 1160
 	m_render.setMode(Render::modeDisabled);
1160
-	sleep(2);
1161
+	//sleep(2);
1161 1162
 
1162 1163
 	// Draw game, level is loaded
1163 1164
 	m_render.setMode(Render::modeVertexLight);

+ 6
- 2
src/Render.cpp View File

@@ -294,7 +294,7 @@ void Render::initTextures(char *textureDir, unsigned int *numLoaded,
294 294
 	err = mString.glPrintf(mWidth - 14 * strlen(VERSION),
295 295
 								  mHeight-24*3, 0, VERSION);
296 296
 	mString.SetString(0, VERSION);
297
-	mString.Scale(1.0);
297
+	mString.Scale(0.5);
298 298
 
299 299
 	if (err)
300 300
 	{
@@ -1298,7 +1298,11 @@ void Render::drawLoadScreen()
1298 1298
 		glVertex3f(x - w, y - h, z);
1299 1299
 		glEnd();
1300 1300
 
1301
-		wrap += 0.0012f;
1301
+		// wrap += 0.0012f;
1302
+        // The Loading Screen sat around for 25s, doing nothing.
1303
+        // Incrementing wrap by a much bigger number speeds up the animation
1304
+        // thus greatly reducing startup time?! -- xythobuz
1305
+        wrap += 0.05;
1302 1306
 
1303 1307
 		if (wrap > 1.121096f)
1304 1308
 			mTexture.disableMultiTexture();

+ 5
- 26
src/hel/CollisionObject.cpp View File

@@ -2,49 +2,28 @@
2 2
 /*================================================================
3 3
  *
4 4
  * Project : libHel
5
- * Author  : Terry 'Mongoose' Hendrix II
6
- * Website : http://www.westga.edu/~stu7440/
7
- * Email   : stu7440@westga.edu
8 5
  * Object  : CollisionObject
9
- * License : No use w/o permission (C) 2002 Mongoose
10
- * Comments: Bounding volume class for world/vis
11
- *           culling/clipping/collision stuff
6
+ * Comments: Was missing from SourceForge!
12 7
  *
8
+ *-- History ------------------------------------------------
13 9
  *
14
- *           This file was generated using Mongoose's C++
15
- *           template generator script.  <stu7440@westga.edu>
16
- *
17
- *-- History -------------------------------------------------
18
- *
19
- * 2002.11.27:
20
- * Mongoose - Created
21
- =================================================================*/
10
+ * 2013.12.27:
11
+ * xythobuz - Created as stub, was missing
12
+ ================================================================*/
22 13
 
23 14
 #include "CollisionObject.h"
24 15
 
25
-#warning CollisionObject is not yet implemented!
26
-#include <stdio.h>
27 16
 
28 17
 ////////////////////////////////////////////////////////////
29 18
 // Constructors
30 19
 ////////////////////////////////////////////////////////////
31 20
 
32
-CollisionObject::CollisionObject()
33
-{
34
-}
35
-
36
-
37
-CollisionObject::~CollisionObject()
38
-{
39
-}
40
-
41 21
 
42 22
 ////////////////////////////////////////////////////////////
43 23
 // Public Accessors
44 24
 ////////////////////////////////////////////////////////////
45 25
 
46 26
 bool CollisionObject::intersectPoint(Vector3d p) {
47
-    printf("Unimplemented CollisionObject::intersectPoint() called!\n");
48 27
     return 0;
49 28
 }
50 29
 

+ 3
- 38
src/hel/CollisionObject.h View File

@@ -2,26 +2,13 @@
2 2
 /*================================================================
3 3
  *
4 4
  * Project : libHel
5
- * Author  : Terry 'Mongoose' Hendrix II
6
- * Website : http://www.westga.edu/~stu7440/
7
- * Email   : stu7440@westga.edu
8 5
  * Object  : CollisionObject
9
- * License : No use w/o permission (C) 2002 Mongoose
10
- * Comments: Bounding volume class for world/vis
11
- *           culling/clipping/collision stuff
12
- *
13
- *
14
- *           This file was generated using Mongoose's C++
15
- *           template generator script.  <stu7440@westga.edu>
16
- *
17
- *-- Test Defines -----------------------------------------------
18
- *
19
- * UNIT_TEST_BOUNDINGVOLUME - Builds BoundingVolume class unit test
6
+ * Comments: Was missing from SourceForge!
20 7
  *
21 8
  *-- History ------------------------------------------------
22 9
  *
23
- * 2002.11.27:
24
- * Mongoose - Created
10
+ * 2013.12.27:
11
+ * xythobuz - Created as stub, was missing
25 12
  ================================================================*/
26 13
 
27 14
 
@@ -38,28 +25,6 @@ class CollisionObject
38 25
 	// Constructors
39 26
 	////////////////////////////////////////////////////////////
40 27
 
41
-	CollisionObject();
42
-	/*------------------------------------------------------
43
-	 * Pre  :
44
-	 * Post : Constructs an object of CollisionObject
45
-	 *
46
-	 *-- History ------------------------------------------
47
-	 *
48
-	 * 2002.11.27:
49
-	 * Mongoose - Created
50
-	 ------------------------------------------------------*/
51
-
52
-	~CollisionObject();
53
-	/*------------------------------------------------------
54
-	 * Pre  : CollisionObject object is allocated
55
-	 * Post : Deconstructs an object of CollisionObject
56
-	 *
57
-	 *-- History ------------------------------------------
58
-	 *
59
-	 * 2002.11.27:
60
-	 * Mongoose - Created
61
-	 ------------------------------------------------------*/
62
-
63 28
 
64 29
 	////////////////////////////////////////////////////////////
65 30
 	// Public Accessors

Loading…
Cancel
Save