Commit 138c3a61 authored by mercury233's avatar mercury233

fix

parent 145a6352
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
namespace ygo { namespace ygo {
#ifndef YGOPRO_SERVER_MODE
char DeckManager::deckBuffer[0x10000]; char DeckManager::deckBuffer[0x10000];
#endif
DeckManager deckManager; DeckManager deckManager;
void DeckManager::LoadLFListSingle(const char* path) { void DeckManager::LoadLFListSingle(const char* path) {
...@@ -246,7 +248,6 @@ bool DeckManager::LoadDeck(irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUICom ...@@ -246,7 +248,6 @@ bool DeckManager::LoadDeck(irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUICom
mainGame->deckBuilder.RefreshPackListScroll(); mainGame->deckBuilder.RefreshPackListScroll();
return res; return res;
} }
#endif
FILE* DeckManager::OpenDeckFile(const wchar_t* file, const char* mode) { FILE* DeckManager::OpenDeckFile(const wchar_t* file, const char* mode) {
#ifdef WIN32 #ifdef WIN32
FILE* fp = _wfopen(file, (wchar_t*)mode); FILE* fp = _wfopen(file, (wchar_t*)mode);
...@@ -371,4 +372,5 @@ bool DeckManager::DeleteCategory(const wchar_t* name) { ...@@ -371,4 +372,5 @@ bool DeckManager::DeleteCategory(const wchar_t* name) {
return false; return false;
return FileSystem::DeleteDir(localname); return FileSystem::DeleteDir(localname);
} }
#endif
} }
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
#include "client_card.h" #include "client_card.h"
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#ifndef YGOPRO_SERVER_MODE
#include <sstream> #include <sstream>
#endif
namespace ygo { namespace ygo {
...@@ -36,7 +38,9 @@ public: ...@@ -36,7 +38,9 @@ public:
Deck current_deck; Deck current_deck;
std::vector<LFList> _lfList; std::vector<LFList> _lfList;
#ifndef YGOPRO_SERVER_MODE
static char deckBuffer[0x10000]; static char deckBuffer[0x10000];
#endif
void LoadLFListSingle(const char* path); void LoadLFListSingle(const char* path);
void LoadLFList(); void LoadLFList();
...@@ -53,15 +57,12 @@ public: ...@@ -53,15 +57,12 @@ public:
IReadFile* OpenDeckReader(const wchar_t* file); IReadFile* OpenDeckReader(const wchar_t* file);
bool LoadDeck(const wchar_t* file, bool is_packlist = false); bool LoadDeck(const wchar_t* file, bool is_packlist = false);
bool LoadDeck(std::istringstream* deckStream, bool is_packlist = false); bool LoadDeck(std::istringstream* deckStream, bool is_packlist = false);
#else
FILE* OpenDeckFile(const wchar_t* file, const char* mode);
bool LoadDeck(const wchar_t* file);
#endif
bool SaveDeck(Deck& deck, const wchar_t* file); bool SaveDeck(Deck& deck, const wchar_t* file);
bool DeleteDeck(const wchar_t* file); bool DeleteDeck(const wchar_t* file);
bool CreateCategory(const wchar_t* name); bool CreateCategory(const wchar_t* name);
bool RenameCategory(const wchar_t* oldname, const wchar_t* newname); bool RenameCategory(const wchar_t* oldname, const wchar_t* newname);
bool DeleteCategory(const wchar_t* name); bool DeleteCategory(const wchar_t* name);
#endif
}; };
extern DeckManager deckManager; extern DeckManager deckManager;
......
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