Full Path of Files Referenced Relative to the Scripts
by Demolishun · in Torque Game Engine · 09/17/2006 (8:38 pm) · 4 replies
I am integrating a fuzzy logic library in torque called FFLL (BDS license). I need to load a file but am not sure how to get a full path so it can load it reliably. I want to specify the path of the file in a datablock then when the file name is viewed by the C++ code it can load the file using the FFLL code. There is only one function that loads the code inside the library. I am thinking about modifying thier code, but was hoping I could find the full path in the meantime.
Thanks
Frank
Thanks
Frank
About the author
I love programming, I love programming things that go click, whirr, boom. For organized T3D Links visit: http://demolishun.com/?page_id=67
#2
09/18/2006 (7:56 am)
Look for the source to Con::expandScriptFilename(). That, coupled with a call to getcwd() (or ::GetCurrentDirectory()) ought to get you where you want to go.
#3
Enough to get into the data directories to retrieve files. I am hoping the data directories will be relative to where the executable is at.
JW,
I will check those out.
Thanks
09/18/2006 (6:12 pm)
Ben,Enough to get into the data directories to retrieve files. I am hoping the data directories will be relative to where the executable is at.
JW,
I will check those out.
Thanks
#4
09/18/2006 (7:20 pm)
In that case, expandScriptFilename is what you want. The resource manager also has some helper functions on it that could be useful to you.
Associate Kyle Carter