MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Unit_MovementStringToType

Function Unit_MovementStringToType

src/unit.c:369–379  ·  view source on GitHub ↗

* Convert the name of a movement to the type value of that movement, or * MOVEMENT_INVALID if not found. */

Source from the content-addressed store, hash-verified

367 * MOVEMENT_INVALID if not found.
368 */
369uint8 Unit_MovementStringToType(const char *name)
370{
371 uint8 type;
372 if (name == NULL) return MOVEMENT_INVALID;
373
374 for (type = 0; type < MOVEMENT_MAX; type++) {
375 if (strcasecmp(g_table_movementTypeName[type], name) == 0) return type;
376 }
377
378 return MOVEMENT_INVALID;
379}
380
381/**
382 * Create a new Unit.

Callers 1

Scenario_Load_TeamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected