Fully implemented delete, added an easy-to-use ID lookup system for undo commands, fixed a bunch of crashes when undoing/redoing after creating/deleting an object

This commit is contained in:
parax0
2016-03-16 19:09:59 -06:00
parent 63812ae4b2
commit c4e05610f3
66 changed files with 992 additions and 569 deletions

View File

@@ -292,3 +292,15 @@ void CScriptCooker::WriteLayer(EGame Game, CScriptLayer *pLayer, IOutputStream&
else
Cooker.WriteLayerMP2(pLayer);
}
void CScriptCooker::CookInstance(EGame Game, CScriptObject *pInstance, IOutputStream& rOut)
{
CScriptCooker Cooker;
Cooker.mpSCLY = &rOut;
Cooker.mVersion = Game;
if (Game <= ePrime)
Cooker.WriteInstanceMP1(pInstance);
else
Cooker.WriteInstanceMP2(pInstance);
}

View File

@@ -20,6 +20,7 @@ class CScriptCooker
public:
static void WriteLayer(EGame Game, CScriptLayer *pLayer, IOutputStream& rOut);
static void CookInstance(EGame Game, CScriptObject *pInstance, IOutputStream& rOut);
};
#endif // CSCRIPTCOOKER_H