diff options
| author | Japa | 2012-08-26 09:59:42 +0530 |
|---|---|---|
| committer | Japa | 2012-08-26 09:59:42 +0530 |
| commit | ea37f39ae1cde3d5229a500c870eea7a62c85888 (patch) | |
| tree | bbd729157425be1077ebd0dee3602aa69f143653 | |
| parent | 2a62ba5ed2607f4dbf0473e77502d4e19c19678e (diff) | |
| download | stonesense-ea37f39ae1cde3d5229a500c870eea7a62c85888.tar.gz stonesense-ea37f39ae1cde3d5229a500c870eea7a62c85888.tar.bz2 stonesense-ea37f39ae1cde3d5229a500c870eea7a62c85888.tar.xz | |
Made unknown creatures use proper caste and profession colors.
| -rw-r--r-- | Creatures.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Creatures.cpp b/Creatures.cpp index bface8c..811934d 100644 --- a/Creatures.cpp +++ b/Creatures.cpp @@ -283,8 +283,11 @@ void DrawCreature(int drawx, int drawy, t_unit* creature, Block * b){ {
df::creature_raw *raw = df::global::world->raws.creatures.all[creature->race];
int spritenum = raw->creature_tile;
+ if(raw->caste[creature->caste]->caste_tile)
+ spritenum = raw->caste[creature->caste]->caste_tile;
spritenum += (spritenum/16)*4;
- DrawSpriteFromSheet(spritenum,IMGLetterSheet,config.colors.getDfColor(raw->color[0],raw->color[2]),drawx,drawy,b);
+ ALLEGRO_COLOR tilecolor = config.colors.getDfColor(DFHack::Units::getCasteProfessionColor(creature->race,creature->caste,(df::profession)creature->profession));
+ DrawSpriteFromSheet(spritenum,IMGLetterSheet,tilecolor,drawx,drawy,b);
}
unsigned int offsety = config.show_creature_names ? al_get_font_line_height(font) : 0;
|
