|
|
@ -98,7 +98,7 @@ std::vector<compound_identity*> compound_identity::top_scope;
|
|
|
|
|
|
|
|
|
|
|
|
compound_identity::compound_identity(size_t size, TAllocateFn alloc,
|
|
|
|
compound_identity::compound_identity(size_t size, TAllocateFn alloc,
|
|
|
|
compound_identity *scope_parent, const char *dfhack_name)
|
|
|
|
compound_identity *scope_parent, const char *dfhack_name)
|
|
|
|
: constructed_identity(size, alloc), scope_parent(scope_parent), dfhack_name(dfhack_name)
|
|
|
|
: constructed_identity(size, alloc), dfhack_name(dfhack_name), scope_parent(scope_parent)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
next = list; list = this;
|
|
|
|
next = list; list = this;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -146,8 +146,8 @@ enum_identity::enum_identity(size_t size,
|
|
|
|
const char *const *keys,
|
|
|
|
const char *const *keys,
|
|
|
|
const void *attrs, struct_identity *attr_type)
|
|
|
|
const void *attrs, struct_identity *attr_type)
|
|
|
|
: compound_identity(size, NULL, scope_parent, dfhack_name),
|
|
|
|
: compound_identity(size, NULL, scope_parent, dfhack_name),
|
|
|
|
first_item_value(first_item_value), last_item_value(last_item_value),
|
|
|
|
keys(keys), first_item_value(first_item_value), last_item_value(last_item_value),
|
|
|
|
keys(keys), base_type(base_type), attrs(attrs), attr_type(attr_type)
|
|
|
|
base_type(base_type), attrs(attrs), attr_type(attr_type)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -382,7 +382,7 @@ int DFHack::findEnumItem(const std::string &name, int size, const char *const *i
|
|
|
|
void DFHack::flagarrayToString(std::vector<std::string> *pvec, const void *p,
|
|
|
|
void DFHack::flagarrayToString(std::vector<std::string> *pvec, const void *p,
|
|
|
|
int bytes, int base, int size, const char *const *items)
|
|
|
|
int bytes, int base, int size, const char *const *items)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for (unsigned i = 0; i < bytes*8; i++) {
|
|
|
|
for (int i = 0; i < bytes*8; i++) {
|
|
|
|
int value = getBitfieldField(p, i, 1);
|
|
|
|
int value = getBitfieldField(p, i, 1);
|
|
|
|
|
|
|
|
|
|
|
|
if (value)
|
|
|
|
if (value)
|
|
|
|