- added polyobject serializer.

- added sanity checks to prevent a savegame from being loaded with an incompatible map
- refactored a few things to simplify serialization.
- started work on main level serializer function.
This commit is contained in:
Christoph Oelckers 2016-09-20 09:11:13 +02:00
commit daf43f9d35
13 changed files with 221 additions and 200 deletions

View file

@ -38,7 +38,7 @@
#include "gi.h"
#include "p_setup.h"
#include "c_bind.h"
#include "farchive.h"
#include "serializer.h"
#include "r_renderer.h"
#include "r_sky.h"
#include "sbar.h"
@ -3106,13 +3106,14 @@ void AM_Drawer ()
//
//=============================================================================
void AM_SerializeMarkers(FArchive &arc)
void AM_SerializeMarkers(FSerializer &arc)
{
arc << markpointnum;
for (int i=0; i<AM_NUMMARKPOINTS; i++)
if (arc.BeginObject("automarkers"))
{
arc << markpoints[i].x << markpoints[i].y;
arc("markpointnum", markpointnum)
.Array("markpoints", &markpoints[0].x, AM_NUMMARKPOINTS*2) // write as a double array.
("scale_mtof", scale_mtof)
("scale_ftom", scale_ftom)
.EndObject();
}
arc << scale_mtof;
arc << scale_ftom;
}