From ca73263ae38c1c97a0c77190ab0dffae374d8dcb Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Sun, 28 Jan 2007 18:11:53 +0000 Subject: [PATCH] corrected radar positions and gave it a grey background so it's better visible --- dxx-changelog.txt | 4 ++++ main/radar.c | 44 +++++++++++++++++++++++++++++++++++--------- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/dxx-changelog.txt b/dxx-changelog.txt index 1033ec324..002014fe3 100755 --- a/dxx-changelog.txt +++ b/dxx-changelog.txt @@ -1,5 +1,9 @@ D1X-Rebirth Changelog +20070128 +-------- +main/radar.c: corrected radar positions and gave it a grey background so it's better visible + 20070127 -------- main/credits: use ogl_ubitmapm_cs instead of show_fullscr in OGL to render faster diff --git a/main/radar.c b/main/radar.c index 7f69d1a10..a3c7c58f1 100755 --- a/main/radar.c +++ b/main/radar.c @@ -91,22 +91,19 @@ void radar_render_frame() int i,color; object * objp; + Hostage_monitor_size = Game_window_w / 6; + Hostage_monitor_x = (SWIDTH/320); + switch (Cockpit_mode) { case CM_FULL_SCREEN: - Hostage_monitor_size = Game_window_w / 6; - Hostage_monitor_x = (grd_curscreen->sc_w - Game_window_w) / 2; - Hostage_monitor_y = (grd_curscreen->sc_h - Game_window_h) / 2; + Hostage_monitor_y = 35*(SHEIGHT/200); break; case CM_FULL_COCKPIT: - Hostage_monitor_size = Game_window_w / 6; - Hostage_monitor_x = (grd_curscreen->sc_w - Game_window_w) / 2; - Hostage_monitor_y = (grd_curscreen->sc_h) / 2.5; + Hostage_monitor_y = 15*(SHEIGHT/200); //(grd_curscreen->sc_h) / 2.2; break; case CM_STATUS_BAR: - Hostage_monitor_size = Game_window_w / 6; - Hostage_monitor_x = (grd_curscreen->sc_w - Game_window_w) / 2; - Hostage_monitor_y = (max_window_h - Game_window_h) / 2; + Hostage_monitor_y = (SHEIGHT/200); break; case CM_REAR_VIEW: //no radar in rear view or letterbox! case CM_LETTERBOX: @@ -118,6 +115,16 @@ void radar_render_frame() gr_set_current_canvas(NULL); + // Draw a box to get more contrast on the radar + gr_setcolor(BM_XRGB(200,200,200)); + Gr_scanline_darkening_level = 2*7; + gr_rect(Hostage_monitor_x, + Hostage_monitor_y, + Hostage_monitor_x+Hostage_monitor_size, + Hostage_monitor_y+Hostage_monitor_size); + Gr_scanline_darkening_level = GR_FADE_LEVELS; + + gr_setcolor( BM_XRGB( 0, 31, 0 ) ); gr_ucircle( i2f(Hostage_monitor_x+Hostage_monitor_size/2), i2f(Hostage_monitor_y+Hostage_monitor_size/2), i2f(Hostage_monitor_size)/2); @@ -177,4 +184,23 @@ void radar_render_frame() gr_setcolor( Blips[i].c ); gr_upixel( Blips[i].x, Blips[i].y ); } + + // Draw a blue frame around the radar + gr_setcolor(BM_XRGB(0,0,255)); + gr_rect(Hostage_monitor_x-(SWIDTH/640), + Hostage_monitor_y, + Hostage_monitor_x, + Hostage_monitor_y+Hostage_monitor_size); + gr_rect(Hostage_monitor_x+Hostage_monitor_size, + Hostage_monitor_y, + Hostage_monitor_x+Hostage_monitor_size+(SWIDTH/640), + Hostage_monitor_y+Hostage_monitor_size); + gr_rect(Hostage_monitor_x, + Hostage_monitor_y-(SHEIGHT/480), + Hostage_monitor_x+Hostage_monitor_size, + Hostage_monitor_y); + gr_rect(Hostage_monitor_x, + Hostage_monitor_y+Hostage_monitor_size, + Hostage_monitor_x+Hostage_monitor_size, + Hostage_monitor_y+Hostage_monitor_size+(SHEIGHT/480)); }