Commit 988e5916 authored by mercury233's avatar mercury233 Committed by GitHub

update mark for OCG/TCG cards (#2048)

parent 59001686
......@@ -1045,7 +1045,16 @@ void Game::DrawThumb(code_pointer cp, position2di pos, std::unordered_map<int, i
break;
}
}
if(mainGame->cbLimit->getSelected() >= 4) {
if(mainGame->cbLimit->getSelected() >= 4 && (cp->second.ot & mainGame->gameConf.defaultOT)) {
switch(cp->second.ot) {
case 1:
driver->draw2DImage(imageManager.tOT, recti(pos.X + 7, pos.Y + 50, pos.X + 37, pos.Y + 65), recti(0, 128, 128, 192), 0, 0, true);
break;
case 2:
driver->draw2DImage(imageManager.tOT, recti(pos.X + 7, pos.Y + 50, pos.X + 37, pos.Y + 65), recti(0, 192, 128, 256), 0, 0, true);
break;
}
} else if(mainGame->cbLimit->getSelected() >= 4 || !(cp->second.ot & mainGame->gameConf.defaultOT)) {
switch(cp->second.ot) {
case 1:
driver->draw2DImage(imageManager.tOT, recti(pos.X + 7, pos.Y + 50, pos.X + 37, pos.Y + 65), recti(0, 0, 128, 64), 0, 0, true);
......
......@@ -128,6 +128,7 @@ bool Game::Initialize() {
cbRule->addItem(dataManager.GetSysString(1241));
cbRule->addItem(dataManager.GetSysString(1242));
cbRule->addItem(dataManager.GetSysString(1243));
cbRule->setSelected(gameConf.defaultOT - 1);
env->addStaticText(dataManager.GetSysString(1227), rect<s32>(20, 90, 220, 110), false, false, wCreateHost);
cbMatchMode = env->addComboBox(rect<s32>(140, 85, 300, 110), wCreateHost);
cbMatchMode->addItem(dataManager.GetSysString(1244));
......@@ -935,6 +936,7 @@ void Game::LoadConfig() {
gameConf.separate_clear_button = 1;
gameConf.auto_search_limit = -1;
gameConf.chkIgnoreDeckChanges = 0;
gameConf.defaultOT = 1;
while(fgets(linebuf, 256, fp)) {
sscanf(linebuf, "%s = %s", strbuf, valbuf);
if(!strcmp(strbuf, "antialias")) {
......@@ -993,6 +995,8 @@ void Game::LoadConfig() {
gameConf.auto_search_limit = atoi(valbuf);
} else if(!strcmp(strbuf, "ignore_deck_changes")) {
gameConf.chkIgnoreDeckChanges = atoi(valbuf);
} else if(!strcmp(strbuf, "default_ot")) {
gameConf.defaultOT = atoi(valbuf);
} else {
// options allowing multiple words
sscanf(linebuf, "%s = %240[^\n]", strbuf, valbuf);
......@@ -1051,6 +1055,7 @@ void Game::SaveConfig() {
fprintf(fp, "#auto_search_limit >= 0: Start search automatically when the user enters N chars\n");
fprintf(fp, "auto_search_limit = %d\n", gameConf.auto_search_limit);
fprintf(fp, "ignore_deck_changes = %d\n", ((mainGame->chkIgnoreDeckChanges->isChecked()) ? 1 : 0));
fprintf(fp, "default_ot = %d\n", gameConf.defaultOT);
fclose(fp);
}
void Game::ShowCardInfo(int code) {
......
......@@ -40,6 +40,7 @@ struct Config {
int separate_clear_button;
int auto_search_limit;
int chkIgnoreDeckChanges;
int defaultOT;
};
struct DuelInfo {
......
......@@ -27,3 +27,4 @@ separate_clear_button = 1
#auto_search_limit >= 0: Start search automatically when the user enters N chars.
auto_search_limit = -1
ignore_deck_changes = 0
default_ot = 1
textures/ot.png

18.2 KB | W: | H:

textures/ot.png

8.26 KB | W: | H:

textures/ot.png
textures/ot.png
textures/ot.png
textures/ot.png
  • 2-up
  • Swipe
  • Onion skin
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