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
2c6c0589
Commit
2c6c0589
authored
Sep 04, 2021
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fix
parent
b1cc5c18
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
22 deletions
+22
-22
common.h
common.h
+1
-0
interpreter.cpp
interpreter.cpp
+5
-5
ocgapi.h
ocgapi.h
+16
-17
No files found.
common.h
View file @
2c6c0589
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#ifndef COMMON_H_
#ifndef COMMON_H_
#define COMMON_H_
#define COMMON_H_
#include <cstdint>
typedef
unsigned
long
long
uint64
;
typedef
unsigned
long
long
uint64
;
typedef
unsigned
int
uint32
;
typedef
unsigned
int
uint32
;
typedef
unsigned
short
uint16
;
typedef
unsigned
short
uint16
;
...
...
interpreter.cpp
View file @
2c6c0589
...
@@ -184,13 +184,13 @@ void interpreter::push_param(lua_State* L, bool is_coroutine) {
...
@@ -184,13 +184,13 @@ void interpreter::push_param(lua_State* L, bool is_coroutine) {
uint32
type
=
it
.
second
;
uint32
type
=
it
.
second
;
switch
(
type
)
{
switch
(
type
)
{
case
PARAM_TYPE_INT
:
case
PARAM_TYPE_INT
:
lua_pushinteger
(
L
,
(
size_t
)
it
.
first
);
lua_pushinteger
(
L
,
(
lua_Integer
)
it
.
first
);
break
;
break
;
case
PARAM_TYPE_STRING
:
case
PARAM_TYPE_STRING
:
lua_pushstring
(
L
,
(
const
char
*
)
it
.
first
);
lua_pushstring
(
L
,
(
const
char
*
)
it
.
first
);
break
;
break
;
case
PARAM_TYPE_BOOLEAN
:
case
PARAM_TYPE_BOOLEAN
:
lua_pushboolean
(
L
,
(
size_t
)
it
.
first
);
lua_pushboolean
(
L
,
(
int32
)
it
.
first
);
break
;
break
;
case
PARAM_TYPE_CARD
:
{
case
PARAM_TYPE_CARD
:
{
if
(
it
.
first
)
if
(
it
.
first
)
...
@@ -214,11 +214,11 @@ void interpreter::push_param(lua_State* L, bool is_coroutine) {
...
@@ -214,11 +214,11 @@ void interpreter::push_param(lua_State* L, bool is_coroutine) {
break
;
break
;
}
}
case
PARAM_TYPE_FUNCTION
:
{
case
PARAM_TYPE_FUNCTION
:
{
function2value
(
L
,
(
size_t
)
it
.
first
);
function2value
(
L
,
(
int32
)
it
.
first
);
break
;
break
;
}
}
case
PARAM_TYPE_INDEX
:
{
case
PARAM_TYPE_INDEX
:
{
int32
index
=
(
size_t
)
it
.
first
;
int32
index
=
(
int32
)
it
.
first
;
if
(
index
>
0
)
if
(
index
>
0
)
lua_pushvalue
(
L
,
index
);
lua_pushvalue
(
L
,
index
);
else
if
(
is_coroutine
)
{
else
if
(
is_coroutine
)
{
...
...
ocgapi.h
View file @
2c6c0589
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
#define OCGAPI_H_
#define OCGAPI_H_
#include "common.h"
#include "common.h"
#include <cstdint>
#ifdef WIN32
#ifdef WIN32
#define DECL_DLLEXPORT __declspec(dllexport)
#define DECL_DLLEXPORT __declspec(dllexport)
...
@@ -36,22 +35,22 @@ byte* read_script(const char* script_name, int* len);
...
@@ -36,22 +35,22 @@ byte* read_script(const char* script_name, int* len);
uint32
read_card
(
uint32
code
,
card_data
*
data
);
uint32
read_card
(
uint32
code
,
card_data
*
data
);
uint32
handle_message
(
void
*
pduel
,
uint32
message_type
);
uint32
handle_message
(
void
*
pduel
,
uint32
message_type
);
extern
"C"
DECL_DLLEXPORT
std
::
intptr_t
create_duel
(
uint32
seed
);
extern
"C"
DECL_DLLEXPORT
intptr_t
create_duel
(
uint32
seed
);
extern
"C"
DECL_DLLEXPORT
void
start_duel
(
std
::
intptr_t
pduel
,
int32
options
);
extern
"C"
DECL_DLLEXPORT
void
start_duel
(
intptr_t
pduel
,
int32
options
);
extern
"C"
DECL_DLLEXPORT
void
end_duel
(
std
::
intptr_t
pduel
);
extern
"C"
DECL_DLLEXPORT
void
end_duel
(
intptr_t
pduel
);
extern
"C"
DECL_DLLEXPORT
void
set_player_info
(
std
::
intptr_t
pduel
,
int32
playerid
,
int32
lp
,
int32
startcount
,
int32
drawcount
);
extern
"C"
DECL_DLLEXPORT
void
set_player_info
(
intptr_t
pduel
,
int32
playerid
,
int32
lp
,
int32
startcount
,
int32
drawcount
);
extern
"C"
DECL_DLLEXPORT
void
get_log_message
(
std
::
intptr_t
pduel
,
byte
*
buf
);
extern
"C"
DECL_DLLEXPORT
void
get_log_message
(
intptr_t
pduel
,
byte
*
buf
);
extern
"C"
DECL_DLLEXPORT
int32
get_message
(
std
::
intptr_t
pduel
,
byte
*
buf
);
extern
"C"
DECL_DLLEXPORT
int32
get_message
(
intptr_t
pduel
,
byte
*
buf
);
extern
"C"
DECL_DLLEXPORT
int32
process
(
std
::
intptr_t
pduel
);
extern
"C"
DECL_DLLEXPORT
int32
process
(
intptr_t
pduel
);
extern
"C"
DECL_DLLEXPORT
void
new_card
(
std
::
intptr_t
pduel
,
uint32
code
,
uint8
owner
,
uint8
playerid
,
uint8
location
,
uint8
sequence
,
uint8
position
);
extern
"C"
DECL_DLLEXPORT
void
new_card
(
intptr_t
pduel
,
uint32
code
,
uint8
owner
,
uint8
playerid
,
uint8
location
,
uint8
sequence
,
uint8
position
);
extern
"C"
DECL_DLLEXPORT
void
new_tag_card
(
std
::
intptr_t
pduel
,
uint32
code
,
uint8
owner
,
uint8
location
);
extern
"C"
DECL_DLLEXPORT
void
new_tag_card
(
intptr_t
pduel
,
uint32
code
,
uint8
owner
,
uint8
location
);
extern
"C"
DECL_DLLEXPORT
int32
query_card
(
std
::
intptr_t
pduel
,
uint8
playerid
,
uint8
location
,
uint8
sequence
,
int32
query_flag
,
byte
*
buf
,
int32
use_cache
);
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
(
std
::
intptr_t
pduel
,
uint8
playerid
,
uint8
location
);
extern
"C"
DECL_DLLEXPORT
int32
query_field_count
(
intptr_t
pduel
,
uint8
playerid
,
uint8
location
);
extern
"C"
DECL_DLLEXPORT
int32
query_field_card
(
std
::
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
,
int32
query_flag
,
byte
*
buf
,
int32
use_cache
);
extern
"C"
DECL_DLLEXPORT
int32
query_field_info
(
std
::
intptr_t
pduel
,
byte
*
buf
);
extern
"C"
DECL_DLLEXPORT
int32
query_field_info
(
intptr_t
pduel
,
byte
*
buf
);
extern
"C"
DECL_DLLEXPORT
void
set_responsei
(
std
::
intptr_t
pduel
,
int32
value
);
extern
"C"
DECL_DLLEXPORT
void
set_responsei
(
intptr_t
pduel
,
int32
value
);
extern
"C"
DECL_DLLEXPORT
void
set_responseb
(
std
::
intptr_t
pduel
,
byte
*
buf
);
extern
"C"
DECL_DLLEXPORT
void
set_responseb
(
intptr_t
pduel
,
byte
*
buf
);
extern
"C"
DECL_DLLEXPORT
int32
preload_script
(
std
::
intptr_t
pduel
,
const
char
*
script
,
int32
len
);
extern
"C"
DECL_DLLEXPORT
int32
preload_script
(
intptr_t
pduel
,
const
char
*
script
,
int32
len
);
byte
*
default_script_reader
(
const
char
*
script_name
,
int
*
len
);
byte
*
default_script_reader
(
const
char
*
script_name
,
int
*
len
);
uint32
default_card_reader
(
uint32
code
,
card_data
*
data
);
uint32
default_card_reader
(
uint32
code
,
card_data
*
data
);
uint32
default_message_handler
(
void
*
pduel
,
uint32
msg_type
);
uint32
default_message_handler
(
void
*
pduel
,
uint32
msg_type
);
...
...
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