FS2_Open
Open source remastering of the Freespace 2 engine
iff_defs.cpp
Go to the documentation of this file.
1 /*
2  * Created by Ian "Goober5000" Warfield for the FreeSpace2 Source Code Project.
3  * You may not sell or otherwise commercially exploit the source or things you
4  * create based on the source.
5  */
6 
7 
8 
9 #include "globalincs/def_files.h"
10 #include "hud/hud.h"
11 #include "iff_defs/iff_defs.h"
12 #include "io/timer.h"
13 #include "mission/missionparse.h"
14 #include "parse/parselo.h"
15 #include "ship/ship.h"
16 
17 extern int radar_target_id_flags;
18 
21 
23 
24 int radar_iff_color[5][2][4];
27 
28 // global only to file
29 color Iff_colors[MAX_IFF_COLORS][2]; // AL 1-2-97: Create two IFF colors, regular and bright
30 
32  { "crosshairs", RTIF_CROSSHAIRS, 0 },
33  { "blink", RTIF_BLINK, 0 },
34  { "pulsate", RTIF_PULSATE, 0 },
35  { "enlarge", RTIF_ENLARGE, 0 }
36 };
37 
38 int Num_rti_flags = sizeof(rti_flags)/sizeof(flag_def_list);
39 
45 int iff_get_alpha_value(bool is_bright)
46 {
47  if (is_bright == false)
48  return (HUD_COLOR_ALPHA_MAX - iff_bright_delta) * 16;
49  else
50  return HUD_COLOR_ALPHA_MAX * 16;
51 }
52 
62 int iff_init_color(int r, int g, int b)
63 {
64  typedef struct {
65  int r;
66  int g;
67  int b;
68  } temp_color_t;
69 
70  int i, idx;
71  temp_color_t *c;
72 
73  static int num_iff_colors = 0;
74  static temp_color_t temp_colors[MAX_IFF_COLORS];
75 
76  Assert(r >= 0 && r <= 255);
77  Assert(g >= 0 && g <= 255);
78  Assert(b >= 0 && b <= 255);
79 
80  // make sure we're under the limit
81  if (num_iff_colors >= MAX_IFF_COLORS)
82  {
83  Warning(LOCATION, "Too many iff colors! Ignoring the rest...\n");
84  return 0;
85  }
86 
87  // find out if this color is in use
88  for (i = 0; i < num_iff_colors; i++)
89  {
90  c = &temp_colors[i];
91 
92  if (c->r == r && c->g == g && c->b == b)
93  return i;
94  }
95 
96  // not in use, so add a new slot
97  idx = num_iff_colors;
98  num_iff_colors++;
99 
100  // save the values
101  c = &temp_colors[idx];
102  c->r = r;
103  c->g = g;
104  c->b = b;
105 
106  // init it
107  gr_init_alphacolor(&Iff_colors[idx][0], r, g, b, iff_get_alpha_value(false));
108  gr_init_alphacolor(&Iff_colors[idx][1], r, g, b, iff_get_alpha_value(true));
109 
110  // return the new slot
111  return idx;
112 }
113 
117 void iff_init()
118 {
119  char traitor_name[NAME_LENGTH];
120  char attack_names[MAX_IFFS][MAX_IFFS][NAME_LENGTH];
121  struct {
122  char iff_name[NAME_LENGTH];
123  int color_index;
124  } observed_color_table[MAX_IFFS][MAX_IFFS];
125 
126  int num_attack_names[MAX_IFFS];
127  int num_observed_colors[MAX_IFFS];
128  int i, j, k;
129  int string_idx;
130 
131  try
132  {
133  // Goober5000 - if table doesn't exist, use the default table
134  if (cf_exists_full("iff_defs.tbl", CF_TYPE_TABLES))
135  read_file_text("iff_defs.tbl", CF_TYPE_TABLES);
136  else
138 
139  reset_parse();
140 
141  // parse the table --------------------------------------------------------
142 
143  required_string("#IFFs");
144 
145  // get the traitor
146  required_string("$Traitor IFF:");
147  stuff_string(traitor_name, F_NAME, NAME_LENGTH);
148 
149  int rgb[3];
150 
151  // check if alternate colours are wanted to be used for these
152  // Marks various stuff... like asteroids
153  if ((optional_string("$Selection Color:")) || (optional_string("$Selection Colour:")))
154  {
156  iff_init_color(rgb[0], rgb[1], rgb[2]);
157  }
158  else
159  iff_init_color(0xff, 0xff, 0xff);
160 
161  // Marks the ship currently saying something
162  if ((optional_string("$Message Color:")) || (optional_string("$Message Colour:")))
163  {
165  iff_init_color(rgb[0], rgb[1], rgb[2]);
166  }
167  else
168  iff_init_color(0x7f, 0x7f, 0x7f);
169 
170  // Marks the tagged ships
171  if ((optional_string("$Tagged Color:")) || (optional_string("$Tagged Colour:")))
172  {
174  iff_init_color(rgb[0], rgb[1], rgb[2]);
175  }
176  else
177  iff_init_color(0xff, 0xff, 0x00);
178 
179  // init radar blips colour table
180  int a_bright, a_dim;
181  bool alternate_blip_color = false;
182  for (i = 0; i < 5; i++)
183  {
184  for (j = 0; j < 2; j++)
185  {
186  for (k = 0; k < 3; k++)
187  {
188  radar_iff_color[i][j][k] = -1;
189  }
190  }
191  }
192 
193  // if the bright/dim scaling is wanted to be changed
194  if (optional_string("$Dimmed IFF brightness:"))
195  {
196  int dim_iff_brightness;
197  stuff_int(&dim_iff_brightness);
198  Assert(dim_iff_brightness >= 0 && dim_iff_brightness <= HUD_COLOR_ALPHA_MAX);
199  *iff_color_brightness = dim_iff_brightness;
200  }
201  else
203 
204  // alternate = use same method as with ship blips
205  // retail = use 1/2 intensities
206  if (optional_string("$Use Alternate Blip Coloring:") || optional_string("$Use Alternate Blip Colouring:"))
207  {
208  stuff_boolean(&alternate_blip_color);
209  }
210 
211  // Parse blip colours, their order is hardcoded.
212  if ((optional_string("$Missile Blip Color:")) || (optional_string("$Missile Blip Colour:")))
213  {
215  for (i = 0; i < 3; i++)
216  {
217  Assert(rgb[i] >= 0 && rgb[i] <= 255);
218  radar_iff_color[0][1][i] = rgb[i];
219  radar_iff_color[0][0][i] = rgb[i] / 2;
220  }
221  }
222 
223  if ((optional_string("$Navbuoy Blip Color:")) || (optional_string("$Navbuoy Blip Colour:")))
224  {
226  for (i = 0; i < 3; i++)
227  {
228  Assert(rgb[i] >= 0 && rgb[i] <= 255);
229  radar_iff_color[1][1][i] = rgb[i];
230  radar_iff_color[1][0][i] = rgb[i] / 2;
231  }
232  }
233 
234  if ((optional_string("$Warping Blip Color:")) || (optional_string("$Warping Blip Colour:")))
235  {
237  for (i = 0; i < 3; i++)
238  {
239  Assert(rgb[i] >= 0 && rgb[i] <= 255);
240  radar_iff_color[2][1][i] = rgb[i];
241  radar_iff_color[2][0][i] = rgb[i] / 2;
242  }
243  }
244 
245  if ((optional_string("$Node Blip Color:")) || (optional_string("$Node Blip Colour:")))
246  {
248  for (i = 0; i < 3; i++)
249  {
250  Assert(rgb[i] >= 0 && rgb[i] <= 255);
251  radar_iff_color[3][1][i] = rgb[i];
252  radar_iff_color[3][0][i] = rgb[i] / 2;
253  }
254  }
255 
256  if ((optional_string("$Tagged Blip Color:")) || (optional_string("$Tagged Blip Colour:")))
257  {
259  for (i = 0; i < 3; i++)
260  {
261  Assert(rgb[i] >= 0 && rgb[i] <= 255);
262  radar_iff_color[4][1][i] = rgb[i];
263  radar_iff_color[4][0][i] = rgb[i] / 2;
264  }
265  }
266 
267  if (alternate_blip_color == true)
268  {
269  a_bright = iff_get_alpha_value(true);
270  a_dim = iff_get_alpha_value(false);
271  for (i = 0; i < 5; i++)
272  {
273  if (radar_iff_color[i][0][0] >= 0)
274  {
275  for (j = 0; j < 3; j++)
276  {
277  radar_iff_color[i][0][j] = radar_iff_color[i][1][j];
278  }
279 
280  radar_iff_color[i][1][3] = a_bright;
281  radar_iff_color[i][0][3] = a_dim;
282  }
283  }
284  }
285  else
286  {
287  for (i = 0; i < 5; i++)
288  {
289  if (radar_iff_color[i][0][0] >= 0)
290  {
291  radar_iff_color[i][0][3] = 255;
292  radar_iff_color[i][1][3] = 255;
293  }
294  }
295  }
296 
297  if (optional_string("$Radar Target ID Flags:")) {
299  if (optional_string("+reset"))
301  }
302 
303  // begin reading data
304  Num_iffs = 0;
305  while (required_string_either("#End", "$IFF Name:"))
306  {
307  iff_info *iff;
308  int cur_iff;
309 
310  // make sure we're under the limit
311  if (Num_iffs >= MAX_IFFS)
312  {
313  Warning(LOCATION, "Too many iffs in iffs_defs.tbl! Max is %d.\n", MAX_IFFS);
314  skip_to_start_of_string("#End", NULL);
315  break;
316  }
317 
318  // add new IFF
319  iff = &Iff_info[Num_iffs];
320  cur_iff = Num_iffs;
321  Num_iffs++;
322 
323 
324  // get required IFF info ----------------------------------------------
325 
326  // get the iff name
327  required_string("$IFF Name:");
329 
330  // get the iff color
331  if (check_for_string("$Colour:"))
332  required_string("$Colour:");
333  else
334  required_string("$Color:");
336  iff->color_index = iff_init_color(rgb[0], rgb[1], rgb[2]);
337 
338 
339  // get relationships between IFFs -------------------------------------
340 
341  // get the list of iffs attacked
342  if (optional_string("$Attacks:"))
343  num_attack_names[cur_iff] = stuff_string_list(attack_names[cur_iff], MAX_IFFS);
344  else
345  num_attack_names[cur_iff] = 0;
346 
347  // get the list of observed colors
348  num_observed_colors[cur_iff] = 0;
349  while (optional_string("+Sees"))
350  {
351  // get iff observed
352  stuff_string_until(observed_color_table[cur_iff][num_observed_colors[cur_iff]].iff_name, "As:", NAME_LENGTH);
353  required_string("As:");
354 
355  // get color observed
357  observed_color_table[cur_iff][num_observed_colors[cur_iff]].color_index = iff_init_color(rgb[0], rgb[1], rgb[2]);
358 
359  // increment
360  num_observed_colors[cur_iff]++;
361  }
362 
363 
364  // get flags ----------------------------------------------------------
365 
366  // get iff flags
367  iff->flags = 0;
368  if (optional_string("$Flags:"))
369  {
370  char flag_strings[MAX_IFF_FLAGS][NAME_LENGTH];
371 
372  int num_strings = stuff_string_list(flag_strings, MAX_IFF_FLAGS);
373  for (string_idx = 0; string_idx < num_strings; string_idx++)
374  {
375  if (!stricmp(NOX("support allowed"), flag_strings[string_idx]))
376  iff->flags |= IFFF_SUPPORT_ALLOWED;
377  else if (!stricmp(NOX("exempt from all teams at war"), flag_strings[string_idx]))
379  else if (!stricmp(NOX("orders hidden"), flag_strings[string_idx]))
380  iff->flags |= IFFF_ORDERS_HIDDEN;
381  else if (!stricmp(NOX("orders shown"), flag_strings[string_idx]))
382  iff->flags |= IFFF_ORDERS_SHOWN;
383  else if (!stricmp(NOX("wing name hidden"), flag_strings[string_idx]))
385  else
386  Warning(LOCATION, "Bogus string in iff flags: %s\n", flag_strings[string_idx]);
387  }
388  }
389 
390  // get default ship flags
391  iff->default_parse_flags = 0;
392  if (optional_string("$Default Ship Flags:"))
393  {
394  i = 0;
395  j = 0;
396  char flag_strings[MAX_PARSE_OBJECT_FLAGS][NAME_LENGTH];
397  int num_strings = stuff_string_list(flag_strings, MAX_PARSE_OBJECT_FLAGS);
398  for (i = 0; i < num_strings; i++)
399  {
400  for (j = 0; j < MAX_PARSE_OBJECT_FLAGS; j++)
401  {
402  if (!stricmp(flag_strings[i], Parse_object_flags[j]))
403  {
404  iff->default_parse_flags |= (1 << j);
405  break;
406  }
407  }
408  }
409 
410  if (j == MAX_PARSE_OBJECT_FLAGS)
411  Warning(LOCATION, "Bogus string in iff default ship flags: %s\n", flag_strings[i]);
412  }
413 
414  // again
415  iff->default_parse_flags2 = 0;
416  if (optional_string("$Default Ship Flags2:"))
417  {
418  i = 0;
419  j = 0;
420  char flag_strings[MAX_PARSE_OBJECT_FLAGS_2][NAME_LENGTH];
421  int num_strings = stuff_string_list(flag_strings, MAX_PARSE_OBJECT_FLAGS_2);
422  for (i = 0; i < num_strings; i++)
423  {
424  for (j = 0; j < MAX_PARSE_OBJECT_FLAGS_2; j++)
425  {
426  if (!stricmp(flag_strings[i], Parse_object_flags_2[j]))
427  {
428  iff->default_parse_flags2 |= (1 << j);
429  break;
430  }
431  }
432  }
433 
434  if (j == MAX_PARSE_OBJECT_FLAGS_2)
435  Warning(LOCATION, "Bogus string in iff default ship flags2: %s\n", flag_strings[i]);
436  }
437 
438  // this is cleared between each level but let's just set it here for thoroughness
439  iff->ai_rearm_timestamp = timestamp(-1);
440  }
441 
442  required_string("#End");
443 
444 
445  // now resolve the relationships ------------------------------------------
446 
447  // first get the traitor
448  Iff_traitor = iff_lookup(traitor_name);
449  if (Iff_traitor < 0)
450  {
451  Iff_traitor = 0;
452  Warning(LOCATION, "Traitor IFF %s not found in iff_defs.tbl! Defaulting to %s.\n", traitor_name, Iff_info[Iff_traitor].iff_name);
453  }
454 
455  // next get the attackees and colors
456  for (int cur_iff = 0; cur_iff < Num_iffs; cur_iff++)
457  {
458  iff_info *iff = &Iff_info[cur_iff];
459 
460  // clear the iffs to be attacked
461  iff->attackee_bitmask = 0;
463 
464  // clear the observed colors
465  for (j = 0; j < MAX_IFFS; j++)
466  iff->observed_color_index[j] = -1;
467 
468  // resolve the list names
469  for (int list_index = 0; list_index < MAX_IFFS; list_index++)
470  {
471  // are we within the number of attackees listed?
472  if (list_index < num_attack_names[cur_iff])
473  {
474  // find out who
475  int target_iff = iff_lookup(attack_names[cur_iff][list_index]);
476 
477  // valid?
478  if (target_iff >= 0)
479  iff->attackee_bitmask |= iff_get_mask(target_iff);
480  else
481  Warning(LOCATION, "Attack target IFF %s not found for IFF %s in iff_defs.tbl!\n", attack_names[cur_iff][list_index], iff->iff_name);
482  }
483 
484  // are we within the number of colors listed?
485  if (list_index < num_observed_colors[cur_iff])
486  {
487  // find out who
488  int target_iff = iff_lookup(observed_color_table[cur_iff][list_index].iff_name);
489 
490  // valid?
491  if (target_iff >= 0)
492  iff->observed_color_index[target_iff] = observed_color_table[cur_iff][list_index].color_index;
493  else
494  Warning(LOCATION, "Observed color IFF %s not found for IFF %s in iff_defs.tbl!\n", observed_color_table[cur_iff][list_index].iff_name, iff->iff_name);
495  }
496  }
497 
498  // resolve the all teams at war relationships
500  {
501  // exempt, so use standard attacks
503  }
504  else
505  {
506  // nonexempt, so build bitmask of all other nonexempt teams
507  for (int other_iff = 0; other_iff < Num_iffs; other_iff++)
508  {
509  // skip myself (unless I attack myself normally)
510  if ((other_iff == cur_iff) && !iff_x_attacks_y(cur_iff, cur_iff))
511  continue;
512 
513  // skip anyone exempt
514  if (Iff_info[other_iff].flags & IFFF_EXEMPT_FROM_ALL_TEAMS_AT_WAR)
515  continue;
516 
517  // add everyone else
519  }
520  }
521  }
522 
523  // add tbl/tbm to multiplayer validation list
524  extern void fs2netd_add_table_validation(const char *tblname);
525  fs2netd_add_table_validation("iff_defs.tbl");
526  }
527  catch (const parse::ParseException& e)
528  {
529  mprintf(("TABLES: Unable to parse '%s'! Error message = %s.\n", "iff_defs.tbl", e.what()));
530  return;
531  }
532 }
533 
540 int iff_lookup(char *iff_name)
541 {
542  // bogus
543  Assert(iff_name);
544 
545  if(iff_name == NULL)
546  return -1;
547 
548  for (int i = 0; i < Num_iffs; i++)
549  if (!stricmp(iff_name, Iff_info[i].iff_name))
550  return i;
551 
552  return -1;
553 }
554 
561 int iff_get_attackee_mask(int attacker_team)
562 {
563  Assert(attacker_team >= 0 && attacker_team < Num_iffs);
564 
565  // All teams attack all other teams.
566  if (Mission_all_attack)
567  {
568  return Iff_info[attacker_team].attackee_bitmask_all_teams_at_war;
569  }
570  // normal
571  else
572  {
573  return Iff_info[attacker_team].attackee_bitmask;
574  }
575 }
576 
583 int iff_get_attacker_mask(int attackee_team)
584 {
585  Assert(attackee_team >= 0 && attackee_team < Num_iffs);
586 
587  int i, attacker_bitmask = 0;
588  for (i = 0; i < Num_iffs; i++)
589  {
590  if (iff_x_attacks_y(i, attackee_team))
591  attacker_bitmask |= iff_get_mask(i);
592  }
593 
594  return attacker_bitmask;
595 }
596 
605 int iff_x_attacks_y(int team_x, int team_y)
606 {
607  return iff_matches_mask(team_y, iff_get_attackee_mask(team_x));
608 }
609 
616 {
617  return (1 << team);
618 }
619 
629 {
630  return (iff_get_mask(team) & mask) ? 1 : 0;
631 }
632 
636 color *iff_get_color(int color_index, int is_bright)
637 {
638  return &Iff_colors[color_index][is_bright];
639 }
640 
644 color *iff_get_color_by_team(int team, int seen_from_team, int is_bright)
645 {
646  Assert(team >= 0 && team < Num_iffs);
647  Assert(seen_from_team < Num_iffs);
648  Assert(is_bright == 0 || is_bright == 1);
649 
650 
651  // is this guy being seen by anyone?
652  if (seen_from_team < 0)
653  return &Iff_colors[Iff_info[team].color_index][is_bright];
654 
655  // Goober5000 - base the following on "sees X as" from iff code
656  // c.f. AL's comment:
657 
658  // AL 12-26-97: it seems IFF color needs to be set relative to the player team. If
659  // the team in question is the same as the player, then it should be
660  // drawn friendly. If the team is different than the player's, then draw the
661  // appropriate IFF.
662 
663 
664  // assume an observed color is defined; if not, use normal color
665  int color_index = Iff_info[seen_from_team].observed_color_index[team];
666  if (color_index < 0)
667  color_index = Iff_info[team].color_index;
668 
669 
670  return &Iff_colors[color_index][is_bright];
671 }
672 
678 color *iff_get_color_by_team_and_object(int team, int seen_from_team, int is_bright, object *objp)
679 {
680  Assert(team >= 0 && team < Num_iffs);
681  Assert(seen_from_team < Num_iffs);
682  Assert(is_bright == 0 || is_bright == 1);
683 
684  int alt_color_index = -1;
685 
686  // is this guy being seen by anyone?
687  if (seen_from_team < 0)
688  return &Iff_colors[Iff_info[team].color_index][is_bright];
689 
690  int color_index = Iff_info[seen_from_team].observed_color_index[team];
691 
692  // switch incase some sort of parent iff color inheritance for example for bombs is wanted...
693  switch(objp->type)
694  {
695  case OBJ_SHIP:
696  if (Ships[objp->instance].ship_iff_color[seen_from_team][team] >= 0)
697  {
698  alt_color_index = Ships[objp->instance].ship_iff_color[seen_from_team][team];
699  }
700  else
701  {
702  alt_color_index = Ship_info[Ships[objp->instance].ship_info_index].ship_iff_info[seen_from_team][team];
703  }
704  break;
705  default:
706  break;
707  }
708 
709  // temporary solution....
710  if (alt_color_index >= 0)
711  color_index = alt_color_index;
712  if (color_index < 0)
713  color_index = Iff_info[team].color_index;
714 
715 
716  return &Iff_colors[color_index][is_bright];
717 }
color Iff_colors[MAX_IFF_COLORS][2]
Definition: iff_defs.cpp:29
int timestamp(int delta_ms)
Definition: timer.cpp:226
int flags
Definition: iff_defs.h:45
int i
Definition: multi_pxo.cpp:466
int stuff_string_list(SCP_vector< SCP_string > &slp)
Definition: parselo.cpp:2689
int iff_get_attacker_mask(int attackee_team)
Definition: iff_defs.cpp:583
int check_for_string(const char *pstr)
Definition: parselo.cpp:517
int parse_string_flag_list(int *dest, flag_def_list defs[], int defs_size)
Definition: parselo.cpp:2665
color * iff_get_color_by_team(int team, int seen_from_team, int is_bright)
Definition: iff_defs.cpp:644
void fs2netd_add_table_validation(const char *tblname)
int iff_get_alpha_value(bool is_bright)
Definition: iff_defs.cpp:45
color * iff_get_color_by_team_and_object(int team, int seen_from_team, int is_bright, object *objp)
Definition: iff_defs.cpp:678
int ship_iff_color[MAX_IFFS][MAX_IFFS]
Definition: ship.h:793
void _cdecl void void _cdecl void _cdecl Warning(char *filename, int line, SCP_FORMAT_STRING const char *format,...) SCP_FORMAT_STRING_ARGS(3
Assert(pm!=NULL)
#define mprintf(args)
Definition: pstypes.h:238
void gr_init_alphacolor(color *clr, int r, int g, int b, int alpha, int type)
Definition: 2d.cpp:1173
Definition: 2d.h:95
CButton * team
int attackee_bitmask
Definition: iff_defs.h:40
const char * defaults_get_file(const char *filename)
Definition: def_files.cpp:103
int Num_rti_flags
Definition: iff_defs.cpp:38
#define MAX_PARSE_OBJECT_FLAGS
Definition: missionparse.h:445
object * objp
Definition: lua.cpp:3105
int required_string_either(char *str1, char *str2)
Checks for one of two required strings.
Definition: parselo.cpp:673
#define HUD_COLOR_ALPHA_MAX
Definition: hud.h:73
int default_parse_flags2
Definition: iff_defs.h:47
iff_info Iff_info[MAX_IFFS]
Definition: iff_defs.cpp:20
int iff_get_attackee_mask(int attacker_team)
Definition: iff_defs.cpp:561
int instance
Definition: object.h:150
char * Parse_object_flags[MAX_PARSE_OBJECT_FLAGS]
#define MAX_IFF_COLORS
Definition: iff_defs.h:22
GLdouble GLdouble GLdouble r
Definition: Glext.h:5337
void stuff_string_until(char *outstr, char *endstr, int len)
Definition: parselo.cpp:988
GLboolean GLboolean g
Definition: Glext.h:5781
#define IFFF_EXEMPT_FROM_ALL_TEAMS_AT_WAR
Definition: iff_defs.h:26
int cf_exists_full(const char *filename, int dir_type)
Definition: cfile.cpp:527
int ai_rearm_timestamp
Definition: iff_defs.h:50
int radar_target_id_flags
Definition: radarsetup.cpp:69
void stuff_string(char *outstr, int type, int len, char *terminators)
Definition: parselo.cpp:1189
int color_index
Definition: iff_defs.h:37
#define CF_TYPE_TABLES
Definition: cfile.h:50
int iff_lookup(char *iff_name)
Definition: iff_defs.cpp:540
int required_string(const char *pstr)
Definition: parselo.cpp:468
#define RTIF_CROSSHAIRS
Definition: hud.h:83
int * iff_color_brightness
Definition: iff_defs.cpp:26
int optional_string(const char *pstr)
Definition: parselo.cpp:539
void read_file_text(const char *filename, int mode, char *processed_text, char *raw_text)
Definition: parselo.cpp:1995
int idx
Definition: multiui.cpp:761
#define RTIF_PULSATE
Definition: hud.h:85
#define IFFF_ORDERS_HIDDEN
Definition: iff_defs.h:27
int iff_x_attacks_y(int team_x, int team_y)
Definition: iff_defs.cpp:605
#define MAX_PARSE_OBJECT_FLAGS_2
Definition: missionparse.h:486
for(int idx=0;idx< i;idx++)
Definition: multi_pxo.cpp:472
void read_file_text_from_array(const char *array, char *processed_text, char *raw_text)
Definition: parselo.cpp:2022
void stuff_boolean(int *i, bool a_to_eol)
Definition: parselo.cpp:2519
#define NOX(s)
Definition: pstypes.h:473
int iff_get_mask(int team)
Definition: iff_defs.cpp:615
#define IFFF_ORDERS_SHOWN
Definition: iff_defs.h:28
#define OBJ_SHIP
Definition: object.h:32
int iff_bright_delta
Definition: iff_defs.cpp:25
GLbitfield flags
Definition: Glext.h:6722
flag_def_list rti_flags[]
Definition: iff_defs.cpp:31
void reset_parse(char *text)
Definition: parselo.cpp:3305
int attackee_bitmask_all_teams_at_war
Definition: iff_defs.h:41
color * iff_get_color(int color_index, int is_bright)
Definition: iff_defs.cpp:636
GLboolean GLboolean GLboolean b
Definition: Glext.h:5781
int iff_init_color(int r, int g, int b)
Definition: iff_defs.cpp:62
void stuff_int(int *i)
Definition: parselo.cpp:2372
ship Ships[MAX_SHIPS]
Definition: ship.cpp:122
int stuff_int_list(int *ilp, int max_ints, int lookup_type)
Definition: parselo.cpp:2782
int Mission_all_attack
Definition: aicode.cpp:200
#define RTIF_BLINK
Definition: hud.h:84
#define RTIF_ENLARGE
Definition: hud.h:86
#define NAME_LENGTH
Definition: globals.h:15
char * Parse_object_flags_2[MAX_PARSE_OBJECT_FLAGS_2]
int ship_info_index
Definition: ship.h:539
#define F_NAME
Definition: parselo.h:34
SCP_vector< ship_info > Ship_info
Definition: ship.cpp:164
#define LOCATION
Definition: pstypes.h:245
int Iff_traitor
Definition: iff_defs.cpp:22
void iff_init()
Definition: iff_defs.cpp:117
#define MAX_IFFS
Definition: globals.h:34
#define IFFF_WING_NAME_HIDDEN
Definition: iff_defs.h:29
int Num_iffs
Definition: iff_defs.cpp:19
int iff_matches_mask(int team, int mask)
Definition: iff_defs.cpp:628
char type
Definition: object.h:146
GLenum GLint GLuint mask
Definition: Glext.h:5605
char iff_name[NAME_LENGTH]
Definition: iff_defs.h:36
int default_parse_flags
Definition: iff_defs.h:46
#define stricmp(s1, s2)
Definition: config.h:271
int radar_iff_color[5][2][4]
Definition: iff_defs.cpp:24
const GLubyte * c
Definition: Glext.h:8376
int skip_to_start_of_string(char *pstr, char *end)
Definition: parselo.cpp:404
#define IFFF_SUPPORT_ALLOWED
Definition: iff_defs.h:25
int observed_color_index[MAX_IFFS]
Definition: iff_defs.h:42
#define RAW_INTEGER_TYPE
Definition: parselo.h:52
#define MAX_IFF_FLAGS
Definition: iff_defs.h:30