15 #include "DumpStats.h"
31 static char THIS_FILE[] = __FILE__;
49 CDialog::DoDataExchange(pDX);
67 CDialog::OnInitDialog();
73 get_mission_stats(buffer);
76 get_background_stats(buffer);
79 get_object_stats(buffer);
82 get_objectives_and_goals(buffer);
85 get_ship_weapon_selection(buffer);
88 get_messaging_info(buffer);
91 get_species_ship_breakdown(buffer);
94 get_default_ship_loadouts(buffer);
96 int num_tab_stops = 5;
99 tab_stops[
i] = (i+1) * 16;
102 ((CEdit*) GetDlgItem(
IDC_STATS_TEXT))->SetTabStops(num_tab_stops, tab_stops);
117 CString dump_filename;
123 cfputs((
char *)LPCTSTR(buffer), fp);
132 buffer +=
"\t MISSION INFO\r\n";
150 temp.Format(
"Mission type: Single Player\r\n");
152 temp.Format(
"Mission type: Multi Coop\r\n");
154 temp.Format(
"Mission type: Multi Team vs. Team\r\n");
156 temp.Format(
"Mission type: Dogfight\r\n");
171 buffer +=
"\tRed Alert\r\n";
175 buffer +=
"\tScramble\r\n";
179 buffer +=
"\tNo Promotions\r\n";
183 buffer +=
"\tNo Support ships\r\n";
196 buffer +=
"\r\n\tBACKGROUND INFO\r\n";
199 temp.Format(
"Num_stars: %d\r\n",
Num_stars);
228 temp.Format(
"\tActive Field\r\n");
231 temp.Format(
"\tAsteroid Debris\r\n");
235 temp.Format(
"\tPassive Field\r\n");
239 temp.Format(
"\tAsteroid Debris\r\n");
242 temp.Format(
"\tShip Debris\r\n");
246 temp.Format(
"\t\tSpecies: ");
262 temp =
"Nebula mission:";
263 if (nebula_mission) {
270 if (nebula_mission) {
272 temp.Format(
"\tNebula awacs range: %.0f\r\n",
Neb2_awacs);
297 temp =
"Subspace mission:";
311 int num_small_ships, num_big_ships, num_huge_ships;
314 memset(obj_type_count,0,
sizeof(obj_type_count));
315 num_small_ships = num_big_ships = num_huge_ships= 0;
330 obj_type_count[objp->
type]++;
334 buffer +=
"\r\n\tMISSION STATISTICS\r\n";
341 if (obj_type_count[i] > 0) {
344 temp.Format(
"Ship Count: %d\r\n", obj_type_count[i]);
349 temp.Format(
"Start Count: %d\r\n", obj_type_count[i]);
354 temp.Format(
"Waypoint Count: %d\r\n", obj_type_count[i]);
359 temp.Format(
"Wing Count: %d\r\n", obj_type_count[i]);
364 temp.Format(
"Jump Node Count: %d\r\n", obj_type_count[i]);
375 buffer +=
"\r\nSHIPS\r\n";
376 temp.Format(
"\tNum small ships: %d\r\n", num_small_ships);
379 temp.Format(
"\tNum big ships: %d\r\n", num_big_ships);
382 temp.Format(
"\tNum huge ships: %d\r\n", num_huge_ships);
386 int total_waypoints = 0;
387 buffer +=
"\r\nWAYPOINTS\r\n";
391 temp.Format(
"\tWaypoint: %s, count: %d\r\n", ii->get_name(), ii->get_waypoints().size());
393 total_waypoints += ii->get_waypoints().size();
396 if (total_waypoints > 0) {
397 temp.Format(
"\ttotal_waypoints: %d\r\n", total_waypoints);
402 buffer +=
"\r\nJUMPNODES\r\n";
406 temp.Format(
"\tJumpnode: %s\r\n", jnp->GetName());
411 temp.Format(
"\ttotal_jumpnodes: %d\r\n",
Jump_nodes.size());
417 int num_counted_wings = 0;
418 buffer +=
"\r\nWINGS\r\n";
420 if (
Wings[i].wave_count > 0) {
421 temp.Format(
"\tWing Name: %s, wave_count: %d, num_waves: %d\r\n",
Wings[i].
name,
Wings[i].wave_count,
Wings[i].num_waves);
432 buffer +=
"\r\nESCORT\r\n";
443 buffer +=
"\r\nHOTKEYS\r\n";
457 if (
Wings[i].wave_count > 0) {
458 if (
Wings[i].hotkey != -1) {
459 temp.Format(
"\tWing name: %s, hotkey: F%d\r\n",
Wings[i].
name, (
Wings[i].hotkey + 5));
472 buffer +=
"\r\nOBJECTIVES AND GOALS\r\n";
493 buffer +=
", type: primary\r\n";
497 buffer +=
", type: secondary\r\n";
501 buffer +=
", type: bonus\r\n";
517 buffer +=
"\r\nSHIP WEAPON/SELECTION\r\n";
518 buffer +=
"Reported numbers are in addition to assigned ships and their default weapons\r\n";
521 temp.Format(
"Team %d\r\n", i);
530 temp =
" DEFAULT SHIP\r\n";
556 buffer +=
"\r\nSHIP ACCEPTED ORDERS\r\n";
564 temp.Format(
"\tShip: %s with nonstandard accepted orders\r\n", shipp->
ship_name);
579 buffer +=
"\r\nSHIP SPECIES BREAKDOWN\r\n";
587 buffer +=
"\tFighter wings:\r\n";
589 if (
Wings[i].wave_count > 0) {
591 if (
Ship_info[
Ships[wing_leader_shipnum].ship_info_index].species == species) {
593 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);
601 buffer +=
"\tBomber wings:\r\n";
603 if (
Wings[i].wave_count > 0) {
605 if (
Ship_info[
Ships[wing_leader_shipnum].ship_info_index].species == species) {
607 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);
614 buffer +=
"\tFreighters, Cargo, Transports:\r\n";
631 buffer +=
"\tNav buoy, Escape pod, Sentry gun:\r\n";
649 buffer +=
"\tCruiser:\r\n";
666 buffer +=
"\tDry dock, Capital, Supercap:\r\n";
694 int pri_idx, sec_idx;
698 weapon_name =
"none";
702 temp.Format(
"\t\t\tPrimary[%d]: %s\r\n", pri_idx+1, weapon_name);
709 weapon_name =
"none";
713 temp.Format(
"\t\t\tSecondary[%d]: %s\r\n", sec_idx+1, weapon_name);
729 weapon_name =
"none";
733 temp.Format(
"\t\t\t\tPrimary[%d]: %s\r\n", pri_idx+1, weapon_name);
740 weapon_name =
"none";
744 temp.Format(
"\t\t\t\tSecondary[%d]: %s\r\n", sec_idx+1, weapon_name);
758 CString
temp, loadout;
760 buffer +=
"\r\nSHIP SPECIES BREAKDOWN\r\n";
768 buffer +=
"\tFighter wings:\r\n";
770 if (
Wings[i].wave_count > 0) {
772 if (
Ship_info[
Ships[wing_leader_shipnum].ship_info_index].species == species) {
774 temp.Format(
"\t\tWing: %s\r\n",
Wings[i].
name);
784 buffer +=
"\tBomber wings:\r\n";
786 if (
Wings[i].wave_count > 0) {
788 if (
Ship_info[
Ships[wing_leader_shipnum].ship_info_index].species == species) {
790 temp.Format(
"\t\tWing: %s\r\n",
Wings[i].
name);
799 buffer +=
"\tFreighters, Cargo, Transports:\r\n";
809 temp.Format(
"\t\tName: %s\r\n", shipp->
ship_name);
818 buffer +=
"\tEscape pod, Sentry gun:\r\n";
827 temp.Format(
"\t\tName: %s\r\n", shipp->
ship_name);
838 buffer +=
"\tCruiser:\r\n";
847 temp.Format(
"\t\tName: %s\r\n", shipp->
ship_name);
857 buffer +=
"\tCapital, Supercap:\r\n";
866 temp.Format(
"\t\tName: %s\r\n", shipp->
ship_name);
char Neb2_texture_name[MAX_FILENAME_LEN]
virtual void DoDataExchange(CDataExchange *pDX)
model_subsystem * system_info
int primary_bank_weapons[MAX_SHIP_PRIMARY_BANKS]
#define MISSION_FLAG_FULLNEB
int Current_soundtrack_num
weapon_info Weapon_info[MAX_WEAPON_TYPES]
afx_msg void OnDumpToFile()
void get_default_ship_loadouts(CString &buffer)
#define MISSION_FLAG_SCRAMBLE
#define stars_get_bitmap_name(x)
#define MISSION_TYPE_MULTI
#define MISSION_FLAG_NO_PROMOTION
#define END_OF_LIST(head)
void get_background_stats(CString &buffer)
GLenum GLuint GLenum GLsizei const GLchar * message
SOUNDTRACK_INFO Soundtracks[MAX_SOUNDTRACKS]
char Neb2_poof_filenames[MAX_NEB2_POOFS][MAX_FILENAME_LEN]
mission_goal Mission_goals[MAX_GOALS]
SCP_list< waypoint_list > Waypoint_lists
DumpStats(CWnd *pParent=NULL)
SCP_list< CJumpNode > Jump_nodes
#define MISSION_TYPE_MULTI_COOP
int num_initial_asteroids
typedef int(SCP_EXT_CALLCONV *SCPDLL_PFVERSION)(SCPDLL_Version *)
#define MISSION_TYPE_SINGLE
char squad_filename[MAX_FILENAME_LEN]
char * Nebula_filenames[NUM_NEBULAS]
#define MISSION_FLAG_RED_ALERT
mission_event Mission_events[MAX_MISSION_EVENTS]
char squad_name[NAME_LENGTH]
#define stars_get_sun_name(x)
int secondary_bank_weapons[MAX_SHIP_SECONDARY_BANKS]
char Mission_filename[80]
void get_ship_weapon_selection(CString &buffer)
#define stars_get_num_bitmaps()
void get_mission_stats(CString &buffer)
void get_species_ship_breakdown(CString &buffer)
GLuint const GLchar * name
void dump_loadout(ship *shipp, CString &loadout)
void get_object_stats(CString &buffer)
int cfputs(const char *str, CFILE *cfile)
int field_debris_type[MAX_ACTIVE_DEBRIS_TYPES]
char subobj_name[MAX_NAME_LEN]
SCP_vector< ship_info > Ship_info
SCP_vector< species_info > Species_info
char mission_desc[MISSION_DESC_LENGTH]
int ship_get_default_orders_accepted(ship_info *sip)
void get_objectives_and_goals(CString &buffer)
void get_messaging_info(CString &buffer)
debris_genre_t debris_genre
team_data Team_data[MAX_TVT_TEAMS]
int ship_index[MAX_SHIPS_PER_WING]
asteroid_field Asteroid_field
int cfclose(CFILE *cfile)
support_ship_info support_ships
#define stars_get_num_suns()
char ship_name[NAME_LENGTH]
#define MISSION_FLAG_SUBSPACE
#define MISSION_TYPE_MULTI_TEAMS
#define MISSION_TYPE_MULTI_DOGFIGHT