diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml
index 6b9364b..40e9b87 100644
--- a/.github/workflows/msbuild.yml
+++ b/.github/workflows/msbuild.yml
@@ -1,42 +1,23 @@
-# This workflow uses actions that are not certified by GitHub.
-# They are provided by a third-party and are governed by
-# separate terms of service, privacy policy, and support
-# documentation.
-
name: MSBuild
-
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
-
env:
- # Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .
-
- # Configuration type to build.
- # You can convert this to a build matrix if you need coverage of multiple configuration types.
- # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release
-
permissions:
contents: read
-
jobs:
build:
runs-on: windows-latest
-
steps:
- uses: actions/checkout@v4
-
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
-
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
- # Add additional options to the MSBuild command line here (like platform or verbosity level).
- # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
- uses: actions/upload-artifact@v4
with:
diff --git a/bin/client.exe b/bin/client.exe
index bc3e549..f1c7656 100644
Binary files a/bin/client.exe and b/bin/client.exe differ
diff --git a/bin/resources/dead.wav b/bin/resources/dead.wav
deleted file mode 100644
index e45409f..0000000
Binary files a/bin/resources/dead.wav and /dev/null differ
diff --git a/bin/resources/intro1.wav b/bin/resources/intro1.wav
deleted file mode 100644
index 3768575..0000000
Binary files a/bin/resources/intro1.wav and /dev/null differ
diff --git a/client/client.vcxproj b/client/client.vcxproj
index 59b0966..752dd16 100644
--- a/client/client.vcxproj
+++ b/client/client.vcxproj
@@ -45,10 +45,10 @@
stdcpp20
- Console
+ Windows
true
true
- true
+ false
$(SolutionDir)SFML\lib
sfml-graphics-s.lib;sfml-window-s.lib;sfml-system-s.lib;sfml-audio-s.lib;opengl32.lib;freetype.lib;winmm.lib;gdi32.lib;openal32.lib;flac.lib;vorbisenc.lib;vorbisfile.lib;vorbis.lib;ogg.lib;%(AdditionalDependencies)
diff --git a/client/game.cpp b/client/game.cpp
index e6ed3f9..3471b12 100644
--- a/client/game.cpp
+++ b/client/game.cpp
@@ -14,12 +14,10 @@ game::game()
sb_intro.loadFromFile("resources/intro.wav");
sb_damaged.loadFromFile("resources/damaged.wav");
sb_captured.loadFromFile("resources/captured.wav");
- sb_dead.loadFromFile("resources/dead.wav");
intro.setBuffer(sb_intro);
damaged.setBuffer(sb_damaged);
captured.setBuffer(sb_captured);
- dead.setBuffer(sb_dead);
intro.setVolume(10.f);
@@ -90,11 +88,11 @@ void game::init()
// Restarting clock
_Clock.restart();
- _GlobalClock.restart();
// First start
if (firstStart)
{
intro.play();
+ _GlobalClock.restart();
firstStart = false;
}
}
@@ -427,14 +425,14 @@ void game::draw()
int alpha = 0, alpha2 = 255;
_RenderWindow->setFramerateLimit(0);
if (0.16 < seconds && seconds < 1.18)
- alpha = int((seconds - 0.16) / 0.025) % 2 ? (100 * (seconds - 0.16f)) : 0;
+ alpha = int((seconds - 0.16f) / 0.025f) % 2 ? int(100.0f * (seconds - 0.16f)) : 0;
if (1.16 < seconds && seconds < 3)
alpha = 255;
if (3 < seconds)
{
_RenderWindow->setFramerateLimit(fps);
- alpha = (5 - _GlobalClock.getElapsedTime().asSeconds()) / 2 * 255;
- alpha2 = (5 - _GlobalClock.getElapsedTime().asSeconds()) / 2 * 255;
+ alpha = int((5 - _GlobalClock.getElapsedTime().asSeconds()) / 2.0f) * 255;
+ alpha2 = int((5 - _GlobalClock.getElapsedTime().asSeconds()) / 2.0f) * 255;
}
sf::Text _Text;
@@ -445,7 +443,7 @@ void game::draw()
_RenderWindow->getSize().y / 2 - _Text.getGlobalBounds().height / 2 -
_Text.getCharacterSize()));
_Text.setFillColor(sf::Color(255, 255, 255, alpha));
- sf::RectangleShape bg(sf::Vector2f(_RenderWindow->getSize().x, _RenderWindow->getSize().y));
+ sf::RectangleShape bg(V2_convert(_RenderWindow->getSize()));
bg.setFillColor(sf::Color(0, 0, 0, alpha2));
_RenderWindow->draw(bg);
diff --git a/client/game.hpp b/client/game.hpp
index 371ce38..1ad1ac7 100644
--- a/client/game.hpp
+++ b/client/game.hpp
@@ -52,7 +52,6 @@ class game
sf::Sound intro;
sf::Sound damaged;
sf::Sound captured;
- sf::Sound dead;
sf::Font font;
int count_walls() const;