summary refs log tree commit diff
path: root/src/GameInitDispose.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GameInitDispose.cpp')
-rw-r--r--src/GameInitDispose.cpp132
1 files changed, 0 insertions, 132 deletions
diff --git a/src/GameInitDispose.cpp b/src/GameInitDispose.cpp
index 40b6c58..d94f6f6 100644
--- a/src/GameInitDispose.cpp
+++ b/src/GameInitDispose.cpp
@@ -302,118 +302,8 @@ void LoadSounds(bool musictoggle)
 	alSourcef(gSourceID[shootsong], AL_MIN_GAIN, 1);
 }
 
-void Game::LoadingScreen(float percent)
-{
-	if (initialized)
-		return;
-
-	glLoadIdentity();
-
-	//Clear to black
-	glClearColor(0,0,0,1);
-	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-	//Background
-	glDisable(GL_TEXTURE_2D);
-	glDisable(GL_DEPTH_TEST);							// Disables Depth Testing
-	glDisable(GL_CULL_FACE);
-	glDisable(GL_LIGHTING);
-	glDepthMask(0);
-	glMatrixMode(GL_PROJECTION);						// Select The Projection Matrix
-	glPushMatrix();										// Store The Projection Matrix
-	glLoadIdentity();									// Reset The Projection Matrix
-	glOrtho(0,640,0,480,-100,100);						// Set Up An Ortho Screen
-	glMatrixMode(GL_MODELVIEW);							// Select The Modelview Matrix
-	glPushMatrix();										// Store The Modelview Matrix
-
-	for(int i=19;i>=0;i--){
-		glLoadIdentity();								// Reset The Modelview Matrix
-		glTranslatef(120-i*1,190-i*1,0);
-		glScalef(400+i*2,30+i*2,1);
-		glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
-		glEnable(GL_BLEND);
-		if(i)glColor4f(1-(float)i/20-percent/100,1-(float)i/20-percent/100,1-(float)i/20-percent/100,1);
-		if(!i)glColor4f(0,0,0,1);
-		glBegin(GL_QUADS);
-			glVertex3f(0,		0, 	 0.0f);
-			glVertex3f(1,	0, 	 0.0f);
-			glVertex3f(1,	1, 0.0f);
-			glVertex3f(0, 	1, 0.0f);
-		glEnd();
-	}
-
-	glMatrixMode(GL_PROJECTION);						// Select The Projection Matrix
-	glPopMatrix();										// Restore The Old Projection Matrix
-	glMatrixMode(GL_MODELVIEW);							// Select The Modelview Matrix
-	glPopMatrix();										// Restore The Old Projection Matrix
-	glDisable(GL_BLEND);
-	glDepthMask(1);
-
-	//Progress
-	glDisable(GL_DEPTH_TEST);							// Disables Depth Testing
-	glDisable(GL_CULL_FACE);
-	glDisable(GL_LIGHTING);
-	glDisable(GL_TEXTURE_2D);
-	glDepthMask(0);
-	glMatrixMode(GL_PROJECTION);						// Select The Projection Matrix
-	glPushMatrix();										// Store The Projection Matrix
-	glLoadIdentity();									// Reset The Projection Matrix
-	glOrtho(0,640,0,480,-100,100);						// Set Up An Ortho Screen
-	glMatrixMode(GL_MODELVIEW);							// Select The Modelview Matrix
-	glPushMatrix();										// Store The Modelview Matrix
-
-	for(int i=19;i>=0;i--){
-
-		glLoadIdentity();								// Reset The Modelview Matrix
-
-		glTranslatef(120,190,0);
-
-		if(4*percent+i*2<400)glScalef(4*percent+i*2,30,1);
-
-		if(4*percent+i*2>=400)glScalef(400,30,1);
-
-		glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
-
-		glEnable(GL_BLEND);
-
-		glColor4f(1, 0, 0, 0.1f);
-
-		glBegin(GL_QUADS);
-
-			glVertex3f(0,		0, 	 0.0f);
-
-			glVertex3f(1,	0, 	 0.0f);
-
-			glVertex3f(1,	1, 0.0f);
-
-			glVertex3f(0, 	1, 0.0f);
-
-		glEnd();
-
-	}
-
-	glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
-	glPopMatrix(); // Restore The Old Projection Matrix
-	glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix
-	glPopMatrix(); // Restore The Old Projection Matrix
-	glDisable(GL_BLEND);
-	glDepthMask(1);
-
-	//Text
-	glEnable(GL_TEXTURE_2D);
-	glColor4f(.6-.6*percent/100,0,0,1);
-	static char string[256]="";
-	sprintf (string, "LOADING...");
-	text.glPrint(280,195,string,1,1,640,480);
-	glfwSwapBuffers(glfwGetCurrentContext());
-}
-
 void initGame(Game* game)
 {
-	// Setup loading screen
-	float loadingscreenamount = 0.0f;
-	game->LoadingScreen(loadingscreenamount);
-
 	//Set up rain and snow
 	precipitationhorz=60;
 	precipitationvert=40;
@@ -423,7 +313,6 @@ void initGame(Game* game)
 	camera.position = {block_spacing * (num_blocks + 1) / 2.0f,
 		30.0f, block_spacing * (num_blocks + 1) / 2.0f};
 	camera.oldposition = camera.position;
-	game->LoadingScreen(loadingscreenamount += 2.5f);
 
 	// Bodyguard stats
 	auto& bodyguard = game->person[0];
@@ -709,7 +598,6 @@ void initGame(Game* game)
 		alSourcef(sound_source, AL_MAX_GAIN, 1);
 
 	}
