From a8d491f13035b2f7f8ae599a17862f0ae1f699c7 Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Thu, 8 Feb 2007 17:34:34 +0000 Subject: [PATCH] created offset for LOCK message string if demo record or playback --- dxx-changelog.txt | 2 +- main/gauges.c | 29 ++++++++++++++++++++++++----- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/dxx-changelog.txt b/dxx-changelog.txt index 1599f180f..b3c13e19b 100755 --- a/dxx-changelog.txt +++ b/dxx-changelog.txt @@ -4,7 +4,7 @@ D2X-Rebirth Changelog -------- main/newdemo.c: fixed demo playback Afterburner gauge and Primary weapon ammo info main/game.c, main/game.c, main/movie.c, main/movie.h: since Movies are initiated once in runtime, indroduced SCREEN_MOVIE to set desired movie resolutions seperatly from menu or game resolution -main/gauges.c: position alignment for alt-hud2 to prevent overlay with extra views +main/gauges.c: position alignment for alt-hud2 to prevent overlay with extra views; created offset for LOCK message string if demo record or playback 20070207 -------- diff --git a/main/gauges.c b/main/gauges.c index 5f1e57616..b802cd610 100755 --- a/main/gauges.c +++ b/main/gauges.c @@ -1206,18 +1206,37 @@ extern int SW_y[2]; void hud_show_homing_warning(void) { +// if (Players[Player_num].homing_object_dist >= 0) { +// if (GameTime & 0x4000) { +// int x=0x8000, y=grd_curcanv->cv_h-FONTSCALE_Y(Line_spacing); +// +// if (Cockpit_mode == CM_FULL_SCREEN && (weapon_box_user[0] != WBU_WEAPON || weapon_box_user[1] != WBU_WEAPON)) { +// int wy = (weapon_box_user[0] != WBU_WEAPON)?SW_y[0]:SW_y[1]; +// y = min(y,(wy - FONTSCALE_Y(Line_spacing) - Game_window_y)); +// } +// +// gr_set_curfont( GAME_FONT ); +// gr_set_fontcolor(gr_getcolor(0,31,0),-1 ); +// gr_printf(x,y,TXT_LOCK); +// } +// } + int offsety=0; + if (Players[Player_num].homing_object_dist >= 0) { - if (GameTime & 0x4000) { - int x=0x8000, y=grd_curcanv->cv_h-FONTSCALE_Y(Line_spacing); if (Cockpit_mode == CM_FULL_SCREEN && (weapon_box_user[0] != WBU_WEAPON || weapon_box_user[1] != WBU_WEAPON)) { - int wy = (weapon_box_user[0] != WBU_WEAPON)?SW_y[0]:SW_y[1]; - y = min(y,(wy - FONTSCALE_Y(Line_spacing) - Game_window_y)); + offsety = grd_curscreen->sc_h/4+FONTSCALE_Y(2); + } else { + if ((Newdemo_state == ND_STATE_PLAYBACK) || (Newdemo_state == ND_STATE_RECORDING)) + offsety = FONTSCALE_Y(GAME_FONT->ft_h+2); + else + offsety = 0; } + if (GameTime & 0x4000) { gr_set_curfont( GAME_FONT ); gr_set_fontcolor(gr_getcolor(0,31,0),-1 ); - gr_printf(x,y,TXT_LOCK); + gr_printf(0x8000, grd_curcanv->cv_h-FONTSCALE_Y(GAME_FONT->ft_h+2)-offsety,TXT_LOCK); } } }