The preview was broken anyway, since it rendered to the main
window of dev mode instead of the preview widget inside the
tool dialog. It has been disabled to avoid graphics corruption
on the main window.
Hardcode the few remaining palette references instead. We might want to
include some method to customize some colors again, but not for debug
display and such things.
This is a whitespace-only patch. Hopefully, it'll only affect rarely-changed
parts of the engine, since all regularly maintained pieces should already
use tabs.
This avoids drawing to a surface while the surface is created, or during
other DebugLog stuff. SetInitProgress should be called during relatively
stable points.
Instead of sprinkling calls to select the right context throughout the code,
store the context to use in the CSurface, and create a CSurface for every
window that's drawn to, and use that as the target parameter for the drawing
calls. D3D is probably even more broken now, but it should work just fine with
the right surface creation incantation.
All C4IDs are now stored in auto-created global constants with the same name
as the ID itself. There is no special parsing of IDs anymore; this means that
you need to use the C4Id function if you aren't sure whether an ID exists.
IDs in portrait strings aren't working, since I expect portrait support to be
removed from the engine.
It's very annoying to have developer mode dialogs on top of everything else.
Keep them on top of the current viewport, but below other apps when OC isn't
the foreground.
SW_* flags are not bitfields, but an enumeration of values.
The old code only worked by chance, since SW_SHOWNORMAL|SW_SHOWNA is actually
9, which in turn is the value of SW_RESTORE. Since it seems non-activated
normal window size is the expected behavior, the correct value to use is
SW_SHOWNOACTIVATE.
The exact warning message was
GLib-WARNING **: g_main_context_prepare(): main loop already active in another
thread
The problem was that there is code in C4Console.cpp which iterates the Glib
main loop to update the Console window while loading the game. This was not
synchronized with CGLibProc - we can't iterate the mainloop when the CGLibProc
already does.