Now displaying a tombstone when you lose all your lives
This commit is contained in:
parent
39556cf003
commit
e6809268b5
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
1
defs.h
1
defs.h
|
@ -886,6 +886,7 @@ extern char progname[];
|
|||
extern SDL_Color black;
|
||||
extern SDL_Surface *screen, *temps, *levelbg, *head, *head5, *icecube;
|
||||
extern SDL_Surface *head2,*head52;
|
||||
extern SDL_Surface *grave;
|
||||
extern SDL_Surface *healthbar[];
|
||||
extern SDL_Surface *greenbox, *redbox;
|
||||
extern sprite_t *sprite, *lastsprite, *player, *player2, *boss;
|
||||
|
|
|
@ -31,6 +31,7 @@ SDL_Surface *levelbg; // level background image
|
|||
SDL_Surface *temps; // temporary surface
|
||||
SDL_Surface *screen; // the actual video screen
|
||||
SDL_Surface *head,*head5; // imgs in corner showing number of lives
|
||||
SDL_Surface *grave;
|
||||
SDL_Surface *head2,*head52; // imgs in corner showing number of lives
|
||||
SDL_Surface *icecube; // overlaid on frozen monsters
|
||||
SDL_Surface *greenbox; // for fly spray effect
|
||||
|
|
21
rc.c
21
rc.c
|
@ -4958,6 +4958,7 @@ void drawscore(void) {
|
|||
|
||||
// lives
|
||||
|
||||
if (player->lives > 0) {
|
||||
// show 1 less than lives
|
||||
numtoshow = player->lives-1;
|
||||
area.x = P1LIVESX;
|
||||
|
@ -4976,6 +4977,14 @@ void drawscore(void) {
|
|||
SDL_BlitSurface(head, NULL, screen, &area);
|
||||
area.x += (head->w + 3);
|
||||
}
|
||||
} else {
|
||||
area.x = P1LIVESX;
|
||||
area.y = LIVESY;
|
||||
area.w = 0;
|
||||
area.h = 0;
|
||||
|
||||
SDL_BlitSurface(grave, NULL, screen, &area);
|
||||
}
|
||||
|
||||
|
||||
// cards
|
||||
|
@ -5022,6 +5031,7 @@ void drawscore(void) {
|
|||
|
||||
// lives
|
||||
|
||||
if (player2->lives > 0) {
|
||||
// show 1 less than lives
|
||||
numtoshow = player2->lives-1;
|
||||
area.x = 640 - P1LIVESX;
|
||||
|
@ -5039,6 +5049,7 @@ void drawscore(void) {
|
|||
area.x -= (head2->w + 3);
|
||||
}
|
||||
|
||||
|
||||
// now start displaying
|
||||
|
||||
// show "x5" for lots of lives
|
||||
|
@ -5052,6 +5063,14 @@ void drawscore(void) {
|
|||
SDL_BlitSurface(head2, NULL, screen, &area);
|
||||
area.x += (head2->w + 3);
|
||||
}
|
||||
} else {
|
||||
area.x = 640 - P1LIVESX - (head2->w);
|
||||
area.y = LIVESY;
|
||||
area.w = 0;
|
||||
area.h = 0;
|
||||
|
||||
SDL_BlitSurface(grave, NULL, screen, &area);
|
||||
}
|
||||
|
||||
|
||||
// cards
|
||||
|
@ -9545,7 +9564,7 @@ void startgame(void) {
|
|||
player2->armour = B_FALSE;
|
||||
player2->id = P_PLAYER2;
|
||||
}
|
||||
player2->lives = 1;
|
||||
player2->lives = 3;
|
||||
}
|
||||
|
||||
forcegoodcard = B_FALSE;
|
||||
|
|
Loading…
Reference in New Issue