created offset for LOCK message string if demo record or playback

This commit is contained in:
zicodxx 2007-02-08 17:34:34 +00:00
parent b9e25ca7e5
commit a8d491f130
2 changed files with 25 additions and 6 deletions

View file

@ -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
--------

View file

@ -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);
}
}
}