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
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
MyCard
ygopro-core
Commits
82f7fd2f
Commit
82f7fd2f
authored
Sep 01, 2018
by
DailyShana
Committed by
nanahira
Sep 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update query_field_info (#183)
parent
7c6190ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
+28
-28
ocgapi.cpp
ocgapi.cpp
+28
-28
No files found.
ocgapi.cpp
View file @
82f7fd2f
...
@@ -287,52 +287,52 @@ extern "C" DECL_DLLEXPORT int32 query_field_card(ptr pduel, uint8 playerid, uint
...
@@ -287,52 +287,52 @@ extern "C" DECL_DLLEXPORT int32 query_field_card(ptr pduel, uint8 playerid, uint
extern
"C"
DECL_DLLEXPORT
int32
query_field_info
(
ptr
pduel
,
byte
*
buf
)
{
extern
"C"
DECL_DLLEXPORT
int32
query_field_info
(
ptr
pduel
,
byte
*
buf
)
{
duel
*
ptduel
=
(
duel
*
)
pduel
;
duel
*
ptduel
=
(
duel
*
)
pduel
;
byte
*
p
=
buf
;
byte
*
p
=
buf
;
*
buf
++
=
MSG_RELOAD_FIELD
;
*
p
++
=
MSG_RELOAD_FIELD
;
*
buf
++
=
ptduel
->
game_field
->
core
.
duel_rule
;
*
p
++
=
ptduel
->
game_field
->
core
.
duel_rule
;
for
(
int
playerid
=
0
;
playerid
<
2
;
++
playerid
)
{
for
(
int
playerid
=
0
;
playerid
<
2
;
++
playerid
)
{
auto
&
player
=
ptduel
->
game_field
->
player
[
playerid
];
auto
&
player
=
ptduel
->
game_field
->
player
[
playerid
];
*
((
int
*
)
buf
)
=
player
.
lp
;
*
((
int
*
)
p
)
=
player
.
lp
;
buf
+=
4
;
p
+=
4
;
for
(
auto
cit
=
player
.
list_mzone
.
begin
();
cit
!=
player
.
list_mzone
.
end
();
++
cit
)
{
for
(
auto
cit
=
player
.
list_mzone
.
begin
();
cit
!=
player
.
list_mzone
.
end
();
++
cit
)
{
card
*
pcard
=
*
cit
;
card
*
pcard
=
*
cit
;
if
(
pcard
)
{
if
(
pcard
)
{
*
buf
++
=
1
;
*
p
++
=
1
;
*
buf
++
=
pcard
->
current
.
position
;
*
p
++
=
pcard
->
current
.
position
;
*
buf
++
=
pcard
->
xyz_materials
.
size
();
*
p
++
=
pcard
->
xyz_materials
.
size
();
}
else
{
}
else
{
*
buf
++
=
0
;
*
p
++
=
0
;
}
}
}
}
for
(
auto
cit
=
player
.
list_szone
.
begin
();
cit
!=
player
.
list_szone
.
end
();
++
cit
)
{
for
(
auto
cit
=
player
.
list_szone
.
begin
();
cit
!=
player
.
list_szone
.
end
();
++
cit
)
{
card
*
pcard
=
*
cit
;
card
*
pcard
=
*
cit
;
if
(
pcard
)
{
if
(
pcard
)
{
*
buf
++
=
1
;
*
p
++
=
1
;
*
buf
++
=
pcard
->
current
.
position
;
*
p
++
=
pcard
->
current
.
position
;
}
else
{
}
else
{
*
buf
++
=
0
;
*
p
++
=
0
;
}
}
}
}
*
buf
++
=
player
.
list_main
.
size
();
*
p
++
=
player
.
list_main
.
size
();
*
buf
++
=
player
.
list_hand
.
size
();
*
p
++
=
player
.
list_hand
.
size
();
*
buf
++
=
player
.
list_grave
.
size
();
*
p
++
=
player
.
list_grave
.
size
();
*
buf
++
=
player
.
list_remove
.
size
();
*
p
++
=
player
.
list_remove
.
size
();
*
buf
++
=
player
.
list_extra
.
size
();
*
p
++
=
player
.
list_extra
.
size
();
*
buf
++
=
player
.
extra_p_count
;
*
p
++
=
player
.
extra_p_count
;
}
}
*
buf
++
=
ptduel
->
game_field
->
core
.
current_chain
.
size
();
*
p
++
=
ptduel
->
game_field
->
core
.
current_chain
.
size
();
for
(
auto
chit
=
ptduel
->
game_field
->
core
.
current_chain
.
begin
();
chit
!=
ptduel
->
game_field
->
core
.
current_chain
.
end
();
++
chit
)
{
for
(
auto
chit
=
ptduel
->
game_field
->
core
.
current_chain
.
begin
();
chit
!=
ptduel
->
game_field
->
core
.
current_chain
.
end
();
++
chit
)
{
effect
*
peffect
=
chit
->
triggering_effect
;
effect
*
peffect
=
chit
->
triggering_effect
;
*
((
int
*
)
buf
)
=
peffect
->
get_handler
()
->
data
.
code
;
*
((
int
*
)
p
)
=
peffect
->
get_handler
()
->
data
.
code
;
buf
+=
4
;
p
+=
4
;
*
((
int
*
)
buf
)
=
peffect
->
get_handler
()
->
get_info_location
();
*
((
int
*
)
p
)
=
peffect
->
get_handler
()
->
get_info_location
();
buf
+=
4
;
p
+=
4
;
*
buf
++
=
chit
->
triggering_controler
;
*
p
++
=
chit
->
triggering_controler
;
*
buf
++
=
(
uint8
)
chit
->
triggering_location
;
*
p
++
=
(
uint8
)
chit
->
triggering_location
;
*
buf
++
=
chit
->
triggering_sequence
;
*
p
++
=
chit
->
triggering_sequence
;
*
((
int
*
)
buf
)
=
peffect
->
description
;
*
((
int
*
)
p
)
=
peffect
->
description
;
buf
+=
4
;
p
+=
4
;
}
}
return
(
int32
)(
buf
-
p
);
return
(
int32
)(
p
-
buf
);
}
}
extern
"C"
DECL_DLLEXPORT
void
set_responsei
(
ptr
pduel
,
int32
value
)
{
extern
"C"
DECL_DLLEXPORT
void
set_responsei
(
ptr
pduel
,
int32
value
)
{
((
duel
*
)
pduel
)
->
set_responsei
(
value
);
((
duel
*
)
pduel
)
->
set_responsei
(
value
);
...
...
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