Commit a0ca3ca8 authored by mercury233's avatar mercury233

fix ot mark

parent c0bb3719
...@@ -1105,28 +1105,33 @@ void Game::DrawThumb(code_pointer cp, position2di pos, const std::unordered_map< ...@@ -1105,28 +1105,33 @@ void Game::DrawThumb(code_pointer cp, position2di pos, const std::unordered_map<
break; break;
} }
} }
bool showAvail = false;
bool showNotAvail = false;
int filter_lm = cbLimit->getSelected(); int filter_lm = cbLimit->getSelected();
if(filter_lm >= 4) {
bool avail = !((filter_lm == 4 && !(cp->second.ot & AVAIL_OCG) bool avail = !((filter_lm == 4 && !(cp->second.ot & AVAIL_OCG)
|| (filter_lm == 5 && !(cp->second.ot & AVAIL_TCG)) || (filter_lm == 5 && !(cp->second.ot & AVAIL_TCG))
|| (filter_lm == 6 && !(cp->second.ot & AVAIL_SC)) || (filter_lm == 6 && !(cp->second.ot & AVAIL_SC))
|| (filter_lm == 7 && !(cp->second.ot & AVAIL_CUSTOM)) || (filter_lm == 7 && !(cp->second.ot & AVAIL_CUSTOM))
|| (filter_lm == 8 && (cp->second.ot & AVAIL_OCGTCG) != AVAIL_OCGTCG))); || (filter_lm == 8 && (cp->second.ot & AVAIL_OCGTCG) != AVAIL_OCGTCG)));
if(avail) { if(filter_lm >= 4) {
showAvail = avail;
showNotAvail = !avail;
} else if(!(cp->second.ot & gameConf.defaultOT)) {
showNotAvail = true;
}
if(showAvail) {
if((cp->second.ot & AVAIL_OCG) && !(cp->second.ot & AVAIL_TCG)) if((cp->second.ot & AVAIL_OCG) && !(cp->second.ot & AVAIL_TCG))
driver->draw2DImage(imageManager.tOT, otloc, recti(0, 128, 128, 192), 0, 0, true); driver->draw2DImage(imageManager.tOT, otloc, recti(0, 128, 128, 192), 0, 0, true);
else if((cp->second.ot & AVAIL_TCG) && !(cp->second.ot & AVAIL_OCG)) else if((cp->second.ot & AVAIL_TCG) && !(cp->second.ot & AVAIL_OCG))
driver->draw2DImage(imageManager.tOT, otloc, recti(0, 192, 128, 256), 0, 0, true); driver->draw2DImage(imageManager.tOT, otloc, recti(0, 192, 128, 256), 0, 0, true);
} } else if(showNotAvail) {
else {
if(cp->second.ot & AVAIL_OCG) if(cp->second.ot & AVAIL_OCG)
driver->draw2DImage(imageManager.tOT, otloc, recti(0, 0, 128, 64), 0, 0, true); driver->draw2DImage(imageManager.tOT, otloc, recti(0, 0, 128, 64), 0, 0, true);
else if(cp->second.ot & AVAIL_TCG) else if(cp->second.ot & AVAIL_TCG)
driver->draw2DImage(imageManager.tOT, otloc, recti(0, 64, 128, 128), 0, 0, true); driver->draw2DImage(imageManager.tOT, otloc, recti(0, 64, 128, 128), 0, 0, true);
else else if(!avail)
driver->draw2DImage(imageManager.tLim, otloc, recti(0, 0, 64, 64), 0, 0, true); driver->draw2DImage(imageManager.tLim, otloc, recti(0, 0, 64, 64), 0, 0, true);
} }
}
} }
void Game::DrawDeckBd() { void Game::DrawDeckBd() {
wchar_t textBuffer[64]; wchar_t textBuffer[64];
......
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