|
|
@ -64,20 +64,7 @@ struct t_vein
|
|
|
|
uint32_t address_of; // this is NOT part of the DF vein, but an address of the vein as seen by DFhack.
|
|
|
|
uint32_t address_of; // this is NOT part of the DF vein, but an address of the vein as seen by DFhack.
|
|
|
|
};
|
|
|
|
};
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
struct t_vein
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uint32_t vtable;
|
|
|
|
|
|
|
|
int32_t type;
|
|
|
|
|
|
|
|
int16_t assignment[16];
|
|
|
|
|
|
|
|
uint32_t flags;
|
|
|
|
|
|
|
|
uint32_t address_of; // this is NOT part of the DF vein, but an address of the vein as seen by DFhack.
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
// stores what tiles should appear when the ice melts
|
|
|
|
|
|
|
|
struct t_frozenliquidvein
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uint32_t vtable;
|
|
|
|
|
|
|
|
int16_t tiles[16][16];
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct t_matglossPair
|
|
|
|
struct t_matglossPair
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -121,10 +108,12 @@ struct t_construction_df40d
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int16_t x;
|
|
|
|
int16_t x;
|
|
|
|
int16_t y;
|
|
|
|
int16_t y;
|
|
|
|
|
|
|
|
// 4
|
|
|
|
int16_t z;
|
|
|
|
int16_t z;
|
|
|
|
int16_t unk1;
|
|
|
|
int16_t unk1;
|
|
|
|
|
|
|
|
// 8
|
|
|
|
int16_t unk2;
|
|
|
|
int16_t unk2;
|
|
|
|
t_matglossPair material; // 4B
|
|
|
|
t_matglossPair material; // C points to the index part
|
|
|
|
// int16_t mat_type;
|
|
|
|
// int16_t mat_type;
|
|
|
|
// int16_t mat_idx;
|
|
|
|
// int16_t mat_idx;
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -191,14 +180,6 @@ struct t_building
|
|
|
|
// FIXME: not complete, we need building presence bitmaps for stuff like farm plots and stockpiles, orientation (N,E,S,W) and state (open/closed)
|
|
|
|
// FIXME: not complete, we need building presence bitmaps for stuff like farm plots and stockpiles, orientation (N,E,S,W) and state (open/closed)
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct t_tree_desc
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
t_matglossPair material;
|
|
|
|
|
|
|
|
uint16_t x;
|
|
|
|
|
|
|
|
uint16_t y;
|
|
|
|
|
|
|
|
uint16_t z;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
case 10:
|
|
|
|
case 10:
|
|
|
|
ret += "leather";
|
|
|
|
ret += "leather";
|
|
|
@ -273,257 +254,6 @@ enum BiomeOffset
|
|
|
|
eSouthEast,
|
|
|
|
eSouthEast,
|
|
|
|
eBiomeCount
|
|
|
|
eBiomeCount
|
|
|
|
};
|
|
|
|
};
|
|
|
|
/*
|
|
|
|
|
|
|
|
bits:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 Can the dwarf move or are they waiting for their movement timer
|
|
|
|
|
|
|
|
1 Dead (might also be set for incoming/leaving critters that are alive)
|
|
|
|
|
|
|
|
2 Currently in mood
|
|
|
|
|
|
|
|
3 Had a mood
|
|
|
|
|
|
|
|
4 "marauder" -- wide class of invader/inside creature attackers
|
|
|
|
|
|
|
|
5 Drowning
|
|
|
|
|
|
|
|
6 Active merchant
|
|
|
|
|
|
|
|
7 "forest" (used for units no longer linked to merchant/diplomacy, they just try to leave mostly)
|
|
|
|
|
|
|
|
8 Left (left the map)
|
|
|
|
|
|
|
|
9 Rider
|
|
|
|
|
|
|
|
10 Incoming
|
|
|
|
|
|
|
|
11 Diplomat
|
|
|
|
|
|
|
|
12 Zombie
|
|
|
|
|
|
|
|
13 Skeleton
|
|
|
|
|
|
|
|
14 Can swap tiles during movement (prevents multiple swaps)
|
|
|
|
|
|
|
|
15 On the ground (can be conscious)
|
|
|
|
|
|
|
|
16 Projectile
|
|
|
|
|
|
|
|
17 Active invader (for organized ones)
|
|
|
|
|
|
|
|
18 Hidden in ambush
|
|
|
|
|
|
|
|
19 Invader origin (could be inactive and fleeing)
|
|
|
|
|
|
|
|
20 Will flee if invasion turns around
|
|
|
|
|
|
|
|
21 Active marauder/invader moving inward
|
|
|
|
|
|
|
|
22 Marauder resident/invader moving in all the way
|
|
|
|
|
|
|
|
23 Check against flows next time you get a chance
|
|
|
|
|
|
|
|
24 Ridden
|
|
|
|
|
|
|
|
25 Caged
|
|
|
|
|
|
|
|
26 Tame
|
|
|
|
|
|
|
|
27 Chained
|
|
|
|
|
|
|
|
28 Royal guard
|
|
|
|
|
|
|
|
29 Fortress guard
|
|
|
|
|
|
|
|
30 Suppress wield for beatings/etc
|
|
|
|
|
|
|
|
31 Is an important historical figure
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct naked_creaturflags1
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
unsigned int move_state : 1; // Can the dwarf move or are they waiting for their movement timer
|
|
|
|
|
|
|
|
unsigned int dead : 1; // might also be set for incoming/leaving critters that are alive
|
|
|
|
|
|
|
|
unsigned int has_mood : 1; // Currently in mood
|
|
|
|
|
|
|
|
unsigned int had_mood : 1; // Had a mood
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int marauder : 1; // wide class of invader/inside creature attackers
|
|
|
|
|
|
|
|
unsigned int drowning : 1;
|
|
|
|
|
|
|
|
unsigned int merchant : 1; // active merchant
|
|
|
|
|
|
|
|
unsigned int forest : 1; // used for units no longer linked to merchant/diplomacy, they just try to leave mostly
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int left : 1; // left the map
|
|
|
|
|
|
|
|
unsigned int rider : 1;
|
|
|
|
|
|
|
|
unsigned int incoming : 1;
|
|
|
|
|
|
|
|
unsigned int diplomat : 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int zombie : 1;
|
|
|
|
|
|
|
|
unsigned int skeleton : 1;
|
|
|
|
|
|
|
|
unsigned int can_swap : 1; // Can swap tiles during movement (prevents multiple swaps)
|
|
|
|
|
|
|
|
unsigned int on_ground : 1; // can be conscious
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int projectile : 1;
|
|
|
|
|
|
|
|
unsigned int active_invader : 1; // for organized ones
|
|
|
|
|
|
|
|
unsigned int hidden_in_ambush : 1;
|
|
|
|
|
|
|
|
unsigned int invader_origin : 1; // could be inactive and fleeing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int coward : 1; // Will flee if invasion turns around
|
|
|
|
|
|
|
|
unsigned int hidden_ambusher : 1; // maybe
|
|
|
|
|
|
|
|
unsigned int invades : 1; // Active marauder/invader moving inward
|
|
|
|
|
|
|
|
unsigned int check_flows : 1; // Check against flows next time you get a chance
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 0100 0000 - 8000 0000
|
|
|
|
|
|
|
|
unsigned int ridden : 1;
|
|
|
|
|
|
|
|
unsigned int caged : 1;
|
|
|
|
|
|
|
|
unsigned int tame : 1;
|
|
|
|
|
|
|
|
unsigned int chained : 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int royal_guard : 1;
|
|
|
|
|
|
|
|
unsigned int fortress_guard : 1;
|
|
|
|
|
|
|
|
unsigned int suppress_wield : 1; // Suppress wield for beatings/etc
|
|
|
|
|
|
|
|
unsigned int important_historical_figure : 1; // Is an important historical figure
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
union t_creaturflags1
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uint32_t whole;
|
|
|
|
|
|
|
|
naked_creaturflags1 bits;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
bits:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 Swimming
|
|
|
|
|
|
|
|
1 Play combat for sparring
|
|
|
|
|
|
|
|
2 Do not notify about level gains (for embark etc)
|
|
|
|
|
|
|
|
3 Unused
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 Nerves calculated
|
|
|
|
|
|
|
|
5 Body part info calculated
|
|
|
|
|
|
|
|
6 Is important historical figure (slight variation)
|
|
|
|
|
|
|
|
7 Has been killed by kill function (slightly different from dead, not necessarily violent death)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 Must be forgotten by forget function (just cleanup)
|
|
|
|
|
|
|
|
9 Must be deleted (cleanup)
|
|
|
|
|
|
|
|
10 Recently forgotten (cleanup)
|
|
|
|
|
|
|
|
11 Offered for trade
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 Trade resolved
|
|
|
|
|
|
|
|
13 Has breaks
|
|
|
|
|
|
|
|
14 Gutted
|
|
|
|
|
|
|
|
15 Circulatory spray
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 Locked in for trading (it's a projectile on the other set of flags, might be what the flying was)
|
|
|
|
|
|
|
|
17 Marked for slaughter
|
|
|
|
|
|
|
|
18 Underworld creature
|
|
|
|
|
|
|
|
19 Current resident
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 Marked for special cleanup as unused load from unit block on disk
|
|
|
|
|
|
|
|
21 Insulation from clothing calculated
|
|
|
|
|
|
|
|
22 Uninvited guest
|
|
|
|
|
|
|
|
23 Visitor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 Inventory order calculated
|
|
|
|
|
|
|
|
25 Vision -- have good part
|
|
|
|
|
|
|
|
26 Vision -- have damaged part
|
|
|
|
|
|
|
|
27 Vision -- have missing part
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 Breathing -- have good part
|
|
|
|
|
|
|
|
29 Breathing -- having a problem
|
|
|
|
|
|
|
|
30 Roaming wilderness population source
|
|
|
|
|
|
|
|
31 Roaming wilderness population source -- not a map feature
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct naked_creaturflags2
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
unsigned int swimming : 1;
|
|
|
|
|
|
|
|
unsigned int sparring : 1;
|
|
|
|
|
|
|
|
unsigned int no_notify : 1; // Do not notify about level gains (for embark etc)
|
|
|
|
|
|
|
|
unsigned int unused : 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int calculated_nerves : 1;
|
|
|
|
|
|
|
|
unsigned int calculated_bodyparts : 1;
|
|
|
|
|
|
|
|
unsigned int important_historical_figure : 1; // slight variation
|
|
|
|
|
|
|
|
unsigned int killed : 1; // killed by kill() function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int cleanup_1 : 1; // Must be forgotten by forget function (just cleanup)
|
|
|
|
|
|
|
|
unsigned int cleanup_2 : 1; // Must be deleted (cleanup)
|
|
|
|
|
|
|
|
unsigned int cleanup_3 : 1; // Recently forgotten (cleanup)
|
|
|
|
|
|
|
|
unsigned int for_trade : 1; // Offered for trade
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int trade_resolved : 1;
|
|
|
|
|
|
|
|
unsigned int has_breaks : 1;
|
|
|
|
|
|
|
|
unsigned int gutted : 1;
|
|
|
|
|
|
|
|
unsigned int circulatory_spray : 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int locked_in_for_trading : 1;
|
|
|
|
|
|
|
|
unsigned int slaughter : 1; // marked for slaughter
|
|
|
|
|
|
|
|
unsigned int underworld : 1; // Underworld creature
|
|
|
|
|
|
|
|
unsigned int resident : 1; // Current resident
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int cleanup_4 : 1; // Marked for special cleanup as unused load from unit block on disk
|
|
|
|
|
|
|
|
unsigned int calculated_insulation : 1; // Insulation from clothing calculated
|
|
|
|
|
|
|
|
unsigned int visitor_uninvited : 1; // Uninvited guest
|
|
|
|
|
|
|
|
unsigned int visitor : 1; // visitor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int calculated_inventory : 1; // Inventory order calculated
|
|
|
|
|
|
|
|
unsigned int vision_good : 1; // Vision -- have good part
|
|
|
|
|
|
|
|
unsigned int vision_damaged : 1; // Vision -- have damaged part
|
|
|
|
|
|
|
|
unsigned int vision_missing : 1; // Vision -- have missing part
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int breathing_good : 1; // Breathing -- have good part
|
|
|
|
|
|
|
|
unsigned int breathing_problem : 1; // Breathing -- having a problem
|
|
|
|
|
|
|
|
unsigned int roaming_wilderness_population_source : 1;
|
|
|
|
|
|
|
|
unsigned int roaming_wilderness_population_source_not_a_map_feature : 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
union t_creaturflags2
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uint32_t whole;
|
|
|
|
|
|
|
|
naked_creaturflags2 bits;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
struct t_labor
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
string name;
|
|
|
|
|
|
|
|
uint8_t value;
|
|
|
|
|
|
|
|
t_labor() {
|
|
|
|
|
|
|
|
value =0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
t_labor(const t_labor & b){
|
|
|
|
|
|
|
|
name=b.name;
|
|
|
|
|
|
|
|
value=b.value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
t_labor & operator=(const t_labor &b){
|
|
|
|
|
|
|
|
name=b.name;
|
|
|
|
|
|
|
|
value=b.value;
|
|
|
|
|
|
|
|
return *this;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
struct t_skill
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
string name;
|
|
|
|
|
|
|
|
uint16_t id;
|
|
|
|
|
|
|
|
uint32_t experience;
|
|
|
|
|
|
|
|
uint16_t rating;
|
|
|
|
|
|
|
|
t_skill(){
|
|
|
|
|
|
|
|
id=rating=0;
|
|
|
|
|
|
|
|
experience=0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
t_skill(const t_skill & b)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name=b.name;
|
|
|
|
|
|
|
|
id=b.id;
|
|
|
|
|
|
|
|
experience=b.experience;
|
|
|
|
|
|
|
|
rating=b.rating;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
t_skill & operator=(const t_skill &b)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name=b.name;
|
|
|
|
|
|
|
|
id=b.id;
|
|
|
|
|
|
|
|
experience=b.experience;
|
|
|
|
|
|
|
|
rating=b.rating;
|
|
|
|
|
|
|
|
return *this;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct t_trait
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uint16_t value;
|
|
|
|
|
|
|
|
string displayTxt;
|
|
|
|
|
|
|
|
string name;
|
|
|
|
|
|
|
|
t_trait(){
|
|
|
|
|
|
|
|
value=0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
t_trait(const t_trait &b)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name=b.name;
|
|
|
|
|
|
|
|
displayTxt=b.displayTxt;
|
|
|
|
|
|
|
|
value=b.value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
t_trait & operator=(const t_trait &b)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name=b.name;
|
|
|
|
|
|
|
|
displayTxt=b.displayTxt;
|
|
|
|
|
|
|
|
value=b.value;
|
|
|
|
|
|
|
|
return *this;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
CREATURE
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#pragma pack(push,4)
|
|
|
|
//#pragma pack(push,4)
|
|
|
|
struct t_name
|
|
|
|
struct t_name
|
|
|
@ -536,70 +266,6 @@ struct t_name
|
|
|
|
bool has_name;
|
|
|
|
bool has_name;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct t_skill
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uint16_t id;
|
|
|
|
|
|
|
|
uint32_t experience;
|
|
|
|
|
|
|
|
uint16_t rating;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
struct t_job
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bool active;
|
|
|
|
|
|
|
|
uint8_t jobId;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
struct t_like
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int16_t type;
|
|
|
|
|
|
|
|
int16_t itemClass;
|
|
|
|
|
|
|
|
int16_t itemIndex;
|
|
|
|
|
|
|
|
t_matglossPair material;
|
|
|
|
|
|
|
|
bool active;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
//#pragma pack(pop)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define NUM_CREATURE_TRAITS 30
|
|
|
|
|
|
|
|
#define NUM_CREATURE_LABORS 102
|
|
|
|
|
|
|
|
struct t_creature
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uint32_t origin;
|
|
|
|
|
|
|
|
uint16_t x;
|
|
|
|
|
|
|
|
uint16_t y;
|
|
|
|
|
|
|
|
uint16_t z;
|
|
|
|
|
|
|
|
uint32_t type;
|
|
|
|
|
|
|
|
t_creaturflags1 flags1;
|
|
|
|
|
|
|
|
t_creaturflags2 flags2;
|
|
|
|
|
|
|
|
t_name name;
|
|
|
|
|
|
|
|
t_name squad_name;
|
|
|
|
|
|
|
|
t_name artifact_name;
|
|
|
|
|
|
|
|
uint8_t profession;
|
|
|
|
|
|
|
|
char custom_profession[128];
|
|
|
|
|
|
|
|
// enabled labors
|
|
|
|
|
|
|
|
uint8_t labors[NUM_CREATURE_LABORS];
|
|
|
|
|
|
|
|
// personality traits
|
|
|
|
|
|
|
|
uint16_t traits[NUM_CREATURE_TRAITS];
|
|
|
|
|
|
|
|
uint8_t numSkills;
|
|
|
|
|
|
|
|
t_skill skills[256];
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
//string last_name;
|
|
|
|
|
|
|
|
string current_job;
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
uint8_t numLikes;
|
|
|
|
|
|
|
|
t_like likes[32];
|
|
|
|
|
|
|
|
t_job current_job;
|
|
|
|
|
|
|
|
int16_t mood;
|
|
|
|
|
|
|
|
uint32_t happiness;
|
|
|
|
|
|
|
|
uint32_t id;
|
|
|
|
|
|
|
|
uint32_t agility;
|
|
|
|
|
|
|
|
uint32_t strength;
|
|
|
|
|
|
|
|
uint32_t toughness;
|
|
|
|
|
|
|
|
uint32_t money;
|
|
|
|
|
|
|
|
int32_t squad_leader_id;
|
|
|
|
|
|
|
|
uint8_t sex;
|
|
|
|
|
|
|
|
uint32_t pregnancy_timer; //Countdown timer to giving birth
|
|
|
|
|
|
|
|
int32_t blood_max;
|
|
|
|
|
|
|
|
int32_t blood_current;
|
|
|
|
|
|
|
|
uint32_t bleed_rate;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
//raw
|
|
|
|
//raw
|
|
|
|
struct t_item_df40d
|
|
|
|
struct t_item_df40d
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -695,165 +361,6 @@ struct t_itemType
|
|
|
|
char name[128];
|
|
|
|
char name[128];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum e_traffic
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
traffic_normal,
|
|
|
|
|
|
|
|
traffic_low,
|
|
|
|
|
|
|
|
traffic_high,
|
|
|
|
|
|
|
|
traffic_restricted
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum e_designation
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
designation_no,
|
|
|
|
|
|
|
|
designation_default, // dig walls, remove stairs and ramps, gather plants, fell trees
|
|
|
|
|
|
|
|
designation_ud_stair, // dig up/down stairs
|
|
|
|
|
|
|
|
designation_channel, // dig a channel
|
|
|
|
|
|
|
|
designation_ramp, // dig ramp out of a wall
|
|
|
|
|
|
|
|
designation_d_stair, // dig a stair down
|
|
|
|
|
|
|
|
designation_u_stair, // dig a stair up
|
|
|
|
|
|
|
|
designation_7 // whatever
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum e_liquidtype
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
liquid_water,
|
|
|
|
|
|
|
|
liquid_magma
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct naked_designation
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
unsigned int flow_size : 3; // how much liquid is here?
|
|
|
|
|
|
|
|
unsigned int pile : 1; // stockpile?
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
* All the different dig designations... needs more info, probably an enum
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
e_designation dig : 3;
|
|
|
|
|
|
|
|
unsigned int smooth : 2;
|
|
|
|
|
|
|
|
unsigned int hidden : 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
* This one is rather involved, but necessary to retrieve the base layer matgloss index
|
|
|
|
|
|
|
|
* see http://www.bay12games.com/forum/index.php?topic=608.msg253284#msg253284 for details
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
unsigned int geolayer_index :4;
|
|
|
|
|
|
|
|
unsigned int light : 1;
|
|
|
|
|
|
|
|
unsigned int subterranean : 1; // never seen the light of day?
|
|
|
|
|
|
|
|
unsigned int skyview : 1; // sky is visible now, it rains in here when it rains
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
* Probably similar to the geolayer_index. Only with a different set of offsets and different data.
|
|
|
|
|
|
|
|
* we don't use this yet
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
unsigned int biome : 4;
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
* 0 = water
|
|
|
|
|
|
|
|
* 1 = magma
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
e_liquidtype liquid_type : 1;
|
|
|
|
|
|
|
|
unsigned int water_table : 1; // srsly. wtf?
|
|
|
|
|
|
|
|
unsigned int rained : 1; // does this mean actual rain (as in the blue blocks) or a wet tile?
|
|
|
|
|
|
|
|
e_traffic traffic : 2; // needs enum
|
|
|
|
|
|
|
|
unsigned int flow_forbid : 1; // what?
|
|
|
|
|
|
|
|
unsigned int liquid_static : 1;
|
|
|
|
|
|
|
|
unsigned int moss : 1;// I LOVE MOSS
|
|
|
|
|
|
|
|
unsigned int feature_present : 1; // another wtf... is this required for magma pipes to work?
|
|
|
|
|
|
|
|
unsigned int liquid_character : 2; // those ripples on streams?
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
union t_designation
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uint32_t whole;
|
|
|
|
|
|
|
|
naked_designation bits;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// occupancy flags (rat,dwarf,horse,built wall,not build wall,etc)
|
|
|
|
|
|
|
|
struct naked_occupancy
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
unsigned int building : 3;// building type... should be an enum?
|
|
|
|
|
|
|
|
// 7 = door
|
|
|
|
|
|
|
|
unsigned int unit : 1;
|
|
|
|
|
|
|
|
unsigned int unit_grounded : 1;
|
|
|
|
|
|
|
|
unsigned int item : 1;
|
|
|
|
|
|
|
|
// splatter. everyone loves splatter.
|
|
|
|
|
|
|
|
unsigned int mud : 1;
|
|
|
|
|
|
|
|
unsigned int vomit :1;
|
|
|
|
|
|
|
|
unsigned int broken_arrows_color :4;
|
|
|
|
|
|
|
|
unsigned int blood_g : 1;
|
|
|
|
|
|
|
|
unsigned int blood_g2 : 1;
|
|
|
|
|
|
|
|
unsigned int blood_b : 1;
|
|
|
|
|
|
|
|
unsigned int blood_b2 : 1;
|
|
|
|
|
|
|
|
unsigned int blood_y : 1;
|
|
|
|
|
|
|
|
unsigned int blood_y2 : 1;
|
|
|
|
|
|
|
|
unsigned int blood_m : 1;
|
|
|
|
|
|
|
|
unsigned int blood_m2 : 1;
|
|
|
|
|
|
|
|
unsigned int blood_c : 1;
|
|
|
|
|
|
|
|
unsigned int blood_c2 : 1;
|
|
|
|
|
|
|
|
unsigned int blood_w : 1;
|
|
|
|
|
|
|
|
unsigned int blood_w2 : 1;
|
|
|
|
|
|
|
|
unsigned int blood_o : 1;
|
|
|
|
|
|
|
|
unsigned int blood_o2 : 1;
|
|
|
|
|
|
|
|
unsigned int slime : 1;
|
|
|
|
|
|
|
|
unsigned int slime2 : 1;
|
|
|
|
|
|
|
|
unsigned int blood : 1;
|
|
|
|
|
|
|
|
unsigned int blood2 : 1;
|
|
|
|
|
|
|
|
unsigned int broken_arrows_variant : 1;
|
|
|
|
|
|
|
|
unsigned int snow : 1;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct naked_occupancy_grouped
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
unsigned int building : 3;// building type... should be an enum?
|
|
|
|
|
|
|
|
// 7 = door
|
|
|
|
|
|
|
|
unsigned int unit : 1;
|
|
|
|
|
|
|
|
unsigned int unit_grounded : 1;
|
|
|
|
|
|
|
|
unsigned int item : 1;
|
|
|
|
|
|
|
|
// splatter. everyone loves splatter.
|
|
|
|
|
|
|
|
unsigned int splatter : 26;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
union t_occupancy
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uint32_t whole;
|
|
|
|
|
|
|
|
naked_occupancy bits;
|
|
|
|
|
|
|
|
naked_occupancy_grouped unibits;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// map block flags
|
|
|
|
|
|
|
|
struct naked_blockflags
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
unsigned int designated : 1;// designated for jobs (digging and stuff like that)
|
|
|
|
|
|
|
|
unsigned int unk_1 : 1; // possibly related to the designated flag
|
|
|
|
|
|
|
|
// two flags required for liquid flow. no idea why
|
|
|
|
|
|
|
|
unsigned int liquid_1 : 1;
|
|
|
|
|
|
|
|
unsigned int liquid_2 : 1;
|
|
|
|
|
|
|
|
unsigned int unk_2: 28; // rest of the flags is completely unknown
|
|
|
|
|
|
|
|
// there's a possibility that this flags field is shorter than 32 bits
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
union t_blockflags
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uint32_t whole;
|
|
|
|
|
|
|
|
naked_blockflags bits;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef int16_t tiletypes40d [16][16];
|
|
|
|
|
|
|
|
typedef DFHack::t_designation designations40d [16][16];
|
|
|
|
|
|
|
|
typedef DFHack::t_occupancy occupancies40d [16][16];
|
|
|
|
|
|
|
|
typedef uint8_t biome_indices40d [16];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
tiletypes40d tiletypes;
|
|
|
|
|
|
|
|
designations40d designation;
|
|
|
|
|
|
|
|
occupancies40d occupancy;
|
|
|
|
|
|
|
|
// really a '7', but I use 8 to make it neater :)
|
|
|
|
|
|
|
|
biome_indices40d biome_indices;
|
|
|
|
|
|
|
|
uint32_t origin; // the address where it came from
|
|
|
|
|
|
|
|
t_blockflags blockflags;
|
|
|
|
|
|
|
|
} mapblock40d;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct t_viewscreen
|
|
|
|
struct t_viewscreen
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int32_t type;
|
|
|
|
int32_t type;
|
|
|
|