Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
ygopro
Commits
b7e52db7
Commit
b7e52db7
authored
Aug 11, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Fluorohydride/ygopro into develop
parents
4672bd84
1d647270
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
73 additions
and
83 deletions
+73
-83
gframe/client_card.cpp
gframe/client_card.cpp
+6
-6
gframe/config.h
gframe/config.h
+6
-2
gframe/data_manager.cpp
gframe/data_manager.cpp
+2
-2
gframe/deck_con.cpp
gframe/deck_con.cpp
+1
-0
gframe/drawing.cpp
gframe/drawing.cpp
+5
-1
gframe/game.cpp
gframe/game.cpp
+1
-1
gframe/image_manager.cpp
gframe/image_manager.cpp
+37
-37
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+2
-2
gframe/myfilesystem.h
gframe/myfilesystem.h
+2
-2
gframe/premake5.lua
gframe/premake5.lua
+1
-1
gframe/replay.cpp
gframe/replay.cpp
+3
-8
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+1
-1
ocgcore
ocgcore
+1
-1
premake/event/premake5.lua
premake/event/premake5.lua
+0
-3
premake/freetype/custom/ygopro/ftmodule.h
premake/freetype/custom/ygopro/ftmodule.h
+1
-1
premake/freetype/custom/ygopro/ftoption.h
premake/freetype/custom/ygopro/ftoption.h
+1
-1
premake/sqlite3/premake5.lua
premake/sqlite3/premake5.lua
+1
-0
premake5.lua
premake5.lua
+2
-14
No files found.
gframe/client_card.cpp
View file @
b7e52db7
...
...
@@ -35,8 +35,12 @@ void ClientCard::SetCode(unsigned int x) {
if
((
location
==
LOCATION_HAND
)
&&
(
code
!=
x
))
{
code
=
x
;
mainGame
->
dField
.
MoveCard
(
this
,
5
);
}
else
}
else
{
if
(
x
==
0
&&
code
!=
0
)
{
chain_code
=
code
;
}
code
=
x
;
}
}
void
ClientCard
::
UpdateInfo
(
unsigned
char
*
buf
)
{
int
flag
=
BufferIO
::
Read
<
int32_t
>
(
buf
);
...
...
@@ -48,11 +52,7 @@ void ClientCard::UpdateInfo(unsigned char* buf) {
int
pdata
=
BufferIO
::
Read
<
int32_t
>
(
buf
);
if
(
!
pdata
)
ClearData
();
if
((
location
==
LOCATION_HAND
)
&&
((
unsigned
int
)
pdata
!=
code
))
{
code
=
pdata
;
mainGame
->
dField
.
MoveCard
(
this
,
5
);
}
else
code
=
pdata
;
SetCode
(
pdata
);
}
if
(
flag
&
QUERY_POSITION
)
{
int
pdata
=
(
BufferIO
::
Read
<
int32_t
>
(
buf
)
>>
24
)
&
0xff
;
...
...
gframe/config.h
View file @
b7e52db7
...
...
@@ -73,8 +73,12 @@ extern char** environ;
#include "../ocgcore/ocgapi.h"
template
<
size_t
N
,
typename
...
TR
>
inline
int
myswprintf
(
wchar_t
(
&
buf
)[
N
],
const
wchar_t
*
fmt
,
TR
...
args
)
{
return
std
::
swprintf
(
buf
,
N
,
fmt
,
args
...);
inline
int
myswprintf
(
wchar_t
(
&
buf
)[
N
],
const
wchar_t
*
fmt
,
TR
&&
...
args
)
{
return
std
::
swprintf
(
buf
,
N
,
fmt
,
std
::
forward
<
TR
>
(
args
)...);
}
template
<
size_t
N
,
typename
...
TR
>
inline
int
mysnprintf
(
char
(
&
buf
)[
N
],
const
char
*
fmt
,
TR
&&
...
args
)
{
return
std
::
snprintf
(
buf
,
N
,
fmt
,
std
::
forward
<
TR
>
(
args
)...);
}
inline
FILE
*
mywfopen
(
const
wchar_t
*
filename
,
const
char
*
mode
)
{
...
...
gframe/data_manager.cpp
View file @
b7e52db7
...
...
@@ -327,7 +327,7 @@ void DataManager::InsertServerList() {
}
bool
DataManager
::
Error
(
sqlite3
*
pDB
,
sqlite3_stmt
*
pStmt
)
{
if
(
const
char
*
msg
=
sqlite3_errmsg
(
pDB
))
std
::
snprintf
(
errmsg
,
sizeof
errmsg
,
"%s"
,
msg
);
mysnprintf
(
errmsg
,
"%s"
,
msg
);
else
errmsg
[
0
]
=
'\0'
;
sqlite3_finalize
(
pStmt
);
...
...
@@ -565,7 +565,7 @@ unsigned char* DataManager::ScriptReaderEx(const char* script_name, int* slen) {
}
unsigned
char
*
DataManager
::
ScriptReaderExSingle
(
const
char
*
path
,
const
char
*
script_name
,
int
*
slen
,
int
pre_len
,
unsigned
int
use_irr
)
{
char
sname
[
256
];
std
::
snprintf
(
sname
,
sizeof
sname
,
"%s%s"
,
path
,
script_name
+
pre_len
);
//default script name: ./script/c%d.lua
mysnprintf
(
sname
,
"%s%s"
,
path
,
script_name
+
pre_len
);
//default script name: ./script/c%d.lua
if
(
use_irr
)
{
return
ReadScriptFromIrrFS
(
sname
,
slen
);
}
...
...
gframe/deck_con.cpp
View file @
b7e52db7
...
...
@@ -215,6 +215,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame
->
cbDBDecks
->
addItem
(
dname
);
mainGame
->
cbDBDecks
->
setSelected
(
mainGame
->
cbDBDecks
->
getItemCount
()
-
1
);
}
prev_deck
=
mainGame
->
cbDBDecks
->
getSelected
();
int
catesel
=
mainGame
->
cbDBCategory
->
getSelected
();
wchar_t
catepath
[
256
];
DeckManager
::
GetCategoryPath
(
catepath
,
catesel
,
mainGame
->
cbDBCategory
->
getText
());
...
...
gframe/drawing.cpp
View file @
b7e52db7
...
...
@@ -371,6 +371,7 @@ void Game::DrawCard(ClientCard* pcard) {
if
(
pcard
->
aniFrame
==
0
)
{
pcard
->
is_moving
=
false
;
pcard
->
is_fading
=
false
;
pcard
->
chain_code
=
0
;
}
}
matManager
.
mCard
.
AmbientColor
=
0xffffffff
;
...
...
@@ -378,7 +379,10 @@ void Game::DrawCard(ClientCard* pcard) {
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
pcard
->
mTransform
);
auto
m22
=
pcard
->
mTransform
(
2
,
2
);
if
(
m22
>
-
0.99
||
pcard
->
is_moving
)
{
matManager
.
mCard
.
setTexture
(
0
,
imageManager
.
GetTexture
(
pcard
->
code
));
auto
code
=
pcard
->
code
;
if
(
code
==
0
&&
pcard
->
is_moving
)
code
=
pcard
->
chain_code
;
matManager
.
mCard
.
setTexture
(
0
,
imageManager
.
GetTexture
(
code
));
driver
->
setMaterial
(
matManager
.
mCard
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vCardFront
,
4
,
matManager
.
iRectangle
,
2
);
}
...
...
gframe/game.cpp
View file @
b7e52db7
...
...
@@ -2084,7 +2084,7 @@ void Game::AddDebugMsg(const char* msg) {
}
if
(
enable_log
&
0x2
)
{
char
msgbuf
[
1040
];
std
::
snprintf
(
msgbuf
,
sizeof
msgbuf
,
"[Script Error]: %s"
,
msg
);
mysnprintf
(
msgbuf
,
"[Script Error]: %s"
,
msg
);
ErrorLog
(
msgbuf
);
}
}
...
...
gframe/image_manager.cpp
View file @
b7e52db7
This diff is collapsed.
Click to expand it.
gframe/menu_handler.cpp
View file @
b7e52db7
...
...
@@ -365,9 +365,9 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
int
flag
=
0
;
flag
+=
(
mainGame
->
chkBotHand
->
isChecked
()
?
0x1
:
0
);
char
arg2
[
8
];
std
::
snprintf
(
arg2
,
sizeof
arg2
,
"%d"
,
flag
);
mysnprintf
(
arg2
,
"%d"
,
flag
);
char
arg3
[
8
];
std
::
snprintf
(
arg3
,
sizeof
arg3
,
"%d"
,
mainGame
->
gameConf
.
serverport
);
mysnprintf
(
arg3
,
"%d"
,
mainGame
->
gameConf
.
serverport
);
execl
(
"./bot"
,
"bot"
,
arg1
,
arg2
,
arg3
,
nullptr
);
std
::
exit
(
0
);
}
else
{
...
...
gframe/myfilesystem.h
View file @
b7e52db7
...
...
@@ -182,7 +182,7 @@ public:
bool
success
=
true
;
TraversalDir
(
dir
,
[
dir
,
&
success
](
const
char
*
name
,
bool
isdir
)
{
char
full_path
[
1024
];
int
len
=
std
::
snprintf
(
full_path
,
sizeof
full_path
,
"%s/%s"
,
dir
,
name
);
int
len
=
mysnprintf
(
full_path
,
"%s/%s"
,
dir
,
name
);
if
(
len
<
0
||
len
>=
(
int
)(
sizeof
full_path
))
{
success
=
false
;
return
;
...
...
@@ -228,7 +228,7 @@ public:
while
((
dirp
=
readdir
(
dir
))
!=
nullptr
)
{
file_unit
funit
;
char
fname
[
1024
];
int
len
=
std
::
snprintf
(
fname
,
sizeof
fname
,
"%s/%s"
,
path
,
dirp
->
d_name
);
int
len
=
mysnprintf
(
fname
,
"%s/%s"
,
path
,
dirp
->
d_name
);
if
(
len
<
0
||
len
>=
(
int
)(
sizeof
fname
))
continue
;
stat
(
fname
,
&
fileStat
);
...
...
gframe/premake5.lua
View file @
b7e52db7
...
...
@@ -30,7 +30,7 @@ project "YGOPro"
end
if
BUILD_FREETYPE
then
includedirs
{
"../freetype/include"
}
includedirs
{
"../freetype/
custom"
,
"../freetype/
include"
}
else
includedirs
{
FREETYPE_INCLUDE_DIR
}
libdirs
{
FREETYPE_LIB_DIR
}
...
...
gframe/replay.cpp
View file @
b7e52db7
...
...
@@ -140,17 +140,12 @@ bool Replay::RenameReplay(const wchar_t* oldname, const wchar_t* newname) {
wchar_t
newfname
[
256
];
myswprintf
(
oldfname
,
L"./replay/%ls"
,
oldname
);
myswprintf
(
newfname
,
L"./replay/%ls"
,
newname
);
#ifdef _WIN32
BOOL
result
=
MoveFileW
(
oldfname
,
newfname
);
return
!!
result
;
#else
char
oldfilefn
[
256
];
char
newfilefn
[
256
];
char
oldfilefn
[
1024
];
char
newfilefn
[
1024
];
BufferIO
::
EncodeUTF8
(
oldfname
,
oldfilefn
);
BufferIO
::
EncodeUTF8
(
newfname
,
newfilefn
);
int
result
=
rename
(
oldfilefn
,
newfilefn
);
int
result
=
std
::
rename
(
oldfilefn
,
newfilefn
);
return
result
==
0
;
#endif
}
bool
Replay
::
ReadNextResponse
(
unsigned
char
resp
[])
{
unsigned
char
len
{};
...
...
gframe/replay_mode.cpp
View file @
b7e52db7
...
...
@@ -228,7 +228,7 @@ bool ReplayMode::StartDuel() {
}
}
else
{
char
filename
[
256
]{};
std
::
snprintf
(
filename
,
sizeof
filename
,
"./single/%s"
,
cur_replay
.
script_name
.
c_str
());
mysnprintf
(
filename
,
"./single/%s"
,
cur_replay
.
script_name
.
c_str
());
if
(
!
preload_script
(
pduel
,
filename
))
{
return
false
;
}
...
...
ocgcore
@
0c4898b2
Subproject commit
d2d3e31e382d71b460cd7f3842b4d332f3d5446c
Subproject commit
0c4898b2d1da022aff1fcf766d87336327aebeaf
premake/event/premake5.lua
View file @
b7e52db7
...
...
@@ -10,9 +10,6 @@ project "event"
if
EVENT_VERSION
>=
0x02020000
then
print
(
"Warning: Using libevent version 2.2.x is not supported, please use 2.1.x, otherwise you may encounter issues."
)
end
if
EVENT_VERSION
>=
0x02010000
and
WINXP_SUPPORT
then
print
(
"Warning: libevent 2.1 uses some new APIs which require Windows Vista or later, so WinXP support will be invalid."
)
end
includedirs
{
"include"
,
"compat"
}
...
...
premake/freetype/custom/ygopro/ftmodule.h
View file @
b7e52db7
/*
* This file registers the FreeType modules compiled into the library.
*
* YGOPro only uses modules that are needed for TrueType fonts.
* YGOPro only uses modules that are needed for TrueType
and OpenType
fonts.
*
*/
...
...
premake/freetype/custom/ygopro/ftoption.h
View file @
b7e52db7
...
...
@@ -5,7 +5,7 @@
* User-selectable configuration macros (specification only).
*
* This file is customized for YGOPro to include only the necessary
* configuration options for the TrueType font driver.
* configuration options for the TrueType
and OpenType
font driver.
*
* See the original FreeType source code for more information.
* /include/freetype/config/ftoption.h
...
...
premake/sqlite3/premake5.lua
View file @
b7e52db7
...
...
@@ -11,5 +11,6 @@ if not SERVER_PRO3_SUPPORT then
"SQLITE_OMIT_DEPRECATED"
,
"SQLITE_OMIT_PROGRESS_CALLBACK"
,
"SQLITE_OMIT_SHARED_CACHE"
,
"SQLITE_TRUSTED_SCHEMA=0"
,
}
end
premake5.lua
View file @
b7e52db7
...
...
@@ -83,7 +83,6 @@ newoption { trigger = "irrklang-pro-release-lib-dir", category = "YGOPro - irrkl
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
=
"Compile for Apple Silicon Mac"
}
newoption
{
trigger
=
"mac-intel"
,
category
=
"YGOPro"
,
description
=
"Compile for Intel Mac"
}
...
...
@@ -295,10 +294,6 @@ if USE_AUDIO then
end
end
if
GetParam
(
"winxp-support"
)
and
os
.
istarget
(
"windows"
)
then
WINXP_SUPPORT
=
true
end
IS_ARM
=
false
function
spawn
(
cmd
)
...
...
@@ -395,12 +390,7 @@ workspace "YGOPro"
filter
"system:windows"
systemversion
"latest"
startproject
"YGOPro"
if
WINXP_SUPPORT
then
defines
{
"WINVER=0x0501"
}
toolset
"v141_xp"
else
defines
{
"WINVER=0x0601"
}
-- WIN7
end
defines
{
"WINVER=0x0601"
}
-- WIN7
platforms
{
"Win32"
,
"x64"
}
filter
{
"system:windows"
,
"platforms:Win32"
}
...
...
@@ -458,9 +448,7 @@ workspace "YGOPro"
filter
"action:vs*"
cdialect
"C11"
if
not
WINXP_SUPPORT
then
conformancemode
"On"
end
conformancemode
"On"
vectorextensions
"SSE2"
buildoptions
{
"/utf-8"
}
defines
{
"_CRT_SECURE_NO_WARNINGS"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment