MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / DefineConsoleMethod

Function DefineConsoleMethod

Engine/source/gui/worldEditor/creator.cpp:252–270  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 2

creator.cppFile · 0.70

Calls 4

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

Tested by

no test coverage detected