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
3ca0ac3b
Commit
3ca0ac3b
authored
Dec 08, 2023
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update signature of query_field_card()
bit field: uint32 offset: int32
parent
23b9ae8d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
card.cpp
card.cpp
+7
-4
card.h
card.h
+1
-1
ocgapi.cpp
ocgapi.cpp
+4
-4
ocgapi.h
ocgapi.h
+1
-1
No files found.
card.cpp
View file @
3ca0ac3b
...
...
@@ -121,7 +121,7 @@ card::card(duel* pd) {
spsummon_code
=
0
;
current
.
controler
=
PLAYER_NONE
;
}
uint32
card
::
get_infos
(
byte
*
buf
,
int32
query_flag
,
int32
use_cache
)
{
int32
card
::
get_infos
(
byte
*
buf
,
u
int32
query_flag
,
int32
use_cache
)
{
int32
*
p
=
(
int32
*
)
buf
;
int32
tdata
=
0
;
std
::
pair
<
int32
,
int32
>
atk_def
(
-
10
,
-
10
);
...
...
@@ -256,9 +256,12 @@ uint32 card::get_infos(byte* buf, int32 query_flag, int32 use_cache) {
}
else
query_flag
&=
~
QUERY_LINK
;
}
}
*
(
uint32
*
)
buf
=
(
uint32
)((
byte
*
)
p
-
buf
);
*
(
uint32
*
)(
buf
+
4
)
=
query_flag
;
return
(
uint32
)((
byte
*
)
p
-
buf
);
int32
*
finalize
=
(
int32
*
)
buf
;
*
finalize
=
(
byte
*
)
p
-
buf
;
++
finalize
;
*
finalize
=
query_flag
;
++
finalize
;
return
(
byte
*
)
p
-
buf
;
}
uint32
card
::
get_info_location
()
{
if
(
overlay_target
)
{
...
...
card.h
View file @
3ca0ac3b
...
...
@@ -217,7 +217,7 @@ public:
static
bool
card_operation_sort
(
card
*
c1
,
card
*
c2
);
const
bool
is_extra_deck_monster
()
{
return
!!
(
data
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
));
}
uint32
get_infos
(
byte
*
buf
,
int32
query_flag
,
int32
use_cache
=
TRUE
);
int32
get_infos
(
byte
*
buf
,
u
int32
query_flag
,
int32
use_cache
=
TRUE
);
uint32
get_info_location
();
uint32
second_code
(
uint32
code
);
uint32
get_code
();
...
...
ocgapi.cpp
View file @
3ca0ac3b
...
...
@@ -238,7 +238,7 @@ extern "C" DECL_DLLEXPORT int32 query_field_count(intptr_t pduel, uint8 playerid
}
return
0
;
}
extern
"C"
DECL_DLLEXPORT
int32
query_field_card
(
intptr_t
pduel
,
uint8
playerid
,
uint8
location
,
int32
query_flag
,
byte
*
buf
,
int32
use_cache
)
{
extern
"C"
DECL_DLLEXPORT
int32
query_field_card
(
intptr_t
pduel
,
uint8
playerid
,
uint8
location
,
u
int32
query_flag
,
byte
*
buf
,
int32
use_cache
)
{
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
duel
*
ptduel
=
(
duel
*
)
pduel
;
...
...
@@ -247,7 +247,7 @@ extern "C" DECL_DLLEXPORT int32 query_field_card(intptr_t pduel, uint8 playerid,
if
(
location
==
LOCATION_MZONE
)
{
for
(
auto
&
pcard
:
player
.
list_mzone
)
{
if
(
pcard
)
{
u
int32
clen
=
pcard
->
get_infos
(
p
,
query_flag
,
use_cache
);
int32
clen
=
pcard
->
get_infos
(
p
,
query_flag
,
use_cache
);
p
+=
clen
;
}
else
{
*
((
int32
*
)
p
)
=
4
;
...
...
@@ -258,7 +258,7 @@ extern "C" DECL_DLLEXPORT int32 query_field_card(intptr_t pduel, uint8 playerid,
else
if
(
location
==
LOCATION_SZONE
)
{
for
(
auto
&
pcard
:
player
.
list_szone
)
{
if
(
pcard
)
{
u
int32
clen
=
pcard
->
get_infos
(
p
,
query_flag
,
use_cache
);
int32
clen
=
pcard
->
get_infos
(
p
,
query_flag
,
use_cache
);
p
+=
clen
;
}
else
{
*
((
int32
*
)
p
)
=
4
;
...
...
@@ -281,7 +281,7 @@ extern "C" DECL_DLLEXPORT int32 query_field_card(intptr_t pduel, uint8 playerid,
else
return
0
;
for
(
auto
&
pcard
:
*
lst
)
{
u
int32
clen
=
pcard
->
get_infos
(
p
,
query_flag
,
use_cache
);
int32
clen
=
pcard
->
get_infos
(
p
,
query_flag
,
use_cache
);
p
+=
clen
;
}
}
...
...
ocgapi.h
View file @
3ca0ac3b
...
...
@@ -46,7 +46,7 @@ extern "C" DECL_DLLEXPORT void new_card(intptr_t pduel, uint32 code, uint8 owner
extern
"C"
DECL_DLLEXPORT
void
new_tag_card
(
intptr_t
pduel
,
uint32
code
,
uint8
owner
,
uint8
location
);
extern
"C"
DECL_DLLEXPORT
int32
query_card
(
intptr_t
pduel
,
uint8
playerid
,
uint8
location
,
uint8
sequence
,
int32
query_flag
,
byte
*
buf
,
int32
use_cache
);
extern
"C"
DECL_DLLEXPORT
int32
query_field_count
(
intptr_t
pduel
,
uint8
playerid
,
uint8
location
);
extern
"C"
DECL_DLLEXPORT
int32
query_field_card
(
intptr_t
pduel
,
uint8
playerid
,
uint8
location
,
int32
query_flag
,
byte
*
buf
,
int32
use_cache
);
extern
"C"
DECL_DLLEXPORT
int32
query_field_card
(
intptr_t
pduel
,
uint8
playerid
,
uint8
location
,
u
int32
query_flag
,
byte
*
buf
,
int32
use_cache
);
extern
"C"
DECL_DLLEXPORT
int32
query_field_info
(
intptr_t
pduel
,
byte
*
buf
);
extern
"C"
DECL_DLLEXPORT
void
set_responsei
(
intptr_t
pduel
,
int32
value
);
extern
"C"
DECL_DLLEXPORT
void
set_responseb
(
intptr_t
pduel
,
byte
*
buf
);
...
...
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