#ifndef CL_MOD_MATERIALS #define CL_MOD_MATERIALS /* * Creatures */ #include "dfhack/DFExport.h" namespace DFHack { class DFContextPrivate; struct t_matgloss { char id[128]; //the id in the raws uint8_t fore; // Annoyingly the offset for this differs between types uint8_t back; uint8_t bright; char name[128]; //this is the name displayed ingame }; struct t_descriptor_color { char id[128]; // id in the raws float r; float v; float b; char name[128]; //displayed name }; struct t_matglossPlant { char id[128]; //the id in the raws uint8_t fore; // Annoyingly the offset for this differs between types uint8_t back; uint8_t bright; char name[128]; //this is the name displayed ingame char drink_name[128]; //the name this item becomes a drink char food_name[128]; char extract_name[128]; }; struct t_bodypart { char id[128]; char category[128]; char single[128]; char plural[128]; }; struct t_colormodifier { char part[128]; std::vector colorlist; uint32_t startdate; /* in days */ uint32_t enddate; /* in days */ }; struct t_creaturecaste { char rawname[128]; char singular[128]; char plural[128]; char adjective[128]; std::vector ColorModifier; std::vector bodypart; t_attrib strength; t_attrib agility; t_attrib toughness; t_attrib endurance; t_attrib recuperation; t_attrib disease_resistance; t_attrib analytical_ability; t_attrib focus; t_attrib willpower; t_attrib creativity; t_attrib intuition; t_attrib patience; t_attrib memory; t_attrib linguistic_ability; t_attrib spatial_sense; t_attrib musicality; t_attrib kinesthetic_sense; }; struct t_matglossOther { char rawname[128]; }; struct t_creatureextract { char rawname[128]; }; // this doesn't transfer well across the shm gap... struct t_creaturetype { char rawname[128]; std::vector castes; std::vector extract; uint8_t tile_character; struct { uint16_t fore; uint16_t back; uint16_t bright; } tilecolor; }; // this structure describes what are things made of in the DF world struct t_material { int16_t itemType; int16_t subType; int16_t subIndex; int32_t index; uint32_t flags; }; class DFHACK_EXPORT Materials { public: Materials(DFHack::DFContextPrivate * _d); ~Materials(); std::vector inorganic; std::vector organic; std::vector tree; std::vector plant; std::vector race; std::vector raceEx; std::vector color; std::vector other; std::vector alldesc; bool ReadInorganicMaterials (void); bool ReadOrganicMaterials (void); bool ReadWoodMaterials (void); bool ReadPlantMaterials (void); bool ReadCreatureTypes (void); bool ReadCreatureTypesEx (void); bool ReadDescriptorColors(void); bool ReadOthers (void); void ReadAllMaterials(void); std::string getDescription(t_material & mat); /* bool ReadInorganicMaterials (std::vector & output); bool ReadOrganicMaterials (std::vector & output); bool ReadWoodMaterials (std::vector & output); bool ReadPlantMaterials (std::vector & output); // TODO: maybe move to creatures? bool ReadCreatureTypes (std::vector & output); bool ReadCreatureTypesEx (vector & creatures); bool ReadDescriptorColors(std::vector & output); */ private: class Private; Private* d; }; } #endif