Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
tags.cpp File Reference
#include "tags.h"
#include <fstream>
#include <algorithm>
#include <Strings/components/utils/io/io.h>
#include <Strings/components/utils/string/string.h>
#include "tagclass.h"
#include "components/diagnostics/logger/logger.h"
#include "components/resources/engine_definitions/engine_definitions.h"
#include "components/settings/config/config.h"

Classes

struct  tag_block_file_info
 

Functions

void ValidateDynamicTagFolders ()
 
void FixBlockAddressesOnLoad (tag_block< void > *block, std::ifstream *tag_file)
 
void LoadReferencedTags (std::string tag_path)
 Loads any tags that the given tag referenced if they aren't loaded. More...
 
void FixBlockDataForSave (char *block, int block_size, OUT int *next_offset, OUT char **bulk_block_data, OUT int *bulk_block_size)
 Performs the necessary adjustments to tag block data prior to saving. More...
 

Variables

std::vector< tag_memory_dataloaded_tags
 

Function Documentation

◆ FixBlockAddressesOnLoad()

void FixBlockAddressesOnLoad ( tag_block< void > *  block,
std::ifstream *  tag_file 
)

◆ FixBlockDataForSave()

void FixBlockDataForSave ( char *  block,
int  block_size,
OUT int *  next_offset,
OUT char **  bulk_block_data,
OUT int *  bulk_block_size 
)

Performs the necessary adjustments to tag block data prior to saving.

This will update any child blocks and any special tag fields that store their data outside of the main tag data to have their addresses replaced with file offsets in order for the tag to be read properly.

Parameters
block- Pointer to the tag block to alter
extra_offset- Pointer to an integer, will be set to the size of all child data. Used in calculation of future block offsets.

◆ LoadReferencedTags()

void LoadReferencedTags ( std::string  tag_path)

Loads any tags that the given tag referenced if they aren't loaded.

Parameters
tag_path- The path of the tag to load tagrefs for.

◆ ValidateDynamicTagFolders()

void ValidateDynamicTagFolders ( )

Variable Documentation

◆ loaded_tags

std::vector<tag_memory_data> loaded_tags