* Convert the name of a movement to the type value of that movement, or * MOVEMENT_INVALID if not found. */
| 367 | * MOVEMENT_INVALID if not found. |
| 368 | */ |
| 369 | uint8 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. |
no outgoing calls
no test coverage detected