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
e1f22518
Commit
e1f22518
authored
May 25, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add setting for drawing single chain
parent
068caaf3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
27 deletions
+44
-27
Classes/gframe/drawing.cpp
Classes/gframe/drawing.cpp
+25
-21
Classes/gframe/duelclient.cpp
Classes/gframe/duelclient.cpp
+8
-6
Classes/gframe/event_handler.cpp
Classes/gframe/event_handler.cpp
+5
-0
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+3
-0
Classes/gframe/game.h
Classes/gframe/game.h
+3
-0
No files found.
Classes/gframe/drawing.cpp
View file @
e1f22518
...
@@ -517,27 +517,31 @@ void Game::DrawMisc() {
...
@@ -517,27 +517,31 @@ void Game::DrawMisc() {
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
im
);
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
im
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vActivate
,
4
,
matManager
.
iRectangle
,
2
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vActivate
,
4
,
matManager
.
iRectangle
,
2
);
}
}
for
(
size_t
i
=
0
;
i
<
dField
.
chains
.
size
();
++
i
)
{
if
(
dField
.
chains
.
size
()
>
1
||
mainGame
->
gameConf
.
draw_single_chain
)
{
if
(
dField
.
chains
[
i
].
solved
)
for
(
size_t
i
=
0
;
i
<
dField
.
chains
.
size
();
++
i
)
{
break
;
if
(
dField
.
chains
[
i
].
solved
)
matManager
.
mTRTexture
.
setTexture
(
0
,
imageManager
.
tChain
);
break
;
matManager
.
mTRTexture
.
AmbientColor
=
0xffffff00
;
matManager
.
mTRTexture
.
setTexture
(
0
,
imageManager
.
tChain
);
ic
.
setRotationRadians
(
act_rot
);
matManager
.
mTRTexture
.
AmbientColor
=
0xffffff00
;
ic
.
setTranslation
(
dField
.
chains
[
i
].
chain_pos
);
ic
.
setRotationRadians
(
act_rot
);
driver
->
setMaterial
(
matManager
.
mTRTexture
);
ic
.
setTranslation
(
dField
.
chains
[
i
].
chain_pos
);
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
ic
);
driver
->
setMaterial
(
matManager
.
mTRTexture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vSymbol
,
4
,
matManager
.
iRectangle
,
2
);
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
ic
);
it
.
setScale
(
0.6
f
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vSymbol
,
4
,
matManager
.
iRectangle
,
2
);
it
.
setTranslation
(
dField
.
chains
[
i
].
chain_pos
);
it
.
setScale
(
0.6
f
);
matManager
.
mTRTexture
.
setTexture
(
0
,
imageManager
.
tNumber
);
it
.
setTranslation
(
dField
.
chains
[
i
].
chain_pos
);
matManager
.
vChainNum
[
0
].
TCoords
=
vector2df
(
0.19375
f
*
(
i
%
5
),
0.2421875
f
*
(
i
/
5
));
matManager
.
mTRTexture
.
setTexture
(
0
,
imageManager
.
tNumber
);
matManager
.
vChainNum
[
1
].
TCoords
=
vector2df
(
0.19375
f
*
(
i
%
5
+
1
),
0.2421875
f
*
(
i
/
5
));
matManager
.
vChainNum
[
0
].
TCoords
=
vector2df
(
0.19375
f
*
(
i
%
5
),
0.2421875
f
*
(
i
/
5
));
matManager
.
vChainNum
[
2
].
TCoords
=
vector2df
(
0.19375
f
*
(
i
%
5
),
0.2421875
f
*
(
i
/
5
+
1
));
matManager
.
vChainNum
[
1
].
TCoords
=
vector2df
(
0.19375
f
*
(
i
%
5
+
1
),
matManager
.
vChainNum
[
3
].
TCoords
=
vector2df
(
0.19375
f
*
(
i
%
5
+
1
),
0.2421875
f
*
(
i
/
5
));
0.2421875
f
*
(
i
/
5
+
1
));
matManager
.
vChainNum
[
2
].
TCoords
=
vector2df
(
0.19375
f
*
(
i
%
5
),
driver
->
setMaterial
(
matManager
.
mTRTexture
);
0.2421875
f
*
(
i
/
5
+
1
));
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
it
);
matManager
.
vChainNum
[
3
].
TCoords
=
vector2df
(
0.19375
f
*
(
i
%
5
+
1
),
driver
->
drawVertexPrimitiveList
(
matManager
.
vChainNum
,
4
,
matManager
.
iRectangle
,
2
);
0.2421875
f
*
(
i
/
5
+
1
));
driver
->
setMaterial
(
matManager
.
mTRTexture
);
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
it
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vChainNum
,
4
,
matManager
.
iRectangle
,
2
);
}
}
}
//finish button
//finish button
if
(
btnCancelOrFinish
->
isVisible
())
if
(
btnCancelOrFinish
->
isVisible
())
...
...
Classes/gframe/duelclient.cpp
View file @
e1f22518
...
@@ -2923,12 +2923,14 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2923,12 +2923,14 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return
true
;
return
true
;
if
(
mainGame
->
dField
.
last_chain
)
if
(
mainGame
->
dField
.
last_chain
)
mainGame
->
WaitFrameSignal
(
11
);
mainGame
->
WaitFrameSignal
(
11
);
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
if
(
mainGame
->
dField
.
chains
.
size
()
>
1
||
mainGame
->
gameConf
.
draw_single_chain
)
{
mainGame
->
dField
.
chains
[
ct
-
1
].
solved
=
false
;
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
mainGame
->
WaitFrameSignal
(
3
);
mainGame
->
dField
.
chains
[
ct
-
1
].
solved
=
false
;
mainGame
->
dField
.
chains
[
ct
-
1
].
solved
=
true
;
mainGame
->
WaitFrameSignal
(
3
);
mainGame
->
WaitFrameSignal
(
3
);
mainGame
->
dField
.
chains
[
ct
-
1
].
solved
=
true
;
}
mainGame
->
WaitFrameSignal
(
3
);
}
}
mainGame
->
dField
.
last_chain
=
false
;
mainGame
->
dField
.
last_chain
=
false
;
return
true
;
return
true
;
}
}
...
...
Classes/gframe/event_handler.cpp
View file @
e1f22518
...
@@ -1843,6 +1843,11 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
...
@@ -1843,6 +1843,11 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
return
true
;
return
true
;
break
;
break
;
}
}
case
CHECKBOX_DRAW_SINGLE_CHAIN
:
{
mainGame
->
gameConf
.
draw_single_chain
=
mainGame
->
chkDrawSingleChain
->
isChecked
()
?
1
:
0
;
return
true
;
break
;
}
case
CHECKBOX_PREFER_EXPANSION
:
{
case
CHECKBOX_PREFER_EXPANSION
:
{
mainGame
->
gameConf
.
prefer_expansion_script
=
mainGame
->
chkPreferExpansionScript
->
isChecked
()
?
1
:
0
;
mainGame
->
gameConf
.
prefer_expansion_script
=
mainGame
->
chkPreferExpansionScript
->
isChecked
()
?
1
:
0
;
return
true
;
return
true
;
...
...
Classes/gframe/game.cpp
View file @
e1f22518
...
@@ -487,6 +487,9 @@ bool Game::Initialize() {
...
@@ -487,6 +487,9 @@ bool Game::Initialize() {
posY
+=
60
;
posY
+=
60
;
chkQuickAnimation
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
tabSystem
,
CHECKBOX_QUICK_ANIMATION
,
dataManager
.
GetSysString
(
1299
));
chkQuickAnimation
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
tabSystem
,
CHECKBOX_QUICK_ANIMATION
,
dataManager
.
GetSysString
(
1299
));
chkQuickAnimation
->
setChecked
(
gameConf
.
quick_animation
!=
0
);
chkQuickAnimation
->
setChecked
(
gameConf
.
quick_animation
!=
0
);
posY
+=
60
;
chkDrawSingleChain
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
tabHelper
,
CHECKBOX_DRAW_SINGLE_CHAIN
,
dataManager
.
GetSysString
(
1287
));
chkDrawSingleChain
->
setChecked
(
gameConf
.
draw_single_chain
!=
0
);
posY
+=
60
;
posY
+=
60
;
chkPreferExpansionScript
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
tabSystem
,
CHECKBOX_PREFER_EXPANSION
,
dataManager
.
GetSysString
(
1379
));
chkPreferExpansionScript
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
*
xScale
,
posY
+
30
*
yScale
),
tabSystem
,
CHECKBOX_PREFER_EXPANSION
,
dataManager
.
GetSysString
(
1379
));
chkPreferExpansionScript
->
setChecked
(
gameConf
.
prefer_expansion_script
!=
0
);
chkPreferExpansionScript
->
setChecked
(
gameConf
.
prefer_expansion_script
!=
0
);
...
...
Classes/gframe/game.h
View file @
e1f22518
...
@@ -50,6 +50,7 @@ struct Config {
...
@@ -50,6 +50,7 @@ struct Config {
int
enable_bot_mode
;
int
enable_bot_mode
;
int
quick_animation
;
int
quick_animation
;
int
auto_save_replay
;
int
auto_save_replay
;
int
draw_single_chain
;
int
prefer_expansion_script
;
int
prefer_expansion_script
;
//sound
//sound
bool
enable_sound
;
bool
enable_sound
;
...
@@ -277,6 +278,7 @@ public:
...
@@ -277,6 +278,7 @@ public:
irr
::
gui
::
IGUICheckBox
*
chkWaitChain
;
irr
::
gui
::
IGUICheckBox
*
chkWaitChain
;
irr
::
gui
::
IGUICheckBox
*
chkQuickAnimation
;
irr
::
gui
::
IGUICheckBox
*
chkQuickAnimation
;
irr
::
gui
::
IGUICheckBox
*
chkAutoSaveReplay
;
irr
::
gui
::
IGUICheckBox
*
chkAutoSaveReplay
;
irr
::
gui
::
IGUICheckBox
*
chkDrawSingleChain
;
irr
::
gui
::
IGUIWindow
*
tabSystem
;
irr
::
gui
::
IGUIWindow
*
tabSystem
;
irr
::
gui
::
IGUIElement
*
elmTabSystemLast
;
irr
::
gui
::
IGUIElement
*
elmTabSystemLast
;
irr
::
gui
::
IGUIScrollBar
*
scrTabSystem
;
irr
::
gui
::
IGUIScrollBar
*
scrTabSystem
;
...
@@ -809,6 +811,7 @@ private:
...
@@ -809,6 +811,7 @@ private:
#define SCROLL_TAB_SYSTEM 371
#define SCROLL_TAB_SYSTEM 371
#define CHECKBOX_MULTI_KEYWORDS 372
#define CHECKBOX_MULTI_KEYWORDS 372
#define CHECKBOX_PREFER_EXPANSION 373
#define CHECKBOX_PREFER_EXPANSION 373
#define CHECKBOX_DRAW_SINGLE_CHAIN 374
#define DEFAULT_DUEL_RULE 5
#define DEFAULT_DUEL_RULE 5
...
...
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