src/newgrf_industrytiles.cpp
changeset 8203 c2fa2ac2c65d
parent 8187 4e45363e411c
child 8246 ff7b892d8a28
equal deleted inserted replaced
8202:ec7e5b2d35c9 8203:c2fa2ac2c65d
   292 	 * maximum, corresponding to around 33 minutes. */
   292 	 * maximum, corresponding to around 33 minutes. */
   293 	if ((_tick_counter % (1 << animation_speed)) != 0) return;
   293 	if ((_tick_counter % (1 << animation_speed)) != 0) return;
   294 
   294 
   295 	bool frame_set_by_callback = false;
   295 	bool frame_set_by_callback = false;
   296 	byte frame = GetIndustryAnimationState(tile);
   296 	byte frame = GetIndustryAnimationState(tile);
   297 	uint16 num_frames = GB(itspec->animation_info, 0, 8) + 1;
   297 	uint16 num_frames = GB(itspec->animation_info, 0, 8);
   298 
   298 
   299 	if (HASBIT(itspec->callback_flags, CBM_INDT_ANIM_NEXT_FRAME)) {
   299 	if (HASBIT(itspec->callback_flags, CBM_INDT_ANIM_NEXT_FRAME)) {
   300 		uint16 callback_res = GetIndustryTileCallback(CBID_INDTILE_ANIM_NEXT_FRAME, HASBIT(itspec->animation_special_flags, 0) ? Random() : 0, 0, gfx, ind, tile);
   300 		uint16 callback_res = GetIndustryTileCallback(CBID_INDTILE_ANIM_NEXT_FRAME, HASBIT(itspec->animation_special_flags, 0) ? Random() : 0, 0, gfx, ind, tile);
   301 
   301 
   302 		if (callback_res != CALLBACK_FAILED) {
   302 		if (callback_res != CALLBACK_FAILED) {