FS2_Open
Open source remastering of the Freespace 2 engine
multi_campaign.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 
14 #include <limits.h> // this is need even when not building debug!!
15 
17 #include "network/multi.h"
18 #include "network/multiui.h"
19 #include "freespace2/freespace.h"
20 #include "network/multimsgs.h"
21 #include "network/multiutil.h"
22 #include "popup/popup.h"
23 #include "network/multi_campaign.h"
24 #include "network/multi_endgame.h"
25 #include "network/stand_gui.h"
26 #include "mission/missiongoals.h"
28 #include "mission/missionparse.h"
29 #include "ship/ship.h" // Needed for Ship_info.size() -MageKing17
30 
31 
32 
33 // ------------------------------------------------------------------------------------
34 // MULTIPLAYER CAMPAIGN DEFINES/VARS
35 //
36 
37 // packet codes
38 #define MC_CODE_POOL 0 // pool/weapons update
39 #define MC_CODE_DONE 1 // campaign is "done"
40 #define MC_CODE_DEBRIEF 2 // debrief info
41 #define MC_CODE_START 3 // start campaign information
42 
43 // packet code for ingame joining
44 #define MC_JIP_INITIAL_PACKET 1 // initial data
45 #define MC_JIP_GE_STATUS 2 // goal event status for all missions
46 #define MC_JIP_GOAL_NAMES 3 // goal names
47 #define MC_JIP_EVENT_NAMES 4 // event names
48 #define MC_JIP_END_DATA 5 // this is the end of the data
49 
50 
51 #define MC_INGAME_DATA_SLOP 50
52 
53 
54 // flags indicating the "accept" status of all players involved in a campaign
56 
57 
58 // ------------------------------------------------------------------------------------
59 // MULTIPLAYER CAMPAIGN FUNCTIONS
60 //
61 
62 // load a new campaign file or notify the standalone if we're not the server
64 {
65  char str[255];
66 
67  // set the netgame mode
69 
70  // set the campaign filename
71  strcpy_s(Netgame.campaign_name,filename);
72 
73  // add the campaign mode flag
75 
76  // if we're the server of the game we should also be loading the campaign up. otherwise, we let the standalone do it
78  // start the campaign, passing 0 so we do _not_ load the savefile. this is only for starting
79  // new campaigns
80  mission_campaign_load(filename);
82 
83  // setup various filenames and mission names
85  strcpy_s(Netgame.campaign_name,filename);
87 
88  // if we're the standalone server, set the mission and campaign names
90  memset(str,0,255);
92  strcat_s(str," (");
94  strcat_s(str,")");
95 
96  // set the control on the stand_gui
98  }
99 
100  // maybe override the Netgame.respawn setting
102  nprintf(("Network","MULTI CAMPAIGN : overriding respawn setting with mission max %d\n",The_mission.num_respawns));
103 
104  // send a "start campaign" packet
106  }
107 }
108 
109 // client-side start of a campaign
111 {
113 
114  // set campaign mode. why not.
116 }
117 
118 // move everything and eveyrone into the next mission state
120 {
121  char str[255];
122 
123  // flush the important data
125 
126  // call the campaign over function
128 
129  // now we should be sequencing through the next stage (mission load, etc)
130  // this will eventually be replaced with the real filename of the next mission
131  if(Campaign.current_mission != -1){
134 
135  // if we're the standalone server, set the mission and campaign names
137  memset(str,0,255);
139  strcat_s(str," (");
141  strcat_s(str,")");
142 
143  // set the control on the stand_gui
145  }
146  }
147 }
148 
149 // flush all important data between missions
151 {
152  // blast the accept flags
153  memset(Multi_campaign_accept_flags,0,sizeof(int) * MAX_PLAYERS);
154 
155  // flush mission stuff
157 }
158 
159 // call in the debriefing stage to evaluate what we should be doing in regards to the campaign
160 // if player_status == 0, nothing should be done
161 // == 1, players want to continue to the next mission
162 // == 2, players want to repeat the previous mission
163 void multi_campaign_do_debrief(int player_status)
164 {
165  // the server (standalone or no)
166  if((Net_player->flags & NETINFO_FLAG_AM_MASTER) && (Campaign.current_mission != -1) && player_status){
167  // if players want to go to the next mission
168  if(player_status == 1){
169  // move the multiplayer campaign along
171 
172  // if we're at the end of the campaign
173  if(Campaign.current_mission == -1){
174  // set the netgame state to be forming and continue
177 
180  } else {
182  }
184  }
185  // if we're still in the campaign
186  else {
189 
192 
194  }
195  }
196  // if the players want to replay the current mission
197  else if(player_status == 2){
200 
203 
205  } else {
206  Int3();
207  }
208  }
209 }
210 
211 // display the done popup
213 {
214  popup(PF_BODY_BIG | PF_USE_AFFIRMATIVE_ICON,1,POPUP_OK,XSTR("The Campaign Is Complete. Thank You For Playing",643));
216 }
217 
218 // evaluate post mission goal stuff for the campaign and send all relevant stuff to clients
220 {
221  // evaluate mission stuff (fills in structures, etc).
222  // DKA 12/12/98 already done
223  // mission_campaign_eval_next_mission();
224 
225  // send the campaign debriefing packet
227 }
228 
229 // clients should store mission goal/event names in the campaign now
231 {
232  int idx;
233 
234  // copy mission goals into the campaign goals
235  for(idx=0;idx<Num_goals;idx++){
236  strcpy_s(Campaign.missions[mission_num].goals[idx].name,Mission_goals[idx].name);
237  }
238 
239  // copy mission events into the campaign events
240  for(idx=0;idx<Num_mission_events;idx++){
241  strcpy_s(Campaign.missions[mission_num].events[idx].name,Mission_events[idx].name);
242  }
243 }
244 
245 
246 // ------------------------------------------------------------------------------------
247 // MULTIPLAYER CAMPAIGN PACKET HANDLERS
248 //
249 extern int Num_weapon_types;
250 // process a campaign update packet
252 {
253  int offset = HEADER_LENGTH;
254  char fname[255];
255  ubyte val,spool_size,wpool_size;
256  ubyte code;
257  ubyte cur_mission,next_mission;
258  int idx;
259 
260  // get the packet code
261  GET_DATA(code);
262 
263  switch(code){
264  case MC_CODE_DONE:
265  // display the done popup
267  break;
268 
269  case MC_CODE_POOL:
270  // get the campaign status byte
271  GET_DATA(val);
272 
273  // if we're not in campaign mode, bash all weapons and ships to be "allowed"
274  if(!val){
275  // all ships
276  for(idx = 0; idx < static_cast<int>(Ship_info.size()); idx++) {
278  }
279 
280  // all weapons
281  for(idx=0;idx<Num_weapon_types;idx++){
283  }
284  } else {
285  // clear the ships and weapons allowed arrays
288 
289  // get all ship classes
290  GET_DATA(spool_size);
291  for(idx=0;idx<spool_size;idx++){
292  GET_DATA(val);
294  }
295 
296  // get all weapon classes
297  GET_DATA(wpool_size);
298  for(idx=0;idx<wpool_size;idx++){
299  GET_DATA(val);
301  }
302  }
303 
304  // ack the server
307  break;
308 
309  case MC_CODE_DEBRIEF:
310  GET_DATA(cur_mission);
311  GET_DATA(next_mission);
312 
313  // add the filename
314  GET_STRING(fname);
315  Campaign.missions[cur_mission].name = vm_strdup(fname);
316 
317  // add the # of goals and events
318  GET_DATA(val);
319  Campaign.missions[cur_mission].num_goals = val;
320  Campaign.missions[cur_mission].goals = (mgoal*)vm_malloc(sizeof(mgoal) * val);
321 
322  GET_DATA(val);
323  Campaign.missions[cur_mission].num_events = val;
324  Campaign.missions[cur_mission].events = (mevent*)vm_malloc(sizeof(mevent) * val);
325 
326  // add the goals
327  for(idx=0;idx<Campaign.missions[cur_mission].num_goals;idx++){
328  GET_DATA(val);
329  Campaign.missions[cur_mission].goals[idx].status = val;
330  }
331 
332  // add the events
333  for(idx=0;idx<Campaign.missions[cur_mission].num_events;idx++){
334  GET_DATA(val);
335  Campaign.missions[cur_mission].events[idx].status = val;
336  }
337 
338  // now set the "next mission to be the "current mission"
339  Campaign.prev_mission = cur_mission;
340  Campaign.current_mission = next_mission;
341 
342  // clients should store mission goal/event names in the campaign now
344  break;
345 
346  case MC_CODE_START:
347  // clear the campaign
349 
350  // read in the # of missions
352 
353  // read in the mission filenames
354  for(idx=0;idx<Campaign.num_missions;idx++){
355  GET_STRING(fname);
356  Campaign.missions[idx].name = vm_strdup(fname);
357  }
358  break;
359  }
360 
361  PACKET_SET_SIZE();
362 }
363 
364 // send a "campaign finished" packet
366 {
367  ubyte data[10],val;
368  int packet_size = 0;
369 
370  // build the header
372 
373  // add the code
374  val = MC_CODE_DONE;
375  ADD_DATA(val);
376 
377  // broadcast the packet
378  multi_io_send_to_all_reliable(data, packet_size);
379 }
380 
381 // send a campaign debrief update packet
383 {
385  int idx;
386  int packet_size = 0;
387 
388  // build the header
390 
391  // add the code
392  val = MC_CODE_DEBRIEF;
393  ADD_DATA(val);
394 
395  // add the mission # we're including
397  ADD_DATA(val);
398 
399  // add the next mission
400  val = (ubyte)Campaign.next_mission;
401  ADD_DATA(val);
402 
403  // add the filename
406 
407  // add the # of goals and events
409  ADD_DATA(val);
411  ADD_DATA(val);
412 
413  // add the goals
414  for(idx=0;idx<Campaign.missions[Campaign.current_mission].num_goals;idx++){
416  ADD_DATA(val);
417  }
418 
419  // add the events
420  for(idx=0;idx<Campaign.missions[Campaign.current_mission].num_events;idx++){
422  ADD_DATA(val);
423  }
424 
425  // send to all players
426  multi_io_send_to_all_reliable(data, packet_size);
427 }
428 
429 // send a campaign pool status packet
431 {
433  int idx;
434  int spool_size;
435  int wpool_size;
436  int packet_size = 0;
437 
438  // build the header
440 
441  // add the code
442  val = MC_CODE_POOL;
443  ADD_DATA(val);
444 
445  // if we're not in campaign mode, send a single byte saying "allow all ships and weapons"
446  if(!(Game_mode & GM_CAMPAIGN_MODE)){
447  val = 0x0;
448  ADD_DATA(val);
449  }
450  // otherwise add all relevant ship/weapon pool data
451  else {
452  val = 0x1;
453  ADD_DATA(val);
454 
455  // determine how many ship types we're going to add
456  spool_size = 0;
457  for(idx = 0; idx < static_cast<int>(Ship_info.size()); idx++) {
458  if(Campaign.ships_allowed[idx]){
459  spool_size++;
460  }
461  }
462 
463  // determine how many weapon types we're going to add
464  wpool_size = 0;
465  for(idx=0;idx<Num_weapon_types;idx++){
466  if(Campaign.weapons_allowed[idx]){
467  wpool_size++;
468  }
469  }
470 
471  // make sure it'll all fit into this packet
472  Assert((wpool_size + spool_size) < 480);
473 
474  // add all ship types
475  val = (ubyte)spool_size;
476  ADD_DATA(val);
477  for(idx = 0; idx < static_cast<int>(Ship_info.size()); idx++) {
478  if(Campaign.ships_allowed[idx]){
479  val = (ubyte)idx;
480  ADD_DATA(val);
481  }
482  }
483 
484  // add all weapon types
485  val = (ubyte)wpool_size;
486  ADD_DATA(val);
487  for(idx=0;idx<Num_weapon_types;idx++){
488  if(Campaign.weapons_allowed[idx]){
489  val = (ubyte)idx;
490  ADD_DATA(val);
491  }
492  }
493  }
494 
495  // send to all players
497  multi_io_send_to_all_reliable(data, packet_size);
498 
499  // notification message
500  multi_common_add_text(XSTR("Campaign ship/weapon pool\n",644),1);
501 }
502 
503 // send a "start campaign" packet
505 {
507  int idx;
508  int packet_size = 0;
509 
510  // build the header
512 
513  // add the code
514  val = MC_CODE_START;
515  ADD_DATA(val);
516 
517  // add the # of missions, and their filenames
519  for(idx=0;idx<Campaign.num_missions;idx++){
520  Assert(Campaign.missions[idx].name != NULL);
522  }
523 
524  // if we're targeting a specific player
525  if(pl != NULL){
526  multi_io_send_reliable(pl, data, packet_size);
527  }
528  // send to all players
529  else {
530  multi_io_send_to_all_reliable(data, packet_size);
531  }
532 }
533 
534 // campaign start packet for ingame joiners. Sends filename and goal/event name and status
536 {
537  ubyte data[MAX_PACKET_SIZE], packet_type, num_goals, num_events, *ptr;
538  int packet_size, i, j;
539 
540  Assert( pl != NULL );
541  packet_size = 0;
542 
543  if ( Game_mode & GM_CAMPAIGN_MODE ) {
544 
545  // first -- add the number of missions and the mission names
546  // add the # of missions, and their filenames
548  packet_type = MC_JIP_INITIAL_PACKET;
549  ADD_DATA(packet_type);
551  for( i = 0; i < Campaign.num_missions; i++) {
552  Assert(Campaign.missions[i].name != NULL);
554  }
555  multi_io_send_reliable(pl, data, packet_size);
556 
557  // send the number and status of all goals event for all previous missions
558  for (i = 0; i < Campaign.num_missions; i++ ) {
559  ubyte status;
560 
561  // don't send data for the current mission being played, or if both goals and events are 0
562  Assert( Campaign.missions[i].num_goals < UCHAR_MAX );
563  Assert( Campaign.missions[i].num_events < UCHAR_MAX );
564  num_goals = (ubyte)Campaign.missions[i].num_goals;
565  num_events = (ubyte)Campaign.missions[i].num_events;
566 
567  // don't do anything if mission hasn't been completed
568  if ( !Campaign.missions[i].completed )
569  continue;
570 
571  // add the mission number and the goal/event status
573  packet_type = MC_JIP_GE_STATUS;
574  ADD_DATA( packet_type );
575  ADD_INT(i);
576  ADD_DATA( num_goals );
577  for ( j = 0; j < num_goals; j++ ) {
578  status = (ubyte)Campaign.missions[i].goals[j].status;
579  ADD_DATA(status);
580  }
581 
582  // now the events
583  ADD_DATA( num_events );
584  for ( j = 0; j < num_events; j++ ) {
585  status = (ubyte)Campaign.missions[i].events[j].status;
586  ADD_DATA(status);
587  }
588 
589  multi_io_send_reliable(pl, data, packet_size);
590  }
591 
592  // send the goal/event names.
593  for ( i = 0; i < Campaign.num_missions; i++ ) {
594  ubyte goal_count, starting_goal_num;
595 
596  // first the goal names
597  Assert( Campaign.missions[i].num_goals < UCHAR_MAX );
598  num_goals = (ubyte)Campaign.missions[i].num_goals;
599 
600  // don't do anything if mission hasn't been completed
601  if ( !Campaign.missions[i].completed ){
602  continue;
603  }
604 
606  packet_type = MC_JIP_GOAL_NAMES;
607  ADD_DATA(packet_type);
608  ADD_INT(i);
609 
610  // save a pointer so we can put the number of goals written here.
611  ptr = &data[packet_size];
612 
613  goal_count = 0;
614  ADD_DATA( goal_count );
615 
616  starting_goal_num = 0;
617  ADD_DATA( starting_goal_num );
618 
619  for ( j = 0; j < num_goals; j++ ) {
621  goal_count++;
622 
623  // if packet will get too big, send it off.
624  if ( (packet_size + MC_INGAME_DATA_SLOP) > MAX_PACKET_SIZE ) {
625  *ptr = goal_count;
626  multi_io_send_reliable(pl, data, packet_size);
628  packet_type = MC_JIP_GOAL_NAMES;
629  ADD_DATA( packet_type );
630  ADD_INT(i);
631  ptr = &data[packet_size];
632  goal_count = 0;
633  ADD_DATA( goal_count );
634  starting_goal_num = (ubyte)j;
635  ADD_DATA( starting_goal_num );
636  }
637  }
638 
639  *ptr = goal_count;
640  multi_io_send_reliable(pl, data, packet_size);
641  }
642 
643  // send the goal/event names.
644  for ( i = 0; i < Campaign.num_missions; i++ ) {
645  ubyte event_count, starting_event_num;
646 
647  // first the goal names
648  Assert( Campaign.missions[i].num_events < UCHAR_MAX );
649  num_events = (ubyte)Campaign.missions[i].num_events;
650 
651  // don't do anything if mission hasn't been completed
652  if ( !Campaign.missions[i].completed )
653  continue;
654 
656  packet_type = MC_JIP_EVENT_NAMES;
657  ADD_DATA(packet_type);
658  ADD_INT(i);
659 
660  // save a pointer so we can put the number of goals written here.
661  ptr = &data[packet_size];
662 
663  event_count = 0;
664  ADD_DATA( event_count );
665 
666  starting_event_num = 0;
667  ADD_DATA( starting_event_num );
668 
669  for ( j = 0; j < num_events; j++ ) {
671  event_count++;
672 
673  // if packet will get too big, send it off.
674  if ( (packet_size + MC_INGAME_DATA_SLOP) > MAX_PACKET_SIZE ) {
675  *ptr = event_count;
676  multi_io_send_reliable(pl, data, packet_size);
678  packet_type = MC_JIP_EVENT_NAMES;
679  ADD_DATA( packet_type );
680  ADD_INT(i);
681  ptr = &data[packet_size];
682  event_count = 0;
683  ADD_DATA( event_count );
684  starting_event_num = (ubyte)j;
685  ADD_DATA( starting_event_num );
686  }
687  }
688 
689  *ptr = event_count;
690  multi_io_send_reliable(pl, data, packet_size);
691  }
692  }
693 
694  // add the stop byte
696  packet_type = MC_JIP_END_DATA;
697  ADD_DATA(packet_type);
698  multi_io_send_reliable(pl, data, packet_size);
699 }
700 
702 {
703  int offset, mission_num, i;
704  ubyte packet_type, num_goals, num_events, status, starting_num;
705  char fname[255];
706 
707  offset = HEADER_LENGTH;
708 
709  GET_DATA( packet_type );
710  switch( packet_type ) {
712 
713  // clear out the names of the missions
714  mission_campaign_clear(); // should free all data structures which need to be freed
715 
716  // get the number of campaigns and their names.
718  for( i = 0; i < Campaign.num_missions ; i++) {
719  GET_STRING(fname);
720  Campaign.missions[i].name = vm_strdup(fname);
721  }
722 
723  break;
724 
725  case MC_JIP_GE_STATUS:
726 
727  GET_INT( mission_num );
728  GET_DATA( num_goals );
729  // need to malloc out the data
730  Assert( Campaign.missions[mission_num].num_goals == 0 );
731  Campaign.missions[mission_num].num_goals = num_goals;
732  if ( num_goals > 0 ){
733  Campaign.missions[mission_num].goals = (mgoal *)vm_malloc( sizeof(mgoal) * num_goals );
734  }
735  for ( i = 0; i < num_goals; i++ ) {
736  GET_DATA(status);
737  // AL: .goals was a NULL pointer here! I have no idea why. Putting
738  // in a check to avoid the unhandled exception
739  if ( Campaign.missions[mission_num].goals ) {
740  Campaign.missions[mission_num].goals[i].status = status;
741  }
742  }
743 
744  // now the events
745  GET_DATA( num_events );
746  // need to malloc out the data
747  Assert( Campaign.missions[mission_num].num_events == 0 );
748  Campaign.missions[mission_num].num_events = num_events;
749  if ( num_events > 0 ){
750  Campaign.missions[mission_num].events = (mevent *)vm_malloc( sizeof(mevent) * num_events );
751  }
752 
753  for ( i = 0; i < num_events; i++ ) {
754  GET_DATA(status);
755  Campaign.missions[mission_num].events[i].status = status;
756  }
757  break;
758 
759  case MC_JIP_GOAL_NAMES:
760  GET_INT( mission_num );
761  GET_DATA( num_goals );
762  GET_DATA( starting_num );
763  for ( i = starting_num; i < (starting_num + num_goals); i++ ) {
764  GET_STRING(Campaign.missions[mission_num].goals[i].name);
765  }
766  break;
767 
768  case MC_JIP_EVENT_NAMES:
769  GET_INT( mission_num );
770  GET_DATA( num_events );
771  GET_DATA( starting_num );
772  for ( i = starting_num; i < (starting_num + num_events); i++ ) {
773  GET_STRING(Campaign.missions[mission_num].events[i].name);
774  }
775  break;
776 
777  case MC_JIP_END_DATA:
780  break;
781  }
782 
783  PACKET_SET_SIZE();
784 }
uint respawn
Definition: multi.h:507
int i
Definition: multi_pxo.cpp:466
#define MC_CODE_POOL
uint num_respawns
Definition: missionparse.h:141
void multi_campaign_send_debrief_info()
#define GET_DATA(d)
Definition: multimsgs.h:47
void multi_campaign_do_debrief(int player_status)
void multi_campaign_flush_data()
void multi_campaign_eval_debrief()
int Num_mission_events
int Game_mode
Definition: systemvars.cpp:24
char Game_current_mission_filename[MAX_FILENAME_LEN]
Definition: fredstubs.cpp:26
#define MC_JIP_INITIAL_PACKET
#define MC_JIP_EVENT_NAMES
net_player * Net_player
Definition: multi.cpp:94
void mission_campaign_clear()
#define PACKET_SET_SIZE()
Definition: multimsgs.h:57
void multi_campaign_send_pool_status()
void multi_reset_timestamps()
Definition: multi.cpp:1741
void send_netplayer_update_packet(net_player *pl)
Definition: multimsgs.cpp:2308
#define ADD_DATA(d)
Definition: multimsgs.h:37
#define MULTI_SYNC_PRE_BRIEFING
Definition: multiui.h:138
Assert(pm!=NULL)
#define ADD_STRING(s)
Definition: multimsgs.h:43
void multi_io_send_to_all_reliable(ubyte *data, int length, net_player *ignore)
Definition: multimsgs.cpp:496
void multi_io_send_reliable(net_player *pl, ubyte *data, int len)
Definition: multimsgs.cpp:459
void send_netgame_update_packet(net_player *pl)
Definition: multimsgs.cpp:2008
void mission_campaign_mission_over(bool do_next_mission)
char name[NAME_LENGTH]
int flags
Definition: multi.h:463
ubyte ships_allowed[MAX_SHIP_CLASSES]
#define Int3()
Definition: pstypes.h:292
int packet_size
Definition: multi_sexp.cpp:41
mission_goal Mission_goals[MAX_GOALS]
int game_state
Definition: multi.h:498
char * name
int Multi_sync_mode
Definition: multiui.cpp:7348
#define MC_JIP_GE_STATUS
void std_multi_set_standalone_mission_name(char *mission_name)
#define ADD_INT(d)
Definition: multimsgs.h:40
HWND DWORD code
Definition: vddraw.h:425
#define MAX_PACKET_SIZE
Definition: psnet2.h:34
#define NETPLAYER_STATE_CPOOL_ACK
Definition: multi.h:705
GLintptr offset
Definition: Glext.h:5497
void multi_campaign_process_ingame_start(ubyte *data, header *hinfo)
#define NETINFO_FLAG_AM_MASTER
Definition: multi.h:599
int state
Definition: multi.h:464
#define nprintf(args)
Definition: pstypes.h:239
#define BUILD_HEADER(t)
Definition: multimsgs.h:36
ubyte weapons_allowed[MAX_WEAPON_TYPES]
#define MAX_SHIP_CLASSES
Definition: globals.h:48
#define MC_CODE_START
void multi_flush_mission_stuff()
Definition: multiutil.cpp:2787
char * filename
netgame_info Netgame
Definition: multi.cpp:97
mission_event Mission_events[MAX_MISSION_EVENTS]
#define MAX_WEAPON_TYPES
Definition: globals.h:73
#define MP_CAMPAIGN
Definition: multi.h:98
#define vm_strdup(ptr)
Definition: pstypes.h:549
#define NETGAME_STATE_MISSION_SYNC
Definition: multi.h:670
#define MAX_PLAYERS
Definition: pstypes.h:32
char mission_name[NAME_LENGTH+1]
Definition: multi.h:488
int idx
Definition: multiui.cpp:761
char campaign_name[NAME_LENGTH+1]
Definition: multi.h:490
char name[NAME_LENGTH]
void multi_campaign_send_ingame_start(net_player *pl)
void multi_campaign_send_start(net_player *pl)
unsigned char ubyte
Definition: pstypes.h:62
const char * XSTR(const char *str, int index)
Definition: localize.cpp:851
#define GM_STANDALONE_SERVER
Definition: systemvars.h:27
#define vm_malloc(size)
Definition: pstypes.h:547
int Num_weapon_types
Definition: weapons.cpp:105
#define PROMPT_NONE
Definition: multi_endgame.h:26
GLuint GLfloat * val
Definition: Glext.h:6741
int current_mission
void multi_campaign_done_popup()
int multi_quit_game(int prompt, int notify_code, int err_code, int wsa_error)
#define MC_INGAME_DATA_SLOP
char status
if(aifft_max_checks<=0)
Definition: aiturret.cpp:1581
#define MC_CODE_DEBRIEF
int campaign_mode
Definition: multi.h:509
campaign Campaign
#define strcat_s(...)
Definition: safe_strings.h:68
int mission_campaign_load(char *filename, player *pl, int load_savefile, bool reset_stats)
#define MC_JIP_GOAL_NAMES
Definition: multi.h:385
#define MC_CODE_DONE
mgoal * goals
int HEADER_LENGTH
Definition: multi.cpp:106
int Multi_campaign_accept_flags[MAX_PLAYERS]
SCP_vector< ship_info > Ship_info
Definition: ship.cpp:164
GLenum GLsizei GLenum GLenum const GLvoid * data
Definition: Gl.h:1509
void multi_campaign_client_start()
mevent * events
int mission_campaign_next_mission()
void multi_campaign_start(char *filename)
char name[NAME_LENGTH]
Definition: missiongoals.h:55
char name[NAME_LENGTH]
Definition: missiongoals.h:102
char status
#define MC_JIP_END_DATA
void multi_campaign_next_mission()
#define NETPLAYER_STATE_INGAME_CINFO
Definition: multi.h:706
void multi_campaign_client_store_goals(int mission_num)
#define GET_INT(d)
Definition: multimsgs.h:50
mission The_mission
int Num_goals
#define NETGAME_STATE_FORMING
Definition: multi.h:664
void multi_common_add_text(const char *str, int auto_scroll)
Definition: multiui.cpp:167
void multi_campaign_send_done()
void gameseq_post_event(int event)
#define CAMPAIGN_UPDATE
Definition: multi.h:206
#define GET_STRING(s)
Definition: multimsgs.h:53
#define GM_CAMPAIGN_MODE
Definition: systemvars.h:29
cmission missions[MAX_CAMPAIGN_MISSIONS]
void multi_campaign_process_update(ubyte *data, header *hinfo)
#define strcpy_s(...)
Definition: safe_strings.h:67
#define CAMPAIGN_UPDATE_INGAME
Definition: multi.h:207