summaryrefslogtreecommitdiff
path: root/SpriteColors.cpp
diff options
context:
space:
mode:
authorPetr Mrázek2011-08-07 01:35:28 +0000
committerPetr Mrázek2011-08-07 01:35:28 +0000
commit4064cf25797462fc6ac61f578b7e4b6bd31bf6b6 (patch)
tree1a1744e66471edd1948b02bf4627e87693f1685a /SpriteColors.cpp
parentd841ba0fee6e1f98e414c52dd07b44b981bc05fe (diff)
downloadstonesense-4064cf25797462fc6ac61f578b7e4b6bd31bf6b6.tar.gz
stonesense-4064cf25797462fc6ac61f578b7e4b6bd31bf6b6.tar.bz2
stonesense-4064cf25797462fc6ac61f578b7e4b6bd31bf6b6.tar.xz
stonesense now doesn't crash while starting for the second time
Diffstat (limited to 'SpriteColors.cpp')
-rw-r--r--SpriteColors.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/SpriteColors.cpp b/SpriteColors.cpp
index 99453f8..23c78d3 100644
--- a/SpriteColors.cpp
+++ b/SpriteColors.cpp
@@ -72,29 +72,29 @@ ALLEGRO_COLOR getSpriteColor(t_SpriteWithOffset &sprite, t_creature* creature)
{
for(unsigned int j = 0; j<b->creature->nbcolors ; j++)
{
- t_creaturecaste & caste = contentLoader.Mats->raceEx[creature->race].castes[creature->caste];
+ t_creaturecaste & caste = contentLoader->Mats->raceEx[creature->race].castes[creature->caste];
std::vector<t_colormodifier> & colormods =caste.ColorModifier;
if(colormods[j].part == sprite.bodyPart)
{
uint32_t cr_color = colormods[j].colorlist[creature->color[j]];
- if(cr_color < contentLoader.Mats->color.size())
+ if(cr_color < contentLoader->Mats->color.size())
{
if(colormods[j].startdate > 0)
{
if((colormods[j].startdate <= dayofLife) && (colormods[j].enddate > dayofLife))
{
output = al_map_rgb_f(
- contentLoader.Mats->color[cr_color].red,
- contentLoader.Mats->color[cr_color].green,
- contentLoader.Mats->color[cr_color].blue);
+ contentLoader->Mats->color[cr_color].red,
+ contentLoader->Mats->color[cr_color].green,
+ contentLoader->Mats->color[cr_color].blue);
return output;
}
}
else
output = al_map_rgb_f(
- contentLoader.Mats->color[cr_color].red,
- contentLoader.Mats->color[cr_color].green,
- contentLoader.Mats->color[cr_color].blue);
+ contentLoader->Mats->color[cr_color].red,
+ contentLoader->Mats->color[cr_color].green,
+ contentLoader->Mats->color[cr_color].blue);
}
}
}