-	game->LoadingScreen(loadingscreenamount += 2.5f);
 
 	// Setup random seed
 	srand(time(NULL));
@@ -738,7 +626,6 @@ void initGame(Game* game)
 			}
 			block.boundingsphereradius = sqrt(radiusqr);
 		}
-		game->LoadingScreen(loadingscreenamount += 2.5f);
 
 		game->sidewalkcollide.load((char*) ":Data:Models:Lowheightcollide.solid");
 		game->sidewalkcollide.Rotate(90, 0, 0);
@@ -754,7 +641,6 @@ void initGame(Game* game)
 			blockwall.Scale(0.8f, 0.75f, 0.8f);
 			blockwall.CalculateNormals();
 		}
-		game->LoadingScreen(loadingscreenamount += 2.5f);
 
 		game->blockroofs[0].load((char*) ":Data:Models:Highblock1collide.solid");
 		game->blockroofs[1].load((char*) ":Data:Models:Highblock2collide.solid");
@@ -775,7 +661,6 @@ void initGame(Game* game)
 			blockcollide.Scale(0.8f, 0.8f, 0.8f);
 			blockcollide.CalculateNormals();
 		}
-		game->LoadingScreen(loadingscreenamount += 2.5f);
 
 		game->blocksimplecollide[0].load((char*) ":Data:Models:lowsimplecollide1.solid");
 		game->blocksimplecollide[1].load((char*) ":Data:Models:lowsimplecollide2.solid");
@@ -786,7 +671,6 @@ void initGame(Game* game)
 			blocksimplecollide.Scale(0.8f, 0.8f, 0.8f);
 			blocksimplecollide.CalculateNormals();
 		}
-		game->LoadingScreen(loadingscreenamount += 2.5f);
 
 		game->blockocclude.load((char*) ":Data:Models:blockocclude.solid");
 		game->blockocclude.Rotate(90, 0, 0);
@@ -805,7 +689,6 @@ void initGame(Game* game)
 
 		game->Bigstreet = game->street;
 		game->Bigstreet.Scale(10000.0f, 10000.0f, 10000.0f);
-		game->LoadingScreen(loadingscreenamount += 2.5f);
 
 		game->path.load((char*) ":Data:Models:path.solid");
 		game->path.Rotate(90,0,0);
@@ -957,7 +840,6 @@ void initGame(Game* game)
 		skeletonmodels[9].Scale(.02,.02,.02);
 
 		skeletonmodels[9].CalculateNormals();
-		game->LoadingScreen(loadingscreenamount += 2.5f);
 
 
 		//Load gun models
@@ -988,7 +870,6 @@ void initGame(Game* game)
 		gunmodels[handgunbasemodel].CalculateNormals();
 
 		gunmodels[handgunbasemodel].MultColor(.6);
-		game->LoadingScreen(loadingscreenamount += 2.5f);
 
 		gunmodels[handgunslidemodel].load((char*) ":Data:Models:Handgunslide.solid");
 
