1 // DumpStats.cpp : implementation file
12 #include "missiongoals.h"
13 #include "eventmusic.h"
19 static char THIS_FILE[] = __FILE__;
22 /////////////////////////////////////////////////////////////////////////////
26 DumpStats::DumpStats(CWnd* pParent /*=NULL*/)
27 : CDialog(DumpStats::IDD, pParent)
29 //{{AFX_DATA_INIT(DumpStats)
30 // NOTE: the ClassWizard will add member initialization here
35 void DumpStats::DoDataExchange(CDataExchange* pDX)
37 CDialog::DoDataExchange(pDX);
38 //{{AFX_DATA_MAP(DumpStats)
39 // NOTE: the ClassWizard will add DDX and DDV calls here
44 BEGIN_MESSAGE_MAP(DumpStats, CDialog)
45 //{{AFX_MSG_MAP(DumpStats)
46 ON_BN_CLICKED(IDC_DUMP_TO_FILE, OnDumpToFile)
50 /////////////////////////////////////////////////////////////////////////////
51 // DumpStats message handlers
53 BOOL DumpStats::OnInitDialog()
55 CDialog::OnInitDialog();
60 // get author, title, etc
61 get_mission_stats(buffer);
63 // get nebula, stars, etc.
64 get_background_stats(buffer);
66 // get number or ships, waypoints, start points, etc.
67 get_object_stats(buffer);
69 // get objectives / goals
70 get_objectives_and_goals(buffer);
72 // get ship selection for player wings
73 get_ship_weapon_selection(buffer);
76 get_messaging_info(buffer);
78 // get species ship breakdown
79 get_species_ship_breakdown(buffer);
81 // get default loadouts
82 get_default_ship_loadouts(buffer);
84 int num_tab_stops = 5;
87 tab_stops[i] = (i+1) * 16;
90 ((CEdit*) GetDlgItem(IDC_STATS_TEXT))->SetTabStops(num_tab_stops, tab_stops);
91 ((CEdit*) GetDlgItem(IDC_STATS_TEXT))->SetWindowText(buffer);
93 return TRUE; // return TRUE unless you set the focus to a control
94 // EXCEPTION: OCX Property Pages should return FALSE
97 void DumpStats::OnDumpToFile()
99 // TODO: Add your control notification handler code here
101 // get dump from window
103 ((CEdit*) GetDlgItem(IDC_STATS_TEXT))->GetWindowText(buffer);
105 CString dump_filename;
106 dump_filename.Format("%s.dmp", Mission_filename);
110 fp = cfopen((char *)LPCTSTR(dump_filename), "wt", CFILE_NORMAL, CF_TYPE_MISSIONS);
111 cfputs((char *)LPCTSTR(buffer), fp);
115 void DumpStats::get_mission_stats(CString &buffer)
120 buffer += "\t MISSION INFO\r\n";
122 temp.Format("Title: %s\r\n", The_mission.name);
125 temp.Format("Filename: %s\r\n", Mission_filename);
128 temp.Format("Author: %s\r\n", The_mission.author);
131 temp.Format("Description: %s\r\n", The_mission.mission_desc);
134 temp.Format("Notes: %s\r\n", The_mission.notes);
137 if (The_mission.game_type & MISSION_TYPE_SINGLE) {
138 temp.Format("Mission type: Single Player\r\n");
139 } else if (The_mission.game_type & MISSION_TYPE_MULTI_COOP) {
140 temp.Format("Mission type: Multi Coop\r\n");
141 } else if (The_mission.game_type & MISSION_TYPE_MULTI_TEAMS) {
142 temp.Format("Mission type: Multi Team vs. Team\r\n");
143 } else if (The_mission.game_type & MISSION_TYPE_MULTI_DOGFIGHT) {
144 temp.Format("Mission type: Dogfight\r\n");
148 if (The_mission.game_type & MISSION_TYPE_MULTI) {
149 temp.Format("\tNum respawns: %d\r\n", The_mission.num_respawns);
153 if (Current_soundtrack_num >= 0) {
154 temp.Format("\tMusic: %s\r\n", Soundtracks[Current_soundtrack_num].name);
158 if (The_mission.red_alert) {
159 buffer += "\tRed Alert\r\n";
162 if (The_mission.scramble) {
163 buffer += "\tScramble\r\n";
166 if (The_mission.flags & MISSION_FLAG_NO_PROMOTION) {
167 buffer += "\tNo Promotions\r\n";
170 if (The_mission.disallow_support) {
171 buffer += "\tNo Support ships\r\n";
174 temp.Format("Squadron: %s, Squadron logo: %s\r\n", The_mission.squad_name, The_mission.squad_filename);
178 void DumpStats::get_background_stats(CString &buffer)
184 buffer += "\r\n\tBACKGROUND INFO\r\n";
187 temp.Format("Num_stars: %d\r\n", Num_stars);
191 temp.Format("Num_suns: %d\r\n", Num_suns);
194 for (i=0; i<Num_suns; i++) {
195 temp.Format("\tSun%d bitmap name: %s\r\n", i, Sun_bitmaps[i].filename);
197 //temp.Format("Sun%d glow name: %s\r\n", i, Sun_bitmaps[i].glow_filename);
202 temp.Format("Num_starfield_bitmaps: %d\r\n", Num_starfield_bitmaps);
205 for (i=0; i<Num_starfield_bitmaps; i++) {
206 temp.Format("\tStarfield%d bitmap name: %s\r\n", i, Starfield_bitmap_instance[i].filename);
211 temp.Format("Num Field Debris Chunks: %d\r\n", Asteroid_field.num_initial_asteroids);
213 if (Asteroid_field.num_initial_asteroids > 0) {
215 if (Asteroid_field.field_type == FT_ACTIVE) {
216 temp.Format("\tActive Field\r\n");
219 temp.Format("\tAsteroid Debris\r\n");
223 temp.Format("\tPassive Field\r\n");
226 if (Asteroid_field.debris_genre == DG_ASTEROID) {
227 temp.Format("\tAsteroid Debris\r\n");
230 temp.Format("\tShip Debris\r\n");
234 temp.Format("\t\tSpecies: ");
235 for (i=0; i<3; i++) {
236 if (Asteroid_field.field_debris_type[i] >= 0) {
237 switch(Asteroid_field.field_debris_type[i]) {
238 case DEBRIS_TERRAN_SMALL:
239 case DEBRIS_TERRAN_MEDIUM:
240 case DEBRIS_TERRAN_LARGE:
244 case DEBRIS_VASUDAN_SMALL:
245 case DEBRIS_VASUDAN_MEDIUM:
246 case DEBRIS_VASUDAN_LARGE:
250 case DEBRIS_SHIVAN_SMALL:
251 case DEBRIS_SHIVAN_MEDIUM:
252 case DEBRIS_SHIVAN_LARGE:
267 int nebula_mission = (The_mission.flags & MISSION_FLAG_FULLNEB);
268 temp = "Nebula mission:";
269 if (nebula_mission) {
276 if (nebula_mission) {
278 temp.Format("\tNebula awacs range: %.0f\r\n", Neb2_awacs);
282 for (i=0; i<MAX_NEB2_POOFS; i++) {
283 if ( Neb2_poof_flags & (1<<i) ) {
284 temp.Format("\tNebula poof: %s\r\n", Neb2_poof_filenames[i]);
290 if (strlen(Neb2_texture_name) > 0) {
291 temp.Format("\tNebula texture: %s\r\n", Neb2_texture_name);
295 // FS! nebula pattern
296 if (Nebula_index > 0) {
297 temp.Format("\tOld style FS1 nebula filename: %s\r\n", Nebula_filenames[Nebula_index]);
303 temp = "Subspace mission:";
304 if (The_mission.flags & MISSION_FLAG_SUBSPACE) {
312 void DumpStats::get_object_stats(CString &buffer)
315 int obj_type_count[MAX_OBJECT_TYPES];
317 int num_small_ships, num_big_ships, num_huge_ships;
319 memset(obj_type_count,0, sizeof(obj_type_count));
320 num_small_ships = num_big_ships = num_huge_ships= 0;
322 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
324 // inc big ship or small ship count
325 if ( (objp->type == OBJ_SHIP) || (objp->type == OBJ_START) ) {
326 if ( Ship_info[Ships[objp->instance].ship_info_index].flags & SIF_SMALL_SHIP ) {
328 } else if ( Ship_info[Ships[objp->instance].ship_info_index].flags & SIF_BIG_SHIP ) {
330 } else if ( Ship_info[Ships[objp->instance].ship_info_index].flags & SIF_HUGE_SHIP ) {
335 obj_type_count[objp->type]++;
339 buffer += "\r\n\tMISSION STATISTICS\r\n";
341 // OBJ_START is also a OBJ_SHIP
342 // not counting num_waves (for wings)
343 obj_type_count[OBJ_SHIP] += obj_type_count[OBJ_START];
345 for (int i=0; i<MAX_OBJECT_TYPES; i++) {
346 if (obj_type_count[i] > 0) {
349 temp.Format("Ship Count: %d\r\n", obj_type_count[i]);
354 temp.Format("Start Count: %d\r\n", obj_type_count[i]);
359 temp.Format("Waypoint Count: %d\r\n", obj_type_count[i]);
364 temp.Format("Wing Count: %d\r\n", obj_type_count[i]);
369 temp.Format("Jump Node Count: %d\r\n", obj_type_count[i]);
380 buffer += "\r\nSHIPS\r\n";
381 temp.Format("\tNum small ships: %d\r\n", num_small_ships);
384 temp.Format("\tNum big ships: %d\r\n", num_big_ships);
387 temp.Format("\tNum huge ships: %d\r\n", num_huge_ships);
391 int total_waypoints = 0;
392 buffer += "\r\nWAYPOINTS\r\n";
393 for (i=0; i<Num_waypoint_lists; i++) {
394 temp.Format("\tWaypoint: %s, count: %d\r\n", Waypoint_lists[i].name, Waypoint_lists[i].count);
396 total_waypoints += Waypoint_lists[i].count;
400 if (total_waypoints > 0) {
401 temp.Format("\ttotal_waypoints: %d\r\n", total_waypoints);
406 int total_jumpnodes = 0;
407 buffer += "\r\nJUMPNODES\r\n";
408 for (i=0; i<Num_jump_nodes; i++) {
409 temp.Format("\tJumpnode: %s\r\n", Jump_nodes[i].name);
415 if (total_jumpnodes > 0) {
416 temp.Format("\ttotal_jumpnodes: %d\r\n", total_jumpnodes);
422 int num_counted_wings = 0;
423 buffer += "\r\nWINGS\r\n";
424 for (i=0; i<MAX_WINGS; i++) {
425 if (Wings[i].wave_count > 0) {
426 temp.Format("\tWing Name: %s, num_ships: %d, num_waves: %d\r\n", Wings[i].name, Wings[i].wave_count, Wings[i].num_waves);
430 if (num_counted_wings == num_wings) {
437 buffer += "\r\nESCORT\r\n";
438 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
439 if ( (objp->type == OBJ_SHIP) || (objp->type == OBJ_START) ) {
440 if (Ships[objp->instance].flags & SF_ESCORT) {
441 temp.Format("\tShip name: %s, priority: %d\r\n", Ships[objp->instance].ship_name, Ships[objp->instance].escort_priority);
448 buffer += "\r\nHOTKEYS\r\n";
451 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
452 if ( (objp->type == OBJ_SHIP) || (objp->type == OBJ_START) ) {
453 if (Ships[objp->instance].hotkey != -1) {
454 temp.Format("\tShip name: %s, hotkey: F%d\r\n", Ships[objp->instance].ship_name, (Ships[objp->instance].hotkey + 5));
461 for (i=0; i<MAX_WINGS; i++) {
462 if (Wings[i].wave_count > 0) {
463 if (Wings[i].hotkey != -1) {
464 temp.Format("\tWing name: %s, hotkey: F%d\r\n", Wings[i].name, (Wings[i].hotkey + 5));
472 void DumpStats::get_objectives_and_goals(CString &buffer)
477 buffer += "\r\nOBJECTIVES AND GOALS\r\n";
480 for (i=0; i<Num_mission_events; i++) {
481 // name, objective_text, objective_key_text
482 if ( Mission_events[i].objective_text == NULL ) {
485 temp.Format("\tObjective: %s, text: %s, key_text: %s\r\n", Mission_events[i].name, Mission_events[i].objective_text, Mission_events[i].objective_key_text);
492 for (i=0; i<Num_goals; i++) {
493 temp.Format("\tGoal: %s, text: ", Mission_goals[i].name, Mission_goals[i].message);
496 switch(Mission_goals[i].type & GOAL_TYPE_MASK) {
498 buffer += ", type: primary\r\n";
502 buffer += ", type: secondary\r\n";
506 buffer += ", type: bonus\r\n";
517 void DumpStats::get_ship_weapon_selection(CString &buffer)
522 buffer += "\r\nSHIP WEAPON/SELECTION\r\n";
523 buffer += "Reported numbers are in addition to assigned ships and their default weapons\r\n";
525 for (i=0; i<Num_teams; i++) {
526 temp.Format("Team %d\r\n", i);
530 for (j=0; j<Team_data[i].number_choices; j++) {
531 temp.Format("\tShip name: %s, count %d", Ship_info[Ships[Team_data[i].ship_list[j]].ship_info_index].name, Team_data[i].ship_count[j]);
534 if (Team_data[i].ship_list[j] == Team_data[i].default_ship) {
535 temp = " DEFAULT SHIP\r\n";
545 for (j=0; j<MAX_WEAPON_TYPES; j++) {
546 if (Team_data[i].weaponry_pool[j] > 0) {
547 temp.Format("\tWeapon name: %s, count %d\r\n", Weapon_info[j].name, Team_data[i].weaponry_pool[j]);
555 void DumpStats::get_messaging_info(CString &buffer)
561 buffer += "\r\nSHIP ACCEPTED ORDERS\r\n";
563 // go through all ships and check (.orders_accepted against default_orders)
564 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
565 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
566 shipp = &Ships[objp->instance];
568 if (shipp->orders_accepted != ship_get_default_orders_accepted(&Ship_info[shipp->ship_info_index])) {
569 temp.Format("\tShip: %s with nonstandard accepted orders\r\n", shipp->ship_name);
576 void DumpStats::get_species_ship_breakdown(CString &buffer)
583 buffer += "\r\nSHIP SPECIES BREAKDOWN\r\n";
585 for (species=0; species<3; species++) {
589 buffer += "Terran\r\n";
592 case SPECIES_VASUDAN:
593 buffer += "Vasudan\r\n";
597 buffer += "Shivan\r\n";
603 buffer += "\tFighter wings:\r\n";
604 for (i=0; i<MAX_WINGS; i++) {
605 if (Wings[i].wave_count > 0) {
606 int wing_leader_shipnum = Wings[i].ship_index[Wings[i].special_ship];
607 if (Ship_info[Ships[wing_leader_shipnum].ship_info_index].species == species) {
608 if (Ship_info[Ships[wing_leader_shipnum].ship_info_index].flags & SIF_FIGHTER) {
609 temp.Format("\t\tWing: %s, count: %d, waves: %d, type: %s\r\n", Wings[i].name, Wings[i].wave_count, Wings[i].num_waves, Ship_info[Ships[wing_leader_shipnum].ship_info_index].name);
617 buffer += "\tBomber wings:\r\n";
618 for (i=0; i<MAX_WINGS; i++) {
619 if (Wings[i].wave_count > 0) {
620 int wing_leader_shipnum = Wings[i].ship_index[Wings[i].special_ship];
621 if (Ship_info[Ships[wing_leader_shipnum].ship_info_index].species == species) {
622 if (Ship_info[Ships[wing_leader_shipnum].ship_info_index].flags & SIF_BOMBER) {
623 temp.Format("\t\tWing: %s, count: %d, waves: %d, type: %s\r\n", Wings[i].name, Wings[i].wave_count, Wings[i].num_waves, Ship_info[Ships[wing_leader_shipnum].ship_info_index].name);
630 buffer += "\tFreighters, Cargo, Transports:\r\n";
631 // freighters and transports (cargo)
632 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
633 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
634 shipp = &Ships[objp->instance];
636 if (Ship_info[shipp->ship_info_index].species == species) {
637 //if (shipp->wingnum == -1)
638 //if (shipp->cargo1 > 0)
639 if (Ship_info[shipp->ship_info_index].flags & (SIF_FREIGHTER | SIF_TRANSPORT | SIF_CARGO)) {
640 temp.Format("\t\tName: %s Type: %s, Cargo: %s\r\n", shipp->ship_name, Ship_info[shipp->ship_info_index].name, Cargo_names[shipp->cargo1]);
647 buffer += "\tNav buoy, Escape pod, Sentry gun:\r\n";
648 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
649 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
650 shipp = &Ships[objp->instance];
652 if (Ship_info[shipp->ship_info_index].species == species) {
653 //if (shipp->wingnum == -1)
654 //if (shipp->cargo1 > 0)
655 if (Ship_info[shipp->ship_info_index].flags & (SIF_NAVBUOY | SIF_ESCAPEPOD | SIF_SENTRYGUN)) {
656 temp.Format("\t\tName: %s, Type: %s Cargo: %s\r\n", shipp->ship_name, Ship_info[shipp->ship_info_index].name, Cargo_names[shipp->cargo1]);
665 buffer += "\tCruiser:\r\n";
666 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
667 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
668 shipp = &Ships[objp->instance];
670 if (Ship_info[shipp->ship_info_index].species == species) {
671 //if (shipp->wingnum == -1)
672 //if (shipp->cargo1 > 0)
673 if (Ship_info[shipp->ship_info_index].flags & (SIF_CRUISER)) {
674 temp.Format("\t\tName: %s, Type: %s, Cargo: %s\r\n", shipp->ship_name, Ship_info[shipp->ship_info_index].name, Cargo_names[shipp->cargo1]);
681 // dry dock, cap, super cap
682 buffer += "\tDry dock, Capital, Supercap:\r\n";
683 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
684 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
685 shipp = &Ships[objp->instance];
687 if (Ship_info[shipp->ship_info_index].species == species) {
688 //if (shipp->wingnum == -1)
689 //if (shipp->cargo1 > 0)
690 if (Ship_info[shipp->ship_info_index].flags & (SIF_DRYDOCK|SIF_CAPITAL|SIF_SUPERCAP)) {
691 temp.Format("\t\tName: %s, Type: %s, Cargo: %s\r\n", shipp->ship_name, Ship_info[shipp->ship_info_index].name, Cargo_names[shipp->cargo1]);
702 void dump_loadout(ship *shipp, CString &loadout)
710 int pri_idx, sec_idx;
712 for (pri_idx=0; pri_idx < shipp->weapons.num_primary_banks; pri_idx++) {
713 if (shipp->weapons.primary_bank_weapons[pri_idx] == -1) {
714 weapon_name = "none";
716 weapon_name = Weapon_info[shipp->weapons.primary_bank_weapons[pri_idx]].name;
718 temp.Format("\t\t\tPrimary[%d]: %s\r\n", pri_idx+1, weapon_name);
723 for (sec_idx=0; sec_idx < shipp->weapons.num_secondary_banks; sec_idx++) {
724 if (shipp->weapons.secondary_bank_weapons[sec_idx] == -1) {
725 weapon_name = "none";
727 weapon_name = Weapon_info[shipp->weapons.secondary_bank_weapons[sec_idx]].name;
729 temp.Format("\t\t\tSecondary[%d]: %s\r\n", sec_idx+1, weapon_name);
735 for (ss = GET_FIRST(&shipp->subsys_list); ss != END_OF_LIST(&shipp->subsys_list); ss = GET_NEXT(ss) ) {
736 if ( (ss->system_info->type == SUBSYSTEM_TURRET) ) {
737 // ss->weapons.num_primary_banks, ss->weapons.num_secondary_banks, ss->weapons.primary_bank_weapons[3], ss->weapons.secondary_bank_weapons[2]
738 // ss->system_info->primary_banks, ss->system_info->secondary_banks
739 temp.Format("\t\t\tTurret: %s\r\n", ss->system_info->subobj_name);
743 for (pri_idx=0; pri_idx < ss->weapons.num_primary_banks; pri_idx++) {
744 if (ss->weapons.primary_bank_weapons[pri_idx] == -1) {
745 weapon_name = "none";
747 weapon_name = Weapon_info[ss->weapons.primary_bank_weapons[pri_idx]].name;
749 temp.Format("\t\t\t\tPrimary[%d]: %s\r\n", pri_idx+1, weapon_name);
754 for (sec_idx=0; sec_idx < ss->weapons.num_secondary_banks; sec_idx++) {
755 if (ss->weapons.secondary_bank_weapons[sec_idx] == -1) {
756 weapon_name = "none";
758 weapon_name = Weapon_info[ss->weapons.secondary_bank_weapons[sec_idx]].name;
760 temp.Format("\t\t\t\tSecondary[%d]: %s\r\n", sec_idx+1, weapon_name);
768 void DumpStats::get_default_ship_loadouts(CString &buffer)
773 CString temp, loadout;
775 buffer += "\r\nSHIP SPECIES BREAKDOWN\r\n";
777 for (species=0; species<3; species++) {
780 buffer += "Terran\r\n";
783 case SPECIES_VASUDAN:
784 buffer += "Vasudan\r\n";
788 buffer += "Shivan\r\n";
794 buffer += "\tFighter wings:\r\n";
795 for (i=0; i<MAX_WINGS; i++) {
796 if (Wings[i].wave_count > 0) {
797 int wing_leader_shipnum = Wings[i].ship_index[Wings[i].special_ship];
798 if (Ship_info[Ships[wing_leader_shipnum].ship_info_index].species == species) {
799 if (Ship_info[Ships[wing_leader_shipnum].ship_info_index].flags & SIF_FIGHTER) {
800 temp.Format("\t\tWing: %s\r\n", Wings[i].name);
802 dump_loadout(&Ships[wing_leader_shipnum], loadout);
810 buffer += "\tBomber wings:\r\n";
811 for (i=0; i<MAX_WINGS; i++) {
812 if (Wings[i].wave_count > 0) {
813 int wing_leader_shipnum = Wings[i].ship_index[Wings[i].special_ship];
814 if (Ship_info[Ships[wing_leader_shipnum].ship_info_index].species == species) {
815 if (Ship_info[Ships[wing_leader_shipnum].ship_info_index].flags & SIF_BOMBER) {
816 temp.Format("\t\tWing: %s\r\n", Wings[i].name);
818 dump_loadout(&Ships[wing_leader_shipnum], loadout);
825 buffer += "\tFreighters, Cargo, Transports:\r\n";
826 // freighters and transports (cargo)
827 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
828 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
829 shipp = &Ships[objp->instance];
831 if (Ship_info[shipp->ship_info_index].species == species) {
832 //if (shipp->wingnum == -1)
833 //if (shipp->cargo1 > 0)
834 if (Ship_info[shipp->ship_info_index].flags & (SIF_FREIGHTER | SIF_TRANSPORT)) {
835 temp.Format("\t\tName: %s\r\n", shipp->ship_name);
837 dump_loadout(shipp, loadout);
844 buffer += "\tEscape pod, Sentry gun:\r\n";
845 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
846 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
847 shipp = &Ships[objp->instance];
849 if (Ship_info[shipp->ship_info_index].species == species) {
850 //if (shipp->wingnum == -1)
851 //if (shipp->cargo1 > 0)
852 if (Ship_info[shipp->ship_info_index].flags & (SIF_ESCAPEPOD | SIF_SENTRYGUN)) {
853 temp.Format("\t\tName: %s\r\n", shipp->ship_name);
855 dump_loadout(shipp, loadout);
864 buffer += "\tCruiser:\r\n";
865 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
866 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
867 shipp = &Ships[objp->instance];
869 if (Ship_info[shipp->ship_info_index].species == species) {
870 //if (shipp->wingnum == -1)
871 //if (shipp->cargo1 > 0)
872 if (Ship_info[shipp->ship_info_index].flags & (SIF_CRUISER)) {
873 temp.Format("\t\tName: %s\r\n", shipp->ship_name);
875 dump_loadout(shipp, loadout);
882 // dry dock, cap, super cap
883 buffer += "\tCapital, Supercap:\r\n";
884 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
885 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
886 shipp = &Ships[objp->instance];
888 if (Ship_info[shipp->ship_info_index].species == species) {
889 //if (shipp->wingnum == -1)
890 //if (shipp->cargo1 > 0)
891 if (Ship_info[shipp->ship_info_index].flags & (SIF_CAPITAL|SIF_SUPERCAP)) {
892 temp.Format("\t\tName: %s\r\n", shipp->ship_name);
894 dump_loadout(shipp, loadout);
903 // go through all wings
905 // go through all ships not in wings and FLYABLE
907 // print primary, secondary, and BIG turrets