Elaztek Developer Hub
Blamite Game Engine - Guerilla (Library)  00456.10.01.26.0053.blamite
The tag editor for the Blamite Game Engine.
bitmap.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 #ifdef GUERILLA_LIB_EXPORTS
6 #define GUERILLA_LIB_API __declspec(dllexport)
7 #else
8 #define GUERILLA_LIB_API __declspec(dllimport)
9 #endif
10 
17 {
18  GUERILLA_LIB_API bool ImportBitmap(std::string file_path, std::string output_directory, bool treat_as_new);
19 }
block.h
render_model_report_type::error
@ error
bitfield.h
bitmap.h
BlamPluginField_Block::GetField
BlamPluginField * GetField(std::string id)
Locates a field within the entry template with a specified ID.
Definition: BlamPluginField_Block.cpp:25
tags.h
supported_pixel_formats
std::map< SailPixelFormat, std::string > supported_pixel_formats
Definition: bitmap.cpp:24
BlamTagField_Dataref::SetText
void SetText(std::string text_value)
Sets the dataref's stored value to a given string.
Definition: BlamTagField_Dataref.cpp:84
BlamTagField_Block::entries
std::vector< BlamTagBlockEntry * > entries
The list of entries within this block.
Definition: block.h:175
srgb_to_linear
float srgb_to_linear(float srgb_value)
Converts a single sRGB-encoded color channel value to linear space.
Definition: bitmap.cpp:134
Guerilla::Tags::Compiler::Compile
GUERILLA_LIB_API BlamResult Compile(BlamTag *tag, std::string compiled_file_path)
Compiles the tag data to a file that can be used with the engine.
Definition: tag_compiler.cpp:560
BlamTagField_Vector::value
BlamVector4 value
The value of the field, represented as a 4D vector.
Definition: vector.h:48
BlamTagBlockEntry
Data structure representing a tag block entry.
Definition: block.h:30
Guerilla::Tags::GetPlugin
GUERILLA_LIB_API BlamPlugin * GetPlugin(std::string class_name)
Retrieves a plugin based on its name.
Definition: plugins.cpp:137
linear_to_srgb
float linear_to_srgb(float linear_value)
Converts a single linear-space color channel value to sRGB encoding.
Definition: bitmap.cpp:155
Guerilla::Tags::Importers::Bitmap
Namespace containing functions used for importing bitmap tags from source assets.
Definition: bitmap.h:16
BlamPluginField_Block
Class representing a block plugin field.
Definition: block.h:113
dataref.h
Guerilla::Tags::Fields::GetFieldTypeName
GUERILLA_LIB_API std::string GetFieldTypeName(BlamTagFieldType type)
Generates a string name based on the provided tag field type.
Definition: fields.cpp:230
mip_chain_is_gpu_addressable
bool mip_chain_is_gpu_addressable(int width, int height, bimg::TextureFormat::Enum format)
Checks whether a complete mip chain for these dimensions can actually be addressed by the GPU in a bl...
Definition: bitmap.cpp:436
BlamTagField_Bitfield
Clas representing a bitfield tag field.
Definition: bitfield.h:66
BlamTagField_Block
Class representing a block tag field.
Definition: block.h:172
BlamTagBlockEntry::GetField
BlamTagField * GetField(std::string field_id)
Locates a field within the entry with a specified ID.
Definition: BlamTagBlockEntry.cpp:16
BlamTagField_Dataref
Class representing a dataref tag field.
Definition: dataref.h:46
BlamTag
Class representing a Tag.
Definition: tags.h:319
validate_image_pixel_format
bool validate_image_pixel_format(sail_image **image_pointer, SailPixelFormat default_pixel_format=SailPixelFormat::SAIL_PIXEL_FORMAT_BPP32_RGBA)
Ensures that the provided image is converted to a supported pixel format.
Definition: bitmap.cpp:41
update_format_value
void update_format_value(BlamTagField_Enum *format_field, SailPixelFormat pixel_format)
Definition: bitmap.cpp:65
BlamTag::GetField
BlamTagField * GetField(std::string field_id)
Locates a tag field with a specific ID.
Definition: BlamTag.cpp:784
compute_mip_count
int compute_mip_count(int width, int height)
Computes the number of mip levels in a complete chain for the given dimensions.
Definition: bitmap.cpp:252
BlamTagField_Enum::current_option
std::string current_option
The ID of the currently selected option.
Definition: enum.h:83
BlamTagField_Dataref::data_size
int data_size
The size of the referenced data.
Definition: dataref.h:50
BlamTagField_Enum
Class representing a tag enum field.
Definition: enum.h:80
BlamTag::SaveToDisk
void SaveToDisk(std::string _file_path)
Saves any modifications to the XML tag back to disk.
Definition: BlamTag.cpp:616
build_mipped_rgba8_image
bimg::ImageContainer * build_mipped_rgba8_image(bx::AllocatorI *allocator, const bimg::ImageContainer &source, bool treat_as_srgb)
Produces a copy of an image with a complete mip chain attached, ready to be handed to bimg::imageEnco...
Definition: bitmap.cpp:371
Guerilla::Tags::LoadTag
GUERILLA_LIB_API BlamTag * LoadTag(std::string file_path)
Attempts to load a tag from disk and link plugin data.
Definition: tags.cpp:161
BlamPlugin
Class representing a Plugin.
Definition: tags.h:93
supported_pixel_formats_bimg
std::map< bimg::TextureFormat::Enum, std::string > supported_pixel_formats_bimg
Definition: bitmap.cpp:25
BlamTagField_Int
Class representing an integer tag field.
Definition: int.h:33
BlamTagField_Block::CreateNewEntry
BlamTagBlockEntry * CreateNewEntry()
Creates a new block entry based on the plugin's entry template.
Definition: BlamTagField_Block.cpp:99
BlamTagField_Vector
Class representing a vector tag field.
Definition: vector.h:43
build_mip_chain_rgba8
void * build_mip_chain_rgba8(const void *base_pixel_data, int base_width, int base_height, bool treat_as_srgb, int *out_chain_size)
Builds a complete RGBA8 mip chain from a base level.
Definition: bitmap.cpp:316
BlamTagField_Dataref::data_address
void * data_address
The address of the referenced data.
Definition: dataref.h:49
BlamTagUpgradePolicy::UPGRADE_IF_NEWER
@ UPGRADE_IF_NEWER
Instructs the tag to allow the use of equal or newer plugin versions.
downsample_mip_2x2
void downsample_mip_2x2(const uint8_t *source, int source_width, int source_height, uint8_t *destination, int destination_width, int destination_height, bool treat_as_srgb)
Generates the next mip level for an RGBA8 image by averaging 2x2 pixel blocks.
Definition: bitmap.cpp:183
vector.h
BlamTagField_Bitfield::SetBit
bool SetBit(std::string flag_id, bool value)
Sets the value of a bitfield flag.
Definition: BlamTagField_Bitfield.cpp:194
Guerilla::Tags::Importers::Bitmap::ImportBitmap
GUERILLA_LIB_API bool ImportBitmap(std::string file_path, std::string output_directory, bool treat_as_new)
Definition: bitmap.cpp:591
GUERILLA_LIB_API
#define GUERILLA_LIB_API
Definition: bitmap.h:8
write_import_info
void write_import_info(BlamTagField_Block *import_info, int64_t file_size, std::string file_path, std::string file_format, std::string source_pixel_format, std::string parsed_pixel_format)
Definition: bitmap.cpp:102
encode_mipped_image
bimg::ImageContainer * encode_mipped_image(bx::AllocatorI *allocator, bimg::TextureFormat::Enum destination_format, bimg::Quality::Enum quality, const bimg::ImageContainer &source)
Encodes an image and every mip level it carries into a block-compressed format.
Definition: bitmap.cpp:514
BlamPlugin::CreateNewTag
BlamTag * CreateNewTag()
Creates a new tag using the plugin.
Definition: BlamPlugin.cpp:386
BlamPlugin::GetField
BlamPluginField * GetField(std::string id)
Attempts to locate a field with a given ID.
Definition: BlamPlugin.cpp:448
BlamTagField_Bitfield::GetBitValue
bool GetBitValue(std::string flag_id)
Retrieves the value of a bitfield flag.
Definition: BlamTagField_Bitfield.cpp:181
BlamTagField_Int::value
int64_t value
The value of the field, represented as a 32-bit integer.
Definition: int.h:38
int.h
compute_mip_chain_size_rgba8
int compute_mip_chain_size_rgba8(int base_width, int base_height)
Computes the total byte count required to hold a complete mip chain for an RGBA8 image of the given b...
Definition: bitmap.cpp:280
enum.h