### Light Filtering and Installation Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classLightManager Functions to filter lights based on static and dynamic properties, and to install the best lights into OpenGL. ```APIDOC ## LightManager::sgFilterLights ### Description Filters lights based on whether static and dynamic lights are allowed. ### Method void ### Endpoint LightManager::sgFilterLights ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **_allowstatics_** (bool) - True to allow static lights, false otherwise. - **_allowdynamics_** (bool) - True to allow dynamic lights, false otherwise. ### Request Example ```json { "_allowstatics_": true, "_allowdynamics_": false } ``` ### Response #### Success Response (200) N/A (void function) #### Response Example N/A --- ## LightManager::sgInstallLights ### Description Adds the top 8 best lights to OpenGL. ### Method void ### Endpoint LightManager::sgInstallLights ### Parameters None ### Request Example N/A ### Response #### Success Response (200) N/A (void function) #### Response Example N/A ``` -------------------------------- ### HTTPObject GET Request Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classHTTPObject Initiates an HTTP GET request to a specified host and URL. ```APIDOC ## void HTTPObject::get ### Description Initiates an HTTP GET request to a specified host and URL. ### Method GET ### Endpoint `/urlName` (relative to `hostName`) ### Parameters #### Path Parameters - **hostName** (const char *) - The hostname or IP address of the server. - **urlName** (const char *) - The path to the resource on the server. - **query** (const char *) - The query string for the GET request. ### Request Example ```json { "hostName": "example.com", "urlName": "/api/resource", "query": "param1=value1¶m2=value2" } ``` ### Response #### Success Response (200) - **onDataReceive** (U32) - Returns the number of bytes received. This is a virtual function that can be overridden to process received data. #### Response Example ```json { "status": "200 OK", "body": "Received data..." } ``` ``` -------------------------------- ### ResManager::getBasePath Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classResManager Gets the base path of the game installation. ```APIDOC ## ResManager::getBasePath ### Description Gets the base path of the game installation. ### Method `const char*` ### Endpoint `ResManager::getBasePath()` ### Parameters None ### Request Example ``` const char* basePath = ResManager::getBasePath(); ``` ### Response #### Success Response (200) - `const char*` - The absolute path to the base game directory. #### Response Example ```json { "base_path": "/usr/local/game/" } ``` ``` -------------------------------- ### Demo Recording Initiation in NetConnection Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classNetConnection Function to start the process of recording a simulation demo to a specified file. This is the entry point for capturing gameplay or simulation data. ```cpp bool NetConnection::startDemoRecord(const char * _fileName_) ``` -------------------------------- ### Property Management Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classLightManager Static functions for getting and setting properties related to lighting and shadows. ```APIDOC ## LightManager::sgGetProperty ### Description Gets a specific lighting or shadow property. ### Method static bool ### Endpoint LightManager::sgGetProperty ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **_prop_** (U32) - The property identifier. ### Request Example ```json { "_prop_": 1 } ``` ### Response #### Success Response (200) - **Return Value** (bool) - The value of the property. #### Response Example ```json { "return_value": true } ``` --- ## LightManager::sgSetProperty ### Description Sets a specific lighting or shadow property. ### Method static void ### Endpoint LightManager::sgSetProperty ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **_prop_** (U32) - The property identifier. - **_val_** (bool) - The value to set for the property. ### Request Example ```json { "_prop_": 1, "_val_": false } ``` ### Response #### Success Response (200) N/A (void function) #### Response Example N/A ``` -------------------------------- ### ConsoleLogger Script Constructor Example Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classConsoleLogger Demonstrates how to create a new ConsoleLogger instance using script, specifying the object name, log file name, and an optional append flag. ```script // Example script constructor usage. %obj = new ConsoleLogger( objName, logFileName, [append = false] ); ``` -------------------------------- ### GameInterface::loadJournal Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classGameInterface Starts loading journal data from a specified file. ```APIDOC ## GameInterface::loadJournal ### Description Initiates the loading of journal data from the provided file path. ### Method void ### Endpoint N/A (Member function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **_fileName_** (const char*) - The path to the journal file to load. ### Request Example N/A ### Response #### Success Response (void) This function does not return a value. #### Response Example N/A ``` -------------------------------- ### SceneObject::getZoneRangeStart Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classSceneObject Gets the starting index of the zones managed by this object. ```APIDOC ## SceneObject::getZoneRangeStart ### Description Gets the index of the first zone this object manages in the collection of zones. ### Method U32 getZoneRangeStart() const ### Parameters None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **Return Value** (U32) - The starting index of the managed zones. #### Response Example ```json { "zoneStartIndex": 0 } ``` ``` -------------------------------- ### TGE Object Animation Setup Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classTSShapeInstance Illustrates the initial steps required to animate an object in TGE, including getting the TSShape, finding a sequence, and creating a TSThread. ```c++ TSShape* shape = mShapeInstance->getShape(); S32 seq = shape->findSequence("foo"); TSThread* thread = mShapeInstance->addThread(); mShapeInstance->setSequence(thread, seq, 0); ``` -------------------------------- ### Platform Window Management Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/structPlatform Functions for initializing, managing, and querying window properties. ```APIDOC ## Platform::initWindow ### Description Initializes the application window with a specified size and title. ### Method `static void initWindow(const Point2I & _initialSize_, const char * _name_)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (void) This function does not return a value. #### Response Example None ``` ```APIDOC ## Platform::setWindowTitle ### Description Sets the title of the application window. ### Method `static void setWindowTitle(const char * _title_)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (void) This function does not return a value. #### Response Example None ``` ```APIDOC ## Platform::setWindowLocked ### Description Locks or unlocks the application window, preventing or allowing user interaction. ### Method `static void setWindowLocked(bool _locked_)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (void) This function does not return a value. #### Response Example None ``` ```APIDOC ## Platform::minimizeWindow ### Description Minimizes the application window. ### Method `static void minimizeWindow()` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (void) This function does not return a value. #### Response Example None ``` ```APIDOC ## Platform::getWindowSize ### Description Retrieves the current size of the application window. ### Method `static const Point2I& getWindowSize()` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (const Point2I&) Returns a constant reference to a `Point2I` object representing the window's width and height. #### Response Example None ``` ```APIDOC ## Platform::setWindowSize ### Description Sets the size of the application window. ### Method `static void setWindowSize(U32 _newWidth_, U32 _newHeight_)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (void) This function does not return a value. #### Response Example None ``` -------------------------------- ### Connection and Listening Functions Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/structNet Functions for establishing network connections and handling incoming requests. `openConnectTo` attempts to connect to a specified address. `connect` establishes a connection on an existing socket. `listen` prepares a socket to accept incoming connections, and `accept` processes an incoming connection. ```cpp static NetSocket Net::openConnectTo ( const char * _stringAddress_ ) static void Net::closeConnectTo ( NetSocket _socket_ ) static Error Net::connect ( NetSocket _socket_ , const NetAddress * _address_) static Error Net::listen ( NetSocket _socket_ , S32 _maxConcurrentListens_) static NetSocket Net::accept ( NetSocket _acceptSocket_ , NetAddress * _remoteAddress_) ``` -------------------------------- ### ConsoleObject Class Information Retrieval in C++ Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classConsoleObject Provides C++ examples for retrieving class-level information from a ConsoleObject. This includes getting the class ID, class name, and static class representation. ```cpp S32 | getClassId (U32 netClassGroup) const // Get our network-layer class id. const char * | getClassName () const // Get our compiler and platform independent class name. static AbstractClassRep * | getStaticClassRep () // Get the abstract class information for this class. static AbstractClassRep * | getParentStaticClassRep () // Get the abstract class information for this class's superclass. ``` -------------------------------- ### Sim3DAudioEvent Constructor Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classSim3DAudioEvent Documentation for the Sim3DAudioEvent constructor. ```APIDOC ## Sim3DAudioEvent Constructor Documentation ### `Sim3DAudioEvent::Sim3DAudioEvent(const AudioProfile * _profile = NULL, const MatrixF * _mat = NULL)` **Description:** Constructs a Sim3DAudioEvent with an optional audio profile and transformation matrix. **Parameters:** - **_profile** (const AudioProfile *) - Optional pointer to an AudioProfile. - **_mat** (const MatrixF *) - Optional pointer to a MatrixF for the transformation. ``` -------------------------------- ### Platform Namespace and Data Structures Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/platform_8h Details the 'Platform' namespace and its associated data structures like LocalTime, FileInfo, VolumeInformation, and SystemInfo. ```APIDOC ## Namespace `Platform` ## Data Structures - `struct Platform` - `struct Platform::LocalTime` - `struct Platform::FileInfo` - `struct Platform::VolumeInformation` - `struct Platform::SystemInfo_struct` - `struct Platform::SystemInfo_struct::Processor` - `struct Processor` - `struct TimeManager` - `struct Math` - `struct Net` ``` -------------------------------- ### Polytope Class Overview Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classPolytope Provides an overview of the Polytope class, including its included header file and version information. ```APIDOC ## Polytope Class Reference `#include ` | TGE Version 1.5.2 ### Description This section details the Polytope class, its public and private members, and related data structures used within the Torque Game Engine. ``` -------------------------------- ### File::getPosition: Get current position in file Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classFile Gets the current position in the file, measured in bytes from the beginning of the file. This is a const member function. ```cpp U32 File::getPosition() const ``` -------------------------------- ### File::setPosition example: Set file position Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classFile Example demonstrating how to use the setPosition function to move to specific locations within a file, both absolutely and relatively. ```cpp File *foo; ... set up file ... // Go to byte 32 in the file... foo->setPosition(32); // Now skip back 20 bytes... foo->setPosition(-20, false); // And forward 17... foo->setPosition(17, false); ``` -------------------------------- ### Audio Initialization and Shutdown Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/platformAudio_8h Functions for initializing and shutting down the OpenAL audio system. ```APIDOC ## Audio Initialization and Shutdown ### Description Provides functions to initialize and cleanly shut down the OpenAL audio subsystem. ### Functions - **`void Audio::initOpenAL()`** Initializes the OpenAL audio system. - **`void Audio::shutdownOpenAL()`** Shuts down and releases resources used by the OpenAL audio system. - **`void Audio::destroy()`** General destruction function for audio-related resources. ``` -------------------------------- ### Get Pixel Map Data - glGetPixelMapfv Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/GLCoreFunc_8h Retrieves pixel mapping table entries. This function is used to get floating-point values from pixel mapping tables. ```c GL_FUNCTION (void, glGetMapfv,(GLenum target, GLenum query, GLfloat *v), return;) GL_FUNCTION(void ``` -------------------------------- ### GuiPopUpBackgroundCtrl Constructor Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classGuiPopUpBackgroundCtrl Constructs a GuiPopUpBackgroundCtrl object. ```APIDOC ## GuiPopUpBackgroundCtrl Constructor ### Description Constructs a GuiPopUpBackgroundCtrl object. ### Method Constructor ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "No request body for constructor" } ``` ### Response #### Success Response (200) - **GuiPopUpBackgroundCtrl*** - A pointer to the newly created GuiPopUpBackgroundCtrl object. #### Response Example ```json { "example": "No direct response, object is instantiated" } ``` ``` -------------------------------- ### GameInterface::main Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classGameInterface The main entry point for the game application. ```APIDOC ## GameInterface::main ### Description The main entry point for the game application. It receives command-line arguments. ### Method virtual int ### Endpoint N/A (Member function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example N/A ### Response #### Success Response (0) Returns 0 on successful execution. #### Response Example N/A ``` -------------------------------- ### GuiMLTextCtrl: Set Selection Start (C++) Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classGuiMLTextCtrl Sets the starting position of the text selection in the GuiMLTextCtrl. Used in conjunction with setSelectionEnd to define a selected range. ```cpp void setSelectionStart (U32 start); ``` -------------------------------- ### Platform Defines Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/platform_8h Lists the preprocessor defines available in platform.h, including macro definitions for string manipulation, memory allocation, and sorting callbacks. ```APIDOC ## Defines - `#define dT(s) s` - Obtain a pointer to the start of the Nth UTF-8 character in the string. - `#define QSORT_CALLBACK FN_CDECL` - `#define new new(__FILE__, __LINE__)` - `#define placenew(x) new(x)` - `#define dMalloc(x) dMalloc_r(x, __FILE__, __LINE__)` - `#define dStrdup(x) dStrdup_r(x, __FILE__, __LINE__)` ``` -------------------------------- ### Setting and Getting SimObject Fields Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classSimObject Demonstrates how to set and get data fields for a SimObject. These methods handle both static and dynamic fields, with static fields taking priority. The 'array' parameter is used for accessing fields that are arrays. ```C++ setDataField(StringTable->insert("locked", false), NULL, b ? "true" : "false" ); curObject->setDataField(curField, curFieldArray, STR.getStringValue()); setDataField(slotName, array, value); ``` -------------------------------- ### ResManager::getSize Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classResManager Gets the size of a file in bytes. ```APIDOC ## ResManager::getSize ### Description Gets the size of the file. ### Method `S32` ### Endpoint `ResManager::getSize(const char * _filename_) ### Parameters #### Path Parameters - `_filename_` (const char *) - The name of the file. #### Query Parameters None #### Request Body None ### Request Example ``` S32 fileSize = ResManager::getSize("config.txt"); ``` ### Response #### Success Response (200) - `S32` - The size of the file in bytes. Returns -1 if the file is not found or an error occurs. #### Response Example ```json { "file_size": 1024 } ``` ``` -------------------------------- ### GuiConsoleTextCtrl Class Reference Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classGuiConsoleTextCtrl Reference documentation for the GuiConsoleTextCtrl class, including its constructor, member functions, and data members. ```APIDOC ## GuiConsoleTextCtrl Class Reference `#include ` ### Public Types - `enum Constants`: Defines constants for the class. - `MAX_STRING_LENGTH = 255` ### Public Member Functions - `GuiConsoleTextCtrl()`: Constructor for the GuiConsoleTextCtrl class. - `bool onWake()`: Called when the object is asked to wake up. Returns true if it's actually awake at the end. - `void onSleep()`: Called when the object is asked to sleep. - `virtual void setText(const char *txt=NULL)`: Sets the text content of the console control. - `const char *getText()`: Retrieves the current text content of the console control. - `void calcResize()`: Calculates and applies resizing for the control. - `void onPreRender()`: Performs special pre-rendering processing. - `void onRender(Point2I offset, const RectI &updateRect)`: Renders the control to the screen. - `const char *getScriptValue()`: Returns the value of the variable bound to this object. - `void setScriptValue(const char *value)`: Sets the value of the variable bound to this object. ### Static Public Member Functions - `static void initPersistFields()`: Registers dynamic fields in a subclass of ConsoleObject. ### Protected Attributes - `const char *mConsoleExpression`: Stores the console expression. - `const char *mResult`: Stores the result string. - `Resource< GFont > mFont`: Resource handle for the font used by the control. ### Member Typedef Documentation - `typedef GuiControl Parent`: Alias for the parent class `GuiControl`. ### Member Enumeration Documentation - `enum Constants`: Constants used within the `GuiConsoleTextCtrl` class. - `_MAX_STRING_LENGTH_`: Maximum length for strings. ### Constructor & Destructor Documentation - `GuiConsoleTextCtrl::GuiConsoleTextCtrl()`: Default constructor for `GuiConsoleTextCtrl`. ### Member Function Documentation - `GuiConsoleTextCtrl::DECLARE_CONOBJECT(GuiConsoleTextCtrl)`: Macro for declaring console object properties. - `static void GuiConsoleTextCtrl::initPersistFields()`: Registers dynamic fields. - `bool GuiConsoleTextCtrl::onWake()`: Virtual function called when the object wakes up. - `void GuiConsoleTextCtrl::onSleep()`: Virtual function called when the object sleeps. - `virtual void GuiConsoleTextCtrl::setText(const char *txt=NULL)`: Sets the text content. - `const char* GuiConsoleTextCtrl::getText()`: Retrieves the text content. - `void GuiConsoleTextCtrl::calcResize()`: Calculates resize parameters. - `void GuiConsoleTextCtrl::onPreRender()`: Performs pre-rendering actions. - `void GuiConsoleTextCtrl::onRender(Point2I offset, const RectI &updateRect)`: Renders the control. - `const char* GuiConsoleTextCtrl::getScriptValue()`: Gets the script-bound value. - `void GuiConsoleTextCtrl::setScriptValue(const char *value)`: Sets the script-bound value. ### Field Documentation - `const char* GuiConsoleTextCtrl::mConsoleExpression` [protected]: Stores the console expression. - `const char* GuiConsoleTextCtrl::mResult` [protected]: Stores the result string. - `Resource GuiConsoleTextCtrl::mFont` [protected]: Font resource for the control. ``` -------------------------------- ### Audio Source Management Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/platformAudio_8h Functions for creating, playing, pausing, stopping, and querying audio sources. ```APIDOC ## Audio Source Management ### Description APIs for managing audio sources, including creation with various parameters, playback control, and state retrieval. ### Types - **`typedef U32 AUDIOHANDLE`** A handle representing an audio source or object. - **`#define NULL_AUDIOHANDLE 0`** A constant representing an invalid or null audio handle. ### Functions - **`AUDIOHANDLE alxCreateSource(const Audio::Description *desc, const char *filename, const MatrixF *transform=NULL, AudioSampleEnvironment *sampleEnvironment=0)`** Creates an audio source using a description object and a filename. - **`AUDIOHANDLE alxCreateSource(AudioDescription *descObject, const char *filename, const MatrixF *transform=NULL, AudioSampleEnvironment *sampleEnvironment=0)`** Creates an audio source using an `AudioDescription` object and a filename. - **`AUDIOHANDLE alxCreateSource(const AudioProfile *profile, const MatrixF *transform=NULL)`** Creates an audio source using an `AudioProfile`. - **`AudioStreamSource * alxFindAudioStreamSource(AUDIOHANDLE handle)`** Finds an `AudioStreamSource` associated with a given handle. - **`AUDIOHANDLE alxPlay(AUDIOHANDLE handle)`** Starts playback of the audio source associated with the handle. - **`void alxPause(AUDIOHANDLE handle)`** Pauses playback of the specified audio source. - **`void alxPauseAll()`** Pauses playback of all active audio sources. - **`void alxUnPause(AUDIOHANDLE handle)`** Resumes playback of a paused audio source. - **`void alxUnPauseAll()`** Resumes playback of all paused audio sources. - **`void alxStop(AUDIOHANDLE handle)`** Stops playback of the specified audio source. - **`void alxStopAll()`** Stops playback of all active audio sources. - **`AUDIOHANDLE alxPlay(const AudioProfile *profile, const MatrixF *transform=NULL, const Point3F *velocity=NULL)`** Plays audio based on a profile, with optional transform and velocity. - **`bool alxIsValidHandle(AUDIOHANDLE handle)`** Checks if the provided audio handle is valid. - **`bool alxIsPlaying(AUDIOHANDLE handle)`** Checks if the audio source associated with the handle is currently playing. ``` -------------------------------- ### ResManager::getFullPath Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classResManager Gets the full, absolute path of a file. ```APIDOC ## ResManager::getFullPath ### Description Gets the full path of the file, including the base directory. ### Method `const char*` ### Endpoint `ResManager::getFullPath(const char * _filename_, char * _path_, U32 _pathLen_) ### Parameters #### Path Parameters - `_filename_` (const char *) - The name of the file. - `_path_` (char *) - A buffer to store the resulting full path. - `_pathLen_` (U32) - The size of the buffer pointed to by `_path_`. #### Query Parameters None #### Request Body None ### Request Example ``` char fullPathBuffer[256]; const char* fullPath = ResManager::getFullPath("data.dat", fullPathBuffer, sizeof(fullPathBuffer)); ``` ### Response #### Success Response (200) - `const char*` - A pointer to the buffer containing the full path. Returns NULL if the path could not be determined. #### Response Example ```json { "full_path": "/usr/local/game/data/data.dat" } ``` ``` -------------------------------- ### ResManager::getModPaths Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classResManager Gets the path for the current game mod. ```APIDOC ## ResManager::getModPaths ### Description Gets the path for the current game mod. ### Method `const char*` ### Endpoint `ResManager::getModPaths()` ### Parameters None ### Request Example ``` const char* currentModPath = ResManager::getModPaths(); ``` ### Response #### Success Response (200) - `const char*` - The path of the current game mod. #### Response Example ```json { "mod_path": "path/to/current/mod" } ``` ``` -------------------------------- ### Fill Vertex Buffer Data with glFillVertexBufferEXT (OpenGL) Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/GLCoreFunc_8h Fills a portion of the currently bound vertex buffer with data. This EXT extension function allows specifying the starting offset and the number of vertices to fill. It requires the handle of the buffer, the starting index, and the count of vertices. ```C GL_FUNCTION ( void , glFillVertexBufferEXT , (GLint handle, GLint first, GLsizei count) , return; ) ``` -------------------------------- ### Lightmap Loading Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classInteriorLMManager Functions for loading base lightmaps. ```APIDOC ## InteriorLMManager::loadBaseLightmaps ### Description Loads base lightmaps for a given interior and instance. ### Method `bool` ### Endpoint N/A (Class method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **_interiorHandle_** (LM_HANDLE) - Required - The handle of the interior. - **_instanceHandle_** (LM_HANDLE) - Required - The handle of the instance. ### Request Example ```json { "_interiorHandle_": "interior_handle_1", "_instanceHandle_": "instance_handle_1" } ``` ### Response #### Success Response (200) Returns `true` if lightmaps were loaded successfully, `false` otherwise. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### volumeLight::consoleInit Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classvolumeLight Register global constant variables and do other one-time initialization tasks in a subclass of ConsoleObject. ```APIDOC ## volumeLight::consoleInit ### Description Register global constant variables and do other one-time initialization tasks in a subclass of ConsoleObject. ### Method static void ### Endpoint N/A (Member Function) ### Parameters None ### Request Example N/A ### Response None ### Deprecated You should use ConsoleMethod and ConsoleFunction, not this, to register methods or commands. ### See Also console ``` -------------------------------- ### ResManager::getModPathOf Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classResManager Gets the path of a file relative to the mod directory. ```APIDOC ## ResManager::getModPathOf ### Description Gets the path of the file local to the mod. ### Method `const char*` ### Endpoint `ResManager::getModPathOf(const char * _fileName_) ### Parameters #### Path Parameters - `_fileName_` (const char *) - The name of the file. #### Query Parameters None #### Request Body None ### Request Example ``` const char* modRelativePath = ResManager::getModPathOf("textures/logo.png"); ``` ### Response #### Success Response (200) - `const char*` - The relative path of the file within the mod directory. Returns NULL if the file is not found in the mod. #### Response Example ```json { "mod_relative_path": "textures/logo.png" } ``` ``` -------------------------------- ### GameInterface::saveJournal Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classGameInterface Starts saving journal data to a specified file. ```APIDOC ## GameInterface::saveJournal ### Description Initiates the saving of journal data to the provided file path. The file must be writable. ### Method void ### Endpoint N/A (Member function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **_fileName_** (const char*) - The path to the journal file to save to. ### Request Example N/A ### Response #### Success Response (void) This function does not return a value. #### Response Example N/A ``` -------------------------------- ### Platform CD Check and Instance Management Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/structPlatform Functions related to CD checking and managing application instances. ```APIDOC ## Platform::doCDCheck ### Description Performs a CD check to verify the presence or integrity of required files. ### Method `static bool doCDCheck()` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (bool) Returns `true` if the CD check passes, `false` otherwise. #### Response Example None ``` ```APIDOC ## Platform::excludeOtherInstances ### Description Attempts to exclude other running instances of the application based on a provided string identifier. ### Method `static bool excludeOtherInstances(const char * _string_)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (bool) Returns `true` if other instances were successfully excluded, `false` otherwise. #### Response Example None ``` ```APIDOC ## Platform::checkOtherInstances ### Description Checks for the existence of other running instances of the application based on a provided string identifier. ### Method `static bool checkOtherInstances(const char * _string_)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (bool) Returns `true` if other instances are running, `false` otherwise. #### Response Example None ``` ```APIDOC ## Platform::restartInstance ### Description Restarts the current instance of the application. ### Method `static void restartInstance()` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (void) This function does not return a value. #### Response Example None ``` -------------------------------- ### GuiTreeViewCtrl::Item Get Methods Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/structGuiTreeViewCtrl_1_1Item These methods retrieve information about the TreeView item. ```APIDOC ## Get Methods ### `const S8 getNormalImage() const` Retrieves the image ID for the item when it is not expanded. ### `const S8 getExpandedImage() const` Retrieves the image ID for the item when it is expanded. ### `char * getText()` Retrieves the display text of the item. ### `char * getValue()` Retrieves the script value associated with the item. ### `const S16 getID() const` Retrieves the unique identifier for the item. ### `SimObject * getObject() const` Retrieves the SimObject pointer associated with the item, if any. ### `const U32 getDisplayTextLength() const` Retrieves the length of the item's display text. ### `const S32 getDisplayTextWidth(GFont *font) const` Retrieves the pixel width required to render the item's display text with the specified font. ### `void getDisplayText(U32 bufLen, char *buf) const` Copies the item's display text into the provided buffer. ``` -------------------------------- ### Advanced String Substitution in Client Command (TGE) Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/Networking Illustrates complex string substitution within a commandToClient call. This example shows how '%1', '%2', etc., can be used multiple times and reference different arguments to construct intricate messages on the client side. ```tscript CommandToClient('EchoMessage', '%1 is a good %2 for %3', '%1 the good %2', 'Role Model', 'SuperDood %1', 'the dude of super'); // The corresponding clientCmdEchoMessage function would parse these arguments. ``` -------------------------------- ### SceneObject::getNumCurrZones Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classSceneObject Gets the total number of zones the object currently resides in. ```APIDOC ## SceneObject::getNumCurrZones ### Description Gets the number of zones containing this object. ### Method U32 getNumCurrZones() const ### Parameters None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **Return Value** (U32) - The number of zones the object is in. #### Response Example ```json { "numZones": 1 } ``` ``` -------------------------------- ### Member Function Documentation Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/structTSShapeInstance_1_1ObjectInstance Provides detailed documentation for specific member functions, including parameters, return types, and implementation notes. ```APIDOC ## Member Function Documentation ### `getTransform` `MatrixF * TSShapeInstance::ObjectInstance::getTransform () [inline]` Gets the transform of this object. ### `render` `virtual void TSShapeInstance::ObjectInstance::render (S32 _objectDetail_, TSMaterialList *) [virtual]` Render! This draws the base-textured object. Reimplemented in `TSShapeInstance::MeshObjectInstance`, and `TSShapeInstance::DecalObjectInstance`. ### `renderEnvironmentMap` `virtual void TSShapeInstance::ObjectInstance::renderEnvironmentMap (S32 _objectDetail_, TSMaterialList *) [virtual]` Renders the environment map. Reimplemented in `TSShapeInstance::MeshObjectInstance`. ### `renderDetailMap` `virtual void TSShapeInstance::ObjectInstance::renderDetailMap (S32 _objectDetail_, TSMaterialList *) [virtual]` Renders the detail map. Reimplemented in `TSShapeInstance::MeshObjectInstance`. ### `renderFog` `virtual void TSShapeInstance::ObjectInstance::renderFog (S32 _objectDetail_, TSMaterialList *) [virtual]` Renders the fog texture. Reimplemented in `TSShapeInstance::MeshObjectInstance`. ### `renderLightMap` `virtual void TSShapeInstance::ObjectInstance::renderLightMap (S32 _objectDetail_, TSMaterialList *) [virtual]` Renders the lightmap. Reimplemented in `TSShapeInstance::MeshObjectInstance`. ### `buildPolyList` `virtual bool TSShapeInstance::ObjectInstance::buildPolyList (S32 _objectDetail_, AbstractPolyList *, U32 &_surfaceKey) [virtual]` Reimplemented in `TSShapeInstance::MeshObjectInstance`, and `TSShapeInstance::DecalObjectInstance`. ### `getFeatures` `virtual bool TSShapeInstance::ObjectInstance::getFeatures (S32 _objectDetail_, const MatrixF &_mat_, const Point3F &_n_, ConvexFeature *, U32 &_surfaceKey) [virtual]` Reimplemented in `TSShapeInstance::MeshObjectInstance`. ### `support` `virtual void TSShapeInstance::ObjectInstance::support (S32 _od_, const Point3F &_v_, F32 *_currMaxDP_, Point3F *_currSupport_) [virtual]` Reimplemented in `TSShapeInstance::MeshObjectInstance`. ### `castRay` `virtual bool TSShapeInstance::ObjectInstance::castRay (S32 _objectDetail_, const Point3F &_start_, const Point3F &_end_, RayInfo *) [virtual]` Ray cast for collision detection. Reimplemented in `TSShapeInstance::MeshObjectInstance`, and `TSShapeInstance::DecalObjectInstance`. ``` -------------------------------- ### SceneObject Position and Velocity Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classSceneObject Functions for getting and setting the position and velocity of a SceneObject. ```APIDOC ## Public Member Functions - Position and Velocity ### getPosition Returns the position of the object. - **Method**: Point3F - **Signature**: `getPosition() const` ### getRenderPosition Returns the render-position of the object. - **Method**: Point3F - **Signature**: `getRenderPosition() const` ### setPosition Sets the position of the object. - **Method**: void - **Signature**: `setPosition(const Point3F &pos)` ### getVelocity Gets the velocity of the object. - **Method**: virtual Point3F - **Signature**: `getVelocity() const` ### setVelocity Sets the velocity of the object. - **Method**: virtual void - **Signature**: `setVelocity(const Point3F &v)` ``` -------------------------------- ### Platform System Operations Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/structPlatform Functions for managing system sleep, initialization, and shutdown. ```APIDOC ## Platform::sleep ### Description Pauses the execution of the current thread for a specified duration. ### Method `static void sleep(U32 _ms_)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (void) This function does not return a value. #### Response Example None ``` ```APIDOC ## Platform::init ### Description Initializes the platform-specific functionalities. ### Method `static void init()` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (void) This function does not return a value. #### Response Example None ``` ```APIDOC ## Platform::initConsole ### Description Initializes the platform's console output. ### Method `static void initConsole()` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (void) This function does not return a value. #### Response Example None ``` ```APIDOC ## Platform::shutdown ### Description Shuts down the platform-specific functionalities. ### Method `static void shutdown()` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (void) This function does not return a value. #### Response Example None ``` ```APIDOC ## Platform::process ### Description Processes platform-specific events or tasks. ### Method `static void process()` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (void) This function does not return a value. #### Response Example None ``` ```APIDOC ## Platform::forceShutdown ### Description Forces the shutdown of the platform with a specific return value. ### Method `static void forceShutdown(S32 _returnValue_)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (void) This function does not return a value. #### Response Example None ``` -------------------------------- ### ResManager::getPathOf Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classResManager Gets the path of a file relative to the base game directory. ```APIDOC ## ResManager::getPathOf ### Description Gets the path of the file from the base directory. ### Method `const char*` ### Endpoint `ResManager::getPathOf(const char * _filename_) ### Parameters #### Path Parameters - `_filename_` (const char *) - The name of the file. #### Query Parameters None #### Request Body None ### Request Example ``` const char* basePathRelativePath = ResManager::getPathOf("config/settings.ini"); ``` ### Response #### Success Response (200) - `const char*` - The relative path of the file from the base game directory. Returns NULL if the file is not found. #### Response Example ```json { "base_relative_path": "config/settings.ini" } ``` ``` -------------------------------- ### sgSetupLighting Function - TGE Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classsgPlanarLightMap Sets up the lighting process for sgPlanarLightMap. It is related to sgLightMap::sgCalculateLighting. ```cpp void sgSetupLighting() ``` -------------------------------- ### SceneObject::collideBox Source: https://bl.kenko.dev/Websites/docs.garagegames.com/tge/official/content/documentation/Engine/Reference/classSceneObject Checks for collision with a box defined by start and end points. ```APIDOC ## SceneObject::collideBox ### Description Checks for collision with a box defined by start and end points. This method is reimplemented in TerrainBlock. ### Method virtual bool collideBox(const Point3F &_start, const Point3F &_end, RayInfo *_info) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **_start_** (const Point3F &) - Start point of the box. - **_end_** (const Point3F &) - End point of the box. - **_info_** (RayInfo *) - Collision information. #### Response Example ```json { "collided": true } ``` ```