Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
lethosor committed Jun 12, 2017
1 parent 13c4c0b commit be793a0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Creatures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,8 +542,8 @@ void copyCreature(df::unit * source, SS_Unit & furball)
furball.pregnancy_timer = source->pregnancy_timer;
// appearance
furball.nbcolors = source->appearance.colors.size();
if(furball.nbcolors>MAX_COLORS)
furball.nbcolors = MAX_COLORS;
if(furball.nbcolors > DFHack::Units::MAX_COLORS)
furball.nbcolors = DFHack::Units::MAX_COLORS;
// hair
for(int i = 0; i < hairtypes_end; i++){
furball.hairlength[i] = 1001;//default to long unkempt hair
Expand Down
10 changes: 8 additions & 2 deletions commonTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include "SpriteColors.h"
#include "df/enabler.h"

// TODO: remove
#define NUM_CREATURE_LABORS 96

enum ShadeBy {
ShadeNone,
Expand Down Expand Up @@ -324,7 +326,11 @@ struct SS_Unit{

// enabled labors
uint8_t labors[NUM_CREATURE_LABORS];
DFHack::Units::t_job current_job;
struct {
bool active;
uint32_t jobId;
uint8_t jobType;
} current_job;

uint32_t stress_level;
uint32_t id;
Expand All @@ -341,7 +347,7 @@ struct SS_Unit{
//bool has_default_soul;
//t_soul defaultSoul;
uint32_t nbcolors;
uint32_t color[MAX_COLORS];
uint32_t color[DFHack::Units::MAX_COLORS];

hairstyles hairstyle[hairtypes_end];
uint32_t hairlength[hairtypes_end];
Expand Down

0 comments on commit be793a0

Please sign in to comment.