Buch {l Wrote}:OK, I took a look at the XDG specification, and I found it pretty difficult to understand what it means (maybe because I am not much more than a newbie): am I right saying that - according to XDG - there are some environmental variables (XDG_DATA_HOME, XDG_CONFIG_HOME etc) which the program should read to know where to save/load data, settings etc?
Buch {l Wrote}:I am really interested by what you made - I once thought of a phone porting (which I was never able to make, for even looking at android NDK documentation scared me and then I got taken by other real-life business ).
//Function to initialize language
void initLang(){
#if defined(ANDROID)
string lang = "";
object* o = NULL;
#else
string lang = string(setlocale(LC_ALL, "")).substr(0,2);//Gets language
setlocale(LC_NUMERIC, "C");//Sets locale for numbers
lang[0] = tolower(lang[0]);//Sets lower letter
object* o = loadLanguagesDB(localePath + string(lang) + ".cfg");//Loads locale
#endif
# The application settings for Android libSDL port
AppSettingVersion=17
LibSdlVersion=1.2
AppName="Physica"
AppFullName=net.sourceforge.physica
ScreenOrientation=h
InhibitSuspend=y
AppDataDownloadUrl="Data|data.zip"
VideoDepthBpp=32
NeedDepthBuffer=n
NeedStencilBuffer=n
NeedGles2=n
SwVideoMode=y
SdlVideoResize=y
SdlVideoResizeKeepAspect=n
CompatibilityHacks=n
CompatibilityHacksStaticInit=n
CompatibilityHacksTextInputEmulatesHwKeyboard=n
CompatibilityHacksPreventAudioChopping=n
CompatibilityHacksAppIgnoresAudioBufferSize=n
CompatibilityHacksAdditionalPreloadedSharedLibraries=""
CompatibilityHacksSlowCompatibleEventQueue=n
CompatibilityHacksTouchscreenKeyboardSaveRestoreOpenGLState=y
AppUsesMouse=y
AppNeedsTwoButtonMouse=n
ShowMouseCursor=n
ForceRelativeMouseMode=n
AppNeedsArrowKeys=y
AppNeedsTextInput=n
AppUsesJoystick=n
AppUsesAccelerometer=n
AppUsesGyroscope=n
AppUsesMultitouch=n
AppRecordsAudio=n
NonBlockingSwapBuffers=n
RedefinedKeys="UP RETURN NO_REMAP NO_REMAP UP ESCAPE"
AppTouchscreenKeyboardKeysAmount=1
AppTouchscreenKeyboardKeysAmountAutoFire=0
RedefinedKeysScreenKb="UP 1 2 3 4 5 6 7 8 9"
RedefinedKeysScreenKbNames="0 1 2 3 4 5 6 7 8 9"
StartupMenuButtonTimeout=2000
HiddenMenuOptions='OptionalDownloadConfig'
FirstStartMenuOptions=''
MultiABI=n
AppMinimumRAM=16
AppVersionCode=200
AppVersionName="2.0"
ResetSdlConfigForThisVersion=n
DeleteFilesOnUpgrade="%"
CompiledLibraries="sdl_image sdl_ttf sdl_mixer sdl_gfx curl"
CustomBuildScript=n
AppCflags='-O2 -finline-functions -frtti -fexceptions -fpermissive -std=c++11'
AppLdflags=''
AppOverlapsSystemHeaders=
AppSubdirsBuild=''
AppBuildExclude=''
AppCmdline=''
ReadmeText='^Readme text'
MinimumScreenSize=s
AdmobPublisherId=n
AdmobTestDeviceId=
AdmobBannerSize=
Buch {l Wrote}:What kind of controls have you implemented?
Buch {l Wrote}:and I know that the game uses too much CPU, for the SDL library is not very efficient. Maybe this could be improved? I don't really know what kind of graphics library android supports natively...
Buch {l Wrote}:Also, have you got a repo with the code you changed? I'd really like to take a look at that, and sharing the Android port would be nice
acme_pjz {l Wrote}:Maybe double buffer is not needed because it reduces the speed, just change SDL_SWSURFACE to SDL_HWSURFACE and try if it works
acme_pjz {l Wrote}:Just use SDL OpenGL SDL_gfx is not hardware-accelerated, it uses too much CPU
0zone0ne {l Wrote}:Unfortunately I'm a mac user so I won't be able to play this game...
MCMic {l Wrote}:You can try building it, SDL is available for Mac.
g++ -w src/*.cpp src/PugiXML/*.cpp src/TinyJS/*.cpp -obin/test -L/usr/local/lib -lSDL2main -lSDL2 -lSDL2_image -lSDL2_gfx -lSDL2_ttf
Users browsing this forum: No registered users and 1 guest