@@ -1025,7 +906,6 @@ void initGame(Game* game)
 		gunmodels[handgun2slidemodel].CalculateNormals();
 
 		gunmodels[handgun2slidemodel].MultColor(.6);
-		game->LoadingScreen(loadingscreenamount += 2.5f);
 
 		gunmodels[grenadebasemodel].load((char*) ":Data:Models:grenadebase.solid");
 
@@ -1078,7 +958,6 @@ void initGame(Game* game)
 		gunmodels[shotgunmodel].MultColor(.6);
 
 	}
-	game->LoadingScreen(loadingscreenamount += 2.5f);
 
 	//Setup costumes
 	float headcolor[3];
@@ -1632,7 +1511,6 @@ void initGame(Game* game)
 		costume[bodyguardcostume].footcolor[1]=footcolor[1];
 
 		costume[bodyguardcostume].footcolor[2]=footcolor[2];
-	game->LoadingScreen(loadingscreenamount += 2.5f);
 
 		//Load animations
 		testskeleton.Load((char *)":Data:Skeleton:Basic Figure");
@@ -1642,7 +1520,6 @@ void initGame(Game* game)
 		animation[joganim].Load((char *)":Data:Animations:Run");
 
 		animation[pistolaimanim].Load((char *)":Data:Animations:PistolAim");
-	game->LoadingScreen(loadingscreenamount += 2.5f);
 
 		animation[walkanim].Load((char *)":Data:Animations:Walk");
 
@@ -1653,7 +1530,6 @@ void initGame(Game* game)
 		animation[assaultrifleaimanim].Load((char *)":Data:Animations:AssaultRifleaim");
 
 		animation[crouchanim].Load((char *)":Data:Animations:Crouch");
-	game->LoadingScreen(loadingscreenamount += 2.5f);
 
 		animation[headpainanim].Load((char *)":Data:Animations:Headshot");
 
@@ -1664,7 +1540,6 @@ void initGame(Game* game)
 		animation[rightarmpainanim].Load((char *)":Data:Animations:Rightarmshot");
 
 		animation[leftarmpainanim].Load((char *)":Data:Animations:Leftarmshot");
-	game->LoadingScreen(loadingscreenamount += 2.5f);
 
 		animation[rightlegpainanim].Load((char *)":Data:Animations:Rightlegshot");
 
@@ -1675,7 +1550,6 @@ void initGame(Game* game)
 		animation[grenadeaimanim].Load((char *)":Data:Animations:grenadeaim");
 
 		animation[grenadechargeanim].Load((char *)":Data:Animations:grenadecharge");
-	game->LoadingScreen(loadingscreenamount += 2.5f);
 
 		animation[grenadethrowanim].Load((char *)":Data:Animations:grenadethrow");
 
@@ -1684,7 +1558,6 @@ void initGame(Game* game)
 		animation[zombiejoganim].Load((char *)":Data:Animations:ZombieRun");
 
 		animation[zombiewalkanim].Load((char *)":Data:Animations:Zombiewalk");
-	game->LoadingScreen(loadingscreenamount += 2.5f);
 
 		animation[getupfrontanim].Load((char *)":Data:Animations:Getupfromfront");
 
@@ -1715,9 +1588,6 @@ void initGame(Game* game)
 		// Load skeleton structure
 		if (!game->initialized)
 			person.skeleton.Load((char*) ":Data:Skeleton:Basic Figure");
-
-		if (i % 5 == 4)
-			game->LoadingScreen(loadingscreenamount += 2.5f);
 	}
 
 	bodyguard.attackframe = -1;
@@ -1734,7 +1604,6 @@ void initGame(Game* game)
 	glLightfv(GL_LIGHT0, GL_AMBIENT, LightAmbient);
 	glLightfv(GL_LIGHT0, GL_DIFFUSE, LightDiffuse);
 	glEnable(GL_LIGHT0);
-	game->LoadingScreen(loadingscreenamount += 2.5f);
 
 	// Load some textures
 	if (!game->initialized) {
@@ -1771,7 +1640,6 @@ void initGame(Game* game)
 	game->eqn[2] = 0;
 	game->eqn[3] = 0;
 	glClearColor(fogcolorr,fogcolorg,fogcolorb,1);
-	game->LoadingScreen(loadingscreenamount += 2.5f);
 
 	// Draw city one frame to fix evil menu bug
 	if (!game->initialized) {