/* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ /* * * Kill matrix displayed at end of level. * */ #ifdef NETWORK #include #include #include #include #include #include #include "error.h" #include "pstypes.h" #include "gr.h" #include "key.h" #include "palette.h" #include "game.h" #include "gamefont.h" #include "u_mem.h" #include "newmenu.h" #include "menu.h" #include "player.h" #include "screens.h" #include "mouse.h" #include "joy.h" #include "timer.h" #include "text.h" #include "rbaudio.h" #include "multi.h" #include "kmatrix.h" #include "gauges.h" #include "pcx.h" #include "fuelcen.h" #ifdef OGL #include "ogl_init.h" #endif #define CENTERING_OFFSET(x) ((300 - (70 + (x)*25 ))/2) #define CENTERSCREEN (SWIDTH/2) /* IPX CODE - START */ #define MAX_VIEW_TIME F1_0*60 fix StartAbortMenuTime; static int rescale_x(int x) { return x * GWIDTH / 320; } static int rescale_y(int y) { return y * GHEIGHT / 200; } void kmatrix_ipx_draw_item( int i, int *sorted ) { int j, x, y; y = rescale_y(50+i*9); // Print player name. gr_printf( rescale_x(CENTERING_OFFSET(N_players)), y, "%s", Players[sorted[i]].callsign ); for (j=0; jcv_font = MEDIUM3_FONT; gr_string( 0x8000, rescale_y(15), TXT_KILL_MATRIX_TITLE ); grd_curcanv->cv_font = GAME_FONT; multi_get_kill_list(sorted); kmatrix_ipx_draw_names(sorted); for (i=0; i entry_time+MAX_VIEW_TIME) done=1; if (network && (Game_mode & GM_NETWORK)) { multi_endlevel_poll1(0, NULL, &key, 0); if (key < -1) done = 1; } gr_flip(); } game_flush_inputs(); } /* IPX CODE - END */ /* NEW CODE - START */ #define KMATRIX_VIEW_SEC 7 // Time after reactor explosion until new level - in seconds void kmatrix_redraw_coop(); void kmatrix_draw_item( int i, int *sorted ) { int j, x, y; char temp[10]; y = FSPACY(50+i*9); gr_printf( FSPACX(CENTERING_OFFSET(N_players)), y, "%s", Players[sorted[i]].callsign ); for (j=0; jcv_font = GAME_FONT; gr_set_fontcolor(gr_find_closest_color(255,255,255),-1); if (reactor) gr_printf(0x8000, SHEIGHT-LINE_SPACING, "Waiting for players to finish level. Reactor time: T-%d", time); else gr_printf(0x8000, SHEIGHT-LINE_SPACING, "Level finished. Wait (%d) to proceed or ESC to Quit.", time); } void kmatrix_redraw() { int i, pcx_error, color; int sorted[MAX_NUM_NET_PLAYERS]; pcx_error = pcx_read_fullscr(STARS_BACKGROUND, gr_palette); Assert(pcx_error == PCX_ERROR_NONE); if (Game_mode & GM_MULTI_COOP) { kmatrix_redraw_coop(); } else { multi_sort_kill_list(); gr_set_current_canvas(NULL); grd_curcanv->cv_font = MEDIUM3_FONT; gr_string( 0x8000, FSPACY(10), TXT_KILL_MATRIX_TITLE); grd_curcanv->cv_font = GAME_FONT; multi_get_kill_list(sorted); kmatrix_draw_names(sorted); for (i=0; icv_font = MEDIUM3_FONT; gr_string( 0x8000, FSPACY(10), "COOPERATIVE SUMMARY"); grd_curcanv->cv_font = GAME_FONT; multi_get_kill_list(sorted); kmatrix_draw_coop_names(sorted); for (i=0; i= end_time && end_time != -1) done = 1; if (playing) kmatrix_status_msg(Fuelcen_seconds_left, 1); else kmatrix_status_msg(f2i(time-end_time), 0); k = key_inkey(); switch( k ) { case KEY_ESC: if (network) { StartAbortMenuTime=timer_get_fixed_seconds(); choice=nm_messagebox1( NULL,multi_endlevel_poll2, 2, TXT_YES, TXT_NO, TXT_ABORT_GAME ); } else choice=nm_messagebox( NULL, 2, TXT_YES, TXT_NO, TXT_ABORT_GAME ); if (choice==0) { Players[Player_num].connected=CONNECT_DISCONNECTED; if (network) multi_send_endlevel_packet(); multi_leave_game(); longjmp(LeaveGame, 0); return; } break; case KEY_PRINT_SCREEN: save_screen_shot(0); break; default: break; } gr_flip(); } if (network) multi_send_endlevel_packet(); // make sure game_flush_inputs(); newmenu_close(); } /* NEW CODE - END */ #endif