Skip to content

Commit e2206f8

Browse files
Merge branch 'master' into server
2 parents 6a5268e + e49f454 commit e2206f8

File tree

7 files changed

+201
-198
lines changed

7 files changed

+201
-198
lines changed

cards.cdb

63 KB
Binary file not shown.

gframe/config.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ extern char** environ;
7373
#include "../ocgcore/ocgapi.h"
7474

7575
template<size_t N, typename... TR>
76-
inline int myswprintf(wchar_t(&buf)[N], const wchar_t* fmt, TR&&... args) {
77-
return std::swprintf(buf, N, fmt, std::forward<TR>(args)...);
76+
inline int myswprintf(wchar_t(&buf)[N], const wchar_t* fmt, TR... args) {
77+
return std::swprintf(buf, N, fmt, args...);
7878
}
7979
template<size_t N, typename... TR>
80-
inline int mysnprintf(char(&buf)[N], const char* fmt, TR&&... args) {
81-
return std::snprintf(buf, N, fmt, std::forward<TR>(args)...);
80+
inline int mysnprintf(char(&buf)[N], const char* fmt, TR... args) {
81+
return std::snprintf(buf, N, fmt, args...);
8282
}
8383

8484
inline FILE* mywfopen(const wchar_t* filename, const char* mode) {

gframe/deck_con.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,15 +1954,17 @@ bool DeckBuilder::check_limit(code_pointer pointer) {
19541954
}
19551955
return valid;
19561956
};
1957+
auto limitcode_has_credit = filterList->credits.find(limitcode) != filterList->credits.end();
19571958
auto handle_card = [&](ygo::code_pointer& card) {
19581959
if (card->first == limitcode || card->second.alias == limitcode) {
19591960
limit--;
1960-
if(limit <= 0)
1961+
if(limit < 0)
19611962
return false;
19621963
}
1964+
if(!limitcode_has_credit)
1965+
return true;
19631966
auto code = card->second.alias ? card->second.alias : card->first;
1964-
spend_credit(code);
1965-
return true;
1967+
return spend_credit(code);
19661968
};
19671969
for (auto& card : deckManager.current_deck.main) {
19681970
if(!handle_card(card))
@@ -1976,6 +1978,6 @@ bool DeckBuilder::check_limit(code_pointer pointer) {
19761978
if(!handle_card(card))
19771979
return false;
19781980
}
1979-
return spend_credit(limitcode);
1981+
return handle_card(pointer);
19801982
}
19811983
}

gframe/game.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ bool Game::Initialize() {
271271
SetWindowsIcon();
272272
//main menu
273273
wchar_t strbuf[256];
274-
myswprintf(strbuf, L"KoishiPro %X.0%X.%X Synthetic", (PRO_VERSION & 0xf000U) >> 12, (PRO_VERSION & 0x0ff0U) >> 4, PRO_VERSION & 0x000fU);
274+
myswprintf(strbuf, L"KoishiPro %X.0%X.%X Antifan", (PRO_VERSION & 0xf000U) >> 12, (PRO_VERSION & 0x0ff0U) >> 4, PRO_VERSION & 0x000fU);
275275
wMainMenu = env->addWindow(irr::core::rect<irr::s32>(370, 200, 650, 415), false, strbuf);
276276
wMainMenu->getCloseButton()->setVisible(false);
277277
btnLanMode = env->addButton(irr::core::rect<irr::s32>(10, 30, 270, 60), wMainMenu, BUTTON_LAN_MODE, dataManager.GetSysString(1200));

0 commit comments

Comments
 (0)