Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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-Cn-Ko-En
Commits
376b34e2
Commit
376b34e2
authored
Oct 05, 2019
by
kenan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opt code
parent
416637c4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
Classes/gframe/event_handler.cpp
Classes/gframe/event_handler.cpp
+2
-2
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+1
-1
Classes/gframe/game.h
Classes/gframe/game.h
+1
-2
No files found.
Classes/gframe/event_handler.cpp
View file @
376b34e2
...
@@ -1654,7 +1654,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1654,7 +1654,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
irr
:
:
EMIE_LMOUSE_PRESSED_DOWN
:
{
case
irr
:
:
EMIE_LMOUSE_PRESSED_DOWN
:
{
if
(
!
mainGame
->
dInfo
.
isStarted
)
if
(
!
mainGame
->
dInfo
.
isStarted
)
break
;
break
;
if
(
mainGame
->
gameConf
.
control_mode
==
1
&&
event
.
MouseInput
.
X
>
300
)
{
if
(
mainGame
->
gameConf
.
control_mode
==
1
&&
event
.
MouseInput
.
X
>
300
*
mainGame
->
xScale
)
{
mainGame
->
always_chain
=
event
.
MouseInput
.
isLeftPressed
();
mainGame
->
always_chain
=
event
.
MouseInput
.
isLeftPressed
();
mainGame
->
ignore_chain
=
false
;
mainGame
->
ignore_chain
=
false
;
mainGame
->
chain_when_avail
=
false
;
mainGame
->
chain_when_avail
=
false
;
...
@@ -1665,7 +1665,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1665,7 +1665,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
irr
:
:
EMIE_RMOUSE_PRESSED_DOWN
:
{
case
irr
:
:
EMIE_RMOUSE_PRESSED_DOWN
:
{
if
(
!
mainGame
->
dInfo
.
isStarted
)
if
(
!
mainGame
->
dInfo
.
isStarted
)
break
;
break
;
if
(
mainGame
->
gameConf
.
control_mode
==
1
&&
event
.
MouseInput
.
X
>
300
)
{
if
(
mainGame
->
gameConf
.
control_mode
==
1
&&
event
.
MouseInput
.
X
>
300
*
mainGame
->
xScale
)
{
mainGame
->
ignore_chain
=
event
.
MouseInput
.
isRightPressed
();
mainGame
->
ignore_chain
=
event
.
MouseInput
.
isRightPressed
();
mainGame
->
always_chain
=
false
;
mainGame
->
always_chain
=
false
;
mainGame
->
chain_when_avail
=
false
;
mainGame
->
chain_when_avail
=
false
;
...
...
Classes/gframe/game.cpp
View file @
376b34e2
...
@@ -78,7 +78,7 @@ bool Game::Initialize() {
...
@@ -78,7 +78,7 @@ bool Game::Initialize() {
//start ygocore when mobile is in landscape mode, or using Android tablets or TV.
//start ygocore when mobile is in landscape mode, or using Android tablets or TV.
char
log_scale
[
256
]
=
{
0
};
char
log_scale
[
256
]
=
{
0
};
sprintf
(
log_scale
,
"xScale = %f, yScale = %f
, xStart=%f, yStart=%f"
,
xScale
,
yScale
,
xStart
,
yStart
);
sprintf
(
log_scale
,
"xScale = %f, yScale = %f
"
,
xScale
,
yScale
);
Printer
::
log
(
log_scale
);
Printer
::
log
(
log_scale
);
//io::path databaseDir = options->getDBDir();
//io::path databaseDir = options->getDBDir();
io
::
path
workingDir
=
options
->
getWorkDir
();
io
::
path
workingDir
=
options
->
getWorkDir
();
...
...
Classes/gframe/game.h
View file @
376b34e2
...
@@ -529,8 +529,7 @@ public:
...
@@ -529,8 +529,7 @@ public:
irr
::
gui
::
IGUIButton
*
btnCancelOrFinish
;
irr
::
gui
::
IGUIButton
*
btnCancelOrFinish
;
float
xScale
;
float
xScale
;
float
yScale
;
float
yScale
;
float
xStart
;
float
yStart
;
IYGOSoundEffectPlayer
*
soundEffectPlayer
;
IYGOSoundEffectPlayer
*
soundEffectPlayer
;
#ifdef _IRR_ANDROID_PLATFORM_
#ifdef _IRR_ANDROID_PLATFORM_
ANDROID_APP
appMain
;
ANDROID_APP
appMain
;
...
...
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