2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
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
9 // DumpStats.cpp : implementation file
14 #include "dumpstats.h"
15 #include "starfield.h"
20 #include "missiongoals.h"
21 #include "eventmusic.h"
27 static char THIS_FILE[] = __FILE__;
30 /////////////////////////////////////////////////////////////////////////////
34 DumpStats::DumpStats(CWnd* pParent /*=NULL*/)
35 : CDialog(DumpStats::IDD, pParent)
37 //{{AFX_DATA_INIT(DumpStats)
38 // NOTE: the ClassWizard will add member initialization here
43 void DumpStats::DoDataExchange(CDataExchange* pDX)
45 CDialog::DoDataExchange(pDX);
46 //{{AFX_DATA_MAP(DumpStats)
47 // NOTE: the ClassWizard will add DDX and DDV calls here
52 BEGIN_MESSAGE_MAP(DumpStats, CDialog)
53 //{{AFX_MSG_MAP(DumpStats)
54 ON_BN_CLICKED(IDC_DUMP_TO_FILE, OnDumpToFile)
58 /////////////////////////////////////////////////////////////////////////////
59 // DumpStats message handlers
61 BOOL DumpStats::OnInitDialog()
63 CDialog::OnInitDialog();
68 // get author, title, etc
69 get_mission_stats(buffer);
71 // get nebula, stars, etc.
72 get_background_stats(buffer);
74 // get number or ships, waypoints, start points, etc.
75 get_object_stats(buffer);
77 // get objectives / goals
78 get_objectives_and_goals(buffer);
80 // get ship selection for player wings
81 get_ship_weapon_selection(buffer);
84 get_messaging_info(buffer);
86 // get species ship breakdown
87 get_species_ship_breakdown(buffer);
89 // get default loadouts
90 get_default_ship_loadouts(buffer);
92 int num_tab_stops = 5;
95 tab_stops[i] = (i+1) * 16;
98 ((CEdit*) GetDlgItem(IDC_STATS_TEXT))->SetTabStops(num_tab_stops, tab_stops);
99 ((CEdit*) GetDlgItem(IDC_STATS_TEXT))->SetWindowText(buffer);
101 return TRUE; // return TRUE unless you set the focus to a control
102 // EXCEPTION: OCX Property Pages should return FALSE
105 void DumpStats::OnDumpToFile()
107 // TODO: Add your control notification handler code here
109 // get dump from window
111 ((CEdit*) GetDlgItem(IDC_STATS_TEXT))->GetWindowText(buffer);
113 CString dump_filename;
114 dump_filename.Format("%s.dmp", Mission_filename);
118 fp = cfopen((char *)LPCTSTR(dump_filename), "wt", CFILE_NORMAL, CF_TYPE_MISSIONS);
119 cfputs((char *)LPCTSTR(buffer), fp);
123 void DumpStats::get_mission_stats(CString &buffer)
128 buffer += "\t MISSION INFO\r\n";
130 temp.Format("Title: %s\r\n", The_mission.name);
133 temp.Format("Filename: %s\r\n", Mission_filename);
136 temp.Format("Author: %s\r\n", The_mission.author);
139 temp.Format("Description: %s\r\n", The_mission.mission_desc);
142 temp.Format("Notes: %s\r\n", The_mission.notes);
145 if (The_mission.game_type & MISSION_TYPE_SINGLE) {
146 temp.Format("Mission type: Single Player\r\n");
147 } else if (The_mission.game_type & MISSION_TYPE_MULTI_COOP) {
148 temp.Format("Mission type: Multi Coop\r\n");
149 } else if (The_mission.game_type & MISSION_TYPE_MULTI_TEAMS) {
150 temp.Format("Mission type: Multi Team vs. Team\r\n");
151 } else if (The_mission.game_type & MISSION_TYPE_MULTI_DOGFIGHT) {
152 temp.Format("Mission type: Dogfight\r\n");
156 if (The_mission.game_type & MISSION_TYPE_MULTI) {
157 temp.Format("\tNum respawns: %d\r\n", The_mission.num_respawns);
161 if (Current_soundtrack_num >= 0) {
162 temp.Format("\tMusic: %s\r\n", Soundtracks[Current_soundtrack_num].name);
166 if (The_mission.red_alert) {
167 buffer += "\tRed Alert\r\n";
170 if (The_mission.scramble) {
171 buffer += "\tScramble\r\n";
174 if (The_mission.flags & MISSION_FLAG_NO_PROMOTION) {
175 buffer += "\tNo Promotions\r\n";
178 if (The_mission.disallow_support) {
179 buffer += "\tNo Support ships\r\n";
182 temp.Format("Squadron: %s, Squadron logo: %s\r\n", The_mission.squad_name, The_mission.squad_filename);
186 void DumpStats::get_background_stats(CString &buffer)
192 buffer += "\r\n\tBACKGROUND INFO\r\n";
195 temp.Format("Num_stars: %d\r\n", Num_stars);
199 temp.Format("Num_suns: %d\r\n", Num_suns);
202 for (i=0; i<Num_suns; i++) {
203 temp.Format("\tSun%d bitmap name: %s\r\n", i, Sun_bitmaps[i].filename);
205 //temp.Format("Sun%d glow name: %s\r\n", i, Sun_bitmaps[i].glow_filename);
210 temp.Format("Num_starfield_bitmaps: %d\r\n", Num_starfield_bitmaps);
213 for (i=0; i<Num_starfield_bitmaps; i++) {
214 temp.Format("\tStarfield%d bitmap name: %s\r\n", i, Starfield_bitmap_instance[i].filename);
219 temp.Format("Num Field Debris Chunks: %d\r\n", Asteroid_field.num_initial_asteroids);
221 if (Asteroid_field.num_initial_asteroids > 0) {
223 if (Asteroid_field.field_type == FT_ACTIVE) {
224 temp.Format("\tActive Field\r\n");
227 temp.Format("\tAsteroid Debris\r\n");
231 temp.Format("\tPassive Field\r\n");
234 if (Asteroid_field.debris_genre == DG_ASTEROID) {
235 temp.Format("\tAsteroid Debris\r\n");
238 temp.Format("\tShip Debris\r\n");
242 temp.Format("\t\tSpecies: ");
243 for (i=0; i<3; i++) {
244 if (Asteroid_field.field_debris_type[i] >= 0) {
245 switch(Asteroid_field.field_debris_type[i]) {
246 case DEBRIS_TERRAN_SMALL:
247 case DEBRIS_TERRAN_MEDIUM:
248 case DEBRIS_TERRAN_LARGE:
252 case DEBRIS_VASUDAN_SMALL:
253 case DEBRIS_VASUDAN_MEDIUM:
254 case DEBRIS_VASUDAN_LARGE:
258 case DEBRIS_SHIVAN_SMALL:
259 case DEBRIS_SHIVAN_MEDIUM:
260 case DEBRIS_SHIVAN_LARGE:
275 int nebula_mission = (The_mission.flags & MISSION_FLAG_FULLNEB);
276 temp = "Nebula mission:";
277 if (nebula_mission) {
284 if (nebula_mission) {
286 temp.Format("\tNebula awacs range: %.0f\r\n", Neb2_awacs);
290 for (i=0; i<MAX_NEB2_POOFS; i++) {
291 if ( Neb2_poof_flags & (1<<i) ) {
292 temp.Format("\tNebula poof: %s\r\n", Neb2_poof_filenames[i]);
298 if (strlen(Neb2_texture_name) > 0) {
299 temp.Format("\tNebula texture: %s\r\n", Neb2_texture_name);
303 // FS! nebula pattern
304 if (Nebula_index > 0) {
305 temp.Format("\tOld style FS1 nebula filename: %s\r\n", Nebula_filenames[Nebula_index]);
311 temp = "Subspace mission:";
312 if (The_mission.flags & MISSION_FLAG_SUBSPACE) {
320 void DumpStats::get_object_stats(CString &buffer)
323 int obj_type_count[MAX_OBJECT_TYPES];
325 int num_small_ships, num_big_ships, num_huge_ships;
327 memset(obj_type_count,0, sizeof(obj_type_count));
328 num_small_ships = num_big_ships = num_huge_ships= 0;
330 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
332 // inc big ship or small ship count
333 if ( (objp->type == OBJ_SHIP) || (objp->type == OBJ_START) ) {
334 if ( Ship_info[Ships[objp->instance].ship_info_index].flags & SIF_SMALL_SHIP ) {
336 } else if ( Ship_info[Ships[objp->instance].ship_info_index].flags & SIF_BIG_SHIP ) {
338 } else if ( Ship_info[Ships[objp->instance].ship_info_index].flags & SIF_HUGE_SHIP ) {
343 obj_type_count[objp->type]++;
347 buffer += "\r\n\tMISSION STATISTICS\r\n";
349 // OBJ_START is also a OBJ_SHIP
350 // not counting num_waves (for wings)
351 obj_type_count[OBJ_SHIP] += obj_type_count[OBJ_START];
353 for (int i=0; i<MAX_OBJECT_TYPES; i++) {
354 if (obj_type_count[i] > 0) {
357 temp.Format("Ship Count: %d\r\n", obj_type_count[i]);
362 temp.Format("Start Count: %d\r\n", obj_type_count[i]);
367 temp.Format("Waypoint Count: %d\r\n", obj_type_count[i]);
372 temp.Format("Wing Count: %d\r\n", obj_type_count[i]);
377 temp.Format("Jump Node Count: %d\r\n", obj_type_count[i]);
388 buffer += "\r\nSHIPS\r\n";
389 temp.Format("\tNum small ships: %d\r\n", num_small_ships);
392 temp.Format("\tNum big ships: %d\r\n", num_big_ships);
395 temp.Format("\tNum huge ships: %d\r\n", num_huge_ships);
399 int total_waypoints = 0;
400 buffer += "\r\nWAYPOINTS\r\n";
401 for (i=0; i<Num_waypoint_lists; i++) {
402 temp.Format("\tWaypoint: %s, count: %d\r\n", Waypoint_lists[i].name, Waypoint_lists[i].count);
404 total_waypoints += Waypoint_lists[i].count;
408 if (total_waypoints > 0) {
409 temp.Format("\ttotal_waypoints: %d\r\n", total_waypoints);
414 int total_jumpnodes = 0;
415 buffer += "\r\nJUMPNODES\r\n";
416 for (i=0; i<Num_jump_nodes; i++) {
417 temp.Format("\tJumpnode: %s\r\n", Jump_nodes[i].name);
423 if (total_jumpnodes > 0) {
424 temp.Format("\ttotal_jumpnodes: %d\r\n", total_jumpnodes);
430 int num_counted_wings = 0;
431 buffer += "\r\nWINGS\r\n";
432 for (i=0; i<MAX_WINGS; i++) {
433 if (Wings[i].wave_count > 0) {
434 temp.Format("\tWing Name: %s, num_ships: %d, num_waves: %d\r\n", Wings[i].name, Wings[i].wave_count, Wings[i].num_waves);
438 if (num_counted_wings == num_wings) {
445 buffer += "\r\nESCORT\r\n";
446 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
447 if ( (objp->type == OBJ_SHIP) || (objp->type == OBJ_START) ) {
448 if (Ships[objp->instance].flags & SF_ESCORT) {
449 temp.Format("\tShip name: %s, priority: %d\r\n", Ships[objp->instance].ship_name, Ships[objp->instance].escort_priority);
456 buffer += "\r\nHOTKEYS\r\n";
459 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
460 if ( (objp->type == OBJ_SHIP) || (objp->type == OBJ_START) ) {
461 if (Ships[objp->instance].hotkey != -1) {
462 temp.Format("\tShip name: %s, hotkey: F%d\r\n", Ships[objp->instance].ship_name, (Ships[objp->instance].hotkey + 5));
469 for (i=0; i<MAX_WINGS; i++) {
470 if (Wings[i].wave_count > 0) {
471 if (Wings[i].hotkey != -1) {
472 temp.Format("\tWing name: %s, hotkey: F%d\r\n", Wings[i].name, (Wings[i].hotkey + 5));
480 void DumpStats::get_objectives_and_goals(CString &buffer)
485 buffer += "\r\nOBJECTIVES AND GOALS\r\n";
488 for (i=0; i<Num_mission_events; i++) {
489 // name, objective_text, objective_key_text
490 if ( Mission_events[i].objective_text == NULL ) {
493 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);
500 for (i=0; i<Num_goals; i++) {
501 temp.Format("\tGoal: %s, text: ", Mission_goals[i].name, Mission_goals[i].message);
504 switch(Mission_goals[i].type & GOAL_TYPE_MASK) {
506 buffer += ", type: primary\r\n";
510 buffer += ", type: secondary\r\n";
514 buffer += ", type: bonus\r\n";
525 void DumpStats::get_ship_weapon_selection(CString &buffer)
530 buffer += "\r\nSHIP WEAPON/SELECTION\r\n";
531 buffer += "Reported numbers are in addition to assigned ships and their default weapons\r\n";
533 for (i=0; i<Num_teams; i++) {
534 temp.Format("Team %d\r\n", i);
538 for (j=0; j<Team_data[i].number_choices; j++) {
539 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]);
542 if (Team_data[i].ship_list[j] == Team_data[i].default_ship) {
543 temp = " DEFAULT SHIP\r\n";
553 for (j=0; j<MAX_WEAPON_TYPES; j++) {
554 if (Team_data[i].weaponry_pool[j] > 0) {
555 temp.Format("\tWeapon name: %s, count %d\r\n", Weapon_info[j].name, Team_data[i].weaponry_pool[j]);
563 void DumpStats::get_messaging_info(CString &buffer)
569 buffer += "\r\nSHIP ACCEPTED ORDERS\r\n";
571 // go through all ships and check (.orders_accepted against default_orders)
572 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
573 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
574 shipp = &Ships[objp->instance];
576 if (shipp->orders_accepted != ship_get_default_orders_accepted(&Ship_info[shipp->ship_info_index])) {
577 temp.Format("\tShip: %s with nonstandard accepted orders\r\n", shipp->ship_name);
584 void DumpStats::get_species_ship_breakdown(CString &buffer)
591 buffer += "\r\nSHIP SPECIES BREAKDOWN\r\n";
593 for (species=0; species<3; species++) {
597 buffer += "Terran\r\n";
600 case SPECIES_VASUDAN:
601 buffer += "Vasudan\r\n";
605 buffer += "Shivan\r\n";
611 buffer += "\tFighter wings:\r\n";
612 for (i=0; i<MAX_WINGS; i++) {
613 if (Wings[i].wave_count > 0) {
614 int wing_leader_shipnum = Wings[i].ship_index[Wings[i].special_ship];
615 if (Ship_info[Ships[wing_leader_shipnum].ship_info_index].species == species) {
616 if (Ship_info[Ships[wing_leader_shipnum].ship_info_index].flags & SIF_FIGHTER) {
617 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);
625 buffer += "\tBomber wings:\r\n";
626 for (i=0; i<MAX_WINGS; i++) {
627 if (Wings[i].wave_count > 0) {
628 int wing_leader_shipnum = Wings[i].ship_index[Wings[i].special_ship];
629 if (Ship_info[Ships[wing_leader_shipnum].ship_info_index].species == species) {
630 if (Ship_info[Ships[wing_leader_shipnum].ship_info_index].flags & SIF_BOMBER) {
631 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);
638 buffer += "\tFreighters, Cargo, Transports:\r\n";
639 // freighters and transports (cargo)
640 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
641 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
642 shipp = &Ships[objp->instance];
644 if (Ship_info[shipp->ship_info_index].species == species) {
645 //if (shipp->wingnum == -1)
646 //if (shipp->cargo1 > 0)
647 if (Ship_info[shipp->ship_info_index].flags & (SIF_FREIGHTER | SIF_TRANSPORT | SIF_CARGO)) {
648 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]);
655 buffer += "\tNav buoy, Escape pod, Sentry gun:\r\n";
656 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
657 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
658 shipp = &Ships[objp->instance];
660 if (Ship_info[shipp->ship_info_index].species == species) {
661 //if (shipp->wingnum == -1)
662 //if (shipp->cargo1 > 0)
663 if (Ship_info[shipp->ship_info_index].flags & (SIF_NAVBUOY | SIF_ESCAPEPOD | SIF_SENTRYGUN)) {
664 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]);
673 buffer += "\tCruiser:\r\n";
674 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
675 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
676 shipp = &Ships[objp->instance];
678 if (Ship_info[shipp->ship_info_index].species == species) {
679 //if (shipp->wingnum == -1)
680 //if (shipp->cargo1 > 0)
681 if (Ship_info[shipp->ship_info_index].flags & (SIF_CRUISER)) {
682 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]);
689 // dry dock, cap, super cap
690 buffer += "\tDry dock, Capital, Supercap:\r\n";
691 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
692 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
693 shipp = &Ships[objp->instance];
695 if (Ship_info[shipp->ship_info_index].species == species) {
696 //if (shipp->wingnum == -1)
697 //if (shipp->cargo1 > 0)
698 if (Ship_info[shipp->ship_info_index].flags & (SIF_DRYDOCK|SIF_CAPITAL|SIF_SUPERCAP)) {
699 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]);
710 void dump_loadout(ship *shipp, CString &loadout)
718 int pri_idx, sec_idx;
720 for (pri_idx=0; pri_idx < shipp->weapons.num_primary_banks; pri_idx++) {
721 if (shipp->weapons.primary_bank_weapons[pri_idx] == -1) {
722 weapon_name = "none";
724 weapon_name = Weapon_info[shipp->weapons.primary_bank_weapons[pri_idx]].name;
726 temp.Format("\t\t\tPrimary[%d]: %s\r\n", pri_idx+1, weapon_name);
731 for (sec_idx=0; sec_idx < shipp->weapons.num_secondary_banks; sec_idx++) {
732 if (shipp->weapons.secondary_bank_weapons[sec_idx] == -1) {
733 weapon_name = "none";
735 weapon_name = Weapon_info[shipp->weapons.secondary_bank_weapons[sec_idx]].name;
737 temp.Format("\t\t\tSecondary[%d]: %s\r\n", sec_idx+1, weapon_name);
743 for (ss = GET_FIRST(&shipp->subsys_list); ss != END_OF_LIST(&shipp->subsys_list); ss = GET_NEXT(ss) ) {
744 if ( (ss->system_info->type == SUBSYSTEM_TURRET) ) {
745 // ss->weapons.num_primary_banks, ss->weapons.num_secondary_banks, ss->weapons.primary_bank_weapons[3], ss->weapons.secondary_bank_weapons[2]
746 // ss->system_info->primary_banks, ss->system_info->secondary_banks
747 temp.Format("\t\t\tTurret: %s\r\n", ss->system_info->subobj_name);
751 for (pri_idx=0; pri_idx < ss->weapons.num_primary_banks; pri_idx++) {
752 if (ss->weapons.primary_bank_weapons[pri_idx] == -1) {
753 weapon_name = "none";
755 weapon_name = Weapon_info[ss->weapons.primary_bank_weapons[pri_idx]].name;
757 temp.Format("\t\t\t\tPrimary[%d]: %s\r\n", pri_idx+1, weapon_name);
762 for (sec_idx=0; sec_idx < ss->weapons.num_secondary_banks; sec_idx++) {
763 if (ss->weapons.secondary_bank_weapons[sec_idx] == -1) {
764 weapon_name = "none";
766 weapon_name = Weapon_info[ss->weapons.secondary_bank_weapons[sec_idx]].name;
768 temp.Format("\t\t\t\tSecondary[%d]: %s\r\n", sec_idx+1, weapon_name);
776 void DumpStats::get_default_ship_loadouts(CString &buffer)
781 CString temp, loadout;
783 buffer += "\r\nSHIP SPECIES BREAKDOWN\r\n";
785 for (species=0; species<3; species++) {
788 buffer += "Terran\r\n";
791 case SPECIES_VASUDAN:
792 buffer += "Vasudan\r\n";
796 buffer += "Shivan\r\n";
802 buffer += "\tFighter wings:\r\n";
803 for (i=0; i<MAX_WINGS; i++) {
804 if (Wings[i].wave_count > 0) {
805 int wing_leader_shipnum = Wings[i].ship_index[Wings[i].special_ship];
806 if (Ship_info[Ships[wing_leader_shipnum].ship_info_index].species == species) {
807 if (Ship_info[Ships[wing_leader_shipnum].ship_info_index].flags & SIF_FIGHTER) {
808 temp.Format("\t\tWing: %s\r\n", Wings[i].name);
810 dump_loadout(&Ships[wing_leader_shipnum], loadout);
818 buffer += "\tBomber wings:\r\n";
819 for (i=0; i<MAX_WINGS; i++) {
820 if (Wings[i].wave_count > 0) {
821 int wing_leader_shipnum = Wings[i].ship_index[Wings[i].special_ship];
822 if (Ship_info[Ships[wing_leader_shipnum].ship_info_index].species == species) {
823 if (Ship_info[Ships[wing_leader_shipnum].ship_info_index].flags & SIF_BOMBER) {
824 temp.Format("\t\tWing: %s\r\n", Wings[i].name);
826 dump_loadout(&Ships[wing_leader_shipnum], loadout);
833 buffer += "\tFreighters, Cargo, Transports:\r\n";
834 // freighters and transports (cargo)
835 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
836 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
837 shipp = &Ships[objp->instance];
839 if (Ship_info[shipp->ship_info_index].species == species) {
840 //if (shipp->wingnum == -1)
841 //if (shipp->cargo1 > 0)
842 if (Ship_info[shipp->ship_info_index].flags & (SIF_FREIGHTER | SIF_TRANSPORT)) {
843 temp.Format("\t\tName: %s\r\n", shipp->ship_name);
845 dump_loadout(shipp, loadout);
852 buffer += "\tEscape pod, Sentry gun:\r\n";
853 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
854 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
855 shipp = &Ships[objp->instance];
857 if (Ship_info[shipp->ship_info_index].species == species) {
858 //if (shipp->wingnum == -1)
859 //if (shipp->cargo1 > 0)
860 if (Ship_info[shipp->ship_info_index].flags & (SIF_ESCAPEPOD | SIF_SENTRYGUN)) {
861 temp.Format("\t\tName: %s\r\n", shipp->ship_name);
863 dump_loadout(shipp, loadout);
872 buffer += "\tCruiser:\r\n";
873 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
874 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
875 shipp = &Ships[objp->instance];
877 if (Ship_info[shipp->ship_info_index].species == species) {
878 //if (shipp->wingnum == -1)
879 //if (shipp->cargo1 > 0)
880 if (Ship_info[shipp->ship_info_index].flags & (SIF_CRUISER)) {
881 temp.Format("\t\tName: %s\r\n", shipp->ship_name);
883 dump_loadout(shipp, loadout);
890 // dry dock, cap, super cap
891 buffer += "\tCapital, Supercap:\r\n";
892 for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
893 if (objp->type == OBJ_START || objp->type == OBJ_SHIP) {
894 shipp = &Ships[objp->instance];
896 if (Ship_info[shipp->ship_info_index].species == species) {
897 //if (shipp->wingnum == -1)
898 //if (shipp->cargo1 > 0)
899 if (Ship_info[shipp->ship_info_index].flags & (SIF_CAPITAL|SIF_SUPERCAP)) {
900 temp.Format("\t\tName: %s\r\n", shipp->ship_name);
902 dump_loadout(shipp, loadout);
911 // go through all wings
913 // go through all ships not in wings and FLYABLE
915 // print primary, secondary, and BIG turrets