![]() |
Blamite Game Engine - blam!
00310.02.05.21.0336.blamite
The core library for the Blamite Game Engine.
|
#include "tags.h"
#include <fstream>
#include "components/settings/config/config.h"
#include "components/content/tags/tagclass.h"
#include "components/resources/engine_definitions/engine_definitions.h"
Functions | |
void | LoadSectionTagReferences (char *address, int size, std::string tag_path) |
Attempts to resolve any tag references within the given tag data section. More... | |
void * | LoadTagDataSection (int offset, int size, std::ifstream *tag_file) |
Loads a tag data section from a file. More... | |
std::vector< char > | BuildTagDataSection (void *section_data, int size, int start_offset) |
Prepares a tag data section for saving. More... | |
std::vector<char> BuildTagDataSection | ( | void * | section_data, |
int | size, | ||
int | start_offset | ||
) |
Prepares a tag data section for saving.
This will build a list of all bytes for both the data section itself, as well as for any referenced data (such as blocks or tagrefs). It will also convert memory addresses to file offsets.
section_data | - Address of the section data, would be either the tag data, or the block entry data. |
size | - The size of the section data, would be either the tag's base size or the combined size of all block entries. |
start_offset | - The start offset of the data. Used to convert memory addresses to file offsets. |
void LoadSectionTagReferences | ( | char * | address, |
int | size, | ||
std::string | tag_path | ||
) |
Attempts to resolve any tag references within the given tag data section.
address | - The data section address. |
size | - The data section size. |
tag_path | - The path of the tag. Used for debug messages. |
void* LoadTagDataSection | ( | int | offset, |
int | size, | ||
std::ifstream * | tag_file | ||
) |
Loads a tag data section from a file.
This can be used to load both base tag data, as well as tag entry data.
offset | - The offset to read from within the tag file. |
size | - The size of the section data. |
tag_file | - Pointer to the tag file to read from. |