Remove SaveActor Fixup and UnFixup
MODIFY
generator/csv/functions.csv
generator/csv/functions.csv
@@ -2,8 +2,6 @@ Structure,Method,Headers
Actor,void Setup(),
Save,void Setup(),
SaveActor,void Setup(int actor_id),
-SaveActor,void Fixup(int actor_id),
-SaveActor,void UnFixup(),
SaveInventory,void Setup(),
SaveMapEvent,void Setup(const rpg::Event& event),"""lcf/rpg/event.h"""
SaveMapInfo,void Setup(),

MODIFY
src/generated/lcf/rpg/saveactor.h
src/generated/lcf/rpg/saveactor.h
Binary files a/src/generated/lcf/rpg/saveactor.h and b/src/generated/lcf/rpg/saveactor.h differ

MODIFY
src/lsd_reader.cpp
src/lsd_reader.cpp
@@ -138,9 +138,6 @@ std::unique_ptr<rpg::Save> LSD_Reader::LoadXml(std::istream& filestream) {
rpg::Save LSD_Reader::ClearDefaults(const rpg::Save& save_in, const rpg::MapInfo& map_info, const rpg::Map& map) {
auto save = save_in;
- for (auto& actor: save.actors) {
- actor.UnFixup();
- }
save.map_info.UnFixup(map);
save.map_info.UnFixup(map_info);

MODIFY
src/rpg_fixup.cpp
src/rpg_fixup.cpp
@@ -31,54 +31,6 @@ void UnFixInt(T& val, U def) {
namespace lcf {
-void rpg::SaveActor::Fixup(int actor_id) {
- ID = actor_id;
-
- const rpg::Actor& actor = lcf::Data::actors[actor_id - 1];
-
- if (name == "\x1") {
- name = ToString(actor.name);
- }
- if (title == "\x1") {
- title = ToString(actor.title);
- }
- if (sprite_name.empty()) {
- sprite_name = ToString(actor.character_name);
- sprite_id = actor.character_index;
- transparency = actor.transparent ? 3 : 0;
- }
- if (face_name.empty()) {
- face_name = ToString(actor.face_name);
- face_id = actor.face_index;
- }
-
- if (status.size() < lcf::Data::states.size()) {
- status.resize(lcf::Data::states.size());
- }
-}
-
-void rpg::SaveActor::UnFixup() {
- const rpg::Actor& actor = lcf::Data::actors[ID - 1];
-
- if (name == actor.name) {
- name = "\x1";
- }
- if (title == actor.title) {
- title = "\x1";
- }
- if (sprite_name == actor.character_name
- && sprite_id == actor.character_index
- && transparency == (actor.transparent ? 3 : 0)) {
- sprite_name.clear();
- sprite_id = 0;
- transparency = 0;
- }
- if (face_name == actor.face_name && face_id == actor.face_index) {
- face_name.clear();
- face_id = 0;
- }
-}
-
void rpg::SaveMapInfo::Fixup(const rpg::Map& map) {
FixInt(chipset_id, map.chipset_id);
}

Remove SaveActor Fixup and UnFixup