Guest Beholder Posted November 17, 2010 Share Posted November 17, 2010 Hi, I'm working on a port GemRB on Android. OpenAL is not supported in Android, but there is support for SDL-Mixer. I know in GemRB 0.6.2 it is possible to use the SDL-Mixer instead of OpenAL. How to compile project to use with SDL-Mixer? Link to comment
lynx Posted November 17, 2010 Share Posted November 17, 2010 Having it installed should be enough. *It* of course also including the headers. Link to comment
Guest Beholder Posted November 17, 2010 Share Posted November 17, 2010 Having it installed should be enough. *It* of course also including the headers. So I can delete the OpenAL plugin from the project source? The game recognizes that it is necessary to use SDLMixer? It should be specified in the config or does automaticly? Link to comment
lynx Posted November 17, 2010 Share Posted November 17, 2010 You can delete the source too, but it is not necessary. The game will use whichever plugin is available or none (the NullSound plugin), but you can also specify it in the config. Link to comment
Guest Beholder Posted November 17, 2010 Share Posted November 17, 2010 You can delete the source too, but it is not necessary. The game will use whichever plugin is available or none (the NullSound plugin), but you can also specify it in the config. Thank you lynx. I'll report the results if anything happens. Link to comment
Guest Beholder Posted November 19, 2010 Share Posted November 19, 2010 I was able to run GemRB 0.6.2 on my Desire HD (Android 2.2 phone). This required making a few changes to the original source. While there are a few bugs with the rendering, I soon will correct them. Sound does not work either. But there is hope for the success of the port! The question, as in the config file to include the use of SDLMixer? Do not automatically want to work. The second question. WideScreen mod works with GemRB? Can I put the resolution to 800x480? Link to comment
lynx Posted November 19, 2010 Share Posted November 19, 2010 Are you sure the plugin was built at all? The widescreen mod does work with gemrb and we don't enforce any further limitations (the opposite ). Link to comment
Guest Beholder Posted November 19, 2010 Share Posted November 19, 2010 Several python scripts not work. Such as Start.py works by CharGen.py not. What modules are needed in Python? Not all modules can be build for Android. Link to comment
Guest Beholder Posted November 19, 2010 Share Posted November 19, 2010 bool GUIScript::LoadScript(const char* filename) { if (!Py_IsInitialized()) { return false; } printMessage( "GUIScript", "Loading Script ", WHITE ); #ifdef ANDROID __android_log_print(ANDROID_LOG_INFO, "GUIScript", "%s...", filename ); #else printf( "%s...", filename ); #endif char path[_MAX_PATH]; strcpy( path, filename ); PyObject *pName = PyString_FromString( filename ); /* Error checking of pName left out */ if (pName == NULL) { printStatus( "ERROR", LIGHT_RED ); return false; } if (pModule) { Py_DECREF( pModule ); } pModule = PyImport_Import( pName ); Py_DECREF( pName ); if (pModule != NULL) { pDict = PyModule_GetDict( pModule ); if (PyDict_Merge( pDict, pMainDic, false ) == -1) { printStatus( "ERROR", LIGHT_RED ); return false; /* pDict is a borrowed reference */ } } else { PyErr_Print(); printStatus( "ERROR", LIGHT_RED ); return false; } printStatus( "OK", LIGHT_GREEN ); return true; } In this code on loading CharGen.py pModule=NULL Link to comment
lynx Posted November 20, 2010 Share Posted November 20, 2010 Apart from the two modules gemrb builds, we use only sys and math. Did you do a custom install? It's odd that Start.py got found while the other didn't, since they're both in the same dir. You didn't run out of space? Check manually if the file is ok. Link to comment
Guest Beholder Posted November 20, 2010 Share Posted November 20, 2010 Apart from the two modules gemrb builds, we use only sys and math. Did you do a custom install? It's odd that Start.py got found while the other didn't, since they're both in the same dir. You didn't run out of space? Check manually if the file is ok. CharGen.py is ok, I get GUIScript folder completely from source package. I think the issue with python library. And unfortunately I can not redirect stderr output to the Android log to get the error message. Link to comment
lynx Posted November 20, 2010 Share Posted November 20, 2010 You could try setting up sys.stderr to point to an open file. Link to comment
Beholder Posted November 20, 2010 Share Posted November 20, 2010 You could try setting up sys.stderr to point to an open file. Thank you. I got error output! Traceback (most recent call last): File "/sdcard/app-data/net.sourceforge.gemrb/GUIScripts/bg2/CharGen.py", line 22, in <module> import GUICommonWindows File "/sdcard/app-data/net.sourceforge.gemrb/GUIScripts/bg2/GUICommonWindows.py", line 41, in <module> import GUIREC File "/sdcard/app-data/net.sourceforge.gemrb/GUIScripts/bg2/GUIREC.py", line 29, in <module> import DualClass File "/sdcard/app-data/net.sourceforge.gemrb/GUIScripts/DualClass.py", line 26, in <module> import LUSpellSelection File "/sdcard/app-data/net.sourceforge.gemrb/GUIScripts/LUSpellSelection.py", line 21, in <module> from math import ceil ImportError: No module named math I'll try to build my python library with this module. Link to comment
lynx Posted November 20, 2010 Share Posted November 20, 2010 No, just wait for a bit. I'll reimplement ceil, so we won't need that module at all (it's the only function we use). Link to comment
Beholder Posted November 20, 2010 Share Posted November 20, 2010 Not a trouble, i compiled library with math module. Wowwww! Game works perfectly!!!!! FPS is pretty good! But no music and sounds playing. I'll try to fix it in soon. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.