16 Commits

Author SHA1 Message Date
Miro Kropacek 9bd91b4131 BACKENDS: ATARI: Remove atari_debug 2026-04-20 01:47:37 +02:00
Miro Kropacek 3f47c7a8ce BACKENDS: ATARI: Let Cursor access only AtariSurface instead of Screen 2025-06-25 23:50:35 +02:00
Miro Kropacek e575d1360e BACKENDS: ATARI: Make purpose of _xOffset more explicit
This also cleans up Screen::reset() a bit.

Get rid of the reset cursor flag, it's not that useful in the overlay.
2025-06-25 23:50:35 +02:00
Miro Kropacek f27f045aac BACKENDS: ATARI: Remove references to AtariGraphicsManager from Screen and Cursor 2025-06-25 23:50:35 +02:00
Miro Kropacek ee437e2a42 BACKENDS: ATARI: Move alignRect from AtariGraphicsManager to AtariSurface
And make it static.
2025-06-25 23:50:35 +02:00
Miro Kropacek 0520570a7b BACKENDS: ATARI: Move getBitsPerPixel from AtariGraphicsManager to AtariSurface 2025-06-25 23:50:35 +02:00
Miro Kropacek 3dd96ec7c5 BACKENDS: ATARI: Use hardware-accelerated cursor blitting 2025-06-25 23:50:34 +02:00
Miro Kropacek b3074272da BACKENDS: ATARI: Separate SuperVidel code
- 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.
2025-06-25 23:50:34 +02:00
Miro Kropacek 5680536655 BACKENDS: ATARI: Additional fixes for cursor background
- leftovers after highlighted dirty rectangle

- not updating _surface if moving to fast left/right from screen borders
  (_width == _srcRect.width())

- not drawing cursor if repeatedly intersecting with a refreshing dirty
  rect

- leftover rectangle when leaving game overlay to the launcher

- massive simplification
2025-04-20 21:33:15 +02:00
Miro Kropacek 4afb49840e BACKENDS: ATARI: Initialize overlay cursor properly
showOverlay() and therefore _screen[kOverlayBuffer]->reset() isn't
called explicitly on init.
2025-04-20 21:33:15 +02:00
Miro Kropacek 564c503c3d BACKENDS: ATARI: Allow width non-divisible by 16 if not direct rendering
This fixes Phantasmagoria demo which uses 630x450.
2025-04-20 21:33:15 +02:00
Miro Kropacek 3ab84a2cf9 BACKENDS: ATARI: Fix incorrectly restored cursor background 2025-04-20 21:33:15 +02:00
Miro Kropacek 6a919c04ab BACKENDS: ATARI: Cleanup usage of bitsPerPixel 2025-04-20 21:33:15 +02:00
Miro Kropacek 10665fb723 BACKENDS: ATARI: Use DISABLE_TEXT_CONSOLE for release builds
This shaves off a good 800 KB from all the engines. However, do keep
local atari debug messages for diagnostic purposes.

Also, use natfeats for debug output when possible else the classic
stdout/stderr (not both as before).
2024-11-21 11:31:25 +01:00
Miro Kropacek 0c77d67845 BACKENDS: ATARI: Make Cursor Screen's property
Instead of having one globally in AtariGraphicsManager. This simplifies
code and cleans up a lot of dark corners in AtariGraphicsManager.

A slight disadvantage is that now the cursor surface has be to converted
for each buffer.
2024-07-15 19:42:51 +02:00
Miro Kropacek c7bc03d4f4 BACKENDS: ATARI: Move Screen outside AtariGraphicsManager 2024-07-15 19:42:51 +02:00