Commit 2e74d40d authored by Chen Bill's avatar Chen Bill

Add deck category constants

parent 868d4b25
...@@ -246,15 +246,15 @@ bool DeckManager::LoadSide(Deck& deck, uint32_t dbuf[], int mainc, int sidec) { ...@@ -246,15 +246,15 @@ bool DeckManager::LoadSide(Deck& deck, uint32_t dbuf[], int mainc, int sidec) {
void DeckManager::GetCategoryPath(wchar_t* ret, int index, const wchar_t* text) { void DeckManager::GetCategoryPath(wchar_t* ret, int index, const wchar_t* text) {
wchar_t catepath[256]; wchar_t catepath[256];
switch(index) { switch(index) {
case 0: case DECK_CATEGORY_PACK:
myswprintf(catepath, L"./pack"); myswprintf(catepath, L"./pack");
break; break;
case 1: case DECK_CATEGORY_BOT:
BufferIO::CopyWideString(mainGame->gameConf.bot_deck_path, catepath); BufferIO::CopyWideString(mainGame->gameConf.bot_deck_path, catepath);
break; break;
case -1: case -1:
case 2: case DECK_CATEGORY_NONE:
case 3: case DECK_CATEGORY_SEPARATOR:
myswprintf(catepath, L"./deck"); myswprintf(catepath, L"./deck");
break; break;
default: default:
......
...@@ -16,6 +16,12 @@ namespace ygo { ...@@ -16,6 +16,12 @@ namespace ygo {
constexpr int MAINC_MAX = 250; // the limit of card_state constexpr int MAINC_MAX = 250; // the limit of card_state
constexpr int SIDEC_MAX = MAINC_MAX; constexpr int SIDEC_MAX = MAINC_MAX;
constexpr int DECK_CATEGORY_PACK = 0;
constexpr int DECK_CATEGORY_BOT = 1;
constexpr int DECK_CATEGORY_NONE = 2;
constexpr int DECK_CATEGORY_SEPARATOR = 3;
constexpr int DECK_CATEGORY_CUSTOM = 4;
struct LFList { struct LFList {
unsigned int hash{}; unsigned int hash{};
std::wstring listName; std::wstring listName;
......
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