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

@@ -642,7 +642,7 @@ void Shot::addExplosion() {
////////////////////
void Shot::drawShadow(SDL_Surface *screen) {
void Shot::drawShadow(SdlCompat_AcceleratedSurface *screen) {
switch (shotType) {
case SHOT_KICK_ASS_ROCKET:
case SHOT_HF_KICK_ASS_ROCKET:
@@ -680,7 +680,7 @@ void Shot::drawShadow(SDL_Surface *screen) {
}
}
void Shot::drawGroundShot(SDL_Surface *screen) {
void Shot::drawGroundShot(SdlCompat_AcceleratedSurface *screen) {
switch (shotType) {
case SHOT_KICK_ASS_ROCKET:
case SHOT_HF_KICK_ASS_ROCKET:
@@ -704,7 +704,7 @@ void Shot::drawGroundShot(SDL_Surface *screen) {
}
}
void Shot::drawGroundAirShot(SDL_Surface *screen) {
void Shot::drawGroundAirShot(SdlCompat_AcceleratedSurface *screen) {
switch (shotType) {
case SHOT_DUMBFIRE:
case SHOT_DUMBFIRE_DOUBLE:
@@ -798,7 +798,7 @@ void Shot::drawGroundAirShot(SDL_Surface *screen) {
}
}
void Shot::drawAirShot(SDL_Surface *screen) {
void Shot::drawAirShot(SdlCompat_AcceleratedSurface *screen) {
switch (shotType) {
case SHOT_NORMAL:
case SHOT_NORMAL_HEAVY: