Commit 8abbef0f authored by mercury233's avatar mercury233

Merge branch 'fh' into patch-show-pack

parents 6274a9b4 deaa7a8b
...@@ -1523,7 +1523,6 @@ void Game::ShowCardInfo(int code, bool resize) { ...@@ -1523,7 +1523,6 @@ void Game::ShowCardInfo(int code, bool resize) {
if(!dataManager.GetData(code, &cd)) if(!dataManager.GetData(code, &cd))
memset(&cd, 0, sizeof(CardData)); memset(&cd, 0, sizeof(CardData));
imgCard->setImage(imageManager.GetTexture(code, true)); imgCard->setImage(imageManager.GetTexture(code, true));
imgCard->setScaleImage(true);
if(cd.alias != 0 && (cd.alias - code < CARD_ARTWORK_VERSIONS_OFFSET || code - cd.alias < CARD_ARTWORK_VERSIONS_OFFSET)) if(cd.alias != 0 && (cd.alias - code < CARD_ARTWORK_VERSIONS_OFFSET || code - cd.alias < CARD_ARTWORK_VERSIONS_OFFSET))
myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(cd.alias), cd.alias); myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(cd.alias), cd.alias);
else myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code); else myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code);
...@@ -1697,9 +1696,7 @@ void Game::ErrorLog(const char* msg) { ...@@ -1697,9 +1696,7 @@ void Game::ErrorLog(const char* msg) {
} }
void Game::ClearTextures() { void Game::ClearTextures() {
matManager.mCard.setTexture(0, 0); matManager.mCard.setTexture(0, 0);
imgCard->setImage(imageManager.tCover[0]); ClearCardInfo(0);
scrCardText->setVisible(false);
imgCard->setScaleImage(true);
btnPSAU->setImage(); btnPSAU->setImage();
btnPSDU->setImage(); btnPSDU->setImage();
for(int i=0; i<=4; ++i) { for(int i=0; i<=4; ++i) {
......
include "lzma/." include "lzma/."
include "spmemvfs/." include "spmemvfs/."
project "ygopro" project "YGOPro"
kind "WindowedApp" kind "WindowedApp"
files { "*.cpp", "*.h" } files { "*.cpp", "*.h" }
includedirs { "../ocgcore" } includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "cspmemvfs", "lua", "sqlite3", "irrlicht", "freetype", "event" } links { "ocgcore", "clzma", "cspmemvfs", LUA_LIB_NAME, "sqlite3", "irrlicht", "freetype", "event" }
if BUILD_IKPMP3 then
links { "ikpmp3" }
end
if BUILD_EVENT then if BUILD_EVENT then
includedirs { "../event/include" } includedirs { "../event/include" }
else
includedirs { EVENT_INCLUDE_DIR }
libdirs { EVENT_LIB_DIR }
end end
if BUILD_IRRLICHT or os.ishost("macosx") then if BUILD_IRRLICHT then
includedirs { "../irrlicht/include" } includedirs { "../irrlicht/include" }
else
includedirs { IRRLICHT_INCLUDE_DIR }
libdirs { IRRLICHT_LIB_DIR }
end end
if BUILD_FREETYPE then if BUILD_FREETYPE then
includedirs { "../freetype/include" } includedirs { "../freetype/include" }
else
includedirs { FREETYPE_INCLUDE_DIR }
libdirs { FREETYPE_LIB_DIR }
end end
if BUILD_SQLITE then if BUILD_SQLITE then
includedirs { "../sqlite3" } includedirs { "../sqlite3" }
else
includedirs { SQLITE_INCLUDE_DIR }
libdirs { SQLITE_LIB_DIR }
end end
if USE_IRRKLANG then if USE_IRRKLANG then
defines { "YGOPRO_USE_IRRKLANG" } defines { "YGOPRO_USE_IRRKLANG" }
includedirs { "../irrklang/include" } includedirs { IRRKLANG_INCLUDE_DIR }
if not IRRKLANG_PRO then
libdirs { IRRKLANG_LIB_DIR }
end
end end
filter "system:windows" filter "system:windows"
...@@ -37,36 +56,31 @@ project "ygopro" ...@@ -37,36 +56,31 @@ project "ygopro"
links { "irrKlang" } links { "irrKlang" }
if IRRKLANG_PRO then if IRRKLANG_PRO then
defines { "IRRKLANG_STATIC" } defines { "IRRKLANG_STATIC" }
links { "ikpmp3" }
filter { "not configurations:Debug" } filter { "not configurations:Debug" }
libdirs { "../irrklang/lib/Win32-vs2019" } libdirs { IRRKLANG_PRO_RELEASE_LIB_DIR }
filter { "configurations:Debug" } filter { "configurations:Debug" }
libdirs { "../irrklang/lib/Win32-visualStudio-debug" } libdirs { IRRKLANG_PRO_DEBUG_LIB_DIR }
filter {} filter {}
else
libdirs { "../irrklang/lib/Win32-visualStudio" }
end end
end end
links { "opengl32", "ws2_32", "winmm", "gdi32", "kernel32", "user32", "imm32" } links { "opengl32", "ws2_32", "winmm", "gdi32", "kernel32", "user32", "imm32" }
filter { "system:windows", "not action:vs*"}
includedirs { "/mingw/include/irrlicht", "/mingw/include/freetype2" }
filter "not action:vs*" filter "not action:vs*"
buildoptions { "-std=c++14", "-fno-rtti" } buildoptions { "-std=c++14", "-fno-rtti" }
filter "not system:windows" filter "not system:windows"
includedirs { "/usr/include/irrlicht", "/usr/include/freetype2" } links { "event_pthreads", "dl", "pthread" }
links { "event_pthreads", "dl", "pthread", "X11" }
filter "system:macosx" filter "system:macosx"
libdirs { "../irrlicht/source/Irrlicht/MacOSX/build/Release/" }
links { "z" } links { "z" }
defines { "GL_SILENCE_DEPRECATION" } defines { "GL_SILENCE_DEPRECATION" }
if MAC_ARM then
buildoptions { "--target=arm64-apple-macos12" }
linkoptions { "-arch arm64" }
end
if USE_IRRKLANG then if USE_IRRKLANG then
links { "irrklang" } links { "irrklang" }
libdirs { "../irrklang/bin/macosx-gcc" }
end end
filter "system:linux" filter "system:linux"
links { "GL", "Xxf86vm" } links { "GL", "X11", "Xxf86vm" }
if USE_IRRKLANG then if USE_IRRKLANG then
links { "IrrKlang" } links { "IrrKlang" }
linkoptions{ "-Wl,-rpath=./irrklang/bin/linux-gcc-64/" } linkoptions{ IRRKLANG_LINK_RPATH }
libdirs { "../irrklang/bin/linux-gcc-64" }
end end
This diff is collapsed.
if os.ishost("windows") then -- default global settings
USE_IRRKLANG = true
IRRKLANG_PRO = false BUILD_LUA = true
BUILD_EVENT = os.istarget("windows")
BUILD_FREETYPE = os.istarget("windows")
BUILD_SQLITE = os.istarget("windows")
BUILD_IRRLICHT = not os.istarget("macosx")
USE_IRRKLANG = true
IRRKLANG_PRO = false
LUA_LIB_NAME = "lua"
-- read settings from command line or environment variables
newoption { trigger = "build-lua", category = "YGOPro - lua", description = "" }
newoption { trigger = "no-build-lua", category = "YGOPro - lua", description = "" }
newoption { trigger = "lua-include-dir", category = "YGOPro - lua", description = "", value = "PATH" }
newoption { trigger = "lua-lib-dir", category = "YGOPro - lua", description = "", value = "PATH" }
newoption { trigger = "lua-lib-name", category = "YGOPro - lua", description = "", value = "NAME", default = "lua" }
newoption { trigger = "build-event", category = "YGOPro - event", description = "" }
newoption { trigger = "no-build-event", category = "YGOPro - event", description = "" }
newoption { trigger = "event-include-dir", category = "YGOPro - event", description = "", value = "PATH" }
newoption { trigger = "event-lib-dir", category = "YGOPro - event", description = "", value = "PATH" }
newoption { trigger = "build-freetype", category = "YGOPro - freetype", description = "" }
newoption { trigger = "no-build-freetype", category = "YGOPro - freetype", description = "" }
newoption { trigger = "freetype-include-dir", category = "YGOPro - freetype", description = "", value = "PATH" }
newoption { trigger = "freetype-lib-dir", category = "YGOPro - freetype", description = "", value = "PATH" }
newoption { trigger = "build-sqlite", category = "YGOPro - sqlite", description = "" }
newoption { trigger = "no-build-sqlite", category = "YGOPro - sqlite", description = "" }
newoption { trigger = "sqlite-include-dir", category = "YGOPro - sqlite", description = "", value = "PATH" }
newoption { trigger = "sqlite-lib-dir", category = "YGOPro - sqlite", description = "", value = "PATH" }
newoption { trigger = "build-irrlicht", category = "YGOPro - irrlicht", description = "" }
newoption { trigger = "no-build-irrlicht", category = "YGOPro - irrlicht", description = "" }
newoption { trigger = "irrlicht-include-dir", category = "YGOPro - irrlicht", description = "", value = "PATH" }
newoption { trigger = "irrlicht-lib-dir", category = "YGOPro - irrlicht", description = "", value = "PATH" }
newoption { trigger = "use-irrklang", category = "YGOPro - irrklang", description = "" }
newoption { trigger = "no-use-irrklang", category = "YGOPro - irrklang", description = "" }
newoption { trigger = "irrklang-include-dir", category = "YGOPro - irrklang", description = "", value = "PATH" }
newoption { trigger = "irrklang-lib-dir", category = "YGOPro - irrklang", description = "", value = "PATH" }
newoption { trigger = "irrklang-pro", category = "YGOPro - irrklang - pro", description = "" }
newoption { trigger = "no-irrklang-pro", category = "YGOPro - irrklang - pro", description = "" }
newoption { trigger = "irrklang-pro-release-lib-dir", category = "YGOPro - irrklang - pro", description = "", value = "PATH" }
newoption { trigger = "irrklang-pro-debug-lib-dir", category = "YGOPro - irrklang - pro", description = "", value = "PATH" }
newoption { trigger = 'build-ikpmp3', category = "YGOPro - irrklang - ikpmp3", description = "" }
newoption { trigger = "winxp-support", category = "YGOPro", description = "" }
newoption { trigger = "mac-arm", category = "YGOPro", description = "M1" }
function GetParam(param)
return _OPTIONS[param] or os.getenv(string.upper(string.gsub(param,"-","_")))
end
if GetParam("build-lua") then
BUILD_LUA = true BUILD_LUA = true
BUILD_EVENT = true elseif GetParam("no-build-lua") then
BUILD_LUA = false
end
if not BUILD_LUA then
-- at most times you need to change this if you change BUILD_LUA to false
-- make sure your lua lib is built with C++ and version >= 5.3
LUA_INCLUDE_DIR = GetParam("lua-include-dir") or "/usr/local/include/lua"
LUA_LIB_DIR = GetParam("lua-lib-dir") or "/usr/local/lib"
LUA_LIB_NAME = GetParam("lua-lib-name")
end
if GetParam("build-event") then
BUILD_EVENT = os.istarget("windows") -- only on windows for now
elseif GetParam("no-build-event") then
BUILD_EVENT = false
end
if not BUILD_EVENT then
EVENT_INCLUDE_DIR = GetParam("event-include-dir") or "/usr/local/include/event2"
EVENT_LIB_DIR = GetParam("event-lib-dir") or "/usr/local/lib"
end
if GetParam("build-freetype") then
BUILD_FREETYPE = true BUILD_FREETYPE = true
BUILD_IRRLICHT = true elseif GetParam("no-build-freetype") then
BUILD_FREETYPE = false
end
if not BUILD_FREETYPE then
if os.istarget("linux") then
FREETYPE_INCLUDE_DIR = "/usr/include/freetype2"
elseif os.istarget("macosx") then
FREETYPE_INCLUDE_DIR = "/usr/local/include/freetype2"
end
FREETYPE_INCLUDE_DIR = GetParam("freetype-include-dir") or FREETYPE_INCLUDE_DIR
FREETYPE_LIB_DIR = GetParam("freetype-lib-dir") or "/usr/local/lib"
end
if GetParam("build-sqlite") then
BUILD_SQLITE = true BUILD_SQLITE = true
else elseif GetParam("no-build-sqlite") then
BUILD_SQLITE = false
end
if not BUILD_SQLITE then
SQLITE_INCLUDE_DIR = GetParam("sqlite-include-dir") or "/usr/local/include"
SQLITE_LIB_DIR = GetParam("sqlite-lib-dir") or "/usr/local/lib"
end
if GetParam("build-irrlicht") then
BUILD_IRRLICHT = true
elseif GetParam("no-build-irrlicht") then
BUILD_IRRLICHT = false
end
if not BUILD_IRRLICHT then
IRRLICHT_INCLUDE_DIR = GetParam("irrlicht-include-dir") or "/usr/local/include/irrlicht"
IRRLICHT_LIB_DIR = GetParam("irrlicht-lib-dir") or "/usr/local/lib"
end
if GetParam("use-irrklang") then
USE_IRRKLANG = true USE_IRRKLANG = true
elseif GetParam("no-use-irrklang") then
USE_IRRKLANG = false
end
if USE_IRRKLANG then
IRRKLANG_INCLUDE_DIR = GetParam("irrklang-include-dir") or "../irrklang/include"
if os.istarget("windows") then
IRRKLANG_LIB_DIR = "../irrklang/lib/Win32-visualStudio"
elseif os.istarget("linux") then
IRRKLANG_LIB_DIR = "../irrklang/bin/linux-gcc-64"
IRRKLANG_LINK_RPATH = "-Wl,-rpath=./irrklang/bin/linux-gcc-64/"
elseif os.istarget("macosx") then
IRRKLANG_LIB_DIR = "../irrklang/bin/macosx-gcc"
end
IRRKLANG_LIB_DIR = GetParam("irrklang-lib-dir") or IRRKLANG_LIB_DIR
end
if GetParam("irrklang-pro") and os.istarget("windows") then
IRRKLANG_PRO = true
elseif GetParam("no-irrklang-pro") then
IRRKLANG_PRO = false IRRKLANG_PRO = false
BUILD_LUA = true end
BUILD_EVENT = false --not implemented on linux if IRRKLANG_PRO then
BUILD_FREETYPE = false -- irrklang pro can't use the pro lib to debug
BUILD_IRRLICHT = not os.ishost("macosx") IRRKLANG_PRO_RELEASE_LIB_DIR = GetParam("irrklang-pro-release-lib-dir") or "../irrklang/lib/Win32-vs2019"
BUILD_SQLITE = false IRRKLANG_PRO_DEBUG_LIB_DIR = GetParam("irrklang-pro-debug-lib-dir") or "../irrklang/lib/Win32-visualStudio-debug"
end
BUILD_IKPMP3 = USE_IRRKLANG and (GetParam("build-ikpmp3") or IRRKLANG_PRO)
if GetParam("winxp-support") and os.istarget("windows") then
WINXP_SUPPORT = true
end
if GetParam("mac-arm") and os.istarget("macosx") then
MAC_ARM = true
end end
workspace "YGOPro" workspace "YGOPro"
...@@ -24,19 +159,23 @@ workspace "YGOPro" ...@@ -24,19 +159,23 @@ workspace "YGOPro"
configurations { "Release", "Debug" } configurations { "Release", "Debug" }
filter "system:windows" filter "system:windows"
defines { "WIN32", "_WIN32", "WINVER=0x0501" } defines { "WIN32", "_WIN32" }
entrypoint "mainCRTStartup" entrypoint "mainCRTStartup"
systemversion "latest" systemversion "latest"
startproject "ygopro" startproject "YGOPro"
if WINXP_SUPPORT then
filter "system:bsd" defines { "WINVER=0x0501" }
includedirs { "/usr/local/include" } toolset "v141_xp"
libdirs { "/usr/local/lib" } else
defines { "WINVER=0x0601" } -- WIN7
end
filter "system:macosx" filter "system:macosx"
includedirs { "/usr/local/include/freetype2" }
libdirs { "/usr/local/lib" } libdirs { "/usr/local/lib" }
buildoptions { "-stdlib=libc++" } buildoptions { "-stdlib=libc++" }
if MAC_ARM then
buildoptions { "--target=arm64-apple-macos12" }
end
links { "OpenGL.framework", "Cocoa.framework", "IOKit.framework" } links { "OpenGL.framework", "Cocoa.framework", "IOKit.framework" }
filter "system:linux" filter "system:linux"
...@@ -59,7 +198,9 @@ workspace "YGOPro" ...@@ -59,7 +198,9 @@ workspace "YGOPro"
filter { "configurations:Release", "not action:vs*" } filter { "configurations:Release", "not action:vs*" }
symbols "On" symbols "On"
defines "NDEBUG" defines "NDEBUG"
buildoptions "-march=native" if not MAC_ARM then
buildoptions "-march=native"
end
filter { "configurations:Debug", "action:vs*" } filter { "configurations:Debug", "action:vs*" }
defines { "_ITERATOR_DEBUG_LEVEL=0" } defines { "_ITERATOR_DEBUG_LEVEL=0" }
...@@ -71,10 +212,7 @@ workspace "YGOPro" ...@@ -71,10 +212,7 @@ workspace "YGOPro"
defines { "_CRT_SECURE_NO_WARNINGS" } defines { "_CRT_SECURE_NO_WARNINGS" }
filter "not action:vs*" filter "not action:vs*"
buildoptions { "-fno-strict-aliasing", "-Wno-multichar" } buildoptions { "-fno-strict-aliasing", "-Wno-multichar", "-Wno-format-security" }
filter {"not action:vs*", "system:windows"}
buildoptions { "-static-libgcc" }
filter {} filter {}
...@@ -95,6 +233,6 @@ workspace "YGOPro" ...@@ -95,6 +233,6 @@ workspace "YGOPro"
if BUILD_SQLITE then if BUILD_SQLITE then
include "sqlite3" include "sqlite3"
end end
if USE_IRRKLANG and IRRKLANG_PRO then if BUILD_IKPMP3 then
include "ikpmp3" include "ikpmp3"
end end
...@@ -76,8 +76,8 @@ ...@@ -76,8 +76,8 @@
!system 218 是否使用[%ls]的效果代替支付基本分? !system 218 是否使用[%ls]的效果代替支付基本分?
!system 219 是否使用[%ls]的效果代替取除超量素材? !system 219 是否使用[%ls]的效果代替取除超量素材?
!system 220 是否使用[%ls]的效果代替取除指示物? !system 220 是否使用[%ls]的效果代替取除指示物?
!system 221 是否在[%ls]发动[%ls]的诱发效果? !system 221 是否在[%ls]发动[%ls]的诱发效果?
!system 222 是否要发动诱发效果? !system 222 是否要发动诱发效果?
!system 223 稍后将询问其他可以发动的效果。 !system 223 稍后将询问其他可以发动的效果。
!system 224 已用正规方法特殊召唤 !system 224 已用正规方法特殊召唤
!system 225 叠放于[%ls](%d)下 !system 225 叠放于[%ls](%d)下
...@@ -267,6 +267,7 @@ ...@@ -267,6 +267,7 @@
!system 1190 加入手卡 !system 1190 加入手卡
!system 1191 送去墓地 !system 1191 送去墓地
!system 1192 除外 !system 1192 除外
!system 1193 回到卡组
#menu #menu
!system 1200 联机模式 !system 1200 联机模式
!system 1201 单人模式 !system 1201 单人模式
...@@ -644,6 +645,9 @@ ...@@ -644,6 +645,9 @@
!counter 0x5f 拼图指示物 !counter 0x5f 拼图指示物
!counter 0x60 指示物(北极天熊辐射) !counter 0x60 指示物(北极天熊辐射)
!counter 0x61 指示物(命运的囚人) !counter 0x61 指示物(命运的囚人)
!counter 0x62 指示物(逐渐削减的生命)
!counter 0x1063 幻觉指示物
!counter 0x64 G石人指示物
#setnames, using tab for comment #setnames, using tab for comment
!setname 0x1 正义盟军 AOJ !setname 0x1 正义盟军 AOJ
!setname 0x2 次世代 ジェネクス !setname 0x2 次世代 ジェネクス
...@@ -719,6 +723,7 @@ ...@@ -719,6 +723,7 @@
!setname 0x34 宝玉 宝玉 !setname 0x34 宝玉 宝玉
!setname 0x1034 宝玉兽 宝玉獣 !setname 0x1034 宝玉兽 宝玉獣
!setname 0x2034 究极宝玉神 究極宝玉神 !setname 0x2034 究极宝玉神 究極宝玉神
!setname 0x5034 高等宝玉兽 A宝玉獣
!setname 0x35 魔轰神 魔轟神 !setname 0x35 魔轰神 魔轟神
!setname 0x36 机甲 マシンナーズ !setname 0x36 机甲 マシンナーズ
!setname 0x37 霞之谷 霞の谷 !setname 0x37 霞之谷 霞の谷
...@@ -1105,7 +1110,7 @@ ...@@ -1105,7 +1110,7 @@
!setname 0x15d 烙印 !setname 0x15d 烙印
!setname 0x15e 降阶魔法 RDM !setname 0x15e 降阶魔法 RDM
!setname 0x15f 战吼 ウォークライ !setname 0x15f 战吼 ウォークライ
!setname 0x160 质炉 マテリアクトル !setname 0x160 质炉 マテリアクトル
!setname 0x161 溟界 !setname 0x161 溟界
!setname 0x162 七音服 ドレミコード !setname 0x162 七音服 ドレミコード
!setname 0x163 北极天熊 ベアルクティ !setname 0x163 北极天熊 ベアルクティ
...@@ -1132,10 +1137,22 @@ ...@@ -1132,10 +1137,22 @@
!setname 0x177 海龙神 リバイアサン !setname 0x177 海龙神 リバイアサン
!setname 0x178 潜海 シー・ステルス !setname 0x178 潜海 シー・ステルス
!setname 0x179 兽带斗神 セリオンズ !setname 0x179 兽带斗神 セリオンズ
!setname 0x17a 肆世坏 スケアクロー !setname 0x17a 恐吓爪牙族 スケアクロー
!setname 0x17b 野蛮人 バーバリアン !setname 0x17b 野蛮人 バーバリアン
!setname 0x17c 漫读使灵 Libromancer !setname 0x17c 漫读使灵 Libromancer
!setname 0x17d 群豪 ヴァリアンツ !setname 0x17d 群豪 ヴァリアンツ
!setname 0x17e 拉比林斯迷宫 ラビュリンス !setname 0x17e 拉比林斯迷宫 ラビュリンス
!setname 0x117e 拉比林斯迷宫欢迎 ウェルカム・ラビュリンス !setname 0x117e 拉比林斯迷宫欢迎 ウェルカム・ラビュリンス
!setname 0x17f 神碑 !setname 0x17f 神碑
!setname 0x180 卫星闪灵 スプライト
!setname 0x181 珠泪哀歌族 ティアラメンツ
!setname 0x182 春化精
!setname 0x183 悠悠 もけもけ
!setname 0x184 翼侠 ウィングマン
#setname 0x185 涂鸦 らくがき
!setname 0x1185 涂鸦兽 らくがきじゅう
!setname 0x2185 涂鸦本 らくがきちょう
!setname 0x186 G石人 Gゴーレム
!setname 0x187 桥梁 架け橋
!setname 0x188 深渊之兽 ビーステッド
!setname 0x189 俱舍怒威族 クシャトリラ
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