The code is moved from game_controller::init_language to
game_controller::init_video. This makes porting the code to SDL 2
easier. In SDL 2 the caption must be set after the main window exists.
It could be set in the constructor of the Window, but that can be done
once we drop SDL 1.2 support.
The game now starts and can be played. There are a lot of visual
glitches, but visual it is playable.
The text input is completely broken, due to the changes in the
SDL 2 API and the band-aid compile fixes.
It is unknown whether the platform still works with the current Wesnoth
code. To ease the SDL 2.0 transition support is removed. If a maintainer
steps up support can be added again.
It is unknown whether the platform still works with the current Wesnoth
code. To ease the SDL 2.0 transition support is removed. If a maintaine
steps up support can be added again.
It is unknown whether the platform still works with the current Wesnoth
code. To ease the SDL 2.0 transition support is removed. If a maintainer
steps up support can be added again.
Also change its return to an optimised surface. Fixes bug #20876.
From the comment added to the source:
Unlike other image functions cut_surface does not convert the input
surface to a neutral surface, nor does it convert its return surface
to an optimised surface.
Since it seems to work for most cases, rather change this caller instead
of the function signature. (The issue was discovered in bug #20876).
For some reason, ~BG() used SDL_BlitSurface() directly instead of using
the alternate blit_surface() implementation, unlike every other image
path function type in existence that needs to do blitting.
This works the first time when scaling or cropping an image (say,
"misc/blank-hex.png~BG()~CROP(0,0,34,34)"), but the second time it's
used with different scaling/cropping parameters, it yields the result it
would without ~BG() in the pipeline. This is somehow remedied by this
change, and I don't see any potential issues arising from it anyway
(save for a negligible performance impact on ~BG(), maybe).
This branch makes it possible to compile Wesnoth using SDL2. Running the
resulting binary will not work however, that will be worked upon later.
Note compilation with strict compilation fails and will for the near
future since some struct members changed signedness.
wesnoth.synchronize_choice checks the return value of toconfig fcn,
and if it indicated that it partially failed to convert the table,
it will chat a warning, IF wesnoth is running in debug mode
(that is game_config::debug = true, which is determined by e.g.
the command line flag --debug)
by fixing up bad commit eb9274bd4c78a5f9a86bc9e0bf748f701d81e6b1.
the code to drop messages older than 5 should run inside the if block,
in the scenario when there were previous message, not outside it (!)
With this missing, certain combinations of actions/events would lead to
the ids of all CAs being dropped (e.g. in saves after using
[modify_ai]), which resulted in it not being possible to remove CAs any
more as that is done by id.
This fixes bug #21750.
MSVC was throwing error C2244 when trying to match some function
definitions to their declarations. This commit moves those
definitions to their declarations. The declarations are harder
for a human to read now, but at least all supported compilers
can understand it.