Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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
0
Merge Requests
0
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-core
Commits
fa884004
Commit
fa884004
authored
Nov 17, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into develop
parents
72e05741
2d486e69
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
17 deletions
+27
-17
.gitlab-ci.yml
.gitlab-ci.yml
+9
-3
libduel.cpp
libduel.cpp
+6
-6
premake/dll.lua
premake/dll.lua
+8
-2
premake/lua.lua
premake/lua.lua
+0
-2
premake5.lua
premake5.lua
+1
-1
processor.cpp
processor.cpp
+3
-3
No files found.
.gitlab-ci.yml
View file @
fa884004
...
@@ -82,7 +82,14 @@ mat_macos:
...
@@ -82,7 +82,14 @@ mat_macos:
build_linux_x64
:
build_linux_x64
:
extends
:
.build_unix
extends
:
.build_unix
build_linux_x64_no_longjmp
:
extends
:
.build_unix
except
:
[]
except
:
[]
only
:
-
'
888'
variables
:
NO_LONGJMP
:
'
1'
build_linux_x32
:
build_linux_x32
:
extends
:
.build_unix
extends
:
.build_unix
...
@@ -189,11 +196,11 @@ upload_to_minio:
...
@@ -189,11 +196,11 @@ upload_to_minio:
tags
:
tags
:
-
linux
-
linux
dependencies
:
dependencies
:
-
build_linux_x64
-
build_linux_x64
_no_longjmp
variables
:
variables
:
SERVER_USER
:
nanahira
SERVER_USER
:
nanahira
SERVER_HOST
:
koishi.momobako.com
SERVER_HOST
:
koishi.momobako.com
FROM_PATH
:
'
'
FROM_PATH
:
'
dist/x64/libocgcore.so
'
SERVER_PATH
:
'
'
SERVER_PATH
:
'
'
script
:
script
:
-
apt update && apt -y install openssh-client rsync coreutils
-
apt update && apt -y install openssh-client rsync coreutils
...
@@ -207,7 +214,6 @@ upload_to_minio:
...
@@ -207,7 +214,6 @@ upload_to_minio:
deploy_888
:
deploy_888
:
extends
:
.deploy_to_server
extends
:
.deploy_to_server
variables
:
variables
:
FROM_PATH
:
'
dist/x64/libocgcore.so'
SERVER_PATH
:
'
~/ygopro-super-pre/bin/release/'
SERVER_PATH
:
'
~/ygopro-super-pre/bin/release/'
only
:
only
:
-
'
888'
-
'
888'
libduel.cpp
View file @
fa884004
...
@@ -1458,14 +1458,14 @@ int32_t scriptlib::duel_confirm_cards(lua_State *L) {
...
@@ -1458,14 +1458,14 @@ int32_t scriptlib::duel_confirm_cards(lua_State *L) {
int32_t
scriptlib
::
duel_sort_decktop
(
lua_State
*
L
)
{
int32_t
scriptlib
::
duel_sort_decktop
(
lua_State
*
L
)
{
check_action_permission
(
L
);
check_action_permission
(
L
);
check_param_count
(
L
,
3
);
check_param_count
(
L
,
3
);
uint32_t
sort_player
=
(
u
int32_t
)
lua_tointeger
(
L
,
1
);
int32_t
sort_player
=
(
int32_t
)
lua_tointeger
(
L
,
1
);
uint32_t
target_player
=
(
u
int32_t
)
lua_tointeger
(
L
,
2
);
int32_t
target_player
=
(
int32_t
)
lua_tointeger
(
L
,
2
);
uint32_t
count
=
(
u
int32_t
)
lua_tointeger
(
L
,
3
);
int32_t
count
=
(
int32_t
)
lua_tointeger
(
L
,
3
);
if
(
sort_player
!=
0
&&
sort_player
!=
1
)
if
(
!
check_playerid
(
sort_player
)
)
return
0
;
return
0
;
if
(
target_player
!=
0
&&
target_player
!=
1
)
if
(
!
check_playerid
(
target_player
)
)
return
0
;
return
0
;
if
(
count
<
1
||
count
>
16
)
if
(
count
<
1
)
return
0
;
return
0
;
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
pduel
->
game_field
->
add_process
(
PROCESSOR_SORT_DECK
,
0
,
0
,
0
,
sort_player
+
(
target_player
<<
16
),
count
);
pduel
->
game_field
->
add_process
(
PROCESSOR_SORT_DECK
,
0
,
0
,
0
,
sort_player
+
(
target_player
<<
16
),
count
);
...
...
premake/dll.lua
View file @
fa884004
newoption
{
trigger
=
"lua-dir"
,
description
=
""
,
value
=
"PATH"
,
default
=
"./lua"
}
newoption
{
trigger
=
"lua-dir"
,
description
=
""
,
value
=
"PATH"
,
default
=
"./lua"
}
newoption
{
trigger
=
"sqlite3-dir"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"sqlite3-dir"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"no-longjmp"
,
description
=
"Disable use of longjmp for error handling in Lua"
}
boolOptions
=
{
boolOptions
=
{
"no-lua-safe"
,
"no-lua-safe"
,
...
@@ -19,6 +20,7 @@ if not os.isdir(LUA_DIR) then
...
@@ -19,6 +20,7 @@ if not os.isdir(LUA_DIR) then
end
end
SQLITE3_DIR
=
GetParam
(
"sqlite3-dir"
)
SQLITE3_DIR
=
GetParam
(
"sqlite3-dir"
)
USE_LONGJMP
=
not
GetParam
(
"no-longjmp"
)
function
ApplyBoolean
(
param
)
function
ApplyBoolean
(
param
)
if
GetParam
(
param
)
then
if
GetParam
(
param
)
then
...
@@ -33,7 +35,9 @@ workspace "ocgcoredll"
...
@@ -33,7 +35,9 @@ workspace "ocgcoredll"
configurations
{
"Release"
,
"Debug"
}
configurations
{
"Release"
,
"Debug"
}
platforms
{
"x64"
,
"x32"
,
"arm64"
,
"wasm"
}
platforms
{
"x64"
,
"x32"
,
"arm64"
,
"wasm"
}
defines
{
"LUA_USE_LONGJMP"
}
if
USE_LONGJMP
then
defines
{
"LUA_USE_LONGJMP"
}
end
for
_
,
boolOption
in
ipairs
(
boolOptions
)
do
for
_
,
boolOption
in
ipairs
(
boolOptions
)
do
ApplyBoolean
(
boolOption
)
ApplyBoolean
(
boolOption
)
...
@@ -79,7 +83,9 @@ workspace "ocgcoredll"
...
@@ -79,7 +83,9 @@ workspace "ocgcoredll"
filter
"system:linux"
filter
"system:linux"
defines
{
"LUA_USE_LINUX"
}
defines
{
"LUA_USE_LINUX"
}
pic
"On"
pic
"On"
linkoptions
{
"-static-libstdc++"
,
"-static-libgcc"
}
if
USE_LONGJMP
then
linkoptions
{
"-static-libstdc++"
,
"-static-libgcc"
}
end
filter
"platforms:wasm"
filter
"platforms:wasm"
toolset
"emcc"
toolset
"emcc"
...
...
premake/lua.lua
View file @
fa884004
...
@@ -5,8 +5,6 @@ project "lua"
...
@@ -5,8 +5,6 @@ project "lua"
files
{
"src/*.c"
,
"src/*.h"
}
files
{
"src/*.c"
,
"src/*.h"
}
removefiles
{
"src/lua.c"
,
"src/luac.c"
,
"src/onelua.c"
}
removefiles
{
"src/lua.c"
,
"src/luac.c"
,
"src/onelua.c"
}
defines
{
"LUA_USE_LONGJMP"
}
if
not
GetParam
(
"no-lua-safe"
)
then
if
not
GetParam
(
"no-lua-safe"
)
then
removefiles
{
"src/linit.c"
}
removefiles
{
"src/linit.c"
}
end
end
...
...
premake5.lua
View file @
fa884004
...
@@ -28,5 +28,5 @@ project "ocgcore"
...
@@ -28,5 +28,5 @@ project "ocgcore"
defines
{
"LUA_USE_LINUX"
}
defines
{
"LUA_USE_LINUX"
}
if
OCGCORE_DYNAMIC
then
if
OCGCORE_DYNAMIC
then
pic
"On"
pic
"On"
linkoptions
{
"-static-libstdc++"
,
"-static-libgcc"
}
--
linkoptions { "-static-libstdc++", "-static-libgcc" }
end
end
processor.cpp
View file @
fa884004
...
@@ -675,15 +675,15 @@ uint32_t field::process() {
...
@@ -675,15 +675,15 @@ uint32_t field::process() {
++
it
->
step
;
++
it
->
step
;
}
else
{
}
else
{
if
(
returns
.
bvalue
[
0
]
!=
0xff
)
{
if
(
returns
.
bvalue
[
0
]
!=
0xff
)
{
card
*
tc
[
1
6
];
card
*
tc
[
25
6
];
for
(
i
=
0
;
i
<
count
;
++
i
)
for
(
i
=
0
;
i
<
count
;
++
i
)
player
[
target_player
].
list_main
.
pop_back
();
player
[
target_player
].
list_main
.
pop_back
();
for
(
i
=
0
;
i
<
count
;
++
i
)
for
(
i
=
0
;
i
<
count
;
++
i
)
tc
[
returns
.
bvalue
[
i
]]
=
core
.
select_cards
[
i
];
tc
[
returns
.
bvalue
[
i
]]
=
core
.
select_cards
[
i
];
for
(
i
=
0
;
i
<
count
;
++
i
)
{
for
(
i
=
0
;
i
<
count
;
++
i
)
{
player
[
target_player
].
list_main
.
push_back
(
tc
[
count
-
i
-
1
]);
player
[
target_player
].
list_main
.
push_back
(
tc
[
count
-
1
-
i
]);
tc
[
count
-
i
-
1
]
->
current
.
sequence
=
(
uint8_t
)
player
[
target_player
].
list_main
.
size
()
-
1
;
}
}
reset_sequence
(
target_player
,
LOCATION_DECK
);
auto
clit
=
player
[
target_player
].
list_main
.
rbegin
();
auto
clit
=
player
[
target_player
].
list_main
.
rbegin
();
for
(
i
=
0
;
i
<
count
;
++
i
,
++
clit
)
{
for
(
i
=
0
;
i
<
count
;
++
i
,
++
clit
)
{
card
*
pcard
=
*
clit
;
card
*
pcard
=
*
clit
;
...
...
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