Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOProUnity_V2
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
perfectdicky
YGOProUnity_V2
Commits
4c839e7f
Commit
4c839e7f
authored
Aug 28, 2021
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean abuse of ptr/int32, support 64-bit environment.
parent
fa1036f1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
12 deletions
+12
-12
AI_core_vs2017solution/ocgcore/common.h
AI_core_vs2017solution/ocgcore/common.h
+2
-2
AI_core_vs2017solution/ocgcore/field.h
AI_core_vs2017solution/ocgcore/field.h
+6
-6
AI_core_vs2017solution/ocgcore/interpreter.cpp
AI_core_vs2017solution/ocgcore/interpreter.cpp
+2
-2
AI_core_vs2017solution/ocgcore/interpreter.h
AI_core_vs2017solution/ocgcore/interpreter.h
+1
-1
AI_core_vs2017solution/ocgcore/processor.cpp
AI_core_vs2017solution/ocgcore/processor.cpp
+1
-1
No files found.
AI_core_vs2017solution/ocgcore/common.h
View file @
4c839e7f
...
...
@@ -8,13 +8,13 @@
#ifndef COMMON_H_
#define COMMON_H_
typedef
unsigned
long
uptr
;
typedef
void
*
uptr
;
typedef
unsigned
long
long
uint64
;
typedef
unsigned
int
uint32
;
typedef
unsigned
short
uint16
;
typedef
unsigned
char
uint8
;
typedef
unsigned
char
byte
;
typedef
long
ptr
;
typedef
void
*
ptr
;
typedef
long
long
int64
;
typedef
int
int32
;
typedef
short
int16
;
...
...
AI_core_vs2017solution/ocgcore/field.h
View file @
4c839e7f
...
...
@@ -156,10 +156,10 @@ struct processor_unit {
uint16
step
;
effect
*
peffect
;
group
*
ptarget
;
ptr
arg1
;
ptr
arg2
;
ptr
arg3
;
ptr
arg4
;
int32
arg1
;
int32
arg2
;
int32
arg3
;
int32
arg4
;
void
*
ptr1
;
void
*
ptr2
;
...
...
@@ -266,7 +266,7 @@ struct processor {
std
::
unordered_map
<
uint32
,
uint32
>
spsummon_once_map
[
2
];
std
::
multimap
<
int32
,
card
*
,
std
::
greater
<
int32
>>
xmaterial_lst
;
ptr
temp_var
[
4
];
int32
temp_var
[
4
];
uint32
global_flag
;
uint16
pre_field
[
2
];
std
::
set
<
uint16
>
opp_mzone
;
...
...
@@ -522,7 +522,7 @@ public:
int32
check_spself_from_hand_trigger
(
const
chain
&
ch
)
const
;
int32
is_able_to_enter_bp
();
void
add_process
(
uint16
type
,
uint16
step
,
effect
*
peffect
,
group
*
target
,
ptr
arg1
,
ptr
arg2
,
ptr
arg3
=
0
,
ptr
arg4
=
0
,
void
*
ptr1
=
NULL
,
void
*
ptr2
=
NULL
);
void
add_process
(
uint16
type
,
uint16
step
,
effect
*
peffect
,
group
*
target
,
int32
arg1
,
int32
arg2
,
int32
arg3
=
0
,
int32
arg4
=
0
,
void
*
ptr1
=
NULL
,
void
*
ptr2
=
NULL
);
int32
process
();
int32
execute_cost
(
uint16
step
,
effect
*
peffect
,
uint8
triggering_player
);
int32
execute_operation
(
uint16
step
,
effect
*
peffect
,
uint8
triggering_player
);
...
...
AI_core_vs2017solution/ocgcore/interpreter.cpp
View file @
4c839e7f
...
...
@@ -171,7 +171,7 @@ void interpreter::add_param(void *param, int32 type, bool front) {
else
params
.
emplace_back
(
param
,
type
);
}
void
interpreter
::
add_param
(
ptr
param
,
int32
type
,
bool
front
)
{
void
interpreter
::
add_param
(
int32
param
,
int32
type
,
bool
front
)
{
if
(
front
)
params
.
emplace_front
((
void
*
)
param
,
type
);
else
...
...
@@ -184,7 +184,7 @@ void interpreter::push_param(lua_State* L, bool is_coroutine) {
uint32
type
=
it
.
second
;
switch
(
type
)
{
case
PARAM_TYPE_INT
:
lua_pushinteger
(
L
,
(
ptr
)
it
.
first
);
lua_pushinteger
(
L
,
(
int32
)
it
.
first
);
break
;
case
PARAM_TYPE_STRING
:
lua_pushstring
(
L
,
(
const
char
*
)
it
.
first
);
...
...
AI_core_vs2017solution/ocgcore/interpreter.h
View file @
4c839e7f
...
...
@@ -50,7 +50,7 @@ public:
int32
load_script
(
const
char
*
script_name
);
int32
load_card_script
(
uint32
code
);
void
add_param
(
void
*
param
,
int32
type
,
bool
front
=
false
);
void
add_param
(
ptr
param
,
int32
type
,
bool
front
=
false
);
void
add_param
(
int32
param
,
int32
type
,
bool
front
=
false
);
void
push_param
(
lua_State
*
L
,
bool
is_coroutine
=
false
);
int32
call_function
(
int32
f
,
uint32
param_count
,
int32
ret_count
);
int32
call_card_function
(
card
*
pcard
,
const
char
*
f
,
uint32
param_count
,
int32
ret_count
);
...
...
AI_core_vs2017solution/ocgcore/processor.cpp
View file @
4c839e7f
...
...
@@ -14,7 +14,7 @@
#include "ocgapi.h"
#include <iterator>
void
field
::
add_process
(
uint16
type
,
uint16
step
,
effect
*
peffect
,
group
*
target
,
ptr
arg1
,
ptr
arg2
,
ptr
arg3
,
ptr
arg4
,
void
*
ptr1
,
void
*
ptr2
)
{
void
field
::
add_process
(
uint16
type
,
uint16
step
,
effect
*
peffect
,
group
*
target
,
int32
arg1
,
int32
arg2
,
int32
arg3
,
int32
arg4
,
void
*
ptr1
,
void
*
ptr2
)
{
processor_unit
new_unit
;
new_unit
.
type
=
type
;
new_unit
.
step
=
step
;
...
...
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