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 --- chlstate.cpp | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 chlstate.cpp (limited to 'chlstate.cpp') diff --git a/chlstate.cpp b/chlstate.cpp deleted file mode 100644 index 5c9f488..0000000 --- a/chlstate.cpp +++ /dev/null @@ -1,50 +0,0 @@ -#include "includes.h" - -ChooseHighscoreListState::ChooseHighscoreListState() -{ - background = SDL_LoadBMP("resources/chl.bmp"); - pointer = SDL_LoadBMP("resources/pointer.bmp"); - - selection = 0; -} - -void ChooseHighscoreListState::input(SDL_keysym key) -{ - if ((key.sym == SDLK_UP) && (selection != 0)) - { - selection--; - } else if ((key.sym == SDLK_DOWN) && (selection != 2)) - { - selection++; - } else if (key.sym == SDLK_RETURN) - { - switch (selection) - { - case 0: - changeState(new LocalHighscoreListState(false)); - - break; - case 1: - changeState(new GlobalHighscoreListState()); - - break; - case 2: - changeState(new TitleState()); - - break; - } - } -} - -void ChooseHighscoreListState::render(SDL_Surface* screen) -{ - SDL_BlitSurface(background, NULL, screen, NULL); - - SDL_Rect pSpace; - pSpace.x = 127; - pSpace.y = (selection==0?306:(selection==1?336:396)); - pSpace.w = pointer->w; - pSpace.h = pointer->h; - - SDL_BlitSurface(pointer, NULL, screen, &pSpace); -} -- cgit 1.4.1