OSD is now using the kGUIFont instead. The main advantage is that
the kGUIFont can be used for translated text while only ASCII
characters were present in ScummFont.
This partly fixes the OpenGL mode mess, but now OpenGL Normal and OpenGL
Conserve will feature the same semantics when aspect ratio correction is
enabled... That is still something to solve.
First step into making all state variables of the OpenGL backend private, to
help making the backend more maintainable, by disallowing subclasses to just
mess with everything...
Now subclasses will not need to worry about the scaling logic themselves, but
just need to implement setInternalMousePosition, which should handles setting
the system's mouse coordinates.
This fixes a segfault when trying to use the OpenGL backend with 16bpp games,
however this does not make Last Express nor Loom PC-Engine Japanese work for
me. They now fail with a "Pixel format not supported" error.
If we do not do this, we might end up with a default alignment of 4, which will
fail (as in the graphics will be messed up) in case the screen resolution is
not divisible by 4.
Thanks to digitall for noticing this problem and finding out about
GL_UNPACK_ALIGNMENT.
Rather than that I introduced a function which converts hardware screen
coordinates to overlay / game screen coordinates.
The logic which converts mouse movement events with hardware screen
coordinates to overlay / game screen coordinates is now inside notifyEvent.
This is still broken design, since one should not abuse an observer for that.
This actually still has the drawback that if one calls OSystem::updateScreen
from the sound thread that it might crash. Hopefully no code does this though...
svn-id: r54830
I added an comment explaining why OSD is broken currently. The basic problem is
that OpenGL is not thread safe, thus in case we try to display any message on
the OSD from the sound thread for example it will result in crashes.
svn-id: r54829
Now the previous aspect ratio modes are handled as GFX modes. The previous
GFX modes were for scaling, but are removed now. A new 4/3 display mode
added. Added Ctrl-Shift-A for backward switching through display modes, and
Ctrl-Alt-<number key> for switching to a specific GFX mode.
Window resizing now is available for all display modes, and will
automatically change the scale factor as well as maintain the aspect ratio
when needed.
svn-id: r52501