For completeness, this adds functions sys_window_fit_in_display
and sys_get_window_display_index.
Practically it has no effect as in ScummVM we don't support
multiscreen and the resolution is hardcoded.
Partially from upstream 1afc61df54681ffe2fddc0d30bb2221c38a0fa79 and
b17f58d90061c3b12c9e4c04183dc59b094d66cb
This is more logical than calling this from "engine_setup",
and also fixes running another AGS game from current game after commit 5596736 .
From upstream a82d8147d4424b0aa83762d810db96cff31d7af9
Added a template specialization for 2bpp to 2bpp blits in
BITMAP::drawInner, makes 2bpp to 2bpp now around 2 times as fast as
normal 4bpp to 4bpp blitting.
Just commiting my first attempts at optimizing BITMAP::draw and the
blendPixel function. Here's an overview of the changes (some are
temporary):
- Put the loop of BITMAP::draw into its own function drawInner.
I templated it so that I could put different paths into the loop that
could be optimized out at compile time if a certain blending function
didn't need it etc.
- I added apple NEON (SIMD) intrensics to the drawInner function,
haven't ported it to SSE yet, but there is a small library that actually
maps neon intrensics to sse ones.
- Removed a few ifs from the normal x loop and put it in the y loop.
The old benchmark benchmarked the render_to_screen function, which
wasn't specific enough to what is needing to be benchmarked (
BITMAP::draw, and blending functions), so it was changed to just use the
drawing functions of allegro's bitmap directly. Also from just looking
at other games, it seems like AGS games use truecolor graphics more
often than not, so the benchmark test graphic was changed to truecolor.
This may be a temporary solution, but it's necessary, because otherwise
engine will fail later, with a seemingly unrelated error, which will
be harder to diagnose.
From upstream 902568c4eba9dba4eb762882890c6e8a308683aa
From upstream e924778ce3f88a4c821a4eecfea8edc353a6807b
In ScummVM they were already bools, but where still assigned values
of 0 and 1 instead of false and true in some places.
* Added `[misc] multitasking=[0,1]` to config, acting as a *starting*
setting, which may be changed by runtime call to `SetMultitaskingMode`;
* Ensure multitasking mode is overridden by connected external debugger
(always on, if possible);
* Let multitasking mode work in "fullscreen desktop" gfx mode (still
disabled in exclusive fullscreen);
* Now correctly reset multitasking mode if gfx mode changes.
From upstream 9f091926e393f75c90c951f9597710bf17395332
This helps kill "hanging" scripts if user closed the window while
there's no real engine update.
From upstream a758fd6de2dccd0c948fc7f9e5b65200df902a65