Commit 376b34e2 authored by kenan's avatar kenan

opt code

parent 416637c4
...@@ -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;
......
...@@ -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();
......
...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment