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

+ 6
- 2
src/Render.cpp View File

294
 	err = mString.glPrintf(mWidth - 14 * strlen(VERSION),
294
 	err = mString.glPrintf(mWidth - 14 * strlen(VERSION),
295
 								  mHeight-24*3, 0, VERSION);
295
 								  mHeight-24*3, 0, VERSION);
296
 	mString.SetString(0, VERSION);
296
 	mString.SetString(0, VERSION);
297
-	mString.Scale(1.0);
297
+	mString.Scale(0.5);
298
 
298
 
299
 	if (err)
299
 	if (err)
300
 	{
300
 	{
1298
 		glVertex3f(x - w, y - h, z);
1298
 		glVertex3f(x - w, y - h, z);
1299
 		glEnd();
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
 		if (wrap > 1.121096f)
1307
 		if (wrap > 1.121096f)
1304
 			mTexture.disableMultiTexture();
1308
 			mTexture.disableMultiTexture();

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

2
 /*================================================================
2
 /*================================================================
3
  *
3
  *
4
  * Project : libHel
4
  * Project : libHel
5
- * Author  : Terry 'Mongoose' Hendrix II
6
- * Website : http://www.westga.edu/~stu7440/
7
- * Email   : stu7440@westga.edu
8
  * Object  : CollisionObject
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
 #include "CollisionObject.h"
14
 #include "CollisionObject.h"
24
 
15
 
25
-#warning CollisionObject is not yet implemented!
26
-#include <stdio.h>
27
 
16
 
28
 ////////////////////////////////////////////////////////////
17
 ////////////////////////////////////////////////////////////
29
 // Constructors
18
 // Constructors
30
 ////////////////////////////////////////////////////////////
19
 ////////////////////////////////////////////////////////////
31
 
20
 
32
-CollisionObject::CollisionObject()
33
-{
34
-}
35
-
36
-
37
-CollisionObject::~CollisionObject()
38
-{
39
-}
40
-
41
 
21
 
42
 ////////////////////////////////////////////////////////////
22
 ////////////////////////////////////////////////////////////
43
 // Public Accessors
23
 // Public Accessors
44
 ////////////////////////////////////////////////////////////
24
 ////////////////////////////////////////////////////////////
45
 
25
 
46
 bool CollisionObject::intersectPoint(Vector3d p) {
26
 bool CollisionObject::intersectPoint(Vector3d p) {
47
-    printf("Unimplemented CollisionObject::intersectPoint() called!\n");
48
     return 0;
27
     return 0;
49
 }
28
 }
50
 
29
 

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

2
 /*================================================================
2
 /*================================================================
3
  *
3
  *
4
  * Project : libHel
4
  * Project : libHel
5
- * Author  : Terry 'Mongoose' Hendrix II
6
- * Website : http://www.westga.edu/~stu7440/
7
- * Email   : stu7440@westga.edu
8
  * Object  : CollisionObject
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
  *-- History ------------------------------------------------
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
 	// Constructors
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
 	// Public Accessors
30
 	// Public Accessors

Loading…
Cancel
Save