Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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-Cn-Ko-En
Commits
57005175
Commit
57005175
authored
Feb 12, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
09715de9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
Classes/ocgcore/duel.cpp
Classes/ocgcore/duel.cpp
+5
-2
Classes/ocgcore/libdebug.cpp
Classes/ocgcore/libdebug.cpp
+0
-4
Classes/ocgcore/ocgapi.cpp
Classes/ocgcore/ocgapi.cpp
+4
-3
No files found.
Classes/ocgcore/duel.cpp
View file @
57005175
...
...
@@ -18,7 +18,7 @@
duel
::
duel
()
{
lua
=
new
interpreter
(
this
);
game_field
=
new
field
(
this
);
game_field
->
temp_card
=
new_card
(
0
);
game_field
->
temp_card
=
new_card
(
TEMP_CARD_ID
);
message_buffer
.
reserve
(
SIZE_MESSAGE_BUFFER
);
#ifdef _WIN32
_set_error_mode
(
_OUT_TO_MSGBOX
);
...
...
@@ -45,8 +45,11 @@ void duel::clear() {
cards
.
clear
();
groups
.
clear
();
effects
.
clear
();
assumes
.
clear
();
sgroups
.
clear
();
uncopy
.
clear
();
game_field
=
new
field
(
this
);
game_field
->
temp_card
=
new_card
(
0
);
game_field
->
temp_card
=
new_card
(
TEMP_CARD_ID
);
}
card
*
duel
::
new_card
(
uint32_t
code
)
{
card
*
pcard
=
new
card
(
this
);
...
...
Classes/ocgcore/libdebug.cpp
View file @
57005175
...
...
@@ -148,10 +148,6 @@ int32_t scriptlib::debug_reload_field_begin(lua_State *L) {
pduel
->
game_field
->
core
.
duel_rule
=
1
;
else
pduel
->
game_field
->
core
.
duel_rule
=
CURRENT_RULE
;
if
(
pduel
->
game_field
->
core
.
duel_rule
==
MASTER_RULE3
)
{
pduel
->
game_field
->
player
[
0
].
szone_size
=
8
;
pduel
->
game_field
->
player
[
1
].
szone_size
=
8
;
}
return
0
;
}
int32_t
scriptlib
::
debug_reload_field_end
(
lua_State
*
L
)
{
...
...
Classes/ocgcore/ocgapi.cpp
View file @
57005175
...
...
@@ -70,13 +70,14 @@ extern "C" DECL_DLLEXPORT intptr_t create_duel(uint_fast32_t seed) {
}
extern
"C"
DECL_DLLEXPORT
void
start_duel
(
intptr_t
pduel
,
uint32_t
options
)
{
duel
*
pd
=
(
duel
*
)
pduel
;
pd
->
game_field
->
core
.
duel_options
|=
options
&
0xffff
;
int32_t
duel_rule
=
options
>>
16
;
uint16_t
duel_rule
=
options
>>
16
;
uint16_t
duel_options
=
options
&
0xffff
;
pd
->
game_field
->
core
.
duel_options
|=
duel_options
;
if
(
duel_rule
>=
1
&&
duel_rule
<=
CURRENT_RULE
)
pd
->
game_field
->
core
.
duel_rule
=
duel_rule
;
else
if
(
options
&
DUEL_OBSOLETE_RULING
)
//provide backward compatibility with replay
pd
->
game_field
->
core
.
duel_rule
=
1
;
else
if
(
pd
->
game_field
->
core
.
duel_rule
<
1
||
pd
->
game_field
->
core
.
duel_rule
>
CURRENT_RULE
)
pd
->
game_field
->
core
.
duel_rule
=
CURRENT_RULE
;
if
(
pd
->
game_field
->
core
.
duel_rule
==
MASTER_RULE3
)
{
pd
->
game_field
->
player
[
0
].
szone_size
=
8
;
...
...
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