Commit b2980d2d authored by nanahira's avatar nanahira

Merge branch 'master' into another

parents 1b0facb9 fa65676d
...@@ -103,17 +103,18 @@ before_deploy: ...@@ -103,17 +103,18 @@ before_deploy:
- rm -rf pics/thumbnail pics/*.db - rm -rf pics/thumbnail pics/*.db
- mkdir replay - mkdir replay
- mkdir screenshots
- git clone --depth=1 https://$NANAHIRA@github.com/purerosefallen/fonts - git clone --depth=1 https://$NANAHIRA@github.com/purerosefallen/fonts
- sed -i "s/c:\/windows/./g" system.conf - sed -i "s/c:\/windows/./g" system.conf
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - 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-$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; 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 fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - 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-$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 sound; 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 fi
deploy: deploy:
......
...@@ -86,8 +86,9 @@ after_build: ...@@ -86,8 +86,9 @@ after_build:
- rm -rf pics/thumbnail pics/*.db - rm -rf pics/thumbnail pics/*.db
- mkdir replay - 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 - 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 - 7z a -mx9 -xr!.git* KoishiPro-with-sound-%APPVEYOR_REPO_TAG_NAME%.7z sound
......
...@@ -1919,6 +1919,13 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) { ...@@ -1919,6 +1919,13 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
return true; return true;
break; 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; default: break;
} }
break; break;
......
...@@ -1899,6 +1899,17 @@ void Game::FlashWindow() { ...@@ -1899,6 +1899,17 @@ void Game::FlashWindow() {
FlashWindowEx(&fi); FlashWindowEx(&fi);
#endif #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) { void Game::SetCursor(ECURSOR_ICON icon) {
ICursorControl* cursor = mainGame->device->getCursorControl(); ICursorControl* cursor = mainGame->device->getCursorControl();
if(cursor->getActiveIcon() != icon) { if(cursor->getActiveIcon() != icon) {
......
...@@ -174,6 +174,7 @@ public: ...@@ -174,6 +174,7 @@ public:
void SetWindowsIcon(); void SetWindowsIcon();
void FlashWindow(); void FlashWindow();
void takeScreenshot();
void SetCursor(ECURSOR_ICON icon); void SetCursor(ECURSOR_ICON icon);
Mutex gMutex; Mutex gMutex;
......
...@@ -44,7 +44,7 @@ solution "ygo" ...@@ -44,7 +44,7 @@ solution "ygo"
configuration { "Release", "vs*" } configuration { "Release", "vs*" }
flags { "StaticRuntime", "LinkTimeOptimization" } 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*" } configuration { "Release", "not vs*" }
symbols "On" symbols "On"
......
Subproject commit 3f76ec2f7ca1a678f9c7b876117dc3a07e5306b4 Subproject commit f196735871f426872da35d2699c96466cbf48759
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