### Initialize and Run a Classic Game Loop Source: https://libtcod.readthedocs.io/en/latest/annotated.html Example of setting up a root console and running a standard turn-based game loop. ```cpp TCODConsole::initRoot(80,50,"my game",false); while (!endGame && !TCODConsoleisWindowClosed()) { ... draw on TCODConsole::root TCODConsole::flush(); TCOD_key_t key; TCODConsole::waitForEvent(TCOD_EVENT_KEY_PRESS,&key,NULL,true); ... update world, using key } ``` -------------------------------- ### libtcod Functions Source: https://libtcod.readthedocs.io/en/latest/functions_func_n.html This section lists documented functions available in the libtcod library, categorized by their starting letter. ```APIDOC ## Functions Documentation ### Description This section lists all documented functions within the libtcod library. ### Functions #### - n - * **new_console()** : TCOD_Context * **newStructure()** : TCODParser * **normalize()** : TCODHeightMap ``` -------------------------------- ### libtcod Functions Source: https://libtcod.readthedocs.io/en/latest/functions_func_c.html A list of documented functions available in the libtcod library, categorized by their starting letter. ```APIDOC ## Functions Documentation ### Description This section lists all documented functions within the libtcod library, organized alphabetically. ### Functions #### - c - * `checkForEvent()` : TCODSystem * `clamp()` : TCODHeightMap * `clear()` : TCODConsole, TCODHeightMap, TCODList< T >, TCODMap * `clearAndDelete()` : TCODList< T > * `ColorRGB()` : tcod::ColorRGB * `ColorRGBA()` : tcod::ColorRGBA * `compute()` : TCODDijkstra, TCODPath * `computeFov()` : TCODMap * `contains()` : TCODList< T > * `convert_event_coordinates()` : TCOD_Context * `copy()` : TCODHeightMap, TCODMap * `countCells()` : TCODHeightMap * `createDirectory()` : TCODSystem * `credits()` : TCODConsole ``` -------------------------------- ### libtcod Functions Source: https://libtcod.readthedocs.io/en/latest/functions_func_h.html Lists documented functions available in the libtcod library, categorized by their starting letter. ```APIDOC ## Functions Documentation ### Description This section lists all documented functions within the libtcod library, organized alphabetically. ### Functions #### h - **hasLandOnBorder()** : TCODHeightMap - **hasMouseFocus()** : TCODConsole - **hline()** : TCODConsole ``` -------------------------------- ### libtcod Functions Source: https://libtcod.readthedocs.io/en/latest/functions_func_p.html This section lists documented functions available in the libtcod library, categorized by their starting letter. ```APIDOC ## Functions Documentation ### Description This section lists documented functions available in the libtcod library, categorized by their starting letter. ### Functions List #### - p - * **parse()** : TCODNamegen *Description: Parses data for TCODNamegen. * **parserEndStruct()** : ITCODParserListener *Description: Called when a structure parsing ends. * **parserFlag()** : ITCODParserListener *Description: Called when a flag is encountered during parsing. * **parserNewStruct()** : ITCODParserListener *Description: Called when a new structure is encountered during parsing. * **parserProperty()** : ITCODParserListener *Description: Called when a property is encountered during parsing. * **peek()** : TCODList< T > *Description: Returns the next element in the list without removing it. * **pixel_to_tile_coordinates()** : TCOD_Context *Description: Converts pixel coordinates to tile coordinates. * **pop()** : TCODList< T > *Description: Removes and returns the last element from the list. * **present()** : TCOD_Context *Description: Presents the rendered content to the screen. * **print()** : TCODConsole *Description: Prints a string to the console. * **printEx()** : TCODConsole *Description: Prints a string to the console with extended options. * **printf()** : TCODConsole *Description: Prints a formatted string to the console. * **printFrame()** : TCODConsole *Description: Prints a frame to the console. * **printRect()** : TCODConsole *Description: Prints a string within a specified rectangle on the console. * **printRectEx()** : TCODConsole *Description: Prints a string within a specified rectangle on the console with extended options. * **push()** : TCODList< T > *Description: Adds an element to the end of the list. * **put()** : TCODZip *Description: Puts data into a TCODZip archive. * **putChar()** : TCODConsole, TCODZip *Description: Puts a character onto the console or into a TCODZip archive. * **putCharEx()** : TCODConsole *Description: Puts a character with color onto the console. * **putColor()** : TCODZip *Description: Puts color data into a TCODZip archive. * **putConsole()** : TCODZip *Description: Puts console data into a TCODZip archive. * **putData()** : TCODZip *Description: Puts raw data into a TCODZip archive. * **putFloat()** : TCODZip *Description: Puts a float into a TCODZip archive. * **putImage()** : TCODZip *Description: Puts image data into a TCODZip archive. * **putInt()** : TCODZip *Description: Puts an integer into a TCODZip archive. * **putRandom()** : TCODZip *Description: Puts random data into a TCODZip archive. * **putString()** : TCODZip *Description: Puts a string into a TCODZip archive. ``` -------------------------------- ### libtcod Function Index Source: https://libtcod.readthedocs.io/en/latest/functions_func.html A list of documented functions and their associated classes starting with the letter 'a'. ```APIDOC ## Function Index: 'a' ### Description List of documented functions and class members starting with 'a'. ### Functions - **add()** : TCODHeightMap - **addAll()** : TCODList< T > - **addFbm()** : TCODHeightMap - **addFlag()** : TCODParserStruct - **addHill()** : TCODHeightMap - **addListProperty()** : TCODParserStruct - **addProperty()** : TCODParserStruct - **addStructure()** : TCODParserStruct - **addValueList()** : TCODParserStruct - **addVoronoi()** : TCODHeightMap - **at()** : tcod::Matrix< T, Dimensions, Container >, tcod::MatrixView< T, Dimensions > ``` -------------------------------- ### libtcod Functions Source: https://libtcod.readthedocs.io/en/latest/functions_func_m.html A list of documented functions available in the libtcod library, categorized by their starting letter. ```APIDOC ## Functions ### mapAsciiCodesToFont() * **Class**: TCODConsole * **Description**: Maps ASCII codes to font characters. ### mapAsciiCodeToFont() * **Class**: TCODConsole * **Description**: Maps a single ASCII code to a font character. ### mapStringToFont() * **Class**: TCODConsole * **Description**: Maps a string to font characters. ### Matrix() * **Class**: tcod::Matrix< T, Dimensions, Container > * **Description**: Represents a matrix with generic type T, dimensions, and container. ### MatrixView() * **Class**: tcod::MatrixView< T, Dimensions > * **Description**: Provides a view into a matrix, allowing access to a portion of its data. ### midPointDisplacement() * **Class**: TCODHeightMap * **Description**: Generates a heightmap using the midpoint displacement algorithm. ### multiply() * **Class**: TCODHeightMap * **Description**: Multiplies the heightmap values by a scalar. ``` -------------------------------- ### libtcod Functions Source: https://libtcod.readthedocs.io/en/latest/functions_func_l.html A list of documented functions available in the libtcod library, categorized by their starting letter. ```APIDOC ## Functions Documentation ### Description This section lists all documented functions within the libtcod library, organized alphabetically. ### Functions #### - l - * **lerp()** : TCODHeightMap * Description: Linearly interpolates between two values. * Class: TCODHeightMap * **line()** : TCODLine * Description: Implements Bresenham's line algorithm. * Class: TCODLine * **loadApf()** : TCODConsole * Description: Loads ASCII data from a file into a TCODConsole. * Class: TCODConsole * **loadAsc()** : TCODConsole * Description: Loads ASCII data from a file into a TCODConsole. * Class: TCODConsole * **loadFromFile()** : TCODZip * Description: Loads data from a file into a TCODZip object. * Class: TCODZip ``` -------------------------------- ### Class Members - n Source: https://libtcod.readthedocs.io/en/latest/functions_n.html Lists class members starting with 'n' and their return types. ```APIDOC ## Class Members - n ### Description Lists class members starting with 'n' and their return types. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response (200) - **n** (string) - Description of the class member #### Response Example N/A ## new_console() ### Description Creates a new TCOD_Context. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response (200) - **TCOD_Context** (object) - The newly created context. #### Response Example N/A ## newStructure() ### Description Creates a new TCODParser. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response (200) - **TCODParser** (object) - The newly created parser. #### Response Example N/A ## normalize() ### Description Normalizes a TCODHeightMap. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response (200) - **TCODHeightMap** (object) - The normalized height map. #### Response Example N/A ``` -------------------------------- ### libtcod Class Members - 'i' Source: https://libtcod.readthedocs.io/en/latest/functions_i.html A list of class members starting with 'i' found in the libtcod library documentation. ```APIDOC ## Class Members starting with 'i' ### Description This section lists various methods and variables available in libtcod classes that begin with the letter 'i'. ### Members - **in_bounds()** - tcod::Matrix< T, Dimensions, Container >, tcod::MatrixView< T, Dimensions > - **init()** - TCODLine - **initRoot()** - TCODConsole - **insertBefore()** - TCODList< T > - **integer_scaling** - TCOD_ViewportOptions - **isActive()** - TCODConsole - **isDirectory()** - TCODSystem - **isEmpty()** - TCODList< T >, TCODPath - **isFullscreen()** - TCODConsole - **isInFov()** - TCODMap - **isKeyPressed()** - TCODConsole - **isPropertyMandatory()** - TCODParserStruct - **isTransparent()** - TCODMap - **isWindowClosed()** - TCODConsole ``` -------------------------------- ### Class Members - 'b' Source: https://libtcod.readthedocs.io/en/latest/functions_b.html Lists members of libtcod classes that start with the letter 'b'. ```APIDOC ## Class Members - 'b' ### Description This section lists documented class members starting with 'b'. ### Members - **begin()** : tcod::Matrix< T, Dimensions, Container >, TCODList< T > - **bg** : TCOD_ConsoleTile - **bkgnd_flag** : TCOD_Console - **blit()** : TCODConsole - **buffer** : TCOD_Noise ``` -------------------------------- ### Class Members - l Source: https://libtcod.readthedocs.io/en/latest/functions_l.html List of class members starting with 'l', including variables and functions. ```APIDOC ## Class Members - l ### Description This section lists class members that start with the letter 'l'. It includes both variables and functions across different classes within the libtcod library. ### Members - **lalt** (TCOD_key_t) - Variable - **lbutton** (TCOD_mouse_t) - Variable - **lbutton_pressed** (TCOD_mouse_t) - Variable - **lctrl** (TCOD_key_t) - Variable - **lerp()** (TCODHeightMap) - Function - **line()** (TCODLine) - Function - **lmeta** (TCOD_key_t) - Variable - **loadApf()** (TCODConsole) - Function - **loadAsc()** (TCODConsole) - Function - **loadFromFile()** (TCODZip) - Function ``` -------------------------------- ### libtcod Class Members Index (p) Source: https://libtcod.readthedocs.io/en/latest/functions_p.html A comprehensive list of documented class members starting with 'p' across various libtcod classes. ```APIDOC ## Class Members Index (p) ### Overview This list contains documented class members starting with the letter 'p' for the libtcod library. ### Members - **parse()** : TCODNamegen - **parserEndStruct()** : ITCODParserListener - **parserFlag()** : ITCODParserListener - **parserNewStruct()** : ITCODParserListener - **parserProperty()** : ITCODParserListener - **peek()** : TCODList< T > - **pixel_to_tile_coordinates()** : TCOD_Context - **pixel_width** : TCOD_ContextParams - **pop()** : TCODList< T > - **present()** : TCOD_Context - **pressed** : TCOD_key_t - **print()** : TCODConsole - **printEx()** : TCODConsole - **printf()** : TCODConsole - **printFrame()** : TCODConsole - **printRect()** : TCODConsole - **printRectEx()** : TCODConsole - **push()** : TCODList< T > - **put()** : TCODZip - **putChar()** : TCODConsole, TCODZip - **putCharEx()** : TCODConsole - **putColor()** : TCODZip - **putConsole()** : TCODZip - **putData()** : TCODZip - **putFloat()** : TCODZip - **putImage()** : TCODZip - **putInt()** : TCODZip - **putRandom()** : TCODZip - **putString()** : TCODZip ``` -------------------------------- ### Class Members - 'm' Source: https://libtcod.readthedocs.io/en/latest/functions_m.html Lists all documented class members starting with 'm', including their associated class and type. ```APIDOC ## Class Members - 'm' ### Description Lists all documented class members starting with 'm', including their associated class and type. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response (200) - **map** (TCOD_Noise) - Description of the map member. - **mapAsciiCodesToFont()** (TCODConsole) - Description of the mapAsciiCodesToFont function. - **mapAsciiCodeToFont()** (TCODConsole) - Description of the mapAsciiCodeToFont function. - **mapStringToFont()** (TCODConsole) - Description of the mapStringToFont function. - **Matrix()** (tcod::Matrix< T, Dimensions, Container >) - Description of the Matrix constructor. - **MatrixView()** (tcod::MatrixView< T, Dimensions >) - Description of the MatrixView constructor. - **mbutton** (TCOD_mouse_t) - Description of the mbutton member. - **mbutton_pressed** (TCOD_mouse_t) - Description of the mbutton_pressed member. - **midPointDisplacement()** (TCODHeightMap) - Description of the midPointDisplacement function. - **multiply()** (TCODHeightMap) - Description of the multiply function. #### Response Example N/A ``` -------------------------------- ### libtcod Function Reference Source: https://libtcod.readthedocs.io/en/latest/functions_func_i.html A collection of documented functions and class members starting with the letter 'i' from the libtcod library. ```APIDOC ## Function Reference: 'i' ### Description This section lists various functions and class members available in libtcod that begin with the letter 'i'. ### Functions - **in_bounds()** - tcod::Matrix< T, Dimensions, Container >, tcod::MatrixView< T, Dimensions > - **init()** - TCODLine - **initRoot()** - TCODConsole - **insertBefore()** - TCODList< T > - **isActive()** - TCODConsole - **isDirectory()** - TCODSystem - **isEmpty()** - TCODList< T >, TCODPath - **isFullscreen()** - TCODConsole - **isInFov()** - TCODMap - **isKeyPressed()** - TCODConsole - **isPropertyMandatory()** - TCODParserStruct - **isTransparent()** - TCODMap - **isWindowClosed()** - TCODConsole ``` -------------------------------- ### Class Members - 'o' section Source: https://libtcod.readthedocs.io/en/latest/functions_o.html This section details class members starting with 'o', including observers, operators, and array accessors. ```APIDOC ## Class Members - 'o' section ### Description This section details class members starting with 'o', including observers, operators, and array accessors. ### Members - **observer** : TCOD_TilesetAtlasSDL2 - **on_delete** : TCOD_Console - **operator const TCOD_ColorRGB *()** : tcod::ColorRGB - **operator const TCOD_ColorRGBA()** : tcod::ColorRGB - **operator const TCOD_ColorRGBA *()** : tcod::ColorRGBA - **operator const TCOD_Console &()** : TCODConsole - **operator const TCOD_Console *()** : TCODConsole - **operator MatrixView< const T, Dimensions >()** : tcod::Matrix< T, Dimensions, Container > - **operator MatrixView< T, Dimensions >()** : tcod::Matrix< T, Dimensions, Container > - **operator TCOD_ColorRGB()** : tcod::ColorRGBA - **operator TCOD_ColorRGB *()** : tcod::ColorRGB - **operator TCOD_ColorRGBA *()** : tcod::ColorRGBA - **operator TCOD_Console &()** : TCODConsole - **operator TCOD_Console *()** : TCODConsole - **operator[]()** : tcod::Matrix< T, Dimensions, Container >, tcod::MatrixView< T, Dimensions > ``` -------------------------------- ### Initialize TCOD_ColorRGB Source: https://libtcod.readthedocs.io/en/latest/deprecated.html Use a braced initializer instead of the redundant TCOD_color_RGB function. ```cpp TCOD_ColorRGB white = {255, 255, 255}; ``` -------------------------------- ### libtcod Function Reference Source: https://libtcod.readthedocs.io/en/latest/functions_func_f.html Documentation for specific libtcod functions including file system and console management. ```APIDOC ## TCODSystem::fileExists ### Description Checks if a file exists on the system. ### Method Static Function ## TCODConsole::flush ### Description Flushes the console buffer to the screen. ### Method Function ## TCODSystem::forceFullscreenResolution ### Description Forces the application to use a specific fullscreen resolution. ### Method Static Function ``` -------------------------------- ### Include libtcod using FetchContent in CMake Source: https://libtcod.readthedocs.io/en/latest Use FetchContent to include libtcod in your project. Replace 'main' with the desired version or revision later than 2.2.1. Afterwards, link libtcod to your project as normal. ```cmake cmake_minimum_required(VERSION 4.2) include(FetchContent) FetchContent_Declare( libtcod GIT_REPOSITORY https://github.com/libtcod/libtcod GIT_TAG main # Replace main with desired version or revision later than 2.2.1 ) FetchContent_MakeAvailable(libtcod) target_link_libraries(${PROJECT_NAME} PRIVATE libtcod::libtcod) ``` -------------------------------- ### TCODSystem API Source: https://libtcod.readthedocs.io/en/latest/functions_r.html System-level operations for file handling and renderer registration. ```APIDOC ## TCODSystem Methods ### readFile() - **Description**: Reads a file into the system. ### registerSDLRenderer() - **Description**: Registers an SDL renderer with the system. ``` -------------------------------- ### libtcod Functions Source: https://libtcod.readthedocs.io/en/latest/functions_func_t.html Lists all documented functions available in the libtcod library, with links to their respective class documentation. ```APIDOC ## libtcod Functions ### Description This section lists all documented functions in the libtcod library, categorized by their starting letter. Each function is linked to its class documentation. ### Functions #### - t - * TCODConsole() : TCODConsole * TCODHeightMap() : TCODHeightMap * TCODList() : TCODList< T > * TCODMap() : TCODMap * TCODNoise() : TCODNoise * TCODParser() : TCODParser * TCODPath() : TCODPath * TCODRandom() : TCODRandom * TCODZip() : TCODZip ``` -------------------------------- ### Operator Overloads and Accessors Source: https://libtcod.readthedocs.io/en/latest/functions_func_o.html Documentation for various operator overloads used for type conversion and matrix indexing within libtcod classes. ```APIDOC ## Operator Overloads ### Description Provides a list of operator overloads for type conversion and data access within libtcod classes like `tcod::ColorRGB`, `tcod::ColorRGBA`, `TCODConsole`, and `tcod::Matrix`. ### Methods - `operator const TCOD_ColorRGB *()` : tcod::ColorRGB - `operator const TCOD_ColorRGBA()` : tcod::ColorRGB - `operator const TCOD_ColorRGBA *()` : tcod::ColorRGBA - `operator const TCOD_Console &()` : TCODConsole - `operator const TCOD_Console *()` : TCODConsole - `operator MatrixView< const T, Dimensions >()` : tcod::Matrix< T, Dimensions, Container > - `operator MatrixView< T, Dimensions >()` : tcod::Matrix< T, Dimensions, Container > - `operator TCOD_ColorRGB()` : tcod::ColorRGBA - `operator TCOD_ColorRGB *()` : tcod::ColorRGB - `operator TCOD_ColorRGBA *()` : tcod::ColorRGBA - `operator TCOD_Console &()` : TCODConsole - `operator TCOD_Console *()` : TCODConsole - `operator[]()` : tcod::Matrix< T, Dimensions, Container >, tcod::MatrixView< T, Dimensions > ``` -------------------------------- ### libtcod Functions Source: https://libtcod.readthedocs.io/en/latest/functions_func_b.html Lists documented functions available in the libtcod library. ```APIDOC ## Functions ### - b - - **begin()** : tcod::Matrix< T, Dimensions, Container >, TCODList< T > * Description: Initializes or starts an operation. * Class: tcod::Matrix< T, Dimensions, Container >, TCODList< T > - **blit()** : TCODConsole * Description: Copies a portion of one console to another. * Class: TCODConsole ``` -------------------------------- ### libtcod Function References Source: https://libtcod.readthedocs.io/en/latest/functions_func_e.html Documentation for specific functions found within the libtcod library classes. ```APIDOC ## Function: end() ### Description Returns the end iterator for the matrix container. ### Class tcod::Matrix< T, Dimensions, Container > --- ## Function: error() ### Description Handles or reports an error state within the parser listener. ### Class ITCODParserListener ``` -------------------------------- ### libtcod Functions Source: https://libtcod.readthedocs.io/en/latest/functions_func_w.html Lists documented functions available in the libtcod library, with links to their respective class documentation. ```APIDOC ## Functions Documentation ### Description This section lists all documented functions within the libtcod library. ### Functions #### waitForEvent() - **Class**: TCODSystem - **Description**: Waits for a system event. #### waitForKeypress() - **Class**: TCODConsole - **Description**: Waits for a key press event. #### walk() - **Class**: TCODPath - **Description**: Calculates a path for walking. #### writeFile() - **Class**: TCODSystem - **Description**: Writes data to a file. ``` -------------------------------- ### TCODSystem Utility Methods Source: https://libtcod.readthedocs.io/en/latest/functions_d.html Utility methods provided by the TCODSystem class for file and directory management. ```APIDOC ## TCODSystem::deleteDirectory ### Description Deletes a directory from the file system. ## TCODSystem::deleteFile ### Description Deletes a file from the file system. ``` -------------------------------- ### TCODConsole API Source: https://libtcod.readthedocs.io/en/latest/functions_r.html Methods for console manipulation and credit rendering. ```APIDOC ## TCODConsole Methods ### rect() - **Description**: Performs a rectangle operation on the console. ### renderCredits() - **Description**: Renders the project credits to the console. ### resetCredits() - **Description**: Resets the credit rendering state. ``` -------------------------------- ### libtcod Class Members Index Source: https://libtcod.readthedocs.io/en/latest/functions_c.html A reference list of documented class members and functions available in the libtcod library. ```APIDOC ## libtcod Class Members Index ### Description This section lists documented class members, including functions and variables, available in the libtcod library. ### Members - **checkForEvent()** (TCODSystem) - Function to check for events. - **clamp()** (TCODHeightMap) - Function to clamp height map values. - **clear()** (TCODConsole, TCODHeightMap, TCODList, TCODMap) - Function to clear data structures. - **clearAndDelete()** (TCODList) - Function to clear and delete list elements. - **compute()** (TCODDijkstra, TCODPath) - Function to compute paths or Dijkstra maps. - **computeFov()** (TCODMap) - Function to compute field of view. - **contains()** (TCODList) - Function to check if a list contains an element. - **convert_event_coordinates()** (TCOD_Context) - Function to convert event coordinates. - **copy()** (TCODHeightMap, TCODMap) - Function to copy data structures. - **countCells()** (TCODHeightMap) - Function to count cells in a height map. - **createDirectory()** (TCODSystem) - Function to create a directory. - **credits()** (TCODConsole) - Function to display credits. ``` -------------------------------- ### libtcod Class Members Index Source: https://libtcod.readthedocs.io/en/latest/functions_f.html A reference list of documented class members and functions available in the libtcod library. ```APIDOC ## Class Members Reference ### Description This section lists documented members and functions for libtcod classes. ### Members - **fg** (TCOD_ConsoleTile) - Foreground color property. - **fileExists()** (TCODSystem) - Checks if a file exists on the system. - **fillSize** (TCOD_List) - Size property for TCOD_List. - **flush()** (TCODConsole) - Flushes the console output. - **forceFullscreenResolution()** (TCODSystem) - Forces a specific fullscreen resolution. - **fore** (TCOD_Console) - Foreground color property for the console. ``` -------------------------------- ### libtcod Function Reference Source: https://libtcod.readthedocs.io/en/latest/functions_func_s.html A collection of documented functions available in the libtcod library for console management, system operations, and data manipulation. ```APIDOC ## libtcod Function Reference ### Description This section lists various functions available in the libtcod library, categorized by their functionality such as console management, system utilities, and data structures. ### Functions Overview - **save_screenshot()** (TCOD_Context) - Saves a screenshot. - **setClipboard()** (TCODSystem) - Sets the system clipboard content. - **setFps()** (TCODSystem) - Sets the frames per second for the application. - **setFullscreen()** (TCODConsole) - Toggles fullscreen mode. - **setWindowTitle()** (TCODConsole) - Sets the title of the application window. - **sleepMilli()** (TCODSystem) - Pauses execution for a specified number of milliseconds. - **step()** (TCODLine) - Performs a step in a line algorithm. ``` -------------------------------- ### Class Member Index Source: https://libtcod.readthedocs.io/en/latest/functions.html An alphabetical index of class members and functions available in the libtcod library. ```APIDOC ## Class Member Index ### Description This section lists documented class members, functions, and variables for libtcod classes. ### Members - **add()** (TCODHeightMap) - Adds values to the height map. - **addAll()** (TCODList) - Adds all elements from another list. - **addFbm()** (TCODHeightMap) - Adds fractal Brownian motion to the height map. - **addFlag()** (TCODParserStruct) - Adds a flag to the parser structure. - **addHill()** (TCODHeightMap) - Adds a hill to the height map. - **addListProperty()** (TCODParserStruct) - Adds a list property to the parser structure. - **addProperty()** (TCODParserStruct) - Adds a property to the parser structure. - **addStructure()** (TCODParserStruct) - Adds a structure to the parser structure. - **addValueList()** (TCODParserStruct) - Adds a value list to the parser structure. - **addVoronoi()** (TCODHeightMap) - Adds Voronoi noise to the height map. - **align_x** (TCOD_ViewportOptions) - Horizontal alignment option. - **alignment** (TCOD_Console) - Console alignment setting. - **allocSize** (TCOD_List) - Allocation size of the list. - **argc** (TCOD_ContextParams) - Argument count parameter. - **argv** (TCOD_ContextParams) - Argument vector parameter. - **array** (TCOD_List) - Underlying array of the list. - **at()** (tcod::Matrix, tcod::MatrixView) - Accesses an element at a specific position. ``` -------------------------------- ### Class Member Reference Source: https://libtcod.readthedocs.io/en/latest/functions_e.html Documentation for specific class members found within the libtcod library. ```APIDOC ## Class Members Reference ### Description Provides access to specific class members documented in the libtcod library. ### Members - **elements** (TCOD_Console) - Member of TCOD_Console class. - **end()** (tcod::Matrix) - Method of tcod::Matrix< T, Dimensions, Container > class. - **error()** (ITCODParserListener) - Method of ITCODParserListener class. ``` -------------------------------- ### Class Member Reference Source: https://libtcod.readthedocs.io/en/latest/functions_h.html Reference documentation for specific class members found in the libtcod library. ```APIDOC ## Class Members Reference ### Description List of documented class members for the libtcod library. ### Members - **h** (TCOD_heightmap_t) - Member variable - **has_key_color** (TCOD_Console) - Member variable - **hasLandOnBorder()** (TCODHeightMap) - Function - **hasMouseFocus()** (TCODConsole) - Function - **hline()** (TCODConsole) - Function ``` -------------------------------- ### libtcod Function Reference Source: https://libtcod.readthedocs.io/en/latest/functions_func_r.html A collection of documented functions available in the libtcod library. ```APIDOC ## Function Reference ### rainErosion() - **Class**: TCODHeightMap ### readFile() - **Class**: TCODSystem ### rect() - **Class**: TCODConsole ### registerSDLRenderer() - **Class**: TCODSystem ### remove() - **Class**: TCODList ### renderCredits() - **Class**: TCODConsole ### resetCredits() - **Class**: TCODConsole ### restore() - **Class**: TCODRandom ### reverse() - **Classes**: TCODList, TCODPath ### run() - **Class**: TCODParser ``` -------------------------------- ### TCODHeightMap Methods Source: https://libtcod.readthedocs.io/en/latest/functions_d.html Methods for manipulating height maps in libtcod. ```APIDOC ## TCODHeightMap::digBezier ### Description Performs a bezier dig operation on the height map. ## TCODHeightMap::digHill ### Description Performs a hill dig operation on the height map. ``` -------------------------------- ### Deprecated Class Source: https://libtcod.readthedocs.io/en/latest/deprecated.html Information about the deprecated TCODList class and its recommended replacement. ```APIDOC ## Deprecated Class: TCODList< T > ### Description All instances of TCODList should be replaced with `std::vector` where possible. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Deprecated Functions and Members Source: https://libtcod.readthedocs.io/en/latest/deprecated.html Details on deprecated functions, enums, and members within libtcod, along with their recommended replacements or usage notes. ```APIDOC ## Deprecated libtcod Features ### TCOD_color_RGB #### Description This function is redundant and should be replaced with a braced initializer. ### TCOD_ContextParams::tcod_version #### Description Deprecated since 2.0. You must no longer assign anything to this member. ### TCOD_DEPRECATED_ENUM #### Description Modern libtcod programs should always use the Unicode codepoint of special characters and never this enum. ### TCOD_key_t #### Description The libtcod keyboard state has several known issues such as missing or broken functionality. In its current state it exists only for backwards compatibility. These issues should be resolved by using SDL directly for keyboard events. #### TCOD_key_t::c ##### Description The nature of this attribute makes it unsuitable for both printable keys and standard key inputs. Use SDL events instead to differentiate between keycodes, symbols, and printable characters. ### TCOD_keycode_t #### Description Using libtcod for events means only a limited set of keys are available. Use SDL for events to access a complete range of keys. ### TCOD_List #### Description This object is deprecated in favor of more standard tools. In C, a library such as `stb_ds.h` should be used where a lower-level interface isn't possible. ### TCOD_mouse_t #### Description The libtcod mouse state has several known issues such as missing or broken functionality. In its current state it exists only for backwards compatibility. These issues should be resolved by using SDL directly for mouse and keyboard events. ``` -------------------------------- ### TCODSystem File Operations Source: https://libtcod.readthedocs.io/en/latest/functions_func_d.html Functions for managing file system operations within the libtcod library. ```APIDOC ## TCODSystem File Operations ### Description Provides utility functions for deleting directories and files. ### Methods - deleteDirectory() - deleteFile() ### Parameters - None specified in source. ``` -------------------------------- ### vline() - TCODConsole Source: https://libtcod.readthedocs.io/en/latest/functions_func_v.html Documentation for the vline function within the TCODConsole class. ```APIDOC ## vline() ### Description Draws a vertical line on the console. ### Method Not specified, assumed to be a member function. ### Endpoint Not applicable (library function). ### Parameters None explicitly listed in the provided text. ### Request Example None provided. ### Response #### Success Response (200) None explicitly listed. #### Response Example None provided. ``` -------------------------------- ### TCODList API Source: https://libtcod.readthedocs.io/en/latest/functions_r.html Utility methods for managing TCODList data structures. ```APIDOC ## TCODList Methods ### remove() - **Description**: Removes an item from the list. ### reverse() - **Description**: Reverses the order of elements in the list. ``` -------------------------------- ### libtcod Destructor Functions Source: https://libtcod.readthedocs.io/en/latest/functions_func_~.html This section lists the destructor functions available in the libtcod library. ```APIDOC ## ~libtcod Destructor Functions ### Description This endpoint lists the destructor functions for various libtcod classes. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response (200) - **~TCODList()** (function) - Destructor for TCODList. - **~TCODNoise()** (function) - Destructor for TCODNoise. - **~TCODParser()** (function) - Destructor for TCODParser. - **~TCODPath()** (function) - Destructor for TCODPath. - **~TCODRandom()** (function) - Destructor for TCODRandom. - **~TCODZip()** (function) - Destructor for TCODZip. #### Response Example N/A ``` -------------------------------- ### TCODHeightMap::kernelTransform Source: https://libtcod.readthedocs.io/en/latest/functions_func_k.html Applies a kernel transformation to a height map object. ```APIDOC ## kernelTransform ### Description Applies a kernel transformation to a TCODHeightMap instance. ### Method Function ### Parameters #### Path Parameters - **None** ### Response #### Success Response (200) - **Result** (TCODHeightMap) - The transformed height map object. ``` -------------------------------- ### TCODHeightMap Operations Source: https://libtcod.readthedocs.io/en/latest/functions_func_d.html Functions for manipulating heightmap data structures. ```APIDOC ## TCODHeightMap Operations ### Description Provides functions for modifying heightmap terrain data. ### Methods - digBezier() - digHill() ### Parameters - None specified in source. ``` -------------------------------- ### TCODNamegen destroy Source: https://libtcod.readthedocs.io/en/latest/functions_d.html Method to destroy or clean up TCODNamegen instances. ```APIDOC ## TCODNamegen::destroy ### Description Destroys the name generator instance. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.