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 --- htpstate.cpp | 57 --------------------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 htpstate.cpp (limited to 'htpstate.cpp') diff --git a/htpstate.cpp b/htpstate.cpp deleted file mode 100644 index 0771290..0000000 --- a/htpstate.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "includes.h" - -HowToPlayState::HowToPlayState() -{ - background1 = SDL_LoadBMP("resources/htp1.bmp"); - background2 = SDL_LoadBMP("resources/htp2.bmp"); - pointer = SDL_LoadBMP("resources/pointer.bmp"); - - secondPage = false; - selection = 0; -} - -void HowToPlayState::input(SDL_keysym key) -{ - if ((key.sym == SDLK_LEFT) && (selection != 0)) - { - selection--; - } else if ((key.sym == SDLK_RIGHT) && (selection != 1)) - { - selection++; - } else if (key.sym == SDLK_RETURN) - { - switch (selection) - { - case 0: - secondPage = !secondPage; - - break; - case 1: - changeState(new TitleState()); - - break; - } - } -} - -void HowToPlayState::render(SDL_Surface* screen) -{ - SDL_Rect pSpace; - - if (!secondPage) - { - SDL_BlitSurface(background1, NULL, screen, NULL); - - pSpace.x = (selection==0?74:216); - } else { - SDL_BlitSurface(background2, NULL, screen, NULL); - - pSpace.x = (selection==0?45:238); - } - - pSpace.y = 430; - pSpace.w = pointer->w; - pSpace.h = pointer->h; - - SDL_BlitSurface(pointer, NULL, screen, &pSpace); -} -- cgit 1.4.1