Jump to content

Compiling GemRB for Windows Mobile


Guest Guest_David_*

Recommended Posts

Guest Guest_David_*

Hi, I have seen that there are ports of the following for Winmo:

- Python: http://sourceforge.net/projects/pythonce/

- SDL: http://www.libsdl.org/faq.php?action=liste...p;category=4#40

- OpenAL: http://old.nabble.com/OpenAL-porting-to-Wi...-p17126372.html

 

Do you think it would be possible to "easily" port or compile GemRB for Windows mobile/ce ?

 

Thanks for this great project :suspect:

Link to comment
Guest LvDisturbed1

I have a HTC HD2, which should be able to handle running this, but sadly, no WM port exists yet. If I knew anything about programing, I would try to do it, but sadly, I don't. Hell, if someone ports it over to WM, I will send a nice donation to your paypal...

Link to comment
Guest LaughingKiwi

I have downloaded the source, installed the required packages and have struck a few problems. Additional dependencies include libpng and zlib.

 

Win CE uses a subset of the C runtime library, so not all functions are available. This also means that a few header files are not available on Win CE (notably io.h and direct.h). Also, there are a bunch of string functions not available in Win CE (notably stricmp, strnicmp, strdup). I discovered a couple of GemRB implementations of these functions and will make use of these, and also add implementations of my own. Another issue is the lack of a Console window, so all debug/trace messages need to go somewhere else, probably a log file for now.

 

The other problem is a lack of platform identification. The current source code does not recognize the platform as Win32, so I have added the necessary #ifdef WINCE #define WIN32.

 

There are several classes that will need to have a WinCE implementation, notably VFS, FileStream and other file-system based classes. The rest of the project has been well designed (it's nice to see developers doing it right, and that's with 15 years programming experience behind me) with all other classes using the core framework classes instead of reverting to the native C runtime.

 

I will continue working on this in my spare time and hope to have an implementation ready in the next couple of months. It appears that getting this to work under Win CE is not as easy as originally thought. I also expect that I will use EdgeLib to implement audio, video and file system plugins. If so, then I should be able to get a version working for Windows Mobile, iPhone and Android.

Link to comment
Guest LvDisturbed1
I have downloaded the source, installed the required packages and have struck a few problems. Additional dependencies include libpng and zlib.

 

Win CE uses a subset of the C runtime library, so not all functions are available. This also means that a few header files are not available on Win CE (notably io.h and direct.h). Also, there are a bunch of string functions not available in Win CE (notably stricmp, strnicmp, strdup). I discovered a couple of GemRB implementations of these functions and will make use of these, and also add implementations of my own. Another issue is the lack of a Console window, so all debug/trace messages need to go somewhere else, probably a log file for now.

 

The other problem is a lack of platform identification. The current source code does not recognize the platform as Win32, so I have added the necessary #ifdef WINCE #define WIN32.

 

There are several classes that will need to have a WinCE implementation, notably VFS, FileStream and other file-system based classes. The rest of the project has been well designed (it's nice to see developers doing it right, and that's with 15 years programming experience behind me) with all other classes using the core framework classes instead of reverting to the native C runtime.

 

I will continue working on this in my spare time and hope to have an implementation ready in the next couple of months. It appears that getting this to work under Win CE is not as easy as originally thought. I also expect that I will use EdgeLib to implement audio, video and file system plugins. If so, then I should be able to get a version working for Windows Mobile, iPhone and Android.

 

Nice to see someone working on it. Thanks for the taking the time to work on it. If you get it working for windows mobile, I will send $100USD to you.

Link to comment

Well I finally have it compiling, but not running apart from game initialization (all core resources loaded, plugins initialized etc). Decided to use the AirPlay SDK rather than EdgeLib, since AirPlay have an Indie Developer licence that I will obtain this month. It also means I can target iPhone and iPad. However, the SDK uses a sandbox-style file system that makes loading resources a little problematic. And there is no support for Python (yet - will be in the next release). I now need to build an AirPlay Video Driver. After that, the AirPlay Sound Driver.

 

I am thinking about converting all the scripts back to LUA. I have LUA integration working, but this means that I need to convert all of the C functions (um, 9932 lines of code! Gee, you have been a busy boy Avenger :suspect: ) as well as all of the Python scripts. I was aiming to have a look at all of the GUI scripts anyway in order to see if I can throw in support for any resolution. iPhone resolution will be the minimum (480x320, Half VGA) which means I will scale the GUI to 75%. Main game screen will not be scaled, which means that some of the world (top and bottom) will be clipped.

 

I aim to have HVGA (480x320), VGA (640x480), WVGA (800x480), SVGA (800x640) and XGA (1024x768) resolutions supported. BG2-sized (native SVGA games) on HVGA/VGA will be scaled down to 75% by the video driver. Luckily, the AirPlay emulator allows me to specify any window size for testing.

 

The other main issues I need to address is the limited available RAM (need to run the game on only 128MB RAM, according to the Bioware site a minimum of 32MB is recommended, but this is likely to be different for GemRB) and touch-input (no right click, maybe see if I can support gestures such as swipe, drag/drop, and click-hold) and word-aligned pointers for ARM. Apparently all pointers on ARM should point to word-aligned addresses, so that means all code using byte* will need to be looked at. I have yet to confirm if this is an issue. There is also camera movement. With no edge-scrolling I will look into keeping the camera centred on the selected player/target. Then there is door/item selection with no mouse hover. I will look into auto-highlighting nearby doors and items. Finally, I think it would be nice to toggle between landscape and portrait as the user rotates the device to get around top/bottom clipping issues.

 

My next milestone will be the completion of the video driver and running the intro movies.

 

And like LvDisturbed1 I am doing this because I also have an HTC HD2 and am curious to see it running on that. But heck, this would also be a reason for me to buy an iPad!!

Link to comment
Guest Guest_Cuiv

Laughing Kiwi, your work is absolutely awesome - I am an iPhone user and it is very very encouraging to know that you are keeping the possibility of implementing it on that platform!

Thank you very much!

Cuiv

Link to comment
Guest Guest_David_*

Hey Laughing Kiwi, keep going! I'm an owner of a HTC Touch (1, sadly) and I'm also very interested in your progress.

 

When you get it working, please set up a Paypal account. I'll send you 100USD too.

 

You are going to get rich! ???

Link to comment
Guest LvDisturbed1

Laughing Kiwi, I have an idea, but not sure of the possibility of implementing it.

 

If you can map a few functions to the hard keys, that would make the game more playable. For instance, mapping right-click by holding down the back key(probably difficult or impossible), or mapping pause to one of the volume keys(seems more likely, but I don't know programing).

 

The idea of using the g-sensor to control scrolling is a bad idea. It sounds like a good idea, but then you realize you have to play the game perfectly level else your camera is not where you want it.

 

Keep up the work, we all appreciate it.

Link to comment
The idea of using the g-sensor to control scrolling is a bad idea. It sounds like a good idea, but then you realize you have to play the game perfectly level else your camera is not where you want it.

Yes, it is probably requiring an additional pressing of a button or some other input.

Link to comment

Archived

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

×
×
  • Create New...