[Add] Added a Qt project for those silly IDE users. :D
This commit is contained in:
		
							parent
							
								
									6ce0a5602d
								
							
						
					
					
						commit
						a277545963
					
				
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,3 +1,5 @@ | ||||
| LibDQt/LibDQt | ||||
| LibDQt/Makefile | ||||
| LibD | ||||
| *.pro.user | ||||
| moc_* | ||||
|  | ||||
| @ -43,4 +43,5 @@ clean: | ||||
| 	$(MAKE) -C ../src/Sprite/       clean | ||||
| 	$(MAKE) -C ../src/IO/           clean | ||||
| 	$(MAKE) -C ../src/Global/       clean | ||||
| 	rm -f *.log | ||||
| 	rm -f LibD | ||||
|  | ||||
							
								
								
									
										33
									
								
								LibDQt/LibDQt.pro
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								LibDQt/LibDQt.pro
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,33 @@ | ||||
| CONFIG -= qt | ||||
| LIBS += -lGL \ | ||||
| 		-lSDL \ | ||||
| 		-lSDL_ttf \ | ||||
| 		-lSDL_image \ | ||||
| 		-lSDL_gfx \ | ||||
| 		-ltinyxml \ | ||||
| 		-lGLU | ||||
| HEADERS += ../src/Actor/Player.h \ | ||||
| 		../src/Global/Globals.h \ | ||||
| 		../src/IO/Input.h \ | ||||
| 		../src/Main/Game.h \ | ||||
| 		../src/Main/LGLXWindow.h \ | ||||
| 		../src/Math/Timer.h \ | ||||
| 		../src/Math/MathBox.h \ | ||||
| 		../src/Math/FPS.h \ | ||||
| 		../src/Math/Vec2.h \ | ||||
| 		../src/Sprite/Sprite.h \ | ||||
| 		../src/System/Debug.h \ | ||||
| 		../src/Texture/Texture.h | ||||
| SOURCES += ../src/Actor/Player.cpp \ | ||||
| 		../src/Global/Globals.cpp \ | ||||
| 		../src/IO/Input.cpp \ | ||||
| 		../src/Main/main.cpp \ | ||||
| 		../src/Main/LGLXWindow.cpp \ | ||||
| 		../src/Main/Game.cpp \ | ||||
| 		../src/Math/Vec2.cpp \ | ||||
| 		../src/Math/Timer.cpp \ | ||||
| 		../src/Math/FPS.cpp \ | ||||
| 		../src/Sprite/Sprite.cpp \ | ||||
| 		../src/System/Debug.cpp \ | ||||
| 		../src/Texture/Texture.cpp | ||||
| OTHER_FILES += | ||||
| @ -18,15 +18,15 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR cmdLine, | ||||
| #else | ||||
| int main(int argc, char** argv) { | ||||
| #endif | ||||
|   // Start by opening a debug log.
 | ||||
|   Debug::openLog(true); | ||||
|   Debug::logger->message("\n ----- Engine Loading ------"); | ||||
| 	// Start by opening a debug log.
 | ||||
| 	Debug::openLog(true); | ||||
| 	Debug::logger->message("\n ----- Engine Loading ------"); | ||||
| 	// Get our window settings.
 | ||||
| 	const int windowWidth         = 800; | ||||
| 	const int windowHeight        = 600; | ||||
| 	const int windowBPP           = 16; | ||||
| 	const int windowFullscreen    = false; | ||||
| 	 | ||||
| 
 | ||||
| #ifdef _WIN32 | ||||
| 	// This is our window.
 | ||||
| 	GLWindow programWindow(hInstance); | ||||
| @ -35,14 +35,15 @@ int main(int argc, char** argv) { | ||||
| #endif | ||||
| 	// Our game code.
 | ||||
| 	Game game; | ||||
| 	 | ||||
| 
 | ||||
| 	// Attach our game to the window.
 | ||||
| 	programWindow.AttachGame(&game); | ||||
| 	 | ||||
| 
 | ||||
| 	// Attempt to create the window.
 | ||||
| 	if(!programWindow.Create(windowWidth, windowHeight, windowBPP, windowFullscreen)) { | ||||
| 		// If it fails.
 | ||||
| #ifdef _WIN32 | ||||
| 		Debug::logger->message("Unable to create the OpenGL Window"); | ||||
| 		MessageBox(NULL, TEXT("Unable to create the OpenGL Window"), TEXT("An error occured"), MB_ICONERROR | MB_OK); | ||||
| #endif | ||||
| 		programWindow.Destroy();    // Reset the display and exit.
 | ||||
| @ -50,6 +51,7 @@ int main(int argc, char** argv) { | ||||
| 	} | ||||
| 	if(!game.Init()) {            // Initialize our game.
 | ||||
| #ifdef _WIN32 | ||||
| 		Debug::logger->message("Could not initialize the application"); | ||||
| 		MessageBox(NULL, TEXT("Could not initialize the application"), TEXT("An error occured"), MB_ICONERROR | MB_OK); | ||||
| #endif | ||||
| 		programWindow.Destroy();    // Reset the display and exit.
 | ||||
| @ -60,15 +62,15 @@ int main(int argc, char** argv) { | ||||
| 		programWindow.ProcessEvents();    // Process any window events.
 | ||||
| 		// We get the time that passed since the last frame.
 | ||||
| 		float elapsedTime = programWindow.GetElapsedSeconds(); | ||||
| 		 | ||||
| 
 | ||||
| 		game.Prepare(elapsedTime);    // Do any pre-rendering logic.
 | ||||
| 		game.Render();                // Render the scene.
 | ||||
| 		 | ||||
| 
 | ||||
| 		programWindow.SwapBuffers(); | ||||
| 	} | ||||
| 	game.Shutdown();            // Free any resouces.
 | ||||
| 	Debug::closeLog(); | ||||
| 	programWindow.Destroy();    // Destroy the program window.
 | ||||
| 	 | ||||
| 
 | ||||
| 	return 0; | ||||
| } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Rtch90
						Rtch90