Elaztek Developer Hub
Blamite Game Engine - Guerilla (Library)  00390.07.02.23.1947.blamite
The tag editor for the Blamite Game Engine.
tag_compiler.cpp File Reference
#include "tags.h"
#include "components/tags/fields/block/block.h"
#include "components/tags/fields/tagref/tagref.h"
#include "components/tags/fields/dataref/dataref.h"
#include <Strings/components/utils/io/io.h>
#include <Strings/components/logger/logger.h>
#include <Strings/components/utils/string/string.h>
#include <blam/version_data.h>
#include <vector>
#include <fstream>
+ Include dependency graph for tag_compiler.cpp:

Functions

std::vector< BlamTagField * > decompile_tag_segment (BlamTag *tag, std::vector< BlamPluginField * > fields, int base_size, std::ifstream *tag_file, int start_offset)
 Decompiles a compiled tag segment. More...
 
std::vector< char > build_tagref_data_segment (int start_offset, std::vector< BlamTagField * > fields, std::vector< char > *tag_data)
 
std::vector< char > build_tag_data_segment (int start_offset, int base_size, std::vector< BlamTagField * > fields)
 Compiles a list of tag fields into a binary format. More...
 

Function Documentation

◆ build_tag_data_segment()

std::vector<char> build_tag_data_segment ( int  start_offset,
int  base_size,
std::vector< BlamTagField * >  fields 
)

Compiles a list of tag fields into a binary format.

Parameters
start_offset- Offset pointing immediately after the main field data. Used when building referenced data within a tag segment.
base_size- The base size of the list of fields.
fields- The list of fields to compile.
Returns
A list of bytes representing the tag's compiled data.
Todo:
fix dataref compilation issue where next_block_file_offset is somehow wrong
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ build_tagref_data_segment()

std::vector<char> build_tagref_data_segment ( int  start_offset,
std::vector< BlamTagField * >  fields,
std::vector< char > *  tag_data 
)
+ Here is the call graph for this function:

◆ decompile_tag_segment()

std::vector<BlamTagField*> decompile_tag_segment ( BlamTag tag,
std::vector< BlamPluginField * >  fields,
int  base_size,
std::ifstream *  tag_file,
int  start_offset 
)

Decompiles a compiled tag segment.

This is used to decompile tag data for use within Guerilla. A "segment" in this case simply refers to either the base tag data, or a tag block's entry data.

Parameters
tag- The tag being decompiled.
fields- The list of plugin fields associated with this segment.
base_size- The size of the tag segment.
tag_file- The input file stream to read data from.
start_offset- The offset in the file where the segment data begins.
Todo:
Decompile support for tagrefs
Returns
A list of decompiled tag fields.
+ Here is the call graph for this function:
+ Here is the caller graph for this function: