Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
block.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 
7 
8 #ifdef BLAM_EXPORTS
9 #define BLAM_EXT_API __declspec(dllexport)
10 #else
11 #define BLAM_EXT_API __declspec(dllimport)
12 #endif
13 
22 {
23 private:
24  float indent = 22.0f;
25 
26 public:
27  std::vector<BlamTagClassField*> block_template;
28  int active_entry = 0;
30 
31  int entry_size = 0;
32  int max_entries = -1;
33 
34  BlockField(int _entry_size, std::string _display_name, std::string _extra_info, std::vector<BlamTagClassField*> _block_template);
35 
36  BlockField(int _entry_size, std::string _display_name, std::string _extra_info, int _max_entries, std::vector<BlamTagClassField*> _block_template);
37 
38  void SetMemoryLocation(void* new_address);
39 
40  std::string GetFieldXMLString(int offset);
41 
45  void ShowImPropertyControl();
46 };
tag_block::entry_size
int entry_size
The size of each block entry.
Definition: tags.h:179
block.h
BlockField::ShowImPropertyControl
void ShowImPropertyControl()
Definition: block.cpp:52
tag_block::entry_data_address
void * entry_data_address
The address of the blocks' entry data.
Definition: tags.h:181
Blam::Logger::LogEvent
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:142
ImGui::PopItemWidth
IMGUI_API void PopItemWidth()
Definition: imgui.cpp:6183
tag_block< void >
BlamTagClassField.h
logger.h
BLAM_EXT_API
#define BLAM_EXT_API
Definition: block.h:11
imgui.h
BlamTagClassField::display_name
std::string display_name
The display name of the tag field.
Definition: BlamTagClassField.h:31
BlamTagClassField::GetFieldXMLString
virtual std::string GetFieldXMLString(int offset)
Generates a string representing an XML node associated with this tag field, used for generating plugi...
Definition: BlamTagClassField.cpp:32
BlockField::BlockField
BlockField(int _entry_size, std::string _display_name, std::string _extra_info, std::vector< BlamTagClassField * > _block_template)
Definition: block.cpp:8
BlockField::entry_size
int entry_size
The size of each block entry.
Definition: block.h:31
ImGui::SameLine
IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f)
Definition: imgui.cpp:7147
BlamTagClassField
Base class representing a plugin field.
Definition: BlamTagClassField.h:28
BlamTagFieldType
BlamTagFieldType
Enumerator listing all possible plugin field types.
Definition: tags.h:30
NULL
Add a fourth parameter to bake specific font ranges NULL
Definition: README.txt:57
BlockField::max_entries
int max_entries
The maximum number of entries that this block can contain.
Definition: block.h:32
BlockField::active_entry
int active_entry
The index of the active entry.
Definition: block.h:28
ImGui::CollapsingHeader
IMGUI_API bool CollapsingHeader(const char *label, ImGuiTreeNodeFlags flags=0)
Definition: imgui_widgets.cpp:5422
ImGui::Unindent
IMGUI_API void Unindent(float indent_w=0.0f)
Definition: imgui.cpp:7178
ImGui::Text
IMGUI_API void Text(const char *fmt,...) IM_FMTARGS(1)
Definition: imgui_widgets.cpp:238
tag_block::entry_count
int entry_count
The number of entries within the tag block.
Definition: tags.h:182
ImGui::BeginCombo
IMGUI_API bool BeginCombo(const char *label, const char *preview_value, ImGuiComboFlags flags=0)
Definition: imgui_widgets.cpp:1416
ImGui::Selectable
IMGUI_API bool Selectable(const char *label, bool selected=false, ImGuiSelectableFlags flags=0, const ImVec2 &size=ImVec2(0, 0))
Definition: imgui_widgets.cpp:5469
BlamTagClassField::read_address
void * read_address
The address of the data the field is currently representing.
Definition: BlamTagClassField.h:36
ImGui::PopID
IMGUI_API void PopID()
Definition: imgui.cpp:7026
BlockField::GetFieldXMLString
std::string GetFieldXMLString(int offset)
Generates a string representing an XML node associated with this tag field, used for generating plugi...
Definition: block.cpp:32
BlamTagClassField::SetMemoryLocation
virtual void SetMemoryLocation(void *new_address)
Sets the address of the data that the plugin field should display.
Definition: BlamTagClassField.cpp:27
ImGui::EndCombo
IMGUI_API void EndCombo()
Definition: imgui_widgets.cpp:1522
BlockField::block_info
tag_block< void > * block_info
Pointer to the current block info being represented.
Definition: block.h:29
BlamTagClassField::read_length
int read_length
How many bytes to read from the start of the address.
Definition: BlamTagClassField.h:37
BlockField::block_template
std::vector< BlamTagClassField * > block_template
The list of block entries in this block.
Definition: block.h:27
BlamTagFieldType::Block
@ Block
Indicates that the field is a tag block.
BlockField::SetMemoryLocation
void SetMemoryLocation(void *new_address)
Sets the address of the data that the plugin field should display.
Definition: block.cpp:27
tags.h
ImGui::Indent
IMGUI_API void Indent(float indent_w=0.0f)
Definition: imgui.cpp:7170
BlamTagClassField::ShowImPropertyControl
virtual void ShowImPropertyControl()
Shows a set of ImGUI controls representing the tag field.
Definition: BlamTagClassField.cpp:22
BlockField
Class representing a tag block field, also sometimes referred to as a struct or reflexive in the modd...
Definition: block.h:21
BlamTagClassField::extra_info
std::string extra_info
Additional information to show alongside the field.
Definition: BlamTagClassField.h:32
ImGui::PushItemWidth
IMGUI_API void PushItemWidth(float item_width)
Definition: imgui.cpp:6160
ImGui::PushID
IMGUI_API void PushID(const char *str_id)
Definition: imgui.cpp:6995
tag_block::block_identifier
char block_identifier[4]
The tag block identifier. Will always be tbfd.
Definition: tags.h:177
ImGui::Button
IMGUI_API bool Button(const char *label, const ImVec2 &size=ImVec2(0, 0))
Definition: imgui_widgets.cpp:644
BlamTagClassField::visible
bool visible
Whether or not this field should be marked as visible within the editor.
Definition: BlamTagClassField.h:34