Commit 7bc6117a authored by nekrozar's avatar nekrozar Committed by VanillaSalt

fix (#1947)

parent bf72e8c6
...@@ -960,6 +960,7 @@ void Game::DrawDeckBd() { ...@@ -960,6 +960,7 @@ void Game::DrawDeckBd() {
if(deckBuilder.hovered_pos == 3 && deckBuilder.hovered_seq == (int)i) if(deckBuilder.hovered_pos == 3 && deckBuilder.hovered_seq == (int)i)
driver->draw2DRectangleOutline(recti(313 + i * dx, 563, 359 + i * dx, 629)); driver->draw2DRectangleOutline(recti(313 + i * dx, 563, 359 + i * dx, 629));
} }
//search result
driver->draw2DRectangle(recti(805, 137, 915, 157), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); driver->draw2DRectangle(recti(805, 137, 915, 157), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(recti(804, 136, 915, 157)); driver->draw2DRectangleOutline(recti(804, 136, 915, 157));
textFont->draw(dataManager.GetSysString(1333), recti(809, 136, 914, 156), 0xff000000, false, true); textFont->draw(dataManager.GetSysString(1333), recti(809, 136, 914, 156), 0xff000000, false, true);
...@@ -974,25 +975,42 @@ void Game::DrawDeckBd() { ...@@ -974,25 +975,42 @@ void Game::DrawDeckBd() {
driver->draw2DRectangle(0x80000000, recti(806, 164 + i * 66, 1019, 230 + i * 66)); driver->draw2DRectangle(0x80000000, recti(806, 164 + i * 66, 1019, 230 + i * 66));
DrawThumb(ptr, position2di(810, 165 + i * 66), deckBuilder.filterList); DrawThumb(ptr, position2di(810, 165 + i * 66), deckBuilder.filterList);
if(ptr->second.type & TYPE_MONSTER) { if(ptr->second.type & TYPE_MONSTER) {
int form = 0x2605; if(!(ptr->second.type & TYPE_LINK)) {
if(ptr->second.type & TYPE_XYZ) ++form; int form = 0x2605;
myswprintf(textBuffer, L"%ls", dataManager.GetName(ptr->first)); if(ptr->second.type & TYPE_XYZ) ++form;
textFont->draw(textBuffer, recti(859, 164 + i * 66, 955, 185 + i * 66), 0xff000000, false, false); myswprintf(textBuffer, L"%ls", dataManager.GetName(ptr->first));
textFont->draw(textBuffer, recti(860, 165 + i * 66, 955, 185 + i * 66), 0xffffffff, false, false); textFont->draw(textBuffer, recti(859, 164 + i * 66, 955, 185 + i * 66), 0xff000000, false, false);
myswprintf(textBuffer, L"%ls/%ls %c%d", dataManager.FormatAttribute(ptr->second.attribute), dataManager.FormatRace(ptr->second.race), form, ptr->second.level); textFont->draw(textBuffer, recti(860, 165 + i * 66, 955, 185 + i * 66), 0xffffffff, false, false);
textFont->draw(textBuffer, recti(859, 186 + i * 66, 955, 207 + i * 66), 0xff000000, false, false); myswprintf(textBuffer, L"%ls/%ls %c%d", dataManager.FormatAttribute(ptr->second.attribute), dataManager.FormatRace(ptr->second.race), form, ptr->second.level);
textFont->draw(textBuffer, recti(860, 187 + i * 66, 955, 207 + i * 66), 0xffffffff, false, false); textFont->draw(textBuffer, recti(859, 186 + i * 66, 955, 207 + i * 66), 0xff000000, false, false);
if(ptr->second.attack < 0 && ptr->second.defense < 0) textFont->draw(textBuffer, recti(860, 187 + i * 66, 955, 207 + i * 66), 0xffffffff, false, false);
myswprintf(textBuffer, L"?/?"); if(ptr->second.attack < 0 && ptr->second.defense < 0)
else if(ptr->second.attack < 0) myswprintf(textBuffer, L"?/?");
myswprintf(textBuffer, L"?/%d", ptr->second.defense); else if(ptr->second.attack < 0)
else if(ptr->second.defense < 0) myswprintf(textBuffer, L"?/%d", ptr->second.defense);
myswprintf(textBuffer, L"%d/?", ptr->second.attack); else if(ptr->second.defense < 0)
else myswprintf(textBuffer, L"%d/%d", ptr->second.attack, ptr->second.defense); myswprintf(textBuffer, L"%d/?", ptr->second.attack);
if(ptr->second.type & TYPE_PENDULUM) { else myswprintf(textBuffer, L"%d/%d", ptr->second.attack, ptr->second.defense);
wchar_t scaleBuffer[16]; if(ptr->second.type & TYPE_PENDULUM) {
myswprintf(scaleBuffer, L" %d/%d", ptr->second.lscale, ptr->second.rscale); wchar_t scaleBuffer[16];
wcscat(textBuffer, scaleBuffer); myswprintf(scaleBuffer, L" %d/%d", ptr->second.lscale, ptr->second.rscale);
wcscat(textBuffer, scaleBuffer);
}
} else {
myswprintf(textBuffer, L"%ls", dataManager.GetName(ptr->first));
textFont->draw(textBuffer, recti(859, 164 + i * 66, 955, 185 + i * 66), 0xff000000, false, false);
textFont->draw(textBuffer, recti(860, 165 + i * 66, 955, 185 + i * 66), 0xffffffff, false, false);
myswprintf(textBuffer, L"%ls/%ls LINK-%d", dataManager.FormatAttribute(ptr->second.attribute), dataManager.FormatRace(ptr->second.race), ptr->second.level);
textFont->draw(textBuffer, recti(859, 186 + i * 66, 955, 207 + i * 66), 0xff000000, false, false);
textFont->draw(textBuffer, recti(860, 187 + i * 66, 955, 207 + i * 66), 0xffffffff, false, false);
if(ptr->second.attack < 0)
myswprintf(textBuffer, L"?/-");
else myswprintf(textBuffer, L"%d/-", ptr->second.attack);
if(ptr->second.type & TYPE_PENDULUM) {
wchar_t scaleBuffer[16];
myswprintf(scaleBuffer, L" %d/%d", ptr->second.lscale, ptr->second.rscale);
wcscat(textBuffer, scaleBuffer);
}
} }
if((ptr->second.ot & 0x3) == 1) if((ptr->second.ot & 0x3) == 1)
wcscat(textBuffer, L" [OCG]"); wcscat(textBuffer, L" [OCG]");
......
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