CrystalSpace for OS/2

The OS/2 port of CrystalSpace has a number of specific features that should be mentioned, so that you can better understand sourcecode and/or make modifications, if you need them (if you do, you should make them available to the public, as stated by LGPL).

DIVE

The current implementation requires DIVE, so the application is compiled as a PM application, and you will need to write a .DEF file for your executable(-s), like below:

NAME Cryst WINDOWAPI
DESCRIPTION "CrystalSpace test executable"
STACKSIZE 1048576
If you won't define the WINDOWAPI flag, the executable will not work.

Other thing you should keep in mind is that DIVE library (libDIVE.cpp) uses a couple of resources, so you should not forget to link the resources to your application. Resources can be found in libDIVE.rc

There is one feature not too pleasant related to DIVE (or to acceleration hardware specifics?). If DIVE image should be rescaled (i.e. the scale ratio is not 1:1) DIVE is almost TWICE (!) slower if DIVE window (the client rectangle, not the window border) is not on a two-aligned bound (at least such an effect I've got on my Matrox Mystique). If you get low frame rates, try moving the window by one pixel left/right.

To fix this if you use WINDOWX/WINDOWY keywords in cryst.cfg file or -pos x command-line switch, the computed X value will be rounded to nearest divisor of 2. However, if you manually move the window it can fall on a odd bound and you'll get twice lower frame rates.

You can use WINDOWWIDTH and WINDOWHEIGHT keywords in cryst.cfg file to define start window width and height (client window width and height, not counting borders and titlebar). If you won't define it, the DIVE window will be rescaled to the maximum possible integer factor such that window won't be larger than screen. For example, a 320x200 window in 1152x864 resolution will be automatically rescaled at startup to 960x600.

DIVE features

Here is a short list of implementation features related to DIVE:

Mouse/keyboard

I was too lazy to intercept system event queue, so code generates all CrystalSpace events from events that are passed to DIVE window. As a consequence, there are some (minor) flaws:


Contributors

For the moment, there is only one contributor :-) If you have any problems/questions related to OS/2 port, mail them to me:

e-mail:

"Andrew Zabolotny" <bit@freya.etu.ru>

You also may want to check the PGCC for OS/2 home page, which I'm maintaining. You also may want to use PGCC for CrystalSpace since it better optimizes for Pentium and alike than regular GCC.