diff options
| author | Caldfir | 2012-04-22 18:54:42 -0700 |
|---|---|---|
| committer | Caldfir | 2012-04-22 18:54:42 -0700 |
| commit | 2fda3e5e828f085de1e533ae437cf7e649752da7 (patch) | |
| tree | ef16bcb42817bd6e0a5569e79153f9d0be0e6cee /Creatures.cpp | |
| parent | d12be67bcf24c66c66b2e5a4946250da40b4156b (diff) | |
| download | stonesense-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.cpp | 9 |
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 ){
|
