Completely replace gpBuffer with CelOutputBuffer

`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.
This commit is contained in:
Gleb Mazovetskiy 2021-03-13 02:53:08 +00:00 committed by Anders Jenbo
commit cd59a1c323
17 changed files with 197 additions and 185 deletions

View file

@ -146,7 +146,7 @@ void PrintQTextChr(int sx, int sy, Uint8 *pCelBuff, int nCel)
{
CelOutputBuffer buf = GlobalBackBuffer();
const int start_y = 49 + SCREEN_Y + UI_OFFSET_Y;
buf = buf.subregionY(start_y, 309 + SCREEN_Y + UI_OFFSET_Y);
buf = buf.subregionY(start_y, 260);
CelDrawTo(buf, sx, sy - start_y, pCelBuff, nCel, 22);
}