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
4f0639dd
Commit
4f0639dd
authored
Dec 14, 2023
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add LEN_EMPTY
parent
f54ccda2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
card.cpp
card.cpp
+1
-0
ocgapi.cpp
ocgapi.cpp
+6
-6
ocgapi.h
ocgapi.h
+2
-0
No files found.
card.cpp
View file @
4f0639dd
...
...
@@ -141,6 +141,7 @@ int32 card::get_infos(byte* buf, uint32 query_flag, int32 use_cache) {
if
((
query_flag
&
QUERY_BASE_ATTACK
)
||
(
query_flag
&
QUERY_BASE_DEFENSE
))
{
base_atk_def
=
get_base_atk_def
();
}
//first 8 bytes: data length, query flag
p
+=
2
;
if
(
query_flag
&
QUERY_CODE
)
{
*
p
=
data
.
code
;
...
...
ocgapi.cpp
View file @
4f0639dd
...
...
@@ -204,8 +204,8 @@ extern "C" DECL_DLLEXPORT int32 query_card(intptr_t pduel, uint8 playerid, uint8
return
pcard
->
get_infos
(
buf
,
query_flag
,
use_cache
);
}
else
{
*
((
int32
*
)
buf
)
=
4
;
return
4
;
*
((
int32
*
)
buf
)
=
LEN_EMPTY
;
return
LEN_EMPTY
;
}
}
extern
"C"
DECL_DLLEXPORT
int32
query_field_count
(
intptr_t
pduel
,
uint8
playerid
,
uint8
location
)
{
...
...
@@ -251,8 +251,8 @@ extern "C" DECL_DLLEXPORT int32 query_field_card(intptr_t pduel, uint8 playerid,
int32
clen
=
pcard
->
get_infos
(
p
,
query_flag
,
use_cache
);
p
+=
clen
;
}
else
{
*
((
int32
*
)
p
)
=
4
;
p
+=
4
;
*
((
int32
*
)
p
)
=
LEN_EMPTY
;
p
+=
LEN_EMPTY
;
}
}
}
...
...
@@ -262,8 +262,8 @@ extern "C" DECL_DLLEXPORT int32 query_field_card(intptr_t pduel, uint8 playerid,
int32
clen
=
pcard
->
get_infos
(
p
,
query_flag
,
use_cache
);
p
+=
clen
;
}
else
{
*
((
int32
*
)
p
)
=
4
;
p
+=
4
;
*
((
int32
*
)
p
)
=
LEN_EMPTY
;
p
+=
LEN_EMPTY
;
}
}
}
...
...
ocgapi.h
View file @
4f0639dd
...
...
@@ -16,6 +16,8 @@
#define DECL_DLLEXPORT
#endif
#define LEN_EMPTY 4
class
card
;
struct
card_data
;
struct
card_info
;
...
...
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