Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
YGOPRO-520DIY
ygopro
Commits
be2229da
Commit
be2229da
authored
Jul 28, 2015
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua_tounsigned
parent
72c9b888
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+2
-2
ocgcore/libeffect.cpp
ocgcore/libeffect.cpp
+3
-3
No files found.
ocgcore/libcard.cpp
View file @
be2229da
...
@@ -512,7 +512,7 @@ int32 scriptlib::card_is_status(lua_State *L) {
...
@@ -512,7 +512,7 @@ int32 scriptlib::card_is_status(lua_State *L) {
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
tstatus
=
lua_to
integer
(
L
,
2
);
uint32
tstatus
=
lua_to
unsigned
(
L
,
2
);
if
(
pcard
->
status
&
tstatus
)
if
(
pcard
->
status
&
tstatus
)
lua_pushboolean
(
L
,
1
);
lua_pushboolean
(
L
,
1
);
else
else
...
@@ -536,7 +536,7 @@ int32 scriptlib::card_set_status(lua_State *L) {
...
@@ -536,7 +536,7 @@ int32 scriptlib::card_set_status(lua_State *L) {
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
if
(
pcard
->
status
&
STATUS_COPYING_EFFECT
)
if
(
pcard
->
status
&
STATUS_COPYING_EFFECT
)
return
0
;
return
0
;
uint32
tstatus
=
lua_to
integer
(
L
,
2
);
uint32
tstatus
=
lua_to
unsigned
(
L
,
2
);
int32
enable
=
lua_toboolean
(
L
,
3
);
int32
enable
=
lua_toboolean
(
L
,
3
);
pcard
->
set_status
(
tstatus
,
enable
);
pcard
->
set_status
(
tstatus
,
enable
);
return
0
;
return
0
;
...
...
ocgcore/libeffect.cpp
View file @
be2229da
...
@@ -188,7 +188,7 @@ int32 scriptlib::effect_set_property(lua_State *L) {
...
@@ -188,7 +188,7 @@ int32 scriptlib::effect_set_property(lua_State *L) {
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
int32
v
=
lua_tointeger
(
L
,
2
);
uint32
v
=
lua_tounsigned
(
L
,
2
);
peffect
->
flag
|=
v
&
0xfffffff0
;
peffect
->
flag
|=
v
&
0xfffffff0
;
return
0
;
return
0
;
}
}
...
@@ -340,7 +340,7 @@ int32 scriptlib::effect_get_property(lua_State *L) {
...
@@ -340,7 +340,7 @@ int32 scriptlib::effect_get_property(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
if
(
peffect
)
{
if
(
peffect
)
{
lua_push
integer
(
L
,
peffect
->
flag
);
lua_push
unsigned
(
L
,
peffect
->
flag
);
return
1
;
return
1
;
}
}
return
0
;
return
0
;
...
@@ -488,7 +488,7 @@ int32 scriptlib::effect_is_has_property(lua_State *L) {
...
@@ -488,7 +488,7 @@ int32 scriptlib::effect_is_has_property(lua_State *L) {
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
uint32
tflag
=
lua_to
integer
(
L
,
2
);
uint32
tflag
=
lua_to
unsigned
(
L
,
2
);
if
(
peffect
&&
(
peffect
->
flag
&
tflag
))
if
(
peffect
&&
(
peffect
->
flag
&
tflag
))
lua_pushboolean
(
L
,
1
);
lua_pushboolean
(
L
,
1
);
else
else
...
...
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