Commit 9706dc8f authored by nanahira's avatar nanahira

Merge branch 'master' into diff

parents a10fec6a 4660639d
......@@ -53,6 +53,7 @@
/fonts
/replay
/single
/screenshots
/sound/*.wav
/sound/custom
/sound/BGM
......
......@@ -103,17 +103,19 @@ before_deploy:
- rm -rf pics/thumbnail pics/*.db
- mkdir replay
- mkdir screenshots
- git clone --depth=1 https://$NANAHIRA@github.com/purerosefallen/fonts
- sed -i "s/c:\/windows/./g" system.conf
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
zip -q -r KoishiPro-$TRAVIS_OS_NAME-full-$TRAVIS_TAG.zip ygopro libirrKlang.so LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures fonts skin deck single pics replay;
zip -q -r KoishiPro-$TRAVIS_OS_NAME-full-with-sound-$TRAVIS_TAG.zip ygopro libirrKlang.so LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures fonts skin deck single pics replay sound;
sed -i "s/c:\/windows/./g" ./system.conf;
zip -q -r KoishiPro-$TRAVIS_OS_NAME-full-$TRAVIS_TAG.zip ygopro libirrKlang.so LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures fonts skin deck single pics replay screenshots;
zip -q -r KoishiPro-$TRAVIS_OS_NAME-full-with-sound-$TRAVIS_TAG.zip ygopro libirrKlang.so LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures fonts skin deck single pics replay sound screenshots;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
zip -q -r KoishiPro-$TRAVIS_OS_NAME-full-$TRAVIS_TAG.zip ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures fonts skin deck single pics replay;
zip -q -r KoishiPro-$TRAVIS_OS_NAME-full-with-sound-$TRAVIS_TAG.zip ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures fonts skin deck single pics replay sound;
sed -i "" "s/c:\/windows/./g" ./system.conf;
zip -q -r KoishiPro-$TRAVIS_OS_NAME-full-$TRAVIS_TAG.zip ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures fonts skin deck single pics replay screenshots;
zip -q -r KoishiPro-$TRAVIS_OS_NAME-full-with-sound-$TRAVIS_TAG.zip ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures fonts skin deck single pics replay screenshots sound;
fi
deploy:
......
......@@ -86,8 +86,9 @@ after_build:
- rm -rf pics/thumbnail pics/*.db
- mkdir replay
- mkdir screenshots
- 7z a -mx9 -xr!.git* KoishiPro-%APPVEYOR_REPO_TAG_NAME%.7z ygopro.exe LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures skin deck single pics update-koishipro replay WindBot Bot.exe bot.conf
- 7z a -mx9 -xr!.git* KoishiPro-%APPVEYOR_REPO_TAG_NAME%.7z ygopro.exe LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures skin deck single pics update-koishipro replay screenshots WindBot Bot.exe bot.conf
- cp -rf KoishiPro-%APPVEYOR_REPO_TAG_NAME%.7z KoishiPro-with-sound-%APPVEYOR_REPO_TAG_NAME%.7z
- 7z a -mx9 -xr!.git* KoishiPro-with-sound-%APPVEYOR_REPO_TAG_NAME%.7z sound
......
No preview for this file type
......@@ -314,17 +314,19 @@ bool DeckManager::DeleteDeck(Deck& deck, const wchar_t* name) {
#endif
}
const wchar_t* DeckManager::GetMainFormatString() {
myswprintf(DeckFormatBuffer, L"%d ( %d / %d / %d )", deckManager.current_deck.main.size(), GetTypeCount(deckManager.current_deck.main, TYPE_MONSTER), GetTypeCount(deckManager.current_deck.main, TYPE_SPELL), GetTypeCount(deckManager.current_deck.main, TYPE_TRAP));
myswprintf(DeckFormatBuffer, L"%d ( Monster: %d / Spell: %d / Trap: %d )", deckManager.current_deck.main.size(), GetTypeCount(deckManager.current_deck.main, TYPE_MONSTER), GetTypeCount(deckManager.current_deck.main, TYPE_SPELL), GetTypeCount(deckManager.current_deck.main, TYPE_TRAP));
wchar_t* result = DeckFormatBuffer;
return result;
}
const wchar_t* DeckManager::GetExtraFormatString() {
myswprintf(DeckFormatBuffer, L"%d ( %d / %d / %d / %d )", deckManager.current_deck.extra.size(), GetTypeCount(deckManager.current_deck.extra, TYPE_FUSION), GetTypeCount(deckManager.current_deck.extra, TYPE_SYNCHRO), GetTypeCount(deckManager.current_deck.extra, TYPE_XYZ), GetTypeCount(deckManager.current_deck.extra, TYPE_LINK));
myswprintf(DeckFormatBuffer, L"%d ( Fusion: %d / Synchro: %d / Xyz: %d / Link: %d )", deckManager.current_deck.extra.size(), GetTypeCount(deckManager.current_deck.extra, TYPE_FUSION), GetTypeCount(deckManager.current_deck.extra, TYPE_SYNCHRO), GetTypeCount(deckManager.current_deck.extra, TYPE_XYZ), GetTypeCount(deckManager.current_deck.extra, TYPE_LINK));
wchar_t* result = DeckFormatBuffer;
return result;
}
const wchar_t* DeckManager::GetSideFormatString() {
myswprintf(DeckFormatBuffer, L"%d ( %d / %d / %d / %d )", deckManager.current_deck.side.size(), GetTypeCount(deckManager.current_deck.side, TYPE_MONSTER), GetTypeCount(deckManager.current_deck.side, TYPE_SPELL), GetTypeCount(deckManager.current_deck.side, TYPE_TRAP), GetTypeCount(deckManager.current_deck.side, TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK));
int mc = GetTypeCount(deckManager.current_deck.side, TYPE_MONSTER);
int ec = GetTypeCount(deckManager.current_deck.side, TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK);
myswprintf(DeckFormatBuffer, L"%d ( Monster: %d / Spell: %d / Trap: %d / Extra: %d )", deckManager.current_deck.side.size(), mc - ec, GetTypeCount(deckManager.current_deck.side, TYPE_SPELL), GetTypeCount(deckManager.current_deck.side, TYPE_TRAP), ec);
wchar_t* result = DeckFormatBuffer;
return result;
}
......
......@@ -932,7 +932,7 @@ void Game::DrawSpec() {
DrawShadowText(lpcFont, lstr, ResizeElem(650 - pos.Width / 2, 290, 950, 370), Resize(-1, -1, 0, 0), 0xffffffff);
if(dInfo.vic_string && (showcardcode == 1 || showcardcode == 2)) {
driver->draw2DRectangle(0xa0000000, ResizeElem(540, 320, 800, 340));
DrawShadowText(textFont, dInfo.vic_string, ResizeElem(500, 320, 840, 340), Resize(-2, -1, 0, 0), 0xffffffff, 0xff000000, true, true, 0);
DrawShadowText(guiFont, dInfo.vic_string, ResizeElem(500, 320, 840, 340), Resize(-2, -1, 0, 0), 0xffffffff, 0xff000000, true, true, 0);
}
} else if(showcardp < showcarddif + 10) {
int alpha = ((showcarddif + 10 - showcardp) * 25) << 24;
......@@ -971,7 +971,7 @@ void Game::DrawSpec() {
continue;
if(!showChat && i > 2)
continue;
int w = textFont->getDimension(chatMsg[i].c_str()).Width;
int w = guiFont->getDimension(chatMsg[i].c_str()).Width;
recti rectloc(mainGame->wChat->getRelativePosition().UpperLeftCorner.X, mainGame->window_size.Height - 45, mainGame->wChat->getRelativePosition().UpperLeftCorner.X + 2 + w, mainGame->window_size.Height - 25);
rectloc -= position2di(0, i * 20);
......@@ -980,8 +980,8 @@ void Game::DrawSpec() {
recti shadowloc = msgloc + position2di(1, 1);
driver->draw2DRectangle(rectloc, 0xa0000000, 0xa0000000, 0xa0000000, 0xa0000000);
textFont->draw(chatMsg[i].c_str(), msgloc, 0xff000000, false, false);
textFont->draw(chatMsg[i].c_str(), shadowloc, chatColor[chatType[i]], false, false);
guiFont->draw(chatMsg[i].c_str(), msgloc, 0xff000000, false, false);
guiFont->draw(chatMsg[i].c_str(), shadowloc, chatColor[chatType[i]], false, false);
}
}
}
......@@ -1126,10 +1126,10 @@ void Game::DrawThumb(code_pointer cp, position2di pos, std::unordered_map<int, i
void Game::DrawDeckBd() {
wchar_t textBuffer[64];
//main deck
driver->draw2DRectangle(Resize(310, 137, 510, 157), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(Resize(309, 136, 510, 157));
driver->draw2DRectangle(Resize(310, 137, 797, 157), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(Resize(309, 136, 797, 157));
DrawShadowText(textFont, dataManager.GetSysString(1330), Resize(315, 137, 510, 157), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true);
DrawShadowText(numFont, deckManager.GetMainFormatString(), Resize(380, 138, 540, 158), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true);
DrawShadowText(numFont, deckManager.GetMainFormatString(), Resize(380, 138, 797, 158), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true);
driver->draw2DRectangle(Resize(310, 160, 797, 436), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(Resize(309, 159, 797, 436));
int lx;
......@@ -1147,10 +1147,10 @@ void Game::DrawDeckBd() {
driver->draw2DRectangleOutline(Resize(313 + (i % lx) * dx, 163 + (i / lx) * 68, 359 + (i % lx) * dx, 228 + (i / lx) * 68));
}
//extra deck
driver->draw2DRectangle(Resize(310, 440, 510, 460), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(Resize(309, 439, 510, 460));
driver->draw2DRectangle(Resize(310, 440, 797, 460), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(Resize(309, 439, 797, 460));
DrawShadowText(textFont, dataManager.GetSysString(1331), Resize(315, 440, 510, 460), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true);
DrawShadowText(numFont, deckManager.GetExtraFormatString(), Resize(380, 441, 540, 461), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true);
DrawShadowText(numFont, deckManager.GetExtraFormatString(), Resize(380, 441, 797, 461), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true);
driver->draw2DRectangle(Resize(310, 463, 797, 533), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(Resize(309, 462, 797, 533));
if(deckManager.current_deck.extra.size() <= 10)
......@@ -1162,10 +1162,10 @@ void Game::DrawDeckBd() {
driver->draw2DRectangleOutline(Resize(313 + i * dx, 465, 359 + i * dx, 531));
}
//side deck
driver->draw2DRectangle(Resize(310, 537, 510, 557), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(Resize(309, 536, 510, 557));
driver->draw2DRectangle(Resize(310, 537, 797, 557), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(Resize(309, 536, 797, 557));
DrawShadowText(textFont, dataManager.GetSysString(1332), Resize(315, 537, 510, 557), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true);
DrawShadowText(numFont, deckManager.GetSideFormatString(), Resize(380, 538, 540, 558), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true);
DrawShadowText(numFont, deckManager.GetSideFormatString(), Resize(380, 538, 797, 558), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true);
driver->draw2DRectangle(Resize(310, 560, 797, 630), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(Resize(309, 559, 797, 630));
if(deckManager.current_deck.side.size() <= 10)
......
......@@ -1438,7 +1438,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
should_show_tip = true;
myswprintf(formatBuffer, dataManager.GetSysString(1700), mainGame->btnCancelOrFinish->getText());
mainGame->stTip->setText(formatBuffer);
irr::core::dimension2d<unsigned int> dtip = mainGame->textFont->getDimension(formatBuffer) + irr::core::dimension2d<unsigned int>(10, 10);
irr::core::dimension2d<unsigned int> dtip = mainGame->guiFont->getDimension(formatBuffer) + irr::core::dimension2d<unsigned int>(10, 10);
mainGame->stTip->setRelativePosition(mainGame->Resize(x - 10 - dtip.Width, y - 10 - dtip.Height, x - 10, y - 10));
}
mainGame->stTip->setVisible(should_show_tip);
......@@ -1562,7 +1562,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
str.append(formatBuffer);
}
should_show_tip = true;
irr::core::dimension2d<unsigned int> dtip = mainGame->textFont->getDimension(str.c_str()) + irr::core::dimension2d<unsigned int>(10, 10);
irr::core::dimension2d<unsigned int> dtip = mainGame->guiFont->getDimension(str.c_str()) + irr::core::dimension2d<unsigned int>(10, 10);
mainGame->stTip->setRelativePosition(recti(mousepos.X - 10 - dtip.Width, mousepos.Y - 10 - dtip.Height, mousepos.X - 10, mousepos.Y - 10));
mainGame->stTip->setText(str.c_str());
}
......@@ -1919,6 +1919,13 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
return true;
break;
}
case irr::KEY_KEY_X:
case irr::KEY_F12: {
if(!event.KeyInput.PressedDown && !mainGame->HasFocus(EGUIET_EDIT_BOX))
mainGame->takeScreenshot();
return true;
break;
}
default: break;
}
break;
......
......@@ -13,7 +13,12 @@
#ifndef _WIN32
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <unistd.h>
#else
#include <direct.h>
#include <io.h>
#endif
unsigned short PRO_VERSION = 0x1343;
......@@ -24,6 +29,7 @@ Game* mainGame;
bool Game::Initialize() {
srand(time(0));
initUtils();
LoadConfig();
irr::SIrrlichtCreationParameters params = irr::SIrrlichtCreationParameters();
params.AntiAlias = gameConf.antialias;
......@@ -86,7 +92,7 @@ bool Game::Initialize() {
adFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 12);
lpcFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 48);
guiFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize);
textFont = guiFont;
textFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize);
smgr = device->getSceneManager();
device->setWindowCaption(L"KoishiPro");
device->setResizable(true);
......@@ -521,7 +527,7 @@ bool Game::Initialize() {
//filters
wFilter = env->addStaticText(L"", rect<s32>(610, 5, 1020, 130), true, false, 0, -1, true);
wFilter->setVisible(false);
stCategory = env->addStaticText(dataManager.GetSysString(1311), rect<s32>(10, 25 / 6 + 2, 70, 22 + 25 / 6), false, false, wFilter);
stCategory = env->addStaticText(dataManager.GetSysString(1311), rect<s32>(10, 2 + 25 / 6, 70, 22 + 25 / 6), false, false, wFilter);
cbCardType = env->addComboBox(rect<s32>(60, 25 / 6, 120, 20 + 25 / 6), wFilter, COMBOBOX_MAINTYPE);
cbCardType->addItem(dataManager.GetSysString(1310));
cbCardType->addItem(dataManager.GetSysString(1312));
......@@ -1429,7 +1435,7 @@ void Game::ShowCardInfo(int code, bool resize) {
sc = aptr->second.setcode;
}
if(sc) {
offset = 23;
offset = 23 * yScale;
myswprintf(formatBuffer, L"%ls%ls", dataManager.GetSysString(1329), dataManager.FormatSetName(sc));
stSetName->setText(formatBuffer);
} else
......@@ -1470,29 +1476,30 @@ void Game::ShowCardInfo(int code, bool resize) {
wcscat(formatBuffer, scaleBuffer);
}
stDataInfo->setText(formatBuffer);
if ((cd.type & TYPE_LINK) && (cd.level > 5)) {
stDataInfo->setRelativePosition(rect<s32>(15, 60, 296, 98));
stSetName->setRelativePosition(rect<s32>(15, 98, 296 * xScale, 121));
stText->setRelativePosition(rect<s32>(15, 98 + offset, 287 * xScale, 324 * yScale));
scrCardText->setRelativePosition(rect<s32>(287 * xScale - 20, 98 + offset, 287 * xScale, 324 * yScale));
if (cd.type & TYPE_LINK && cd.level > 5 && window_size.Width < 1220.0) {
stDataInfo->setRelativePosition(recti(15, 60 * yScale, 300 * xScale - 13, (83 + 15) * yScale));
stSetName->setRelativePosition(rect<s32>(15, (83 + 15) * yScale, 296 * xScale, (83 + 15) * yScale + offset));
stText->setRelativePosition(rect<s32>(15, (83 + 15) * yScale + offset, 287 * xScale, 324 * yScale));
scrCardText->setRelativePosition(rect<s32>(287 * xScale - 20, (83 + 15) + offset, 287 * xScale, 324 * yScale));
} else {
stDataInfo->setRelativePosition(rect<s32>(15, 60, 296, 83));
stSetName->setRelativePosition(rect<s32>(15, 83, 296 * xScale, 106));
stText->setRelativePosition(rect<s32>(15, 83 + offset, 287 * xScale, 324 * yScale));
stDataInfo->setRelativePosition(recti(15, 60 * yScale, 300 * xScale - 13, 83 * yScale));
stSetName->setRelativePosition(rect<s32>(15, 83 * yScale, 296 * xScale, 83 * yScale + offset));
stText->setRelativePosition(rect<s32>(15, 83 * yScale + offset, 287 * xScale, 324 * yScale));
scrCardText->setRelativePosition(rect<s32>(287 * xScale - 20, 83 + offset, 287 * xScale, 324 * yScale));
}
} else {
myswprintf(formatBuffer, L"[%ls]", dataManager.FormatType(cd.type));
stInfo->setText(formatBuffer);
stDataInfo->setRelativePosition(recti(15, 60 * yScale, 300 * xScale - 13, 83 * yScale));
stDataInfo->setText(L"");
stSetName->setRelativePosition(rect<s32>(15, 60, 296 * xScale, 83));
stText->setRelativePosition(rect<s32>(15, 60 + offset, 287 * xScale, 324 * yScale));
stSetName->setRelativePosition(rect<s32>(15, 60 * yScale, 296 * xScale, 60 * yScale + offset));
stText->setRelativePosition(rect<s32>(15, 60 * yScale + offset, 287 * xScale, 324 * yScale));
scrCardText->setRelativePosition(rect<s32>(287 * xScale - 20, 60 + offset, 287 * xScale, 324 * yScale));
}
showingcode = code;
showingtext = dataManager.GetText(code);
const auto& tsize = stText->getRelativePosition();
InitStaticText(stText, tsize.getWidth(), tsize.getHeight(), textFont, showingtext);
InitStaticText(stText, tsize.getWidth(), tsize.getHeight(), guiFont, showingtext);
}
void Game::AddChatMsg(wchar_t* msg, int player) {
for(int i = 7; i > 0; --i) {
......@@ -1567,6 +1574,66 @@ void Game::AddDebugMsg(char* msg)
fclose(fp);
}
}
bool Game::MakeDirectory(const std::string folder) {
std::string folder_builder;
std::string sub;
sub.reserve(folder.size());
for(auto it = folder.begin(); it != folder.end(); ++it) {
const char c = *it;
sub.push_back(c);
if(c == '/' || it == folder.end() - 1) {
folder_builder.append(sub);
if(access(folder_builder.c_str(), 0) != 0)
#ifdef _WIN32
if(mkdir(folder_builder.c_str()) != 0)
#else
if(mkdir(folder_builder.c_str(), 0777) != 0)
#endif
return false;
sub.clear();
}
}
return true;
}
void Game::initUtils() {
//user files
MakeDirectory("replay");
MakeDirectory("screenshots");
//cards from extra pack
MakeDirectory("expansions");
//files in ygopro-starter-pack
MakeDirectory("deck");
MakeDirectory("single");
//original files
MakeDirectory("script");
MakeDirectory("skin");
MakeDirectory("textures");
//subdirs in textures
MakeDirectory("textures/act");
MakeDirectory("textures/attack");
MakeDirectory("textures/bg");
MakeDirectory("textures/bg_deck");
MakeDirectory("textures/bg_menu");
MakeDirectory("textures/cover");
MakeDirectory("textures/cover2");
MakeDirectory("textures/pscale");
//sound
MakeDirectory("sound");
MakeDirectory("sound/BGM");
MakeDirectory("sound/BGM/advantage");
MakeDirectory("sound/BGM/deck");
MakeDirectory("sound/BGM/disadvantage");
MakeDirectory("sound/BGM/duel");
MakeDirectory("sound/BGM/lose");
MakeDirectory("sound/BGM/menu");
MakeDirectory("sound/BGM/win");
//custom sound
MakeDirectory("sound/custom");
MakeDirectory("sound/BGM/custom");
//pics
MakeDirectory("pics");
MakeDirectory("pics/field");
}
void Game::ClearTextures() {
matManager.mCard.setTexture(0, 0);
imgCard->setImage(imageManager.tCover[0]);
......@@ -1642,17 +1709,22 @@ void Game::OnResize() {
irr::gui::CGUITTFont* old_numFont = numFont;
irr::gui::CGUITTFont* old_adFont = adFont;
irr::gui::CGUITTFont* old_lpcFont = lpcFont;
//irr::gui::CGUITTFont* old_guiFont = guiFont;
irr::gui::CGUITTFont* old_textFont = textFont;
numFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, (yScale > 0.5 ? 16 * yScale : 8));
adFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, (yScale > 0.75 ? 12 * yScale : 9));
lpcFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 48 * yScale);
//guiFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize * yScale);
//env->getSkin()->setFont(guiFont);
textFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize * yScale);
old_numFont->drop();
old_adFont->drop();
old_lpcFont->drop();
//guiFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize * yScale);
//env->getSkin()->setFont(guiFont);
//old_guiFont->drop();
old_textFont->drop();
wMainMenu->setRelativePosition(ResizeWin(370, 200, 650, 415));
wDeckEdit->setRelativePosition(Resize(309, 8, 605, 130));
wDeckEdit->setRelativePosition(Resize(309, 5, 605, 130));
cbDBLFList->setRelativePosition(Resize(80, 5, 220, 30));
cbDBDecks->setRelativePosition(Resize(80, 35, 220, 60));
btnClearDeck->setRelativePosition(Resize(115, 99, 165, 120));
......@@ -1664,19 +1736,19 @@ void Game::OnResize() {
wSort->setRelativePosition(Resize(930, 132, 1020, 156));
cbSortType->setRelativePosition(Resize(10, 2, 85, 22));
wFilter->setRelativePosition(Resize(610, 8, 1020, 130));
wFilter->setRelativePosition(Resize(610, 5, 1020, 130));
scrFilter->setRelativePosition(Resize(999, 161, 1019, 629));
cbCardType->setRelativePosition(Resize(60, 3, 120, 23));
cbCardType2->setRelativePosition(Resize(130, 3, 190, 23));
cbRace->setRelativePosition(Resize(60, 49, 190, 69));
cbAttribute->setRelativePosition(Resize(60, 26, 190, 46));
cbLimit->setRelativePosition(Resize(260, 3, 390, 23));
ebStar->setRelativePosition(Resize(60, 72, 100, 92));
ebScale->setRelativePosition(Resize(150, 72, 190, 92));
ebAttack->setRelativePosition(Resize(260, 26, 340, 46));
ebDefense->setRelativePosition(Resize(260, 49, 340, 69));
ebCardName->setRelativePosition(Resize(260, 72, 390, 92));
btnEffectFilter->setRelativePosition(Resize(345, 28, 390, 69));
cbCardType->setRelativePosition(Resize(60, 25 / 6, 120, 20 + 25 / 6));
cbCardType2->setRelativePosition(Resize(130, 25 / 6, 190, 20 + 25 / 6));
cbRace->setRelativePosition(Resize(60, 40 + 75 / 6, 190, 60 + 75 / 6));
cbAttribute->setRelativePosition(Resize(60, 20 + 50 / 6, 190, 40 + 50 / 6));
cbLimit->setRelativePosition(Resize(260, 25 / 6, 390, 20 + 25 / 6));
ebStar->setRelativePosition(Resize(60, 60 + 100 / 6, 95, 80 + 100 / 6));
ebScale->setRelativePosition(Resize(155, 60 + 100 / 6, 190, 80 + 100 / 6));
ebAttack->setRelativePosition(Resize(260, 20 + 50 / 6, 340, 40 + 50 / 6));
ebDefense->setRelativePosition(Resize(260, 40 + 75 / 6, 340, 60 + 75 / 6));
ebCardName->setRelativePosition(Resize(260, 60 + 100 / 6, 390, 80 + 100 / 6));
btnEffectFilter->setRelativePosition(Resize(345, 20 + 50 / 6, 390, 60 + 75 / 6));
btnStartFilter->setRelativePosition(Resize(260, 80 + 125 / 6, 390, 100 + 125 / 6));
if(btnClearFilter)
btnClearFilter->setRelativePosition(Resize(205, 80 + 125 / 6, 255, 100 + 125 / 6));
......@@ -1684,17 +1756,17 @@ void Game::OnResize() {
wCategories->setRelativePosition(ResizeWin(450, 60, 1000, 270));
wLinkMarks->setRelativePosition(ResizeWin(700, 30, 820, 150));
stBanlist->setRelativePosition(ResizeWin(10, 9, 100, 29));
stDeck->setRelativePosition(ResizeWin(10, 39, 100, 59));
stCategory->setRelativePosition(ResizeWin(10, 5, 70, 25));
stLimit->setRelativePosition(ResizeWin(205, 5, 280, 25));
stAttribute->setRelativePosition(ResizeWin(10, 28, 70, 48));
stRace->setRelativePosition(ResizeWin(10, 51, 70, 71));
stAttack->setRelativePosition(ResizeWin(205, 28, 280, 48));
stDefense->setRelativePosition(ResizeWin(205, 51, 280, 71));
stStar->setRelativePosition(ResizeWin(10, 74, 80, 94));
stSearch->setRelativePosition(ResizeWin(205, 74, 280, 94));
stScale->setRelativePosition(ResizeWin(110, 74, 150, 94));
stBanlist->setRelativePosition(Resize(10, 9, 100, 29));
stDeck->setRelativePosition(Resize(10, 39, 100, 59));
stCategory->setRelativePosition(Resize(10, 2 + 25 / 6, 70, 22 + 25 / 6));
stLimit->setRelativePosition(Resize(205, 2 + 25 / 6, 280, 22 + 25 / 6));
stAttribute->setRelativePosition(Resize(10, 22 + 50 / 6, 70, 42 + 50 / 6));
stRace->setRelativePosition(Resize(10, 42 + 75 / 6, 70, 62 + 75 / 6));
stAttack->setRelativePosition(Resize(205, 22 + 50 / 6, 280, 42 + 50 / 6));
stDefense->setRelativePosition(Resize(205, 42 + 75 / 6, 280, 62 + 75 / 6));
stStar->setRelativePosition(Resize(10, 62 + 100 / 6, 70, 82 + 100 / 6));
stSearch->setRelativePosition(Resize(205, 62 + 100 / 6, 280, 82 + 100 / 6));
stScale->setRelativePosition(Resize(105, 62 + 100 / 6, 165, 82 + 100 / 6));
btnSideOK->setRelativePosition(Resize(510, 40, 820, 80));
btnSideShuffle->setRelativePosition(Resize(310, 100, 370, 130));
btnSideSort->setRelativePosition(Resize(375, 100, 435, 130));
......@@ -1747,7 +1819,9 @@ void Game::OnResize() {
wCardImg->setRelativePosition(ResizeCard(1, 1, 20, 18));
imgCard->setRelativePosition(ResizeCard(10, 9, 0, 0));
wInfos->setRelativePosition(Resize(1, 275, 301, 639));
stName->setRelativePosition(recti(10, 10, 287 * xScale, 32));
stName->setRelativePosition(recti(10, 10, 300 * xScale - 13, 10 + 22 * yScale));
stInfo->setRelativePosition(recti(15, 37 * yScale, 300 * xScale - 13, 60 * yScale));
//stDataInfo->setRelativePosition(recti(15, 60 * yScale, 300 * xScale - 13, 83 * yScale));
lstLog->setRelativePosition(Resize(10, 10, 290, 290));
//const auto& tsize = stText->getRelativePosition();
if(showingcode)
......@@ -1899,6 +1973,17 @@ void Game::FlashWindow() {
FlashWindowEx(&fi);
#endif
}
void Game::takeScreenshot() {
irr::video::IImage* const image = driver->createScreenShot();
if(image) {
irr::c8 filename[64];
snprintf(filename, 64, "screenshots/ygopro_%u.png", device->getTimer()->getRealTime());
if (!driver->writeImageToFile(image, filename))
device->getLogger()->log(L"Failed to take screenshot.", irr::ELL_WARNING);
image->drop();
} else
device->getLogger()->log(L"Failed to take screenshot.", irr::ELL_WARNING);
}
void Game::SetCursor(ECURSOR_ICON icon) {
ICursorControl* cursor = mainGame->device->getCursorControl();
if(cursor->getActiveIcon() != icon) {
......
......@@ -152,6 +152,8 @@ public:
void AddChatMsg(wchar_t* msg, int player);
void ClearChatMsg();
void AddDebugMsg(char* msgbuf);
bool MakeDirectory(const std::string folder);
void initUtils();
void ClearTextures();
void CloseDuelWindow();
......@@ -179,6 +181,7 @@ public:
void SetWindowsIcon();
void FlashWindow();
void takeScreenshot();
void SetCursor(ECURSOR_ICON icon);
Mutex gMutex;
......
#[2018.4][2018.2 TCG][2018.1][2017.10][2017.7][2017.4][2017.1][2016.10][2016.7][2016.4][2016.1][2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2017.11 TCG][2017.9 TCG][2017.6 TCG][2017.3 TCG][2016.8 TCG][2016.4 TCG][2015.11 TCG][2015.7 TCG][2015.4 TCG][2015.1 TCG][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1]
#[2018.4][2018.5 TCG][2018.1][2017.10][2017.7][2017.4][2017.1][2016.10][2016.7][2016.4][2016.1][2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2018.2 TCG][2017.11 TCG][2017.9 TCG][2017.6 TCG][2017.3 TCG][2016.8 TCG][2016.4 TCG][2015.11 TCG][2015.7 TCG][2015.4 TCG][2015.1 TCG][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1]
!2018.4
#forbidden
20663556 0 --イレカエル
......@@ -161,12 +161,14 @@
41420027 2 --神の宣告
40605147 2 --神の通告
!2018.2 TCG
!2018.5 TCG
#forbidden
76794549 0 --アストログラフ・マジシャン
20663556 0 --イレカエル
44910027 0 --ヴィクトリー・ドラゴン
20366274 0 --エルシャドール・ネフィリム
40044918 0 --E·HERO エアーマン
25862681 0 --エンシェント・フェアリー・ドラゴン
53804307 0 --焔征竜-ブラスター
07563579 0 --Emヒグルミ
40318957 0 --EMドクロバット・ジョーカー
......@@ -184,21 +186,22 @@
85115440 0 --十二獣ブルホーン
21593977 0 --処刑人-マキュラ
30539496 0 --真竜皇リトスアジムD
58984738 0 --真竜拳士ダイナマイトK
21377582 0 --真竜剣皇マスターP
81122844 0 --発条空母ゼンマイティ
23434538 0 --増殖するG
00581014 0 --ダイガスタ・エメラル
15341821 0 --ダンディライオン
61468779 0 --地霊神グランソイル
56570271 0 --DHERO ディスクガイ
69015963 0 --デビル·フランケン
18326736 0 --星守の騎士 プトレマイオス
33184167 0 --同族感染ウィルス
90307777 0 --影霊衣の術士 シュリット
54719828 0 --No.16 色の支配者ショック·ルーラー
43387895 0 --覇王眷竜スターヴ・ヴェノム
26400609 0 --瀑征竜-タイダル
78706415 0 --ファイバーポッド
93369354 0 --フィッシュボーグ-ガンナー
23558733 0 --フェニキシアン・クラスター・アマリリス
09929398 0 --BF-朧影のゴウフウ
31178212 0 --マジェスペクター・ユニコーン
34206604 0 --魔導サイエンティスト
......@@ -229,6 +232,7 @@
69243953 0 --蝶の短剣-エルマ
72892473 0 --手札抹殺
79571449 0 --天使の施し
11110587 0 --隣の芝刈り
42703248 0 --ハリケーン
18144506 0 --ハーピィの羽根帚
70828912 0 --早すぎた埋葬
......@@ -236,6 +240,7 @@
46448938 0 --魔導書の神判
46411259 0 --突然変異
85602018 0 --遺言状
94220427 0 --RUM-アージェント・カオス・フォース
27174286 0 --異次元からの帰還
93016201 0 --王宮の弾圧
05851097 0 --虚無空間
......@@ -246,7 +251,6 @@
80604091 0 --血の代償
28566710 0 --ラストバトル!
#limit
27279764 1 --アポクリフォート・キラー
64034255 1 --A·ジェネクス·バードマン
45222299 1 --イビリチュア·ガストクラーケ
11877465 1 --イビリチュア·マインドオーガス
......@@ -258,9 +262,10 @@
65518099 1 --クリフォート・ツール
38572779 1 --幻創のミセラサウルス
55885348 1 --Kozmo-ダークシミター
39512984 1 --ジェムナイトマスター・ダイヤ
78872731 1 --十二獣モルモラット
78868119 1 --深海のディーヴァ
22499034 1 --真竜戦士イグニスH
58984738 1 --真竜拳士ダイナマイトK
04474060 1 --SPYRAL GEAR-ドローン
78080961 1 --SPYRAL-ジーニアス
81275020 1 --SRベイゴマックス
......@@ -269,7 +274,6 @@
96570609 1 --天帝アイテール
75732622 1 --トーチ・ゴーレム
16226786 1 --深淵の暗殺者
80344569 1 --N·グラン·モール
18239909 1 --爆竜剣士イグニスターP
57143342 1 --彼岸の悪鬼 ガトルホッグ
20758643 1 --彼岸の悪鬼 グラバースニッチ
......@@ -302,8 +306,8 @@
14087893 1 --月の書
81674782 1 --次元の裂け目
83764718 1 --死者蘇生
91623717 1 --連鎖爆撃
79844764 1 --帝王の烈旋
11110587 1 --隣の芝刈り
70368879 1 --成金ゴブリン
22842126 1 --汎神の帝王
53129443 1 --ブラック·ホール
......@@ -319,23 +323,20 @@
61740673 1 --王宮の勅命
84749824 1 --神の警告
41420027 1 --神の宣告
94192409 1 --強制脱出装置
82732705 1 --スキルドレイン
73599290 1 --ソウルドレイン
83555666 1 --破壊輪
17078030 1 --光の護封壁
30241314 1 --マクロコスモス
32723153 1 --マジカル·エクスプロージョン
54974237 1 --闇のデッキ破壊ウイルス
#semi limit
74311226 2 --海皇の竜騎隊
27279764 2 --アポクリフォート・キラー
59297550 2 --ゼンマイマジシャン
90953320 2 --TG ハイパー·ライブラリアン
28297833 2 --ネクロフェイス
41386308 2 --マスマティシャン
92746535 2 --竜剣士ラスターP
48976825 2 --異次元からの埋葬
91623717 2 --連鎖爆撃
83555666 2 --破壊輪
!2018.1
#forbidden
......@@ -2924,6 +2925,182 @@
53582587 2 --激流葬
29401950 2 --奈落の落とし穴
!2018.2 TCG
#forbidden
20663556 0 --イレカエル
44910027 0 --ヴィクトリー・ドラゴン
20366274 0 --エルシャドール・ネフィリム
40044918 0 --E·HERO エアーマン
53804307 0 --焔征竜-ブラスター
07563579 0 --Emヒグルミ
40318957 0 --EMドクロバット・ジョーカー
17330916 0 --EMモンキーボード
82301904 0 --混沌帝龍 -終焉の使者-
79106360 0 --カオスポッド
90411554 0 --巌征竜-レドックス
08903700 0 --儀式魔人リリーサー
17412721 0 --旧神ノーデン
65536818 0 --源竜星-ボウテンコウ
49684352 0 --虹彩の魔術師
34124316 0 --サイバーポッド
88071625 0 --The tyrant NEPTUNE
48905153 0 --十二獣ドランシア
85115440 0 --十二獣ブルホーン
21593977 0 --処刑人-マキュラ
30539496 0 --真竜皇リトスアジムD
58984738 0 --真竜拳士ダイナマイトK
81122844 0 --発条空母ゼンマイティ
23434538 0 --増殖するG
00581014 0 --ダイガスタ・エメラル
15341821 0 --ダンディライオン
61468779 0 --地霊神グランソイル
56570271 0 --DHERO ディスクガイ
69015963 0 --デビル·フランケン
18326736 0 --星守の騎士 プトレマイオス
33184167 0 --同族感染ウィルス
90307777 0 --影霊衣の術士 シュリット
54719828 0 --No.16 色の支配者ショック·ルーラー
26400609 0 --瀑征竜-タイダル
78706415 0 --ファイバーポッド
93369354 0 --フィッシュボーグ-ガンナー
09929398 0 --BF-朧影のゴウフウ
31178212 0 --マジェスペクター・ユニコーン
34206604 0 --魔導サイエンティスト
33508719 0 --メタモルポット
96782886 0 --メンタルマスター
03078576 0 --八汰烏
34086406 0 --ラヴァルバル·チェイン
89399912 0 --嵐征竜-テンペスト
46772449 0 --励輝士 ヴェルズビュート
57421866 0 --レベル・スティーラー
41482598 0 --悪夢の蜃気楼
44763025 0 --いたずら好きな双子悪魔
19613556 0 --大嵐
17375316 0 --押収
35059553 0 --カイザーコロシアム
74191942 0 --苦渋の選択
42829885 0 --強引な番兵
45986603 0 --強奪
55144522 0 --強欲な壺
04031928 0 --心変わり
23557835 0 --次元融合
57953380 0 --生還の宝札
60682203 0 --大寒波
67616300 0 --チキンレース
48130397 0 --超融合
67169062 0 --貪欲な壺
27770341 0 --超再生能力
69243953 0 --蝶の短剣-エルマ
72892473 0 --手札抹殺
79571449 0 --天使の施し
42703248 0 --ハリケーン
18144506 0 --ハーピィの羽根帚
70828912 0 --早すぎた埋葬
34906152 0 --マスドライバー
46448938 0 --魔導書の神判
46411259 0 --突然変異
85602018 0 --遺言状
27174286 0 --異次元からの帰還
93016201 0 --王宮の弾圧
05851097 0 --虚無空間
57585212 0 --自爆スイッチ
03280747 0 --第六感
64697231 0 --ダスト·シュート
35316708 0 --刻の封印
80604091 0 --血の代償
28566710 0 --ラストバトル!
#limit
27279764 1 --アポクリフォート・キラー
64034255 1 --A·ジェネクス·バードマン
45222299 1 --イビリチュア·ガストクラーケ
11877465 1 --イビリチュア·マインドオーガス
99177923 1 --インフェルニティ·デーモン
68184115 1 --甲虫装機 ダンセル
69207766 1 --甲虫装機 ホーネット
27552504 1 --永遠の淑女 ベアトリーチェ
68819554 1 --Emダメージ・ジャグラー
65518099 1 --クリフォート・ツール
38572779 1 --幻創のミセラサウルス
55885348 1 --Kozmo-ダークシミター
78872731 1 --十二獣モルモラット
78868119 1 --深海のディーヴァ
22499034 1 --真竜戦士イグニスH
04474060 1 --SPYRAL GEAR-ドローン
78080961 1 --SPYRAL-ジーニアス
81275020 1 --SRベイゴマックス
48063985 1 --聖霊獣騎 カンナホーク
65192027 1 --ダーク·アームド·ドラゴン
96570609 1 --天帝アイテール
75732622 1 --トーチ・ゴーレム
16226786 1 --深淵の暗殺者
80344569 1 --N·グラン·モール
18239909 1 --爆竜剣士イグニスターP
57143342 1 --彼岸の悪鬼 ガトルホッグ
20758643 1 --彼岸の悪鬼 グラバースニッチ
70583986 1 --氷結界の虎王ドゥローレン
52687916 1 --氷結界の龍 トリシューラ
05043010 1 --ファイアウォール・ドラゴン
33396948 1 --封印されしエクゾディア
07902349 1 --封印されし者の左腕
70903634 1 --封印されし者の右腕
44519536 1 --封印されし者の左足
08124921 1 --封印されし者の右足
26674724 1 --ブリューナクの影霊衣
10802915 1 --魔界発現世行きデスガイド
89463537 1 --ユニコールの影霊衣
88264978 1 --レッドアイズ·ダークネスメタルドラゴン
33782437 1 --一時休戦
66957584 1 --インフェルニティガン
72405967 1 --王家の生け贄
81439173 1 --おろかな埋葬
67723438 1 --緊急テレポート
45305419 1 --継承の印
99330325 1 --妨げられた壊獣の眠り
12580477 1 --サンダー·ボルト
95308449 1 --終焉のカウントダウン
74845897 1 --真炎の爆発
35125879 1 --真竜皇の復活
54631665 1 --SPYRAL RESORT
32807846 1 --増援
54447022 1 --ソウル・チャージ
14087893 1 --月の書
81674782 1 --次元の裂け目
83764718 1 --死者蘇生
79844764 1 --帝王の烈旋
11110587 1 --隣の芝刈り
70368879 1 --成金ゴブリン
22842126 1 --汎神の帝王
53129443 1 --ブラック·ホール
73468603 1 --盆回し
15854426 1 --霞の谷の神風
58577036 1 --名推理
43040603 1 --モンスターゲート
23171610 1 --リミッター解除
14733538 1 --竜呼相打つ
27970830 1 --六武の門
02295440 1 --ワン·フォー·ワン
09059700 1 --インフェルニティ・バリア
61740673 1 --王宮の勅命
84749824 1 --神の警告
41420027 1 --神の宣告
94192409 1 --強制脱出装置
82732705 1 --スキルドレイン
73599290 1 --ソウルドレイン
83555666 1 --破壊輪
17078030 1 --光の護封壁
30241314 1 --マクロコスモス
32723153 1 --マジカル·エクスプロージョン
54974237 1 --闇のデッキ破壊ウイルス
#semi limit
74311226 2 --海皇の竜騎隊
59297550 2 --ゼンマイマジシャン
90953320 2 --TG ハイパー·ライブラリアン
28297833 2 --ネクロフェイス
41386308 2 --マスマティシャン
92746535 2 --竜剣士ラスターP
48976825 2 --異次元からの埋葬
91623717 2 --連鎖爆撃
!2017.11 TCG
#forbidden
27279764 0 --アポクリフォート・キラー
......
Subproject commit 92ad9db2a69bbaf4a07ef0173fe3ee03615b1f24
Subproject commit 5484e52fd1a9e81c36101e0bb8e4e1e859368fe5
......@@ -44,7 +44,7 @@ solution "ygo"
configuration { "Release", "vs*" }
flags { "StaticRuntime", "LinkTimeOptimization" }
disablewarnings { "4244", "4267", "4838", "4577", "4819", "4018", "4996", "4477", "4091" }
disablewarnings { "4244", "4267", "4838", "4577", "4819", "4018", "4996", "4477", "4091", "4305" }
configuration { "Release", "not vs*" }
symbols "On"
......
Subproject commit 93cfa16563d015445e8873a3ae653bef732ae268
Subproject commit eadaf7e6d270095cc47c5980c6fc1de95cfce530
......@@ -419,6 +419,7 @@
!system 1418 额外卡组数量应不超过15张,当前卡组数量为%d张。
!system 1419 副卡组数量应不超过15张,当前卡组数量为%d张。
!system 1420 有额外卡组卡片存在于主卡组,可能是额外卡组数量超过15张。
!system 1421 宣言的卡不符合条件,或无法被主机识别。
!system 1500 决斗结束。
!system 1501 录像结束。
!system 1502 连接已断开。
......
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