MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / find_mission_data

Method find_mission_data

Descent3/pilot_class.cpp:982–999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

980}
981
982int pilot::find_mission_data(const char *mission_name) {
983 if (num_missions_flown <= 0) {
984 ASSERT(num_missions_flown == 0);
985 return -1;
986 }
987
988 ASSERT(mission_data);
989 if (!mission_data)
990 return -1;
991
992 for (int i = 0; i < num_missions_flown; i++) {
993 if (!stricmp(mission_data[i].mission_name, mission_name)) {
994 return i;
995 }
996 }
997
998 return -1;
999}
1000
1001// internal file access functions
1002// for the read functions, skip is true if the data should actually

Calls

no outgoing calls

Tested by

no test coverage detected