mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
Parametrize script extension, default to 'tscript'
This commit is contained in:
parent
b8b62292bd
commit
099dd4f1f3
542 changed files with 774 additions and 783 deletions
|
|
@ -2630,7 +2630,7 @@ Torque::Path AssetImporter::importMaterialAsset(AssetImportObject* assetItem)
|
||||||
StringTableEntry assetName = StringTable->insert(assetItem->assetName.c_str());
|
StringTableEntry assetName = StringTable->insert(assetItem->assetName.c_str());
|
||||||
|
|
||||||
String tamlPath = targetPath + "/" + assetName + ".asset.taml";
|
String tamlPath = targetPath + "/" + assetName + ".asset.taml";
|
||||||
String scriptName = assetItem->assetName + ".cs";
|
String scriptName = assetItem->assetName + "." TORQUE_SCRIPT_EXTENSION;
|
||||||
String scriptPath = targetPath + "/" + scriptName;
|
String scriptPath = targetPath + "/" + scriptName;
|
||||||
String originalPath = assetItem->filePath.getFullPath().c_str();
|
String originalPath = assetItem->filePath.getFullPath().c_str();
|
||||||
|
|
||||||
|
|
@ -2717,7 +2717,7 @@ Torque::Path AssetImporter::importMaterialAsset(AssetImportObject* assetItem)
|
||||||
|
|
||||||
//Now write the script file containing our material out
|
//Now write the script file containing our material out
|
||||||
//There's 2 ways to do this. If we're in-place importing an existing asset, we can see if the definition existed already, like in an old
|
//There's 2 ways to do this. If we're in-place importing an existing asset, we can see if the definition existed already, like in an old
|
||||||
//materials.cs file. if it does, we can just find the object by name, and save it out to our new file
|
//materials.tscript file. if it does, we can just find the object by name, and save it out to our new file
|
||||||
//If not, we'll just generate one
|
//If not, we'll just generate one
|
||||||
Material* existingMat = MATMGR->getMaterialDefinitionByName(assetName);
|
Material* existingMat = MATMGR->getMaterialDefinitionByName(assetName);
|
||||||
|
|
||||||
|
|
@ -2878,10 +2878,10 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem)
|
||||||
|
|
||||||
String shapeFileName = assetItem->filePath.getFileName() + "." + assetItem->filePath.getExtension();
|
String shapeFileName = assetItem->filePath.getFileName() + "." + assetItem->filePath.getExtension();
|
||||||
String assetPath = targetPath + "/" + shapeFileName;
|
String assetPath = targetPath + "/" + shapeFileName;
|
||||||
String constructorPath = targetPath + "/" + assetItem->filePath.getFileName() + ".cs";
|
String constructorPath = targetPath + "/" + assetItem->filePath.getFileName() + "." TORQUE_SCRIPT_EXTENSION;
|
||||||
String tamlPath = targetPath + "/" + assetName + ".asset.taml";
|
String tamlPath = targetPath + "/" + assetName + ".asset.taml";
|
||||||
String originalPath = assetItem->filePath.getFullPath().c_str();
|
String originalPath = assetItem->filePath.getFullPath().c_str();
|
||||||
String originalConstructorPath = assetItem->filePath.getPath() + "/" + assetItem->filePath.getFileName() + ".cs";
|
String originalConstructorPath = assetItem->filePath.getPath() + "/" + assetItem->filePath.getFileName() + "." TORQUE_SCRIPT_EXTENSION;
|
||||||
|
|
||||||
char qualifiedFromFile[2048];
|
char qualifiedFromFile[2048];
|
||||||
char qualifiedToFile[2048];
|
char qualifiedToFile[2048];
|
||||||
|
|
|
||||||
|
|
@ -87,13 +87,13 @@ GFXImplementVertexFormat( GFXVertexFoliage )
|
||||||
//
|
//
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Put this in /example/common/editor/EditorGui.cs in [function Creator::init( %this )]
|
// Put this in /example/common/editor/EditorGui.tscript in [function Creator::init( %this )]
|
||||||
//
|
//
|
||||||
// %Environment_Item[8] = "fxFoliageReplicator"; <-- ADD THIS.
|
// %Environment_Item[8] = "fxFoliageReplicator"; <-- ADD THIS.
|
||||||
//
|
//
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Put this in /example/common/client/missionDownload.cs in [function clientCmdMissionStartPhase3(%seq,%missionName)] (line 65)
|
// Put this in /example/common/client/missionDownload.tscript in [function clientCmdMissionStartPhase3(%seq,%missionName)] (line 65)
|
||||||
// after codeline 'onPhase2Complete();'.
|
// after codeline 'onPhase2Complete();'.
|
||||||
//
|
//
|
||||||
// StartFoliageReplication();
|
// StartFoliageReplication();
|
||||||
|
|
|
||||||
|
|
@ -37,14 +37,14 @@
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Put this in /example/common/editor/editor.cs in function [Editor::create()] (around line 66).
|
// Put this in /example/common/editor/editor.tscript in function [Editor::create()] (around line 66).
|
||||||
//
|
//
|
||||||
// // Ignore Replicated fxStatic Instances.
|
// // Ignore Replicated fxStatic Instances.
|
||||||
// EWorldEditor.ignoreObjClass("fxShapeReplicatedStatic");
|
// EWorldEditor.ignoreObjClass("fxShapeReplicatedStatic");
|
||||||
//
|
//
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Put this in /example/common/editor/EditorGui.cs in [function Creator::init( %this )]
|
// Put this in /example/common/editor/EditorGui.tscript in [function Creator::init( %this )]
|
||||||
//
|
//
|
||||||
// %Environment_Item[8] = "fxShapeReplicator"; <-- ADD THIS.
|
// %Environment_Item[8] = "fxShapeReplicator"; <-- ADD THIS.
|
||||||
//
|
//
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
//
|
//
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Put this in /example/common/client/missionDownload.cs in [function clientCmdMissionStartPhase3(%seq,%missionName)] (line 65)
|
// Put this in /example/common/client/missionDownload.tscript in [function clientCmdMissionStartPhase3(%seq,%missionName)] (line 65)
|
||||||
// after codeline 'onPhase2Complete();'.
|
// after codeline 'onPhase2Complete();'.
|
||||||
//
|
//
|
||||||
// StartClientReplication();
|
// StartClientReplication();
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,8 @@ struct AuthInfo;
|
||||||
|
|
||||||
// To disable datablock caching, remove or comment out the AFX_CAP_DATABLOCK_CACHE define below.
|
// To disable datablock caching, remove or comment out the AFX_CAP_DATABLOCK_CACHE define below.
|
||||||
// Also, at a minimum, the following script preferences should be set to false:
|
// Also, at a minimum, the following script preferences should be set to false:
|
||||||
// $pref::Client::EnableDatablockCache = false; (in arcane.fx/client/defaults.cs)
|
// $pref::Client::EnableDatablockCache = false; (in arcane.fx/client/defaults.tscript)
|
||||||
// $Pref::Server::EnableDatablockCache = false; (in arcane.fx/server/defaults.cs)
|
// $Pref::Server::EnableDatablockCache = false; (in arcane.fx/server/defaults.tscript)
|
||||||
// Alternatively, all script code marked with "DATABLOCK CACHE CODE" can be removed or
|
// Alternatively, all script code marked with "DATABLOCK CACHE CODE" can be removed or
|
||||||
// commented out.
|
// commented out.
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ ConsoleDocClass( LightFlareData,
|
||||||
"as a 2D sprite in screenspace.\n\n"
|
"as a 2D sprite in screenspace.\n\n"
|
||||||
|
|
||||||
"@tsexample\n"
|
"@tsexample\n"
|
||||||
"// example from Full Template, core/art/datablocks/lights.cs\n"
|
"// example from Full Template, core/art/datablocks/lights." TORQUE_SCRIPT_EXTENSION "\n"
|
||||||
"datablock LightFlareData( LightFlareExample0 )\n"
|
"datablock LightFlareData( LightFlareExample0 )\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" overallScale = 2.0;\n"
|
" overallScale = 2.0;\n"
|
||||||
|
|
@ -676,4 +676,4 @@ DefineEngineMethod( LightFlareData, apply, void, (),,
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
object->inspectPostApply();
|
object->inspectPostApply();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -294,7 +294,7 @@ DefineEngineStaticMethod( BanList, export, void, ( const char* filename ),,
|
||||||
"Dump the banlist to a file.\n\n"
|
"Dump the banlist to a file.\n\n"
|
||||||
"@param filename Path of the file to write the list to.\n\n"
|
"@param filename Path of the file to write the list to.\n\n"
|
||||||
"@tsexample\n"
|
"@tsexample\n"
|
||||||
"BanList::Export(\"./server/banlist.cs\");\n"
|
"BanList::Export(\"./server/banlist." TORQUE_SCRIPT_EXTENSION "\");\n"
|
||||||
"@endtsexample\n\n")
|
"@endtsexample\n\n")
|
||||||
{
|
{
|
||||||
BanList::instance()->exportToFile( filename );
|
BanList::instance()->exportToFile( filename );
|
||||||
|
|
|
||||||
|
|
@ -436,7 +436,7 @@ bool StandardMainLoop::handleCommandLine( S32 argc, const char **argv )
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Executes an entry script file. This is "main.cs"
|
// Executes an entry script file. This is "main.tscript"
|
||||||
// by default, but any file name (with no whitespace
|
// by default, but any file name (with no whitespace
|
||||||
// in it) may be run if it is specified as the first
|
// in it) may be run if it is specified as the first
|
||||||
// command-line parameter. The script used, default
|
// command-line parameter. The script used, default
|
||||||
|
|
@ -459,7 +459,7 @@ bool StandardMainLoop::handleCommandLine( S32 argc, const char **argv )
|
||||||
// The working filestream.
|
// The working filestream.
|
||||||
FileStream str;
|
FileStream str;
|
||||||
|
|
||||||
const char *defaultScriptName = "main.cs";
|
const char *defaultScriptName = "main." TORQUE_SCRIPT_EXTENSION;
|
||||||
bool useDefaultScript = true;
|
bool useDefaultScript = true;
|
||||||
|
|
||||||
// Check if any command-line parameters were passed (the first is just the app name).
|
// Check if any command-line parameters were passed (the first is just the app name).
|
||||||
|
|
@ -493,14 +493,14 @@ bool StandardMainLoop::handleCommandLine( S32 argc, const char **argv )
|
||||||
{
|
{
|
||||||
OpenFileDialog ofd;
|
OpenFileDialog ofd;
|
||||||
FileDialogData &fdd = ofd.getData();
|
FileDialogData &fdd = ofd.getData();
|
||||||
fdd.mFilters = StringTable->insert("Main Entry Script (main.cs)|main.cs|");
|
fdd.mFilters = StringTable->insert("Main Entry Script (main." TORQUE_SCRIPT_EXTENSION ")|main." TORQUE_SCRIPT_EXTENSION "|");
|
||||||
fdd.mTitle = StringTable->insert("Locate Game Entry Script");
|
fdd.mTitle = StringTable->insert("Locate Game Entry Script");
|
||||||
|
|
||||||
// Get the user's selection
|
// Get the user's selection
|
||||||
if( !ofd.Execute() )
|
if( !ofd.Execute() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Process and update CWD so we can run the selected main.cs
|
// Process and update CWD so we can run the selected main.tscript
|
||||||
S32 pathLen = dStrlen( fdd.mFile );
|
S32 pathLen = dStrlen( fdd.mFile );
|
||||||
FrameTemp<char> szPathCopy( pathLen + 1);
|
FrameTemp<char> szPathCopy( pathLen + 1);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ public:
|
||||||
/// Initialize core libraries and call registered init functions
|
/// Initialize core libraries and call registered init functions
|
||||||
static void init();
|
static void init();
|
||||||
|
|
||||||
/// Pass command line arguments to registered functions and main.cs
|
/// Pass command line arguments to registered functions and main.tscript
|
||||||
static bool handleCommandLine(S32 argc, const char **argv);
|
static bool handleCommandLine(S32 argc, const char **argv);
|
||||||
|
|
||||||
/// A standard mainloop implementation.
|
/// A standard mainloop implementation.
|
||||||
|
|
@ -53,4 +53,4 @@ private:
|
||||||
static void preShutdown();
|
static void preShutdown();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -220,7 +220,7 @@ DefineEngineStringlyVariadicFunction( commandToServer, void, 2, RemoteCommandEve
|
||||||
|
|
||||||
"@tsexample\n"
|
"@tsexample\n"
|
||||||
"// Create a standard function. Needs to be executed on the client, such \n"
|
"// Create a standard function. Needs to be executed on the client, such \n"
|
||||||
"// as within scripts/client/default.bind.cs\n"
|
"// as within scripts/client/default.bind." TORQUE_SCRIPT_EXTENSION "\n"
|
||||||
"function toggleCamera(%val)\n"
|
"function toggleCamera(%val)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" // If key was down, call a server command named 'ToggleCamera'\n"
|
" // If key was down, call a server command named 'ToggleCamera'\n"
|
||||||
|
|
@ -228,7 +228,7 @@ DefineEngineStringlyVariadicFunction( commandToServer, void, 2, RemoteCommandEve
|
||||||
" commandToServer('ToggleCamera');\n"
|
" commandToServer('ToggleCamera');\n"
|
||||||
"}\n\n"
|
"}\n\n"
|
||||||
"// Server command being called from above. Needs to be executed on the \n"
|
"// Server command being called from above. Needs to be executed on the \n"
|
||||||
"// server, such as within scripts/server/commands.cs\n"
|
"// server, such as within scripts/server/commands." TORQUE_SCRIPT_EXTENSION "\n"
|
||||||
"function serverCmdToggleCamera(%client)\n"
|
"function serverCmdToggleCamera(%client)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" if (%client.getControlObject() == %client.player)\n"
|
" if (%client.getControlObject() == %client.player)\n"
|
||||||
|
|
@ -264,7 +264,7 @@ DefineEngineStringlyVariadicFunction( commandToClient, void, 3, RemoteCommandEve
|
||||||
|
|
||||||
"@tsexample\n"
|
"@tsexample\n"
|
||||||
"// Set up the client command. Needs to be executed on the client, such as\n"
|
"// Set up the client command. Needs to be executed on the client, such as\n"
|
||||||
"// within scripts/client/client.cs\n"
|
"// within scripts/client/client." TORQUE_SCRIPT_EXTENSION "\n"
|
||||||
"// Update the Ammo Counter with current ammo, if not any then hide the counter.\n"
|
"// Update the Ammo Counter with current ammo, if not any then hide the counter.\n"
|
||||||
"function clientCmdSetAmmoAmountHud(%amount)\n"
|
"function clientCmdSetAmmoAmountHud(%amount)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
|
|
@ -277,7 +277,7 @@ DefineEngineStringlyVariadicFunction( commandToClient, void, 3, RemoteCommandEve
|
||||||
" }\n"
|
" }\n"
|
||||||
"}\n\n"
|
"}\n\n"
|
||||||
"// Call it from a server function. Needs to be executed on the server, \n"
|
"// Call it from a server function. Needs to be executed on the server, \n"
|
||||||
"//such as within scripts/server/game.cs\n"
|
"//such as within scripts/server/game." TORQUE_SCRIPT_EXTENSION "\n"
|
||||||
"function GameConnection::setAmmoAmountHud(%client, %amount)\n"
|
"function GameConnection::setAmmoAmountHud(%client, %amount)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" commandToClient(%client, 'SetAmmoAmountHud', %amount);\n"
|
" commandToClient(%client, 'SetAmmoAmountHud', %amount);\n"
|
||||||
|
|
|
||||||
|
|
@ -323,7 +323,7 @@ void init()
|
||||||
ConsoleConstructor::setup();
|
ConsoleConstructor::setup();
|
||||||
|
|
||||||
// Set up the parser(s)
|
// Set up the parser(s)
|
||||||
CON_ADD_PARSER(CMD, "cs", true); // TorqueScript
|
CON_ADD_PARSER(CMD, TORQUE_SCRIPT_EXTENSION, true); // TorqueScript
|
||||||
|
|
||||||
// Setup the console types.
|
// Setup the console types.
|
||||||
ConsoleBaseType::initialize();
|
ConsoleBaseType::initialize();
|
||||||
|
|
@ -1184,7 +1184,7 @@ bool executeFile(const char* fileName, bool noCalls, bool journalScript)
|
||||||
Con::expandScriptFilename(scriptFilenameBuffer, sizeof(scriptFilenameBuffer), fileName);
|
Con::expandScriptFilename(scriptFilenameBuffer, sizeof(scriptFilenameBuffer), fileName);
|
||||||
|
|
||||||
// since this function expects a script file reference, if it's a .dso
|
// since this function expects a script file reference, if it's a .dso
|
||||||
// lets terminate the string before the dso so it will act like a .cs
|
// lets terminate the string before the dso so it will act like a .tscript
|
||||||
if (dStrEndsWith(scriptFilenameBuffer, ".dso"))
|
if (dStrEndsWith(scriptFilenameBuffer, ".dso"))
|
||||||
{
|
{
|
||||||
scriptFilenameBuffer[dStrlen(scriptFilenameBuffer) - dStrlen(".dso")] = '\0';
|
scriptFilenameBuffer[dStrlen(scriptFilenameBuffer) - dStrlen(".dso")] = '\0';
|
||||||
|
|
@ -1206,11 +1206,11 @@ bool executeFile(const char* fileName, bool noCalls, bool journalScript)
|
||||||
// Check Editor Extensions
|
// Check Editor Extensions
|
||||||
bool isEditorScript = false;
|
bool isEditorScript = false;
|
||||||
|
|
||||||
// If the script file extension is '.ed.cs' then compile it to a different compiled extension
|
// If the script file extension is '.ed.tscript' then compile it to a different compiled extension
|
||||||
if (dStricmp(ext, ".cs") == 0)
|
if (dStricmp(ext, "." TORQUE_SCRIPT_EXTENSION) == 0)
|
||||||
{
|
{
|
||||||
const char* ext2 = ext - 3;
|
const char* ext2 = ext - 3;
|
||||||
if (dStricmp(ext2, ".ed.cs") == 0)
|
if (dStricmp(ext2, ".ed." TORQUE_SCRIPT_EXTENSION) == 0)
|
||||||
isEditorScript = true;
|
isEditorScript = true;
|
||||||
}
|
}
|
||||||
else if (dStricmp(ext, ".gui") == 0)
|
else if (dStricmp(ext, ".gui") == 0)
|
||||||
|
|
|
||||||
|
|
@ -468,11 +468,11 @@ namespace Con
|
||||||
/// This is used in (among other places) the exec() script function, which
|
/// This is used in (among other places) the exec() script function, which
|
||||||
/// takes a parameter indicating a script file and executes it. Script paths
|
/// takes a parameter indicating a script file and executes it. Script paths
|
||||||
/// can be one of:
|
/// can be one of:
|
||||||
/// - <b>Absolute:</b> <i>fps/foo/bar.cs</i> Paths of this sort are passed
|
/// - <b>Absolute:</b> <i>fps/foo/bar.tscript</i> Paths of this sort are passed
|
||||||
/// through.
|
/// through.
|
||||||
/// - <b>Mod-relative:</b> <i>~/foo/bar.cs</i> Paths of this sort have their
|
/// - <b>Mod-relative:</b> <i>~/foo/bar.tscript</i> Paths of this sort have their
|
||||||
/// replaced with the name of the current mod.
|
/// replaced with the name of the current mod.
|
||||||
/// - <b>File-relative:</b> <i>./baz/blip.cs</i> Paths of this sort are
|
/// - <b>File-relative:</b> <i>./baz/blip.tscript</i> Paths of this sort are
|
||||||
/// calculated relative to the path of the current scripting file.
|
/// calculated relative to the path of the current scripting file.
|
||||||
///
|
///
|
||||||
/// @note This function determines paths relative to the currently executing
|
/// @note This function determines paths relative to the currently executing
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
/// setName() - obj.setName(newName)
|
/// setName() - obj.setName(newName)
|
||||||
/// @endcode
|
/// @endcode
|
||||||
///
|
///
|
||||||
/// In the Torque example app, there are two functions defined in common\\client\\scriptDoc.cs
|
/// In the Torque example app, there are two functions defined in common\\client\\scriptDoc.tscript
|
||||||
/// which automate the process of dumping the documentation. They make use of the ConsoleLogger
|
/// which automate the process of dumping the documentation. They make use of the ConsoleLogger
|
||||||
/// object to output the documentation to a file, and look like this:
|
/// object to output the documentation to a file, and look like this:
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -787,7 +787,7 @@ DefineEngineFunction( strIsMatchMultipleExpr, bool, ( const char* patterns, cons
|
||||||
"this string. If false, differences in casing are ignored.\n"
|
"this string. If false, differences in casing are ignored.\n"
|
||||||
"@return True if @a str matches any of the given @a patterns.\n\n"
|
"@return True if @a str matches any of the given @a patterns.\n\n"
|
||||||
"@tsexample\n"
|
"@tsexample\n"
|
||||||
"strIsMatchMultipleExpr( \"*.cs *.gui *.mis\", \"mymission.mis\" ) // Returns true.\n"
|
"strIsMatchMultipleExpr( \"*." TORQUE_SCRIPT_EXTENSION " *.gui *.mis\", \"mymission.mis\" ) // Returns true.\n"
|
||||||
"@endtsexample\n"
|
"@endtsexample\n"
|
||||||
"@see strIsMatchExpr\n"
|
"@see strIsMatchExpr\n"
|
||||||
"@ingroup Strings" )
|
"@ingroup Strings" )
|
||||||
|
|
@ -1200,7 +1200,7 @@ DefineEngineFunction( isValidIP, bool, ( const char* str),,
|
||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
|
||||||
// Torque won't normally add another string if it already exists with another casing,
|
// Torque won't normally add another string if it already exists with another casing,
|
||||||
// so this forces the addition. It should be called once near the start, such as in main.cs.
|
// so this forces the addition. It should be called once near the start, such as in main.tscript.
|
||||||
DefineEngineStringlyVariadicFunction(addCaseSensitiveStrings,void,2,0,"[string1, string2, ...]"
|
DefineEngineStringlyVariadicFunction(addCaseSensitiveStrings,void,2,0,"[string1, string2, ...]"
|
||||||
"Adds case sensitive strings to the StringTable.")
|
"Adds case sensitive strings to the StringTable.")
|
||||||
{
|
{
|
||||||
|
|
@ -1810,7 +1810,7 @@ DefineEngineFunction( detag, const char*, ( const char* str ),,
|
||||||
"to convert a tagged string ID back into a regular string at any time.\n\n"
|
"to convert a tagged string ID back into a regular string at any time.\n\n"
|
||||||
|
|
||||||
"@tsexample\n"
|
"@tsexample\n"
|
||||||
"// From scripts/client/message.cs\n"
|
"// From scripts/client/message. " TORQUE_SCRIPT_EXTENSION "\n"
|
||||||
"function clientCmdChatMessage(%sender, %voice, %pitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10)\n"
|
"function clientCmdChatMessage(%sender, %voice, %pitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" onChatMessage(detag(%msgString), %voice, %pitch);\n"
|
" onChatMessage(detag(%msgString), %voice, %pitch);\n"
|
||||||
|
|
@ -2262,7 +2262,7 @@ static U32 journalDepth = 1;
|
||||||
|
|
||||||
DefineEngineFunction( getDSOPath, const char*, ( const char* scriptFileName ),,
|
DefineEngineFunction( getDSOPath, const char*, ( const char* scriptFileName ),,
|
||||||
"Get the absolute path to the file in which the compiled code for the given script file will be stored.\n"
|
"Get the absolute path to the file in which the compiled code for the given script file will be stored.\n"
|
||||||
"@param scriptFileName %Path to the .cs script file.\n"
|
"@param scriptFileName %Path to the ." TORQUE_SCRIPT_EXTENSION " script file.\n"
|
||||||
"@return The absolute path to the .dso file for the given script file.\n\n"
|
"@return The absolute path to the .dso file for the given script file.\n\n"
|
||||||
"@note The compiler will store newly compiled DSOs in the prefs path but pre-existing DSOs will be loaded "
|
"@note The compiler will store newly compiled DSOs in the prefs path but pre-existing DSOs will be loaded "
|
||||||
"from the current paths.\n\n"
|
"from the current paths.\n\n"
|
||||||
|
|
@ -2303,13 +2303,13 @@ DefineEngineFunction( compile, bool, ( const char* fileName, bool overrideNoDSO
|
||||||
if(dsoPath && *dsoPath == 0)
|
if(dsoPath && *dsoPath == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// If the script file extention is '.ed.cs' then compile it to a different compiled extention
|
// If the script file extention is '.ed.tscript' then compile it to a different compiled extention
|
||||||
bool isEditorScript = false;
|
bool isEditorScript = false;
|
||||||
const char *ext = dStrrchr( scriptFilenameBuffer, '.' );
|
const char *ext = dStrrchr( scriptFilenameBuffer, '.' );
|
||||||
if( ext && ( dStricmp( ext, ".cs" ) == 0 ) )
|
if( ext && ( dStricmp( ext, "." TORQUE_SCRIPT_EXTENSION) == 0 ) )
|
||||||
{
|
{
|
||||||
const char* ext2 = ext - 3;
|
const char* ext2 = ext - 3;
|
||||||
if( dStricmp( ext2, ".ed.cs" ) == 0 )
|
if( dStricmp( ext2, ".ed." TORQUE_SCRIPT_EXTENSION) == 0 )
|
||||||
isEditorScript = true;
|
isEditorScript = true;
|
||||||
}
|
}
|
||||||
else if( ext && ( dStricmp( ext, ".gui" ) == 0 ) )
|
else if( ext && ( dStricmp( ext, ".gui" ) == 0 ) )
|
||||||
|
|
@ -2364,8 +2364,8 @@ DefineEngineFunction( exec, bool, ( const char* fileName, bool noCalls, bool jou
|
||||||
"@param journalScript Deprecated\n"
|
"@param journalScript Deprecated\n"
|
||||||
"@return True if the script was successfully executed, false if not.\n\n"
|
"@return True if the script was successfully executed, false if not.\n\n"
|
||||||
"@tsexample\n"
|
"@tsexample\n"
|
||||||
"// Execute the init.cs script file found in the same directory as the current script file.\n"
|
"// Execute the init." TORQUE_SCRIPT_EXTENSION " script file found in the same directory as the current script file.\n"
|
||||||
"exec( \"./init.cs\" );\n"
|
"exec( \"./init." TORQUE_SCRIPT_EXTENSION "\" );\n"
|
||||||
"@endtsexample\n\n"
|
"@endtsexample\n\n"
|
||||||
"@see compile\n"
|
"@see compile\n"
|
||||||
"@see eval\n"
|
"@see eval\n"
|
||||||
|
|
@ -2684,8 +2684,8 @@ DefineEngineFunction( export, void, ( const char* pattern, const char* filename,
|
||||||
"@param append If true and @a fileName is not \"\", then the definitions are appended to the specified file. "
|
"@param append If true and @a fileName is not \"\", then the definitions are appended to the specified file. "
|
||||||
"Otherwise existing contents of the file (if any) will be overwritten.\n\n"
|
"Otherwise existing contents of the file (if any) will be overwritten.\n\n"
|
||||||
"@tsexample\n"
|
"@tsexample\n"
|
||||||
"// Write out all preference variables to a prefs.cs file.\n"
|
"// Write out all preference variables to a prefs." TORQUE_SCRIPT_EXTENSION " file.\n"
|
||||||
"export( \"$prefs::*\", \"prefs.cs\" );\n"
|
"export( \"$prefs::*\", \"prefs." TORQUE_SCRIPT_EXTENSION "\" );\n"
|
||||||
"@endtsexample\n\n"
|
"@endtsexample\n\n"
|
||||||
"@ingroup Scripting" )
|
"@ingroup Scripting" )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ void freeConsoleParserList(void);
|
||||||
/// \param p Parse function
|
/// \param p Parse function
|
||||||
/// \param r Restart function
|
/// \param r Restart function
|
||||||
/// \param ssb SetScanBuffer function
|
/// \param ssb SetScanBuffer function
|
||||||
/// \param def true if this is the default parser (<b>Note:</b> set this only on the .cs parser!)
|
/// \param def true if this is the default parser (<b>Note:</b> set this only on the .tscript parser!)
|
||||||
/// \return true for success, false for failure (out of memory)
|
/// \return true for success, false for failure (out of memory)
|
||||||
/// \sa FreeConsoleParserList(), ConsoleParser
|
/// \sa FreeConsoleParserList(), ConsoleParser
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -156,8 +156,8 @@ DefineEngineFunction( findFirstFile, String, ( const char* pattern, bool recurse
|
||||||
"@return The path of the first file matched by the search or an empty string if no matching file could be found.\n\n"
|
"@return The path of the first file matched by the search or an empty string if no matching file could be found.\n\n"
|
||||||
|
|
||||||
"@tsexample\n"
|
"@tsexample\n"
|
||||||
"// Execute all .cs files in a subdirectory and its subdirectories.\n"
|
"// Execute all ." TORQUE_SCRIPT_EXTENSION " files in a subdirectory and its subdirectories.\n"
|
||||||
"for( %file = findFirstFile( \"subdirectory/*.cs\" ); %file !$= \"\"; %file = findNextFile() )\n"
|
"for( %file = findFirstFile( \"subdirectory/*." TORQUE_SCRIPT_EXTENSION "\" ); %file !$= \"\"; %file = findNextFile() )\n"
|
||||||
" exec( %file );\n"
|
" exec( %file );\n"
|
||||||
"@endtsexample\n\n"
|
"@endtsexample\n\n"
|
||||||
|
|
||||||
|
|
@ -193,8 +193,8 @@ DefineEngineFunction( findNextFile, String, ( const char* pattern ), ( "" ),
|
||||||
"@return The path of the next filename matched by the search or an empty string if no more files match.\n\n"
|
"@return The path of the next filename matched by the search or an empty string if no more files match.\n\n"
|
||||||
|
|
||||||
"@tsexample\n"
|
"@tsexample\n"
|
||||||
"// Execute all .cs files in a subdirectory and its subdirectories.\n"
|
"// Execute all ." TORQUE_SCRIPT_EXTENSION " files in a subdirectory and its subdirectories.\n"
|
||||||
"for( %file = findFirstFile( \"subdirectory/*.cs\" ); %file !$= \"\"; %file = findNextFile() )\n"
|
"for( %file = findFirstFile( \"subdirectory/*." TORQUE_SCRIPT_EXTENSION "\" ); %file !$= \"\"; %file = findNextFile() )\n"
|
||||||
" exec( %file );\n"
|
" exec( %file );\n"
|
||||||
"@endtsexample\n\n"
|
"@endtsexample\n\n"
|
||||||
|
|
||||||
|
|
@ -224,8 +224,8 @@ DefineEngineFunction( getFileCount, S32, ( const char* pattern, bool recurse ),
|
||||||
"@return Number of files located using the pattern\n\n"
|
"@return Number of files located using the pattern\n\n"
|
||||||
|
|
||||||
"@tsexample\n"
|
"@tsexample\n"
|
||||||
"// Count the number of .cs files in a subdirectory and its subdirectories.\n"
|
"// Count the number of ." TORQUE_SCRIPT_EXTENSION " files in a subdirectory and its subdirectories.\n"
|
||||||
"getFileCount( \"subdirectory/*.cs\" );\n"
|
"getFileCount( \"subdirectory/*." TORQUE_SCRIPT_EXTENSION "\" );\n"
|
||||||
"@endtsexample\n\n"
|
"@endtsexample\n\n"
|
||||||
|
|
||||||
"@see findFirstFile()"
|
"@see findFirstFile()"
|
||||||
|
|
@ -259,8 +259,8 @@ DefineEngineFunction(findFirstFileMultiExpr, String, ( const char* pattern, bool
|
||||||
"call to findFirstFile() and findFirstFileMultiExpr() initiates a new search and renders "
|
"call to findFirstFile() and findFirstFileMultiExpr() initiates a new search and renders "
|
||||||
"a previous search invalid.\n\n"
|
"a previous search invalid.\n\n"
|
||||||
|
|
||||||
"@param pattern The path and file name pattern to match against, such as *.cs. Separate "
|
"@param pattern The path and file name pattern to match against, such as *." TORQUE_SCRIPT_EXTENSION ". Separate "
|
||||||
"multiple patterns with TABs. For example: \"*.cs\" TAB \"*.dso\"\n"
|
"multiple patterns with TABs. For example: \"*." TORQUE_SCRIPT_EXTENSION "\" TAB \"*.dso\"\n"
|
||||||
"@param recurse If true, the search will exhaustively recurse into subdirectories "
|
"@param recurse If true, the search will exhaustively recurse into subdirectories "
|
||||||
"of the given path and match the given filename patterns.\n"
|
"of the given path and match the given filename patterns.\n"
|
||||||
"@return String of the first matching file path, or an empty string if no matching "
|
"@return String of the first matching file path, or an empty string if no matching "
|
||||||
|
|
@ -333,8 +333,8 @@ DefineEngineFunction(getFileCountMultiExpr, S32, ( const char* pattern, bool rec
|
||||||
"If you're interested in a list of files that match the given patterns and not just "
|
"If you're interested in a list of files that match the given patterns and not just "
|
||||||
"the number of files, use findFirstFileMultiExpr() and findNextFileMultiExpr().\n\n"
|
"the number of files, use findFirstFileMultiExpr() and findNextFileMultiExpr().\n\n"
|
||||||
|
|
||||||
"@param pattern The path and file name pattern to match against, such as *.cs. Separate "
|
"@param pattern The path and file name pattern to match against, such as *." TORQUE_SCRIPT_EXTENSION ". Separate "
|
||||||
"multiple patterns with TABs. For example: \"*.cs\" TAB \"*.dso\"\n"
|
"multiple patterns with TABs. For example: \"*." TORQUE_SCRIPT_EXTENSION "\" TAB \"*.dso\"\n"
|
||||||
"@param recurse If true, the search will exhaustively recurse into subdirectories "
|
"@param recurse If true, the search will exhaustively recurse into subdirectories "
|
||||||
"of the given path and match the given filename pattern.\n"
|
"of the given path and match the given filename pattern.\n"
|
||||||
"@return Number of files located using the patterns\n\n"
|
"@return Number of files located using the patterns\n\n"
|
||||||
|
|
@ -589,7 +589,7 @@ DefineEngineFunction(fileExt, String, ( const char* fileName ),,
|
||||||
"@brief Get the extension of a file\n\n"
|
"@brief Get the extension of a file\n\n"
|
||||||
|
|
||||||
"@param fileName Name and path of file\n"
|
"@param fileName Name and path of file\n"
|
||||||
"@return String containing the extension, such as \".exe\" or \".cs\"\n"
|
"@return String containing the extension, such as \".exe\" or \"." TORQUE_SCRIPT_EXTENSION "\"\n"
|
||||||
"@ingroup FileSystem")
|
"@ingroup FileSystem")
|
||||||
{
|
{
|
||||||
const char *ret = dStrrchr(fileName, '.');
|
const char *ret = dStrrchr(fileName, '.');
|
||||||
|
|
@ -744,7 +744,7 @@ DefineEngineFunction(getExecutableName, String, (),,
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
DefineEngineFunction( getMainDotCsDir, String, (),,
|
DefineEngineFunction( getMainDotCsDir, String, (),,
|
||||||
"@brief Get the absolute path to the directory that contains the main.cs script from which the engine was started.\n\n"
|
"@brief Get the absolute path to the directory that contains the main." TORQUE_SCRIPT_EXTENSION " script from which the engine was started.\n\n"
|
||||||
|
|
||||||
"This directory will usually contain all the game assets and, in a user-side game installation, will usually be "
|
"This directory will usually contain all the game assets and, in a user-side game installation, will usually be "
|
||||||
"read-only.\n\n"
|
"read-only.\n\n"
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ class CodeBlock;
|
||||||
/// To use the debugger, use dbgSetParameters(port, password); in the console
|
/// To use the debugger, use dbgSetParameters(port, password); in the console
|
||||||
/// of the server to enable debugger connections. Then on some other system,
|
/// of the server to enable debugger connections. Then on some other system,
|
||||||
/// start up the app (you don't have to start a game or connect to the
|
/// start up the app (you don't have to start a game or connect to the
|
||||||
/// server) and exec("common/debugger/debugger.cs"); in the console. Then use
|
/// server) and exec("common/debugger/debugger.tscript"); in the console. Then use
|
||||||
/// the debugger GUI to connect to the server with the right port and password.
|
/// the debugger GUI to connect to the server with the right port and password.
|
||||||
///
|
///
|
||||||
/// @see http://www.planettribes.com/tribes2/editing.shtml for more thorough discussion.
|
/// @see http://www.planettribes.com/tribes2/editing.shtml for more thorough discussion.
|
||||||
|
|
|
||||||
|
|
@ -409,7 +409,7 @@ FileNodeRef ZipFileSystem::resolve(const Path& path)
|
||||||
// If a zip file's name isn't the root of the path we're looking for
|
// If a zip file's name isn't the root of the path we're looking for
|
||||||
// then do not continue. Otherwise, we'll continue to look for the
|
// then do not continue. Otherwise, we'll continue to look for the
|
||||||
// path's root within the zip file itself. i.e. we're looking for the
|
// path's root within the zip file itself. i.e. we're looking for the
|
||||||
// path "scripts/test.cs". If the zip file itself isn't called scripts.zip
|
// path "scripts/test.tscript". If the zip file itself isn't called scripts.zip
|
||||||
// then we won't look within the archive for a "scripts" directory.
|
// then we won't look within the archive for a "scripts" directory.
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -472,4 +472,4 @@ void ZipFileSystem::_init()
|
||||||
//mZipArchive->dumpCentralDirectory();
|
//mZipArchive->dumpCentralDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ namespace FS
|
||||||
/// 3) Nothing special is done for the WriteAppend case; that is, it follows the same logic as if you were
|
/// 3) Nothing special is done for the WriteAppend case; that is, it follows the same logic as if you were
|
||||||
/// just trying to Write the file.
|
/// just trying to Write the file.
|
||||||
///
|
///
|
||||||
/// Because of rule 1) above, you should take care that any files you need to write (such as prefs.cs), are not
|
/// Because of rule 1) above, you should take care that any files you need to write (such as prefs.tscript), are not
|
||||||
/// included in read-only zip archive files.
|
/// included in read-only zip archive files.
|
||||||
class VirtualMountSystem : public MountSystem
|
class VirtualMountSystem : public MountSystem
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -64,16 +64,16 @@ void GFXCardProfiler::loadProfileScript(const char* aScriptName)
|
||||||
|
|
||||||
void GFXCardProfiler::loadProfileScripts(const String& render, const String& vendor, const String& card, const String& version)
|
void GFXCardProfiler::loadProfileScripts(const String& render, const String& vendor, const String& card, const String& version)
|
||||||
{
|
{
|
||||||
String script = render + ".cs";
|
String script = render + "." TORQUE_SCRIPT_EXTENSION;
|
||||||
loadProfileScript(script);
|
loadProfileScript(script);
|
||||||
|
|
||||||
script = render + "." + vendor + ".cs";
|
script = render + "." + vendor + "." TORQUE_SCRIPT_EXTENSION;
|
||||||
loadProfileScript(script);
|
loadProfileScript(script);
|
||||||
|
|
||||||
script = render + "." + vendor + "." + card + ".cs";
|
script = render + "." + vendor + "." + card + "." TORQUE_SCRIPT_EXTENSION;
|
||||||
loadProfileScript(script);
|
loadProfileScript(script);
|
||||||
|
|
||||||
script = render + "." + vendor + "." + card + "." + version + ".cs";
|
script = render + "." + vendor + "." + card + "." + version + "." TORQUE_SCRIPT_EXTENSION;
|
||||||
loadProfileScript(script);
|
loadProfileScript(script);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ GuiFileTreeCtrl::GuiFileTreeCtrl()
|
||||||
mSupportMouseDragging = false;
|
mSupportMouseDragging = false;
|
||||||
mMultipleSelections = false;
|
mMultipleSelections = false;
|
||||||
|
|
||||||
mFileFilter = "*.cs *.gui *.ed.cs";
|
mFileFilter = "*." TORQUE_SCRIPT_EXTENSION " *.gui *.ed." TORQUE_SCRIPT_EXTENSION;
|
||||||
_initFilters();
|
_initFilters();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -111,7 +111,7 @@ void GuiFileTreeCtrl::updateTree()
|
||||||
if( !mRootPath.isEmpty() )
|
if( !mRootPath.isEmpty() )
|
||||||
rootPath = String::ToString( "%s/%s", rootPath.c_str(), mRootPath.c_str() );
|
rootPath = String::ToString( "%s/%s", rootPath.c_str(), mRootPath.c_str() );
|
||||||
|
|
||||||
// get the files in the main.cs dir
|
// get the files in the main.tscript dir
|
||||||
Vector<StringTableEntry> pathVec;
|
Vector<StringTableEntry> pathVec;
|
||||||
Platform::dumpDirectories( rootPath, pathVec, 0, true);
|
Platform::dumpDirectories( rootPath, pathVec, 0, true);
|
||||||
_dumpFiles( rootPath, pathVec, 0);
|
_dumpFiles( rootPath, pathVec, 0);
|
||||||
|
|
|
||||||
|
|
@ -510,7 +510,7 @@ bool compiledFileNeedsUpdate(UTF8* filename)
|
||||||
|
|
||||||
DefineEngineFunction(CompileLanguage, void, (const char* inputFile, bool createMap), (false),
|
DefineEngineFunction(CompileLanguage, void, (const char* inputFile, bool createMap), (false),
|
||||||
"@brief Compiles a LSO language file."
|
"@brief Compiles a LSO language file."
|
||||||
" if createIndex is true, will also create languageMap.cs with"
|
" if createIndex is true, will also create languageMap." TORQUE_SCRIPT_EXTENSION " with"
|
||||||
" the global variables for each string index."
|
" the global variables for each string index."
|
||||||
" The input file must follow this example layout:"
|
" The input file must follow this example layout:"
|
||||||
" TXT_HELLO_WORLD = Hello world in english!")
|
" TXT_HELLO_WORLD = Hello world in english!")
|
||||||
|
|
@ -538,9 +538,9 @@ DefineEngineFunction(CompileLanguage, void, (const char* inputFile, bool createM
|
||||||
{
|
{
|
||||||
Torque::Path mapPath = scriptFilenameBuffer;
|
Torque::Path mapPath = scriptFilenameBuffer;
|
||||||
mapPath.setFileName("languageMap");
|
mapPath.setFileName("languageMap");
|
||||||
mapPath.setExtension("cs");
|
mapPath.setExtension(TORQUE_SCRIPT_EXTENSION);
|
||||||
if ((mapStream = FileStream::createAndOpen(mapPath, Torque::FS::File::Write)) == NULL)
|
if ((mapStream = FileStream::createAndOpen(mapPath, Torque::FS::File::Write)) == NULL)
|
||||||
Con::errorf("CompileLanguage - failed creating languageMap.cs");
|
Con::errorf("CompileLanguage - failed creating languageMap." TORQUE_SCRIPT_EXTENSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
LangFile langFile;
|
LangFile langFile;
|
||||||
|
|
|
||||||
|
|
@ -532,7 +532,7 @@ bool Material::onAdd()
|
||||||
matSet->addObject( (SimObject*)this );
|
matSet->addObject( (SimObject*)this );
|
||||||
|
|
||||||
// save the current script path for texture lookup later
|
// save the current script path for texture lookup later
|
||||||
const String scriptFile = Con::getVariable("$Con::File"); // current script file - local materials.cs
|
const String scriptFile = Con::getVariable("$Con::File"); // current script file - local materials.tscript
|
||||||
|
|
||||||
String::SizeType slash = scriptFile.find( '/', scriptFile.length(), String::Right );
|
String::SizeType slash = scriptFile.find( '/', scriptFile.length(), String::Right );
|
||||||
if ( slash != String::NPos )
|
if ( slash != String::NPos )
|
||||||
|
|
|
||||||
|
|
@ -267,12 +267,12 @@ namespace Platform
|
||||||
/// Returns full pathname of the torque executable without filename
|
/// Returns full pathname of the torque executable without filename
|
||||||
StringTableEntry getExecutablePath();
|
StringTableEntry getExecutablePath();
|
||||||
|
|
||||||
/// Returns the full path to the directory that contains main.cs.
|
/// Returns the full path to the directory that contains main.tscript.
|
||||||
/// Tools scripts are validated as such if they are in this directory or a
|
/// Tools scripts are validated as such if they are in this directory or a
|
||||||
/// subdirectory of this directory.
|
/// subdirectory of this directory.
|
||||||
StringTableEntry getMainDotCsDir();
|
StringTableEntry getMainDotCsDir();
|
||||||
|
|
||||||
/// Set main.cs directory. Used in runEntryScript()
|
/// Set main.tscript directory. Used in runEntryScript()
|
||||||
void setMainDotCsDir(const char *dir);
|
void setMainDotCsDir(const char *dir);
|
||||||
|
|
||||||
StringTableEntry getPrefsPath(const char *file = NULL);
|
StringTableEntry getPrefsPath(const char *file = NULL);
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ ConsoleDocClass( RenderDeferredMgr,
|
||||||
"and render them to the g-buffer for use in lighting the scene and doing effects.\n\n"
|
"and render them to the g-buffer for use in lighting the scene and doing effects.\n\n"
|
||||||
"PostEffect and other shaders can access the output of this bin by using the #deferred "
|
"PostEffect and other shaders can access the output of this bin by using the #deferred "
|
||||||
"texture target name. See the edge anti-aliasing post effect for an example.\n\n"
|
"texture target name. See the edge anti-aliasing post effect for an example.\n\n"
|
||||||
"@see game/core/scripts/client/postFx/edgeAA.cs\n"
|
"@see game/core/scripts/client/postFx/edgeAA." TORQUE_SCRIPT_EXTENSION "\n"
|
||||||
"@ingroup RenderBin\n" );
|
"@ingroup RenderBin\n" );
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ ConsoleDocClass( RenderFormatToken,
|
||||||
|
|
||||||
"The RenderPassStateBin manager changes the rendering state associated with "
|
"The RenderPassStateBin manager changes the rendering state associated with "
|
||||||
"this token. In stock Torque 3D, a single example exists in the "
|
"this token. In stock Torque 3D, a single example exists in the "
|
||||||
"way of AL_FormatToken (found in renderManager.cs). In that script file, all the "
|
"way of AL_FormatToken (found in renderManager." TORQUE_SCRIPT_EXTENSION "). In that script file, all the "
|
||||||
"render managers are intialized, and a single RenderFormatToken is used. This "
|
"render managers are intialized, and a single RenderFormatToken is used. This "
|
||||||
"implementation basically exists to ensure Advanced Lighting works with MSAA.\n\n"
|
"implementation basically exists to ensure Advanced Lighting works with MSAA.\n\n"
|
||||||
|
|
||||||
|
|
@ -72,7 +72,7 @@ ConsoleDocClass( RenderFormatToken,
|
||||||
|
|
||||||
"@see RenderPassToken\n\n"
|
"@see RenderPassToken\n\n"
|
||||||
"@see RenderPassStateBin\n"
|
"@see RenderPassStateBin\n"
|
||||||
"@see game/core/scripts/client/renderManager.cs\n"
|
"@see game/core/scripts/client/renderManager." TORQUE_SCRIPT_EXTENSION "\n"
|
||||||
|
|
||||||
"@ingroup GFX\n"
|
"@ingroup GFX\n"
|
||||||
);
|
);
|
||||||
|
|
@ -381,4 +381,4 @@ void RenderFormatToken::onRemove()
|
||||||
mTarget.release();
|
mTarget.release();
|
||||||
|
|
||||||
Parent::onRemove();
|
Parent::onRemove();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ ConsoleDocClass( RenderPassManager,
|
||||||
"The render pass is used to order a set of RenderBinManager objects which are used "
|
"The render pass is used to order a set of RenderBinManager objects which are used "
|
||||||
"when rendering a scene. This class does little work itself other than managing "
|
"when rendering a scene. This class does little work itself other than managing "
|
||||||
"its list of render bins.\n\n"
|
"its list of render bins.\n\n"
|
||||||
"In 'core/scripts/client/renderManager.cs' you will find the DiffuseRenderPassManager "
|
"In 'core/scripts/client/renderManager." TORQUE_SCRIPT_EXTENSION "' you will find the DiffuseRenderPassManager "
|
||||||
"which is used by the C++ engine to render the scene.\n\n"
|
"which is used by the C++ engine to render the scene.\n\n"
|
||||||
"@see RenderBinManager\n"
|
"@see RenderBinManager\n"
|
||||||
"@ingroup RenderBin\n" );
|
"@ingroup RenderBin\n" );
|
||||||
|
|
|
||||||
|
|
@ -37,13 +37,13 @@ ConsoleDocClass( RenderPassStateToken,
|
||||||
|
|
||||||
"The RenderPassStateBin manager changes the rendering state associated with "
|
"The RenderPassStateBin manager changes the rendering state associated with "
|
||||||
"a token it is declared with. In stock Torque 3D, a single example exists in the "
|
"a token it is declared with. In stock Torque 3D, a single example exists in the "
|
||||||
"way of AL_FormatToken (found in renderManager.cs). In that script file, all the "
|
"way of AL_FormatToken (found in renderManager." TORQUE_SCRIPT_EXTENSION "). In that script file, all the "
|
||||||
"render managers are intialized, and a single RenderFormatToken is used. This "
|
"render managers are intialized, and a single RenderFormatToken is used. This "
|
||||||
"implementation basically exists to ensure Advanced Lighting works with MSAA.\n\n"
|
"implementation basically exists to ensure Advanced Lighting works with MSAA.\n\n"
|
||||||
|
|
||||||
"@see RenderFormatToken\n"
|
"@see RenderFormatToken\n"
|
||||||
"@see RenderPassStateBin\n"
|
"@see RenderPassStateBin\n"
|
||||||
"@see game/core/scripts/client/renderManager.cs\n"
|
"@see game/core/scripts/client/renderManager." TORQUE_SCRIPT_EXTENSION "\n"
|
||||||
|
|
||||||
"@ingroup RenderBin\n"
|
"@ingroup RenderBin\n"
|
||||||
);
|
);
|
||||||
|
|
@ -160,4 +160,4 @@ DefineEngineMethod(RenderPassStateToken, toggle, void, (),,
|
||||||
"@brief Toggles the token from enabled to disabled or vice versa." )
|
"@brief Toggles the token from enabled to disabled or vice versa." )
|
||||||
{
|
{
|
||||||
object->enable(!object->isEnabled());
|
object->enable(!object->isEnabled());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2218,8 +2218,8 @@ DefineEngineMethod( ActionMap, save, void, ( const char* fileName, bool append )
|
||||||
" the ActionMap will be dumped to the console.\n"
|
" the ActionMap will be dumped to the console.\n"
|
||||||
"@param append Whether to write the ActionMap at the end of the file or overwrite it.\n"
|
"@param append Whether to write the ActionMap at the end of the file or overwrite it.\n"
|
||||||
"@tsexample\n"
|
"@tsexample\n"
|
||||||
"// Write out the actionmap into the config.cs file\n"
|
"// Write out the actionmap into the config." TORQUE_SCRIPT_EXTENSION " file\n"
|
||||||
"moveMap.save( \"scripts/client/config.cs\" );"
|
"moveMap.save( \"scripts/client/config." TORQUE_SCRIPT_EXTENSION "\" );"
|
||||||
"@endtsexample\n\n")
|
"@endtsexample\n\n")
|
||||||
{
|
{
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ void AssimpAppMaterial::initMaterial(const Torque::Path& path, Material* mat) co
|
||||||
else
|
else
|
||||||
{ // OPAQUE
|
{ // OPAQUE
|
||||||
translucent = false;
|
translucent = false;
|
||||||
blendOp = Material::LerpAlpha; // Make default so it doesn't get written to materials.cs
|
blendOp = Material::LerpAlpha; // Make default so it doesn't get written to materials.tscript
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -296,7 +296,7 @@ String AssimpAppMaterial::cleanTextureName(String& texName, String& shapeName, c
|
||||||
if (nameOnly)
|
if (nameOnly)
|
||||||
cleanStr = foundPath.getFullFileName();
|
cleanStr = foundPath.getFullFileName();
|
||||||
else
|
else
|
||||||
{ // Unless the file is in the same directory as the materials.cs (covered above)
|
{ // Unless the file is in the same directory as the materials.tscript (covered above)
|
||||||
// we need to set the full path from the root directory. If we use "subdirectory/file.ext",
|
// we need to set the full path from the root directory. If we use "subdirectory/file.ext",
|
||||||
// the material manager won't find the image file, but it will be found the next time the
|
// the material manager won't find the image file, but it will be found the next time the
|
||||||
// material is loaded from file. If we use "./subdirectory/file.ext", the image will be found
|
// material is loaded from file. If we use "./subdirectory/file.ext", the image will be found
|
||||||
|
|
|
||||||
|
|
@ -427,7 +427,7 @@ void AssimpShapeLoader::updateMaterialsScript(const Torque::Path &path)
|
||||||
{
|
{
|
||||||
Torque::Path scriptPath(path);
|
Torque::Path scriptPath(path);
|
||||||
scriptPath.setFileName("materials");
|
scriptPath.setFileName("materials");
|
||||||
scriptPath.setExtension("cs");
|
scriptPath.setExtension(TORQUE_SCRIPT_EXTENSION);
|
||||||
|
|
||||||
// First see what materials we need to update
|
// First see what materials we need to update
|
||||||
PersistenceManager persistMgr;
|
PersistenceManager persistMgr;
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public:
|
||||||
ColladaExtension_effect* effectExt; ///< effect extension
|
ColladaExtension_effect* effectExt; ///< effect extension
|
||||||
String name; ///< Name of this material (cleaned)
|
String name; ///< Name of this material (cleaned)
|
||||||
|
|
||||||
// Settings extracted from the Collada file, and optionally saved to materials.cs
|
// Settings extracted from the Collada file, and optionally saved to materials.tscript
|
||||||
String diffuseMap;
|
String diffuseMap;
|
||||||
String normalMap;
|
String normalMap;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -453,7 +453,7 @@ void copySketchupTexture(const Torque::Path &path, String &textureFilename)
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
/// Add collada materials to materials.cs
|
/// Add collada materials to materials.tscript
|
||||||
void updateMaterialsScript(const Torque::Path &path, bool copyTextures = false)
|
void updateMaterialsScript(const Torque::Path &path, bool copyTextures = false)
|
||||||
{
|
{
|
||||||
#ifdef DAE2DTS_TOOL
|
#ifdef DAE2DTS_TOOL
|
||||||
|
|
@ -463,7 +463,7 @@ void updateMaterialsScript(const Torque::Path &path, bool copyTextures = false)
|
||||||
|
|
||||||
Torque::Path scriptPath(path);
|
Torque::Path scriptPath(path);
|
||||||
scriptPath.setFileName("materials");
|
scriptPath.setFileName("materials");
|
||||||
scriptPath.setExtension("cs");
|
scriptPath.setExtension(TORQUE_SCRIPT_EXTENSION);
|
||||||
|
|
||||||
// First see what materials we need to update
|
// First see what materials we need to update
|
||||||
PersistenceManager persistMgr;
|
PersistenceManager persistMgr;
|
||||||
|
|
@ -731,7 +731,7 @@ TSShape* loadColladaShape(const Torque::Path &path)
|
||||||
|
|
||||||
#endif // DAE2DTS_TOOL
|
#endif // DAE2DTS_TOOL
|
||||||
|
|
||||||
// Add collada materials to materials.cs
|
// Add collada materials to materials.tscript
|
||||||
updateMaterialsScript(path, isSketchup);
|
updateMaterialsScript(path, isSketchup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ String ColladaUtils::resolveImagePath(const domImage* image)
|
||||||
// it is inside the Torque folder, otherwise force textures
|
// it is inside the Torque folder, otherwise force textures
|
||||||
// to be in the same folder as the shape.
|
// to be in the same folder as the shape.
|
||||||
// 2. If the URI string contains a relative path, append it
|
// 2. If the URI string contains a relative path, append it
|
||||||
// to the shape path (since materials.cs cannot handle
|
// to the shape path (since materials.tscript cannot handle
|
||||||
// relative paths).
|
// relative paths).
|
||||||
|
|
||||||
Torque::Path imagePath;
|
Torque::Path imagePath;
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ namespace ColladaUtils
|
||||||
bool ignoreNodeScale; // Ignore <scale> elements in <node>s
|
bool ignoreNodeScale; // Ignore <scale> elements in <node>s
|
||||||
bool adjustCenter; // Translate model so origin is at the center
|
bool adjustCenter; // Translate model so origin is at the center
|
||||||
bool adjustFloor; // Translate model so origin is at the bottom
|
bool adjustFloor; // Translate model so origin is at the bottom
|
||||||
bool forceUpdateMaterials; // Force update of materials.cs
|
bool forceUpdateMaterials; // Force update of materials.tscript
|
||||||
bool useDiffuseNames; // Use diffuse texture as the material name
|
bool useDiffuseNames; // Use diffuse texture as the material name
|
||||||
|
|
||||||
// Assimp specific preprocess import options
|
// Assimp specific preprocess import options
|
||||||
|
|
|
||||||
|
|
@ -2112,14 +2112,14 @@ template<> void *Resource<TSShape>::create(const Torque::Path &path)
|
||||||
{
|
{
|
||||||
// Execute the shape script if it exists
|
// Execute the shape script if it exists
|
||||||
Torque::Path scriptPath(path);
|
Torque::Path scriptPath(path);
|
||||||
scriptPath.setExtension("cs");
|
scriptPath.setExtension(TORQUE_SCRIPT_EXTENSION);
|
||||||
|
|
||||||
// Don't execute the script if we're already doing so!
|
// Don't execute the script if we're already doing so!
|
||||||
StringTableEntry currentScript = Platform::stripBasePath(CodeBlock::getCurrentCodeBlockFullPath());
|
StringTableEntry currentScript = Platform::stripBasePath(CodeBlock::getCurrentCodeBlockFullPath());
|
||||||
if (!scriptPath.getFullPath().equal(currentScript))
|
if (!scriptPath.getFullPath().equal(currentScript))
|
||||||
{
|
{
|
||||||
Torque::Path scriptPathDSO(scriptPath);
|
Torque::Path scriptPathDSO(scriptPath);
|
||||||
scriptPathDSO.setExtension("cs.dso");
|
scriptPathDSO.setExtension(TORQUE_SCRIPT_EXTENSION ".dso");
|
||||||
|
|
||||||
if (Torque::FS::IsFile(scriptPathDSO) || Torque::FS::IsFile(scriptPath))
|
if (Torque::FS::IsFile(scriptPathDSO) || Torque::FS::IsFile(scriptPath))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -313,9 +313,9 @@ void TSShapeConstructor::initPersistFields()
|
||||||
"@see adjustCenter" );
|
"@see adjustCenter" );
|
||||||
|
|
||||||
addField( "forceUpdateMaterials", TypeBool, Offset(mOptions.forceUpdateMaterials, TSShapeConstructor),
|
addField( "forceUpdateMaterials", TypeBool, Offset(mOptions.forceUpdateMaterials, TSShapeConstructor),
|
||||||
"Forces update of the materials.cs file in the same folder as the COLLADA "
|
"Forces update of the materials." TORQUE_SCRIPT_EXTENSION " file in the same folder as the COLLADA "
|
||||||
"(.dae) file, even if Materials already exist. No effect for DTS files.\n"
|
"(.dae) file, even if Materials already exist. No effect for DTS files.\n"
|
||||||
"Normally only Materials that are not already defined are written to materials.cs." );
|
"Normally only Materials that are not already defined are written to materials." TORQUE_SCRIPT_EXTENSION "." );
|
||||||
|
|
||||||
// Fields added for assimp options
|
// Fields added for assimp options
|
||||||
addField( "convertLeftHanded", TypeBool, Offset(mOptions.convertLeftHanded, TSShapeConstructor),
|
addField( "convertLeftHanded", TypeBool, Offset(mOptions.convertLeftHanded, TSShapeConstructor),
|
||||||
|
|
@ -710,11 +710,11 @@ DefineTSShapeConstructorMethod( saveShape, void, ( const char* filename ),,
|
||||||
DefineTSShapeConstructorMethod( writeChangeSet, void, (),,
|
DefineTSShapeConstructorMethod( writeChangeSet, void, (),,
|
||||||
(),,
|
(),,
|
||||||
"Write the current change set to a TSShapeConstructor script file. The "
|
"Write the current change set to a TSShapeConstructor script file. The "
|
||||||
"name of the script file is the same as the model, but with .cs extension. "
|
"name of the script file is the same as the model, but with ." TORQUE_SCRIPT_EXTENSION " extension. "
|
||||||
"eg. myShape.cs for myShape.dts or myShape.dae.\n" )
|
"eg. myShape." TORQUE_SCRIPT_EXTENSION " for myShape.dts or myShape.dae.\n" )
|
||||||
{
|
{
|
||||||
Torque::Path scriptPath( mShapePath );
|
Torque::Path scriptPath( mShapePath );
|
||||||
scriptPath.setExtension( "cs" );
|
scriptPath.setExtension(TORQUE_SCRIPT_EXTENSION);
|
||||||
|
|
||||||
// Read current file contents
|
// Read current file contents
|
||||||
FileObject f;
|
FileObject f;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
ModuleId="CoreModule"
|
ModuleId="CoreModule"
|
||||||
VersionId="1"
|
VersionId="1"
|
||||||
Description="Module that implements the core engine-level setup for the game."
|
Description="Module that implements the core engine-level setup for the game."
|
||||||
ScriptFile="Core.cs"
|
ScriptFile="Core.tscript"
|
||||||
CreateFunction="onCreate"
|
CreateFunction="onCreate"
|
||||||
DestroyFunction="onDestroy"
|
DestroyFunction="onDestroy"
|
||||||
Group="Core"/>
|
Group="Core"/>
|
||||||
|
|
@ -27,10 +27,10 @@ function CoreModule::onCreate(%this)
|
||||||
ModuleDatabase.LoadExplicit( "Core_PostFX" );
|
ModuleDatabase.LoadExplicit( "Core_PostFX" );
|
||||||
ModuleDatabase.LoadExplicit( "Core_GameObjects" );
|
ModuleDatabase.LoadExplicit( "Core_GameObjects" );
|
||||||
|
|
||||||
exec("data/defaults.cs");
|
exec("data/defaults.tscript");
|
||||||
%prefPath = getPrefpath();
|
%prefPath = getPrefpath();
|
||||||
if ( isFile( %prefPath @ "/clientPrefs.cs" ) )
|
if ( isFile( %prefPath @ "/clientPrefs.tscript" ) )
|
||||||
exec( %prefPath @ "/clientPrefs.cs" );
|
exec( %prefPath @ "/clientPrefs.tscript" );
|
||||||
|
|
||||||
// Seed the random number generator.
|
// Seed the random number generator.
|
||||||
setRandomSeed();
|
setRandomSeed();
|
||||||
|
|
@ -44,7 +44,7 @@ function CoreModule::onCreate(%this)
|
||||||
createCanvas($appName);
|
createCanvas($appName);
|
||||||
|
|
||||||
//load canvas
|
//load canvas
|
||||||
//exec("./console/main.cs");
|
//exec("./console/main.tscript");
|
||||||
|
|
||||||
ModuleDatabase.LoadExplicit( "Core_Console" );
|
ModuleDatabase.LoadExplicit( "Core_Console" );
|
||||||
|
|
||||||
|
|
@ -62,8 +62,8 @@ function CoreModule::onCreate(%this)
|
||||||
// If we have editors, initialize them here as well
|
// If we have editors, initialize them here as well
|
||||||
if (isToolBuild())
|
if (isToolBuild())
|
||||||
{
|
{
|
||||||
if(isFile("tools/main.cs") && !$isDedicated)
|
if(isFile("tools/main.tscript") && !$isDedicated)
|
||||||
exec("tools/main.cs");
|
exec("tools/main.tscript");
|
||||||
}
|
}
|
||||||
|
|
||||||
//This is used to build the remap keybind sets for the different actionMaps.
|
//This is used to build the remap keybind sets for the different actionMaps.
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
ModuleId="Core_ClientServer"
|
ModuleId="Core_ClientServer"
|
||||||
VersionId="1"
|
VersionId="1"
|
||||||
Description="Default module for the game."
|
Description="Default module for the game."
|
||||||
ScriptFile="Core_ClientServer.cs"
|
ScriptFile="Core_ClientServer.tscript"
|
||||||
CreateFunction="onCreate"
|
CreateFunction="onCreate"
|
||||||
DestroyFunction="onDestroy"
|
DestroyFunction="onDestroy"
|
||||||
Group="Core">
|
Group="Core">
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@
|
||||||
function Core_ClientServer::onCreate( %this )
|
function Core_ClientServer::onCreate( %this )
|
||||||
{
|
{
|
||||||
echo("\n--------- Initializing Directory: scripts ---------");
|
echo("\n--------- Initializing Directory: scripts ---------");
|
||||||
exec( "./scripts/client/client.cs" );
|
exec( "./scripts/client/client.tscript" );
|
||||||
exec( "./scripts/server/server.cs" );
|
exec( "./scripts/server/server.tscript" );
|
||||||
|
|
||||||
$Game::MainScene = getScene(0);
|
$Game::MainScene = getScene(0);
|
||||||
|
|
||||||
|
|
@ -52,11 +52,11 @@ function Core_ClientServer::onDestroy( %this )
|
||||||
|
|
||||||
echo("Exporting client prefs");
|
echo("Exporting client prefs");
|
||||||
%prefPath = getPrefpath();
|
%prefPath = getPrefpath();
|
||||||
export("$pref::*", %prefPath @ "/clientPrefs.cs", false);
|
export("$pref::*", %prefPath @ "/clientPrefs.tscript", false);
|
||||||
|
|
||||||
echo("Exporting server prefs");
|
echo("Exporting server prefs");
|
||||||
export("$Pref::Server::*", %prefPath @ "/serverPrefs.cs", false);
|
export("$Pref::Server::*", %prefPath @ "/serverPrefs.tscript", false);
|
||||||
BanList::Export(%prefPath @ "/banlist.cs");
|
BanList::Export(%prefPath @ "/banlist.tscript");
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
@ -9,16 +9,16 @@ function initClient()
|
||||||
$Client::GameTypeQuery = $appName;
|
$Client::GameTypeQuery = $appName;
|
||||||
$Client::MissionTypeQuery = "Any";
|
$Client::MissionTypeQuery = "Any";
|
||||||
|
|
||||||
exec( "./message.cs" );
|
exec( "./message.tscript" );
|
||||||
exec( "./connectionToServer.cs" );
|
exec( "./connectionToServer.tscript" );
|
||||||
exec( "./levelDownload.cs" );
|
exec( "./levelDownload.tscript" );
|
||||||
exec( "./levelLoad.cs" );
|
exec( "./levelLoad.tscript" );
|
||||||
|
|
||||||
//load prefs
|
//load prefs
|
||||||
exec( "data/defaults.cs" );
|
exec( "data/defaults.tscript" );
|
||||||
%prefPath = getPrefpath();
|
%prefPath = getPrefpath();
|
||||||
if ( isFile( %prefPath @ "/clientPrefs.cs" ) )
|
if ( isFile( %prefPath @ "/clientPrefs.tscript" ) )
|
||||||
exec( %prefPath @ "/clientPrefs.cs" );
|
exec( %prefPath @ "/clientPrefs.tscript" );
|
||||||
|
|
||||||
callOnModules("initClient");
|
callOnModules("initClient");
|
||||||
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
// Functions that process commands sent from the server.
|
// Functions that process commands sent from the server.
|
||||||
|
|
||||||
// Game event descriptions, which may or may not include text messages, can be
|
// Game event descriptions, which may or may not include text messages, can be
|
||||||
// sent using the message* functions in core/scripts/server/message.cs. Those
|
// sent using the message* functions in core/scripts/server/message.tscript. Those
|
||||||
// functions do commandToClient with the tag ServerMessage, which invokes the
|
// functions do commandToClient with the tag ServerMessage, which invokes the
|
||||||
// function below.
|
// function below.
|
||||||
|
|
||||||
|
|
@ -27,21 +27,21 @@ function initServer()
|
||||||
//load prefs
|
//load prefs
|
||||||
|
|
||||||
//Force-load the defaults just so we don't have any mistakes
|
//Force-load the defaults just so we don't have any mistakes
|
||||||
exec( "./defaults.cs" );
|
exec( "./defaults.tscript" );
|
||||||
|
|
||||||
//Then, if the user has saved preferences, we load those over-top the defaults
|
//Then, if the user has saved preferences, we load those over-top the defaults
|
||||||
%prefPath = getPrefpath();
|
%prefPath = getPrefpath();
|
||||||
if ( isFile( %prefPath @ "/serverPrefs.cs" ) )
|
if ( isFile( %prefPath @ "/serverPrefs.tscript" ) )
|
||||||
exec( %prefPath @ "/serverPrefs.cs" );
|
exec( %prefPath @ "/serverPrefs.tscript" );
|
||||||
|
|
||||||
exec( "./audio.cs" );
|
exec( "./audio.tscript" );
|
||||||
exec( "./commands.cs" );
|
exec( "./commands.tscript" );
|
||||||
exec( "./kickban.cs" );
|
exec( "./kickban.tscript" );
|
||||||
exec( "./message.cs" );
|
exec( "./message.tscript" );
|
||||||
exec( "./levelDownload.cs" );
|
exec( "./levelDownload.tscript" );
|
||||||
exec( "./levelLoad.cs" );
|
exec( "./levelLoad.tscript" );
|
||||||
exec( "./levelInfo.cs" );
|
exec( "./levelInfo.tscript" );
|
||||||
exec( "./connectionToClient.cs" );
|
exec( "./connectionToClient.tscript" );
|
||||||
|
|
||||||
// Server::Status is returned in the Game Info Query and represents the
|
// Server::Status is returned in the Game Info Query and represents the
|
||||||
// current status of the server. This string sould be very short.
|
// current status of the server. This string sould be very short.
|
||||||
|
|
@ -250,9 +250,9 @@ function destroyServer()
|
||||||
// Save any server settings
|
// Save any server settings
|
||||||
%prefPath = getPrefpath();
|
%prefPath = getPrefpath();
|
||||||
echo( "Exporting server prefs..." );
|
echo( "Exporting server prefs..." );
|
||||||
export( "$Pref::Server::*", %prefPath@"/serverPrefs.cs", false );
|
export( "$Pref::Server::*", %prefPath@"/serverPrefs.tscript", false );
|
||||||
|
|
||||||
BanList::Export(%prefPath@"/banlist.cs");
|
BanList::Export(%prefPath@"/banlist.tscript");
|
||||||
|
|
||||||
// Increase the server session number. This is used to make sure we're
|
// Increase the server session number. This is used to make sure we're
|
||||||
// working with the server session we think we are.
|
// working with the server session we think we are.
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
ModuleId="Core_Console"
|
ModuleId="Core_Console"
|
||||||
VersionId="1"
|
VersionId="1"
|
||||||
Description="Module that implements the core engine-level setup for the game."
|
Description="Module that implements the core engine-level setup for the game."
|
||||||
ScriptFile="Core_Console.cs"
|
ScriptFile="Core_Console.tscript"
|
||||||
CreateFunction="onCreate"
|
CreateFunction="onCreate"
|
||||||
DestroyFunction="onDestroy"
|
DestroyFunction="onDestroy"
|
||||||
Group="Core"
|
Group="Core"
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
function Core_Console::onCreate(%this)
|
function Core_Console::onCreate(%this)
|
||||||
{
|
{
|
||||||
exec("./scripts/profiles.cs");
|
exec("./scripts/profiles.tscript");
|
||||||
exec("./scripts/console.cs");
|
exec("./scripts/console.tscript");
|
||||||
|
|
||||||
exec("./guis/console.gui");
|
exec("./guis/console.gui");
|
||||||
}
|
}
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
ModuleId="Core_GameObjects"
|
ModuleId="Core_GameObjects"
|
||||||
VersionId="1"
|
VersionId="1"
|
||||||
Description="Module that implements the core engine-level setup for the game."
|
Description="Module that implements the core engine-level setup for the game."
|
||||||
ScriptFile="Core_GameObjects.cs"
|
ScriptFile="Core_GameObjects.tscript"
|
||||||
CreateFunction="onCreate"
|
CreateFunction="onCreate"
|
||||||
DestroyFunction="onDestroy"
|
DestroyFunction="onDestroy"
|
||||||
Group="Core">
|
Group="Core">
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ function Core_GameObjects::initServer( %this )
|
||||||
|
|
||||||
function Core_GameObjects::onCreateGameServer(%this)
|
function Core_GameObjects::onCreateGameServer(%this)
|
||||||
{
|
{
|
||||||
%this.registerDatablock("./datablocks/defaultDatablocks.cs");
|
%this.registerDatablock("./datablocks/defaultDatablocks.tscript");
|
||||||
}
|
}
|
||||||
|
|
||||||
function Core_GameObjects::onDestroyGameServer(%this)
|
function Core_GameObjects::onDestroyGameServer(%this)
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
function Core_GUI::onCreate(%this)
|
|
||||||
{
|
|
||||||
exec("./scripts/profiles.cs");
|
|
||||||
exec("./scripts/canvas.cs");
|
|
||||||
exec("./scripts/cursor.cs");
|
|
||||||
}
|
|
||||||
|
|
||||||
function Core_GUI::onDestroy(%this)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
ModuleId="Core_GUI"
|
ModuleId="Core_GUI"
|
||||||
VersionId="1"
|
VersionId="1"
|
||||||
Description="Module that implements the core engine-level setup for the game."
|
Description="Module that implements the core engine-level setup for the game."
|
||||||
ScriptFile="Core_GUI.cs"
|
ScriptFile="Core_GUI.tscript"
|
||||||
CreateFunction="onCreate"
|
CreateFunction="onCreate"
|
||||||
DestroyFunction="onDestroy"
|
DestroyFunction="onDestroy"
|
||||||
Group="Core"
|
Group="Core"
|
||||||
|
|
|
||||||
11
Templates/BaseGame/game/core/gui/Core_GUI.tscript
Normal file
11
Templates/BaseGame/game/core/gui/Core_GUI.tscript
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
|
||||||
|
function Core_GUI::onCreate(%this)
|
||||||
|
{
|
||||||
|
exec("./scripts/profiles.tscript");
|
||||||
|
exec("./scripts/canvas.tscript");
|
||||||
|
exec("./scripts/cursor.tscript");
|
||||||
|
}
|
||||||
|
|
||||||
|
function Core_GUI::onDestroy(%this)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
|
|
||||||
function Core_Lighting::onCreate(%this)
|
|
||||||
{
|
|
||||||
exec("./scripts/lighting.cs");
|
|
||||||
|
|
||||||
//Advanced/Deferred
|
|
||||||
exec("./scripts/advancedLighting_Shaders.cs");
|
|
||||||
exec("./scripts/deferredShading.cs");
|
|
||||||
exec("./scripts/advancedLighting_Init.cs");
|
|
||||||
|
|
||||||
//Basic/Forward
|
|
||||||
exec("./scripts/basicLighting_shadowFilter.cs");
|
|
||||||
exec("./scripts/shadowMaps_Init.cs");
|
|
||||||
exec("./scripts/basicLighting_Init.cs");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function Core_Lighting::onDestroy(%this)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
ModuleId="Core_Lighting"
|
ModuleId="Core_Lighting"
|
||||||
VersionId="1"
|
VersionId="1"
|
||||||
Description="Module that implements the core engine-level setup for the game."
|
Description="Module that implements the core engine-level setup for the game."
|
||||||
ScriptFile="Core_Lighting.cs"
|
ScriptFile="Core_Lighting.tscript"
|
||||||
CreateFunction="onCreate"
|
CreateFunction="onCreate"
|
||||||
DestroyFunction="onDestroy"
|
DestroyFunction="onDestroy"
|
||||||
Group="Core">
|
Group="Core">
|
||||||
|
|
|
||||||
20
Templates/BaseGame/game/core/lighting/Core_Lighting.tscript
Normal file
20
Templates/BaseGame/game/core/lighting/Core_Lighting.tscript
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
|
||||||
|
function Core_Lighting::onCreate(%this)
|
||||||
|
{
|
||||||
|
exec("./scripts/lighting.tscript");
|
||||||
|
|
||||||
|
//Advanced/Deferred
|
||||||
|
exec("./scripts/advancedLighting_Shaders.tscript");
|
||||||
|
exec("./scripts/deferredShading.tscript");
|
||||||
|
exec("./scripts/advancedLighting_Init.tscript");
|
||||||
|
|
||||||
|
//Basic/Forward
|
||||||
|
exec("./scripts/basicLighting_shadowFilter.tscript");
|
||||||
|
exec("./scripts/shadowMaps_Init.tscript");
|
||||||
|
exec("./scripts/basicLighting_Init.tscript");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function Core_Lighting::onDestroy(%this)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -39,8 +39,8 @@ $pref::LightManager::sgUseDynamicShadows = "1";
|
||||||
$pref::LightManager::sgUseToneMapping = "";
|
$pref::LightManager::sgUseToneMapping = "";
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//exec( "./shaders.cs" );
|
//exec( "./shaders.tscript" );
|
||||||
//exec( "./deferredShading.cs" );
|
//exec( "./deferredShading.tscript" );
|
||||||
|
|
||||||
function onActivateAdvancedLM()
|
function onActivateAdvancedLM()
|
||||||
{
|
{
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
// IN THE SOFTWARE.
|
// IN THE SOFTWARE.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
//exec( "./shadowFilter.cs" );
|
//exec( "./shadowFilter.tscript" );
|
||||||
|
|
||||||
singleton GFXStateBlockData( BL_ProjectedShadowSBData )
|
singleton GFXStateBlockData( BL_ProjectedShadowSBData )
|
||||||
{
|
{
|
||||||
|
|
@ -26,12 +26,12 @@ function initLightingSystems(%manager)
|
||||||
|
|
||||||
// First exec the scripts for the different light managers
|
// First exec the scripts for the different light managers
|
||||||
// in the lighting folder.
|
// in the lighting folder.
|
||||||
/*%pattern = "./lighting/*//*init.cs";
|
/*%pattern = "./lighting/*//*init.tscript";
|
||||||
%file = findFirstFile( %pattern );
|
%file = findFirstFile( %pattern );
|
||||||
if ( %file $= "" )
|
if ( %file $= "" )
|
||||||
{
|
{
|
||||||
// Try for DSOs next.
|
// Try for DSOs next.
|
||||||
%pattern = "./lighting/*//*init.cs.dso";
|
%pattern = "./lighting/*//*init.tscript.dso";
|
||||||
%file = findFirstFile( %pattern );
|
%file = findFirstFile( %pattern );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
|
|
||||||
function Core_PostFX::onCreate(%this)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
exec("./scripts/postFxManager.cs");
|
|
||||||
exec("./scripts/postFx.cs");
|
|
||||||
|
|
||||||
//Load the default config
|
|
||||||
loadPresetHandler("./scripts/default.postfxpreset.cs");
|
|
||||||
}
|
|
||||||
|
|
||||||
function Core_PostFX::onDestroy(%this)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
ModuleId="Core_PostFX"
|
ModuleId="Core_PostFX"
|
||||||
VersionId="1"
|
VersionId="1"
|
||||||
Description="Module that implements the core engine-level setup for the game."
|
Description="Module that implements the core engine-level setup for the game."
|
||||||
ScriptFile="Core_PostFX.cs"
|
ScriptFile="Core_PostFX.tscript"
|
||||||
CreateFunction="onCreate"
|
CreateFunction="onCreate"
|
||||||
DestroyFunction="onDestroy"
|
DestroyFunction="onDestroy"
|
||||||
Group="Core"
|
Group="Core"
|
||||||
|
|
|
||||||
14
Templates/BaseGame/game/core/postFX/Core_PostFX.tscript
Normal file
14
Templates/BaseGame/game/core/postFX/Core_PostFX.tscript
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
function Core_PostFX::onCreate(%this)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
exec("./scripts/postFxManager.tscript");
|
||||||
|
exec("./scripts/postFx.tscript");
|
||||||
|
|
||||||
|
//Load the default config
|
||||||
|
loadPresetHandler("./scripts/default.postfxpreset.tscript");
|
||||||
|
}
|
||||||
|
|
||||||
|
function Core_PostFX::onDestroy(%this)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -581,7 +581,7 @@ function DepthOfFieldPostFX::autoFocus( %this )
|
||||||
/*
|
/*
|
||||||
function reloadDOF()
|
function reloadDOF()
|
||||||
{
|
{
|
||||||
exec( "./dof.cs" );
|
exec( "./dof.tscript" );
|
||||||
DepthOfFieldPostFX.reload();
|
DepthOfFieldPostFX.reload();
|
||||||
DepthOfFieldPostFX.disable();
|
DepthOfFieldPostFX.disable();
|
||||||
DepthOfFieldPostFX.enable();
|
DepthOfFieldPostFX.enable();
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
// http://www.iryoku.com/mlaa/
|
// http://www.iryoku.com/mlaa/
|
||||||
|
|
||||||
// NOTE: This is currently disabled in favor of FXAA. See
|
// NOTE: This is currently disabled in favor of FXAA. See
|
||||||
// core\scripts\client\canvas.cs if you want to re-enable it.
|
// core\scripts\client\canvas.tscript if you want to re-enable it.
|
||||||
|
|
||||||
singleton GFXStateBlockData( MLAA_EdgeDetectStateBlock : PFX_DefaultStateBlock )
|
singleton GFXStateBlockData( MLAA_EdgeDetectStateBlock : PFX_DefaultStateBlock )
|
||||||
{
|
{
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue