add cover.png; fixed cmake
This commit is contained in:
parent
831e767cf9
commit
1d7a4618f5
|
@ -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")
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 610 B |
2
pack.sh
2
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/
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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_);
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue