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

Function FindShipName

Descent3/ship.cpp:229–239  ·  view source on GitHub ↗

Searches thru all ships for a specific name, returns -1 if not found or index of ship with name

Source from the content-addressed store, hash-verified

227// Searches thru all ships for a specific name, returns -1 if not found
228// or index of ship with name
229int FindShipName(const char *name) {
230 int i;
231
232 ASSERT(name != NULL);
233
234 for (i = 0; i < MAX_SHIPS; i++)
235 if (Ships[i].used && !stricmp(name, Ships[i].name))
236 return i;
237
238 return -1;
239}
240
241int LoadShipImage(const char *filename) {
242 int img_handle;

Callers 15

mng_LoadNetShipPageFunction · 0.85
mng_LoadLocalShipPageFunction · 0.85
mng_RenamePageFunction · 0.85
mng_PopAddonPagesFunction · 0.85
AddPageFromUserMethod · 0.85
ProcessPageFromFileMethod · 0.85
OnAddPshipMethod · 0.85
SaveShipsOnCloseMethod · 0.85
StartNewGameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected