Fixed glitch in next level transition graphics when you had wings

This commit is contained in:
Rob Pearce 2008-10-23 01:38:18 +00:00
parent 799f393684
commit c61b1ae486
2 changed files with 18 additions and 15 deletions

9
rc.c
View File

@ -3138,9 +3138,6 @@ void drawlevel(void) {
cloud->img =rotozoomSurfaceXY(imageset[P_PINKCLOUD].img[F_WALK1],0,1,1,0);
// change player to floating image
player->img = imageset[player->id].img[F_SHOOT];
// create buffer for player background
playerbg = SDL_CreateRGBSurface(SDL_SWSURFACE,
player->img->w, player->img->h,
@ -4646,11 +4643,12 @@ void dogravity(sprite_t *s) {
curfruittype = 0;
}
}
if ((player->powerup == PW_MACE) && (s2->id == P_SNAIL)) {
if (s2->id == P_SNAIL) {
// turn into a slug so that it really dies
s2->id = P_SLUG;
}
/*
if (s2->id == P_SNAIL) {
// avoid triggering death code twice for caught snails
// since for them s->dead won't be set after we
@ -4659,6 +4657,7 @@ void dogravity(sprite_t *s) {
die(s2);
}
} else {
*/
die(s2);
pointsinc *= 2;
psize += 10;
@ -4668,7 +4667,7 @@ void dogravity(sprite_t *s) {
puffin(P_CLOVER, s2->x, s2->y, "clover", 0);
gotclover = B_TRUE;
}
}
//}
}
}

View File

@ -3176,7 +3176,7 @@ void drawplayer(sprite_t *s, SDL_Rect *where) {
#endif
#ifndef __EDITOR
if (s->doublejump) {
if ((s->doublejump) && (levelcomplete != LV_NEXTLEV)) {
// draw wings behind the sprite
if (s->jumping || s->falling) {
// flapping wings - freeze while showing help text
@ -3209,11 +3209,15 @@ void drawplayer(sprite_t *s, SDL_Rect *where) {
}
#endif
if ((levelcomplete == LV_CLOUDLOOP) || (levelcomplete == LV_NEXTLEV)) {
player->img = imageset[player->id].img[F_SHOOT];
}
// draw the sprite
doblit(s->img, screen, where);
#ifndef __EDITOR
if (s->doublejump) {
if ((s->doublejump) && (levelcomplete != LV_NEXTLEV)) {
// draw wings in front of the sprite
if (s->swimming) {
wingframe = 3;