- Introduce AtariSurface: a surface which represents either a
bitplane-based or pixel-based surface (on SuperVidel, as an inherited
SuperVidelSurface). Screen::surf / Screen::offsettedSurf are its
instances.
- Graphics::Surface::create / free now handle all Atari-related surfaces
via dlmalloc: ST RAM (TT/Falcon), VRAM (SuperVidel - 0xA0xxxxxx) and
VRAM for generic surfaces (SuperBlitter - 0xA1xxxxxx or ST/TT RAM).
This allowed me to remove all the hacky stuff from atari-graphics and
atari-superblitter.h.
- blit-atari.cpp now contains only blitting code
(SuperBlitter/move16/fallback), SV code is in
atari-supervidel.{cpp,h}.
- Take advantage of Common::ScopedPtr and Graphics::ManagedSurface's
dispose flag for Screen::surf as well Graphics::ManagedSurface's
ownership for Screen::offsettedSurf.
- Improve recoverability if an error/assert happens in
AtariGraphicsManager's c-tor/d-tor.
It was using the wrong parameter order to hLine(). This caused a
regression in drawing Macintosh menu bars (rounded rectangles), and
quite possibly other things as well.
We we always assuming that the provided palette is 256 bytes long,
up to the point that we hardcoded this value and skipped this parameter
almost everywhere.
This changes the default parameter to 256 and allows the lesser values
be passed.
- consolidate public #define's (just ATARI)
- cpu compiler flags are specified in the script
- allow explicit move16, SV and SV Blitter features enabled/disabled
Provide two build scripts:
1. "Fat" one targeted at 040/060 machines (possibly with SuperVidel)
This one is optimized for 68020-60 (so it's still possible to try
highres engines on 68030 machines).
2. "Slim" one targeted at 030 machines (Falcon030+DFB/CT2 or TT030)
This one is optimized for 68030 and stripped from even more features:
"fancy" (highres) themes, move16 & SuperVidel routines and most
importantly the highres engines.
GRAPHICS: Refactor Surface::copyFrom() & Surface::copyRectToSurface()
This change makes Surface::copyFrom() slightly slower but
Surface::copyRectToSurface() performs better for rectangles with the
same width as the surface.
And of course we avoid unnecessary code duplication.
Co-authored-by: Cameron Cawley <ccawley2011@gmail.com>
Surface::ditherFloyd() supports having different palette counts;
as it is a private function wrapped by convertTo(), adjust the
short-circuit check in convertTo() so that the short circuit
happens if both palettes are equal in size and content.