(svn r16402) -Codechange: make Resolve a function of SpriteGroup

This commit is contained in:
rubidium
2009-05-23 15:25:52 +00:00
parent 8d072585ae
commit f2317d0d9d
10 changed files with 67 additions and 56 deletions

View File

@@ -221,7 +221,7 @@ uint16 GetIndustryTileCallback(CallbackID callback, uint32 param1, uint32 param2
object.callback_param1 = param1;
object.callback_param2 = param2;
group = Resolve(GetIndustryTileSpec(gfx_id)->grf_prop.spritegroup, &object);
group = SpriteGroup::Resolve(GetIndustryTileSpec(gfx_id)->grf_prop.spritegroup, &object);
if (group == NULL || group->type != SGT_CALLBACK) return CALLBACK_FAILED;
return group->GetCallbackResult();
@@ -245,7 +245,7 @@ bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const Indus
NewIndustryTileResolver(&object, gfx, ti->tile, i);
group = Resolve(inds->grf_prop.spritegroup, &object);
group = SpriteGroup::Resolve(inds->grf_prop.spritegroup, &object);
if (group == NULL || group->type != SGT_TILELAYOUT) {
return false;
} else {
@@ -416,7 +416,7 @@ static void DoTriggerIndustryTile(TileIndex tile, IndustryTileTrigger trigger, I
object.callback = CBID_RANDOM_TRIGGER;
object.trigger = trigger;
const SpriteGroup *group = Resolve(itspec->grf_prop.spritegroup, &object);
const SpriteGroup *group = SpriteGroup::Resolve(itspec->grf_prop.spritegroup, &object);
if (group == NULL) return;
byte new_random_bits = Random();