corrected radar positions and gave it a grey background so it's better visible
This commit is contained in:
parent
d1d739c8ff
commit
ca73263ae3
|
@ -1,5 +1,9 @@
|
||||||
D1X-Rebirth Changelog
|
D1X-Rebirth Changelog
|
||||||
|
|
||||||
|
20070128
|
||||||
|
--------
|
||||||
|
main/radar.c: corrected radar positions and gave it a grey background so it's better visible
|
||||||
|
|
||||||
20070127
|
20070127
|
||||||
--------
|
--------
|
||||||
main/credits: use ogl_ubitmapm_cs instead of show_fullscr in OGL to render faster
|
main/credits: use ogl_ubitmapm_cs instead of show_fullscr in OGL to render faster
|
||||||
|
|
44
main/radar.c
44
main/radar.c
|
@ -91,22 +91,19 @@ void radar_render_frame()
|
||||||
int i,color;
|
int i,color;
|
||||||
object * objp;
|
object * objp;
|
||||||
|
|
||||||
|
Hostage_monitor_size = Game_window_w / 6;
|
||||||
|
Hostage_monitor_x = (SWIDTH/320);
|
||||||
|
|
||||||
switch (Cockpit_mode)
|
switch (Cockpit_mode)
|
||||||
{
|
{
|
||||||
case CM_FULL_SCREEN:
|
case CM_FULL_SCREEN:
|
||||||
Hostage_monitor_size = Game_window_w / 6;
|
Hostage_monitor_y = 35*(SHEIGHT/200);
|
||||||
Hostage_monitor_x = (grd_curscreen->sc_w - Game_window_w) / 2;
|
|
||||||
Hostage_monitor_y = (grd_curscreen->sc_h - Game_window_h) / 2;
|
|
||||||
break;
|
break;
|
||||||
case CM_FULL_COCKPIT:
|
case CM_FULL_COCKPIT:
|
||||||
Hostage_monitor_size = Game_window_w / 6;
|
Hostage_monitor_y = 15*(SHEIGHT/200); //(grd_curscreen->sc_h) / 2.2;
|
||||||
Hostage_monitor_x = (grd_curscreen->sc_w - Game_window_w) / 2;
|
|
||||||
Hostage_monitor_y = (grd_curscreen->sc_h) / 2.5;
|
|
||||||
break;
|
break;
|
||||||
case CM_STATUS_BAR:
|
case CM_STATUS_BAR:
|
||||||
Hostage_monitor_size = Game_window_w / 6;
|
Hostage_monitor_y = (SHEIGHT/200);
|
||||||
Hostage_monitor_x = (grd_curscreen->sc_w - Game_window_w) / 2;
|
|
||||||
Hostage_monitor_y = (max_window_h - Game_window_h) / 2;
|
|
||||||
break;
|
break;
|
||||||
case CM_REAR_VIEW: //no radar in rear view or letterbox!
|
case CM_REAR_VIEW: //no radar in rear view or letterbox!
|
||||||
case CM_LETTERBOX:
|
case CM_LETTERBOX:
|
||||||
|
@ -118,6 +115,16 @@ void radar_render_frame()
|
||||||
|
|
||||||
gr_set_current_canvas(NULL);
|
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_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);
|
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_setcolor( Blips[i].c );
|
||||||
gr_upixel( Blips[i].x, Blips[i].y );
|
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));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue