Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
tag_io.cpp File Reference
+ Include dependency graph for tag_io.cpp:

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...
 
void * LoadTagDataSection (int offset, int size, void *tag_data_start_address)
 Loads a tag data section from a file. More...
 
bool LoadTagDataSection__New (void *tag_address, int size, int header_size)
 
bool FixupClonedTagData (void *tag_address, int size, void *original_tag_address)
 
std::vector< char > BuildTagDataSection (void *section_data, int size, int start_offset)
 Prepares a tag data section for saving. More...
 

Variables

std::vector< std::string > extra_tag_search_folders = std::vector<std::string>()
 

Function Documentation

◆ BuildTagDataSection()

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.

Parameters
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.
Returns
A list of bytes representing the tag data section.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FixupClonedTagData()

bool FixupClonedTagData ( void *  tag_address,
int  size,
void *  original_tag_address 
)
+ Here is the caller graph for this function:

◆ LoadSectionTagReferences()

void LoadSectionTagReferences ( char *  address,
int  size,
std::string  tag_path 
)

Attempts to resolve any tag references within the given tag data section.

Parameters
address- The data section address.
size- The data section size.
tag_path- The path of the tag. Used for debug messages.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadTagDataSection() [1/2]

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.

Parameters
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.
Returns
The address in memory of the newly loaded section.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadTagDataSection() [2/2]

void* LoadTagDataSection ( int  offset,
int  size,
void *  tag_data_start_address 
)

Loads a tag data section from a file.

This can be used to load both base tag data, as well as tag entry data.

Parameters
offset- The offset to read from within the tag file.
size- The size of the section data.
tag_data_start_address- Address pointing to the start of the tag data.
Returns
The address in memory of the newly loaded section.
+ Here is the call graph for this function:

◆ LoadTagDataSection__New()

bool LoadTagDataSection__New ( void *  tag_address,
int  size,
int  header_size 
)
+ Here is the caller graph for this function:

Variable Documentation

◆ extra_tag_search_folders

std::vector<std::string> extra_tag_search_folders = std::vector<std::string>()