FS2_Open
Open source remastering of the Freespace 2 engine
multi_pinfo.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 
13 #include "network/multi_pinfo.h"
14 #include "ui/ui.h"
15 #include "gamesnd/gamesnd.h"
16 #include "freespace2/freespace.h"
18 #include "io/key.h"
19 #include "stats/medals.h"
20 #include "network/multi.h"
21 #include "playerman/player.h"
22 #include "network/multi_xfer.h"
23 #include "globalincs/alphacolors.h"
24 
25 
26 
27 // ---------------------------------------------------------------------------------------
28 // MULTI PLAYER INFO DEFINES/VARS
29 //
30 
31 //XSTR:OFF
32 
33 #define MULTI_PINFO_NUM_BUTTONS 4
34 
35 // bitmaps defs
37  "PilotInfo",
38  "2_PilotInfo"
39 };
41  "PilotInfo-M",
42  "2_PilotInfo-M"
43 };
44 
45 // button defs
46 #define MPI_SCROLL_STATS_UP 0
47 #define MPI_SCROLL_STATS_DOWN 1
48 #define MPI_MEDALS 2
49 #define MPI_EXIT 3
50 
51 // pilot image area defs
53  { // GR_640
54  22, 159, 160, 120
55  },
56  { // GR_1024
57  35, 254, 256, 192
58  }
59 };
61  { // GR_640
62  22, 299, 128, 128
63  },
64  { // GR_1024
65  35, 479, 205, 205
66  }
67 };
68 
69 // pilot bitmaps
70 typedef struct np_bitmap {
71  int bitmap; // bitmap id
72  char filename[MAX_FILENAME_LEN]; // filename
73 } np_bitmap;
74 np_bitmap Mp_pilot; // pilot pic
75 np_bitmap Mp_squad; // squad logo
76 
77 UI_WINDOW Multi_pinfo_window; // the window object for the join screen
78 UI_BUTTON Multi_pinfo_select_button; // for selecting list items
79 int Multi_pinfo_bitmap; // the background bitmap
81  { // GR_640
82  ui_button_info("PIB_00", 617, 256, -1, -1, 0),
83  ui_button_info("PIB_01", 617, 298, -1, -1, 1),
84  ui_button_info("PIB_02", 172, 322, -1, -1, 2),
85  ui_button_info("PIB_03", 219, 332, 217, 318, 3)
86  },
87  { // GR_1024
88  ui_button_info("2_PIB_00", 988, 410, -1, -1, 0),
89  ui_button_info("2_PIB_01", 988, 477, -1, -1, 1),
90  ui_button_info("2_PIB_02", 276, 516, -1, -1, 2),
91  ui_button_info("2_PIB_03", 350, 532, 348, 510, 3)
92  }
93 };
94 
95 #define MULTI_PINFO_NUM_TEXT 1
97  { // GR_640
98  { "Close", 428, 217, 318, UI_XSTR_COLOR_PINK, -1, &Multi_pinfo_buttons[0][MPI_EXIT].button },
99  },
100  { // GR_1024
101  { "Close", 428, 348, 510, UI_XSTR_COLOR_PINK, -1, &Multi_pinfo_buttons[1][MPI_EXIT].button },
102  }
103 };
104 
105 //XSTR:ON
106 
107 // stats labels
108 #define MULTI_PINFO_NUM_STATS_LABELS 9
109 #define MPI_RANK 0
110 #define MPI_MISSIONS_FLOWN 1
111 #define MPI_FLIGHT_TIME 2
112 #define MPI_LAST_FLOWN 3
113 #define MPI_FIGHTER_KILLS 4
114 // #define MPI_OTHER_KILLS 5
115 #define MPI_PSHOTS_FIRED 5
116 //#define MPI_PSHOTS_HIT 6
117  #define MPI_PSHOTS_PCT 6
118 #define MPI_SSHOTS_FIRED 7
119 // #define MPI_SSHOTS_HIT 10
120 #define MPI_SSHOTS_PCT 8
121 
123 
124 #define MAX_LABEL_TEXT 50
127  20,10,10,20,20,10,20,10,10,
128 };
129 
130 // stats area defs
132  { // GR_640
133  215, 163, 414, 155
134  },
135  { // GR_1024
136  335, 261, 662, 248
137  }
138 };
140  460, // GR_640
141  650 // GR_1024
142 };
143 
144 // is the popup already running
146 
147 // background bitmap to be blitted
149 
150 // flag indicating if the popup has gotten messed up somewhere and should bail
152 
153 // flag indicating if the popup should be done
155 
156 // player this popup is being used for
158 
159 // screen shader
160 extern shader Grey_shader;
161 
162 // hardware textures backup
164 
165 
166 // ---------------------------------------------------------------------------------------
167 // MULTI PLAYER INFO FORWARD DECLARATIONS
168 //
169 
170 // initialize all popup details (graphics, etc)
172 
173 // run the popup in a tight loop (no states)
174 void multi_pinfo_popup_do();
175 
176 // close the popup
178 
179 // blit the pilot image
181 
182 // blit the pilot squadron logo
184 
185 // blit the player statistics
187 
188 // check for button presses
190 
191 // act on a button press
193 
194 // display the medals screen for this player
195 void multi_pinfo_do_medals();
196 
197 // load up and use the proper palette
199 
200 // build the stats value strings for this player
202 
203 // if the pilot's image was currently loading when we started the popup, load it up now if its finished
205 
206 // reset the player infomation for this popup
208 
209 // lookup the "previous" player in the netplayer list, return null if not found
211 
212 // lookup the "next" player in the netplayer list, return null if not found
214 
215 
216 // ---------------------------------------------------------------------------------------
217 // MULTI PLAYER INFO FUNCTIONS
218 //
219 
220 // fire up the player info popup, select first available pilot if np == NULL
222 {
223  // if the popup is already running, don't do anything
225  return;
226  }
227 
228  // set the player for informational purposes
229  Assert(np != NULL);
230 
231  // play the popup appear sound
233 
234  // initialize the popup
236 
237  // mark the popup as running
239 
240  // run the popup
242 
243  // close the popup
245 
246  // play the popup disappear sound
248 }
249 
250 // notify the popup that a player has left
252 {
253  net_player *reset;
254 
255  // if we're no active, bail
257  return;
258  }
259 
260  // if this is not the player we're currently displaying, bail
261  if(np != Multi_pinfo_popup_player){
262  return;
263  }
264 
265  // otherwise we need to switch to someone else
266  reset = multi_pinfo_get_prev_player(np);
267  if(reset != NULL){
269  return;
270  }
271  reset = multi_pinfo_get_next_player(np);
272  if(reset != NULL){
274  return;
275  }
276 
277  // bail, since there's no one else
278  Int3();
280 }
281 
282 
283 // ---------------------------------------------------------------------------------------
284 // MULTI PLAYER INFO FORWARD DEFINITIONS
285 //
286 
287 // initialize all popup details (graphics, etc)
289 {
290  int idx;
291 
292  // no errors to start with
294 
295  // shouldn't be done
297 
298  // store the background as it currently is
300  if(Multi_pinfo_screen_save == -1){
302  return;
303  }
304 
305  // create the interface window
306  Multi_pinfo_window.create(0,0,gr_screen.max_w_unscaled,gr_screen.max_h_unscaled,0);
307  Multi_pinfo_window.set_mask_bmap(Multi_pinfo_bitmap_mask[gr_screen.res]);
308 
309  // load the background bitmap
311  if(Multi_pinfo_bitmap < 0){
313  return;
314  }
315 
316  // backup hardware textures setting and bash to max
319 
320  // zero bitmap info
321  Mp_pilot.bitmap = -1;
322  strcpy_s(Mp_pilot.filename, "");
323  Mp_squad.bitmap = -1;
324  strcpy_s(Mp_squad.filename, "");
325 
326  // set the player status
328 
329  // create the interface buttons
330  for(idx=0;idx<MULTI_PINFO_NUM_BUTTONS;idx++){
331  // create the object
332  Multi_pinfo_buttons[gr_screen.res][idx].button.create(&Multi_pinfo_window, "", Multi_pinfo_buttons[gr_screen.res][idx].x, Multi_pinfo_buttons[gr_screen.res][idx].y, 1, 1, 0, 1);
333 
334  // set the sound to play when highlighted
336 
337  // set the ani for the button
338  Multi_pinfo_buttons[gr_screen.res][idx].button.set_bmaps(Multi_pinfo_buttons[gr_screen.res][idx].filename);
339 
340  // set the hotspot
341  Multi_pinfo_buttons[gr_screen.res][idx].button.link_hotspot(Multi_pinfo_buttons[gr_screen.res][idx].hotspot);
342  }
343 
344  // add xstrs
345  for(idx=0; idx<MULTI_PINFO_NUM_TEXT; idx++){
346  Multi_pinfo_window.add_XSTR(&Multi_pinfo_text[gr_screen.res][idx]);
347  }
348 
349  // initialize strings
350  Multi_pinfo_stats_labels[0] = vm_strdup(XSTR("Rank", 1007));
351  Multi_pinfo_stats_labels[1] = vm_strdup(XSTR("Missions Flown", 1008));
352  Multi_pinfo_stats_labels[2] = vm_strdup(XSTR("Flight Time", 1009));
353  Multi_pinfo_stats_labels[3] = vm_strdup(XSTR("Last Flown",1010));
354  Multi_pinfo_stats_labels[4] = vm_strdup(XSTR("Total Kills", 115));
355  Multi_pinfo_stats_labels[5] = vm_strdup(XSTR("Primary Shots Fired", 1012));
356  Multi_pinfo_stats_labels[6] = vm_strdup(XSTR("Primary Hit %", 1013));
357  Multi_pinfo_stats_labels[7] = vm_strdup(XSTR("Secondary Shots Fired", 1014));
358  Multi_pinfo_stats_labels[8] = vm_strdup(XSTR("Secondary Hit %", 1015));
359 }
360 
361 // run the popup in a tight loop (no states)
363 {
364  int k;
365 
366  // if there was an error in initialization, return immediately
368  return;
369  }
370 
371  // tight loop
372  while(!Multi_pinfo_popup_done){
373  multi_pinfo_maybe_reload_pic(&Mp_pilot);
374  multi_pinfo_maybe_reload_pic(&Mp_squad);
375 
376  // process the window
377  k = Multi_pinfo_window.process();
378  switch(k){
379  case KEY_ESC :
381  break;
382  }
383 
384  // check button presses
386 
387  // set frametime and run background stuff
388  game_set_frametime(-1);
390 
391  // draw the background bitmap and the ui window over it
393  gr_reset_clip();
395 
396  // grey the screen
397  gr_set_shader(&Grey_shader);
399 
400  // draw the background bitmap
403 
404  // blit the selected pilot image
406 
407  // blit the squadron logo
409 
410  // blit the player statistics
412 
413  // draw the ui window and flip
414  Multi_pinfo_window.draw();
415  gr_flip();
416  }
417 }
418 
419 // close the popup
421 {
422  int idx;
423 
424  // unload any bitmaps
425  if(Multi_pinfo_bitmap != -1){
427  }
428 
429  // free the background screen if possible
430  if(Multi_pinfo_screen_save >= 0){
432  }
433 
434  // release the pilot/squad images
435  if(Mp_pilot.bitmap != -1){
436  bm_release(Mp_pilot.bitmap);
437  }
438  if(Mp_squad.bitmap != -1){
439  bm_release(Mp_squad.bitmap);
440  }
441 
442  // free up strings
443  for(idx=0; idx<MULTI_PINFO_NUM_STATS_LABELS; idx++){
444  if(Multi_pinfo_stats_labels[idx] != NULL){
447  }
448  }
449 
450  // unset the player handle
451  Multi_pinfo_popup_player = NULL;
452 
453  // mark the popup as not running
455 
456  // destroy the UI_WINDOW
457  Multi_pinfo_window.destroy();
458 
459  // restore hardware textures detail level
461 }
462 
463 // blit the pilot image
465 {
466  char place_text[100];
467  int w;
468 
469  // if we don't have a bitmap handle, blit a placeholder
470  if(Mp_pilot.bitmap == -1){
472 
473  // if there is no image
474  if(strlen(Mp_pilot.filename) <= 0){
475  strcpy_s(place_text,XSTR("No/Invalid Image", 1053));
476  }
477  // if the image is xferring
478  else if(multi_xfer_lookup(Mp_pilot.filename)){
479  strcpy_s(place_text,XSTR("Image Transferring", 691));
480  }
481  // if we're not accepting images
483  strcpy_s(place_text,XSTR("No Image", 692));
484  }
485  // otherwise we wait
486  else {
487  strcpy_s(place_text,XSTR("Waiting", 690));
488  }
489 
490  // center the text
491  gr_get_string_size(&w,NULL,place_text);
493  }
494  // otherwise blit the bitmap
495  else {
496  gr_set_bitmap(Mp_pilot.bitmap);
497 
498  // get width and heigh
499  int bm_w, bm_h;
500  bm_get_info(Mp_pilot.bitmap, &bm_w, &bm_h, NULL, NULL, NULL);
501 
505  // g3_draw_2d_poly_bitmap(Multi_pinfo_pilot_coords[gr_screen.res][0], Multi_pinfo_pilot_coords[gr_screen.res][1], Multi_pinfo_pilot_coords[gr_screen.res][2], Multi_pinfo_pilot_coords[gr_screen.res][3]);
506  }
507 }
508 
509 // blit the pilot squadron logo
511 {
512  char place_text[100];
513  int w;
514  player *p = Multi_pinfo_popup_player->m_player;
515 
516  // if we don't have a bitmap handle, blit a placeholder
517  if(Mp_squad.bitmap == -1){
519 
520  // if there is no image
521  if(strlen(p->m_squad_filename) <= 0){
522  strcpy_s(place_text,XSTR("No/Invalid Image", 1053));
523  }
524  // if the image is xferring
525  else if(multi_xfer_lookup(p->m_squad_filename)){
526  strcpy_s(place_text,XSTR("Image Transferring", 691));
527  }
528  // if we're not accepting images
530  strcpy_s(place_text,XSTR("No Image", 692));
531  }
532  // otherwise we wait
533  else {
534  strcpy_s(place_text,XSTR("Waiting", 690));
535  }
536 
537  // center the text
538  gr_get_string_size(&w, NULL, place_text);
540  }
541  // otherwise blit the bitmap
542  else {
543  gr_set_bitmap(Mp_squad.bitmap);
544  // gr_bitmap(MPI_SQUAD_X, MPI_SQUAD_Y, GR_RESIZE_MENU);
545 
546  // get width and heigh
547  int bm_w, bm_h;
548  bm_get_info(Mp_squad.bitmap, &bm_w, &bm_h, NULL, NULL, NULL);
549 
553  // g3_draw_2d_poly_bitmap(Multi_pinfo_squad_coords[gr_screen.res][0], Multi_pinfo_squad_coords[gr_screen.res][1], Multi_pinfo_squad_coords[gr_screen.res][2], Multi_pinfo_squad_coords[gr_screen.res][3]);
554  }
555 }
556 
557 // blit the player statistics
559 {
560  int idx,y_start;
561 
562  // blit the player's callsign and "all time stats"
566 
568 
569  // blit all the labels
570  y_start = Multi_pinfo_stats_area_coords[gr_screen.res][1] + 15;
571  for(idx=0;idx<MULTI_PINFO_NUM_STATS_LABELS;idx++){
574  }
575 
576  // blit all the stats values themselves
577  y_start = Multi_pinfo_stats_area_coords[gr_screen.res][1] + 15;
578  for(idx=0;idx<MULTI_PINFO_NUM_STATS_LABELS;idx++){
581  }
582 }
583 
584 // check for button presses
586 {
587  int idx;
588 
589  // check for all buttons
590  for(idx=0;idx<MULTI_PINFO_NUM_BUTTONS;idx++){
591  if(Multi_pinfo_buttons[gr_screen.res][idx].button.pressed()){
593  break;
594  }
595  }
596 }
597 
598 // act on a button press
600 {
601  net_player *swap;
602 
603  switch(n){
604  case MPI_EXIT:
606  break;
607 
608  case MPI_MEDALS:
611  break;
612 
613  case MPI_SCROLL_STATS_UP:
614  swap = multi_pinfo_get_prev_player(Multi_pinfo_popup_player);
615  if(swap != NULL){
618  } else {
620  }
621  break;
622 
624  swap = multi_pinfo_get_next_player(Multi_pinfo_popup_player);
625  if(swap != NULL){
628  } else {
630  }
631  break;
632 
633  default :
635  break;
636  }
637 }
638 
639 // display the medals screen for this player
641 {
642  int ret_code;
643 
644  // initialize the medals screen
645  medal_main_init(Multi_pinfo_popup_player->m_player,MM_POPUP);
646 
647  // run the medals screen until it says that it should be closed
648  do {
649  // set frametime and run common functions
650  game_set_frametime(-1);
652 
653  // run the medals screen
654  ret_code = medal_main_do();
655  } while(ret_code && !Multi_pinfo_popup_done);
656 
657  // close the medals screen down
659 
660  // restore the proper palette
662 }
663 
664 // load up and use the proper palette
666 {
667 #ifndef HARDWARE_ONLY
669 #endif
670 }
671 
672 // build the stats value strings for this player
674 {
675  scoring_struct *sc = &Multi_pinfo_popup_player->m_player->stats;
676 
677  // build alltime fighter and non-fighter kills
679 
680  // missions flown
682 
683  // flight time
685 
686  // last flown
687  if(sc->last_flown == 0){
688  strcpy_s(Multi_pinfo_stats_vals[MPI_LAST_FLOWN],XSTR("No missions flown",693));
689  } else {
690  time_t last_flown_tmp = sc->last_flown;
691  tm *tmr = gmtime(&last_flown_tmp);
692  if(tmr != NULL){
693  strftime(Multi_pinfo_stats_vals[MPI_LAST_FLOWN],MAX_LABEL_TEXT,"%m/%d/%y %H:%M",tmr);
694  } else {
696  }
697  }
698 
699  // rank
701 
702  // primary shots fired
704 
705  // primary hit pct
706  if (sc->p_shots_fired > 0) {
707  sprintf(Multi_pinfo_stats_vals[MPI_PSHOTS_PCT], "%d%%", (int)(100.0f * ((float)sc->p_shots_hit / (float)sc->p_shots_fired)));
708  } else {
710  }
711  // primary shots fired
713 
714  // primary hit pct
715  if (sc->s_shots_fired > 0) {
716  sprintf(Multi_pinfo_stats_vals[MPI_SSHOTS_PCT], "%d%%", (int)(100.0f * ((float)sc->s_shots_hit / (float)sc->s_shots_fired)));
717  } else {
719  }
720 }
721 
722 // if the pilot's image was currently loading when we started the popup, load it up now if its finished
724 {
725  // if the bitmap is valid, do nothing
726  if(b->bitmap >= 0){
727  return;
728  }
729 
730  // if the local player is not accepting pix or the netgame is not accepting pix, bail here
732  return;
733  }
734 
735  // if the bitmap filename is bogus
736  if(strlen(b->filename) <= 0){
737  return;
738  }
739 
740  // try again
742 }
743 
744 // attempt to validate a bitmap (ie, return whether its displayable or not)
745 /*
746 int multi_pinfo_validate_bitmap(int bitmap)
747 {
748  int w,h;
749 
750  // if the bitmap handle is invalid false
751  if(bitmap == -1){
752  return 0;
753  }
754 
755  // get the bitmap info
756  w = -1;
757  h = -1;
758  bm_get_info(bitmap,&w,&h);
759 
760  // return fail
761  if((w != MPI_IMAGE_W) || (h != MPI_IMAGE_H)){
762  return 0;
763  }
764 
765  // return success
766  return 1;
767 }
768 */
769 
770 // is the pilot info popup currently active?
772 {
774 }
775 
776 // kill the currently active popup (if any)
778 {
779  // we're done, byatch
781 }
782 
783 // reset the player infomation for this popup
785 {
786  // assign the player
787  Multi_pinfo_popup_player = np;
788 
789  // unload any old image data if necessary
790  strcpy_s(Mp_pilot.filename, "");
791  if(Mp_pilot.bitmap != -1){
792  bm_release(Mp_pilot.bitmap);
793  Mp_pilot.bitmap = -1;
794  }
795  strcpy_s(Mp_squad.filename, "");
796  if(Mp_squad.bitmap != -1){
797  bm_release(Mp_squad.bitmap);
798  Mp_squad.bitmap = -1;
799  }
800 
801  // try and load pilot pic/squad logo
802  if(np->m_player->image_filename[0] != '\0'){
803  strcpy_s(Mp_pilot.filename, np->m_player->image_filename);
804  Mp_pilot.bitmap = bm_load_duplicate(Mp_pilot.filename);
805  }
806  if(np->m_player->m_squad_filename[0] != '\0'){
807  strcpy_s(Mp_squad.filename, np->m_player->m_squad_filename);
808  Mp_squad.bitmap = bm_load_duplicate(Mp_squad.filename);
809  }
810 
811  // build the stats value strings for this player
813 }
814 
815 // lookup the "previous" player in the netplayer list, return null if not found
817 {
818  int start_index;
819  int idx;
820 
821  // get the starting index to look from
822  start_index = NET_PLAYER_INDEX(np);
823  if(start_index > 0){
824  // look backwards
825  for(idx=start_index-1; idx>=0; idx--){
827  return &Net_players[idx];
828  }
829  }
830  }
831 
832  return NULL;
833 }
834 
835 // lookup the "next" player in the netplayer list, return null if not found
837 {
838  int start_index;
839  int idx;
840 
841  // get the starting index to look from
842  start_index = NET_PLAYER_INDEX(np);
843  if(start_index < (MAX_PLAYERS - 1)){
844  // look forwards
845  for(idx=start_index+1; idx<MAX_PLAYERS; idx++){
847  return &Net_players[idx];
848  }
849  }
850  }
851 
852  return NULL;
853 }
void multi_pinfo_notify_drop(net_player *np)
int Multi_pinfo_pilot_coords[GR_NUM_RESOLUTIONS][4]
Definition: multi_pinfo.cpp:52
net_player * Multi_pinfo_popup_player
#define MAX_FILENAME_LEN
Definition: pstypes.h:324
void set_highlight_action(void(*_user_function)(void))
Definition: button.cpp:375
void medal_main_close()
Definition: medals.cpp:736
#define MPI_RANK
#define vm_free(ptr)
Definition: pstypes.h:548
void add_XSTR(char *string, int _xstr_id, int _x, int _y, UI_GADGET *_assoc, int _color_type, int _font_id=-1)
Definition: window.cpp:476
#define MULTI_PINFO_NUM_BUTTONS
Definition: multi_pinfo.cpp:33
int Multi_pinfo_bitmap
Definition: multi_pinfo.cpp:79
void game_do_state_common(int, int)
Definition: fredstubs.cpp:195
void game_set_frametime(int)
Definition: fredstubs.cpp:196
char image_filename[MAX_FILENAME_LEN+1]
Definition: player.h:95
void gr_flip()
Definition: 2d.cpp:2113
int x
Definition: ui.h:658
#define MPI_SSHOTS_PCT
net_player * multi_pinfo_get_prev_player(net_player *np)
net_player * Net_player
Definition: multi.cpp:94
#define GR_RESIZE_MENU
Definition: 2d.h:684
void multi_pinfo_do_medals()
int y
Definition: ui.h:658
#define MPI_MISSIONS_FLOWN
player * m_player
Definition: multi.h:459
#define gr_restore_screen
Definition: 2d.h:826
void multi_pinfo_blit_pilot_image()
#define MPI_FLIGHT_TIME
#define MULTI_STANDALONE(np)
Definition: multi.h:139
int gameseq_get_state(void)
Definition: fredstubs.cpp:60
void multi_pinfo_popup_do()
Assert(pm!=NULL)
#define GR_NUM_RESOLUTIONS
Definition: 2d.h:651
__inline void gr_string(int x, int y, const char *string, int resize_mode=GR_RESIZE_FULL)
Definition: 2d.h:769
general failure sound for any event
Definition: gamesnd.h:297
int medal_main_do()
Definition: medals.cpp:670
int res
Definition: 2d.h:370
int max_h_unscaled
Definition: 2d.h:361
int bm_get_info(int handle, int *w, int *h, ubyte *flags, int *nframes, int *fps)
Gets info on the bitmap indexed by handle.
Definition: bmpman.cpp:769
void multi_pinfo_popup_init(net_player *pl)
GLclampf f
Definition: Glext.h:7097
char Multi_pinfo_stats_vals[MULTI_PINFO_NUM_STATS_LABELS][MAX_LABEL_TEXT]
_fs_time_t last_flown
Definition: scoring.h:103
int multi_xfer_lookup(char *filename)
Definition: multi_xfer.cpp:438
int kill_count
Definition: scoring.h:89
int bm_load_duplicate(const char *filename)
Reloads a bitmap as a duplicate.
Definition: bmpman.cpp:1668
Definition: 2d.h:82
int Multi_pinfo_squad_coords[GR_NUM_RESOLUTIONS][4]
Definition: multi_pinfo.cpp:60
int multi_pinfo_popup_active()
void gr_set_color_fast(color *dst)
Definition: 2d.cpp:1197
Definition: ui.h:195
unsigned int s_shots_fired
Definition: scoring.h:92
void gr_set_bitmap(int bitmap_num, int alphablend_mode, int bitblt_mode, float alpha)
Definition: 2d.cpp:2105
int max_w_unscaled
Definition: 2d.h:361
#define Int3()
Definition: pstypes.h:292
#define GR_RESIZE_NONE
Definition: 2d.h:681
int bm_release(int handle, int clear_render_targets)
Frees both a bitmap's data and it's associated slot.
Definition: bmpman.cpp:2603
char callsign[CALLSIGN_LEN+1]
Definition: player.h:91
int clip_height
Definition: 2d.h:378
void multi_pinfo_blit_squadron_logo()
UI_XSTR Multi_pinfo_text[GR_NUM_RESOLUTIONS][MULTI_PINFO_NUM_TEXT]
Definition: multi_pinfo.cpp:96
popup dialog box appeared
Definition: gamesnd.h:315
int Multi_pinfo_stats_label_offsets[MULTI_PINFO_NUM_STATS_LABELS]
void destroy()
Definition: window.cpp:189
#define gr_reset_clip
Definition: 2d.h:745
unsigned int missions_flown
Definition: scoring.h:101
void set_mask_bmap(char *fname)
Definition: window.cpp:75
int set_bmaps(char *ani_filename, int nframes=3, int start_frame=1)
Definition: gadget.cpp:71
void game_format_time(long, char *)
Definition: fredstubs.cpp:204
int Multi_pinfo_screen_save
Definition: player.h:85
#define NET_PLAYER_INDEX(np)
Definition: multi.h:125
net_player_info p_info
Definition: multi.h:473
void medal_main_init(player *pl, int mode)
Definition: medals.cpp:525
color Color_bright
Definition: alphacolors.cpp:28
multi_server_options options
Definition: multi.h:514
detail_levels Detail
Definition: systemvars.cpp:478
#define MPI_SCROLL_STATS_DOWN
Definition: multi_pinfo.cpp:47
unsigned int p_shots_fired
Definition: scoring.h:91
#define MPI_MEDALS
Definition: multi_pinfo.cpp:48
#define gr_save_screen
Definition: 2d.h:825
void multi_pinfo_popup(net_player *np)
netgame_info Netgame
Definition: multi.cpp:97
int hotspot
Definition: ui.h:659
int pressed()
Definition: button.cpp:325
void multi_pinfo_maybe_reload_pic(np_bitmap *b)
#define MPI_LAST_FLOWN
#define w(p)
Definition: modelsinc.h:68
sprintf(buf,"(%f,%f,%f)", v3->xyz.x, v3->xyz.y, v3->xyz.z)
void gr_shade(int x, int y, int w, int h, int resize_mode)
Definition: 2d.cpp:2085
#define MULTI_PINFO_NUM_STATS_LABELS
#define vm_strdup(ptr)
Definition: pstypes.h:549
int hardware_textures
Definition: systemvars.h:169
shader Grey_shader
Definition: contexthelp.cpp:84
#define MAX_PLAYERS
Definition: pstypes.h:32
int Multi_pinfo_popup_done
UI_BUTTON button
Definition: ui.h:660
void multi_pinfo_popup_kill()
#define MPI_EXIT
Definition: multi_pinfo.cpp:49
void multi_pinfo_build_stats()
int idx
Definition: multiui.cpp:761
int Multi_pinfo_popup_error
#define MM_POPUP
Definition: medals.h:59
int Multi_pinfo_hardware_texture_backup
GLclampd n
Definition: Glext.h:7286
const char * XSTR(const char *str, int index)
Definition: localize.cpp:851
void multi_pinfo_popup_check_buttons()
user_click (mouse selects a control)
Definition: gamesnd.h:305
int Multi_pinfo_popup_running
popup dialog box goes away
Definition: gamesnd.h:316
#define MPI_PSHOTS_PCT
struct np_bitmap np_bitmap
int bm_load(const char *real_filename)
Loads a bitmap so we can draw with it later.
Definition: bmpman.cpp:1119
GLboolean GLboolean GLboolean b
Definition: Glext.h:5781
net_player * multi_pinfo_get_next_player(net_player *np)
unsigned int flight_time
Definition: scoring.h:102
void multi_pinfo_popup_button_pressed(int n)
void link_hotspot(int num)
Definition: gadget.cpp:50
void create(UI_WINDOW *wnd, char *_text, int _x, int _y, int _w, int _h, int do_repeat=0, int ignore_focus=0)
Definition: button.cpp:26
#define KEY_ESC
Definition: key.h:124
#define UI_XSTR_COLOR_PINK
Definition: ui.h:161
void palette_use_bm_palette(int n)
Definition: palman.cpp:578
#define MULTI_CONNECTED(np)
Definition: multi.h:136
void create(int _x, int _y, int _w, int _h, int _flags, int _f_id=-1)
Definition: window.cpp:140
void multi_pinfo_set_palette()
Definition: ui.h:584
int clip_width
Definition: 2d.h:378
screen gr_screen
Definition: 2d.cpp:46
void gr_get_string_size(int *w, int *h, const char *text, int len=9999)
Definition: font.cpp:196
Definition: ui.h:162
int Multi_pinfo_stats_area_coords[GR_NUM_RESOLUTIONS][4]
unsigned int p_shots_hit
Definition: scoring.h:94
UI_BUTTON Multi_pinfo_select_button
Definition: multi_pinfo.cpp:78
void multi_pinfo_reset_player(net_player *np)
GLfloat GLfloat p
Definition: Glext.h:8373
void common_play_highlight_sound()
Definition: gamesnd.cpp:1151
int Multi_pinfo_stats_x[GR_NUM_RESOLUTIONS]
np_bitmap Mp_squad
Definition: multi_pinfo.cpp:75
#define MPI_FIGHTER_KILLS
#define MPI_SSHOTS_FIRED
#define MSO_FLAG_ACCEPT_PIX
#define gr_free_screen
Definition: 2d.h:827
#define MLO_FLAG_ACCEPT_PIX
Definition: multi_options.h:99
color Color_normal
Definition: alphacolors.cpp:28
char * filename
Definition: ui.h:657
void multi_pinfo_blit_player_stats()
rank_stuff Ranks[NUM_RANKS]
Definition: scoring.cpp:45
void multi_pinfo_popup_close()
void gr_bitmap(int _x, int _y, int resize_mode)
Definition: 2d.cpp:1303
char * Multi_pinfo_stats_labels[MULTI_PINFO_NUM_STATS_LABELS]
#define MPI_SCROLL_STATS_UP
Definition: multi_pinfo.cpp:46
np_bitmap Mp_pilot
Definition: multi_pinfo.cpp:74
char m_squad_filename[MAX_FILENAME_LEN+1]
Definition: player.h:98
GLboolean reset
Definition: Glext.h:5243
UI_WINDOW Multi_pinfo_window
Definition: multi_pinfo.cpp:77
void gamesnd_play_iface(int n)
Definition: gamesnd.cpp:260
#define MPI_PSHOTS_FIRED
void draw()
Definition: window.cpp:220
struct ui_button_info ui_button_info
#define MAX_DETAIL_LEVEL
Definition: systemvars.h:159
ui_button_info Multi_pinfo_buttons[GR_NUM_RESOLUTIONS][MULTI_PINFO_NUM_BUTTONS]
Definition: multi_pinfo.cpp:80
void gr_set_shader(shader *shade)
Definition: 2d.cpp:1220
int process(int key_in=-1, int process_mouse=1)
Definition: window.cpp:401
net_player Net_players[MAX_PLAYERS]
Definition: multi.cpp:93
unsigned int s_shots_hit
Definition: scoring.h:95
#define MAX_LABEL_TEXT
char filename[MAX_FILENAME_LEN]
Definition: multi_pinfo.cpp:72
char * Multi_pinfo_bitmap_name[GR_NUM_RESOLUTIONS]
Definition: multi_pinfo.cpp:36
#define fl2f(fl)
Definition: floating.h:38
#define MULTI_PINFO_NUM_TEXT
Definition: multi_pinfo.cpp:95
multi_local_options options
Definition: multi.h:452
scoring_struct stats
Definition: player.h:127
#define strcpy_s(...)
Definition: safe_strings.h:67
char name[NAME_LENGTH]
Definition: scoring.h:66
char * Multi_pinfo_bitmap_mask[GR_NUM_RESOLUTIONS]
Definition: multi_pinfo.cpp:40