From c8d0ae0ec917e15b087af9ef07d191bcdb7f0430 Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Sun, 16 Jul 2006 17:58:47 +0000 Subject: [PATCH] showing game over in d2x-way --- main/gameseq.c | 2 +- main/hud.c | 27 +++++++++++++++++++-------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/main/gameseq.c b/main/gameseq.c index bc71ba5f0..3f0a46be8 100755 --- a/main/gameseq.c +++ b/main/gameseq.c @@ -745,7 +745,7 @@ void DoEndLevelScoreGlitzPoll( int nitems, newmenu_item * menus, int * key, int void DoGameOver() { time_out_value = timer_get_approx_seconds() + i2f(60*5); - nm_messagebox1( TXT_GAME_OVER, DoEndLevelScoreGlitzPoll, 1, TXT_OK, "" ); +// nm_messagebox1( TXT_GAME_OVER, DoEndLevelScoreGlitzPoll, 1, TXT_OK, "" ); #ifndef SHAREWARE if (Current_mission_num == 0) diff --git a/main/hud.c b/main/hud.c index 52a1d51ee..9f36ba49e 100755 --- a/main/hud.c +++ b/main/hud.c @@ -440,17 +440,28 @@ void HUD_init_message(char * format, va_list args) void player_dead_message(void) { - if (Player_exploded) { -// gr_set_curfont( Gamefonts[GFONT_SMALL] ); - gr_set_curfont( GAME_FONT ); + if (Player_exploded) { + if ( Players[Player_num].lives < 2 ) { + int x, y, w, h, aw; + gr_set_curfont(Gamefonts[GFONT_BIG_1]); + gr_get_string_size( TXT_GAME_OVER, &w, &h, &aw ); + w += 20; + h += 8; + x = (GWIDTH - w ) / 2; + y = (GHEIGHT - h ) / 2; + Gr_scanline_darkening_level = 2*7; + gr_setcolor( BM_XRGB(0,0,0) ); + gr_rect( x, y, x+w, y+h ); + Gr_scanline_darkening_level = GR_FADE_LEVELS; + + gr_string(0x8000, (GHEIGHT - grd_curcanv->cv_font->ft_h)/2 + h/8, TXT_GAME_OVER ); + } + gr_set_curfont( GAME_FONT ); if (HUD_color == -1) - HUD_color = BM_XRGB(0,28,0); + HUD_color = BM_XRGB(0,28,0); gr_set_fontcolor( HUD_color, -1); - - gr_printf(0x8000, grd_curcanv->cv_bitmap.bm_h-(GAME_FONT->ft_h+3), TXT_PRESS_ANY_KEY);//was -8 -// gr_set_curfont( GAME_FONT ); + gr_string(0x8000, GHEIGHT-(grd_curcanv->cv_font->ft_h+3), TXT_PRESS_ANY_KEY); } - } // void say_afterburner_status(void)