| version 1.1 | | version 1.2 |
|---|
| | |
| * Kill matrix displayed at end of level. | | * Kill matrix displayed at end of level. |
| * | | * |
| * $Log$ | | * $Log$ |
| * Revision 1.1 1999/06/14 22:08:16 donut | | * Revision 1.2 2002/03/26 22:10:09 donut |
| * Initial revision | | * fix multiplayer endlevel score display in high res |
| | | * |
| | | * Revision 1.1.1.1 1999/06/14 22:08:16 donut |
| | | * Import of d1x 1.37 source. |
| * | | * |
| * Revision 2.3 1995/05/02 17:01:22 john | | * Revision 2.3 1995/05/02 17:01:22 john |
| * Fixed bug with kill list not showing up in VFX mode. | | * Fixed bug with kill list not showing up in VFX mode. |
| | |
| #include "hudlog.h" | | #include "hudlog.h" |
| //end addition -MM | | //end addition -MM |
| | | |
| | | static int rescale_x(int x) |
| | | { |
| | | return x * GWIDTH / 320; |
| | | } |
| | | |
| | | static int rescale_y(int y) |
| | | { |
| | | return y * GHEIGHT / 200; |
| | | } |
| | | |
| #define CENTERING_OFFSET(x) ((300 - (70 + (x)*25 ))/2) | | #define CENTERING_OFFSET(x) ((300 - (70 + (x)*25 ))/2) |
| | | |
| int kmatrix_kills_changed = 0; | | int kmatrix_kills_changed = 0; |
| | |
| { | | { |
| int j, x, y; | | int j, x, y; |
| | | |
| y = 50+i*9; | | y = rescale_y(50+i*9); |
| | | |
| // Print player name. | | // Print player name. |
| | | |
| gr_printf( CENTERING_OFFSET(N_players), y, "%s", Players[sorted[i]].callsign ); | | gr_printf( rescale_x(CENTERING_OFFSET(N_players)), y, "%s", Players[sorted[i]].callsign ); |
| | | |
| for (j=0; j<N_players; j++) { | | for (j=0; j<N_players; j++) { |
| | | |
| x = 70 + CENTERING_OFFSET(N_players) + j*25; | | x = rescale_x(70 + CENTERING_OFFSET(N_players) + j*25); |
| | | |
| if (sorted[i]==sorted[j]) { | | if (sorted[i]==sorted[j]) { |
| if (kill_matrix[sorted[i]][sorted[j]] == 0) { | | if (kill_matrix[sorted[i]][sorted[j]] == 0) { |
| | |
| | | |
| } | | } |
| | | |
| x = 70 + CENTERING_OFFSET(N_players) + N_players*25; | | x = rescale_x(70 + CENTERING_OFFSET(N_players) + N_players*25); |
| gr_set_fontcolor( BM_XRGB(25,25,25),-1 ); | | gr_set_fontcolor( BM_XRGB(25,25,25),-1 ); |
| gr_printf( x ,y,"%4d",Players[sorted[i]].net_kills_total); | | gr_printf( x ,y,"%4d",Players[sorted[i]].net_kills_total); |
| } | | } |
| | |
| else | | else |
| color = sorted[j]; | | color = sorted[j]; |
| | | |
| x = 70 + CENTERING_OFFSET(N_players) + j*25; | | x = rescale_x(70 + CENTERING_OFFSET(N_players) + j*25); |
| gr_set_fontcolor(gr_getcolor(player_rgb[color].r,player_rgb[color].g,player_rgb[color].b),-1 ); | | gr_set_fontcolor(gr_getcolor(player_rgb[color].r,player_rgb[color].g,player_rgb[color].b),-1 ); |
| gr_printf( x, 40, "%c", Players[sorted[j]].callsign[0] ); | | gr_printf( x, rescale_y(40), "%c", Players[sorted[j]].callsign[0] ); |
| } | | } |
| | | |
| x = 70 + CENTERING_OFFSET(N_players) + N_players*25; | | x = rescale_x(70 + CENTERING_OFFSET(N_players) + N_players*25); |
| gr_set_fontcolor( BM_XRGB(31,31,31),-1 ); | | gr_set_fontcolor( BM_XRGB(31,31,31),-1 ); |
| gr_printf( x, 40, TXT_KILLS); | | gr_printf( x, rescale_y(40), TXT_KILLS); |
| | | |
| | | |
| } | | } |
| | |
| { | | { |
| int j, x, y; | | int j, x, y; |
| | | |
| y = 55 + N_players * 9; | | y = rescale_y(55 + N_players * 9); |
| | | |
| // gr_set_fontcolor(gr_getcolor(player_rgb[j].r,player_rgb[j].g,player_rgb[j].b),-1 ); | | // gr_set_fontcolor(gr_getcolor(player_rgb[j].r,player_rgb[j].g,player_rgb[j].b),-1 ); |
| gr_set_fontcolor( BM_XRGB(31,31,31),-1 ); | | gr_set_fontcolor( BM_XRGB(31,31,31),-1 ); |
| | | |
| x = CENTERING_OFFSET(N_players); | | x = rescale_x(CENTERING_OFFSET(N_players)); |
| gr_printf( x, y, TXT_DEATHS ); | | gr_printf( x, y, TXT_DEATHS ); |
| | | |
| for (j=0; j<N_players; j++) { | | for (j=0; j<N_players; j++) { |
| x = 70 + CENTERING_OFFSET(N_players) + j*25; | | x = rescale_x(70 + CENTERING_OFFSET(N_players) + j*25); |
| gr_printf( x, y, "%d", Players[sorted[j]].net_killed_total ); | | gr_printf( x, y, "%d", Players[sorted[j]].net_killed_total ); |
| } | | } |
| | | |
| y = 55 + 72 + 12; | | y = rescale_y(55 + 72 + 12); |
| x = 35; | | x = rescale_x(35); |
| | | |
| { | | { |
| int sw, sh, aw; | | int sw, sh, aw; |
| gr_get_string_size(TXT_PRESS_ANY_KEY2, &sw, &sh, &aw); | | gr_get_string_size(TXT_PRESS_ANY_KEY2, &sw, &sh, &aw); |
| gr_printf( 160-(sw/2), y, TXT_PRESS_ANY_KEY2); | | gr_printf( rescale_x(160)-(sw/2), y, TXT_PRESS_ANY_KEY2); |
| } | | } |
| } | | } |
| | | |
| | |
| | | |
| gr_set_current_canvas(NULL); | | gr_set_current_canvas(NULL); |
| | | |
| pcx_error = pcx_read_bitmap("STARS.PCX",&grd_curcanv->cv_bitmap,grd_curcanv->cv_bitmap.bm_type,NULL); | | pcx_error = pcx_read_fullscr("STARS.PCX", NULL); |
| Assert(pcx_error == PCX_ERROR_NONE); | | Assert(pcx_error == PCX_ERROR_NONE); |
| | | |
| grd_curcanv->cv_font = Gamefonts[GFONT_MEDIUM_3]; | | grd_curcanv->cv_font = Gamefonts[GFONT_MEDIUM_3]; |
| | | |
| gr_string( 0x8000, 15, TXT_KILL_MATRIX_TITLE ); | | gr_string( 0x8000, rescale_y(15), TXT_KILL_MATRIX_TITLE ); |
| | | |
| grd_curcanv->cv_font = Gamefonts[GFONT_SMALL]; | | grd_curcanv->cv_font = Gamefonts[GFONT_SMALL]; |
| | | |