Jump to content

GEMRB on Android


Guest Chas Grady

Recommended Posts

Guest Beholder

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
Guest Beholder
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
Guest Beholder
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

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
Guest Beholder

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

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
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
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...