| version 1.1 | | version 1.2 |
|---|
| | |
| * . | | * . |
| * | | * |
| * $Log$ | | * $Log$ |
| * Revision 1.1 1999/06/14 22:11:14 donut | | * Revision 1.2 1999/07/10 02:59:07 donut |
| * Initial revision | | * more from orulz |
| | | * |
| | | * Revision 1.1.1.1 1999/06/14 22:11:14 donut |
| | | * Import of d1x 1.37 source. |
| * | | * |
| * Revision 1.10 1995/02/27 12:31:15 john | | * Revision 1.10 1995/02/27 12:31:15 john |
| * Version 2.0. | | * Version 2.0. |
| | |
| int Network_allow_radar=0; | | int Network_allow_radar=0; |
| //end this section | | //end this section |
| | | |
| | | //changed 7/5/99 - Owen Evans - radar resizes with screen size |
| static short Hostage_monitor_x = 5; //160-(55/2); // X location of monitor where hostage face appears | | short Hostage_monitor_size, Hostage_monitor_x, Hostage_monitor_y; |
| static short Hostage_monitor_y = 10; //100-50; // Y | | //end changed - OE |
| static short Hostage_monitor_w = 55; // Width of monitor | | |
| static short Hostage_monitor_h = 41; // Height of monitor | | |
| | | |
| static fix radx, rady, rox, roy, cenx, ceny; | | static fix radx, rady, rox, roy, cenx, ceny; |
| | | |
| | |
| | | |
| if ( xpos < Hostage_monitor_x ) xpos = Hostage_monitor_x; | | if ( xpos < Hostage_monitor_x ) xpos = Hostage_monitor_x; |
| if ( ypos < Hostage_monitor_y ) ypos = Hostage_monitor_y; | | if ( ypos < Hostage_monitor_y ) ypos = Hostage_monitor_y; |
| if ( xpos > Hostage_monitor_x+Hostage_monitor_w-1 ) xpos = Hostage_monitor_x+Hostage_monitor_w-1; | | if ( xpos > Hostage_monitor_x+Hostage_monitor_size-1 ) xpos = Hostage_monitor_x+Hostage_monitor_size-1; |
| if ( ypos > Hostage_monitor_y+Hostage_monitor_h-1 ) ypos = Hostage_monitor_y+Hostage_monitor_h-1; | | if ( ypos > Hostage_monitor_y+Hostage_monitor_size-1 ) ypos = Hostage_monitor_y+Hostage_monitor_size-1; |
| | | |
| Blips[N_blips].c = gr_fade_table[hue+color*256]; | | Blips[N_blips].c = gr_fade_table[hue+color*256]; |
| Blips[N_blips].x = xpos; Blips[N_blips].y = ypos; | | Blips[N_blips].x = xpos; Blips[N_blips].y = ypos; |
| | |
| int i,color; | | int i,color; |
| object * objp; | | object * objp; |
| | | |
| | | // added 7/5/99 - Owen Evans - radar resizes with screen size |
| | | 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; |
| | | break; |
| | | case CM_FULL_COCKPIT: |
| | | Hostage_monitor_size = 40; |
| | | Hostage_monitor_x = 0; |
| | | Hostage_monitor_y = 80; |
| | | 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; |
| | | break; |
| | | case CM_REAR_VIEW: //no radar in rear view or letterbox! |
| | | case CM_LETTERBOX: |
| | | return; |
| | | } |
| | | //end added - OE |
| | | |
| if (hostage_is_vclip_playing()) | | if (hostage_is_vclip_playing()) |
| return; | | return; |
| | | |
| | |
| | | |
| gr_setcolor( BM_XRGB( 0, 31, 0 ) ); | | gr_setcolor( BM_XRGB( 0, 31, 0 ) ); |
| | | |
| gr_ucircle( i2f(Hostage_monitor_x+Hostage_monitor_w/2), i2f(Hostage_monitor_y+Hostage_monitor_h/2), i2f(Hostage_monitor_w)/2); | | gr_ucircle( i2f(Hostage_monitor_x+Hostage_monitor_size/2), i2f(Hostage_monitor_y+Hostage_monitor_size/2), i2f(Hostage_monitor_size)/2); |
| | | |
| //other stuff added 9/14/98 by Victor Rachels for fun. | | //other stuff added 9/14/98 by Victor Rachels for fun. |
| gr_circle( i2f(Hostage_monitor_x+Hostage_monitor_w/2), i2f(Hostage_monitor_y+Hostage_monitor_h/2), i2f(Hostage_monitor_w) / 8 ); | | gr_circle( i2f(Hostage_monitor_x+Hostage_monitor_size/2), i2f(Hostage_monitor_y+Hostage_monitor_size/2), i2f(Hostage_monitor_size) / 8 ); |
| gr_upixel((Hostage_monitor_x+Hostage_monitor_w/2), (Hostage_monitor_y+Hostage_monitor_h/2) ); | | gr_upixel((Hostage_monitor_x+Hostage_monitor_size/2), (Hostage_monitor_y+Hostage_monitor_size/2) ); |
| gr_uline(i2f(Hostage_monitor_x+Hostage_monitor_w/10),i2f(Hostage_monitor_y+Hostage_monitor_h/2),i2f(Hostage_monitor_x+Hostage_monitor_w*2/10),i2f(Hostage_monitor_y+Hostage_monitor_h/2)); | | gr_uline(i2f(Hostage_monitor_x+Hostage_monitor_size/10),i2f(Hostage_monitor_y+Hostage_monitor_size/2),i2f(Hostage_monitor_x+Hostage_monitor_size*2/10),i2f(Hostage_monitor_y+Hostage_monitor_size/2)); |
| gr_uline(i2f(Hostage_monitor_x+Hostage_monitor_w-Hostage_monitor_w/10),i2f(Hostage_monitor_y+Hostage_monitor_h/2),i2f(Hostage_monitor_x+Hostage_monitor_w-Hostage_monitor_w*2/10),i2f(Hostage_monitor_y+Hostage_monitor_h/2)); | | gr_uline(i2f(Hostage_monitor_x+Hostage_monitor_size-Hostage_monitor_size/10),i2f(Hostage_monitor_y+Hostage_monitor_size/2),i2f(Hostage_monitor_x+Hostage_monitor_size-Hostage_monitor_size*2/10),i2f(Hostage_monitor_y+Hostage_monitor_size/2)); |
| | | |
| // Erase old blips | | |
| for (i=0; i<N_blips; i++ ) { | | //killed 7/5/99 - Owen Evans - make radar much more useable |
| gr_setcolor(gr_gpixel( &GameBitmaps[cockpit_bitmap[0].index], Blips[i].x, Blips[i].y )); | | // // Erase old blips |
| gr_upixel( Blips[i].x, Blips[i].y ); | | // for (i=0; i<N_blips; i++ ) { |
| } | | // gr_setcolor(gr_gpixel( &GameBitmaps[cockpit_bitmap[0].index], Blips[i].x, Blips[i].y )); |
| | | // gr_upixel( Blips[i].x, Blips[i].y ); |
| | | // } |
| | | //end killed - OE |
| | | |
| N_blips = 0; | | N_blips = 0; |
| | | |
| // if ( !(Players[Player_num].flags & (PLAYER_FLAGS_RADAR_ENEMIES | PLAYER_FLAGS_RADAR_POWERUPS )) ) return; | | // if ( !(Players[Player_num].flags & (PLAYER_FLAGS_RADAR_ENEMIES | PLAYER_FLAGS_RADAR_POWERUPS )) ) return; |
| | | |
| radx = i2f(Hostage_monitor_w*4)/2; | | radx = i2f(Hostage_monitor_size*4)/2; |
| rady = i2f(Hostage_monitor_h*4)/2; | | rady = i2f(Hostage_monitor_size*4)/2; |
| cenx = i2f(Hostage_monitor_x)+i2f(Hostage_monitor_w)/2; | | cenx = i2f(Hostage_monitor_x)+i2f(Hostage_monitor_size)/2; |
| ceny = i2f(Hostage_monitor_y)+i2f(Hostage_monitor_h)/2; | | ceny = i2f(Hostage_monitor_y)+i2f(Hostage_monitor_size)/2; |
| | | |
| rox = fixdiv( cenx, radx ); | | rox = fixdiv( cenx, radx ); |
| roy = fixdiv( ceny, rady ); | | roy = fixdiv( ceny, rady ); |
| | |
| // //if ( Players[Player_num].flags & PLAYER_FLAGS_RADAR_ENEMIES ) | | // //if ( Players[Player_num].flags & PLAYER_FLAGS_RADAR_ENEMIES ) |
| radar_plot_object( objp, BM_XRGB(31,0,0) ); | | radar_plot_object( objp, BM_XRGB(31,0,0) ); |
| break; | | break; |
| | | // added 7/5/99 - Owen Evans - reactor is now shown on radar |
| | | case OBJ_CNTRLCEN: |
| | | radar_plot_object( objp, BM_XRGB(31,31,31) ); |
| | | break; |
| | | // end added - OE |
| default: | | default: |
| break; | | break; |
| } | | } |