Makes `CelSprite` unowned and adds a new `OwnedCelSprite` class for
owned sprites.
This clarifies ownership and makes the code cleaner in a number of
places.
Additionally, because the `CelSprite` class is now tiny (1 less
pointer), we can pass it by-value instead of by-reference, removing a
pointer indirection in the rendering functions.
More then just the given line was being plased in the line buffer which
caused a lot of double rendering and sometimes also invalid UTF-8
resulting is stray question marks under the text
This should gradually replace all the direct rendering of game texts
throughout the code. The interface is made to closly mirror that of the
art fonts as that is what will eventually be used for rendering Unicode
fonts both in the menus and ingame.
fixup! ✨ Generic game text render function
Instead of passing the CEL sprite width when drawing, store the CEL
width at load time in the new `CelSprite` struct.
Implemented for most sprites except towners, missiles, or monsters.
This option completely disables all audio handling, including audio
loading code and dependencies.
Dialog text length is estimated to be somewhere between
Cain and Griswold speed.
`CelOutputBuffer` now contains an `SDL_Surface` and an `SDL_Rect`.
We now have access to SDL surface manipulation functions.
`gpBuffer` and `gpBufEnd` are completely gone 🧹
This results in some FPS loss (250 -> 195) recovered in a subsequent
commit.
Refactor the rendering functions to allow rendering to any output
buffer.
New functions that accept a buffer have the `To` suffix.
The functions that render to the global buffer now always accept
coordinates.