Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
bitfield.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 
6 
7 #ifdef BLAM_EXPORTS
8 #define BLAM_EXT_API __declspec(dllexport)
9 #else
10 #define BLAM_EXT_API __declspec(dllimport)
11 #endif
12 
17 {
18 public:
19  std::vector<std::string> options;
20 
21  BitfieldField(BlamTagFieldType _type, std::string _display_name, std::string _extra_info, std::vector<std::string> _options);
22 
23  void ShowImPropertyControl();
24 
25  std::string GetFieldXMLString(int offset);
26 };
27 
34 {
35 public:
36  Bitfield8Field(std::string _display_name, std::string _extra_info, std::vector<std::string> _options);
37 };
38 
45 {
46 public:
47  Bitfield16Field(std::string _display_name, std::string _extra_info, std::vector<std::string> _options);
48 };
49 
56 {
57 public:
58  Bitfield32Field(std::string _display_name, std::string _extra_info, std::vector<std::string> _options);
59 };
Blam::DebugUI::Widgets::ShowHelpMarker
BLAM void ShowHelpMarker(const char *desc)
Shows a help indicator.
Definition: widgets.cpp:7
Blam::Logger::LogEvent
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:142
BlamTagFieldType::Bitfield16
@ Bitfield16
Indicates that the field is a Bitfield16.
BlamTagFieldType::Bitfield8
@ Bitfield8
Indicates that the field is a Bitfield8.
bitfield.h
BlamTagClassField.h
ImGui::Checkbox
IMGUI_API bool Checkbox(const char *label, bool *v)
Definition: imgui_widgets.cpp:974
logger.h
BLAM_BITFIELD_SHOW_FLAG_CONTROL
#define BLAM_BITFIELD_SHOW_FLAG_CONTROL(index)
Definition: bitfield.cpp:9
BitfieldField::BitfieldField
BitfieldField(BlamTagFieldType _type, std::string _display_name, std::string _extra_info, std::vector< std::string > _options)
Definition: bitfield.cpp:14
imgui.h
BitfieldField::GetFieldXMLString
std::string GetFieldXMLString(int offset)
Generates a string representing an XML node associated with this tag field, used for generating plugi...
Definition: bitfield.cpp:180
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
bitfield32
Typedef for a bitfield32 field, used in tag data definitions.
Definition: tags.h:314
BlamTagFieldType::Bitfield32
@ Bitfield32
Indicates that the field is a Bitfield32.
BitfieldField::ShowImPropertyControl
void ShowImPropertyControl()
Shows a set of ImGUI controls representing the tag field.
Definition: bitfield.cpp:37
ImGui::CalcItemWidth
IMGUI_API float CalcItemWidth()
Definition: imgui.cpp:6192
BitfieldField::options
std::vector< std::string > options
List of options available in the bitfield.
Definition: bitfield.h:19
Bitfield16Field
Class representing a bitfield16 tag field.
Definition: bitfield.h:44
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
BLAM_EXT_API
#define BLAM_EXT_API
Definition: bitfield.h:10
BlamTagFieldType
BlamTagFieldType
Enumerator listing all possible plugin field types.
Definition: tags.h:30
ImVec2
Definition: imgui.h:179
bitfield8
Typedef for a bitfield8 field, used in tag data definitions.
Definition: tags.h:275
ImGuiStyle::WindowPadding
ImVec2 WindowPadding
Definition: imgui.h:1293
Bitfield16Field::Bitfield16Field
Bitfield16Field(std::string _display_name, std::string _extra_info, std::vector< std::string > _options)
Definition: bitfield.cpp:222
widgets.h
ImGui::Text
IMGUI_API void Text(const char *fmt,...) IM_FMTARGS(1)
Definition: imgui_widgets.cpp:238
Bitfield32Field
Class representing a bitfield32 tag field.
Definition: bitfield.h:55
BlamTagClassField::read_address
void * read_address
The address of the data the field is currently representing.
Definition: BlamTagClassField.h:36
Blam::Content::Tags::GetFieldName
BLAM std::string GetFieldName(BlamTagFieldType type)
Generates a string representation of a plugin field type.
Definition: fields.cpp:3
Bitfield8Field::Bitfield8Field
Bitfield8Field(std::string _display_name, std::string _extra_info, std::vector< std::string > _options)
Definition: bitfield.cpp:216
ImGuiWindowFlags_HorizontalScrollbar
@ ImGuiWindowFlags_HorizontalScrollbar
Definition: imgui.h:725
BitfieldField
Base class for Bitfield plugin fields.
Definition: bitfield.h:16
Bitfield32Field::Bitfield32Field
Bitfield32Field(std::string _display_name, std::string _extra_info, std::vector< std::string > _options)
Definition: bitfield.cpp:228
ImGui::GetStyle
IMGUI_API ImGuiStyle & GetStyle()
Definition: imgui.cpp:3306
BlamTagClassField::type
BlamTagFieldType type
The type of the field.
Definition: BlamTagClassField.h:39
fields.h
ImGui::EndChild
IMGUI_API void EndChild()
Definition: imgui.cpp:4764
bitfield16
Typedef for a bitfield16 field, used in tag data definitions.
Definition: tags.h:290
BlamTagClassField::read_length
int read_length
How many bytes to read from the start of the address.
Definition: BlamTagClassField.h:37
ImVec2::y
float y
Definition: imgui.h:181
ImGuiStyle::ItemSpacing
ImVec2 ItemSpacing
Definition: imgui.h:1306
tags.h
BlamTagClassField::ShowImPropertyControl
virtual void ShowImPropertyControl()
Shows a set of ImGUI controls representing the tag field.
Definition: BlamTagClassField.cpp:22
BlamTagClassField::extra_info
std::string extra_info
Additional information to show alongside the field.
Definition: BlamTagClassField.h:32
ImGui::TextDisabled
IMGUI_API void TextDisabled(const char *fmt,...) IM_FMTARGS(1)
Definition: imgui_widgets.cpp:272
ImGui::BeginChild
IMGUI_API bool BeginChild(const char *str_id, const ImVec2 &size=ImVec2(0, 0), bool border=false, ImGuiWindowFlags flags=0)
Definition: imgui.cpp:4752
Bitfield8Field
Class representing a bitfield8 tag field.
Definition: bitfield.h:33
BlamTagClassField::visible
bool visible
Whether or not this field should be marked as visible within the editor.
Definition: BlamTagClassField.h:34