train_cmd.c
changeset 358 da81e0ef68cf
parent 337 cbe0c766c947
child 395 788a9bba0889
equal deleted inserted replaced
357:5a92ba8a59e6 358:da81e0ef68cf
   172 
   172 
   173 	int img = rvi->image_index;
   173 	int img = rvi->image_index;
   174 	uint32 image = 0;
   174 	uint32 image = 0;
   175 
   175 
   176 	if (is_custom_sprite(img)) {
   176 	if (is_custom_sprite(img)) {
   177 		image = GetCustomEngineSprite(engine, -1, CID_PURCHASE, 0, 0, 6);
   177 		image = GetCustomVehicleIcon(engine, 6);
   178 		if (!image) img = _engine_original_sprites[engine];
   178 		if (!image) img = _engine_original_sprites[engine];
   179 	}
   179 	}
   180 	if (!image) {
   180 	if (!image) {
   181 		image = (6 & _engine_sprite_and[img]) + _engine_sprite_base[img];
   181 		image = (6 & _engine_sprite_and[img]) + _engine_sprite_base[img];
   182 	}
   182 	}
   184 	if (rvi->flags & RVI_MULTIHEAD) {
   184 	if (rvi->flags & RVI_MULTIHEAD) {
   185 		DrawSprite(image | image_ormod, x-14, y);
   185 		DrawSprite(image | image_ormod, x-14, y);
   186 		x += 15;
   186 		x += 15;
   187 		image = 0;
   187 		image = 0;
   188 		if (is_custom_sprite(img)) {
   188 		if (is_custom_sprite(img)) {
   189 			image = GetCustomEngineSprite(engine, -1, CID_PURCHASE, 0, 0, 2);
   189 			image = GetCustomVehicleIcon(engine, 2);
   190 			if (!image) img = _engine_original_sprites[engine];
   190 			if (!image) img = _engine_original_sprites[engine];
   191 		}
   191 		}
   192 		if (!image) {
   192 		if (!image) {
   193 			image = ((6 + _engine_sprite_add[img+1]) & _engine_sprite_and[img+1]) + _engine_sprite_base[img+1];
   193 			image = ((6 + _engine_sprite_add[img+1]) & _engine_sprite_and[img+1]) + _engine_sprite_base[img+1];
   194 		}
   194 		}