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

25
rc.c
View File

@ -3138,9 +3138,6 @@ void drawlevel(void) {
cloud->img =rotozoomSurfaceXY(imageset[P_PINKCLOUD].img[F_WALK1],0,1,1,0); 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 // create buffer for player background
playerbg = SDL_CreateRGBSurface(SDL_SWSURFACE, playerbg = SDL_CreateRGBSurface(SDL_SWSURFACE,
player->img->w, player->img->h, player->img->w, player->img->h,
@ -4646,11 +4643,12 @@ void dogravity(sprite_t *s) {
curfruittype = 0; 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 // turn into a slug so that it really dies
s2->id = P_SLUG; s2->id = P_SLUG;
} }
/*
if (s2->id == P_SNAIL) { if (s2->id == P_SNAIL) {
// avoid triggering death code twice for caught snails // avoid triggering death code twice for caught snails
// since for them s->dead won't be set after we // since for them s->dead won't be set after we
@ -4659,16 +4657,17 @@ void dogravity(sprite_t *s) {
die(s2); die(s2);
} }
} else { } else {
die(s2); */
pointsinc *= 2; die(s2);
psize += 10; pointsinc *= 2;
gotsomething++; psize += 10;
// killing 5 at a time gives us a clover for good luck gotsomething++;
if ((!gotclover) && (gotsomething >= 5)) { // killing 5 at a time gives us a clover for good luck
puffin(P_CLOVER, s2->x, s2->y, "clover", 0); if ((!gotclover) && (gotsomething >= 5)) {
gotclover = B_TRUE; 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 #endif
#ifndef __EDITOR #ifndef __EDITOR
if (s->doublejump) { if ((s->doublejump) && (levelcomplete != LV_NEXTLEV)) {
// draw wings behind the sprite // draw wings behind the sprite
if (s->jumping || s->falling) { if (s->jumping || s->falling) {
// flapping wings - freeze while showing help text // flapping wings - freeze while showing help text
@ -3209,11 +3209,15 @@ void drawplayer(sprite_t *s, SDL_Rect *where) {
} }
#endif #endif
if ((levelcomplete == LV_CLOUDLOOP) || (levelcomplete == LV_NEXTLEV)) {
player->img = imageset[player->id].img[F_SHOOT];
}
// draw the sprite // draw the sprite
doblit(s->img, screen, where); doblit(s->img, screen, where);
#ifndef __EDITOR #ifndef __EDITOR
if (s->doublejump) { if ((s->doublejump) && (levelcomplete != LV_NEXTLEV)) {
// draw wings in front of the sprite // draw wings in front of the sprite
if (s->swimming) { if (s->swimming) {
wingframe = 3; wingframe = 3;