Commit 80d79bdf authored by wind2009's avatar wind2009

Merge branch 'server' of https://github.com/purerosefallen/ygopro into 2pick

parents dd57aaf6 6dafb379
Pipeline #17027 passed with stages
in 2 minutes and 56 seconds
......@@ -7,7 +7,7 @@ TARGET_YGOPRO_BINARY_PATH=./ygopro-platforms/ygopro-platform-$TARGET_PLATFORM
export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include
export EVENT_LIB_DIR=$PWD/libevent-stable/lib
export IRRLICHT_INCLUDE_DIR=$PWD/irrlicht/include
export IRRLICHT_LIB_DIR=$PWD/irrlicht
export IRRLICHT_LIB_DIR=$PWD/irrlicht/lib/$(arch)
./.ci/libevent-prebuild.sh
......
......@@ -10,11 +10,7 @@ token=$(echo $loginInfo | jq '.token' | sed 's/"//g')
header="Authorization: $token"
echo "Login succeeded."
<<<<<<< HEAD
appName="koishipro"
=======
appName="ygopro"
>>>>>>> 71a8c15521cc6fe09e774c7fa2a62aeb20a0e017
handleErrorMessage() {
rawJsonInput="$1"
......
No preview for this file type
......@@ -753,7 +753,6 @@ void ClientField::ReplaySwap() {
mainGame->dInfo.isReplaySwapped = !mainGame->dInfo.isReplaySwapped;
std::swap(mainGame->dInfo.lp[0], mainGame->dInfo.lp[1]);
std::swap(mainGame->dInfo.strLP[0], mainGame->dInfo.strLP[1]);
std::swap(mainGame->dInfo.start_lp[0], mainGame->dInfo.start_lp[1]);
std::swap(mainGame->dInfo.hostname, mainGame->dInfo.clientname);
std::swap(mainGame->dInfo.hostname_tag, mainGame->dInfo.clientname_tag);
RefreshCardCountDisplay();
......
......@@ -118,6 +118,7 @@ void DeckBuilder::Terminate() {
mainGame->showingcode = 0;
mainGame->scrFilter->setVisible(false);
mainGame->scrPackCards->setVisible(false);
mainGame->scrPackCards->setPos(0);
int catesel = mainGame->cbDBCategory->getSelected();
if(catesel >= 0)
BufferIO::CopyWStr(mainGame->cbDBCategory->getItem(catesel), mainGame->gameConf.lastcategory, 64);
......@@ -1679,6 +1680,7 @@ void DeckBuilder::RefreshPackListScroll() {
}
} else {
mainGame->scrPackCards->setVisible(false);
mainGame->scrPackCards->setPos(0);
}
}
void DeckBuilder::ChangeCategory(int catesel) {
......
......@@ -556,16 +556,31 @@ 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[0])
driver->draw2DImage(imageManager.tLPBar, Resize(335, 12, 335, 28), recti(0, 0, 16, 16), 0, 0, true);
else if(dInfo.lp[0] >= dInfo.start_lp[0])
driver->draw2DImage(imageManager.tLPBar, Resize(335, 12, 625, 28), recti(0, 0, 16, 16), 0, 0, true);
else driver->draw2DImage(imageManager.tLPBar, Resize(335, 12, 335 + 290 * dInfo.lp[0] / dInfo.start_lp[0], 28), recti(0, 0, 16, 16), 0, 0, true);
if(!dInfo.start_lp[1])
driver->draw2DImage(imageManager.tLPBar, Resize(986, 12, 986, 28), recti(0, 0, 16, 16), 0, 0, true);
else if(dInfo.lp[1] >= dInfo.start_lp[1])
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[1], 12, 986, 28), recti(0, 0, 16, 16), 0, 0, true);
if(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 / 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 / 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] / 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 / maxLP, 28), recti(0, bgColorPos * 16, 16, (bgColorPos + 1) * 16), 0, 0, true);
if(partialLP > 0) {
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);
}
if(lpframe) {
dInfo.lp[lpplayer] -= lpd;
myswprintf(dInfo.strLP[lpplayer], L"%d", dInfo.lp[lpplayer]);
......@@ -762,10 +777,10 @@ void Game::DrawStatus(ClientCard* pcard, int x1, int y1, int x2, int y2) {
}
}
void Game::DrawGUI() {
if(imageLoading.size()) {
for(auto mit = imageLoading.begin(); mit != imageLoading.end(); ++mit)
mit->first->setImage(imageManager.GetTexture(mit->second));
imageLoading.clear();
while (imageLoading.size()) {
auto mit = imageLoading.cbegin();
mit->first->setImage(imageManager.GetTexture(mit->second));
imageLoading.erase(mit);
}
for(auto fit = fadingList.begin(); fit != fadingList.end();) {
auto fthis = fit++;
......
......@@ -598,6 +598,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->wChat->setVisible(true);
mainGame->gMutex.unlock();
mainGame->dInfo.duel_rule = pkt->info.duel_rule;
mainGame->dInfo.start_lp = pkt->info.start_lp;
watching = 0;
connect_state |= 0x4;
break;
......@@ -684,8 +685,6 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->dInfo.isFinished = false;
mainGame->dInfo.lp[0] = 0;
mainGame->dInfo.lp[1] = 0;
mainGame->dInfo.start_lp[0] = 0;
mainGame->dInfo.start_lp[1] = 0;
mainGame->dInfo.strLP[0][0] = 0;
mainGame->dInfo.strLP[1][0] = 0;
mainGame->dInfo.turn = 0;
......@@ -1364,8 +1363,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->dInfo.duel_rule = BufferIO::ReadInt8(pbuf);
mainGame->dInfo.lp[mainGame->LocalPlayer(0)] = BufferIO::ReadInt32(pbuf);
mainGame->dInfo.lp[mainGame->LocalPlayer(1)] = BufferIO::ReadInt32(pbuf);
mainGame->dInfo.start_lp[0] = mainGame->dInfo.lp[0];
mainGame->dInfo.start_lp[1] = mainGame->dInfo.lp[1];
myswprintf(mainGame->dInfo.strLP[0], L"%d", mainGame->dInfo.lp[0]);
myswprintf(mainGame->dInfo.strLP[1], L"%d", mainGame->dInfo.lp[1]);
int deckc = BufferIO::ReadInt16(pbuf);
......
......@@ -27,7 +27,7 @@ namespace irr {
#include <regex>
#endif //YGOPRO_SERVER_MODE
unsigned short PRO_VERSION = 0x1353;
unsigned short PRO_VERSION = 0x1354;
namespace ygo {
......@@ -229,7 +229,7 @@ bool Game::Initialize() {
SetWindowsIcon();
//main menu
wchar_t strbuf[256];
myswprintf(strbuf, L"KoishiPro %X.0%X.%X Gloxinia", PRO_VERSION >> 12, (PRO_VERSION >> 4) & 0xff, PRO_VERSION & 0xf);
myswprintf(strbuf, L"KoishiPro %X.0%X.%X Paranoia", PRO_VERSION >> 12, (PRO_VERSION >> 4) & 0xff, PRO_VERSION & 0xf);
wMainMenu = env->addWindow(rect<s32>(370, 200, 650, 415), false, strbuf);
wMainMenu->getCloseButton()->setVisible(false);
btnLanMode = env->addButton(rect<s32>(10, 30, 270, 60), wMainMenu, BUTTON_LAN_MODE, dataManager.GetSysString(1200));
......
......@@ -87,7 +87,7 @@ struct DuelInfo {
bool is_swapped;
bool tag_player[2];
int lp[2];
int start_lp[2];
int start_lp;
int card_count[2];
int total_attack[2];
int duel_rule;
......
......@@ -177,8 +177,7 @@ bool ReplayMode::StartDuel() {
set_player_info(pduel, 1, start_lp, start_hand, draw_count);
mainGame->dInfo.lp[0] = start_lp;
mainGame->dInfo.lp[1] = start_lp;
mainGame->dInfo.start_lp[0] = start_lp;
mainGame->dInfo.start_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[1], L"%d", mainGame->dInfo.lp[1]);
mainGame->dInfo.turn = 0;
......
......@@ -46,8 +46,7 @@ int SingleMode::SinglePlayThread() {
set_player_info(pduel, 1, start_lp, start_hand, draw_count);
mainGame->dInfo.lp[0] = start_lp;
mainGame->dInfo.lp[1] = start_lp;
mainGame->dInfo.start_lp[0] = start_lp;
mainGame->dInfo.start_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[1], L"%d", mainGame->dInfo.lp[1]);
BufferIO::CopyWStr(mainGame->ebNickName->getText(), mainGame->dInfo.hostname, 20);
......
This diff is collapsed.
Subproject commit fd60232639d4a34bdc46f6155129973b9c04e130
Subproject commit 796a37ef44a50b8ce1770157be197315f37664ca
1 ICON "ygopro.ico"
1 VERSIONINFO
FILEVERSION 1, 0, 35, 3
PRODUCTVERSION 1, 0, 35, 3
FILEVERSION 1, 0, 35, 4
PRODUCTVERSION 1, 0, 35, 4
FILEOS 0x4
FILETYPE 0x1
......
Subproject commit bc8393dd04d46a500b05d89497556905edfadb86
Subproject commit 9e44cd9296c16ad8331f82cb80c1ddddb3f946d6
......@@ -1136,7 +1136,7 @@
!setname 0x16d 随风旅鸟 ふわんだりぃず
!setname 0x16e 拓扑 トポロジック
!setname 0x16f 许珀里翁 ヒュペリオン
!setname 0x170 甲虫骑兵 Beetrooper
!setname 0x170 骑甲虫 ビートルーパー
!setname 0x171 朋克 P.U.N.K.
!setname 0x172 救祓少女 エクソシスター
!setname 0x173 恐啡肽狂龙 ダイノルフィア
......@@ -1148,7 +1148,7 @@
!setname 0x179 兽带斗神 セリオンズ
!setname 0x17a 恐吓爪牙族 スケアクロー
!setname 0x17b 野蛮人 バーバリアン
!setname 0x17c 漫读使灵 Libromancer
!setname 0x17c 漫读使灵 リブロマンサー
!setname 0x17d 群豪 ヴァリアンツ
!setname 0x17e 拉比林斯迷宫 ラビュリンス
!setname 0x117e 拉比林斯迷宫欢迎 ウェルカム・ラビュリンス
......
......@@ -2,7 +2,7 @@
#nickname & gamename should be less than 20 characters
use_d3d = 0
use_image_scale = 1
pro_version = 4947
pro_version = 4948
antialias = 2
errorlog = 3
nickname = Komeiji Koishi
......
textures/lp.png

967 Bytes | W: | H:

textures/lp.png

2.05 KB | W: | H:

textures/lp.png
textures/lp.png
textures/lp.png
textures/lp.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