Commit 11466ad4 authored by Chen Bill's avatar Chen Bill

update memset

parent 50301ae3
...@@ -49,8 +49,9 @@ bool Game::Initialize() { ...@@ -49,8 +49,9 @@ bool Game::Initialize() {
is_building = false; is_building = false;
menuHandler.prev_operation = 0; menuHandler.prev_operation = 0;
menuHandler.prev_sel = -1; menuHandler.prev_sel = -1;
memset(&dInfo, 0, sizeof(DuelInfo)); for (auto i : chatTiming) {
memset(chatTiming, 0, sizeof(chatTiming)); i = 0;
}
deckManager.LoadLFList(); deckManager.LoadLFList();
driver = device->getVideoDriver(); driver = device->getVideoDriver();
driver->setTextureCreationFlag(irr::video::ETCF_CREATE_MIP_MAPS, false); driver->setTextureCreationFlag(irr::video::ETCF_CREATE_MIP_MAPS, false);
......
...@@ -66,31 +66,31 @@ struct Config { ...@@ -66,31 +66,31 @@ struct Config {
}; };
struct DuelInfo { struct DuelInfo {
bool isStarted; bool isStarted{ false };
bool isFinished; bool isFinished{ false };
bool isReplay; bool isReplay{ false };
bool isReplaySkiping; bool isReplaySkiping{ false };
bool isFirst; bool isFirst{ false };
bool isTag; bool isTag{ false };
bool isSingleMode; bool isSingleMode{ false };
bool is_shuffling; bool is_shuffling{ false };
bool tag_player[2]; bool tag_player[2]{ false };
int lp[2]; bool isReplaySwapped{ false };
int start_lp; int lp[2]{ 0 };
int duel_rule; int start_lp{ 0 };
int turn; int duel_rule{ 0 };
short curMsg; int turn{ 0 };
wchar_t hostname[20]; short curMsg{ 0 };
wchar_t clientname[20]; wchar_t hostname[20]{ 0 };
wchar_t hostname_tag[20]; wchar_t clientname[20]{ 0 };
wchar_t clientname_tag[20]; wchar_t hostname_tag[20]{ 0 };
wchar_t strLP[2][16]; wchar_t clientname_tag[20]{ 0 };
wchar_t* vic_string; wchar_t strLP[2][16]{ 0 };
unsigned char player_type; wchar_t* vic_string{ 0 };
unsigned char time_player; unsigned char player_type{ 0 };
unsigned short time_limit; unsigned char time_player{ 0 };
unsigned short time_left[2]; unsigned short time_limit{ 0 };
bool isReplaySwapped; unsigned short time_left[2]{ 0 };
}; };
struct BotInfo { struct BotInfo {
......
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