Elaztek Developer Hub
Blamite Game Engine - blam!  00423.10.27.24.0533.blamite
The core library for the Blamite Game Engine.
debug_menu.cpp File Reference
#include "debug_menu.h"
#include <regex>
#include <fstream>
#include <Strings/components/utils/io/io.h>
#include <Strings/components/3rdparty/rapidxml/rapidxml.hpp>
#include <Strings/components/utils/string/string.h>
#include <Strings/components/utils/converters/converters.h>
#include "components/resources/engine_globals/globals.h"
#include "components/diagnostics/errors/errors.h"
#include "components/diagnostics/logger/logger.h"
#include "components/settings/config/config.h"
+ Include dependency graph for debug_menu.cpp:

Functions

BlamResult load_menu_item (rapidxml::xml_node<> *entry_node, BlamDebugMenuItem **menu_item_ptr)
 Loads data for a debug menu item from an XML node. More...
 
BlamResult parse_xml_contents (std::string file_contents, bool is_legacy_txt_menu)
 
BlamResult parse_debug_menu_xml_contents (std::string file_path)
 Reads the specified file as an XML document and builds debug menu data from it. More...
 
BlamResult parse_debug_menu_txt_contents (std::string file_path)
 Reads the specified file as a text document and builds debug menu data from it. More...
 

Variables

BlamDebugMenumain_menu = nullptr
 The current debug menu information. More...
 

Function Documentation

◆ load_menu_item()

BlamResult load_menu_item ( rapidxml::xml_node<> *  entry_node,
BlamDebugMenuItem **  menu_item_ptr 
)

Loads data for a debug menu item from an XML node.

Parameters
entry_node- The XML node of the item
menu_item- Pointer to the menu item to configure
Returns
- BlamResult::Success_OK if the menu item was loaded, otherwise returns an error code if the item could not be loaded
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_debug_menu_txt_contents()

BlamResult parse_debug_menu_txt_contents ( std::string  file_path)

Reads the specified file as a text document and builds debug menu data from it.

Note
The debug_menu_init.txt file should not be used by default - this functionality is only included to allow for backwards compatibility with legacy debug menu configurations from the Halo engine, in cases where a user has an already configured menu and wants to carry it over into Blamite. For standard usage, Blamite's own debug_menu_init.xml file should be used instead.
Parameters
file_path- The path to the file containing debug menu information.
Returns
BlamResult::Success_OK if the file was parsed successfully, otherwise returns an error code.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_debug_menu_xml_contents()

BlamResult parse_debug_menu_xml_contents ( std::string  file_path)

Reads the specified file as an XML document and builds debug menu data from it.

Parameters
file_path- The path to the file containing debug menu information.
Returns
BlamResult::Success_OK if the file was parsed successfully, otherwise returns an error code.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_xml_contents()

BlamResult parse_xml_contents ( std::string  file_contents,
bool  is_legacy_txt_menu 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ main_menu

BlamDebugMenu* main_menu = nullptr

The current debug menu information.