Commit 4ab83905 authored by Unicorn369's avatar Unicorn369 Committed by fallenstardust

fix

parent fa3ecfc7
...@@ -66,6 +66,14 @@ inline int _wtoi(const wchar_t * s) { ...@@ -66,6 +66,14 @@ inline int _wtoi(const wchar_t * s) {
#endif #endif
#endif #endif
#ifndef TEXT
#ifdef UNICODE
#define TEXT(x) L##x
#else
#define TEXT(x) x
#endif // UNICODE
#endif
#include <irrlicht.h> #include <irrlicht.h>
#ifdef _IRR_ANDROID_PLATFORM_ #ifdef _IRR_ANDROID_PLATFORM_
#include <GLES/gl.h> #include <GLES/gl.h>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "client_field.h" #include "client_field.h"
#include "deck_con.h" #include "deck_con.h"
#include "menu_handler.h" #include "menu_handler.h"
#include "sound_manager.h"
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include <list> #include <list>
...@@ -166,7 +167,12 @@ public: ...@@ -166,7 +167,12 @@ public:
irr::gui::IGUIElement* focus = env->getFocus(); irr::gui::IGUIElement* focus = env->getFocus();
return focus && focus->hasType(type); return focus && focus->hasType(type);
} }
template<typename T>
static std::vector<T> TokenizeString(T input, const T& token);
// don't merge // don't merge
std::unique_ptr<SoundManager> soundManager;
std::mutex gMutex; std::mutex gMutex;
Signal frameSignal; Signal frameSignal;
Signal actionSignal; Signal actionSignal;
...@@ -220,6 +226,7 @@ public: ...@@ -220,6 +226,7 @@ public:
irr::video::IVideoDriver* driver; irr::video::IVideoDriver* driver;
irr::scene::ISceneManager* smgr; irr::scene::ISceneManager* smgr;
irr::scene::ICameraSceneNode* camera; irr::scene::ICameraSceneNode* camera;
std::vector<Utils::IrrArchiveHelper> archives;
//GUI //GUI
irr::gui::IGUIEnvironment* env; irr::gui::IGUIEnvironment* env;
irr::gui::CGUITTFont* guiFont; irr::gui::CGUITTFont* guiFont;
...@@ -567,6 +574,20 @@ private: ...@@ -567,6 +574,20 @@ private:
extern Game *mainGame; extern Game *mainGame;
template<typename T>
inline std::vector<T> Game::TokenizeString(T input, const T & token) {
std::vector<T> res;
std::size_t pos;
while((pos = input.find(token)) != T::npos) {
if(pos != 0)
res.push_back(input.substr(0, pos));
input = input.substr(pos + 1);
}
if(input.size())
res.push_back(input);
return res;
}
} }
#define CARD_IMG_WIDTH 177 #define CARD_IMG_WIDTH 177
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment