diff --git a/library/include/dfhack/modules/Materials.h b/library/include/dfhack/modules/Materials.h index 3407aeb06..3b50bdf7e 100644 --- a/library/include/dfhack/modules/Materials.h +++ b/library/include/dfhack/modules/Materials.h @@ -27,9 +27,9 @@ namespace DFHack struct t_descriptor_color { char id[128]; // id in the raws - float r; - float v; - float b; + float red; + float green; + float blue; char name[128]; //displayed name }; /** diff --git a/library/modules/Materials.cpp b/library/modules/Materials.cpp index 6f7c7727e..eae1ee345 100644 --- a/library/modules/Materials.cpp +++ b/library/modules/Materials.cpp @@ -325,9 +325,9 @@ bool Materials::ReadDescriptorColors (void) t_descriptor_color col; p->readSTLString (p_colors[i] + OG_Descriptors->getOffset ("rawname"), col.id, 128); p->readSTLString (p_colors[i] + OG_Descriptors->getOffset ("name"), col.name, 128); - col.r = p->readFloat( p_colors[i] + OG_Descriptors->getOffset ("color_r") ); - col.v = p->readFloat( p_colors[i] + OG_Descriptors->getOffset ("color_v") ); - col.b = p->readFloat( p_colors[i] + OG_Descriptors->getOffset ("color_b") ); + col.red = p->readFloat( p_colors[i] + OG_Descriptors->getOffset ("color_r") ); + col.green = p->readFloat( p_colors[i] + OG_Descriptors->getOffset ("color_v") ); + col.blue = p->readFloat( p_colors[i] + OG_Descriptors->getOffset ("color_b") ); color.push_back(col); } return ReadNamesOnly(d->owner, OG_Descriptors->getAddress ("all_colors_vector"), alldesc ); diff --git a/tools/examples/creaturedump.cpp b/tools/examples/creaturedump.cpp index 55505b152..24ebc667a 100644 --- a/tools/examples/creaturedump.cpp +++ b/tools/examples/creaturedump.cpp @@ -214,9 +214,9 @@ void printCreature(DFHack::Context * DF, const DFHack::t_creature & creature) if(colorcolor.size()) { cout << Materials->color[color].name << "[" - << (unsigned int) (Materials->color[color].r*255) << ":" - << (unsigned int) (Materials->color[color].v*255) << ":" - << (unsigned int) (Materials->color[color].b*255) << "]"; + << (unsigned int) (Materials->color[color].red*255) << ":" + << (unsigned int) (Materials->color[color].green*255) << ":" + << (unsigned int) (Materials->color[color].blue*255) << "]"; } else if (color < Materials->alldesc.size()) { diff --git a/tools/examples/materialtest.cpp b/tools/examples/materialtest.cpp index 8293969e6..dafc4c245 100644 --- a/tools/examples/materialtest.cpp +++ b/tools/examples/materialtest.cpp @@ -68,9 +68,9 @@ int main (int numargs, const char ** args) for(uint32_t i = 0; i < Materials->color.size();i++) { cout << i << ": " << Materials->color[i].id << " - " << Materials->color[i].name << "[" - << (unsigned int) (Materials->color[i].r*255) << ":" - << (unsigned int) (Materials->color[i].v*255) << ":" - << (unsigned int) (Materials->color[i].b*255) + << (unsigned int) (Materials->color[i].red*255) << ":" + << (unsigned int) (Materials->color[i].green*255) << ":" + << (unsigned int) (Materials->color[i].blue*255) << "]" << endl; } cout << endl << "----==== All descriptors ====----" << endl;