MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / DefineEngineMethod

Function DefineEngineMethod

Engine/source/gui/worldEditor/creator.cpp:254–272  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

252
253//------------------------------------------------------------------------------
254DefineEngineMethod( CreatorTree, fileNameMatch, bool, (const char * world, const char * type, const char * filename), , "(string world, string type, string filename)")
255{
256 // argv[2] - world short
257 // argv[3] - type short
258 // argv[4] - filename
259
260 // interior filenames
261 // 0 - world short ('b', 'x', ...)
262 // 1-> - type short ('towr', 'bunk', ...)
263 U32 typeLen = dStrlen(type);
264 if(dStrlen(filename) < (typeLen + 1))
265 return(false);
266
267 // world
268 if(dToupper(filename[0]) != dToupper(world[0]))
269 return(false);
270
271 return(!dStrnicmp(filename+1, type, typeLen));
272}
273
274DefineEngineMethod( CreatorTree, getSelected, S32, (), , "Return a handle to the currently selected item.")
275{

Callers 3

creator.cppFile · 0.70

Calls 4

dToupperFunction · 0.85
dStrnicmpFunction · 0.85
dStrlenFunction · 0.50
clearMethod · 0.45

Tested by

no test coverage detected