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

Function Unit_ActionStringToType

src/unit.c:353–363  ·  view source on GitHub ↗

* Convert the name of an action to the type value of that action, or * ACTION_INVALID if not found. */

Source from the content-addressed store, hash-verified

351 * ACTION_INVALID if not found.
352 */
353uint8 Unit_ActionStringToType(const char *name)
354{
355 uint8 type;
356 if (name == NULL) return ACTION_INVALID;
357
358 for (type = 0; type < ACTION_MAX; type++) {
359 if (strcasecmp(g_table_actionInfo[type].name, name) == 0) return type;
360 }
361
362 return ACTION_INVALID;
363}
364
365/**
366 * Convert the name of a movement to the type value of that movement, or

Callers 1

Scenario_Load_UnitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected