diff --git a/engines/grim/emi/costumeemi.cpp b/engines/grim/emi/costumeemi.cpp index cf3c8dc8492..e8db7f418e7 100644 --- a/engines/grim/emi/costumeemi.cpp +++ b/engines/grim/emi/costumeemi.cpp @@ -227,12 +227,21 @@ int EMICostume::update(uint time) { void EMICostume::saveState(SaveGame *state) const { Costume::saveState(state); + Common::List::const_iterator it = _materials.begin(); + for (; it != _materials.end(); ++it) { + state->writeLESint32((*it)->getActiveTexture()); + } state->writeLESint32(_wearChore ? _wearChore->getChoreId() : -1); } bool EMICostume::restoreState(SaveGame *state) override { bool ret = Costume::restoreState(state); if (ret) { + Common::List::const_iterator it = _materials.begin(); + for (; it != _materials.end(); ++it) { + (*it)->setActiveTexture(state->readLESint32()); + } + int id = state->readLESint32(); if (id >= 0) { EMIChore *chore = static_cast(_chores[id]);