diff --git a/CMakeLists.txt b/CMakeLists.txt index 57136d0..e95a01d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.20) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -project(SpaceSector +project(SpaceWar VERSION 0.1.0 DESCRIPTION "a game made for 1M Game Competition") diff --git a/assets/cover.png b/assets/cover.png new file mode 100644 index 0000000..54733b1 Binary files /dev/null and b/assets/cover.png differ diff --git a/pack.sh b/pack.sh index 576f66a..903c3fc 100755 --- a/pack.sh +++ b/pack.sh @@ -5,7 +5,7 @@ if [ -d "./output" ]; then fi mkdir output -cp ./build/SpaceSector output +cp ./build/SpaceWar output cp -r ./assets output rm -rf ./output/assets/test cp ./HowToPlay.md output/ diff --git a/src/game/main.cpp b/src/game/main.cpp index 499bae7..b5c885a 100644 --- a/src/game/main.cpp +++ b/src/game/main.cpp @@ -6,5 +6,5 @@ // RUN_WINDOW("Space War v1.0", GameWindowSize.w, GameWindowSize.h, SelectScence) // RUN_WINDOW("Space War v1.0", GameWindowSize.w, GameWindowSize.h, SpaceScence) -RUN_WINDOW("Space War v1.0", GameWindowSize.w, GameWindowSize.h, WelcomeScence) -// RUN_WINDOW("Space War v1.0", GameWindowSize.w, GameWindowSize.h, GameLogoScence) +// RUN_WINDOW("Space War v1.0", GameWindowSize.w, GameWindowSize.h, WelcomeScence) +RUN_WINDOW("Space War v1.0", GameWindowSize.w, GameWindowSize.h, GameLogoScence) diff --git a/src/game/stages/gamelogo.cpp b/src/game/stages/gamelogo.cpp index 42d0009..c5af3ab 100644 --- a/src/game/stages/gamelogo.cpp +++ b/src/game/stages/gamelogo.cpp @@ -12,6 +12,16 @@ void GameLogoScence::OnInit() { sound_.reset(new Sound("assets/1mgame_sound.wav")); soundPlayed_ = false; + GLFWimage image; + image.pixels = stbi_load("assets/cursor.png", &image.width, &image.height, nullptr, 0); + auto cursor = glfwCreateCursor(&image, image.width / 2, image.height / 2); + glfwSetCursor(engine.GetWindow(), cursor); + stbi_image_free(image.pixels); + + image.pixels = stbi_load("assets/cover.png", &image.width, &image.height, nullptr, 0); + glfwSetWindowIcon(engine.GetWindow(), 1, &image); + stbi_image_free(image.pixels); + Renderer::SetCamera(camera_); } diff --git a/src/game/stages/welcome.cpp b/src/game/stages/welcome.cpp index 4862308..b592823 100644 --- a/src/game/stages/welcome.cpp +++ b/src/game/stages/welcome.cpp @@ -9,13 +9,6 @@ void WelcomeScence::OnInit() { startImage_.reset(new Texture("assets/start_btn.png")); exitImage_.reset(new Texture("assets/exit_btn.png")); - - GLFWimage image; - image.pixels = stbi_load("assets/cursor.png", &image.width, &image.height, nullptr, 0); - auto cursor = glfwCreateCursor(&image, image.width / 2, image.height / 2); - glfwSetCursor(engine.GetWindow(), cursor); - stbi_image_free(image.pixels); - LoadResources(); }