Commit de95d1a9 authored by nanahira's avatar nanahira

use half of max LP in tag duel

parent 30ba4b21
......@@ -518,25 +518,26 @@ void Game::DrawMisc() {
driver->draw2DImage(imageManager.tLPFrame, Resize(330, 10, 629, 30), recti(0, 0, 200, 20), 0, 0, true);
driver->draw2DImage(imageManager.tLPFrame, Resize(691, 10, 990, 30), recti(0, 0, 200, 20), 0, 0, true);
if(dInfo.start_lp) {
if(dInfo.lp[0] >= dInfo.start_lp) {
auto layerCount = dInfo.lp[0] / dInfo.start_lp;
auto partialLP = dInfo.lp[0] % dInfo.start_lp;
auto maxLP = dInfo.isTag ? dInfo.start_lp / 2 : dInfo.start_lp;
if(dInfo.lp[0] >= maxLP) {
auto layerCount = dInfo.lp[0] / maxLP;
auto partialLP = dInfo.lp[0] % maxLP;
auto bgColorPos = (layerCount - 1) % 5;
auto fgColorPos = layerCount % 5;
driver->draw2DImage(imageManager.tLPBar, Resize(335 + 290 * partialLP / dInfo.start_lp, 12, 625, 28), recti(0, bgColorPos * 16, 16, (bgColorPos + 1) * 16), 0, 0, true);
driver->draw2DImage(imageManager.tLPBar, Resize(335 + 290 * partialLP / maxLP, 12, 625, 28), recti(0, bgColorPos * 16, 16, (bgColorPos + 1) * 16), 0, 0, true);
if(partialLP > 0) {
driver->draw2DImage(imageManager.tLPBar, Resize(335, 12, 335 + 290 * partialLP / dInfo.start_lp, 28), recti(0, fgColorPos * 16, 16, (fgColorPos + 1) * 16), 0, 0, true);
driver->draw2DImage(imageManager.tLPBar, Resize(335, 12, 335 + 290 * partialLP / maxLP, 28), recti(0, fgColorPos * 16, 16, (fgColorPos + 1) * 16), 0, 0, true);
}
}
else driver->draw2DImage(imageManager.tLPBar, Resize(335, 12, 335 + 290 * dInfo.lp[0] / dInfo.start_lp, 28), recti(0, 0, 16, 16), 0, 0, true);
if(dInfo.lp[1] >= dInfo.start_lp) {
auto layerCount = dInfo.lp[1] / dInfo.start_lp;
auto partialLP = dInfo.lp[1] % dInfo.start_lp;
else driver->draw2DImage(imageManager.tLPBar, Resize(335, 12, 335 + 290 * dInfo.lp[0] / maxLP, 28), recti(0, 0, 16, 16), 0, 0, true);
if(dInfo.lp[1] >= maxLP) {
auto layerCount = dInfo.lp[1] / maxLP;
auto partialLP = dInfo.lp[1] % maxLP;
auto bgColorPos = (layerCount - 1) % 5;
auto fgColorPos = layerCount % 5;
driver->draw2DImage(imageManager.tLPBar, Resize(696, 12, 986 - 290 * partialLP / dInfo.start_lp, 28), recti(0, bgColorPos * 16, 16, (bgColorPos + 1) * 16), 0, 0, true);
driver->draw2DImage(imageManager.tLPBar, Resize(696, 12, 986 - 290 * partialLP / maxLP, 28), recti(0, bgColorPos * 16, 16, (bgColorPos + 1) * 16), 0, 0, true);
if(partialLP > 0) {
driver->draw2DImage(imageManager.tLPBar, Resize(986 - 290 * partialLP / dInfo.start_lp, 12, 986, 28), recti(0, fgColorPos * 16, 16, (fgColorPos + 1) * 16), 0, 0, true);
driver->draw2DImage(imageManager.tLPBar, Resize(986 - 290 * partialLP / maxLP, 12, 986, 28), recti(0, fgColorPos * 16, 16, (fgColorPos + 1) * 16), 0, 0, true);
}
}
else driver->draw2DImage(imageManager.tLPBar, Resize(986 - 290 * dInfo.lp[1] / dInfo.start_lp, 12, 986, 28), recti(0, 0, 16, 16), 0, 0, true);
......
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