Elaztek Developer Hub
Blamite Game Engine - Strings  00411.04.21.24.0017.blamite
A library containing general purpose utilities and classes for use in multiple projects.
project_info.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 #ifdef STRINGS_EXPORTS
6 #define STRINGS_API __declspec(dllexport)
7 #else
8 #define STRINGS_API __declspec(dllimport)
9 #endif
10 
19 #define PROJECT_FILE_FORMAT_VERSION 1
20 
34 {
35  bool load_result = false;
36  std::string file_path = "";
37  int format_version = 0;
38 
40  {
41  std::string title = "core";
42  std::string codename = "core";
43  std::string publisher = "Elaztek Studios";
44  std::string developer = "Elaztek Studios";
45  std::string affiliates = "";
46  std::string copyright = "Copyright (c) Elaztek Studios 2013-2023";
47  std::string website = "https://elaztek.com/";
48  std::string version = "";
49  std::string icon = "";
50  };
51 
53 
55  {
56  std::string update_info_url = "";
57  std::string mods_info_url = "";
58  std::string invision_api_url = "";
59  };
60 
62 
64  {
65  std::string default_cache = "mainmenu";
66  std::string campaign_info = "";
67  std::string startup_movie = "";
68 
69  std::string content_root = "";
70  std::string tags_dir = "tags";
71  std::string movies_dir = "bink";
72  std::string data_dir = "data";
73  std::string cache_dir = "maps";
74  std::string plugins_dir = "plugins";
75  std::string fonts_dir = "maps/fonts";
76 
78  };
79 
81 };
82 
87 {
95  STRINGS_API BlamProjectInfo LoadProjectInfo(std::string file_path);
96 
105 }
BlamProjectInfo::game_info_data::affiliates
std::string affiliates
Definition: project_info.h:45
PROJECT_FILE_FORMAT_VERSION
#define PROJECT_FILE_FORMAT_VERSION
The current project file format version.
Definition: project_info.h:19
BlamProjectInfo::game_info
game_info_data game_info
Definition: project_info.h:52
logger.h
GetChildNodeValueBool
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
BlamProjectInfo::engine_settings
engine_settings_data engine_settings
Definition: project_info.h:80
BlamProjectInfo::network_settings_data::update_info_url
std::string update_info_url
Definition: project_info.h:56
BlamProjectInfo::game_info_data::publisher
std::string publisher
Definition: project_info.h:43
BlamProjectInfo::engine_settings_data::movies_dir
std::string movies_dir
Definition: project_info.h:71
BlamProjectInfo::engine_settings_data::allow_user_tag_overrides
bool allow_user_tag_overrides
Definition: project_info.h:77
project_info.h
BlamStrings::Logger::LogEvent
STRINGS_API void LogEvent(BlamBasicLogMessage message)
Logs an event to the logger.
Definition: logger.cpp:41
BlamProjectInfo::game_info_data::developer
std::string developer
Definition: project_info.h:44
bstoi
#define bstoi(x)
Macro for converting string to int. Meant as a drop-in replacement for stoi()
Definition: converters.h:17
BlamProjectInfo::engine_settings_data::campaign_info
std::string campaign_info
Definition: project_info.h:66
xml.h
BlamProjectInfo::game_info_data
Definition: project_info.h:39
BlamStrings::Utils::XML::FormatXMLString
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
BlamProjectInfo::engine_settings_data::plugins_dir
std::string plugins_dir
Definition: project_info.h:74
BlamProjectInfo::engine_settings_data::tags_dir
std::string tags_dir
Definition: project_info.h:70
BlamStrings::Resources::ProjectInfo::SaveProjectInfo
STRINGS_API bool SaveProjectInfo(BlamProjectInfo project)
Saves a project information file to disk.
Definition: project_info.cpp:190
BlamProjectInfo::network_settings
network_settings_data network_settings
Definition: project_info.h:61
BlamStrings::Resources::ProjectInfo::LoadProjectInfo
STRINGS_API BlamProjectInfo LoadProjectInfo(std::string file_path)
Loads a project information file from disk.
Definition: project_info.cpp:75
BlamProjectInfo::network_settings_data::invision_api_url
std::string invision_api_url
Definition: project_info.h:58
BlamStrings::Utils::IO::CreateNewFile
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
rapidxml::xml_node::first_node
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
BlamStrings::Resources::ProjectInfo
Namespace containing functions used to work with Blam Project Information files.
Definition: project_info.h:86
BlamProjectInfo::engine_settings_data::default_cache
std::string default_cache
Definition: project_info.h:65
BlamProjectInfo
Structure representing a Blam Project Information file.
Definition: project_info.h:33
BlamStrings::Converters::IsStringInt
STRINGS_API bool IsStringInt(std::string string)
Checks whether or not a string is a valid representation of an integer.
Definition: converters.cpp:263
BlamProjectInfo::game_info_data::version
std::string version
Definition: project_info.h:48
BlamProjectInfo::engine_settings_data::cache_dir
std::string cache_dir
Definition: project_info.h:73
BlamProjectInfo::game_info_data::icon
std::string icon
Definition: project_info.h:49
rapidxml::xml_document
This class represents root of the DOM hierarchy.
Definition: rapidxml.hpp:139
BlamProjectInfo::engine_settings_data
Definition: project_info.h:63
rapidxml::xml_node
Class representing a node of XML document.
Definition: rapidxml.hpp:137
BlamProjectInfo::engine_settings_data::data_dir
std::string data_dir
Definition: project_info.h:72
BlamStrings::Converters::StringToBool
STRINGS_API bool StringToBool(std::string string)
Converts a string to a boolean.
Definition: converters.cpp:67
BlamProjectInfo::load_result
bool load_result
Definition: project_info.h:35
BlamProjectInfo::engine_settings_data::content_root
std::string content_root
Definition: project_info.h:69
uuids::to_string
std::basic_string< CharT, Traits, Allocator > to_string(uuid const &id)
Definition: uuid.h:581
io.h
BlamProjectInfo::game_info_data::website
std::string website
Definition: project_info.h:47
BlamProjectInfo::engine_settings_data::startup_movie
std::string startup_movie
Definition: project_info.h:67
BlamProjectInfo::network_settings_data
Definition: project_info.h:54
GetChildNodeValue
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
BlamProjectInfo::game_info_data::title
std::string title
Definition: project_info.h:41
BlamProjectInfo::game_info_data::copyright
std::string copyright
Definition: project_info.h:46
converters.h
rapidxml.hpp
BlamProjectInfo::engine_settings_data::fonts_dir
std::string fonts_dir
Definition: project_info.h:75
rapidxml::xml_node::first_attribute
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
BlamProjectInfo::format_version
int format_version
Definition: project_info.h:37
BlamProjectInfo::game_info_data::codename
std::string codename
Definition: project_info.h:42
BlamLogLevel::Warning
@ Warning
Indicates a warning message. Not something critical, but something that could cause unexpected behavi...
BlamProjectInfo::file_path
std::string file_path
Definition: project_info.h:36
STRINGS_API
#define STRINGS_API
Definition: project_info.h:8
rapidxml::xml_document::parse
void parse(Ch *text)
Parses zero-terminated XML string according to given flags.
Definition: rapidxml.hpp:1381
BlamProjectInfo::network_settings_data::mods_info_url
std::string mods_info_url
Definition: project_info.h:57