From ffd335aca284c286030e2b26f1a02a0441748f46 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Tue, 27 Aug 2013 11:39:37 -0400 Subject: Started rewriting game from scratch with SDL2 Only the title screen is currently implemented --- hslist.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'hslist.cpp') diff --git a/hslist.cpp b/hslist.cpp index ec99a77..80e0801 100644 --- a/hslist.cpp +++ b/hslist.cpp @@ -1,11 +1,16 @@ -#include "includes.h" +#include "hslist.h" +#include +#include +#include +#include +#include "util.h" SDL_Surface* HighscoreList::render() { - SDL_Surface* tmp = SDL_CreateRGBSurface(SDL_SWSURFACE || SDL_SRCCOLORKEY, 480, 480, 32, 0,0,0,0); + SDL_Surface* tmp = SDL_CreateRGBSurface(0, 480, 480, 32, 0,0,0,0); Uint32 bgColor = SDL_MapRGB(tmp->format, 255, 255, 255); SDL_FillRect(tmp, NULL, bgColor); - SDL_SetColorKey(tmp, SDL_SRCCOLORKEY, bgColor); + SDL_SetColorKey(tmp, SDL_TRUE, bgColor); TTF_Font* posFont = loadFont(40); TTF_Font* dataFont = loadFont(25); SDL_Color fontColor = {0, 0, 0, 0}; @@ -181,10 +186,10 @@ SDL_Surface* GlobalHighscoreList::render() { if (fail) { - SDL_Surface* tmp = SDL_CreateRGBSurface(SDL_SWSURFACE || SDL_SRCCOLORKEY, 480, 480, 32, 0,0,0,0); + SDL_Surface* tmp = SDL_CreateRGBSurface(0, 480, 480, 32, 0,0,0,0); Uint32 bgColor = SDL_MapRGB(tmp->format, 255, 255, 255); SDL_FillRect(tmp, NULL, bgColor); - SDL_SetColorKey(tmp, SDL_SRCCOLORKEY, bgColor); + SDL_SetColorKey(tmp, SDL_TRUE, bgColor); TTF_Font* dataFont = loadFont(25); SDL_Color fontColor = {0, 0, 0, 0}; SDL_Surface* text = TTF_RenderText_Blended(dataFont, "Error retrieving highscores", fontColor); -- cgit 1.4.1