Commit ad309548 authored by mercury233's avatar mercury233

Merge branch 'resize' into test

parents f4a94109 a32b127d
...@@ -126,7 +126,7 @@ void ClientCard::UpdateInfo(char* buf) { ...@@ -126,7 +126,7 @@ void ClientCard::UpdateInfo(char* buf) {
if(flag & QUERY_REASON) if(flag & QUERY_REASON)
reason = BufferIO::ReadInt32(buf); reason = BufferIO::ReadInt32(buf);
if(flag & QUERY_REASON_CARD) if(flag & QUERY_REASON_CARD)
BufferIO::ReadInt32(buf); buf += 4;
if(flag & QUERY_EQUIP_CARD) { if(flag & QUERY_EQUIP_CARD) {
int c = BufferIO::ReadInt8(buf); int c = BufferIO::ReadInt8(buf);
int l = BufferIO::ReadInt8(buf); int l = BufferIO::ReadInt8(buf);
......
...@@ -683,12 +683,9 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -683,12 +683,9 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->btnCancelOrFinish->setVisible(false); mainGame->btnCancelOrFinish->setVisible(false);
mainGame->btnShuffle->setVisible(false); mainGame->btnShuffle->setVisible(false);
time_t nowtime = time(NULL); time_t nowtime = time(NULL);
struct tm *localedtime = localtime(&nowtime); tm* localedtime = localtime(&nowtime);
char timebuf[40]; wchar_t timetext[40];
strftime(timebuf, 40, "%Y-%m-%d %H-%M-%S", localedtime); wcsftime(timetext, 40, L"%Y-%m-%d %H-%M-%S", localedtime);
size_t size = strlen(timebuf) + 1;
wchar_t timetext[80];
mbstowcs(timetext, timebuf, size);
mainGame->ebRSName->setText(timetext); mainGame->ebRSName->setText(timetext);
if(!mainGame->chkAutoSaveReplay->isChecked()) { if(!mainGame->chkAutoSaveReplay->isChecked()) {
mainGame->wReplaySave->setText(dataManager.GetSysString(1340)); mainGame->wReplaySave->setText(dataManager.GetSysString(1340));
......
...@@ -1393,7 +1393,7 @@ void Game::ErrorLog(const char* msg) { ...@@ -1393,7 +1393,7 @@ void Game::ErrorLog(const char* msg) {
if(!fp) if(!fp)
return; return;
time_t nowtime = time(NULL); time_t nowtime = time(NULL);
struct tm *localedtime = localtime(&nowtime); tm* localedtime = localtime(&nowtime);
char timebuf[40]; char timebuf[40];
strftime(timebuf, 40, "%Y-%m-%d %H:%M:%S", localedtime); strftime(timebuf, 40, "%Y-%m-%d %H:%M:%S", localedtime);
fprintf(fp, "[%s]%s\n", timebuf, msg); fprintf(fp, "[%s]%s\n", timebuf, msg);
......
...@@ -439,7 +439,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -439,7 +439,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
std::wstring repinfo; std::wstring repinfo;
time_t curtime = ReplayMode::cur_replay.pheader.seed; time_t curtime = ReplayMode::cur_replay.pheader.seed;
tm* st = localtime(&curtime); tm* st = localtime(&curtime);
myswprintf(infobuf, L"%d/%d/%d %02d:%02d:%02d\n", st->tm_year + 1900, st->tm_mon + 1, st->tm_mday, st->tm_hour, st->tm_min, st->tm_sec); wcsftime(infobuf, 256, L"%Y/%m/%d %H:%M:%S\n", st);
repinfo.append(infobuf); repinfo.append(infobuf);
wchar_t namebuf[4][20]; wchar_t namebuf[4][20];
ReplayMode::cur_replay.ReadName(namebuf[0]); ReplayMode::cur_replay.ReadName(namebuf[0]);
...@@ -454,7 +454,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -454,7 +454,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
myswprintf(infobuf, L"%ls\n===VS===\n%ls\n", namebuf[0], namebuf[1]); myswprintf(infobuf, L"%ls\n===VS===\n%ls\n", namebuf[0], namebuf[1]);
repinfo.append(infobuf); repinfo.append(infobuf);
mainGame->ebRepStartTurn->setText(L"1"); mainGame->ebRepStartTurn->setText(L"1");
mainGame->SetStaticText(mainGame->stReplayInfo, 180, mainGame->guiFont, (wchar_t*)repinfo.c_str()); mainGame->SetStaticText(mainGame->stReplayInfo, 180, mainGame->guiFont, repinfo.c_str());
break; break;
} }
case LISTBOX_BOT_LIST: { case LISTBOX_BOT_LIST: {
......
...@@ -128,12 +128,9 @@ int SingleMode::SinglePlayThread(void* param) { ...@@ -128,12 +128,9 @@ int SingleMode::SinglePlayThread(void* param) {
} }
last_replay.EndRecord(); last_replay.EndRecord();
time_t nowtime = time(NULL); time_t nowtime = time(NULL);
struct tm *localedtime = localtime(&nowtime); tm* localedtime = localtime(&nowtime);
char timebuf[40]; wchar_t timetext[40];
strftime(timebuf, 40, "%Y-%m-%d %H-%M-%S", localedtime); wcsftime(timetext, 40, L"%Y-%m-%d %H-%M-%S", localedtime);
size_t size = strlen(timebuf) + 1;
wchar_t timetext[80];
mbstowcs(timetext, timebuf, size);
mainGame->ebRSName->setText(timetext); mainGame->ebRSName->setText(timetext);
if(!mainGame->chkAutoSaveReplay->isChecked()) { if(!mainGame->chkAutoSaveReplay->isChecked()) {
mainGame->wReplaySave->setText(dataManager.GetSysString(1340)); mainGame->wReplaySave->setText(dataManager.GetSysString(1340));
......
...@@ -932,3 +932,4 @@ ...@@ -932,3 +932,4 @@
!setname 0x121 魔妖 !setname 0x121 魔妖
!setname 0x122 女武神 Valkyrie !setname 0x122 女武神 Valkyrie
!setname 0x123 蔷薇龙 ローズ・ドラゴン !setname 0x123 蔷薇龙 ローズ・ドラゴン
!setname 0x124 机械天使 機械天使
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