 |
Blamite Game Engine - Strings
00431.01.26.25.2126.blamite
A library containing general purpose utilities and classes for use in multiple projects.
|
Go to the documentation of this file.
6 #define STRINGS_API __declspec(dllexport)
8 #define STRINGS_API __declspec(dllimport)
19 #define PROJECT_SECTION(name, fields) struct name##_data fields; name##_data name = name##_data();
29 #define PROJECT_FILE_FORMAT_VERSION 1
53 std::string title =
"core";
54 std::string codename =
"core";
55 std::string publisher =
"Elaztek Studios";
56 std::string developer =
"Elaztek Studios";
57 std::string affiliates =
"";
58 std::string copyright =
"Copyright (c) Elaztek Studios 2013-2023";
59 std::string website =
"https://elaztek.com/";
60 std::string version =
"";
61 std::string icon =
"";
66 bool uses_cpp_script =
false;
67 std::string vcxproj_path =
"";
68 std::string engine_dependencies_path =
"";
69 std::string msbuild_path =
"msbuild.exe";
70 std::string msbuild_extra_args =
"";
71 std::string pre_build_commands =
"";
72 std::string post_build_commands =
"";
84 std::string user_data_folder =
"/";
86 std::string default_cache =
"mainmenu";
87 std::string campaign_info =
"";
88 std::string startup_movie =
"";
90 std::string content_root =
"";
91 std::string tags_dir =
"tags";
92 std::string movies_dir =
"bink";
93 std::string data_dir =
"data";
94 std::string cache_dir =
"maps";
95 std::string plugins_dir =
"plugins";
96 std::string fonts_dir =
"maps/fonts";
98 bool allow_user_tag_overrides =
false;
103 if ((cpp_script_info.vcxproj_path.length() >= 2 && cpp_script_info.vcxproj_path[1] ==
':') || cpp_script_info.vcxproj_path.starts_with(
"\\\\"))
105 return cpp_script_info.vcxproj_path;
108 return project_root +
"/" + cpp_script_info.vcxproj_path;
#define PROJECT_FILE_FORMAT_VERSION
The current project file format version.
Definition: project_info.h:29
std::string project_name
The name of the project.
Definition: project_info.h:48
bool GetChildNodeValueBool(rapidxml::xml_node<> *parent_node, std::string child_node_name, bool _default=false)
Retrieves the value of a child node within an XML node.
Definition: project_info.cpp:58
std::string GetVcxprojPath()
Definition: project_info.h:101
std::string project_root
The root folder for the project.
Definition: project_info.h:49
STRINGS_API void LogEvent(BlamBasicLogMessage message)
Logs an event to the logger.
Definition: logger.cpp:41
#define bstoi(x)
Macro for converting string to int. Meant as a drop-in replacement for stoi()
Definition: converters.h:17
STRINGS_API std::string FormatXMLString(std::string xml_contents, int spaces_per_indent=4)
Formats a string containing XML data into a human-readable format.
Definition: xml.cpp:91
STRINGS_API std::string GetAbsolutePathFromRelative(std::string relative_path)
Converts a relative path to an absolute file path.
Definition: io.cpp:438
STRINGS_API bool SaveProjectInfo(BlamProjectInfo project)
Saves a project information file to disk.
Definition: project_info.cpp:200
STRINGS_API BlamProjectInfo LoadProjectInfo(std::string file_path)
Loads a project information file from disk.
Definition: project_info.cpp:75
STRINGS_API bool CreateNewFile(std::string filename, std::string file_contents)
Creates a file with the specified contents, or overwrites an existing file if it already exists.
Definition: io.cpp:75
xml_node< Ch > * first_node(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
Gets first child node, optionally matching node name.
Definition: rapidxml.hpp:936
Namespace containing functions used to work with Blam Project Information files.
Definition: project_info.h:115
Structure representing a Blam Project Information file.
Definition: project_info.h:43
STRINGS_API bool IsStringInt(std::string string)
Checks whether or not a string is a valid representation of an integer.
Definition: converters.cpp:263
PROJECT_SECTION(game_info, { std::string title="core";std::string codename="core";std::string publisher="Elaztek Studios";std::string developer="Elaztek Studios";std::string affiliates="";std::string copyright="Copyright (c) Elaztek Studios 2013-2023";std::string website="https://elaztek.com/";std::string version="";std::string icon="";})
This class represents root of the DOM hierarchy.
Definition: rapidxml.hpp:139
STRINGS_API std::string GetFileNameWithoutExtension(std::string path)
Retrieves the name of the file or folder that a given path refers to, excluding the file's extension ...
Definition: io.cpp:337
Class representing a node of XML document.
Definition: rapidxml.hpp:137
STRINGS_API bool StringToBool(std::string string)
Converts a string to a boolean.
Definition: converters.cpp:67
bool load_result
Definition: project_info.h:45
STRINGS_API std::string GetContainingFolder(std::string path)
Retrieves the containing folder of a given file or directory.
Definition: io.cpp:373
std::basic_string< CharT, Traits, Allocator > to_string(uuid const &id)
Definition: uuid.h:581
std::string GetChildNodeValue(rapidxml::xml_node<> *parent_node, std::string child_node_name, std::string _default="", bool treat_as_directory=false)
Retrieves the value of a child node within an XML node.
Definition: project_info.cpp:22
xml_attribute< Ch > * first_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
Gets first attribute of node, optionally matching attribute name.
Definition: rapidxml.hpp:1025
int format_version
Definition: project_info.h:47
@ Warning
Indicates a warning message. Not something critical, but something that could cause unexpected behavi...
std::string file_path
Definition: project_info.h:46
#define STRINGS_API
Definition: project_info.h:8
void parse(Ch *text)
Parses zero-terminated XML string according to given flags.
Definition: rapidxml.hpp:1381