diff --git a/project/jni/application/opentyrian/AndroidAppSettings.cfg b/project/jni/application/opentyrian/AndroidAppSettings.cfg index 66b124745..f6a9e096d 100644 --- a/project/jni/application/opentyrian/AndroidAppSettings.cfg +++ b/project/jni/application/opentyrian/AndroidAppSettings.cfg @@ -1,21 +1,16 @@ # The application settings for Android libSDL port -AppSettingVersion=19 - -# libSDL version to use (1.2 or 1.3, specify 1.3 for SDL2) -LibSdlVersion=1.2 - # Specify application name (e.x. My Application) AppName="OpenTyrian" # Specify reversed site name of application (e.x. com.mysite.myapp) AppFullName=com.googlecode.opentyrian -# Specify screen orientation: (v)ertical/(p)ortrait or (h)orizontal/(l)andscape -ScreenOrientation=h +# Application version code (integer) +AppVersionCode=2124 -# Do not allow device to sleep when the application is in foreground, set this for video players or apps which use accelerometer -InhibitSuspend=n +# Application user-visible version name (string) +AppVersionName="2.1.24" # Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...' # If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu @@ -25,6 +20,22 @@ InhibitSuspend=n # Also please avoid 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS AppDataDownloadUrl="Data files size is 11 Mb|tyrian21-data.zip|http://sourceforge.net/projects/libsdl-android/files/OpenTyrian/tyrian21-data.zip/download|http://sites.google.com/site/xpelyax/Home/tyrian21-data.zip?attredirects=0&d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/tyrian21-data.zip" +# Reset SDL config when updating application to the new version (y) / (n) +ResetSdlConfigForThisVersion=n + +# Delete application data files when upgrading (specify file/dir paths separated by spaces) +DeleteFilesOnUpgrade="%" + +# Here you may type readme text, which will be shown during startup. Format is: +# Text in English, use \\\\n to separate lines (that's four backslashes)^de:Text in Deutsch^ru:Text in Russian^button:Button that will open some URL:http://url-to-open/ +ReadmeText='^You may press "Home" now - the data will be downloaded in background' + +# libSDL version to use (1.2/1.3/2.0) +LibSdlVersion=1.2 + +# Specify screen orientation: (v)ertical/(p)ortrait or (h)orizontal/(l)andscape +ScreenOrientation=h + # Video color depth - 16 BPP is the fastest and supported for all modes, 24 bpp is supported only # with SwVideoMode=y, SDL_OPENGL mode supports everything. (16)/(24)/(32) VideoDepthBpp=16 @@ -49,9 +60,19 @@ SdlVideoResize=y # Application resizing will keep 4:3 aspect ratio, with black bars at sides (y)/(n) SdlVideoResizeKeepAspect=n +# Do not allow device to sleep when the application is in foreground, set this for video players or apps which use accelerometer +InhibitSuspend=n + +# Create Android service, so the app is less likely to be killed while in background +CreateService= + # Application does not call SDL_Flip() or SDL_UpdateRects() appropriately, or draws from non-main thread - # enabling the compatibility mode will force screen update every 100 milliseconds, which is laggy and inefficient (y) or (n) -CompatibilityHacks=n +CompatibilityHacksForceScreenUpdate=n + +# Application does not call SDL_Flip() or SDL_UpdateRects() after mouse click (ScummVM and all Amiga emulators do that) - +# force screen update by moving mouse cursor a little after each click (y) or (n) +CompatibilityHacksForceScreenUpdateMouseClick=y # Application initializes SDL audio/video inside static constructors (which is bad, you won't be able to run ndk-gdb) (y)/(n) CompatibilityHacksStaticInit=n @@ -85,6 +106,10 @@ AppUsesMouse=y # Application needs two-button mouse, will also enable advanced point-and-click features (y) or (n) AppNeedsTwoButtonMouse=n +# Right mouse button can do long-press/drag&drop action, necessary for some games (y) or (n) +# If you disable it, swiping with two fingers will send mouse wheel events +RightMouseButtonLongPress=n + # Show SDL mouse cursor, for applications that do not draw cursor at all (y) or (n) ShowMouseCursor=n @@ -106,20 +131,35 @@ AppUsesJoystick=n # Application uses second on-screen joystick, as SDL joystick 0 axes 2-3 (y)/(n) AppUsesSecondJoystick=n +# Application uses third on-screen joystick, as SDL joystick 0 axes 20-21 (y)/(n) +AppUsesThirdJoystick= + # Application uses accelerometer (y) or (n), the accelerometer will be used as joystick 1 axes 0-1 and 5-7 AppUsesAccelerometer=n # Application uses gyroscope (y) or (n), the gyroscope will be used as joystick 1 axes 2-4 AppUsesGyroscope=n +# Use gyroscope to move mouse cursor (y) or (n), it eats battery, and can be disabled in settings, do not use with AppUsesGyroscope setting +MoveMouseWithGyroscope= + # Application uses multitouch (y) or (n), multitouch events are passed as SDL_JOYBALLMOTION events for the joystick 0 -AppUsesMultitouch=n +AppUsesMultitouch=y # Application records audio (it will use any available source, such a s microphone) # API is defined in file SDL_android.h: int SDL_ANDROID_OpenAudioRecording(SDL_AudioSpec *spec); void SDL_ANDROID_CloseAudioRecording(void); # This option will add additional permission to Android manifest (y)/(n) AppRecordsAudio=n +# Application needs to access SD card. If your data files are bigger than 5 Mb, enable it. (y) / (n) +AccessSdCard= + +# Application needs Internet access. If you disable it, you'll have to bundle all your data files inside .apk (y) / (n) +AccessInternet= + +# Immersive mode - Android will hide on-screen Home/Back keys. Looks bad if you invoke Android keyboard. (y) / (n) +ImmersiveMode= + # Application implements Android-specific routines to put to background, and will not draw anything to screen # between SDL_ACTIVEEVENT lost / gained notifications - you should check for them # rigth after SDL_Flip(), if (n) then SDL_Flip() will block till app in background (y) or (n) @@ -136,9 +176,6 @@ RedefinedKeys="SPACE RETURN NO_REMAP NO_REMAP SPACE" # Number of virtual keyboard keys (currently 6 is maximum) AppTouchscreenKeyboardKeysAmount=4 -# Number of virtual keyboard keys that support autofire (currently 2 is maximum) -AppTouchscreenKeyboardKeysAmountAutoFire=0 - # Redefine on-screen keyboard keys to SDL keysyms - 6 keyboard keys + 4 multitouch gestures (zoom in/out and rotate left/right) RedefinedKeysScreenKb="SPACE RETURN LALT LCTRL" @@ -169,24 +206,12 @@ HiddenMenuOptions='SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMouse.Dis # SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout FirstStartMenuOptions='' -# Enable multi-ABI binary, with hardware FPU support - it will also work on old devices, -# but .apk size is 2x bigger (y) / (n) / (x86) / (all) -MultiABI=all +# Specify architectures to compile, 'all' or 'y' to compile for all architectures. +# Available architectures: armeabi armeabi-v7a armeabi-v7a-hard x86 mips +MultiABI='armeabi-v7a' # Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower -AppMinimumRAM=32 - -# Application version code (integer) -AppVersionCode=2123 - -# Application user-visible version name (string) -AppVersionName="2.1.23" - -# Reset SDL config when updating application to the new version (y) / (n) -ResetSdlConfigForThisVersion=n - -# Delete application data files when upgrading (specify file/dir paths separated by spaces) -DeleteFilesOnUpgrade="%" +AppMinimumRAM=0 # Optional shared libraries to compile - removing some of them will save space # MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed @@ -197,7 +222,7 @@ CompiledLibraries="sdl_net" CustomBuildScript=n # Aditional CFLAGS for application -AppCflags='-O3' +AppCflags='-std=c99 -O3 -DTARGET_UNIX -DWITH_NETWORK -Wall -Wextra -Wno-missing-field-initializers' # Additional LDFLAGS for application AppLdflags='' @@ -214,10 +239,6 @@ AppBuildExclude='' # Application command line parameters, including app name as 0-th param AppCmdline='' -# Here you may type readme text, which will be shown during startup. Format is: -# Text in English, use \\\\\\\\n to separate lines^de:Text in Deutsch^ru:Text in Russian, and so on (that's four backslashes, nice isn't it?) -ReadmeText='^You may press "Home" now - the data will be downloaded in background' - # Screen size is used by Google Play to prevent an app to be installed on devices with smaller screens # Minimum screen size that application supports: (s)mall / (m)edium / (l)arge MinimumScreenSize=s @@ -228,6 +249,6 @@ AdmobPublisherId=n # Your AdMob test device ID, to receive a test ad AdmobTestDeviceId= -# Your AdMob banner size (BANNER/IAB_BANNER/IAB_LEADERBOARD/IAB_MRECT/IAB_WIDE_SKYSCRAPER/SMART_BANNER) +# Your AdMob banner size (BANNER/FULL_BANNER/LEADERBOARD/MEDIUM_RECTANGLE/SMART_BANNER/WIDE_SKYSCRAPER/FULL_WIDTH:Height/Width:AUTO_HEIGHT/Width:Height) AdmobBannerSize= diff --git a/project/jni/application/opentyrian/src/mainint.c b/project/jni/application/opentyrian/src/mainint.c index 197d7a222..203b2001c 100644 --- a/project/jni/application/opentyrian/src/mainint.c +++ b/project/jni/application/opentyrian/src/mainint.c @@ -2399,9 +2399,6 @@ void JE_operation( JE_byte slot ) wait_noinput(false, true, false); JE_barShade(VGAScreen, 65, 55, 255, 155); -#ifdef ANDROID - SDL_ANDROID_ToggleScreenKeyboardWithoutTextInput(); -#endif bool quit = false; while (!quit) { @@ -2513,9 +2510,6 @@ void JE_operation( JE_byte slot ) case SDLK_RETURN: case SDLK_SPACE: quit = true; -#ifdef ANDROID - SDL_ANDROID_ToggleScreenKeyboardWithoutTextInput(); -#endif JE_saveGame(slot, stemp); JE_playSampleNum(S_SELECT); break;