FS2_Open
Open source remastering of the Freespace 2 engine
managepilot.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 #include "cfile/cfile.h"
11 #include "cutscene/cutscenes.h"
12 #include "freespace2/freespace.h"
13 #include "gamesnd/eventmusic.h"
14 #include "graphics/font.h"
15 #include "hud/hudconfig.h"
16 #include "hud/hudsquadmsg.h"
17 #include "io/joy.h"
18 #include "io/mouse.h"
19 #include "menuui/playermenu.h"
20 #include "menuui/techmenu.h"
23 #include "mission/missionload.h"
26 #include "missionui/redalert.h"
27 #include "mod_table/mod_table.h"
28 #include "network/multi.h"
29 #include "osapi/osregistry.h"
30 #include "pilotfile/pilotfile.h"
31 #include "playerman/managepilot.h"
32 #include "playerman/player.h"
33 #include "popup/popup.h"
34 #include "ship/ship.h"
35 #include "sound/audiostr.h"
36 #include "sound/sound.h"
37 #include "weapon/weapon.h"
38 
39 
40 // pilot pic image list stuff ( call pilot_load_pic_list() to make these valid )
44 
45 // squad logo list stuff (call pilot_load_squad_pic_list() to make these valid )
49 
50 
51 // internal function to delete a player file. Called after a pilot is obsoleted, and when a pilot is deleted
52 // used in barracks and player_select
53 //returns 0 on failure, 1 on success
54 int delete_pilot_file(char *pilot_name)
55 {
56  int delreturn;
58  char basename[MAX_FILENAME_LEN];
59 
60  // get the player file.
61  _splitpath(pilot_name, NULL, NULL, basename, NULL);
62 
63  strcpy_s( filename, basename );
64  strcat_s( filename, NOX(".plr") );
65 
66  delreturn = cf_delete(filename, CF_TYPE_PLAYERS);
67 
68  // we must try and delete the campaign save files for a pilot as well.
69  if (delreturn) {
71  return 1;
72  } else {
73  return 0;
74  }
75 }
76 
77 // this works on barracks and player_select interface screens
79 {
80  int cur_speed;
81 
82  if (reset) {
83  hud_set_default_hud_config(p); // use a default hud config
84 
85  control_config_reset_defaults(); // get a default keyboard config
86  player_set_pilot_defaults(p); // set up any player struct defaults
87 
88  // set the default detail level based on tabling rather than the above method
89  cur_speed = Default_detail_level;
90 
91 #if NUM_DEFAULT_DETAIL_LEVELS != 4
92 #error Code in ManagePilot assumes NUM_DEFAULT_DETAIL_LEVELS = 4
93 #endif
94 
95  detail_level_set(cur_speed);
96 
98 
99  mprintf(( "Setting detail level to %d because of new pilot\n", cur_speed ));
100  Use_mouse_to_fly = 1;
101  Mouse_sensitivity = 4;
102  Joy_sensitivity = 9;
103  Dead_zone_size = 10;
104  }
105 
106  // unassigned squadron
107  strcpy_s(p->s_squad_name, XSTR("Unassigned", 1255));
108  strcpy_s(p->s_squad_filename, "");
109  strcpy_s(p->m_squad_name, XSTR("Unassigned", 1255));
110  strcpy_s(p->m_squad_filename, "");
111 
112  // set him to be a single player pilot by default (the actual creation routines will change this if necessary)
114 
115  // effectively sets the length return by strlen() to 0
116  Campaign.filename[0] = 0;
117 
118  // pick a random pilot image for this guy
119  if (reset){
121  p->insignia_texture = -1;
123  }
124 
125  p->stats.init();
126  Pilot.reset_stats();
127 
128  p->stats.score = 0;
129  p->stats.rank = RANK_ENSIGN;
130 
131  p->tips = 1;
132 
133  // set pilot language to the current language
135 
137 
138  // initialize default multiplayer options
141 
142  Player_loadout.filename[0] = 0;
143 
144  // reset the cutscenes which can be viewed
145  if ( reset ){
146  cutscene_init();
147  }
148 
150 }
151 
153 
155 {
156  char name[NAME_LENGTH];
157  char *desc = NULL;
158  int type, max_players;
159 
160  if ( mission_campaign_get_info( filename, name, &type, &max_players, &desc) ) {
161  if ( type == CAMPAIGN_TYPE_SINGLE) {
164 
165  return 1;
166  }
167  }
168 
169  if (desc != NULL)
170  vm_free(desc);
171 
172  return 0;
173 }
174 
175 //Generates a list of available campaigns. Sets active campaign to "freespace2.fc2", or if that is unavailable, the first campaign found
177 {
178  char wild_card[10];
179  int i, j, incr = 0;
180  char *t = NULL;
181  int rc = 0;
182  char *campaign_file_list[MAX_CAMPAIGNS];
183 
184  memset(wild_card, 0, sizeof(wild_card));
185  strcpy_s(wild_card, NOX("*"));
186  strcat_s(wild_card, FS_CAMPAIGN_FILE_EXT);
187 
188  // set filter for cf_get_file_list() if there isn't one set already (the simroom has a special one)
189  if (Get_file_list_filter == NULL)
191 
192  // now get the list of all campaign names
193  // NOTE: we don't do sorting here, but we assume CF_SORT_NAME, and do it manually below
194  rc = cf_get_file_list(MAX_CAMPAIGNS, campaign_file_list, CF_TYPE_MISSIONS, wild_card, CF_SORT_NONE);
195 
196  for (i = 0; i < rc; i++)
197  {
198  if (!stricmp(campaign_file_list[i], Default_campaign_file_name))
199  {
200  strcpy_s(p->current_campaign, campaign_file_list[i]);
201  return;
202  }
203  }
204 
205  // now sort everything
206  incr = local_num_campaigns / 2;
207 
208  while (incr > 0) {
209  for (i = incr; i < local_num_campaigns; i++) {
210  j = i - incr;
211 
212  while (j >= 0) {
213  char *name1 = Campaign_names[j];
214  char *name2 = Campaign_names[j + incr];
215 
216  // if we hit this then a coder probably did something dumb (like not needing to sort)
217  if ( (name1 == NULL) || (name2 == NULL) ) {
218  Int3();
219  break;
220  }
221 
222  if ( !strnicmp(name1, "the ", 4) )
223  name1 += 4;
224 
225  if ( !strnicmp(name2, "the ", 4) )
226  name2 += 4;
227 
228  if (stricmp(name1, name2) > 0) {
229  // first, do filenames
230  t = campaign_file_list[j];
231  campaign_file_list[j] = campaign_file_list[j + incr];
232  campaign_file_list[j + incr] = t;
233 
234  j -= incr;
235  } else {
236  break;
237  }
238  }
239  }
240 
241  incr /= 2;
242  }
243 
244  if (rc > 0)
245  strcpy_s(p->current_campaign, campaign_file_list[0]);
246  else
247  strcpy_s(p->current_campaign, "<none>");
248 
249 }
250 
251 void pilot_set_short_callsign(player *p, int max_width)
252 {
255  gr_force_fit_string(p->short_callsign, CALLSIGN_LEN - 1, max_width);
257 }
258 
259 // pick a random image for the passed player
261 {
262  // if there are no available pilot pics, set the image filename to null
263  if (Num_pilot_images <= 0) {
264  strcpy_s(p->image_filename, "");
265  } else {
266  // pick a random name from the list
267  int random_index = rand() % Num_pilot_images;
268  Assert((random_index >= 0) && (random_index < Num_pilot_images));
269  strcpy_s(p->image_filename, Pilot_images_arr[random_index]);
270  }
271 }
272 
273 /*
274  * pick a random squad image for the passed player
275  * sets single & multi squad pic to the same image
276  *
277  * @param p pointer to player
278  */
280 {
281  // if there are no available pilot pics, set the image filename to null
282  if (Num_pilot_squad_images <= 0) {
283  player_set_squad_bitmap(p, "", true);
284  player_set_squad_bitmap(p, "", false);
285  } else {
286  // pick a random name from the list
287  int random_index = rand() % Num_pilot_squad_images;
288  Assert((random_index >= 0) && (random_index < Num_pilot_squad_images));
289  player_set_squad_bitmap(p, Pilot_squad_images_arr[random_index], true);
290  player_set_squad_bitmap(p, Pilot_squad_images_arr[random_index], false);
291  }
292 }
293 
294 // format a pilot's callsign into a "personal" form - ie, adding a 's or just an ' as appropriate
295 void pilot_format_callsign_personal(char *in_callsign,char *out_callsign)
296 {
297  // don't do anything if we've got invalid strings
298  if((in_callsign == NULL) || (out_callsign == NULL)){
299  return;
300  }
301 
302  // copy the original string
303  strcpy(out_callsign,in_callsign);
304 
305  // tack on the appropriate postfix
306  if(in_callsign[strlen(in_callsign) - 1] == 's'){
307  strcat(out_callsign,XSTR( "\'", 45));
308  } else {
309  strcat(out_callsign,XSTR( "\'s", 46));
310  }
311 }
312 
313 // throw up a popup asking the user to verify the overwrite of an existing pilot name
314 // 1 == ok to overwrite, 0 == not ok
316 {
317  return popup(PF_USE_AFFIRMATIVE_ICON | PF_USE_NEGATIVE_ICON | PF_TITLE_RED | PF_TITLE_BIG, 2, XSTR( "&No", 47), XSTR( "&Yes", 48), XSTR( "Warning\nA duplicate pilot exists\nOverwrite?", 49));
318 }
319 
320 // load up the list of pilot image filenames (do this at game startup as well as barracks startup)
322 {
323  Num_pilot_images = 0;
324 
325  // load pilot images from the player images directory
327 
328  // sort all filenames
330 }
331 
332 // load up the list of pilot squad filenames
334 {
336 
337  // load pilot images from the player images directory
339 
340  // sort all filenames
342 }
343 
344 // will attempt to load an insignia bitmap and set it as active for the player
345 void player_set_squad_bitmap(player *p, char *fname, bool ismulti)
346 {
347  // sanity check
348  if(p == NULL){
349  return;
350  }
351 
352  char *squad_pic_p;
353  if (ismulti) {
354  squad_pic_p = p->m_squad_filename;
355  } else {
356  squad_pic_p = p->s_squad_filename;
357  }
358 
359  // if he has another bitmap already - unload it
360  if (p->insignia_texture > 0) {
362  }
363 
364  p->insignia_texture = -1;
365 
366  // try and set the new one
367  if (fname != squad_pic_p) {
368  strncpy(squad_pic_p, fname, MAX_FILENAME_LEN);
369  }
370 
371  if (squad_pic_p[0] != '\0') {
373 
374  // lock is as a transparent texture
375  if (p->insignia_texture != -1) {
378  }
379  }
380 }
381 
382 // set squadron
383 void player_set_squad(player *p, char *squad_name)
384 {
385  // sanity check
386  if(p == NULL){
387  return;
388  }
389 
390  if (Game_mode & GM_MULTIPLAYER) {
391  strcpy_s(p->m_squad_name, squad_name);
392  } else {
393  strcpy_s(p->s_squad_name, squad_name);
394  }
395 }
396 
398 {
399  memset(callsign, 0, sizeof(callsign));
400  memset(short_callsign, 0, sizeof(short_callsign));
402 
403  memset(image_filename, 0, sizeof(image_filename));
404  memset(s_squad_filename, 0, sizeof(s_squad_filename));
405  memset(s_squad_name, 0, sizeof(s_squad_name));
406  memset(m_squad_filename, 0, sizeof(m_squad_filename));
407  memset(m_squad_name, 0, sizeof(m_squad_name));
408 
409  memset(current_campaign, 0, sizeof(current_campaign));
411 
412  flags = 0;
413  save_flags = 0;
414 
415  memset(keyed_targets, 0, sizeof(keyed_targets));
416  current_hotkey_set = -1;
417 
419  lead_target_cheat = 0;
421 
422  lock_indicator_x = 0;
423  lock_indicator_y = 0;
427  lock_time_to_target = 0.0f;
428  lock_dist_to_target = 0.0f;
429 
431 
432  objnum = -1;
433 
434  memset(&bi, 0, sizeof(button_info));
435  memset(&ci, 0, sizeof(control_info));
436 
437  stats.init();
438  // only reset Pilotfile stats if we're resetting Player
439  // remember: multi has many Players...
440  if (Player == this) {
441  Pilot.reset_stats();
442  }
443 
444  friendly_hits = 0;
445  friendly_damage = 0.0f;
448 
449  control_mode = 0;
450  saved_viewer_mode = 0;
451 
453 
456 
458  warn_count = 0;
459  damage_this_burst = 0.0f;
460 
461  repair_sound_loop = -1;
462  cargo_scan_loop = -1;
463 
464  praise_count = 0;
467 
468  ask_help_count = 0;
470 
471  scream_count = 0;
473 
476 
477  praise_self_count = 0;
479 
480  subsys_in_view = -1;
482 
483  cargo_inspect_time = -1;
484  target_is_dying = -1;
485  current_target_sx = 0;
486  current_target_sy = 0;
488  locking_subsys = NULL;
490  locking_on_center = 0;
491 
492  killer_objtype = -1;
493  killer_species = 0;
494  killer_weapon_index = -1;
495  memset(killer_parent_name, 0, sizeof(killer_parent_name));
496 
498 
500  update_lock_time = -1;
501  threat_flags = 0;
502  auto_advance = 1;
503 
506 
507  insignia_texture = -1;
508 
509  tips = 1;
510 
512 
514  show_skip_popup = 0;
515 
516  variables.clear();
517 
518  death_message = "";
519 
520  memset(&lua_ci, 0, sizeof(control_info));
521  memset(&lua_bi, 0, sizeof(button_info));
522  memset(&lua_bi_full, 0, sizeof(button_info));
523 
524  player_was_multi = 0;
525  memset(language, 0, sizeof(language));
526 }
527 
528 void player::assign(const player *other)
529 {
530  int i;
531 
532  strcpy_s(callsign, other->callsign);
535 
541 
544 
545  flags = other->flags;
546  save_flags = other->save_flags;
547 
548  memcpy(keyed_targets, other->keyed_targets, sizeof(keyed_targets));
549  // make sure we correctly set the pointers
550  for (i = 0; i < MAX_KEYED_TARGETS; i++)
551  {
552  if (other->keyed_targets[i].next == NULL)
553  keyed_targets[i].next = NULL;
554  else
555  {
556  size_t index = (other->keyed_targets[i].next - &other->keyed_targets[0]);
558  }
559 
560  if (other->keyed_targets[i].prev == NULL)
561  keyed_targets[i].prev = NULL;
562  else
563  {
564  size_t index = (other->keyed_targets[i].prev - &other->keyed_targets[0]);
566  }
567  }
569 
573 
581 
583 
584  // this one might be dicey
585  objnum = other->objnum;
586 
587  memcpy(&bi, &other->bi, sizeof(button_info));
588  memcpy(&ci, &other->ci, sizeof(control_info));
589 
590  stats.assign(other->stats);
591 
592  friendly_hits = other->friendly_hits;
596 
597  control_mode = other->control_mode;
599 
601 
604 
606  warn_count = other->warn_count;
608 
611 
612  praise_count = other->praise_count;
615 
618 
619  scream_count = other->scream_count;
621 
624 
627 
630 
639 
644 
646 
649  threat_flags = other->threat_flags;
650  auto_advance = other->auto_advance;
651 
652  memcpy(&m_local_options, &other->m_local_options, sizeof(multi_local_options));
653  memcpy(&m_server_options, &other->m_server_options, sizeof(multi_server_options));
654 
656 
657  tips = other->tips;
658 
660 
663 
664  variables.clear();
665  variables.reserve(other->variables.size());
666  for (SCP_vector<sexp_variable>::const_iterator ii = other->variables.begin(); ii != other->variables.end(); ++ii)
667  {
669  memcpy(&temp, &(*ii), sizeof(sexp_variable));
670  variables.push_back(temp);
671  }
672 
673  death_message = other->death_message;
674 
675  memcpy(&lua_ci, &other->lua_ci, sizeof(control_info));
676  memcpy(&lua_bi, &other->lua_bi, sizeof(button_info));
677  memcpy(&lua_bi_full, &other->lua_bi_full, sizeof(button_info));
678 
680  strcpy_s(language, other->language);
681 }
int ask_help_count
Definition: player.h:156
void bm_unlock(int handle)
Unlocks a bitmap.
Definition: bmpman.cpp:3005
int Joy_sensitivity
Definition: joy-unix.cpp:29
#define MAX_FILENAME_LEN
Definition: pstypes.h:324
pilotfile Pilot
Definition: pilotfile.cpp:7
char s_squad_name[NAME_LENGTH+1]
Definition: player.h:97
#define NET_TCP
Definition: psnet2.h:29
int i
Definition: multi_pxo.cpp:466
#define vm_free(ptr)
Definition: pstypes.h:548
#define CAMPAIGN_TYPE_SINGLE
int delete_pilot_file(char *pilot_name)
Definition: managepilot.cpp:54
char * Campaign_names[MAX_CAMPAIGNS]
int cf_delete(const char *filename, int path_type)
Delete the specified file.
Definition: cfile.cpp:483
control_info ci
Definition: player.h:126
int flags
Definition: player.h:104
void player_set_squad_bitmap(player *p, char *fname, bool ismulti)
char image_filename[MAX_FILENAME_LEN+1]
Definition: player.h:95
int Game_mode
Definition: systemvars.cpp:24
int Mouse_sensitivity
Definition: mouse.cpp:50
int saved_viewer_mode
Definition: player.h:135
void multi_options_set_local_defaults(multi_local_options *options)
#define CF_TYPE_PLAYERS
Definition: cfile.h:67
int killer_species
Definition: player.h:181
int scream_count
Definition: player.h:159
GLuint index
Definition: Glext.h:5608
multi_server_options m_server_options
Definition: player.h:193
float lock_time_to_target
Definition: player.h:119
void pilot_set_start_campaign(player *p)
int Dead_zone_size
Definition: joy-unix.cpp:27
int check_for_all_alone_msg
Definition: player.h:185
void init_new_pilot(player *p, int reset)
Definition: managepilot.cpp:78
int allow_warn_timestamp
Definition: player.h:143
int cargo_inspect_time
Definition: player.h:171
int insignia_texture
Definition: player.h:195
Assert(pm!=NULL)
int current_hotkey_set
Definition: player.h:108
char filename[MAX_FILENAME_LEN]
void mission_campaign_delete_all_savefiles(char *pilot_name)
#define mprintf(args)
Definition: pstypes.h:238
char * Pilot_squad_image_names[MAX_PILOT_IMAGES]
Definition: managepilot.cpp:47
void player_set_squad(player *p, char *squad_name)
int subsys_in_view
Definition: player.h:168
int local_num_campaigns
int campaign_file_list_filter(const char *filename)
char s_squad_filename[MAX_FILENAME_LEN+1]
Definition: player.h:96
int distance_warning_count
Definition: player.h:140
#define MAX_KEYED_TARGETS
Definition: player.h:26
int update_lock_time
Definition: player.h:188
char m_squad_name[NAME_LENGTH+1]
Definition: player.h:99
int bm_load_duplicate(const char *filename)
Reloads a bitmap as a duplicate.
Definition: bmpman.cpp:1668
int update_dumbfire_time
Definition: player.h:187
#define CF_TYPE_PLAYER_IMAGES
Definition: cfile.h:68
#define RANK_ENSIGN
Definition: scoring.h:30
#define CF_TYPE_SQUAD_IMAGES
Definition: cfile.h:69
int cargo_scan_loop
Definition: player.h:150
void reset_stats()
Definition: pilotfile.cpp:302
char Pilot_images_arr[MAX_PILOT_IMAGES][MAX_FILENAME_LEN]
Definition: managepilot.cpp:41
void reset()
int mission_campaign_get_info(const char *filename, char *name, int *type, int *max_players, char **desc)
#define Int3()
Definition: pstypes.h:292
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 repair_sound_loop
Definition: player.h:148
GLenum type
Definition: Gl.h:1492
SCP_string death_message
Definition: player.h:208
void assign(const player *pl)
int cf_get_file_list_preallocated(int max, char arr[][MAX_FILENAME_LEN], char **list, int type, const char *filter, int sort=CF_SORT_NONE, file_list_info *info=NULL)
int shield_penalty_stamp
Definition: player.h:200
float lock_dist_to_target
Definition: player.h:120
#define FS_CAMPAIGN_FILE_EXT
Definition: freespace.h:26
int low_ammo_complaint_count
Definition: player.h:162
int friendly_hits
Definition: player.h:129
fix friendly_last_hit_time
Definition: player.h:131
Definition: player.h:85
int auto_advance
Definition: player.h:190
void detail_level_set(int level)
Definition: systemvars.cpp:484
int target_is_dying
Definition: player.h:172
int target_in_lock_cone
Definition: player.h:175
void hud_set_default_hud_config(player *p)
Definition: hudconfig.cpp:1552
#define GM_MULTIPLAYER
Definition: systemvars.h:18
char current_campaign[MAX_FILENAME_LEN+1]
Definition: player.h:101
int allow_ammo_timestamp
Definition: player.h:163
void pilot_set_random_pic(player *p)
int readyroom_listing_mode
Definition: player.h:102
control_info lua_ci
Definition: player.h:210
char * filename
#define strnicmp(s1, s2, n)
Definition: config.h:272
int warn_count
Definition: player.h:145
int allow_praise_timestamp
Definition: player.h:153
int Num_pilot_images
Definition: managepilot.cpp:43
#define MAX_CAMPAIGNS
int last_ship_flown_si_index
Definition: player.h:122
int praise_delay_timestamp
Definition: player.h:154
int current_target_sy
Definition: player.h:174
char Default_campaign_file_name[MAX_FILENAME_LEN-4]
int tips
Definition: player.h:198
int lock_indicator_x
Definition: player.h:114
#define vm_strdup(ptr)
Definition: pstypes.h:549
int threat_flags
Definition: player.h:189
multi_local_options m_local_options
Definition: player.h:192
button_info lua_bi_full
Definition: player.h:212
void pilot_set_short_callsign(player *p, int max_width)
int Use_mouse_to_fly
Definition: mouse.cpp:51
bitmap * bm_lock(int handle, ubyte bpp, ubyte flags, bool nodebug)
Locks down the bitmap indexed by bitmapnum.
Definition: bmpman.cpp:1754
int failures_this_session
Definition: player.h:202
float friendly_damage
Definition: player.h:130
ubyte show_skip_popup
Definition: player.h:203
int Default_detail_level
Definition: mod_table.cpp:28
int current_target_sx
Definition: player.h:173
int save_flags
Definition: player.h:105
int killer_objtype
Definition: player.h:180
GLdouble GLdouble t
Definition: Glext.h:5329
void cf_sort_filenames(int n, char **list, int sort, file_list_info *info=NULL)
Definition: cfilelist.cpp:115
int lock_indicator_y
Definition: player.h:115
#define CF_SORT_NONE
Definition: cfile.h:92
char killer_parent_name[NAME_LENGTH]
Definition: player.h:183
const char * XSTR(const char *str, int index)
Definition: localize.cpp:851
int objnum
Definition: player.h:124
void _splitpath(char *path, char *drive, char *dir, char *fname, char *ext)
#define NOX(s)
Definition: pstypes.h:473
GLbitfield flags
Definition: Glext.h:6722
int pilot_verify_overwrite()
int lock_indicator_start_y
Definition: player.h:117
void assign(const scoring_struct &s)
Definition: scoring.cpp:173
int control_mode
Definition: player.h:134
GLuint const GLchar * name
Definition: Glext.h:5608
char language[LCL_LANG_NAME_LEN+1]
Definition: player.h:216
int allow_scream_timestamp
Definition: player.h:160
void player_set_pilot_defaults(player *p)
float damage_this_burst
Definition: player.h:146
void pilot_set_random_squad_pic(player *p)
void pilot_load_squad_pic_list()
int Num_pilot_squad_images
Definition: managepilot.cpp:48
int allow_ask_help_timestamp
Definition: player.h:157
#define FONT1
Definition: font.h:65
#define CALLSIGN_LEN
Definition: globals.h:31
int lead_target_cheat
Definition: player.h:111
campaign Campaign
#define strcat_s(...)
Definition: safe_strings.h:68
#define NAME_LENGTH
Definition: globals.h:15
struct htarget_list * next
Definition: hudtarget.h:50
struct htarget_list * prev
Definition: hudtarget.h:50
int request_repair_timestamp
Definition: player.h:169
void control_config_reset_defaults(int presetnum)
loadout_data Player_loadout
player * Player
int distance_warning_time
Definition: player.h:141
int gr_force_fit_string(char *str, int max_str, int max_width)
Definition: font.cpp:48
void gr_get_string_size(int *w, int *h, const char *text, int len=9999)
Definition: font.cpp:196
#define CF_SORT_NAME
Definition: cfile.h:93
ship_subsys * locking_subsys
Definition: player.h:176
#define CF_TYPE_MISSIONS
Definition: cfile.h:74
GLfloat GLfloat p
Definition: Glext.h:8373
int player_was_multi
Definition: player.h:214
void cutscene_init()
Definition: cutscenes.cpp:51
fix last_warning_message_time
Definition: player.h:132
int lock_indicator_visible
Definition: player.h:118
#define MAX_PILOT_IMAGES
Definition: managepilot.h:20
int Game_skill_level
Definition: fredstubs.cpp:170
SCP_vector< sexp_variable > variables
Definition: player.h:206
vec3d lead_target_pos
Definition: player.h:110
int game_get_default_skill_level()
Definition: fredstubs.cpp:190
button_info lua_bi
Definition: player.h:211
int killer_weapon_index
Definition: player.h:182
int locking_on_center
Definition: player.h:178
int praise_self_count
Definition: player.h:165
char filename[MAX_FILENAME_LEN]
int temp
Definition: lua.cpp:4996
htarget_list keyed_targets[MAX_KEYED_TARGETS]
Definition: player.h:107
#define PLAYER_FLAGS_IS_MULTI
Definition: player.h:42
char m_squad_filename[MAX_FILENAME_LEN+1]
Definition: player.h:98
GLboolean reset
Definition: Glext.h:5243
int short_callsign_width
Definition: player.h:93
void pilot_load_pic_list()
int check_warn_timestamp
Definition: player.h:137
void gr_set_font(int fontnum)
Definition: font.cpp:566
#define BMP_TEX_XPARENT
transparent texture
Definition: bmpman.h:53
void pilot_format_callsign_personal(char *in_callsign, char *out_callsign)
vec3d vmd_zero_vector
Definition: vecmat.cpp:24
int cf_get_file_list(SCP_vector< SCP_string > &list, int pathtype, const char *filter, int sort=CF_SORT_NONE, SCP_vector< file_list_info > *info=NULL)
char Pilot_squad_images_arr[MAX_PILOT_IMAGES][MAX_FILENAME_LEN]
Definition: managepilot.cpp:46
int praise_count
Definition: player.h:152
int lock_indicator_start_x
Definition: player.h:116
#define stricmp(s1, s2)
Definition: config.h:271
button_info bi
Definition: player.h:125
int locking_subsys_parent
Definition: player.h:177
multi_global_options Multi_options_g
char short_callsign[CALLSIGN_LEN+1]
Definition: player.h:92
int praise_self_timestamp
Definition: player.h:166
char * Pilot_image_names[MAX_PILOT_IMAGES]
Definition: managepilot.cpp:42
void lcl_get_language_name(char *lang_name)
Definition: localize.cpp:1121
int(* Get_file_list_filter)(const char *filename)
scoring_struct stats
Definition: player.h:127
#define strcpy_s(...)
Definition: safe_strings.h:67
void multi_options_set_netgame_defaults(multi_server_options *options)
int lead_indicator_active
Definition: player.h:112