Commit 8283f093 authored by mercury233's avatar mercury233

Merge branch 'fh' into resize

parents f05c2e89 314ddd85
......@@ -1470,6 +1470,12 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if(mcard->position & POS_FACEDOWN)
mcard = 0;
}
} else if(hovered_location == LOCATION_EXTRA) {
if(extra[hovered_controler].size()) {
mcard = extra[hovered_controler].back();
if(mcard->position & POS_FACEDOWN)
mcard = 0;
}
} else if(hovered_location == LOCATION_DECK) {
if(deck[hovered_controler].size())
mcard = deck[hovered_controler].back();
......
......@@ -12,21 +12,8 @@ bool open_file = false;
wchar_t open_file_name[256] = L"";
bool bot_mode = false;
void GetParameter(char* param, const char* arg) {
#ifdef _WIN32
wchar_t arg1[260];
MultiByteToWideChar(CP_ACP, 0, arg, -1, arg1, 260);
BufferIO::EncodeUTF8(arg1, param);
#else
strcpy(param, arg);
#endif
}
void GetParameterW(wchar_t* param, const char* arg) {
#ifdef _WIN32
MultiByteToWideChar(CP_ACP, 0, arg, -1, param, 260);
#else
BufferIO::DecodeUTF8(arg, param);
#endif
}
void ClickButton(irr::gui::IGUIElement* btn) {
irr::SEvent event;
......@@ -72,19 +59,24 @@ int main(int argc, char* argv[]) {
if(!ygo::mainGame->Initialize())
return 0;
#ifdef _WIN32
wchar_t* command = GetCommandLineW();
char buffer[2048];
BufferIO::EncodeUTF8(command, buffer);
argv[0] = strtok(buffer, " ");
for(int i = 1; i < argc; ++i)
argv[i] = strtok(NULL, " ");
#endif // _WIN32
bool keep_on_return = false;
for(int i = 1; i < argc; ++i) {
if(argv[i][0] == '-' && argv[i][1] == 'e') {
char param[128];
GetParameter(param, &argv[i][2]);
ygo::dataManager.LoadDB(param);
ygo::dataManager.LoadDB(&argv[i][2]);
continue;
}
if(!strcmp(argv[i], "-e")) { // extra database
++i;
char param[128];
GetParameter(param, &argv[i][0]);
ygo::dataManager.LoadDB(param);
ygo::dataManager.LoadDB(&argv[i][0]);
continue;
} else if(!strcmp(argv[i], "-n")) { // nickName
++i;
......
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