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
85dd1986
You need to sign in or sign up before continuing.
Commit
85dd1986
authored
Jan 03, 2025
by
salix5
Committed by
GitHub
Jan 03, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ocgapi change: return LEN_FAIL if not exist (#701)
parent
1a0b7125
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
ocgapi.cpp
ocgapi.cpp
+5
-6
No files found.
ocgapi.cpp
View file @
85dd1986
...
@@ -192,7 +192,7 @@ extern "C" DECL_DLLEXPORT void new_tag_card(intptr_t pduel, uint32_t code, uint8
...
@@ -192,7 +192,7 @@ extern "C" DECL_DLLEXPORT void new_tag_card(intptr_t pduel, uint32_t code, uint8
}
}
/**
/**
* @brief Get card information.
* @brief Get card information.
* @param buf
u
int32_t array
* @param buf int32_t array
* @return buffer length in bytes
* @return buffer length in bytes
*/
*/
extern
"C"
DECL_DLLEXPORT
int32_t
query_card
(
intptr_t
pduel
,
uint8_t
playerid
,
uint8_t
location
,
uint8_t
sequence
,
int32_t
query_flag
,
byte
*
buf
,
int32_t
use_cache
)
{
extern
"C"
DECL_DLLEXPORT
int32_t
query_card
(
intptr_t
pduel
,
uint8_t
playerid
,
uint8_t
location
,
uint8_t
sequence
,
int32_t
query_flag
,
byte
*
buf
,
int32_t
use_cache
)
{
...
@@ -201,7 +201,7 @@ extern "C" DECL_DLLEXPORT int32_t query_card(intptr_t pduel, uint8_t playerid, u
...
@@ -201,7 +201,7 @@ extern "C" DECL_DLLEXPORT int32_t query_card(intptr_t pduel, uint8_t playerid, u
duel
*
ptduel
=
(
duel
*
)
pduel
;
duel
*
ptduel
=
(
duel
*
)
pduel
;
card
*
pcard
=
nullptr
;
card
*
pcard
=
nullptr
;
location
&=
0x7f
;
location
&=
0x7f
;
if
(
location
&
LOCATION_ONFIELD
)
if
(
location
==
LOCATION_MZONE
||
location
==
LOCATION_SZONE
)
pcard
=
ptduel
->
game_field
->
get_field_card
(
playerid
,
location
,
sequence
);
pcard
=
ptduel
->
game_field
->
get_field_card
(
playerid
,
location
,
sequence
);
else
{
else
{
card_vector
*
lst
=
nullptr
;
card_vector
*
lst
=
nullptr
;
...
@@ -217,9 +217,8 @@ extern "C" DECL_DLLEXPORT int32_t query_card(intptr_t pduel, uint8_t playerid, u
...
@@ -217,9 +217,8 @@ extern "C" DECL_DLLEXPORT int32_t query_card(intptr_t pduel, uint8_t playerid, u
lst
=
&
ptduel
->
game_field
->
player
[
playerid
].
list_main
;
lst
=
&
ptduel
->
game_field
->
player
[
playerid
].
list_main
;
else
else
return
LEN_FAIL
;
return
LEN_FAIL
;
if
(
sequence
>=
(
int32_t
)
lst
->
size
())
if
(
sequence
>=
(
int32_t
)
lst
->
size
())
pcard
=
nullptr
;
return
LEN_FAIL
;
else
pcard
=
(
*
lst
)[
sequence
];
pcard
=
(
*
lst
)[
sequence
];
}
}
if
(
pcard
)
{
if
(
pcard
)
{
...
...
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