Commit b6f5b343 authored by mercury233's avatar mercury233

minor fix & comment

parent 5e666ce1
......@@ -185,7 +185,7 @@ bool DataManager::Error(spmemvfs_db_t* pDB, sqlite3_stmt* pStmt) {
spmemvfs_env_fini();
return false;
}
#endif
#endif //YGOPRO_SERVER_MODE
bool DataManager::GetData(int code, CardData* pData) {
auto cdit = _datas.find(code);
if(cdit == _datas.end())
......@@ -419,12 +419,11 @@ byte* DataManager::ScriptReaderEx(const char* script_name, int* slen) {
return scriptBuffer;
else
return ScriptReader(second, slen);
#endif
#endif //YGOPRO_SERVER_MODE
}
byte* DataManager::ScriptReader(const char* script_name, int* slen) {
FILE *fp;
#ifdef YGOPRO_SERVER_MODE
fp = fopen(script_name, "rb");
FILE* fp = fopen(script_name, "rb");
if(!fp)
return 0;
int len = fread(scriptBuffer, 1, sizeof(scriptBuffer), fp);
......
......@@ -23,7 +23,7 @@ public:
#else
void ReadStringConfLine(const char* linebuf);
bool Error(sqlite3* pDB, sqlite3_stmt* pStmt = 0);
#endif
#endif //YGOPRO_SERVER_MODE
bool GetData(int code, CardData* pData);
code_pointer GetCodePointer(int code);
bool GetString(int code, CardString* pStr);
......
......@@ -372,5 +372,5 @@ bool DeckManager::DeleteCategory(const wchar_t* name) {
return false;
return FileSystem::DeleteDir(localname);
}
#endif
#endif //YGOPRO_SERVER_MODE
}
......@@ -62,7 +62,7 @@ public:
bool CreateCategory(const wchar_t* name);
bool RenameCategory(const wchar_t* oldname, const wchar_t* newname);
bool DeleteCategory(const wchar_t* name);
#endif
#endif //YGOPRO_SERVER_MODE
};
extern DeckManager deckManager;
......
......@@ -209,8 +209,7 @@ public:
#ifndef YGOPRO_SERVER_MODE
std::vector<file_unit> file_list;
#endif
while ((dirp = readdir(dir)) != nullptr)
{
while((dirp = readdir(dir)) != nullptr) {
#ifndef YGOPRO_SERVER_MODE
file_unit funit;
#endif
......
......@@ -165,9 +165,6 @@ bool ReplayMode::StartDuel() {
cur_replay.ReadName(mainGame->dInfo.clientname);
}
pduel = create_duel(rnd());
#ifdef YGOPRO_SERVER_MODE
preload_script(pduel, "./script/special.lua", 0);
#endif
int start_lp = cur_replay.ReadInt32();
int start_hand = cur_replay.ReadInt32();
int draw_count = cur_replay.ReadInt32();
......
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