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
689d6d30
Commit
689d6d30
authored
Dec 21, 2024
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/patch-ocgapi' into develop
parents
36a90517
21c0b914
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
.github/workflows/build.yml
.github/workflows/build.yml
+6
-7
.gitignore
.gitignore
+5
-3
ocgapi.cpp
ocgapi.cpp
+5
-6
No files found.
.github/workflows/build.yml
View file @
689d6d30
...
@@ -18,17 +18,16 @@ jobs:
...
@@ -18,17 +18,16 @@ jobs:
-
name
:
Install lua
-
name
:
Install lua
run
:
|
run
:
|
bash -c "curl -
-retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://www.lua.org/ftp/lua-5.4.7.tar.gz
; exit 0"
bash -c "curl -
Z --retry 5 --connect-timeout 30 --location --create-dirs --output-dir temp --remote-name-all https://www.lua.org/ftp/lua-5.4.7.tar.gz https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-windows.zip
; exit 0"
tar
xzf
lua-5.4.7.tar.gz
tar
-xzf temp/
lua-5.4.7.tar.gz
move lua-5.4.7 lua
move lua-5.4.7 lua
-
name
:
Premake
-
name
:
Premake
run
:
|
run
:
|
bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-windows.zip ; exit 0"
7z x temp/premake-5.0.0-beta2-windows.zip -opremake-5
7z x premake-5.0.0-beta2-windows.zip
move premake/lua.lua lua/premake5.lua
move premake\lua.lua lua\premake5.lua
move premake/dll.lua dll.lua
move premake\dll.lua dll.lua
./premake-5/premake5.exe vs2022 --file=dll.lua
.\premake5.exe vs2022 --file=dll.lua
-
name
:
Add msbuild to PATH
-
name
:
Add msbuild to PATH
uses
:
microsoft/setup-msbuild@v2
uses
:
microsoft/setup-msbuild@v2
...
...
.gitignore
View file @
689d6d30
.vscode/
/.vscode/
/build/
/lua/
/temp/
/premake-5/
/premake5.exe
/premake5.exe
/build
/lua
ocgapi.cpp
View file @
689d6d30
...
@@ -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