diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-02 20:18:41 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-02 20:18:41 -0500 |
commit | c772a3e5d8d9507b898813cdfb597c14b07cdc61 (patch) | |
tree | d2b79410a30f55b2c8d10b6b4b564cdb40467a95 /src/main.cpp | |
parent | 93b3e4004387047c25b2f5a190aced01c9091934 (diff) | |
download | tanetane-c772a3e5d8d9507b898813cdfb597c14b07cdc61.tar.gz tanetane-c772a3e5d8d9507b898813cdfb597c14b07cdc61.tar.bz2 tanetane-c772a3e5d8d9507b898813cdfb597c14b07cdc61.zip |
Added "bumping into something while running" sfx
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 5e5953b..1d1583f 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
@@ -5,8 +5,9 @@ | |||
5 | #include "party.h" | 5 | #include "party.h" |
6 | #include "timer.h" | 6 | #include "timer.h" |
7 | #include "map.h" | 7 | #include "map.h" |
8 | #include "mixer.h" | ||
8 | 9 | ||
9 | void loop(Renderer& renderer) { | 10 | void loop(Renderer& renderer, Mixer& mixer) { |
10 | Game game; | 11 | Game game; |
11 | Input keystate; | 12 | Input keystate; |
12 | 13 | ||
@@ -61,7 +62,7 @@ void loop(Renderer& renderer) { | |||
61 | 62 | ||
62 | inputTimer.accumulate(frameTime); | 63 | inputTimer.accumulate(frameTime); |
63 | while (inputTimer.step()) { | 64 | while (inputTimer.step()) { |
64 | party.move(game, keystate); | 65 | party.move(game, mixer, keystate); |
65 | } | 66 | } |
66 | 67 | ||
67 | animTimer.accumulate(frameTime); | 68 | animTimer.accumulate(frameTime); |
@@ -79,8 +80,9 @@ int main(int, char**) { | |||
79 | try | 80 | try |
80 | { | 81 | { |
81 | Renderer renderer; | 82 | Renderer renderer; |
83 | Mixer mixer; | ||
82 | 84 | ||
83 | loop(renderer); | 85 | loop(renderer, mixer); |
84 | } catch (const sdl_error& ex) | 86 | } catch (const sdl_error& ex) |
85 | { | 87 | { |
86 | std::cout << "SDL error (" << ex.what() << ")" << std::endl; | 88 | std::cout << "SDL error (" << ex.what() << ")" << std::endl; |