Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
fallenstardust
YGOMobile
Commits
81224dd6
Commit
81224dd6
authored
Nov 02, 2018
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
1ccf21da
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
30 deletions
+45
-30
Classes/gframe/duelclient.cpp
Classes/gframe/duelclient.cpp
+11
-1
Classes/gframe/event_handler.cpp
Classes/gframe/event_handler.cpp
+25
-19
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+3
-3
Classes/gframe/game.h
Classes/gframe/game.h
+1
-0
Classes/ocgcore/operations.cpp
Classes/ocgcore/operations.cpp
+5
-7
No files found.
Classes/gframe/duelclient.cpp
View file @
81224dd6
...
@@ -2702,7 +2702,17 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2702,7 +2702,17 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
showcarddif
=
0
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcard
=
1
;
mainGame
->
showcard
=
1
;
pcard
->
is_highlighting
=
true
;
pcard
->
is_highlighting
=
true
;
mainGame
->
WaitFrameSignal
(
30
);
if
(
pcard
->
location
&
0x30
)
{
float
shift
=
-
0.15
f
;
if
(
cc
==
1
)
shift
=
0.15
f
;
pcard
->
dPos
=
irr
::
core
::
vector3df
(
shift
,
0
,
0
);
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
0
,
0
);
pcard
->
is_moving
=
true
;
pcard
->
aniFrame
=
5
;
mainGame
->
WaitFrameSignal
(
30
);
mainGame
->
dField
.
MoveCard
(
pcard
,
5
);
}
else
mainGame
->
WaitFrameSignal
(
30
);
pcard
->
is_highlighting
=
false
;
pcard
->
is_highlighting
=
false
;
mainGame
->
dField
.
current_chain
.
chain_card
=
pcard
;
mainGame
->
dField
.
current_chain
.
chain_card
=
pcard
;
mainGame
->
dField
.
current_chain
.
code
=
code
;
mainGame
->
dField
.
current_chain
.
code
=
code
;
...
...
Classes/gframe/event_handler.cpp
View file @
81224dd6
...
@@ -990,7 +990,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -990,7 +990,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
int
pos
=
mainGame
->
scrCardList
->
getPos
()
/
10
;
int
pos
=
mainGame
->
scrCardList
->
getPos
()
/
10
;
ClientCard
*
mcard
=
selectable_cards
[
id
-
BUTTON_CARD_0
+
pos
];
ClientCard
*
mcard
=
selectable_cards
[
id
-
BUTTON_CARD_0
+
pos
];
SetShowMark
(
mcard
,
true
);
SetShowMark
(
mcard
,
true
);
ShowCardInfoInList
(
mcard
,
mainGame
->
btnCardSelect
[
id
-
BUTTON_CARD_0
],
mainGame
->
wCardSelect
);
ShowCardInfoInList
(
mcard
,
mainGame
->
btnCardSelect
[
id
-
BUTTON_CARD_0
],
mainGame
->
wCardSelect
);
if
(
mcard
->
code
)
{
if
(
mcard
->
code
)
{
mainGame
->
ShowCardInfo
(
mcard
->
code
);
mainGame
->
ShowCardInfo
(
mcard
->
code
);
}
else
{
}
else
{
...
@@ -1001,30 +1001,36 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1001,30 +1001,36 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
int
pos
=
mainGame
->
scrDisplayList
->
getPos
()
/
10
;
int
pos
=
mainGame
->
scrDisplayList
->
getPos
()
/
10
;
ClientCard
*
mcard
=
display_cards
[
id
-
BUTTON_DISPLAY_0
+
pos
];
ClientCard
*
mcard
=
display_cards
[
id
-
BUTTON_DISPLAY_0
+
pos
];
SetShowMark
(
mcard
,
true
);
SetShowMark
(
mcard
,
true
);
ShowCardInfoInList
(
mcard
,
mainGame
->
btnCardDisplay
[
id
-
BUTTON_DISPLAY_0
],
mainGame
->
wCardDisplay
);
ShowCardInfoInList
(
mcard
,
mainGame
->
btnCardDisplay
[
id
-
BUTTON_DISPLAY_0
],
mainGame
->
wCardDisplay
);
if
(
mcard
->
code
)
{
if
(
mcard
->
code
)
{
mainGame
->
ShowCardInfo
(
mcard
->
code
);
mainGame
->
ShowCardInfo
(
mcard
->
code
);
}
else
{
}
else
{
mainGame
->
ClearCardInfo
(
mcard
->
controler
);
mainGame
->
ClearCardInfo
(
mcard
->
controler
);
}
}
}
}
if
(
id
==
TEXT_CARD_LIST_TIP
)
{
mainGame
->
stCardListTip
->
setVisible
(
true
);
}
break
;
break
;
}
}
case
irr
:
:
gui
::
EGET_ELEMENT_LEFT
:
{
case
irr
:
:
gui
::
EGET_ELEMENT_LEFT
:
{
if
(
id
>=
BUTTON_CARD_0
&&
id
<=
BUTTON_CARD_4
)
{
if
(
id
>=
BUTTON_CARD_0
&&
id
<=
BUTTON_CARD_4
)
{
int
pos
=
mainGame
->
scrCardList
->
getPos
()
/
10
;
int
pos
=
mainGame
->
scrCardList
->
getPos
()
/
10
;
ClientCard
*
mcard
=
selectable_cards
[
id
-
BUTTON_CARD_0
+
pos
];
ClientCard
*
mcard
=
selectable_cards
[
id
-
BUTTON_CARD_0
+
pos
];
SetShowMark
(
mcard
,
false
);
SetShowMark
(
mcard
,
false
);
mainGame
->
stCardListTip
->
setVisible
(
false
);
mainGame
->
stCardListTip
->
setVisible
(
false
);
}
if
(
id
>=
BUTTON_DISPLAY_0
&&
id
<=
BUTTON_DISPLAY_4
)
{
int
pos
=
mainGame
->
scrDisplayList
->
getPos
()
/
10
;
ClientCard
*
mcard
=
display_cards
[
id
-
BUTTON_DISPLAY_0
+
pos
];
SetShowMark
(
mcard
,
false
);
mainGame
->
stCardListTip
->
setVisible
(
false
);
}
break
;
}
}
if
(
id
>=
BUTTON_DISPLAY_0
&&
id
<=
BUTTON_DISPLAY_4
)
{
int
pos
=
mainGame
->
scrDisplayList
->
getPos
()
/
10
;
ClientCard
*
mcard
=
display_cards
[
id
-
BUTTON_DISPLAY_0
+
pos
];
SetShowMark
(
mcard
,
false
);
mainGame
->
stCardListTip
->
setVisible
(
false
);
}
if
(
id
==
TEXT_CARD_LIST_TIP
)
{
mainGame
->
stCardListTip
->
setVisible
(
false
);
}
break
;
}
default:
default:
break
;
break
;
}
}
...
@@ -2264,10 +2270,10 @@ void ClientField::ShowCardInfoInList(ClientCard* pcard, irr::gui::IGUIElement* e
...
@@ -2264,10 +2270,10 @@ void ClientField::ShowCardInfoInList(ClientCard* pcard, irr::gui::IGUIElement* e
mainGame
->
SetStaticText
(
mainGame
->
stCardListTip
,
320
*
mainGame
->
xScale
,
mainGame
->
guiFont
,
str
.
c_str
());
mainGame
->
SetStaticText
(
mainGame
->
stCardListTip
,
320
*
mainGame
->
xScale
,
mainGame
->
guiFont
,
str
.
c_str
());
irr
::
core
::
dimension2d
<
unsigned
int
>
dTip
=
mainGame
->
guiFont
->
getDimension
(
mainGame
->
stCardListTip
->
getText
())
+
irr
::
core
::
dimension2d
<
unsigned
int
>
(
10
,
10
);
irr
::
core
::
dimension2d
<
unsigned
int
>
dTip
=
mainGame
->
guiFont
->
getDimension
(
mainGame
->
stCardListTip
->
getText
())
+
irr
::
core
::
dimension2d
<
unsigned
int
>
(
10
,
10
);
s32
w
=
dTip
.
Width
/
2
;
s32
w
=
dTip
.
Width
/
2
;
if
(
x
-
w
<
10
)
if
(
x
-
w
<
10
*
mainGame
->
xScale
)
x
=
w
+
10
;
x
=
w
+
10
*
mainGame
->
xScale
;
if
(
x
+
w
>
670
)
if
(
x
+
w
>
670
*
mainGame
->
xScale
)
x
=
670
-
w
;
x
=
670
*
mainGame
->
xScale
-
w
;
mainGame
->
stCardListTip
->
setRelativePosition
(
recti
(
x
-
dTip
.
Width
/
2
,
y
-
10
,
x
+
dTip
.
Width
/
2
,
y
-
10
+
dTip
.
Height
));
mainGame
->
stCardListTip
->
setRelativePosition
(
recti
(
x
-
dTip
.
Width
/
2
,
y
-
10
,
x
+
dTip
.
Width
/
2
,
y
-
10
+
dTip
.
Height
));
mainGame
->
stCardListTip
->
setVisible
(
true
);
mainGame
->
stCardListTip
->
setVisible
(
true
);
}
}
...
...
Classes/gframe/game.cpp
View file @
81224dd6
...
@@ -906,10 +906,10 @@ bool Game::Initialize() {
...
@@ -906,10 +906,10 @@ bool Game::Initialize() {
stTip
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
stTip
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
stTip
->
setVisible
(
false
);
stTip
->
setVisible
(
false
);
//tip for cards in select / display list
//tip for cards in select / display list
stCardListTip
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
0
,
0
,
150
*
xScale
,
150
*
yScale
),
false
,
true
,
wCardSelect
,
-
1
,
true
);
stCardListTip
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
0
,
0
,
150
,
150
),
false
,
true
,
wCardSelect
,
TEXT_CARD_LIST_TIP
,
true
);
stCardListTip
->
setBackgroundColor
(
0x6011113d
);
stCardListTip
->
setBackgroundColor
(
0x6011113d
);
stCardListTip
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
stCardListTip
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
stCardListTip
->
setVisible
(
false
);
stCardListTip
->
setVisible
(
false
);
device
->
setEventReceiver
(
&
menuHandler
);
device
->
setEventReceiver
(
&
menuHandler
);
LoadConfig
();
LoadConfig
();
env
->
getSkin
()
->
setFont
(
guiFont
);
env
->
getSkin
()
->
setFont
(
guiFont
);
...
...
Classes/gframe/game.h
View file @
81224dd6
...
@@ -571,6 +571,7 @@ extern Game* mainGame;
...
@@ -571,6 +571,7 @@ extern Game* mainGame;
#define BUTTON_CARD_4 234
#define BUTTON_CARD_4 234
#define SCROLL_CARD_SELECT 235
#define SCROLL_CARD_SELECT 235
#define BUTTON_CARD_SEL_OK 236
#define BUTTON_CARD_SEL_OK 236
#define TEXT_CARD_LIST_TIP 237
#define BUTTON_CMD_ACTIVATE 240
#define BUTTON_CMD_ACTIVATE 240
#define BUTTON_CMD_SUMMON 241
#define BUTTON_CMD_SUMMON 241
#define BUTTON_CMD_SPSUMMON 242
#define BUTTON_CMD_SPSUMMON 242
...
...
Classes/ocgcore/operations.cpp
View file @
81224dd6
...
@@ -2538,12 +2538,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
...
@@ -2538,12 +2538,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
case
3
:
{
case
3
:
{
effect
*
peffect
=
core
.
units
.
begin
()
->
peffect
;
effect
*
peffect
=
core
.
units
.
begin
()
->
peffect
;
target
->
material_cards
.
clear
();
target
->
material_cards
.
clear
();
std
::
vector
<
int32
>
retval
;
peffect
->
get_value
(
target
,
0
,
&
retval
);
uint32
summon_info
=
retval
.
size
()
>
0
?
retval
[
0
]
:
0
;
uint32
zone
=
retval
.
size
()
>
1
?
retval
[
1
]
:
0xff
;
core
.
units
.
begin
()
->
arg3
=
zone
;
target
->
summon_info
=
(
summon_info
&
0xf00ffff
)
|
SUMMON_TYPE_SPECIAL
|
((
uint32
)
target
->
current
.
location
<<
16
);
if
(
peffect
->
operation
)
{
if
(
peffect
->
operation
)
{
pduel
->
lua
->
add_param
(
target
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
target
,
PARAM_TYPE_CARD
);
if
(
core
.
limit_tuner
||
core
.
limit_syn
)
{
if
(
core
.
limit_tuner
||
core
.
limit_syn
)
{
...
@@ -2581,7 +2575,11 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
...
@@ -2581,7 +2575,11 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
}
}
if
(
positions
==
0
)
if
(
positions
==
0
)
positions
=
POS_FACEUP_ATTACK
;
positions
=
POS_FACEUP_ATTACK
;
uint32
zone
=
core
.
units
.
begin
()
->
arg3
;
std
::
vector
<
int32
>
retval
;
peffect
->
get_value
(
target
,
0
,
&
retval
);
uint32
summon_info
=
retval
.
size
()
>
0
?
retval
[
0
]
:
0
;
uint32
zone
=
retval
.
size
()
>
1
?
retval
[
1
]
:
0xff
;
target
->
summon_info
=
(
summon_info
&
0xf00ffff
)
|
SUMMON_TYPE_SPECIAL
|
((
uint32
)
target
->
current
.
location
<<
16
);
target
->
enable_field_effect
(
false
);
target
->
enable_field_effect
(
false
);
move_to_field
(
target
,
sumplayer
,
targetplayer
,
LOCATION_MZONE
,
positions
,
FALSE
,
0
,
FALSE
,
zone
);
move_to_field
(
target
,
sumplayer
,
targetplayer
,
LOCATION_MZONE
,
positions
,
FALSE
,
0
,
FALSE
,
zone
);
target
->
current
.
reason
=
REASON_SPSUMMON
;
target
->
current
.
reason
=
REASON_SPSUMMON
;
...
...
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