diff options
| author | Japa Illo | 2012-03-27 08:52:44 +0200 |
|---|---|---|
| committer | Japa Illo | 2012-03-27 08:52:44 +0200 |
| commit | b884b575ed5a331714314748ce7ea2d6bc02bda3 (patch) | |
| tree | 8a36082d09f32bd5ae0e7b8fcd7b65be4e35d768 /Creatures.cpp | |
| parent | 07ddc8c13e0bb38cde77937803e9320e2b26f2d9 (diff) | |
| parent | 86566374fc8fa339602f7e9a240696d2b0dd7290 (diff) | |
| download | stonesense-b884b575ed5a331714314748ce7ea2d6bc02bda3.tar.gz stonesense-b884b575ed5a331714314748ce7ea2d6bc02bda3.tar.bz2 stonesense-b884b575ed5a331714314748ce7ea2d6bc02bda3.tar.xz | |
Merge branch 'master' of https://github.com/Caldfir/stonesense
Conflicts:
BlockCondition.cpp
ContentLoader.cpp
GUI.cpp
MapLoading.cpp
SpriteObjects.cpp
Diffstat (limited to 'Creatures.cpp')
| -rw-r--r-- | Creatures.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Creatures.cpp b/Creatures.cpp index ee80b20..ba19970 100644 --- a/Creatures.cpp +++ b/Creatures.cpp @@ -13,6 +13,8 @@ #include "df/itemimprovement.h"
#include "df/itemimprovement_threadst.h"
+#include "df/profession.h"
+
//vector<t_matgloss> v_creatureNames;
//vector<CreatureConfiguration> creatureTypes;
@@ -228,6 +230,7 @@ bool IsCreatureVisible( df::unit* c ){ return true;
}
+
void DrawCreature(int drawx, int drawy, t_unit* creature, Block * b){
vector<int> statusIcons;
@@ -286,12 +289,12 @@ void DrawCreature(int drawx, int drawy, t_unit* creature, Block * b){ }
offsety += config.show_creature_moods ? 16 : 0;
-
+
if(config.show_creature_jobs)
{
unsigned int sheetx = 16 * (creature->profession % 7);
unsigned int sheety = 16 * (creature->profession / 7);
- al_draw_bitmap_region(IMGStatusSheet, sheetx, sheety, 16, 16, drawx -8 + (SPRITEWIDTH*config.scale/2), drawy - (16 + WALLHEIGHT*config.scale + offsety), 0);
+ al_draw_bitmap_region(IMGJobSheet, sheetx, sheety, 16, 16, drawx -8 + (SPRITEWIDTH*config.scale/2), drawy - (16 + WALLHEIGHT*config.scale + offsety), 0);
}
}
@@ -508,6 +511,12 @@ CreatureConfiguration *GetCreatureConfig( t_unit* c ){ {
if (testConfig->special == eCSC_Zombie && !c->flags1.bits.zombie) creatureMatchesSpecial = false;
if (testConfig->special == eCSC_Skeleton && !c->flags1.bits.skeleton) creatureMatchesSpecial = false;
+ if (testConfig->special == eCSC_Military)
+ {
+ df::profession profession = (df::profession) c->profession;
+ if(!ENUM_ATTR(profession,military,profession))
+ creatureMatchesSpecial = false;
+ }
if (testConfig->special == eCSC_Normal && (c->flags1.bits.zombie || c->flags1.bits.skeleton)) creatureMatchesSpecial = false;
}
if(!creatureMatchesSpecial) continue;
|
