Added music and perfom bug fixes
This commit is contained in:
1 parent
e5e3d7bb28
commit
825a56a4a4
29 files changed
+185
-68
No files matched your search
@@ -1,13 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#if 0
|
||||
#ifdef __ANDROID__
|
||||
#include <SDL_mixer.h>
|
||||
#include <SDL.h>
|
||||
#else
|
||||
#include <SDL2/SDL_mixer.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#endif
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <vector>
|
||||
|
||||
#ifndef __EMSCRIPTEN__
|
||||
#include <queue>
|
||||
@@ -53,14 +56,15 @@ private:
|
||||
std::queue<std::function<void()>> taskQueue;
|
||||
#endif
|
||||
bool stop = false;
|
||||
#if 0
|
||||
|
||||
std::unordered_map<std::string, Mix_Chunk*> soundCache;
|
||||
std::mutex soundCacheMutex;
|
||||
|
||||
std::string currentTrack;
|
||||
|
||||
Mix_Music* currentMusic_ = nullptr;
|
||||
#endif
|
||||
std::vector<char> currentMusicData_;
|
||||
|
||||
int musicVolume_ = 128;
|
||||
int soundVolume_ = 128;
|
||||
bool musicEnabled_ = true;
|
||||
|
||||
Reference in new issue
Block a user