Commit cbf15224 authored by 神楽坂玲奈's avatar 神楽坂玲奈

roompass from system.conf

parent 48219da9
......@@ -83,7 +83,7 @@ bool Game::Initialize() {
ebJoinPort = env->addEditBox(gameConf.lastport, rect<s32>(260, 355, 320, 380), true, wLanWindow);
ebJoinPort->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
env->addStaticText(dataManager.GetSysString(1222), rect<s32>(10, 390, 220, 410), false, false, wLanWindow);
ebJoinPass = env->addEditBox(L"", rect<s32>(110, 385, 250, 410), true, wLanWindow);
ebJoinPass = env->addEditBox(gameConf.roompass, rect<s32>(110, 385, 250, 410), true, wLanWindow);
ebJoinPass->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
btnJoinHost = env->addButton(rect<s32>(460, 355, 570, 380), wLanWindow, BUTTON_JOIN_HOST, dataManager.GetSysString(1223));
btnJoinCancel = env->addButton(rect<s32>(460, 385, 570, 410), wLanWindow, BUTTON_JOIN_CANCEL, dataManager.GetSysString(1212));
......@@ -643,6 +643,7 @@ void Game::LoadConfig() {
gameConf.textfont[0] = 0;
gameConf.lastip[0] = 0;
gameConf.lastport[0] = 0;
gameConf.roompass[0] = 0;
fseek(fp, 0, SEEK_END);
size_t fsize = ftell(fp);
fseek(fp, 0, SEEK_SET);
......@@ -675,6 +676,9 @@ void Game::LoadConfig() {
} else if(!strcmp(strbuf, "lastport")) {
BufferIO::DecodeUTF8(valbuf, wstr);
BufferIO::CopyWStr(wstr, gameConf.lastport, 20);
} else if(!strcmp(strbuf, "roompass")) {
BufferIO::DecodeUTF8(valbuf, wstr);
BufferIO::CopyWStr(wstr, gameConf.roompass, 20);
}
}
fclose(fp);
......
......@@ -22,6 +22,7 @@ struct Config {
wchar_t lastdeck[64];
wchar_t textfont[256];
wchar_t numfont[256];
wchar_t roompass[20];
};
struct DuelInfo {
......@@ -82,10 +83,10 @@ public:
void ShowCardInfo(int code);
void ClearTextures();
void CloseDuelWindow();
int LocalPlayer(int player);
const wchar_t* LocalName(int local_player);
Mutex gMutex;
Mutex gBuffer;
Signal frameSignal;
......@@ -93,7 +94,7 @@ public:
Signal replaySignal;
Config gameConf;
DuelInfo dInfo;
std::list<FadingUnit> fadingList;
std::vector<int> logParam;
unsigned short linePattern;
......@@ -119,7 +120,7 @@ public:
bool is_building;
bool is_siding;
ClientField dField;
DeckBuilder deckBuilder;
MenuHandler menuHandler;
......
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