Commit 55536b64 authored by nanahira's avatar nanahira Committed by GitHub

update max value of LP bar (#2459)

parent 4a1b52e5
...@@ -517,12 +517,14 @@ void Game::DrawMisc() { ...@@ -517,12 +517,14 @@ 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(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); driver->draw2DImage(imageManager.tLPFrame, Resize(691, 10, 990, 30), recti(0, 0, 200, 20), 0, 0, true);
if(dInfo.lp[0] >= 8000) if(dInfo.start_lp) {
driver->draw2DImage(imageManager.tLPBar, Resize(335, 12, 625, 28), recti(0, 0, 16, 16), 0, 0, true); if(dInfo.lp[0] >= dInfo.start_lp)
else driver->draw2DImage(imageManager.tLPBar, Resize(335, 12, 335 + 290 * dInfo.lp[0] / 8000, 28), recti(0, 0, 16, 16), 0, 0, true); driver->draw2DImage(imageManager.tLPBar, Resize(335, 12, 625, 28), recti(0, 0, 16, 16), 0, 0, true);
if(dInfo.lp[1] >= 8000) 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);
driver->draw2DImage(imageManager.tLPBar, Resize(696, 12, 986, 28), recti(0, 0, 16, 16), 0, 0, true); if(dInfo.lp[1] >= dInfo.start_lp)
else driver->draw2DImage(imageManager.tLPBar, Resize(986 - 290 * dInfo.lp[1] / 8000, 12, 986, 28), recti(0, 0, 16, 16), 0, 0, true); driver->draw2DImage(imageManager.tLPBar, Resize(696, 12, 986, 28), recti(0, 0, 16, 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);
}
if(lpframe) { if(lpframe) {
dInfo.lp[lpplayer] -= lpd; dInfo.lp[lpplayer] -= lpd;
myswprintf(dInfo.strLP[lpplayer], L"%d", dInfo.lp[lpplayer]); myswprintf(dInfo.strLP[lpplayer], L"%d", dInfo.lp[lpplayer]);
......
...@@ -495,6 +495,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -495,6 +495,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->wChat->setVisible(true); mainGame->wChat->setVisible(true);
mainGame->gMutex.unlock(); mainGame->gMutex.unlock();
mainGame->dInfo.duel_rule = pkt->info.duel_rule; mainGame->dInfo.duel_rule = pkt->info.duel_rule;
mainGame->dInfo.start_lp = pkt->info.start_lp;
watching = 0; watching = 0;
connect_state |= 0x4; connect_state |= 0x4;
break; break;
......
...@@ -75,6 +75,7 @@ struct DuelInfo { ...@@ -75,6 +75,7 @@ struct DuelInfo {
bool is_shuffling; bool is_shuffling;
bool tag_player[2]; bool tag_player[2];
int lp[2]; int lp[2];
int start_lp;
int duel_rule; int duel_rule;
int turn; int turn;
short curMsg; short curMsg;
......
...@@ -175,6 +175,7 @@ bool ReplayMode::StartDuel() { ...@@ -175,6 +175,7 @@ bool ReplayMode::StartDuel() {
set_player_info(pduel, 1, start_lp, start_hand, draw_count); set_player_info(pduel, 1, start_lp, start_hand, draw_count);
mainGame->dInfo.lp[0] = start_lp; mainGame->dInfo.lp[0] = start_lp;
mainGame->dInfo.lp[1] = start_lp; mainGame->dInfo.lp[1] = start_lp;
mainGame->dInfo.start_lp = start_lp;
myswprintf(mainGame->dInfo.strLP[0], L"%d", mainGame->dInfo.lp[0]); myswprintf(mainGame->dInfo.strLP[0], L"%d", mainGame->dInfo.lp[0]);
myswprintf(mainGame->dInfo.strLP[1], L"%d", mainGame->dInfo.lp[1]); myswprintf(mainGame->dInfo.strLP[1], L"%d", mainGame->dInfo.lp[1]);
mainGame->dInfo.turn = 0; mainGame->dInfo.turn = 0;
......
...@@ -44,6 +44,7 @@ int SingleMode::SinglePlayThread() { ...@@ -44,6 +44,7 @@ int SingleMode::SinglePlayThread() {
set_player_info(pduel, 1, start_lp, start_hand, draw_count); set_player_info(pduel, 1, start_lp, start_hand, draw_count);
mainGame->dInfo.lp[0] = start_lp; mainGame->dInfo.lp[0] = start_lp;
mainGame->dInfo.lp[1] = start_lp; mainGame->dInfo.lp[1] = start_lp;
mainGame->dInfo.start_lp = start_lp;
myswprintf(mainGame->dInfo.strLP[0], L"%d", mainGame->dInfo.lp[0]); myswprintf(mainGame->dInfo.strLP[0], L"%d", mainGame->dInfo.lp[0]);
myswprintf(mainGame->dInfo.strLP[1], L"%d", mainGame->dInfo.lp[1]); myswprintf(mainGame->dInfo.strLP[1], L"%d", mainGame->dInfo.lp[1]);
BufferIO::CopyWStr(mainGame->ebNickName->getText(), mainGame->dInfo.hostname, 20); BufferIO::CopyWStr(mainGame->ebNickName->getText(), mainGame->dInfo.hostname, 20);
......
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