Commit c5f75a65 authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:Fluorohydride/ygopro into develop

parents 1e6824e8 50d5877f
...@@ -47,7 +47,7 @@ static inline bool havePopupWindow() { ...@@ -47,7 +47,7 @@ static inline bool havePopupWindow() {
} }
static inline void get_deck_file(wchar_t* ret) { static inline void get_deck_file(wchar_t* ret) {
deckManager.GetDeckFile(ret, mainGame->cbDBCategory->getSelected(), mainGame->cbDBCategory->getText(), mainGame->cbDBDecks->getText()); DeckManager::GetDeckFile(ret, mainGame->cbDBCategory->getSelected(), mainGame->cbDBCategory->getText(), mainGame->cbDBDecks->getText());
} }
static inline void load_current_deck(irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUIComboBox* cbDeck) { static inline void load_current_deck(irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUIComboBox* cbDeck) {
...@@ -185,7 +185,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -185,7 +185,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break; break;
wchar_t filepath[256]; wchar_t filepath[256];
get_deck_file(filepath); get_deck_file(filepath);
if(deckManager.SaveDeck(deckManager.current_deck, filepath)) { if(DeckManager::SaveDeck(deckManager.current_deck, filepath)) {
mainGame->stACMessage->setText(dataManager.GetSysString(1335)); mainGame->stACMessage->setText(dataManager.GetSysString(1335));
mainGame->PopupElement(mainGame->wACMessage, 20); mainGame->PopupElement(mainGame->wACMessage, 20);
is_modified = false; is_modified = false;
...@@ -211,10 +211,10 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -211,10 +211,10 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
} }
int catesel = mainGame->cbDBCategory->getSelected(); int catesel = mainGame->cbDBCategory->getSelected();
wchar_t catepath[256]; wchar_t catepath[256];
deckManager.GetCategoryPath(catepath, catesel, mainGame->cbDBCategory->getText()); DeckManager::GetCategoryPath(catepath, catesel, mainGame->cbDBCategory->getText());
wchar_t filepath[256]; wchar_t filepath[256];
myswprintf(filepath, L"%ls/%ls.ydk", catepath, dname); myswprintf(filepath, L"%ls/%ls.ydk", catepath, dname);
if(deckManager.SaveDeck(deckManager.current_deck, filepath)) { if(DeckManager::SaveDeck(deckManager.current_deck, filepath)) {
mainGame->stACMessage->setText(dataManager.GetSysString(1335)); mainGame->stACMessage->setText(dataManager.GetSysString(1335));
mainGame->PopupElement(mainGame->wACMessage, 20); mainGame->PopupElement(mainGame->wACMessage, 20);
is_modified = false; is_modified = false;
...@@ -437,7 +437,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -437,7 +437,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case BUTTON_NEW_CATEGORY: { case BUTTON_NEW_CATEGORY: {
int catesel = 0; int catesel = 0;
const wchar_t* catename = mainGame->ebDMName->getText(); const wchar_t* catename = mainGame->ebDMName->getText();
if(deckManager.CreateCategory(catename)) { if(DeckManager::CreateCategory(catename)) {
mainGame->cbDBCategory->addItem(catename); mainGame->cbDBCategory->addItem(catename);
mainGame->lstCategories->addItem(catename); mainGame->lstCategories->addItem(catename);
catesel = mainGame->lstCategories->getItemCount() - 1; catesel = mainGame->lstCategories->getItemCount() - 1;
...@@ -464,7 +464,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -464,7 +464,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
int catesel = mainGame->lstCategories->getSelected(); int catesel = mainGame->lstCategories->getSelected();
const wchar_t* oldcatename = mainGame->lstCategories->getListItem(catesel); const wchar_t* oldcatename = mainGame->lstCategories->getListItem(catesel);
const wchar_t* newcatename = mainGame->ebDMName->getText(); const wchar_t* newcatename = mainGame->ebDMName->getText();
if(deckManager.RenameCategory(oldcatename, newcatename)) { if(DeckManager::RenameCategory(oldcatename, newcatename)) {
mainGame->cbDBCategory->removeItem(catesel); mainGame->cbDBCategory->removeItem(catesel);
mainGame->cbDBCategory->addItem(newcatename); mainGame->cbDBCategory->addItem(newcatename);
mainGame->lstCategories->removeItem(catesel); mainGame->lstCategories->removeItem(catesel);
...@@ -493,7 +493,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -493,7 +493,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case BUTTON_DELETE_CATEGORY: { case BUTTON_DELETE_CATEGORY: {
int catesel = mainGame->lstCategories->getSelected(); int catesel = mainGame->lstCategories->getSelected();
const wchar_t* catename = mainGame->lstCategories->getListItem(catesel); const wchar_t* catename = mainGame->lstCategories->getListItem(catesel);
if(deckManager.DeleteCategory(catename)) { if(DeckManager::DeleteCategory(catename)) {
mainGame->cbDBCategory->removeItem(catesel); mainGame->cbDBCategory->removeItem(catesel);
mainGame->lstCategories->removeItem(catesel); mainGame->lstCategories->removeItem(catesel);
catesel = 2; catesel = 2;
...@@ -511,7 +511,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -511,7 +511,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case BUTTON_NEW_DECK: { case BUTTON_NEW_DECK: {
const wchar_t* deckname = mainGame->ebDMName->getText(); const wchar_t* deckname = mainGame->ebDMName->getText();
wchar_t catepath[256]; wchar_t catepath[256];
deckManager.GetCategoryPath(catepath, mainGame->cbDBCategory->getSelected(), mainGame->cbDBCategory->getText()); DeckManager::GetCategoryPath(catepath, mainGame->cbDBCategory->getSelected(), mainGame->cbDBCategory->getText());
wchar_t filepath[256]; wchar_t filepath[256];
myswprintf(filepath, L"%ls/%ls.ydk", catepath, deckname); myswprintf(filepath, L"%ls/%ls.ydk", catepath, deckname);
bool res = false; bool res = false;
...@@ -519,7 +519,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -519,7 +519,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
deckManager.current_deck.main.clear(); deckManager.current_deck.main.clear();
deckManager.current_deck.extra.clear(); deckManager.current_deck.extra.clear();
deckManager.current_deck.side.clear(); deckManager.current_deck.side.clear();
res = deckManager.SaveDeck(deckManager.current_deck, filepath); res = DeckManager::SaveDeck(deckManager.current_deck, filepath);
RefreshDeckList(); RefreshDeckList();
ChangeCategory(mainGame->lstCategories->getSelected()); ChangeCategory(mainGame->lstCategories->getSelected());
} }
...@@ -576,7 +576,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -576,7 +576,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
int decksel = mainGame->lstDecks->getSelected(); int decksel = mainGame->lstDecks->getSelected();
wchar_t filepath[256]; wchar_t filepath[256];
get_deck_file(filepath); get_deck_file(filepath);
if(deckManager.DeleteDeck(filepath)) { if(DeckManager::DeleteDeck(filepath)) {
mainGame->lstDecks->removeItem(decksel); mainGame->lstDecks->removeItem(decksel);
mainGame->cbDBDecks->removeItem(decksel); mainGame->cbDBDecks->removeItem(decksel);
decksel--; decksel--;
...@@ -652,7 +652,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -652,7 +652,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
} }
bool res = false; bool res = false;
if(!FileSystem::IsFileExists(newfilepath)) { if(!FileSystem::IsFileExists(newfilepath)) {
res = deckManager.SaveDeck(deckManager.current_deck, newfilepath); res = DeckManager::SaveDeck(deckManager.current_deck, newfilepath);
} }
mainGame->lstCategories->setSelected(newcatename); mainGame->lstCategories->setSelected(newcatename);
int catesel = mainGame->lstCategories->getSelected(); int catesel = mainGame->lstCategories->getSelected();
...@@ -753,7 +753,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -753,7 +753,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame->cbDBDecks->setSelected(sel); mainGame->cbDBDecks->setSelected(sel);
wchar_t filepath[256]; wchar_t filepath[256];
get_deck_file(filepath); get_deck_file(filepath);
if(deckManager.DeleteDeck(filepath)) { if(DeckManager::DeleteDeck(filepath)) {
mainGame->cbDBDecks->removeItem(sel); mainGame->cbDBDecks->removeItem(sel);
int count = mainGame->cbDBDecks->getItemCount(); int count = mainGame->cbDBDecks->getItemCount();
if(sel >= count) if(sel >= count)
...@@ -1048,7 +1048,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -1048,7 +1048,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break; break;
wchar_t filepath[256]; wchar_t filepath[256];
wchar_t catepath[256]; wchar_t catepath[256];
deckManager.GetCategoryPath(catepath, mainGame->lstCategories->getSelected(), mainGame->lstCategories->getListItem(mainGame->lstCategories->getSelected())); DeckManager::GetCategoryPath(catepath, mainGame->lstCategories->getSelected(), mainGame->lstCategories->getListItem(mainGame->lstCategories->getSelected()));
myswprintf(filepath, L"%ls/%ls.ydk", catepath, mainGame->lstDecks->getListItem(decksel)); myswprintf(filepath, L"%ls/%ls.ydk", catepath, mainGame->lstDecks->getListItem(decksel));
deckManager.LoadCurrentDeck(filepath, showing_pack); deckManager.LoadCurrentDeck(filepath, showing_pack);
RefreshPackListScroll(); RefreshPackListScroll();
...@@ -1653,7 +1653,7 @@ void DeckBuilder::RefreshDeckList() { ...@@ -1653,7 +1653,7 @@ void DeckBuilder::RefreshDeckList() {
irr::gui::IGUIListBox* lstCategories = mainGame->lstCategories; irr::gui::IGUIListBox* lstCategories = mainGame->lstCategories;
irr::gui::IGUIListBox* lstDecks = mainGame->lstDecks; irr::gui::IGUIListBox* lstDecks = mainGame->lstDecks;
wchar_t catepath[256]; wchar_t catepath[256];
deckManager.GetCategoryPath(catepath, lstCategories->getSelected(), lstCategories->getListItem(lstCategories->getSelected())); DeckManager::GetCategoryPath(catepath, lstCategories->getSelected(), lstCategories->getListItem(lstCategories->getSelected()));
lstDecks->clear(); lstDecks->clear();
mainGame->RefreshDeck(catepath, [lstDecks](const wchar_t* item) { lstDecks->addItem(item); }); mainGame->RefreshDeck(catepath, [lstDecks](const wchar_t* item) { lstDecks->addItem(item); });
} }
......
...@@ -14,6 +14,7 @@ void DeckManager::LoadLFListSingle(const char* path) { ...@@ -14,6 +14,7 @@ void DeckManager::LoadLFListSingle(const char* path) {
FILE* fp = myfopen(path, "r"); FILE* fp = myfopen(path, "r");
char linebuf[256]{}; char linebuf[256]{};
wchar_t strBuffer[256]{}; wchar_t strBuffer[256]{};
char str1[16]{};
if(fp) { if(fp) {
while(std::fgets(linebuf, sizeof linebuf, fp)) { while(std::fgets(linebuf, sizeof linebuf, fp)) {
if(linebuf[0] == '#') if(linebuf[0] == '#')
...@@ -33,10 +34,11 @@ void DeckManager::LoadLFListSingle(const char* path) { ...@@ -33,10 +34,11 @@ void DeckManager::LoadLFListSingle(const char* path) {
continue; continue;
unsigned int code = 0; unsigned int code = 0;
int count = -1; int count = -1;
if (std::sscanf(linebuf, "%9u%*[ ]%9d", &code, &count) != 2) if (std::sscanf(linebuf, "%10s%*[ ]%1d", str1, &count) != 2)
continue; continue;
if (count < 0 || count > 2) if (count < 0 || count > 2)
continue; continue;
code = std::strtoul(str1, nullptr, 10);
cur->content[code] = count; cur->content[code] = count;
cur->hash = cur->hash ^ ((code << 18) | (code >> 14)) ^ ((code << (27 + count)) | (code >> (5 - count))); cur->hash = cur->hash ^ ((code << 18) | (code >> 14)) ^ ((code << (27 + count)) | (code >> (5 - count)));
} }
...@@ -143,13 +145,12 @@ unsigned int DeckManager::CheckDeck(const Deck& deck, unsigned int lfhash, int r ...@@ -143,13 +145,12 @@ unsigned int DeckManager::CheckDeck(const Deck& deck, unsigned int lfhash, int r
} }
return 0; return 0;
} }
int DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec, bool is_packlist) { uint32_t DeckManager::LoadDeck(Deck& deck, uint32_t dbuf[], int mainc, int sidec, bool is_packlist) {
deck.clear(); deck.clear();
int code; uint32_t errorcode = 0;
int errorcode = 0;
CardData cd; CardData cd;
for(int i = 0; i < mainc; ++i) { for(int i = 0; i < mainc; ++i) {
code = dbuf[i]; auto code = dbuf[i];
if(!dataManager.GetData(code, &cd)) { if(!dataManager.GetData(code, &cd)) {
errorcode = code; errorcode = code;
continue; continue;
...@@ -172,7 +173,7 @@ int DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec, bool is_p ...@@ -172,7 +173,7 @@ int DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec, bool is_p
} }
} }
for(int i = 0; i < sidec; ++i) { for(int i = 0; i < sidec; ++i) {
code = dbuf[mainc + i]; auto code = dbuf[mainc + i];
if(!dataManager.GetData(code, &cd)) { if(!dataManager.GetData(code, &cd)) {
errorcode = code; errorcode = code;
continue; continue;
...@@ -186,22 +187,21 @@ int DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec, bool is_p ...@@ -186,22 +187,21 @@ int DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec, bool is_p
} }
return errorcode; return errorcode;
} }
int DeckManager::LoadDeck(Deck& deck, std::istringstream& deckStream, bool is_packlist) { uint32_t DeckManager::LoadDeckFromStream(Deck& deck, std::istringstream& deckStream, bool is_packlist) {
size_t ct = 0; int ct = 0;
int mainc = 0, sidec = 0, code = 0; int mainc = 0, sidec = 0;
int cardlist[PACK_MAX_SIZE]{}; uint32_t cardlist[PACK_MAX_SIZE]{};
bool is_side = false; bool is_side = false;
std::string linebuf; std::string linebuf;
while (std::getline(deckStream, linebuf, '\n') && ct < (sizeof cardlist / sizeof cardlist[0])) { while (std::getline(deckStream, linebuf, '\n') && ct < PACK_MAX_SIZE) {
if (linebuf[0] == '!') { if (linebuf[0] == '!') {
is_side = true; is_side = true;
continue; continue;
} }
if (linebuf[0] < '0' || linebuf[0] > '9') if (linebuf[0] < '0' || linebuf[0] > '9')
continue; continue;
errno = 0; auto code = std::strtoul(linebuf.c_str(), nullptr, 10);
code = std::strtol(linebuf.c_str(), nullptr, 10); if (code >= UINT32_MAX)
if (errno == ERANGE)
continue; continue;
cardlist[ct++] = code; cardlist[ct++] = code;
if (is_side) if (is_side)
...@@ -211,15 +211,15 @@ int DeckManager::LoadDeck(Deck& deck, std::istringstream& deckStream, bool is_pa ...@@ -211,15 +211,15 @@ int DeckManager::LoadDeck(Deck& deck, std::istringstream& deckStream, bool is_pa
} }
return LoadDeck(deck, cardlist, mainc, sidec, is_packlist); return LoadDeck(deck, cardlist, mainc, sidec, is_packlist);
} }
bool DeckManager::LoadSide(Deck& deck, int* dbuf, int mainc, int sidec) { bool DeckManager::LoadSide(Deck& deck, uint32_t dbuf[], int mainc, int sidec) {
std::unordered_map<int, int> pcount; std::unordered_map<uint32_t, int> pcount;
std::unordered_map<int, int> ncount; std::unordered_map<uint32_t, int> ncount;
for(size_t i = 0; i < deck.main.size(); ++i) for(size_t i = 0; i < deck.main.size(); ++i)
++pcount[deck.main[i]->first]; pcount[deck.main[i]->first]++;
for(size_t i = 0; i < deck.extra.size(); ++i) for(size_t i = 0; i < deck.extra.size(); ++i)
++pcount[deck.extra[i]->first]; pcount[deck.extra[i]->first]++;
for(size_t i = 0; i < deck.side.size(); ++i) for(size_t i = 0; i < deck.side.size(); ++i)
++pcount[deck.side[i]->first]; pcount[deck.side[i]->first]++;
Deck ndeck; Deck ndeck;
LoadDeck(ndeck, dbuf, mainc, sidec); LoadDeck(ndeck, dbuf, mainc, sidec);
#ifndef YGOPRO_NO_SIDE_CHECK #ifndef YGOPRO_NO_SIDE_CHECK
...@@ -227,11 +227,11 @@ bool DeckManager::LoadSide(Deck& deck, int* dbuf, int mainc, int sidec) { ...@@ -227,11 +227,11 @@ bool DeckManager::LoadSide(Deck& deck, int* dbuf, int mainc, int sidec) {
return false; return false;
#endif #endif
for(size_t i = 0; i < ndeck.main.size(); ++i) for(size_t i = 0; i < ndeck.main.size(); ++i)
++ncount[ndeck.main[i]->first]; ncount[ndeck.main[i]->first]++;
for(size_t i = 0; i < ndeck.extra.size(); ++i) for(size_t i = 0; i < ndeck.extra.size(); ++i)
++ncount[ndeck.extra[i]->first]; ncount[ndeck.extra[i]->first]++;
for(size_t i = 0; i < ndeck.side.size(); ++i) for(size_t i = 0; i < ndeck.side.size(); ++i)
++ncount[ndeck.side[i]->first]; ncount[ndeck.side[i]->first]++;
#ifndef YGOPRO_NO_SIDE_CHECK #ifndef YGOPRO_NO_SIDE_CHECK
for (auto& cdit : ncount) for (auto& cdit : ncount)
if (cdit.second != pcount[cdit.first]) if (cdit.second != pcount[cdit.first])
...@@ -307,8 +307,8 @@ bool DeckManager::LoadCurrentDeck(const wchar_t* file, bool is_packlist) { ...@@ -307,8 +307,8 @@ bool DeckManager::LoadCurrentDeck(const wchar_t* file, bool is_packlist) {
return false; return false;
} }
std::istringstream deckStream(deckBuffer); std::istringstream deckStream(deckBuffer);
LoadDeck(current_deck, deckStream, is_packlist); LoadDeckFromStream(current_deck, deckStream, is_packlist);
return true; // the above LoadDeck has return value but we ignore it here for now return true; // the above function has return value but we ignore it here for now
} }
bool DeckManager::LoadCurrentDeck(int category_index, const wchar_t* category_name, const wchar_t* deckname) { bool DeckManager::LoadCurrentDeck(int category_index, const wchar_t* category_name, const wchar_t* deckname) {
wchar_t filepath[256]; wchar_t filepath[256];
...@@ -319,7 +319,7 @@ bool DeckManager::LoadCurrentDeck(int category_index, const wchar_t* category_na ...@@ -319,7 +319,7 @@ bool DeckManager::LoadCurrentDeck(int category_index, const wchar_t* category_na
mainGame->deckBuilder.RefreshPackListScroll(); mainGame->deckBuilder.RefreshPackListScroll();
return res; return res;
} }
bool DeckManager::SaveDeck(Deck& deck, const wchar_t* file) { bool DeckManager::SaveDeck(const Deck& deck, const wchar_t* file) {
if(!FileSystem::IsDirExists(L"./deck") && !FileSystem::MakeDir(L"./deck")) if(!FileSystem::IsDirExists(L"./deck") && !FileSystem::MakeDir(L"./deck"))
return false; return false;
FILE* fp = OpenDeckFile(file, "w"); FILE* fp = OpenDeckFile(file, "w");
...@@ -327,26 +327,18 @@ bool DeckManager::SaveDeck(Deck& deck, const wchar_t* file) { ...@@ -327,26 +327,18 @@ bool DeckManager::SaveDeck(Deck& deck, const wchar_t* file) {
return false; return false;
std::fprintf(fp, "#created by ...\n#main\n"); std::fprintf(fp, "#created by ...\n#main\n");
for(size_t i = 0; i < deck.main.size(); ++i) for(size_t i = 0; i < deck.main.size(); ++i)
std::fprintf(fp, "%d\n", deck.main[i]->first); std::fprintf(fp, "%u\n", deck.main[i]->first);
std::fprintf(fp, "#extra\n"); std::fprintf(fp, "#extra\n");
for(size_t i = 0; i < deck.extra.size(); ++i) for(size_t i = 0; i < deck.extra.size(); ++i)
std::fprintf(fp, "%d\n", deck.extra[i]->first); std::fprintf(fp, "%u\n", deck.extra[i]->first);
std::fprintf(fp, "!side\n"); std::fprintf(fp, "!side\n");
for(size_t i = 0; i < deck.side.size(); ++i) for(size_t i = 0; i < deck.side.size(); ++i)
std::fprintf(fp, "%d\n", deck.side[i]->first); std::fprintf(fp, "%u\n", deck.side[i]->first);
std::fclose(fp); std::fclose(fp);
return true; return true;
} }
bool DeckManager::DeleteDeck(const wchar_t* file) { bool DeckManager::DeleteDeck(const wchar_t* file) {
#ifdef _WIN32 return FileSystem::RemoveFile(file);
BOOL result = DeleteFileW(file);
return !!result;
#else
char filefn[256];
BufferIO::EncodeUTF8(file, filefn);
int result = unlink(filefn);
return result == 0;
#endif
} }
int DeckManager::TypeCount(std::vector<code_pointer> list, unsigned int ctype) { int DeckManager::TypeCount(std::vector<code_pointer> list, unsigned int ctype) {
int res = 0; int res = 0;
...@@ -364,7 +356,7 @@ bool DeckManager::LoadDeckFromCode(Deck& deck, const unsigned char *code, int le ...@@ -364,7 +356,7 @@ bool DeckManager::LoadDeckFromCode(Deck& deck, const unsigned char *code, int le
return false; return false;
int mainc = BufferIO::ReadInt32(pdeck); int mainc = BufferIO::ReadInt32(pdeck);
int sidec = BufferIO::ReadInt32(pdeck); int sidec = BufferIO::ReadInt32(pdeck);
int errorcode = LoadDeck(deck, (int*)pdeck, mainc, sidec); int errorcode = LoadDeck(deck, (uint32_t*)pdeck, mainc, sidec);
return (errorcode == 0); return (errorcode == 0);
} }
int DeckManager::SaveDeckToCode(Deck& deck, unsigned char* code) { int DeckManager::SaveDeckToCode(Deck& deck, unsigned char* code) {
......
...@@ -63,25 +63,26 @@ public: ...@@ -63,25 +63,26 @@ public:
const wchar_t* GetLFListName(unsigned int lfhash); const wchar_t* GetLFListName(unsigned int lfhash);
const LFList* GetLFList(unsigned int lfhash); const LFList* GetLFList(unsigned int lfhash);
unsigned int CheckDeck(const Deck& deck, unsigned int lfhash, int rule); unsigned int CheckDeck(const Deck& deck, unsigned int lfhash, int rule);
int LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec, bool is_packlist = false);
int LoadDeck(Deck& deck, std::istringstream& deckStream, bool is_packlist = false);
bool LoadSide(Deck& deck, int* dbuf, int mainc, int sidec);
void GetCategoryPath(wchar_t* ret, int index, const wchar_t* text);
void GetDeckFile(wchar_t* ret, int category_index, const wchar_t* category_name, const wchar_t* deckname);
FILE* OpenDeckFile(const wchar_t* file, const char* mode);
irr::io::IReadFile* OpenDeckReader(const wchar_t* file);
bool LoadCurrentDeck(const wchar_t* file, bool is_packlist = false); bool LoadCurrentDeck(const wchar_t* file, bool is_packlist = false);
bool LoadCurrentDeck(int category_index, const wchar_t* category_name, const wchar_t* deckname); bool LoadCurrentDeck(int category_index, const wchar_t* category_name, const wchar_t* deckname);
bool SaveDeck(Deck& deck, const wchar_t* file);
bool DeleteDeck(const wchar_t* file);
wchar_t DeckFormatBuffer[128]; wchar_t DeckFormatBuffer[128];
int TypeCount(std::vector<code_pointer> list, unsigned int ctype); int TypeCount(std::vector<code_pointer> list, unsigned int ctype);
bool LoadDeckFromCode(Deck& deck, const unsigned char *code, int len); bool LoadDeckFromCode(Deck& deck, const unsigned char *code, int len);
int SaveDeckToCode(Deck &deck, unsigned char *code); int SaveDeckToCode(Deck &deck, unsigned char *code);
bool CreateCategory(const wchar_t* name);
bool RenameCategory(const wchar_t* oldname, const wchar_t* newname);
bool DeleteCategory(const wchar_t* name);
bool SaveDeckBuffer(const int deckbuf[], const wchar_t* name); bool SaveDeckBuffer(const int deckbuf[], const wchar_t* name);
static uint32_t LoadDeck(Deck& deck, uint32_t dbuf[], int mainc, int sidec, bool is_packlist = false);
static uint32_t LoadDeckFromStream(Deck& deck, std::istringstream& deckStream, bool is_packlist = false);
static bool LoadSide(Deck& deck, uint32_t dbuf[], int mainc, int sidec);
static void GetCategoryPath(wchar_t* ret, int index, const wchar_t* text);
static void GetDeckFile(wchar_t* ret, int category_index, const wchar_t* category_name, const wchar_t* deckname);
static FILE* OpenDeckFile(const wchar_t* file, const char* mode);
static irr::io::IReadFile* OpenDeckReader(const wchar_t* file);
static bool SaveDeck(const Deck& deck, const wchar_t* file);
static bool DeleteDeck(const wchar_t* file);
static bool CreateCategory(const wchar_t* name);
static bool RenameCategory(const wchar_t* oldname, const wchar_t* newname);
static bool DeleteCategory(const wchar_t* name);
}; };
extern DeckManager deckManager; extern DeckManager deckManager;
......
...@@ -4127,7 +4127,9 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) { ...@@ -4127,7 +4127,9 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
break; break;
} }
case MSG_RELOAD_FIELD: { case MSG_RELOAD_FIELD: {
if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) {
mainGame->gMutex.lock(); mainGame->gMutex.lock();
}
mainGame->dField.Clear(); mainGame->dField.Clear();
mainGame->dInfo.duel_rule = BufferIO::ReadUInt8(pbuf); mainGame->dInfo.duel_rule = BufferIO::ReadUInt8(pbuf);
int val = 0; int val = 0;
...@@ -4233,7 +4235,9 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) { ...@@ -4233,7 +4235,9 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
myswprintf(event_string, dataManager.GetSysString(1609), dataManager.GetName(mainGame->dField.current_chain.code)); myswprintf(event_string, dataManager.GetSysString(1609), dataManager.GetName(mainGame->dField.current_chain.code));
mainGame->dField.last_chain = true; mainGame->dField.last_chain = true;
} }
if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) {
mainGame->gMutex.unlock(); mainGame->gMutex.unlock();
}
break; break;
} }
} }
......
...@@ -146,6 +146,9 @@ bool Game::Initialize() { ...@@ -146,6 +146,9 @@ bool Game::Initialize() {
numFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 16); numFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 16);
if(!numFont) { if(!numFont) {
const wchar_t* numFontPaths[] = { const wchar_t* numFontPaths[] = {
L"./fonts/numFont.ttf",
L"./fonts/numFont.ttc",
L"./fonts/numFont.otf",
L"C:/Windows/Fonts/arialbd.ttf", L"C:/Windows/Fonts/arialbd.ttf",
L"/usr/share/fonts/truetype/DroidSansFallbackFull.ttf", L"/usr/share/fonts/truetype/DroidSansFallbackFull.ttf",
L"/usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc", L"/usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc",
...@@ -153,9 +156,6 @@ bool Game::Initialize() { ...@@ -153,9 +156,6 @@ bool Game::Initialize() {
L"/usr/share/fonts/noto-cjk/NotoSansCJK-Bold.ttc", L"/usr/share/fonts/noto-cjk/NotoSansCJK-Bold.ttc",
L"/System/Library/Fonts/SFNSTextCondensed-Bold.otf", L"/System/Library/Fonts/SFNSTextCondensed-Bold.otf",
L"/System/Library/Fonts/SFNS.ttf", L"/System/Library/Fonts/SFNS.ttf",
L"./fonts/numFont.ttf",
L"./fonts/numFont.ttc",
L"./fonts/numFont.otf"
}; };
for(const wchar_t* path : numFontPaths) { for(const wchar_t* path : numFontPaths) {
BufferIO::CopyWideString(path, gameConf.numfont); BufferIO::CopyWideString(path, gameConf.numfont);
...@@ -167,6 +167,9 @@ bool Game::Initialize() { ...@@ -167,6 +167,9 @@ bool Game::Initialize() {
textFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize); textFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize);
if(!textFont) { if(!textFont) {
const wchar_t* textFontPaths[] = { const wchar_t* textFontPaths[] = {
L"./fonts/textFont.ttf",
L"./fonts/textFont.ttc",
L"./fonts/textFont.otf",
L"C:/Windows/Fonts/msyh.ttc", L"C:/Windows/Fonts/msyh.ttc",
L"C:/Windows/Fonts/msyh.ttf", L"C:/Windows/Fonts/msyh.ttf",
L"C:/Windows/Fonts/simsun.ttc", L"C:/Windows/Fonts/simsun.ttc",
...@@ -178,9 +181,7 @@ bool Game::Initialize() { ...@@ -178,9 +181,7 @@ bool Game::Initialize() {
L"/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc", L"/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc",
L"/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc", L"/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc",
L"/System/Library/Fonts/PingFang.ttc", L"/System/Library/Fonts/PingFang.ttc",
L"./fonts/textFont.ttf", L"/System/Library/Fonts/STHeiti Medium.ttc",
L"./fonts/textFont.ttc",
L"./fonts/textFont.otf"
}; };
for(const wchar_t* path : textFontPaths) { for(const wchar_t* path : textFontPaths) {
BufferIO::CopyWideString(path, gameConf.textfont); BufferIO::CopyWideString(path, gameConf.textfont);
...@@ -198,7 +199,7 @@ bool Game::Initialize() { ...@@ -198,7 +199,7 @@ bool Game::Initialize() {
} }
}); });
if(fpath[0] == 0) { if(fpath[0] == 0) {
ErrorLog("Failed to load font(s)!"); ErrorLog("No fonts found! Please place appropriate font file in the fonts directory, or edit system.conf manually.");
return false; return false;
} }
if(!numFont) { if(!numFont) {
...@@ -210,6 +211,10 @@ bool Game::Initialize() { ...@@ -210,6 +211,10 @@ bool Game::Initialize() {
textFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize); textFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize);
} }
} }
if(!numFont || !textFont) {
ErrorLog("Failed to load font(s)!");
return false;
}
adFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 12); adFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 12);
lpcFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 48); lpcFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 48);
guiFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize); guiFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize);
...@@ -1335,7 +1340,7 @@ void Game::RefreshDeck(irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUIComboBo ...@@ -1335,7 +1340,7 @@ void Game::RefreshDeck(irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUIComboBo
return; return;
} }
wchar_t catepath[256]; wchar_t catepath[256];
deckManager.GetCategoryPath(catepath, cbCategory->getSelected(), cbCategory->getText()); DeckManager::GetCategoryPath(catepath, cbCategory->getSelected(), cbCategory->getText());
cbDeck->clear(); cbDeck->clear();
RefreshDeck(catepath, [cbDeck](const wchar_t* item) { cbDeck->addItem(item); }); RefreshDeck(catepath, [cbDeck](const wchar_t* item) { cbDeck->addItem(item); });
} }
...@@ -1474,14 +1479,6 @@ bool Game::LoadConfigFromFile(const char* file) { ...@@ -1474,14 +1479,6 @@ bool Game::LoadConfigFromFile(const char* file) {
} else if(!std::strcmp(strbuf, "errorlog")) { } else if(!std::strcmp(strbuf, "errorlog")) {
unsigned int val = std::strtol(valbuf, nullptr, 10); unsigned int val = std::strtol(valbuf, nullptr, 10);
enable_log = val & 0xff; enable_log = val & 0xff;
} else if(!std::strcmp(strbuf, "textfont")) {
int textfontsize = 0;
if (std::sscanf(linebuf, "%63s = %959s %d", strbuf, valbuf, &textfontsize) != 3)
continue;
gameConf.textfontsize = textfontsize;
BufferIO::DecodeUTF8(valbuf, gameConf.textfont);
} else if(!std::strcmp(strbuf, "numfont")) {
BufferIO::DecodeUTF8(valbuf, gameConf.numfont);
} else if(!std::strcmp(strbuf, "serverport")) { } else if(!std::strcmp(strbuf, "serverport")) {
gameConf.serverport = std::strtol(valbuf, nullptr, 10); gameConf.serverport = std::strtol(valbuf, nullptr, 10);
} else if(!std::strcmp(strbuf, "lasthost")) { } else if(!std::strcmp(strbuf, "lasthost")) {
...@@ -1584,7 +1581,18 @@ bool Game::LoadConfigFromFile(const char* file) { ...@@ -1584,7 +1581,18 @@ bool Game::LoadConfigFromFile(const char* file) {
// options allowing multiple words // options allowing multiple words
if (std::sscanf(linebuf, "%63s = %959[^\n]", strbuf, valbuf) != 2) if (std::sscanf(linebuf, "%63s = %959[^\n]", strbuf, valbuf) != 2)
continue; continue;
if (!std::strcmp(strbuf, "nickname")) { if (!std::strcmp(strbuf, "textfont")) {
char* last_space = std::strrchr(valbuf, ' ');
if (last_space == nullptr)
continue;
int fontsize = std::strtol(last_space + 1, nullptr, 10);
if (fontsize > 0)
gameConf.textfontsize = fontsize;
*last_space = 0;
BufferIO::DecodeUTF8(valbuf, gameConf.textfont);
} else if (!std::strcmp(strbuf, "numfont")) {
BufferIO::DecodeUTF8(valbuf, gameConf.numfont);
} else if (!std::strcmp(strbuf, "nickname")) {
BufferIO::DecodeUTF8(valbuf, gameConf.nickname); BufferIO::DecodeUTF8(valbuf, gameConf.nickname);
} else if (!std::strcmp(strbuf, "gamename")) { } else if (!std::strcmp(strbuf, "gamename")) {
BufferIO::DecodeUTF8(valbuf, gameConf.gamename); BufferIO::DecodeUTF8(valbuf, gameConf.gamename);
...@@ -1994,6 +2002,11 @@ void Game::AddDebugMsg(const char* msg) { ...@@ -1994,6 +2002,11 @@ void Game::AddDebugMsg(const char* msg) {
} }
} }
void Game::ErrorLog(const char* msg) { void Game::ErrorLog(const char* msg) {
#ifdef _WIN32
OutputDebugStringA(msg);
#else
std::fprintf(stderr, "%s\n", msg);
#endif
FILE* fp = myfopen("error.log", "a"); FILE* fp = myfopen("error.log", "a");
if(!fp) if(!fp)
return; return;
......
...@@ -28,7 +28,7 @@ int main(int argc, char* argv[]) { ...@@ -28,7 +28,7 @@ int main(int argc, char* argv[]) {
#if defined(FOPEN_WINDOWS_SUPPORT_UTF8) #if defined(FOPEN_WINDOWS_SUPPORT_UTF8)
std::setlocale(LC_CTYPE, ".UTF-8"); std::setlocale(LC_CTYPE, ".UTF-8");
#elif defined(__APPLE__) #elif defined(__APPLE__)
std::setlocale(LC_CTYPE, "C.UTF-8"); std::setlocale(LC_CTYPE, "UTF-8");
#elif !defined(_WIN32) #elif !defined(_WIN32)
std::setlocale(LC_CTYPE, ""); std::setlocale(LC_CTYPE, "");
#endif #endif
......
...@@ -353,7 +353,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -353,7 +353,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
wchar_t arg1[512]; wchar_t arg1[512];
if(mainGame->botInfo[sel].select_deckfile) { if(mainGame->botInfo[sel].select_deckfile) {
wchar_t botdeck[256]; wchar_t botdeck[256];
deckManager.GetDeckFile(botdeck, mainGame->cbBotDeckCategory->getSelected(), mainGame->cbBotDeckCategory->getText(), mainGame->cbBotDeck->getText()); DeckManager::GetDeckFile(botdeck, mainGame->cbBotDeckCategory->getSelected(), mainGame->cbBotDeckCategory->getText(), mainGame->cbBotDeck->getText());
myswprintf(arg1, L"%ls DeckFile='%ls'", mainGame->botInfo[sel].command, botdeck); myswprintf(arg1, L"%ls DeckFile='%ls'", mainGame->botInfo[sel].command, botdeck);
} }
else else
...@@ -372,7 +372,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -372,7 +372,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
wchar_t warg1[512]; wchar_t warg1[512];
if(mainGame->botInfo[sel].select_deckfile) { if(mainGame->botInfo[sel].select_deckfile) {
wchar_t botdeck[256]; wchar_t botdeck[256];
deckManager.GetDeckFile(botdeck, mainGame->cbBotDeckCategory->getSelected(), mainGame->cbBotDeckCategory->getText(), mainGame->cbBotDeck->getText()); DeckManager::GetDeckFile(botdeck, mainGame->cbBotDeckCategory->getSelected(), mainGame->cbBotDeckCategory->getText(), mainGame->cbBotDeck->getText());
myswprintf(warg1, L"%ls DeckFile='%ls'", mainGame->botInfo[sel].command, botdeck); myswprintf(warg1, L"%ls DeckFile='%ls'", mainGame->botInfo[sel].command, botdeck);
} }
else else
......
...@@ -86,6 +86,14 @@ public: ...@@ -86,6 +86,14 @@ public:
return DeleteDir(wdir); return DeleteDir(wdir);
} }
static bool RemoveFile(const wchar_t* wfile) {
return DeleteFileW(wfile);
}
static bool RemoveFile(const char* file) {
return DeleteFileA(file);
}
static void TraversalDir(const wchar_t* wpath, const std::function<void(const wchar_t*, bool)>& cb) { static void TraversalDir(const wchar_t* wpath, const std::function<void(const wchar_t*, bool)>& cb) {
wchar_t findstr[1024]; wchar_t findstr[1024];
std::swprintf(findstr, sizeof findstr / sizeof findstr[0], L"%ls/*", wpath); std::swprintf(findstr, sizeof findstr / sizeof findstr[0], L"%ls/*", wpath);
...@@ -195,6 +203,16 @@ public: ...@@ -195,6 +203,16 @@ public:
return success; return success;
} }
static bool RemoveFile(const wchar_t* wfile) {
char file[1024];
BufferIO::EncodeUTF8(wfile, file);
return RemoveFile(file);
}
static bool RemoveFile(const char* file) {
return unlink(file) == 0;
}
struct file_unit { struct file_unit {
std::string filename; std::string filename;
bool is_dir; bool is_dir;
......
...@@ -27,7 +27,7 @@ struct HostInfo { ...@@ -27,7 +27,7 @@ struct HostInfo {
uint8_t no_shuffle_deck{}; uint8_t no_shuffle_deck{};
// byte padding[3] // byte padding[3]
uint32_t start_lp{}; int32_t start_lp{};
uint8_t start_hand{}; uint8_t start_hand{};
uint8_t draw_count{}; uint8_t draw_count{};
uint16_t time_limit{}; uint16_t time_limit{};
...@@ -57,7 +57,7 @@ static_assert(sizeof(HostRequest) == 2, "size mismatch: HostRequest"); ...@@ -57,7 +57,7 @@ static_assert(sizeof(HostRequest) == 2, "size mismatch: HostRequest");
struct CTOS_DeckData { struct CTOS_DeckData {
int32_t mainc{}; int32_t mainc{};
int32_t sidec{}; int32_t sidec{};
int32_t list[MAINC_MAX + SIDEC_MAX]{}; uint32_t list[MAINC_MAX + SIDEC_MAX]{};
}; };
check_trivially_copyable(CTOS_DeckData); check_trivially_copyable(CTOS_DeckData);
......
...@@ -68,7 +68,6 @@ project "YGOPro" ...@@ -68,7 +68,6 @@ project "YGOPro"
filter "system:windows" filter "system:windows"
defines { "_IRR_WCHAR_FILESYSTEM" } defines { "_IRR_WCHAR_FILESYSTEM" }
files "ygopro.rc" files "ygopro.rc"
libdirs { "$(DXSDK_DIR)Lib/x86" }
links { "opengl32", "ws2_32", "winmm", "gdi32", "kernel32", "user32", "imm32", "Dnsapi" } links { "opengl32", "ws2_32", "winmm", "gdi32", "kernel32", "user32", "imm32", "Dnsapi" }
if USE_AUDIO and AUDIO_LIB == "irrklang" then if USE_AUDIO and AUDIO_LIB == "irrklang" then
links { "irrKlang" } links { "irrKlang" }
......
...@@ -154,15 +154,7 @@ bool Replay::CheckReplay(const wchar_t* name) { ...@@ -154,15 +154,7 @@ bool Replay::CheckReplay(const wchar_t* name) {
bool Replay::DeleteReplay(const wchar_t* name) { bool Replay::DeleteReplay(const wchar_t* name) {
wchar_t fname[256]; wchar_t fname[256];
myswprintf(fname, L"./replay/%ls", name); myswprintf(fname, L"./replay/%ls", name);
#ifdef _WIN32 return FileSystem::RemoveFile(fname);
BOOL result = DeleteFileW(fname);
return !!result;
#else
char filefn[256];
BufferIO::EncodeUTF8(fname, filefn);
int result = unlink(filefn);
return result == 0;
#endif
} }
bool Replay::RenameReplay(const wchar_t* oldname, const wchar_t* newname) { bool Replay::RenameReplay(const wchar_t* oldname, const wchar_t* newname) {
wchar_t oldfname[256]; wchar_t oldfname[256];
......
...@@ -17,13 +17,13 @@ constexpr int MAX_REPLAY_SIZE = 0x20000; ...@@ -17,13 +17,13 @@ constexpr int MAX_REPLAY_SIZE = 0x20000;
constexpr int MAX_COMP_SIZE = UINT16_MAX + 1; constexpr int MAX_COMP_SIZE = UINT16_MAX + 1;
struct ReplayHeader { struct ReplayHeader {
unsigned int id{}; uint32_t id{};
unsigned int version{}; uint32_t version{};
unsigned int flag{}; uint32_t flag{};
unsigned int seed{}; uint32_t seed{};
unsigned int datasize{}; uint32_t datasize{};
unsigned int start_time{}; uint32_t start_time{};
unsigned char props[8]{}; uint8_t props[8]{};
}; };
class Replay { class Replay {
......
...@@ -299,9 +299,9 @@ void SingleDuel::UpdateDeck(DuelPlayer* dp, unsigned char* pdata, int len) { ...@@ -299,9 +299,9 @@ void SingleDuel::UpdateDeck(DuelPlayer* dp, unsigned char* pdata, int len) {
return; return;
} }
if(duel_count == 0) { if(duel_count == 0) {
deck_error[dp->type] = deckManager.LoadDeck(pdeck[dp->type], deckbuf.list, deckbuf.mainc, deckbuf.sidec); deck_error[dp->type] = DeckManager::LoadDeck(pdeck[dp->type], deckbuf.list, deckbuf.mainc, deckbuf.sidec);
} else { } else {
if(deckManager.LoadSide(pdeck[dp->type], deckbuf.list, deckbuf.mainc, deckbuf.sidec)) { if(DeckManager::LoadSide(pdeck[dp->type], deckbuf.list, deckbuf.mainc, deckbuf.sidec)) {
ready[dp->type] = true; ready[dp->type] = true;
NetServer::SendPacketToPlayer(dp, STOC_DUEL_START); NetServer::SendPacketToPlayer(dp, STOC_DUEL_START);
if(ready[0] && ready[1]) { if(ready[0] && ready[1]) {
......
...@@ -281,7 +281,7 @@ void TagDuel::UpdateDeck(DuelPlayer* dp, unsigned char* pdata, int len) { ...@@ -281,7 +281,7 @@ void TagDuel::UpdateDeck(DuelPlayer* dp, unsigned char* pdata, int len) {
NetServer::SendPacketToPlayer(dp, STOC_ERROR_MSG, scem); NetServer::SendPacketToPlayer(dp, STOC_ERROR_MSG, scem);
return; return;
} }
deck_error[dp->type] = deckManager.LoadDeck(pdeck[dp->type], deckbuf.list, deckbuf.mainc, deckbuf.sidec); deck_error[dp->type] = DeckManager::LoadDeck(pdeck[dp->type], deckbuf.list, deckbuf.mainc, deckbuf.sidec);
} }
void TagDuel::StartDuel(DuelPlayer* dp) { void TagDuel::StartDuel(DuelPlayer* dp) {
if(dp != host_player) if(dp != host_player)
......
#[2025.4][2024.12 TCG][2025.1][2024.10][2024.7][2024.4][2024.1][2023.10][2023.7][2023.4][2023.1][2022.10][2022.7][2022.4][2022.1][2021.10][2021.7][2021.4][2021.1][2020.10][2020.7][2020.4][2020.1][2019.10][2019.7][2019.4][2019.1][2018.10][2018.7][2018.4][2018.1][2017.10][2017.7][2017.4][2017.1][2016.10][2016.7][2016.4][2016.1][2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2024.9 TCG][2024.4 TCG][2024.1 TCG][2023.9 TCG][2023.6 TCG][2023.2 TCG][2022.12 TCG][2022.10 TCG][2022.5 TCG][2022.2 TCG][2021.10 TCG][2021.7 TCG][2021.3 TCG][2020.12 TCG][2020.9 TCG][2020.6 TCG][2020.4 TCG][2020.1 TCG][2019.10 TCG][2019.7 TCG][2019.4 TCG][2019.1 TCG][2018.12 TCG][2018.9 TCG][2018.5 TCG][2018.2 TCG][2017.11 TCG][2017.9 TCG][2017.6 TCG][2017.3 TCG][2016.8 TCG][2016.4 TCG][2015.11 TCG][2015.7 TCG][2015.4 TCG][2015.1 TCG][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1] #[2025.4][2025.4 TCG][2025.1][2024.10][2024.7][2024.4][2024.1][2023.10][2023.7][2023.4][2023.1][2022.10][2022.7][2022.4][2022.1][2021.10][2021.7][2021.4][2021.1][2020.10][2020.7][2020.4][2020.1][2019.10][2019.7][2019.4][2019.1][2018.10][2018.7][2018.4][2018.1][2017.10][2017.7][2017.4][2017.1][2016.10][2016.7][2016.4][2016.1][2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2024.12 TCG][2024.9 TCG][2024.4 TCG][2024.1 TCG][2023.9 TCG][2023.6 TCG][2023.2 TCG][2022.12 TCG][2022.10 TCG][2022.5 TCG][2022.2 TCG][2021.10 TCG][2021.7 TCG][2021.3 TCG][2020.12 TCG][2020.9 TCG][2020.6 TCG][2020.4 TCG][2020.1 TCG][2019.10 TCG][2019.7 TCG][2019.4 TCG][2019.1 TCG][2018.12 TCG][2018.9 TCG][2018.5 TCG][2018.2 TCG][2017.11 TCG][2017.9 TCG][2017.6 TCG][2017.3 TCG][2016.8 TCG][2016.4 TCG][2015.11 TCG][2015.7 TCG][2015.4 TCG][2015.1 TCG][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1]
!2025.4 !2025.4
#forbidden #forbidden
20292186 0 --アーティファクト-デスサイズ 20292186 0 --アーティファクト-デスサイズ
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
52947044 2 --フュージョン・デステニー 52947044 2 --フュージョン・デステニー
92714517 2 --ビッグウェルカム・ラビュリンス 92714517 2 --ビッグウェルカム・ラビュリンス
!2024.12 TCG !2025.4 TCG
#forbidden #forbidden
62320425 0 --Agido the Ancient Sentinel 62320425 0 --Agido the Ancient Sentinel
20292186 0 --Artifact Scythe 20292186 0 --Artifact Scythe
...@@ -207,8 +207,6 @@ ...@@ -207,8 +207,6 @@
25926710 0 --Kelbek the Ancient Vanguard 25926710 0 --Kelbek the Ancient Vanguard
57421866 0 --Level Eater 57421866 0 --Level Eater
34206604 0 --Magical Scientist 34206604 0 --Magical Scientist
21377582 0 --Master Peace, the True Dracoslaying King
36521307 0 --Mathmech Circular
23434538 0 --Maxx "C" 23434538 0 --Maxx "C"
96782886 0 --Mind Master 96782886 0 --Mind Master
23558733 0 --Phoenixian Cluster Amaryllis 23558733 0 --Phoenixian Cluster Amaryllis
...@@ -228,7 +226,9 @@ ...@@ -228,7 +226,9 @@
24094258 0 --Heavymetalfoes Electrumite 24094258 0 --Heavymetalfoes Electrumite
59934749 0 --Isolde, Two Tales of the Noble Knights 59934749 0 --Isolde, Two Tales of the Noble Knights
39064822 0 --Knightmare Goblin 39064822 0 --Knightmare Goblin
65330383 0 --Knightmare Gryphon
03679218 0 --Knightmare Mermaid 03679218 0 --Knightmare Mermaid
30342076 0 --Link Decoder
85243784 0 --Linkross 85243784 0 --Linkross
41999284 0 --Linkuriboh 41999284 0 --Linkuriboh
44097050 0 --Mecha Phantom Beast Auroradon 44097050 0 --Mecha Phantom Beast Auroradon
...@@ -245,6 +245,8 @@ ...@@ -245,6 +245,8 @@
03040496 0 --Chaos Ruler, the Chaotic Magical Dragon 03040496 0 --Chaos Ruler, the Chaotic Magical Dragon
62242678 0 --Hot Red Dragon Archfiend King Calamity 62242678 0 --Hot Red Dragon Archfiend King Calamity
63101919 0 --Tempest Magician 63101919 0 --Tempest Magician
21044178 0 --Abyss Dweller
00440556 0 --Bahamut Shark
27552504 0 --Beatrice, Lady of the Eternal 27552504 0 --Beatrice, Lady of the Eternal
48626373 0 --Kashtira Arise-Heart 48626373 0 --Kashtira Arise-Heart
34086406 0 --Lavalval Chain 34086406 0 --Lavalval Chain
...@@ -260,7 +262,6 @@ ...@@ -260,7 +262,6 @@
81122844 0 --Wind-Up Carrier Zenmaity 81122844 0 --Wind-Up Carrier Zenmaity
85115440 0 --Zoodiac Broadbull 85115440 0 --Zoodiac Broadbull
48905153 0 --Zoodiac Drident 48905153 0 --Zoodiac Drident
07394770 0 --Brilliant Fusion
69243953 0 --Butterfly Dagger - Elma 69243953 0 --Butterfly Dagger - Elma
57953380 0 --Card of Safe Return 57953380 0 --Card of Safe Return
60682203 0 --Cold Wave 60682203 0 --Cold Wave
...@@ -303,25 +304,23 @@ ...@@ -303,25 +304,23 @@
08124921 1 --Right Leg of the Forbidden One 08124921 1 --Right Leg of the Forbidden One
06728559 1 --Archnemeses Protos 06728559 1 --Archnemeses Protos
76794549 1 --Astrograph Sorcerer 76794549 1 --Astrograph Sorcerer
61901281 1 --Black Dragon Collapserpent 06637331 1 --Bystial Druiswurm
33854624 1 --Bystial Magnamhut 33854624 1 --Bystial Magnamhut
14536035 1 --Dark Grepher 14536035 1 --Dark Grepher
91800273 1 --Dimension Shifter
33396948 1 --Exodia the Forbidden One 33396948 1 --Exodia the Forbidden One
63542003 1 --Keldo the Sacred Protector 63542003 1 --Keldo the Sacred Protector
21377582 1 --Master Peace, the True Dracoslaying King
36521307 1 --Mathmech Circular
38572779 1 --Miscellaneousaurus 38572779 1 --Miscellaneousaurus
33508719 1 --Morphing Jar
99937011 1 --Mudora the Sword Oracle 99937011 1 --Mudora the Sword Oracle
12958919 1 --Phantom Skyblaster 12958919 1 --Phantom Skyblaster
38814750 1 --PSY-Framegear Gamma 38814750 1 --PSY-Framegear Gamma
09674034 1 --Snake-Eye Ash
90241276 1 --Snake-Eyes Poplar
20663556 1 --Substitoad 20663556 1 --Substitoad
37961969 1 --Tearlaments Havnis 37961969 1 --Tearlaments Havnis
74078255 1 --Tearlaments Merrli 74078255 1 --Tearlaments Merrli
00572850 1 --Tearlaments Scheiren 00572850 1 --Tearlaments Scheiren
91810826 1 --Tenpai Dragon Chundra 91810826 1 --Tenpai Dragon Chundra
41165831 1 --Unchained Soul of Sharvara
99234526 1 --White Dragon Wyverburster
78872731 1 --Zoodiac Ratpier 78872731 1 --Zoodiac Ratpier
39512984 1 --Gem-Knight Master Diamond 39512984 1 --Gem-Knight Master Diamond
80453041 1 --Phantom of Yubel 80453041 1 --Phantom of Yubel
...@@ -333,7 +332,10 @@ ...@@ -333,7 +332,10 @@
00581014 1 --Daigusto Emeral 00581014 1 --Daigusto Emeral
75433814 1 --Number 40: Gimmick Puppet of Strings 75433814 1 --Number 40: Gimmick Puppet of Strings
69170557 1 --Number C40: Gimmick Puppet of Dark Strings 69170557 1 --Number C40: Gimmick Puppet of Dark Strings
34909328 1 --Ryzeal Detonator
85106525 1 --Bonfire
44362883 1 --Branded Fusion 44362883 1 --Branded Fusion
07394770 1 --Brilliant Fusion
24224830 1 --Called by the Grave 24224830 1 --Called by the Grave
72892473 1 --Card Destruction 72892473 1 --Card Destruction
59750328 1 --Card of Demise 59750328 1 --Card of Demise
...@@ -341,6 +343,7 @@ ...@@ -341,6 +343,7 @@
04031928 1 --Change of Heart 04031928 1 --Change of Heart
99266988 1 --Chaos Space 99266988 1 --Chaos Space
67616300 1 --Chicken Game 67616300 1 --Chicken Game
65681983 1 --Crossout Designator
15854426 1 --Divine Wind of Mist Valley 15854426 1 --Divine Wind of Mist Valley
13035077 1 --Dragonic Diagram 13035077 1 --Dragonic Diagram
95308449 1 --Final Countdown 95308449 1 --Final Countdown
...@@ -368,6 +371,7 @@ ...@@ -368,6 +371,7 @@
45986603 1 --Snatch Steal 45986603 1 --Snatch Steal
73628505 1 --Terraforming 73628505 1 --Terraforming
11110587 1 --That Grass Looks Greener 11110587 1 --That Grass Looks Greener
25311006 1 --Triple Tactics Talent
46060017 1 --Zoodiac Barrage 46060017 1 --Zoodiac Barrage
58921041 1 --Anti-Spell Fragrance 58921041 1 --Anti-Spell Fragrance
53334471 1 --Gozen Match 53334471 1 --Gozen Match
...@@ -377,12 +381,19 @@ ...@@ -377,12 +381,19 @@
82732705 1 --Skill Drain 82732705 1 --Skill Drain
24207889 1 --There Can Be Only One 24207889 1 --There Can Be Only One
#semi limit #semi limit
34124316 2 --Cyber Jar 61901281 2 --Black Dragon Collapserpent
43694650 2 --Danger!? Jackalope? 34022970 2 --Ext Ryzeal
99745551 2 --Danger!? Tsuchinoko? 08633261 2 --Ice Ryzeal
40177746 2 --Eva 32061192 2 --Maliss <P> Dormouse
17330916 2 --Performapal Monkeyboard 69272449 2 --Maliss <P> White Rabbit
33508719 2 --Morphing Jar
09674034 2 --Snake-Eye Ash
90241276 2 --Snake-Eyes Poplar
35844557 2 --Sword Ryzeal
41165831 2 --Unchained Soul of Sharvara
99234526 2 --White Dragon Wyverburster
14532163 2 --Lightning Storm 14532163 2 --Lightning Storm
68337209 2 --Maliss in Underground
55584558 2 --Purrely Delicious Memory 55584558 2 --Purrely Delicious Memory
21347668 2 --Purrely Sleepy Memory 21347668 2 --Purrely Sleepy Memory
92107604 2 --Runick Fountain 92107604 2 --Runick Fountain
...@@ -8132,6 +8143,207 @@ ...@@ -8132,6 +8143,207 @@
53582587 2 --激流葬 53582587 2 --激流葬
29401950 2 --奈落の落とし穴 29401950 2 --奈落の落とし穴
!2024.12 TCG
#forbidden
62320425 0 --Agido the Ancient Sentinel
20292186 0 --Artifact Scythe
73356503 0 --Barrier Statue of the Stormwinds
09929398 0 --Blackwing - Gofu the Vague Shadow
94689206 0 --Block Dragon
69015963 0 --Cyber-Stein
15341821 0 --Dandylion
08903700 0 --Djinn Releaser of Rituals
51858306 0 --Eclipse Wyvern
55623480 0 --Fairy Tail - Snow
78706415 0 --Fiber Jar
93369354 0 --Fishborg Blaster
55204071 0 --Gimmick Puppet Nightmare
67441435 0 --Glow-Up Bulb
75732622 0 --Grinder Golem
41855169 0 --Jowgen the Spiritualist
25926710 0 --Kelbek the Ancient Vanguard
57421866 0 --Level Eater
34206604 0 --Magical Scientist
21377582 0 --Master Peace, the True Dracoslaying King
36521307 0 --Mathmech Circular
23434538 0 --Maxx "C"
96782886 0 --Mind Master
23558733 0 --Phoenixian Cluster Amaryllis
01357146 0 --Ronintoadin
91258852 0 --SPYRAL Master Plan
88071625 0 --The Tyrant Neptune
44910027 0 --Victory Dragon
17412721 0 --Elder Entity Norden
46640168 0 --Fiendsmith's Lacrima
43387895 0 --Supreme King Dragon Starving Venom
92731385 0 --Tearlaments Kitkallos
04280258 0 --Apollousa, Bow of the Goddess
50588353 0 --Crystron Halqifibrax
98095162 0 --Curious, the Lightsworn Dominion
59537380 0 --Guardragon Agarpain
86148577 0 --Guardragon Elpy
24094258 0 --Heavymetalfoes Electrumite
59934749 0 --Isolde, Two Tales of the Noble Knights
39064822 0 --Knightmare Goblin
03679218 0 --Knightmare Mermaid
85243784 0 --Linkross
41999284 0 --Linkuriboh
44097050 0 --Mecha Phantom Beast Auroradon
25725326 0 --Prank-Kids Meow-Meow-Mu
70369116 0 --Predaplant Verte Anaconda
72330894 0 --Simorgh, Bird of Sovereignty
27381364 0 --Spright Elf
61665245 0 --Summon Sorceress
33918636 0 --Superheavy Samurai Scarecrow
22593417 0 --Topologic Gumblar Dragon
83152482 0 --Union Carrier
84815190 0 --Baronne de Fleur
27548199 0 --Borreload Savage Dragon
03040496 0 --Chaos Ruler, the Chaotic Magical Dragon
62242678 0 --Hot Red Dragon Archfiend King Calamity
63101919 0 --Tempest Magician
27552504 0 --Beatrice, Lady of the Eternal
48626373 0 --Kashtira Arise-Heart
34086406 0 --Lavalval Chain
04423206 0 --M-X-Saber Invoker
54719828 0 --Number 16: Shock Master
10389142 0 --Number 42: Galaxy Tomahawk
63504681 0 --Number 86: Heroic Champion - Rhongomyniad
95474755 0 --Number 89: Diablosis the Mind Hacker
58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon
52653092 0 --Number S0: Utopic ZEXAL
34945480 0 --Outer Entity Azathot
88581108 0 --True King of All Calamities
81122844 0 --Wind-Up Carrier Zenmaity
85115440 0 --Zoodiac Broadbull
48905153 0 --Zoodiac Drident
07394770 0 --Brilliant Fusion
69243953 0 --Butterfly Dagger - Elma
57953380 0 --Card of Safe Return
60682203 0 --Cold Wave
17375316 0 --Confiscation
44763025 0 --Delinquent Duo
23557835 0 --Dimension Fusion
42703248 0 --Giant Trunade
79571449 0 --Graceful Charity
19613556 0 --Heavy Storm
35059553 0 --Kaiser Colosseum
85602018 0 --Last Will
34906152 0 --Mass Driver
46411259 0 --Metamorphosis
41482598 0 --Mirage of Nightmare
76375976 0 --Mystic Mine
89023486 0 --Original Sinful Spoils - Snake-Eye
74191942 0 --Painful Choice
55144522 0 --Pot of Greed
70828912 0 --Premature Burial
63789924 0 --Smoke Grenade of the Thief
54447022 0 --Soul Charge
42829885 0 --The Forceful Sentry
43262273 0 --Appointer of the Red Lotus
01041278 0 --Branded Expulsion
61740673 0 --Imperial Order
28566710 0 --Last Turn
23002292 0 --Red Reboot
27174286 0 --Return from the Different Dimension
93016201 0 --Royal Oppression
57585212 0 --Self-Destruct Button
03280747 0 --Sixth Sense
23516703 0 --Summon Limit
64697231 0 --Trap Dustshoot
80604091 0 --Ultimate Offering
05851097 0 --Vanity's Emptiness
#limit
07902349 1 --Left Arm of the Forbidden One
44519536 1 --Left Leg of the Forbidden One
70903634 1 --Right Arm of the Forbidden One
08124921 1 --Right Leg of the Forbidden One
06728559 1 --Archnemeses Protos
76794549 1 --Astrograph Sorcerer
61901281 1 --Black Dragon Collapserpent
33854624 1 --Bystial Magnamhut
14536035 1 --Dark Grepher
33396948 1 --Exodia the Forbidden One
63542003 1 --Keldo the Sacred Protector
38572779 1 --Miscellaneousaurus
33508719 1 --Morphing Jar
99937011 1 --Mudora the Sword Oracle
12958919 1 --Phantom Skyblaster
38814750 1 --PSY-Framegear Gamma
09674034 1 --Snake-Eye Ash
90241276 1 --Snake-Eyes Poplar
20663556 1 --Substitoad
37961969 1 --Tearlaments Havnis
74078255 1 --Tearlaments Merrli
00572850 1 --Tearlaments Scheiren
91810826 1 --Tenpai Dragon Chundra
41165831 1 --Unchained Soul of Sharvara
99234526 1 --White Dragon Wyverburster
78872731 1 --Zoodiac Ratpier
39512984 1 --Gem-Knight Master Diamond
80453041 1 --Phantom of Yubel
73539069 1 --Striker Dragon
93896655 1 --Sunavalon Dryas
65563871 1 --Sunvine Healer
74586817 1 --PSY-Framelord Omega
90953320 1 --T.G. Hyper Librarian
00581014 1 --Daigusto Emeral
75433814 1 --Number 40: Gimmick Puppet of Strings
69170557 1 --Number C40: Gimmick Puppet of Dark Strings
44362883 1 --Branded Fusion
24224830 1 --Called by the Grave
72892473 1 --Card Destruction
59750328 1 --Card of Demise
91623717 1 --Chain Strike
04031928 1 --Change of Heart
99266988 1 --Chaos Space
67616300 1 --Chicken Game
15854426 1 --Divine Wind of Mist Valley
13035077 1 --Dragonic Diagram
95308449 1 --Final Countdown
81439173 1 --Foolish Burial
27970830 1 --Gateway of the Six
75500286 1 --Gold Sarcophagus
18144506 1 --Harpie's Feather Duster
66957584 1 --Infernity Launcher
01845204 1 --Instant Fusion
93946239 1 --Into the Void
71650854 1 --Magical Mid-Breaker Field
43040603 1 --Monster Gate
83764718 1 --Monster Reborn
33782437 1 --One Day of Peace
02295440 1 --One for One
84211599 1 --Pot of Prosperity
58577036 1 --Reasoning
32807846 1 --Reinforcement of the Army
66730191 1 --Sangen Kaimen
30336082 1 --Sangen Summoning
24940422 1 --Sekka's Light
73468603 1 --Set Rotation
52340444 1 --Sky Striker Mecha - Hornet Drones
71344451 1 --Slash Draw
45986603 1 --Snatch Steal
73628505 1 --Terraforming
11110587 1 --That Grass Looks Greener
46060017 1 --Zoodiac Barrage
58921041 1 --Anti-Spell Fragrance
53334471 1 --Gozen Match
32723153 1 --Magical Explosion
03734202 1 --Naturia Sacred Tree
90846359 1 --Rivalry of Warlords
82732705 1 --Skill Drain
24207889 1 --There Can Be Only One
#semi limit
34124316 2 --Cyber Jar
43694650 2 --Danger!? Jackalope?
99745551 2 --Danger!? Tsuchinoko?
40177746 2 --Eva
17330916 2 --Performapal Monkeyboard
14532163 2 --Lightning Storm
55584558 2 --Purrely Delicious Memory
21347668 2 --Purrely Sleepy Memory
92107604 2 --Runick Fountain
!2024.9 TCG !2024.9 TCG
#forbidden #forbidden
62320425 0 --Agido the Ancient Sentinel 62320425 0 --Agido the Ancient Sentinel
......
...@@ -11,3 +11,4 @@ project "event" ...@@ -11,3 +11,4 @@ project "event"
filter "system:windows" filter "system:windows"
prebuildcommands { "xcopy /E /Y $(ProjectDir)..\\event\\WIN32-Code $(ProjectDir)..\\event\\include" } prebuildcommands { "xcopy /E /Y $(ProjectDir)..\\event\\WIN32-Code $(ProjectDir)..\\event\\include" }
files { "win32select.c", "evthread_win32.c", "buffer_iocp.c", "event_iocp.c", "bufferevent_async.c" } files { "win32select.c", "evthread_win32.c", "buffer_iocp.c", "event_iocp.c", "bufferevent_async.c" }
defines { "WIN32" } -- quirk of old libevent
defines {
"_IRR_STATIC_LIB_",
"NO_IRR_USE_NON_SYSTEM_BZLIB_",
"NO_IRR_COMPILE_WITH_BZIP2_",
"NO_IRR_COMPILE_WITH_CONSOLE_DEVICE_",
"NO_IRR_COMPILE_WITH_DIRECT3D_8_",
"NO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_",
"NO_IRR_COMPILE_WITH_JOYSTICK_EVENTS_",
"NO_IRR_COMPILE_WITH_SOFTWARE_",
"NO_IRR_COMPILE_WITH_BURNINGSVIDEO_",
"NO_IRR_COMPILE_WITH_IRR_SCENE_LOADER_",
"NO_IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_",
"NO_IRR_COMPILE_WITH_IRR_MESH_LOADER_",
"NO_IRR_COMPILE_WITH_HALFLIFE_LOADER_",
"NO_IRR_COMPILE_WITH_MD2_LOADER_",
"NO_IRR_COMPILE_WITH_MD3_LOADER_",
"NO_IRR_COMPILE_WITH_3DS_LOADER_",
"NO_IRR_COMPILE_WITH_COLLADA_LOADER_",
"NO_IRR_COMPILE_WITH_CSM_LOADER_",
"NO_IRR_COMPILE_WITH_BSP_LOADER_",
"NO_IRR_COMPILE_WITH_DMF_LOADER_",
"NO_IRR_COMPILE_WITH_LMTS_LOADER_",
"NO_IRR_COMPILE_WITH_MY3D_LOADER_",
"NO_IRR_COMPILE_WITH_OBJ_LOADER_",
"NO_IRR_COMPILE_WITH_OCT_LOADER_",
"NO_IRR_COMPILE_WITH_LWO_LOADER_",
"NO_IRR_COMPILE_WITH_STL_LOADER_",
"NO_IRR_COMPILE_WITH_PLY_LOADER_",
"NO_IRR_COMPILE_WITH_SMF_LOADER_",
"NO_IRR_COMPILE_WITH_IRR_WRITER_",
"NO_IRR_COMPILE_WITH_COLLADA_WRITER_",
"NO_IRR_COMPILE_WITH_STL_WRITER_",
"NO_IRR_COMPILE_WITH_OBJ_WRITER_",
"NO_IRR_COMPILE_WITH_PLY_WRITER_",
"NO_IRR_COMPILE_WITH_PCX_LOADER_",
"NO_IRR_COMPILE_WITH_PPM_LOADER_",
"NO_IRR_COMPILE_WITH_PSD_LOADER_",
"NO_IRR_COMPILE_WITH_TGA_LOADER_",
"NO_IRR_COMPILE_WITH_WAL_LOADER_",
"NO_IRR_COMPILE_WITH_LMP_LOADER_",
"NO_IRR_COMPILE_WITH_RGB_LOADER_",
"NO_IRR_COMPILE_WITH_PCX_WRITER_",
"NO_IRR_COMPILE_WITH_PPM_WRITER_",
"NO_IRR_COMPILE_WITH_PSD_WRITER_",
"NO_IRR_COMPILE_WITH_TGA_WRITER_",
"NO__IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_",
"NO__IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_",
"NO__IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_",
}
project "irrlicht" project "irrlicht"
kind "StaticLib" kind "StaticLib"
includedirs { "include", "source/Irrlicht", "source/Irrlicht/jpeglib", "source/Irrlicht/libpng", "source/Irrlicht/zlib" } includedirs {
"include",
"source/Irrlicht",
"source/Irrlicht/jpeglib",
"source/Irrlicht/libpng",
"source/Irrlicht/zlib"
}
dofile("defines.lua")
exceptionhandling "Off" exceptionhandling "Off"
rtti "Off" rtti "Off"
files { "include/*.h", defines {
"_IRR_STATIC_LIB_",
"NO_IRR_USE_NON_SYSTEM_BZLIB_",
"NO_IRR_COMPILE_WITH_BZIP2_",
"NO_IRR_COMPILE_WITH_CONSOLE_DEVICE_",
"NO_IRR_COMPILE_WITH_DIRECT3D_8_",
"NO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_",
"NO_IRR_COMPILE_WITH_JOYSTICK_EVENTS_",
"NO_IRR_COMPILE_WITH_SOFTWARE_",
"NO_IRR_COMPILE_WITH_BURNINGSVIDEO_",
"NO_IRR_COMPILE_WITH_IRR_SCENE_LOADER_",
"NO_IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_",
"NO_IRR_COMPILE_WITH_IRR_MESH_LOADER_",
"NO_IRR_COMPILE_WITH_HALFLIFE_LOADER_",
"NO_IRR_COMPILE_WITH_MD2_LOADER_",
"NO_IRR_COMPILE_WITH_MD3_LOADER_",
"NO_IRR_COMPILE_WITH_3DS_LOADER_",
"NO_IRR_COMPILE_WITH_COLLADA_LOADER_",
"NO_IRR_COMPILE_WITH_CSM_LOADER_",
"NO_IRR_COMPILE_WITH_BSP_LOADER_",
"NO_IRR_COMPILE_WITH_DMF_LOADER_",
"NO_IRR_COMPILE_WITH_LMTS_LOADER_",
"NO_IRR_COMPILE_WITH_MY3D_LOADER_",
"NO_IRR_COMPILE_WITH_OBJ_LOADER_",
"NO_IRR_COMPILE_WITH_OCT_LOADER_",
"NO_IRR_COMPILE_WITH_LWO_LOADER_",
"NO_IRR_COMPILE_WITH_STL_LOADER_",
"NO_IRR_COMPILE_WITH_PLY_LOADER_",
"NO_IRR_COMPILE_WITH_SMF_LOADER_",
"NO_IRR_COMPILE_WITH_IRR_WRITER_",
"NO_IRR_COMPILE_WITH_COLLADA_WRITER_",
"NO_IRR_COMPILE_WITH_STL_WRITER_",
"NO_IRR_COMPILE_WITH_OBJ_WRITER_",
"NO_IRR_COMPILE_WITH_PLY_WRITER_",
"NO_IRR_COMPILE_WITH_PCX_LOADER_",
"NO_IRR_COMPILE_WITH_PPM_LOADER_",
"NO_IRR_COMPILE_WITH_PSD_LOADER_",
"NO_IRR_COMPILE_WITH_TGA_LOADER_",
"NO_IRR_COMPILE_WITH_WAL_LOADER_",
"NO_IRR_COMPILE_WITH_LMP_LOADER_",
"NO_IRR_COMPILE_WITH_RGB_LOADER_",
"NO_IRR_COMPILE_WITH_PCX_WRITER_",
"NO_IRR_COMPILE_WITH_PPM_WRITER_",
"NO_IRR_COMPILE_WITH_PSD_WRITER_",
"NO_IRR_COMPILE_WITH_TGA_WRITER_",
"NO__IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_",
"NO__IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_",
"NO__IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_",
"NO_IRR_COMPILE_WITH_ZIP_ENCRYPTION_",
"PNG_INTEL_SSE",
}
files {
"include/*.h",
"source/Irrlicht/*.cpp", "source/Irrlicht/*.cpp",
"source/Irrlicht/lzma/*.h", "source/Irrlicht/lzma/*.h",
"source/Irrlicht/lzma/*.c", "source/Irrlicht/lzma/*.c",
...@@ -90,15 +148,13 @@ project "irrlicht" ...@@ -90,15 +148,13 @@ project "irrlicht"
"source/Irrlicht/libpng/pngwrite.c", "source/Irrlicht/libpng/pngwrite.c",
"source/Irrlicht/libpng/pngwtran.c", "source/Irrlicht/libpng/pngwtran.c",
"source/Irrlicht/libpng/pngwutil.c", "source/Irrlicht/libpng/pngwutil.c",
"source/Irrlicht/aesGladman/*.h", "source/Irrlicht/libpng/intel/intel_init.c",
"source/Irrlicht/aesGladman/*.cpp" } "source/Irrlicht/libpng/intel/filter_sse2_intrinsics.c",
}
filter { "system:windows" } filter { "system:windows" }
defines { "_IRR_WCHAR_FILESYSTEM" } defines { "_IRR_WCHAR_FILESYSTEM" }
includedirs { "$(DXSDK_DIR)Include" } includedirs { "$(DXSDK_DIR)Include" }
libdirs { "$(DXSDK_DIR)Lib/x86" }
links { "imm32" }
filter { "system:linux" } filter { "system:linux" }
links { "X11", "Xxf86vm" } links { "X11", "Xxf86vm" }
...@@ -353,7 +353,6 @@ workspace "YGOPro" ...@@ -353,7 +353,6 @@ workspace "YGOPro"
filter "system:windows" filter "system:windows"
defines { "WIN32", "_WIN32" }
entrypoint "mainCRTStartup" entrypoint "mainCRTStartup"
systemversion "latest" systemversion "latest"
startproject "YGOPro" startproject "YGOPro"
......
...@@ -1259,3 +1259,6 @@ ...@@ -1259,3 +1259,6 @@
!setname 0x1c6 统王 ドミナス !setname 0x1c6 统王 ドミナス
!setname 0x1c7 塞勒凯特 Serket !setname 0x1c7 塞勒凯特 Serket
!setname 0x1c8 阿匹卜 Apophis !setname 0x1c8 阿匹卜 Apophis
!setname 0x1c9 星辰 ドラゴンテイル
!setname 0x1ca 味美喵 ヤミー
!setname 0x1cb K9
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