Commit b772f270 authored by nanahira's avatar nanahira

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

parents 00e5e024 7877a105
version: '{build}' version: '{build}'
image: Visual Studio 2017
skip_tags: true skip_tags: true
...@@ -25,7 +26,7 @@ install: ...@@ -25,7 +26,7 @@ install:
- xcopy /E premake\* . - xcopy /E premake\* .
# premake # premake
- premake5 vs2015 - premake5 vs2017
configuration: Release configuration: Release
......
No preview for this file type
...@@ -2347,7 +2347,8 @@ void ClientField::ShowCardInfoInList(ClientCard* pcard, irr::gui::IGUIElement* e ...@@ -2347,7 +2347,8 @@ void ClientField::ShowCardInfoInList(ClientCard* pcard, irr::gui::IGUIElement* e
if(pcard->code) { if(pcard->code) {
str.append(dataManager.GetName(pcard->code)); str.append(dataManager.GetName(pcard->code));
} }
if(pcard->status & STATUS_PROC_COMPLETE) if((pcard->status & STATUS_PROC_COMPLETE)
&& (pcard->type & (TYPE_RITUAL | TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK | TYPE_SPSUMMON)))
str.append(L"\n").append(dataManager.GetSysString(224)); str.append(L"\n").append(dataManager.GetSysString(224));
for(size_t i = 0; i < chains.size(); ++i) { for(size_t i = 0; i < chains.size(); ++i) {
wchar_t formatBuffer[2048]; wchar_t formatBuffer[2048];
......
...@@ -1591,6 +1591,10 @@ void Game::ShowCardInfo(int code, bool resize) { ...@@ -1591,6 +1591,10 @@ void Game::ShowCardInfo(int code, bool resize) {
if(cd.type & TYPE_MONSTER) { if(cd.type & TYPE_MONSTER) {
myswprintf(formatBuffer, L"[%ls] %ls/%ls", dataManager.FormatType(cd.type), dataManager.FormatRace(cd.race), dataManager.FormatAttribute(cd.attribute)); myswprintf(formatBuffer, L"[%ls] %ls/%ls", dataManager.FormatType(cd.type), dataManager.FormatRace(cd.race), dataManager.FormatAttribute(cd.attribute));
stInfo->setText(formatBuffer); stInfo->setText(formatBuffer);
int offset_info = 0;
irr::core::dimension2d<unsigned int> dtxt = mainGame->guiFont->getDimension(formatBuffer);
if(dtxt.Width > (300 * xScale - 13) - 15)
offset_info = 15;
if(!(cd.type & TYPE_LINK)) { if(!(cd.type & TYPE_LINK)) {
const wchar_t* form = L"\u2605"; const wchar_t* form = L"\u2605";
if(cd.type & TYPE_XYZ) form = L"\u2606"; if(cd.type & TYPE_XYZ) form = L"\u2606";
...@@ -1621,11 +1625,12 @@ void Game::ShowCardInfo(int code, bool resize) { ...@@ -1621,11 +1625,12 @@ void Game::ShowCardInfo(int code, bool resize) {
wcscat(formatBuffer, scaleBuffer); wcscat(formatBuffer, scaleBuffer);
} }
stDataInfo->setText(formatBuffer); stDataInfo->setText(formatBuffer);
int offset_arrows = 0; int offset_arrows = offset_info;
irr::core::dimension2d<unsigned int> dtxt = mainGame->guiFont->getDimension(formatBuffer); dtxt = mainGame->guiFont->getDimension(formatBuffer);
if(dtxt.Width > (300 * xScale - 13) - 15) if(dtxt.Width > (300 * xScale - 13) - 15)
offset_arrows = 15; offset_arrows += 15;
stDataInfo->setRelativePosition(rect<s32>(15, 60, 300 * xScale - 13, (83 + offset_arrows))); stInfo->setRelativePosition(rect<s32>(15, 37, 300 * xScale - 13, (60 + offset_info)));
stDataInfo->setRelativePosition(rect<s32>(15, (60 + offset_info), 300 * xScale - 13, (83 + offset_arrows)));
stSetName->setRelativePosition(rect<s32>(15, (83 + offset_arrows), 296 * xScale, (83 + offset_arrows) + offset)); stSetName->setRelativePosition(rect<s32>(15, (83 + offset_arrows), 296 * xScale, (83 + offset_arrows) + offset));
stText->setRelativePosition(rect<s32>(15, (83 + offset_arrows) + offset, 287 * xScale, 324 * yScale)); stText->setRelativePosition(rect<s32>(15, (83 + offset_arrows) + offset, 287 * xScale, 324 * yScale));
scrCardText->setRelativePosition(rect<s32>(287 * xScale - 20, (83 + offset_arrows) + offset, 287 * xScale, 324 * yScale)); scrCardText->setRelativePosition(rect<s32>(287 * xScale - 20, (83 + offset_arrows) + offset, 287 * xScale, 324 * yScale));
......
...@@ -5,10 +5,7 @@ ...@@ -5,10 +5,7 @@
#include <functional> #include <functional>
#include "bufferio.h" #include "bufferio.h"
#ifdef _WIN32 #ifndef _WIN32
#include <direct.h>
#include <sys/stat.h>
#else
#include <dirent.h> #include <dirent.h>
#include <sys/stat.h> #include <sys/stat.h>
#endif #endif
...@@ -20,8 +17,8 @@ ...@@ -20,8 +17,8 @@
class FileSystem { class FileSystem {
public: public:
static bool IsFileExists(const wchar_t* wfile) { static bool IsFileExists(const wchar_t* wfile) {
struct _stat fileStat; DWORD attr = GetFileAttributesW(wfile);
return (_wstat(wfile, &fileStat) == 0) && !(fileStat.st_mode & _S_IFDIR); return attr != INVALID_FILE_ATTRIBUTES && !(attr & FILE_ATTRIBUTE_DIRECTORY);
} }
static bool IsFileExists(const char* file) { static bool IsFileExists(const char* file) {
...@@ -31,8 +28,8 @@ public: ...@@ -31,8 +28,8 @@ public:
} }
static bool IsDirExists(const wchar_t* wdir) { static bool IsDirExists(const wchar_t* wdir) {
struct _stat fileStat; DWORD attr = GetFileAttributesW(wdir);
return (_wstat(wdir, &fileStat) == 0) && (fileStat.st_mode & _S_IFDIR); return attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_DIRECTORY);
} }
static bool IsDirExists(const char* dir) { static bool IsDirExists(const char* dir) {
...@@ -42,7 +39,7 @@ public: ...@@ -42,7 +39,7 @@ public:
} }
static bool MakeDir(const wchar_t* wdir) { static bool MakeDir(const wchar_t* wdir) {
return _wmkdir(wdir) == 0; return CreateDirectoryW(wdir, NULL);
} }
static bool MakeDir(const char* dir) { static bool MakeDir(const char* dir) {
......
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