1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Android support (#299)

* AI libs registering shenanigans on android;
* Fixed resolution aspect + mouse event scaling;
* Proper server init/deinit (through android IPC);
Enabled threaded init in CMT;
* Prevented a deadlock in logger on some devices;
* Fixed frozen intro frame after interrupting the video;
Added android progressbar displaying during initial data loading;
* Hacky fix for choppy animations during heroes movement (should look better now, but it's definitely not a good solution);
* Changes/fixes for new android launcher building process;
* Fixed app hang after getting SDL_QUIT when activity was destroyed;
* Functioanal, configurable advmap swiping support;
* VCMI changes cleanup;
Added few missing VCMI_ANDROID guards on swipe mechanics;
* Removed unneeded sleep in server startup code for android;
* Removed android ioapi hack (fixed in newest ndk);
* Removed unused android's library loading logic;
* Added android's swipe option to settings schema;
* Moved NO_STD_TOSTRING to be defined in global.h instead of build files;
This commit is contained in:
Fay
2017-05-25 19:57:20 +02:00
committed by Alexander Shishkin
parent f370cdf1c7
commit b5daa24982
25 changed files with 643 additions and 189 deletions

View File

@@ -353,7 +353,11 @@ void CPlayerInterface::heroMoved(const TryMoveHero & details)
for (int i=1; i<32; i+=2*speed)
{
movementPxStep(details, i, hp, hero);
#ifndef VCMI_ANDROID
// currently android doesn't seem to be able to handle all these full redraws here, so let's disable it so at least it looks less choppy;
// most likely this is connected with the way that this manual animation+framerate handling is solved
adventureInt->updateScreen = true;
#endif
adventureInt->show(screen);
{
//evil returns here ...
@@ -1647,7 +1651,11 @@ void CPlayerInterface::update()
GH.updateTime();
GH.handleEvents();
#ifdef VCMI_ANDROID
if (adventureInt && !adventureInt->isActive() && (adventureInt->swipeTargetPosition.x >= 0 || adventureInt->swipeTargetPosition.y >= 0))
#else // !VCMI_ANDROID
if (adventureInt && !adventureInt->isActive() && adventureInt->scrollingDir) //player forces map scrolling though interface is disabled
#endif // !VCMI_ANDROID
GH.totalRedraw();
else
GH.simpleRedraw();