Lives >=5 are now shown by a "x5"
This commit is contained in:
parent
11dcca1cc4
commit
092cfa2180
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
2
defs.h
2
defs.h
|
@ -754,7 +754,7 @@ imageset_t imageset[MAXPTYPES];
|
|||
|
||||
/* external globals */
|
||||
extern SDL_Color black;
|
||||
extern SDL_Surface *screen, *temps, *levelbg, *head, *icecube;
|
||||
extern SDL_Surface *screen, *temps, *levelbg, *head, *head5, *icecube;
|
||||
extern SDL_Surface *healthbar[];
|
||||
extern SDL_Surface *greenbox;
|
||||
extern sprite_t *sprite, *lastsprite, *player, *boss, *mask;
|
||||
|
|
|
@ -22,7 +22,7 @@ int nextforcegoodcard;
|
|||
SDL_Surface *levelbg; // level background image
|
||||
SDL_Surface *temps; // temporary surface
|
||||
SDL_Surface *screen; // the actual video screen
|
||||
SDL_Surface *head; // img in corner showing number of lives
|
||||
SDL_Surface *head,*head5; // imgs in corner showing number of lives
|
||||
SDL_Surface *icecube; // overlaid on frozen monsters
|
||||
SDL_Surface *greenbox; // for fly spray effect
|
||||
SDL_Surface *healthbar[HEALTHFRAMES]; // for boss health
|
||||
|
|
20
rc.c
20
rc.c
|
@ -2962,7 +2962,7 @@ void drawlevel(void) {
|
|||
int x,y;
|
||||
int dstx,dsty,xdis,ydis;
|
||||
double turns;
|
||||
double pxspeed,pyspeed,pspeed;
|
||||
double pspeed;
|
||||
double dist;
|
||||
SDL_Rect area,dst;
|
||||
int speed = 16;
|
||||
|
@ -3508,6 +3508,7 @@ void drawscore(void) {
|
|||
SDL_Rect area;
|
||||
SDL_Color scorecol;
|
||||
int i;
|
||||
int numtoshow;
|
||||
|
||||
if (forcegoodcard) {
|
||||
if ((timer / LUCKYFLASH) % 2 == 0) {
|
||||
|
@ -3539,13 +3540,22 @@ void drawscore(void) {
|
|||
SDL_FreeSurface(score);
|
||||
|
||||
// lives
|
||||
|
||||
// lives - show 1 less than lives
|
||||
|
||||
// show 1 less than lives
|
||||
numtoshow = player->lives-1;
|
||||
area.x = 20;
|
||||
area.y = 25;
|
||||
area.w = 0;
|
||||
area.h = 0;
|
||||
for (i = 1; i < player->lives; i++) {
|
||||
|
||||
// show "x5" for lots of lives
|
||||
while (numtoshow >= 5) {
|
||||
SDL_BlitSurface(head5, NULL, screen, &area);
|
||||
area.x += (head->w + 3);
|
||||
numtoshow -= 5;
|
||||
}
|
||||
|
||||
for (i = 0; i < numtoshow; i++) {
|
||||
SDL_BlitSurface(head, NULL, screen, &area);
|
||||
area.x += (head->w + 3);
|
||||
}
|
||||
|
@ -6613,7 +6623,7 @@ void handleinput(void) {
|
|||
if (keydown(SDLK_l)) {
|
||||
if (toggletimer == 0) {
|
||||
addscore(player, 100001);
|
||||
toggletimer = 80;
|
||||
toggletimer = 30;
|
||||
}
|
||||
}
|
||||
if (keydown(SDLK_n)) {
|
||||
|
|
2
shared.c
2
shared.c
|
@ -991,6 +991,8 @@ int loadimagesets(void) {
|
|||
|
||||
sprintf(tempfile, "%s/sprites/dwarfhead.png",datadir);
|
||||
head = IMG_Load(tempfile);
|
||||
sprintf(tempfile, "%s/sprites/dwarfhead5.png",datadir);
|
||||
head5 = IMG_Load(tempfile);
|
||||
sprintf(tempfile, "%s/sprites/icecube.png",datadir);
|
||||
icecube = IMG_Load(tempfile);
|
||||
|
||||
|
|
Loading…
Reference in New Issue