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
d088938e
Commit
d088938e
authored
Sep 14, 2018
by
fallenstardust
Browse files
Options
Browse Files
Download
Plain Diff
调整按钮大小&属性种族宣言
parents
31c27ae9
941ba4b3
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
81 additions
and
93 deletions
+81
-93
Classes/gframe/event_handler.cpp
Classes/gframe/event_handler.cpp
+11
-31
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+27
-27
Classes/ocgcore/effect.cpp
Classes/ocgcore/effect.cpp
+18
-2
Classes/ocgcore/effect.h
Classes/ocgcore/effect.h
+2
-0
Classes/ocgcore/libeffect.cpp
Classes/ocgcore/libeffect.cpp
+6
-24
Classes/ocgcore/operations.cpp
Classes/ocgcore/operations.cpp
+2
-1
Classes/ocgcore/processor.cpp
Classes/ocgcore/processor.cpp
+9
-4
Classes/ocgcore/scriptlib.cpp
Classes/ocgcore/scriptlib.cpp
+1
-1
Classes/ocgcore/scriptlib.h
Classes/ocgcore/scriptlib.h
+0
-1
README.md
README.md
+4
-1
mobile/libs/libWindbot.aar
mobile/libs/libWindbot.aar
+0
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
+1
-1
No files found.
Classes/gframe/event_handler.cpp
View file @
d088938e
...
...
@@ -2105,36 +2105,28 @@ void ClientField::ShowMenu(int flag, int x, int y) {
mainGame
->
btnActivate
->
setVisible
(
true
);
mainGame
->
btnActivate
->
setRelativePosition
(
position2di
(
1
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
40
*
mainGame
->
yScale
;
#else
height
+=
21
*
mainGame
->
yScale
;
height
+=
51
*
mainGame
->
yScale
;
#endif
}
else
mainGame
->
btnActivate
->
setVisible
(
false
);
if
(
flag
&
COMMAND_SUMMON
)
{
mainGame
->
btnSummon
->
setVisible
(
true
);
mainGame
->
btnSummon
->
setRelativePosition
(
position2di
(
1
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
40
*
mainGame
->
yScale
;
#else
height
+=
21
*
mainGame
->
yScale
;
height
+=
51
*
mainGame
->
yScale
;
#endif
}
else
mainGame
->
btnSummon
->
setVisible
(
false
);
if
(
flag
&
COMMAND_SPSUMMON
)
{
mainGame
->
btnSPSummon
->
setVisible
(
true
);
mainGame
->
btnSPSummon
->
setRelativePosition
(
position2di
(
1
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
40
*
mainGame
->
yScale
;
#else
height
+=
21
*
mainGame
->
yScale
;
height
+=
51
*
mainGame
->
yScale
;
#endif
}
else
mainGame
->
btnSPSummon
->
setVisible
(
false
);
if
(
flag
&
COMMAND_MSET
)
{
mainGame
->
btnMSet
->
setVisible
(
true
);
mainGame
->
btnMSet
->
setRelativePosition
(
position2di
(
1
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
40
*
mainGame
->
yScale
;
#else
height
+=
21
*
mainGame
->
yScale
;
height
+=
51
*
mainGame
->
yScale
;
#endif
}
else
mainGame
->
btnMSet
->
setVisible
(
false
);
if
(
flag
&
COMMAND_SSET
)
{
...
...
@@ -2145,9 +2137,7 @@ void ClientField::ShowMenu(int flag, int x, int y) {
mainGame
->
btnSSet
->
setVisible
(
true
);
mainGame
->
btnSSet
->
setRelativePosition
(
position2di
(
1
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
40
*
mainGame
->
yScale
;
#else
height
+=
21
*
mainGame
->
yScale
;
height
+=
51
*
mainGame
->
yScale
;
#endif
}
else
mainGame
->
btnSSet
->
setVisible
(
false
);
if
(
flag
&
COMMAND_REPOS
)
{
...
...
@@ -2160,50 +2150,40 @@ void ClientField::ShowMenu(int flag, int x, int y) {
mainGame
->
btnRepos
->
setVisible
(
true
);
mainGame
->
btnRepos
->
setRelativePosition
(
position2di
(
1
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
40
*
mainGame
->
yScale
;
#else
height
+=
21
*
mainGame
->
yScale
;
height
+=
51
*
mainGame
->
yScale
;
#endif
}
else
mainGame
->
btnRepos
->
setVisible
(
false
);
if
(
flag
&
COMMAND_ATTACK
)
{
mainGame
->
btnAttack
->
setVisible
(
true
);
mainGame
->
btnAttack
->
setRelativePosition
(
position2di
(
1
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
40
*
mainGame
->
yScale
;
#else
height
+=
21
*
mainGame
->
yScale
;
height
+=
51
*
mainGame
->
yScale
;
#endif
}
else
mainGame
->
btnAttack
->
setVisible
(
false
);
if
(
flag
&
COMMAND_LIST
)
{
mainGame
->
btnShowList
->
setVisible
(
true
);
mainGame
->
btnShowList
->
setRelativePosition
(
position2di
(
1
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
40
*
mainGame
->
yScale
;
#else
height
+=
21
*
mainGame
->
yScale
;
height
+=
51
*
mainGame
->
yScale
;
#endif
}
else
mainGame
->
btnShowList
->
setVisible
(
false
);
if
(
flag
&
COMMAND_OPERATION
)
{
mainGame
->
btnOperation
->
setVisible
(
true
);
mainGame
->
btnOperation
->
setRelativePosition
(
position2di
(
1
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
40
*
mainGame
->
yScale
;
#else
height
+=
21
*
mainGame
->
yScale
;
height
+=
51
*
mainGame
->
yScale
;
#endif
}
else
mainGame
->
btnOperation
->
setVisible
(
false
);
if
(
flag
&
COMMAND_RESET
)
{
mainGame
->
btnReset
->
setVisible
(
true
);
mainGame
->
btnReset
->
setRelativePosition
(
position2di
(
1
,
height
));
#ifdef _IRR_ANDROID_PLATFORM_
height
+=
40
*
mainGame
->
yScale
;
#else
height
+=
21
*
mainGame
->
yScale
;
height
+=
51
*
mainGame
->
yScale
;
#endif
}
else
mainGame
->
btnReset
->
setVisible
(
false
);
panel
=
mainGame
->
wCmdMenu
;
mainGame
->
wCmdMenu
->
setVisible
(
true
);
mainGame
->
wCmdMenu
->
setRelativePosition
(
irr
::
core
::
recti
(
x
-
20
*
mainGame
->
xScale
,
y
-
20
*
mainGame
->
yScale
-
height
,
x
+
8
0
*
mainGame
->
xScale
,
y
-
20
*
mainGame
->
yScale
));
mainGame
->
wCmdMenu
->
setRelativePosition
(
irr
::
core
::
recti
(
x
-
5
*
mainGame
->
xScale
,
y
-
20
*
mainGame
->
yScale
-
height
,
x
+
10
0
*
mainGame
->
xScale
,
y
-
20
*
mainGame
->
yScale
));
}
void
ClientField
::
UpdateChainButtons
()
{
if
(
mainGame
->
btnChainAlways
->
isVisible
())
{
...
...
Classes/gframe/game.cpp
View file @
d088938e
...
...
@@ -518,7 +518,7 @@ bool Game::Initialize() {
btnOption
[
i
]
=
env
->
addButton
(
rect
<
s32
>
(
10
*
xScale
,
(
30
+
60
*
i
)
*
yScale
,
380
*
xScale
,
(
80
+
60
*
i
)
*
yScale
),
wOptions
,
BUTTON_OPTION_0
+
i
,
L""
);
}
#endif
//pos select
//pos select
imgCard->setScaleImage(true);
wPosSelect
=
env
->
addWindow
(
rect
<
s32
>
(
340
*
xScale
,
200
*
yScale
,
935
*
xScale
,
410
*
yScale
),
false
,
dataManager
.
GetSysString
(
561
));
wPosSelect
->
getCloseButton
()
->
setVisible
(
false
);
wPosSelect
->
setVisible
(
false
);
...
...
@@ -565,14 +565,14 @@ bool Game::Initialize() {
btnDisplayOK
=
env
->
addButton
(
rect
<
s32
>
(
300
*
xScale
,
265
*
yScale
,
380
*
xScale
,
290
*
yScale
),
wCardDisplay
,
BUTTON_CARD_DISP_OK
,
dataManager
.
GetSysString
(
1211
));
#endif
//announce number
wANNumber
=
env
->
addWindow
(
rect
<
s32
>
(
550
*
xScale
,
200
*
yScale
,
780
*
xScale
,
29
5
*
yScale
),
false
,
L""
);
wANNumber
=
env
->
addWindow
(
rect
<
s32
>
(
550
*
xScale
,
200
*
yScale
,
780
*
xScale
,
35
5
*
yScale
),
false
,
L""
);
wANNumber
->
getCloseButton
()
->
setVisible
(
false
);
wANNumber
->
setVisible
(
false
);
#ifdef _IRR_ANDROID_PLATFORM_
cbANNumber
=
CAndroidGUIComboBox
::
addAndroidComboBox
(
env
,
rect
<
s32
>
(
40
*
xScale
,
30
*
yScale
,
190
*
xScale
,
50
*
yScale
),
wANNumber
,
-
1
);
cbANNumber
=
CAndroidGUIComboBox
::
addAndroidComboBox
(
env
,
rect
<
s32
>
(
40
*
xScale
,
30
*
yScale
,
190
*
xScale
,
65
*
yScale
),
wANNumber
,
-
1
);
#endif
cbANNumber
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
btnANNumberOK
=
env
->
addButton
(
rect
<
s32
>
(
80
*
xScale
,
60
*
yScale
,
150
*
xScale
,
8
5
*
yScale
),
wANNumber
,
BUTTON_ANNUMBER_OK
,
dataManager
.
GetSysString
(
1211
));
btnANNumberOK
=
env
->
addButton
(
rect
<
s32
>
(
70
*
xScale
,
95
*
yScale
,
160
*
xScale
,
14
5
*
yScale
),
wANNumber
,
BUTTON_ANNUMBER_OK
,
dataManager
.
GetSysString
(
1211
));
//announce card
wANCard
=
env
->
addWindow
(
rect
<
s32
>
(
400
*
xScale
,
100
*
yScale
,
800
*
xScale
,
400
*
yScale
),
false
,
L""
);
wANCard
->
getCloseButton
()
->
setVisible
(
false
);
...
...
@@ -585,18 +585,18 @@ bool Game::Initialize() {
//dont merge
btnANCardOK
=
env
->
addButton
(
rect
<
s32
>
(
140
*
xScale
,
260
*
yScale
,
270
*
xScale
,
295
*
yScale
),
wANCard
,
BUTTON_ANCARD_OK
,
dataManager
.
GetSysString
(
1211
));
//announce attribute
wANAttribute
=
env
->
addWindow
(
rect
<
s32
>
(
500
*
xScale
,
200
*
yScale
,
750
*
xScale
,
38
0
*
yScale
),
false
,
dataManager
.
GetSysString
(
562
));
wANAttribute
=
env
->
addWindow
(
rect
<
s32
>
(
450
*
xScale
,
200
*
yScale
,
800
*
xScale
,
36
0
*
yScale
),
false
,
dataManager
.
GetSysString
(
562
));
wANAttribute
->
getCloseButton
()
->
setVisible
(
false
);
wANAttribute
->
setVisible
(
false
);
for
(
int
filter
=
0x1
,
i
=
0
;
i
<
7
;
filter
<<=
1
,
++
i
)
chkAttribute
[
i
]
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
((
10
+
(
i
%
4
)
*
80
)
*
xScale
,
(
50
+
(
i
/
4
)
*
55
)
*
yScale
,
(
9
0
+
(
i
%
4
)
*
80
)
*
xScale
,
(
75
+
(
i
/
4
)
*
55
)
*
yScale
),
chkAttribute
[
i
]
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
((
20
+
(
i
%
4
)
*
80
)
*
xScale
,
(
50
+
(
i
/
4
)
*
55
)
*
yScale
,
(
10
0
+
(
i
%
4
)
*
80
)
*
xScale
,
(
75
+
(
i
/
4
)
*
55
)
*
yScale
),
wANAttribute
,
CHECK_ATTRIBUTE
,
dataManager
.
FormatAttribute
(
filter
));
//announce race
wANRace
=
env
->
addWindow
(
rect
<
s32
>
(
480
*
xScale
,
100
*
yScale
,
850
*
xScale
,
530
*
yScale
),
false
,
dataManager
.
GetSysString
(
563
));
wANRace
->
getCloseButton
()
->
setVisible
(
false
);
wANRace
->
setVisible
(
false
);
for
(
int
filter
=
0x1
,
i
=
0
;
i
<
25
;
filter
<<=
1
,
++
i
)
chkRace
[
i
]
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
((
1
0
+
(
i
%
4
)
*
90
)
*
xScale
,
(
50
+
(
i
/
4
)
*
55
)
*
yScale
,
(
100
+
(
i
%
4
)
*
90
)
*
xScale
,
(
75
+
(
i
/
4
)
*
55
)
*
yScale
),
chkRace
[
i
]
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
((
1
5
+
(
i
%
4
)
*
90
)
*
xScale
,
(
50
+
(
i
/
4
)
*
55
)
*
yScale
,
(
105
+
(
i
%
4
)
*
90
)
*
xScale
,
(
75
+
(
i
/
4
)
*
55
)
*
yScale
),
wANRace
,
CHECK_RACE
,
dataManager
.
FormatRace
(
filter
));
//selection hint
stHintMsg
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
500
*
xScale
,
90
*
yScale
,
820
*
xScale
,
120
*
yScale
),
true
,
false
,
0
,
-
1
,
false
);
...
...
@@ -613,16 +613,16 @@ bool Game::Initialize() {
wCmdMenu
->
setVisible
(
false
);
wCmdMenu
->
getCloseButton
()
->
setVisible
(
false
);
#ifdef _IRR_ANDROID_PLATFORM_
btnActivate
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
1
*
yScale
,
99
*
xScale
,
40
*
yScale
),
wCmdMenu
,
BUTTON_CMD_ACTIVATE
,
dataManager
.
GetSysString
(
1150
));
btnSummon
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
41
*
yScale
,
99
*
xScale
,
81
*
yScale
),
wCmdMenu
,
BUTTON_CMD_SUMMON
,
dataManager
.
GetSysString
(
1151
));
btnSPSummon
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
82
*
yScale
,
99
*
xScale
,
122
*
yScale
),
wCmdMenu
,
BUTTON_CMD_SPSUMMON
,
dataManager
.
GetSysString
(
1152
));
btnMSet
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
1
23
*
yScale
,
99
*
xScale
,
16
4
*
yScale
),
wCmdMenu
,
BUTTON_CMD_MSET
,
dataManager
.
GetSysString
(
1153
));
btnSSet
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
165
*
yScale
,
99
*
xScale
,
20
5
*
yScale
),
wCmdMenu
,
BUTTON_CMD_SSET
,
dataManager
.
GetSysString
(
1153
));
btnRepos
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
2
06
*
yScale
,
99
*
xScale
,
24
6
*
yScale
),
wCmdMenu
,
BUTTON_CMD_REPOS
,
dataManager
.
GetSysString
(
1154
));
btnAttack
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
247
*
yScale
,
99
*
xScale
,
288
*
yScale
),
wCmdMenu
,
BUTTON_CMD_ATTACK
,
dataManager
.
GetSysString
(
1157
));
btnShowList
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
289
*
yScale
,
99
*
xScale
,
329
*
yScale
),
wCmdMenu
,
BUTTON_CMD_SHOWLIST
,
dataManager
.
GetSysString
(
1158
));
btnOperation
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
169
*
yScale
,
100
*
xScale
,
20
9
*
yScale
),
wCmdMenu
,
BUTTON_CMD_ACTIVATE
,
dataManager
.
GetSysString
(
1161
));
btnReset
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
190
*
yScale
,
99
*
xScale
,
2
10
*
yScale
),
wCmdMenu
,
BUTTON_CMD_RESET
,
dataManager
.
GetSysString
(
1162
));
btnActivate
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
1
*
yScale
,
105
*
xScale
,
51
*
yScale
),
wCmdMenu
,
BUTTON_CMD_ACTIVATE
,
dataManager
.
GetSysString
(
1150
));
btnSummon
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
52
*
yScale
,
105
*
xScale
,
102
*
yScale
),
wCmdMenu
,
BUTTON_CMD_SUMMON
,
dataManager
.
GetSysString
(
1151
));
btnSPSummon
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
103
*
yScale
,
105
*
xScale
,
153
*
yScale
),
wCmdMenu
,
BUTTON_CMD_SPSUMMON
,
dataManager
.
GetSysString
(
1152
));
btnMSet
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
1
54
*
yScale
,
105
*
xScale
,
20
4
*
yScale
),
wCmdMenu
,
BUTTON_CMD_MSET
,
dataManager
.
GetSysString
(
1153
));
btnSSet
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
205
*
yScale
,
105
*
xScale
,
25
5
*
yScale
),
wCmdMenu
,
BUTTON_CMD_SSET
,
dataManager
.
GetSysString
(
1153
));
btnRepos
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
2
56
*
yScale
,
105
*
xScale
,
30
6
*
yScale
),
wCmdMenu
,
BUTTON_CMD_REPOS
,
dataManager
.
GetSysString
(
1154
));
btnAttack
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
307
*
yScale
,
105
*
xScale
,
357
*
yScale
),
wCmdMenu
,
BUTTON_CMD_ATTACK
,
dataManager
.
GetSysString
(
1157
));
btnShowList
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
358
*
yScale
,
105
*
xScale
,
408
*
yScale
),
wCmdMenu
,
BUTTON_CMD_SHOWLIST
,
dataManager
.
GetSysString
(
1158
));
btnOperation
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
409
*
yScale
,
105
*
xScale
,
45
9
*
yScale
),
wCmdMenu
,
BUTTON_CMD_ACTIVATE
,
dataManager
.
GetSysString
(
1161
));
btnReset
=
env
->
addButton
(
rect
<
s32
>
(
1
*
xScale
,
460
*
yScale
,
105
*
xScale
,
5
10
*
yScale
),
wCmdMenu
,
BUTTON_CMD_RESET
,
dataManager
.
GetSysString
(
1162
));
#endif
//deck edit
wDeckEdit
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
309
*
xScale
,
8
*
yScale
,
605
*
xScale
,
130
*
yScale
),
true
,
false
,
0
,
-
1
,
true
);
...
...
@@ -824,14 +824,14 @@ bool Game::Initialize() {
irr
::
gui
::
IGUITab
*
tabBot
=
wSingle
->
addTab
(
dataManager
.
GetSysString
(
1380
));
lstBotList
=
CAndroidGUIListBox
::
addAndroidGUIListBox
(
env
,
rect
<
s32
>
(
10
*
xScale
,
10
*
yScale
,
350
*
xScale
,
350
*
yScale
),
tabBot
,
LISTBOX_BOT_LIST
,
true
,
40
*
xScale
);
lstBotList
->
setItemHeight
(
25
*
yScale
);
btnStartBot
=
env
->
addButton
(
rect
<
s32
>
(
460
*
xScale
,
2
70
*
yScale
,
570
*
xScale
,
31
0
*
yScale
),
tabBot
,
BUTTON_BOT_START
,
dataManager
.
GetSysString
(
1211
));
btnBotCancel
=
env
->
addButton
(
rect
<
s32
>
(
460
*
xScale
,
3
20
*
yScale
,
570
*
xScale
,
36
0
*
yScale
),
tabBot
,
BUTTON_CANCEL_SINGLEPLAY
,
dataManager
.
GetSysString
(
1210
));
btnStartBot
=
env
->
addButton
(
rect
<
s32
>
(
460
*
xScale
,
2
60
*
yScale
,
570
*
xScale
,
30
0
*
yScale
),
tabBot
,
BUTTON_BOT_START
,
dataManager
.
GetSysString
(
1211
));
btnBotCancel
=
env
->
addButton
(
rect
<
s32
>
(
460
*
xScale
,
3
10
*
yScale
,
570
*
xScale
,
35
0
*
yScale
),
tabBot
,
BUTTON_CANCEL_SINGLEPLAY
,
dataManager
.
GetSysString
(
1210
));
env
->
addStaticText
(
dataManager
.
GetSysString
(
1382
),
rect
<
s32
>
(
360
*
xScale
,
10
*
yScale
,
550
*
xScale
,
30
*
yScale
),
false
,
true
,
tabBot
);
stBotInfo
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
360
*
xScale
,
40
*
yScale
,
560
*
xScale
,
160
*
yScale
),
false
,
true
,
tabBot
);
chkBotOldRule
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
360
*
xScale
,
1
40
*
yScale
,
560
*
xScale
,
16
0
*
yScale
),
tabBot
,
CHECKBOX_BOT_OLD_RULE
,
dataManager
.
GetSysString
(
1383
));
chkBotHand
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
360
*
xScale
,
1
70
*
yScale
,
560
*
xScale
,
19
0
*
yScale
),
tabBot
,
-
1
,
dataManager
.
GetSysString
(
1384
));
chkBotNoCheckDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
360
*
xScale
,
200
*
yScale
,
560
*
xScale
,
22
0
*
yScale
),
tabBot
,
-
1
,
dataManager
.
GetSysString
(
1229
));
chkBotNoShuffleDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
360
*
xScale
,
2
3
0
*
yScale
,
560
*
xScale
,
250
*
yScale
),
tabBot
,
-
1
,
dataManager
.
GetSysString
(
1230
));
chkBotOldRule
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
360
*
xScale
,
1
00
*
yScale
,
560
*
xScale
,
13
0
*
yScale
),
tabBot
,
CHECKBOX_BOT_OLD_RULE
,
dataManager
.
GetSysString
(
1383
));
chkBotHand
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
360
*
xScale
,
1
40
*
yScale
,
560
*
xScale
,
17
0
*
yScale
),
tabBot
,
-
1
,
dataManager
.
GetSysString
(
1384
));
chkBotNoCheckDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
360
*
xScale
,
180
*
yScale
,
560
*
xScale
,
21
0
*
yScale
),
tabBot
,
-
1
,
dataManager
.
GetSysString
(
1229
));
chkBotNoShuffleDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
360
*
xScale
,
2
2
0
*
yScale
,
560
*
xScale
,
250
*
yScale
),
tabBot
,
-
1
,
dataManager
.
GetSysString
(
1230
));
}
else
{
// avoid null pointer
btnStartBot
=
env
->
addButton
(
rect
<
s32
>
(
0
,
0
,
0
,
0
),
wSinglePlay
);
btnBotCancel
=
env
->
addButton
(
rect
<
s32
>
(
0
,
0
,
0
,
0
),
wSinglePlay
);
...
...
@@ -840,12 +840,12 @@ bool Game::Initialize() {
}
//SINGLE MODE
irr
::
gui
::
IGUITab
*
tabSingle
=
wSingle
->
addTab
(
dataManager
.
GetSysString
(
1381
));
lstSinglePlayList
=
CAndroidGUIListBox
::
addAndroidGUIListBox
(
env
,
rect
<
s32
>
(
10
*
xScale
,
10
*
yScale
,
350
*
xScale
,
350
*
yScale
),
tabSingle
,
LISTBOX_SINGLEPLAY_LIST
,
true
,
40
*
xScale
);
lstSinglePlayList
->
setItemHeight
(
25
*
yScale
);
btnLoadSinglePlay
=
env
->
addButton
(
rect
<
s32
>
(
460
*
xScale
,
270
*
yScale
,
570
*
xScale
,
310
*
yScale
),
tabSingle
,
BUTTON_LOAD_SINGLEPLAY
,
dataManager
.
GetSysString
(
1211
));
btnSinglePlayCancel
=
env
->
addButton
(
rect
<
s32
>
(
460
*
xScale
,
320
*
yScale
,
570
*
xScale
,
360
*
yScale
),
tabSingle
,
BUTTON_CANCEL_SINGLEPLAY
,
dataManager
.
GetSysString
(
1210
));
env
->
addStaticText
(
dataManager
.
GetSysString
(
1352
),
rect
<
s32
>
(
360
*
xScale
,
30
*
yScale
,
570
*
xScale
,
50
*
yScale
),
false
,
true
,
tabSingle
);
stSinglePlayInfo
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
360
*
xScale
,
60
*
yScale
,
570
*
xScale
,
295
*
yScale
),
false
,
true
,
tabSingle
);
lstSinglePlayList
=
CAndroidGUIListBox
::
addAndroidGUIListBox
(
env
,
rect
<
s32
>
(
10
*
xScale
,
10
*
yScale
,
350
*
xScale
,
350
*
yScale
),
tabSingle
,
LISTBOX_SINGLEPLAY_LIST
,
true
,
40
*
xScale
);
lstSinglePlayList
->
setItemHeight
(
25
*
yScale
);
btnLoadSinglePlay
=
env
->
addButton
(
rect
<
s32
>
(
460
*
xScale
,
260
*
yScale
,
570
*
xScale
,
300
*
yScale
),
tabSingle
,
BUTTON_LOAD_SINGLEPLAY
,
dataManager
.
GetSysString
(
1211
));
btnSinglePlayCancel
=
env
->
addButton
(
rect
<
s32
>
(
460
*
xScale
,
310
*
yScale
,
570
*
xScale
,
350
*
yScale
),
tabSingle
,
BUTTON_CANCEL_SINGLEPLAY
,
dataManager
.
GetSysString
(
1210
));
//replay save
wReplaySave
=
env
->
addWindow
(
rect
<
s32
>
(
490
*
xScale
,
180
*
yScale
,
840
*
xScale
,
340
*
yScale
),
false
,
dataManager
.
GetSysString
(
1340
));
wReplaySave
->
getCloseButton
()
->
setVisible
(
false
);
...
...
Classes/ocgcore/effect.cpp
View file @
d088938e
...
...
@@ -245,8 +245,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
return
FALSE
;
}
else
if
(
!
(
type
&
EFFECT_TYPE_CONTINUOUS
))
{
card
*
phandler
=
get_handler
();
if
((
phandler
->
data
.
type
&
TYPE_MONSTER
)
&&
(
phandler
->
current
.
location
&
LOCATION_SZONE
)
&&
!
in_range
(
phandler
))
if
(
!
(
phandler
->
get_type
()
&
TYPE_MONSTER
)
&&
(
get_active_type
()
&
TYPE_MONSTER
))
return
FALSE
;
if
(
!
neglect_faceup
&&
(
phandler
->
current
.
location
&
(
LOCATION_ONFIELD
|
LOCATION_REMOVED
)))
{
// effects which can be activated while face-down:
...
...
@@ -752,3 +751,20 @@ void effect::set_activate_location() {
active_location
=
phandler
->
current
.
location
;
active_sequence
=
phandler
->
current
.
sequence
;
}
void
effect
::
set_active_type
()
{
card
*
phandler
=
get_handler
();
active_type
=
phandler
->
get_type
();
if
(
active_type
&
TYPE_TRAPMONSTER
)
active_type
&=
~
TYPE_TRAP
;
}
uint32
effect
::
get_active_type
()
{
if
(
type
&
0x7f0
)
{
if
(
active_type
)
return
active_type
;
else
if
((
type
&
EFFECT_TYPE_ACTIVATE
)
&&
(
get_handler
()
->
data
.
type
&
TYPE_PENDULUM
))
return
TYPE_PENDULUM
+
TYPE_SPELL
;
else
return
get_handler
()
->
get_type
();
}
else
return
owner
->
get_type
();
}
Classes/ocgcore/effect.h
View file @
d088938e
...
...
@@ -100,6 +100,8 @@ public:
int32
in_range
(
card
*
pcard
);
int32
in_range
(
const
chain
&
ch
);
void
set_activate_location
();
void
set_active_type
();
uint32
get_active_type
();
bool
is_flag
(
effect_flag
flag
)
const
{
return
!!
(
this
->
flag
[
0
]
&
flag
);
}
...
...
Classes/ocgcore/libeffect.cpp
View file @
d088938e
...
...
@@ -435,40 +435,22 @@ int32 scriptlib::effect_get_operation(lua_State *L) {
interpreter
::
function2value
(
L
,
peffect
->
operation
);
return
1
;
}
// active_type is set in add_chain()
int32
scriptlib
::
effect_get_active_type
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
uint32
atype
;
if
(
peffect
->
type
&
0x7f0
)
{
if
(
peffect
->
active_type
)
atype
=
peffect
->
active_type
;
else
if
((
peffect
->
type
&
EFFECT_TYPE_ACTIVATE
)
&&
(
peffect
->
get_handler
()
->
data
.
type
&
TYPE_PENDULUM
))
atype
=
TYPE_PENDULUM
+
TYPE_SPELL
;
else
atype
=
peffect
->
get_handler
()
->
get_type
();
}
else
atype
=
peffect
->
owner
->
get_type
();
lua_pushinteger
(
L
,
atype
);
lua_pushinteger
(
L
,
peffect
->
get_active_type
());
return
1
;
}
int32
scriptlib
::
effect_is_active_type
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
uint32
tpe
=
lua_tointeger
(
L
,
2
);
uint32
atype
;
if
(
peffect
->
type
&
0x7f0
)
{
if
(
peffect
->
active_type
)
atype
=
peffect
->
active_type
;
else
if
((
peffect
->
type
&
EFFECT_TYPE_ACTIVATE
)
&&
(
peffect
->
get_handler
()
->
data
.
type
&
TYPE_PENDULUM
))
atype
=
TYPE_PENDULUM
+
TYPE_SPELL
;
uint32
type
=
lua_tointeger
(
L
,
2
);
if
(
peffect
->
get_active_type
()
&
type
)
lua_pushboolean
(
L
,
1
);
else
atype
=
peffect
->
get_handler
()
->
get_type
();
}
else
atype
=
peffect
->
owner
->
get_type
();
lua_pushboolean
(
L
,
atype
&
tpe
);
lua_pushboolean
(
L
,
0
);
return
1
;
}
int32
scriptlib
::
effect_is_has_property
(
lua_State
*
L
)
{
...
...
Classes/ocgcore/operations.cpp
View file @
d088938e
...
...
@@ -4280,7 +4280,8 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
if
(
!
(
target
->
current
.
location
&
LOCATION_ONFIELD
))
target
->
clear_relate_effect
();
}
if
(
ret
!=
1
||
target
->
turnid
!=
infos
.
turn_id
)
{
if
(
ret
!=
1
&&
location
!=
target
->
current
.
location
||
ret
==
1
&&
target
->
turnid
!=
infos
.
turn_id
)
{
target
->
set_status
(
STATUS_SUMMON_TURN
,
FALSE
);
target
->
set_status
(
STATUS_FLIP_SUMMON_TURN
,
FALSE
);
target
->
set_status
(
STATUS_SPSUMMON_TURN
,
FALSE
);
...
...
Classes/ocgcore/processor.cpp
View file @
d088938e
...
...
@@ -1702,6 +1702,7 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
if
(
tp
==
core
.
current_player
)
core
.
select_chains
.
push_back
(
*
clit
);
}
else
{
peffect
->
active_type
=
0
;
core
.
new_fchain_s
.
erase
(
clit
++
);
continue
;
}
...
...
@@ -1794,6 +1795,7 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
if
(
tp
==
core
.
current_player
)
core
.
select_chains
.
push_back
(
*
clit
);
}
else
{
peffect
->
active_type
=
0
;
core
.
new_ochain_s
.
erase
(
clit
++
);
continue
;
}
...
...
@@ -1819,8 +1821,10 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
}
case
6
:
{
if
(
returns
.
ivalue
[
0
]
==
-
1
)
{
for
(
const
auto
&
ch
:
core
.
select_chains
)
for
(
const
auto
&
ch
:
core
.
select_chains
)
{
ch
.
triggering_effect
->
active_type
=
0
;
core
.
new_ochain_s
.
remove_if
([
chain_id
=
ch
.
chain_id
](
chain
ch
)
{
return
ch
.
chain_id
==
chain_id
;
});
}
if
(
core
.
new_ochain_s
.
size
())
{
core
.
current_player
=
1
-
infos
.
turn_player
;
core
.
units
.
begin
()
->
step
=
3
;
...
...
@@ -2034,7 +2038,7 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori
}
case
2
:
{
chain
newchain
;
for
(
auto
evit
=
core
.
point_event
.
begin
();
evit
!=
core
.
instant_event
.
begin
();
++
evit
)
{
for
(
auto
evit
=
core
.
point_event
.
begin
();
evit
!=
core
.
instant_event
.
end
();
++
evit
)
{
if
(
evit
==
core
.
point_event
.
end
())
evit
=
core
.
instant_event
.
begin
();
auto
pr
=
effects
.
activate_effect
.
equal_range
(
evit
->
event_code
);
...
...
@@ -2432,6 +2436,7 @@ int32 field::process_single_event(effect* peffect, const tevent& e, chain_list&
else
core
.
new_fchain
.
push_back
(
newchain
);
}
peffect
->
set_active_type
();
phandler
->
create_relation
(
newchain
);
effect
*
deffect
;
if
(
deffect
=
phandler
->
is_affected_by_effect
(
EFFECT_DISABLE_EFFECT
))
{
...
...
@@ -4258,7 +4263,7 @@ int32 field::add_chain(uint16 step) {
peffect
->
card_type
=
phandler
->
get_type
();
if
((
peffect
->
card_type
&
0x5
)
==
0x5
)
peffect
->
card_type
-=
TYPE_TRAP
;
peffect
->
active_type
=
peffect
->
card_type
;
peffect
->
set_active_type
()
;
peffect
->
active_handler
=
peffect
->
handler
->
overlay_target
;
clit
.
chain_count
=
core
.
current_chain
.
size
()
+
1
;
clit
.
target_cards
=
0
;
...
...
@@ -4388,7 +4393,7 @@ int32 field::add_chain(uint16 step) {
&&
!
phandler
->
is_affected_by_effect
(
EFFECT_REMAIN_FIELD
))
phandler
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
TRUE
);
}
if
(
(
phandler
->
data
.
type
&
(
TYPE_SPELL
+
TYPE_TRAP
)
)
if
(
phandler
->
get_type
()
&
(
TYPE_SPELL
+
TYPE_TRAP
)
&&
(
phandler
->
data
.
type
&
(
TYPE_CONTINUOUS
+
TYPE_FIELD
+
TYPE_EQUIP
+
TYPE_PENDULUM
))
&&
phandler
->
is_has_relation
(
clit
)
&&
phandler
->
current
.
location
==
LOCATION_SZONE
&&
!
peffect
->
is_flag
(
EFFECT_FLAG_FIELD_ONLY
))
...
...
Classes/ocgcore/scriptlib.cpp
View file @
d088938e
...
...
@@ -7,7 +7,7 @@
#include "scriptlib.h"
#include "duel.h"
int32
scriptlib
::
check_data_type
(
lua_State
*
L
,
int32
index
,
const
char
*
tname
)
{
static
int32
check_data_type
(
lua_State
*
L
,
int32
index
,
const
char
*
tname
)
{
int32
result
=
FALSE
;
if
(
lua_getmetatable
(
L
,
index
))
{
lua_getglobal
(
L
,
tname
);
...
...
Classes/ocgcore/scriptlib.h
View file @
d088938e
...
...
@@ -13,7 +13,6 @@
class
scriptlib
{
public:
static
int32
check_data_type
(
lua_State
*
L
,
int32
index
,
const
char
*
tname
);
static
int32
check_param
(
lua_State
*
L
,
int32
param_type
,
int32
index
,
BOOL
retfalse
=
FALSE
);
static
int32
check_param_count
(
lua_State
*
L
,
int32
count
);
static
int32
check_action_permission
(
lua_State
*
L
);
...
...
README.md
View file @
d088938e
...
...
@@ -29,6 +29,9 @@ ndk编译环境(请用迅雷,旋风,或者翻墙vpn下载)
mobile
\a
ssets
\d
ata
\c
ards.cdb
mobile
\a
ssets
\d
ata
\s
cripts.zip
mobile
\a
ssets
\d
ata
\f
onts
\y
go.ttf
mobile
\l
ibs
\l
ibWindbot.aar
最新Libwindbot.aar获取:
https://github.com/mercury233/libWindbot/releases
2.
编译ygo的so
-------------------------
...
...
mobile/libs/libWindbot.aar
deleted
100644 → 0
View file @
31c27ae9
File deleted
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
View file @
d088938e
...
...
@@ -234,7 +234,7 @@ abstract class HomeActivity extends BaseActivity implements NavigationView.OnNav
startActivity
(
new
Intent
(
this
,
DeckManagerActivity
.
getDeckManager
()));
break
;
case
R
.
id
.
action_join_qq_group
:
String
key
=
"
dRkD2L9QgYiYmQoqJUgkR4QUth9UhuT4
"
;
String
key
=
"
4IyCWlDy1rdR14_eg0q1Xi488nG53_Lm
"
;
joinQQGroup
(
key
);
break
;
case
R
.
id
.
action_help
:
{
...
...
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