diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-27 12:05:45 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-27 12:05:45 -0500 |
commit | 1656242563d14fa564bab8d4bc40054ab8998553 (patch) | |
tree | 872589408ac7aef54b1959dc53b946fbed9dfcaa /src/main.cpp | |
parent | e644f5c0d769989bd3b0665312c6949d76f5e388 (diff) | |
download | tanetane-1656242563d14fa564bab8d4bc40054ab8998553.tar.gz tanetane-1656242563d14fa564bab8d4bc40054ab8998553.tar.bz2 tanetane-1656242563d14fa564bab8d4bc40054ab8998553.zip |
Added background music (defined on a per-map basis)
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 25e7013..b98c8f1 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
@@ -70,6 +70,10 @@ void loop(Renderer& renderer, std::mt19937& rng) { | |||
70 | 70 | ||
71 | renderer.render(game); | 71 | renderer.render(game); |
72 | 72 | ||
73 | if (game.getMap().hasMusic()) { | ||
74 | game.getMixer().playMusic(game.getMap().getMusic()); | ||
75 | } | ||
76 | |||
73 | size_t lastTime = SDL_GetTicks(); | 77 | size_t lastTime = SDL_GetTicks(); |
74 | 78 | ||
75 | while (!game.shouldQuit()) { | 79 | while (!game.shouldQuit()) { |