Skip to content

Commit 08661e0

Browse files
author
richelbilderbeek
committed
Progress #3
1 parent 21f9d5f commit 08661e0

File tree

6 files changed

+20
-2
lines changed

6 files changed

+20
-2
lines changed

.github/workflows/check_bash_style.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
pull_request:
66
schedule:
7-
- cron: "0 0 16 * *"
7+
- cron: "0 0 3 * *"
88

99

1010
jobs:
@@ -19,4 +19,4 @@ jobs:
1919
uses: actions/checkout@v2
2020

2121
- name: Check bash scripts for style
22-
run: shellcheck *.sh scripts/*.sh
22+
run: shellcheck scripts/*.sh

game_resources.qrc

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<file>resources/sound_effects/attacking_high.ogg</file>
1313
<file>resources/sound_effects/attacking_low.ogg</file>
1414
<file>resources/sound_effects/attacking_mid.ogg</file>
15+
<file>resources/sound_effects/castling_kingside.ogg</file>
16+
<file>resources/sound_effects/castling_queenside.ogg</file>
1517
<file>resources/sound_effects/countdown.ogg</file>
1618
<file>resources/sound_effects/done_high.ogg</file>
1719
<file>resources/sound_effects/done_low.ogg</file>
22.4 KB
Binary file not shown.
24.9 KB
Binary file not shown.

sound_effects.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ std::vector<std::tuple<std::reference_wrapper<sf::Sound>, std::reference_wrapper
3232
std::make_tuple(std::ref(m_attacking_high), std::ref(m_attacking_high_buffer), "attacking_high.ogg"),
3333
std::make_tuple(std::ref(m_attacking_low), std::ref(m_attacking_low_buffer), "attacking_low.ogg"),
3434
std::make_tuple(std::ref(m_attacking_mid), std::ref(m_attacking_mid_buffer), "attacking_mid.ogg"),
35+
std::make_tuple(std::ref(m_castling_kingside), std::ref(m_castling_kingside_buffer), "castling_kingside.ogg"),
36+
std::make_tuple(std::ref(m_castling_queenside), std::ref(m_castling_queenside_buffer), "castling_queenside.ogg"),
3537
std::make_tuple(std::ref(m_countdown), std::ref(m_countdown_buffer), "countdown.ogg"),
3638
std::make_tuple(std::ref(m_done_high), std::ref(m_done_high_buffer), "done_high.ogg"),
3739
std::make_tuple(std::ref(m_done_low), std::ref(m_done_low_buffer), "done_low.ogg"),
@@ -144,6 +146,16 @@ void sound_effects::play(const message& effect)
144146
}
145147
break;
146148
}
149+
case message_type::start_castling_kingside:
150+
{
151+
m_castling_kingside.play();
152+
break;
153+
}
154+
case message_type::start_castling_queenside:
155+
{
156+
m_castling_queenside.play();
157+
break;
158+
}
147159
default:
148160
case message_type::start_attack:
149161
{

sound_effects.h

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ class sound_effects
3737
sf::Sound m_attacking_high;
3838
sf::Sound m_attacking_low;
3939
sf::Sound m_attacking_mid;
40+
sf::Sound m_castling_kingside;
41+
sf::Sound m_castling_queenside;
4042
sf::Sound m_countdown;
4143
sf::Sound m_done_high;
4244
sf::Sound m_done_low;
@@ -73,6 +75,8 @@ class sound_effects
7375
sf::SoundBuffer m_attacking_high_buffer;
7476
sf::SoundBuffer m_attacking_low_buffer;
7577
sf::SoundBuffer m_attacking_mid_buffer;
78+
sf::SoundBuffer m_castling_kingside_buffer;
79+
sf::SoundBuffer m_castling_queenside_buffer;
7680
sf::SoundBuffer m_countdown_buffer;
7781
sf::SoundBuffer m_done_high_buffer;
7882
sf::SoundBuffer m_done_low_buffer;

0 commit comments

Comments
 (0)