MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / getKeywordIndex

Function getKeywordIndex

TheForceEngine/TFE_Asset/dfKeywords.cpp:236–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234#define KEYWORD_COUNT TFE_ARRAYSIZE(c_keywords)
235
236KEYWORD getKeywordIndex(const char* keywordString)
237{
238 s32 result = -1;
239 for (s32 i = 0; i < KEYWORD_COUNT; i++)
240 {
241 const char* keyword = c_keywords[i];
242 if (toupper(keywordString[0]) == keyword[0])
243 {
244 if (!strcasecmp(keywordString, keyword))
245 {
246 result = i;
247 break;
248 }
249 }
250 }
251 return KEYWORD(result);
252}

Callers 15

editor_objectParseSeqFunction · 0.85
loadLevelObjFromAssetFunction · 0.85
importFromTextFunction · 0.85
editor_parseMessageFunction · 0.85
parseElevatorFunction · 0.85
parseSectorTriggerFunction · 0.85
parseLineTriggerFunction · 0.85
parseTeleportFunction · 0.85
loadLevelInfFromAssetFunction · 0.85
inf_getMessageTargetFunction · 0.85
parseElevatorFunction · 0.85

Calls 1

KEYWORDEnum · 0.85

Tested by

no test coverage detected