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
a9685da8
Commit
a9685da8
authored
Feb 10, 2025
by
Chen Bill
Committed by
GitHub
Feb 10, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix core.duel_rule in start_duel() (#725)
parent
6812551e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
ocgapi.cpp
ocgapi.cpp
+4
-3
No files found.
ocgapi.cpp
View file @
a9685da8
...
@@ -70,13 +70,14 @@ extern "C" DECL_DLLEXPORT intptr_t create_duel(uint_fast32_t seed) {
...
@@ -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
)
{
extern
"C"
DECL_DLLEXPORT
void
start_duel
(
intptr_t
pduel
,
uint32_t
options
)
{
duel
*
pd
=
(
duel
*
)
pduel
;
duel
*
pd
=
(
duel
*
)
pduel
;
pd
->
game_field
->
core
.
duel_options
|=
options
&
0xffff
;
uint16_t
duel_rule
=
options
>>
16
;
int32_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
)
if
(
duel_rule
>=
1
&&
duel_rule
<=
CURRENT_RULE
)
pd
->
game_field
->
core
.
duel_rule
=
duel_rule
;
pd
->
game_field
->
core
.
duel_rule
=
duel_rule
;
else
if
(
options
&
DUEL_OBSOLETE_RULING
)
//provide backward compatibility with replay
else
if
(
options
&
DUEL_OBSOLETE_RULING
)
//provide backward compatibility with replay
pd
->
game_field
->
core
.
duel_rule
=
1
;
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
;
pd
->
game_field
->
core
.
duel_rule
=
CURRENT_RULE
;
if
(
pd
->
game_field
->
core
.
duel_rule
==
MASTER_RULE3
)
{
if
(
pd
->
game_field
->
core
.
duel_rule
==
MASTER_RULE3
)
{
pd
->
game_field
->
player
[
0
].
szone_size
=
8
;
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