GLES supports per-texture alpha perfectly, it was the bug in Alien Blaster that prevented nuke to be drawn correctly

This commit is contained in:
pelya
2010-07-12 15:36:51 +03:00
parent aa3e7acdaf
commit dccefe2ce3
4 changed files with 8 additions and 8 deletions

View File

@@ -95,7 +95,7 @@ Game::Game() {
// for arcadeMode
gameOverSprite = surfaceDB.loadSurface( FN_GAME_OVER );
nukeEffectSurface = surfaceDB.loadSurface( FN_NUKE_EFFECT, true );
nukeEffectSurface = surfaceDB.loadSurface( FN_NUKE_EFFECT );
bossAlarm = Mixer::mixer().loadSample( FN_SOUND_BOSS_ALARM, 60 );
@@ -656,6 +656,7 @@ void Game::drawNukeEffect() {
SDL_BlitSurface( nukeEffectSurface, 0, screen, 0 );
/*
int randRange = (int)
(( ((NUKE_EFFECT_DURATION / 2.0) - timeFromMaximum) * NUKE_QUAKE_EFFECT /
(NUKE_EFFECT_DURATION / 2.0 ) ) + 0.5);
@@ -690,6 +691,7 @@ void Game::drawNukeEffect() {
}
SDL_BlitSurface( screen, &src, screen, &dest );
*/
}

View File

@@ -77,7 +77,7 @@ void Infoscreen::draw() {
SDL_Rect r;
r.x = 250;
r.y = 0;
r.w = 1;
r.w = 2;
r.h = screen->h;
SDL_FillRect(screen, &r, SDL_MapRGB(screen->format, 0, 255, 0) );

View File

@@ -68,7 +68,7 @@ SdlCompat_AcceleratedSurface *Video::init(){
SDL_ShowCursor(SDL_DISABLE);
__android_log_print(ANDROID_LOG_INFO, "Alien Blaster", "Initializing video done");
empty = surfaceDB.loadSurface(FN_ALIENBLASTER_INTRO);
//empty = surfaceDB.loadSurface(FN_ALIENBLASTER_INTRO);
return screen;
}
@@ -76,19 +76,17 @@ SdlCompat_AcceleratedSurface *Video::init(){
void Video::clearScreen() {
// clear the screen
/*
SDL_Rect r;
r.x = 0;
r.y = 0;
r.w = screen->w;
r.h = screen->h;
SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format, 0, 0, 0) );
*/
SDL_BlitSurface(empty, NULL, screen, NULL);
SDL_FillRect(screen, &r, SDL_MapRGB(screen->format, 0, 0, 0) );
//SDL_BlitSurface(empty, NULL, screen, NULL);
}
void Video::toggleFullscreen() {
// TODO: fix that?
/*
if ( fullscreen ) {
screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, BIT_DEPTH, SDL_DOUBLEBUF );

Binary file not shown.