summaryrefslogtreecommitdiff
path: root/Creatures.cpp
diff options
context:
space:
mode:
authorCaldfir2012-04-22 18:54:42 -0700
committerCaldfir2012-04-22 18:54:42 -0700
commit2fda3e5e828f085de1e533ae437cf7e649752da7 (patch)
treeef16bcb42817bd6e0a5569e79153f9d0be0e6cee /Creatures.cpp
parentd12be67bcf24c66c66b2e5a4946250da40b4156b (diff)
downloadstonesense-2fda3e5e828f085de1e533ae437cf7e649752da7.tar.gz
stonesense-2fda3e5e828f085de1e533ae437cf7e649752da7.tar.bz2
stonesense-2fda3e5e828f085de1e533ae437cf7e649752da7.tar.xz
Added basic job icon support (very placeholderish icons).
Diffstat (limited to 'Creatures.cpp')
-rw-r--r--Creatures.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Creatures.cpp b/Creatures.cpp
index a14f148..38cef17 100644
--- a/Creatures.cpp
+++ b/Creatures.cpp
@@ -300,6 +300,15 @@ void DrawCreature(int drawx, int drawy, t_unit* creature, Block * b){
unsigned int sheety = 16 * (creature->profession / 7);
al_draw_bitmap_region(IMGProfSheet, sheetx, sheety, 16, 16, drawx -8 + (SPRITEWIDTH*config.scale/2), drawy - (16 + WALLHEIGHT*config.scale + offsety), 0);
}
+
+ offsety += config.show_creature_professions ? 16 : 0;
+
+ if(config.show_creature_jobs && creature->current_job.active)
+ {
+ unsigned int sheetx = 16 * (creature->current_job.jobType % 7);
+ unsigned int sheety = 16 * (creature->current_job.jobType / 7);
+ al_draw_bitmap_region(IMGJobSheet, sheetx, sheety, 16, 16, drawx -8 + (SPRITEWIDTH*config.scale/2), drawy - (16 + WALLHEIGHT*config.scale + offsety), 0);
+ }
}
void DrawCreatureText(int drawx, int drawy, t_unit* creature ){