Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
fallenstardust
YGOMobile
Commits
d15a0b1c
Commit
d15a0b1c
authored
Sep 29, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
50f20805
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
16 deletions
+35
-16
Classes/gframe/data_manager.h
Classes/gframe/data_manager.h
+1
-0
Classes/gframe/deck_manager.h
Classes/gframe/deck_manager.h
+13
-12
Classes/gframe/network.h
Classes/gframe/network.h
+3
-2
Classes/ocgcore/field.cpp
Classes/ocgcore/field.cpp
+10
-0
Classes/ocgcore/interpreter.cpp
Classes/ocgcore/interpreter.cpp
+7
-2
Classes/ocgcore/interpreter.h
Classes/ocgcore/interpreter.h
+1
-0
No files found.
Classes/gframe/data_manager.h
View file @
d15a0b1c
...
@@ -15,6 +15,7 @@ namespace irr {
...
@@ -15,6 +15,7 @@ namespace irr {
}
}
namespace
ygo
{
namespace
ygo
{
constexpr
int
MAX_STRING_ID
=
0x7ff
;
constexpr
int
MAX_STRING_ID
=
0x7ff
;
constexpr
uint32_t
MIN_CARD_ID
=
(
uint32_t
)(
MAX_STRING_ID
+
1
)
>>
4
;
constexpr
uint32_t
MIN_CARD_ID
=
(
uint32_t
)(
MAX_STRING_ID
+
1
)
>>
4
;
constexpr
uint32_t
MAX_CARD_ID
=
0x0fffffffU
;
constexpr
uint32_t
MAX_CARD_ID
=
0x0fffffffU
;
...
...
Classes/gframe/deck_manager.h
View file @
d15a0b1c
...
@@ -8,20 +8,21 @@
...
@@ -8,20 +8,21 @@
#include "config.h"
#include "config.h"
namespace
ygo
{
namespace
ygo
{
constexpr
int
DECK_MAX_SIZE
=
60
;
constexpr
int
DECK_MIN_SIZE
=
40
;
constexpr
int
EXTRA_MAX_SIZE
=
15
;
constexpr
int
SIDE_MAX_SIZE
=
15
;
constexpr
int
PACK_MAX_SIZE
=
1000
;
constexpr
int
MAINC_MAX
=
250
;
// the limit of card_state
constexpr
int
DECK_MAX_SIZE
=
60
;
constexpr
int
SIDEC_MAX
=
MAINC_MAX
;
constexpr
int
DECK_MIN_SIZE
=
40
;
constexpr
int
EXTRA_MAX_SIZE
=
15
;
constexpr
int
SIDE_MAX_SIZE
=
15
;
constexpr
int
PACK_MAX_SIZE
=
1000
;
constexpr
int
DECK_CATEGORY_PACK
=
0
;
constexpr
int
MAINC_MAX
=
250
;
// the limit of card_state
constexpr
int
DECK_CATEGORY_BOT
=
1
;
constexpr
int
SIDEC_MAX
=
MAINC_MAX
;
constexpr
int
DECK_CATEGORY_NONE
=
2
;
constexpr
int
DECK_CATEGORY_SEPARATOR
=
3
;
constexpr
int
DECK_CATEGORY_PACK
=
0
;
constexpr
int
DECK_CATEGORY_CUSTOM
=
4
;
constexpr
int
DECK_CATEGORY_BOT
=
1
;
constexpr
int
DECK_CATEGORY_NONE
=
2
;
constexpr
int
DECK_CATEGORY_SEPARATOR
=
3
;
constexpr
int
DECK_CATEGORY_CUSTOM
=
4
;
struct
LFList
{
struct
LFList
{
unsigned
int
hash
{};
unsigned
int
hash
{};
...
...
Classes/gframe/network.h
View file @
d15a0b1c
...
@@ -14,8 +14,9 @@
...
@@ -14,8 +14,9 @@
#define check_trivially_copyable(T) static_assert(std::is_trivially_copyable<T>::value == true && std::is_standard_layout<T>::value == true, "not trivially copyable")
#define check_trivially_copyable(T) static_assert(std::is_trivially_copyable<T>::value == true && std::is_standard_layout<T>::value == true, "not trivially copyable")
namespace
ygo
{
namespace
ygo
{
constexpr
int
SIZE_NETWORK_BUFFER
=
0x20000
;
constexpr
int
MAX_DATA_SIZE
=
UINT16_MAX
-
1
;
constexpr
int
SIZE_NETWORK_BUFFER
=
0x20000
;
constexpr
int
MAX_DATA_SIZE
=
UINT16_MAX
-
1
;
struct
HostInfo
{
struct
HostInfo
{
uint32_t
lflist
{};
uint32_t
lflist
{};
...
...
Classes/ocgcore/field.cpp
View file @
d15a0b1c
...
@@ -2624,6 +2624,16 @@ int32_t field::check_tuner_material(lua_State* L, card* pcard, card* tuner, int3
...
@@ -2624,6 +2624,16 @@ int32_t field::check_tuner_material(lua_State* L, card* pcard, card* tuner, int3
return
FALSE
;
return
FALSE
;
}
}
}
}
effect
*
extra_synchro_material_effect
=
tuner
->
is_affected_by_effect
(
EFFECT_EXTRA_SYNCHRO_MATERIAL
);
if
(
extra_synchro_material_effect
)
{
if
(
!
extra_synchro_material_effect
->
check_count_limit
(
playerid
))
{
return
FALSE
;
}
int32_t
value
=
extra_synchro_material_effect
->
get_value
(
pcard
);
if
(
value
<=
0
)
{
return
FALSE
;
}
}
int32_t
mzone_limit
=
get_mzone_limit
(
playerid
,
playerid
,
LOCATION_REASON_TOFIELD
);
int32_t
mzone_limit
=
get_mzone_limit
(
playerid
,
playerid
,
LOCATION_REASON_TOFIELD
);
if
(
mzone_limit
<
0
)
{
if
(
mzone_limit
<
0
)
{
if
(
location
==
LOCATION_HAND
)
{
if
(
location
==
LOCATION_HAND
)
{
...
...
Classes/ocgcore/interpreter.cpp
View file @
d15a0b1c
...
@@ -14,7 +14,8 @@
...
@@ -14,7 +14,8 @@
#include "ocgapi.h"
#include "ocgapi.h"
#include "interpreter.h"
#include "interpreter.h"
interpreter
::
interpreter
(
duel
*
pd
,
bool
enable_unsafe_libraries
)
:
coroutines
(
256
),
pduel
(
pd
)
{
interpreter
::
interpreter
(
duel
*
pd
,
bool
enable_unsafe_libraries
)
:
coroutines
(
256
),
pduel
(
pd
),
enable_unsafe_feature
(
enable_unsafe_libraries
)
{
lua_state
=
luaL_newstate
();
lua_state
=
luaL_newstate
();
current_state
=
lua_state
;
current_state
=
lua_state
;
std
::
memcpy
(
lua_getextraspace
(
lua_state
),
&
pd
,
LUA_EXTRASPACE
);
//set_duel_info
std
::
memcpy
(
lua_getextraspace
(
lua_state
),
&
pd
,
LUA_EXTRASPACE
);
//set_duel_info
...
@@ -139,7 +140,11 @@ int32_t interpreter::load_script(const char* script_name) {
...
@@ -139,7 +140,11 @@ int32_t interpreter::load_script(const char* script_name) {
return
OPERATION_FAIL
;
return
OPERATION_FAIL
;
++
no_action
;
++
no_action
;
luaL_checkstack
(
current_state
,
2
,
nullptr
);
luaL_checkstack
(
current_state
,
2
,
nullptr
);
int32_t
error
=
luaL_loadbuffer
(
current_state
,
(
const
char
*
)
buffer
,
len
,
script_name
)
||
lua_pcall
(
current_state
,
0
,
0
,
0
);
int32_t
error
=
0
;
if
(
enable_unsafe_feature
)
error
=
luaL_loadbuffer
(
current_state
,
(
const
char
*
)
buffer
,
len
,
script_name
)
||
lua_pcall
(
current_state
,
0
,
0
,
0
);
else
error
=
luaL_loadbufferx
(
current_state
,
(
const
char
*
)
buffer
,
len
,
script_name
,
"t"
)
||
lua_pcall
(
current_state
,
0
,
0
,
0
);
if
(
error
)
{
if
(
error
)
{
interpreter
::
sprintf
(
pduel
->
strbuffer
,
"%s"
,
lua_tostring
(
current_state
,
-
1
));
interpreter
::
sprintf
(
pduel
->
strbuffer
,
"%s"
,
lua_tostring
(
current_state
,
-
1
));
handle_message
(
pduel
,
1
);
handle_message
(
pduel
,
1
);
...
...
Classes/ocgcore/interpreter.h
View file @
d15a0b1c
...
@@ -50,6 +50,7 @@ public:
...
@@ -50,6 +50,7 @@ public:
coroutine_map
coroutines
;
coroutine_map
coroutines
;
int32_t
no_action
{};
int32_t
no_action
{};
int32_t
call_depth
{};
int32_t
call_depth
{};
bool
enable_unsafe_feature
{};
explicit
interpreter
(
duel
*
pd
,
bool
enable_unsafe_libraries
);
explicit
interpreter
(
duel
*
pd
,
bool
enable_unsafe_libraries
);
~
interpreter
();
~
interpreter
();
...
...
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