use the vmethod for getting improvement images.

develop
Japa 2018-01-31 10:11:43 +05:30
parent 8d8632908e
commit e63a871363
2 changed files with 2 additions and 9 deletions

@ -1 +1 @@
Subproject commit ef5b1c8f037a6240acdd3957fb7b6b9de529c5e2 Subproject commit 2b7ef6fdeb87cc63eb56d57d5b6b220176840404

@ -106,13 +106,6 @@ void CopyImage(const df::art_image * image, ArtImage * netImage)
void CopyImage(df::art_image_ref imageRef, ArtImage * netImage) void CopyImage(df::art_image_ref imageRef, ArtImage * netImage)
{ {
GET_IMAGE getImage = reinterpret_cast<GET_IMAGE>(Core::getInstance().vinfo->getAddress("rfr_get_art_image"));
if (getImage)
{
int16_t subid = -1;
CopyImage(getImage(world, &imageRef, &subid), netImage);
}
else
{ {
for (int i = 0; i < world->art_image_chunks.size(); i++) for (int i = 0; i < world->art_image_chunks.size(); i++)
{ {
@ -402,7 +395,7 @@ void CopyItem(RemoteFortressReader::Item * NetItem, df::item * DfItem)
case df::enums::improvement_type::ART_IMAGE: case df::enums::improvement_type::ART_IMAGE:
{ {
VIRTUAL_CAST_VAR(artImage, df::itemimprovement_art_imagest, improvement); VIRTUAL_CAST_VAR(artImage, df::itemimprovement_art_imagest, improvement);
CopyImage(artImage->image, netImp->mutable_image()); CopyImage(artImage->getImage(DfItem), netImp->mutable_image());
break; break;
} }
case df::enums::improvement_type::COVERED: case df::enums::improvement_type::COVERED: