1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

Fixes #112: Backbuffer is always 32bpp

This commit is contained in:
AlexApps99 2020-03-12 20:56:06 +13:00 committed by Ethan Lee
parent c322ae131e
commit aff0c06458
3 changed files with 4 additions and 2 deletions

View file

@ -4,6 +4,7 @@ Contributors
(Ordered alphabetically by last name.) (Ordered alphabetically by last name.)
* Matt "Stelpjo" Aaldenberg * Matt "Stelpjo" Aaldenberg
* AlexApps99 (@AlexApps99)
* Christoph Böhmwalder (@chrboe) * Christoph Böhmwalder (@chrboe)
* Charlie Bruce (@charliebruce) * Charlie Bruce (@charliebruce)
* Brian Callahan (@ibara) * Brian Callahan (@ibara)

View file

@ -471,6 +471,7 @@ void Game::init(void)
/* CONTRIBUTORS.txt, again listed alphabetically (according to `sort`) by last name */ /* CONTRIBUTORS.txt, again listed alphabetically (according to `sort`) by last name */
githubfriends.push_back("Matt \"Stelpjo\" Aaldenberg"); githubfriends.push_back("Matt \"Stelpjo\" Aaldenberg");
githubfriends.push_back("AlexApps99");
githubfriends.push_back("Christoph B{hmwalder"); githubfriends.push_back("Christoph B{hmwalder");
githubfriends.push_back("Charlie Bruce"); githubfriends.push_back("Charlie Bruce");
githubfriends.push_back("Brian Callahan"); githubfriends.push_back("Brian Callahan");

View file

@ -148,9 +148,9 @@ int main(int argc, char *argv[])
graphics.images.push_back(graphics.grphx.im_image12); graphics.images.push_back(graphics.grphx.im_image12);
const SDL_PixelFormat* fmt = gameScreen.GetFormat(); const SDL_PixelFormat* fmt = gameScreen.GetFormat();
graphics.backBuffer = SDL_CreateRGBSurface(SDL_SWSURFACE ,320 ,240 ,32,fmt->Rmask,fmt->Gmask,fmt->Bmask,fmt->Amask ) ; graphics.backBuffer = SDL_CreateRGBSurface(SDL_SWSURFACE, 320, 240, fmt->BitsPerPixel, fmt->Rmask, fmt->Gmask, fmt->Bmask, fmt->Amask);
SDL_SetSurfaceBlendMode(graphics.backBuffer, SDL_BLENDMODE_NONE); SDL_SetSurfaceBlendMode(graphics.backBuffer, SDL_BLENDMODE_NONE);
graphics.footerbuffer = SDL_CreateRGBSurface(SDL_SWSURFACE, 320, 10, 32, fmt->Rmask, fmt->Gmask, fmt->Bmask, fmt->Amask); graphics.footerbuffer = SDL_CreateRGBSurface(SDL_SWSURFACE, 320, 10, fmt->BitsPerPixel, fmt->Rmask, fmt->Gmask, fmt->Bmask, fmt->Amask);
SDL_SetSurfaceBlendMode(graphics.footerbuffer, SDL_BLENDMODE_BLEND); SDL_SetSurfaceBlendMode(graphics.footerbuffer, SDL_BLENDMODE_BLEND);
SDL_SetSurfaceAlphaMod(graphics.footerbuffer, 127); SDL_SetSurfaceAlphaMod(graphics.footerbuffer, 127);
FillRect(graphics.footerbuffer, SDL_MapRGB(fmt, 0, 0, 0)); FillRect(graphics.footerbuffer, SDL_MapRGB(fmt, 0, 0, 0));