True HW acceleration for Alien Blaster - it now runs 45 FPS on ADP1,

and 30 FPS on HTC Evo (it could run faster but they limited max FPS in GL renderer).
See file SdlForwardCompat.h to have an idea how to make your SDL 1.2 app HW accelerated with SDL 1.3 -
it's a compilation of hacks but whatever.
This commit is contained in:
pelya
2010-07-06 13:57:58 +03:00
parent 616cc0b5fd
commit 99698187cf
61 changed files with 401 additions and 230 deletions

View File

@@ -24,6 +24,8 @@
#include <map>
#include <vector>
#include "SDL.h"
#include "SdlForwardCompat.h"
class Font;
class Options;
@@ -60,15 +62,15 @@ class Settings {
Settings();
~Settings();
void settingsDialog(SDL_Surface *screen);
void settingsDialog(SdlCompat_AcceleratedSurface *screen);
const PlayerKeys getPlayerKeys(unsigned int player) const;
private:
SDL_Surface *introSprite;
SDL_Surface *activeChoiceSprite;
SDL_Surface *bluePlain;
SDL_Surface *whitePlain;
SdlCompat_AcceleratedSurface *introSprite;
SdlCompat_AcceleratedSurface *activeChoiceSprite;
SdlCompat_AcceleratedSurface *bluePlain;
SdlCompat_AcceleratedSurface *whitePlain;
SettingsChoices actChoice;
bool wasLeftColumn;
Options *opfile;
@@ -85,11 +87,11 @@ class Settings {
void loadDefaultSettings();
void loadSettings();
void saveSettings();
void draw( SDL_Surface *screen, bool getNewKey=false );
void showSpecialKeys( SDL_Surface *screen );
void showSettings( SDL_Surface *screen, bool getNewKey );
void showMenu( SDL_Surface *screen );
void changeCurrentSettings(SDL_Surface *screen, int player);
void draw( SdlCompat_AcceleratedSurface *screen, bool getNewKey=false );
void showSpecialKeys( SdlCompat_AcceleratedSurface *screen );
void showSettings( SdlCompat_AcceleratedSurface *screen, bool getNewKey );
void showMenu( SdlCompat_AcceleratedSurface *screen );
void changeCurrentSettings(SdlCompat_AcceleratedSurface *screen, int player);
void setKeyNames();
};