- added some separators to dobject.cpp

- added restore code for subsector automap info.
This commit is contained in:
Christoph Oelckers 2016-09-20 13:30:31 +02:00
parent f3e8c7c241
commit e41296a64d
2 changed files with 75 additions and 0 deletions

View File

@ -50,6 +50,12 @@
#include "farchive.h"
#include "serializer.h"
//==========================================================================
//
//
//
//==========================================================================
ClassReg DObject::RegistrationInfo =
{
NULL, // MyClass
@ -62,6 +68,12 @@ ClassReg DObject::RegistrationInfo =
};
_DECLARE_TI(DObject)
//==========================================================================
//
//
//
//==========================================================================
CCMD (dumpactors)
{
const char *const filters[32] =
@ -96,6 +108,12 @@ CCMD (dumpactors)
}
}
//==========================================================================
//
//
//
//==========================================================================
CCMD (dumpclasses)
{
// This is by no means speed-optimized. But it's an informational console
@ -235,6 +253,12 @@ CCMD (dumpclasses)
Printf ("%d classes shown, %d omitted\n", shown, omitted);
}
//==========================================================================
//
//
//
//==========================================================================
void DObject::InPlaceConstructor (void *mem)
{
new ((EInPlace *)mem) DObject;
@ -256,6 +280,12 @@ DObject::DObject (PClass *inClass)
GC::Root = this;
}
//==========================================================================
//
//
//
//==========================================================================
DObject::~DObject ()
{
if (!PClass::bShutdown)
@ -305,11 +335,23 @@ DObject::~DObject ()
}
}
//==========================================================================
//
//
//
//==========================================================================
void DObject::Destroy ()
{
ObjectFlags = (ObjectFlags & ~OF_Fixed) | OF_EuthanizeMe;
}
//==========================================================================
//
//
//
//==========================================================================
size_t DObject::PropagateMark()
{
const PClass *info = GetClass();
@ -331,6 +373,12 @@ size_t DObject::PropagateMark()
return 0;
}
//==========================================================================
//
//
//
//==========================================================================
size_t DObject::PointerSubstitution (DObject *old, DObject *notOld)
{
const PClass *info = GetClass();
@ -353,6 +401,12 @@ size_t DObject::PointerSubstitution (DObject *old, DObject *notOld)
return changed;
}
//==========================================================================
//
//
//
//==========================================================================
size_t DObject::StaticPointerSubstitution (DObject *old, DObject *notOld)
{
DObject *probe;
@ -418,6 +472,12 @@ size_t DObject::StaticPointerSubstitution (DObject *old, DObject *notOld)
return changed;
}
//==========================================================================
//
//
//
//==========================================================================
void DObject::SerializeUserVars(FArchive &arc)
{
PSymbolTable *symt;
@ -480,6 +540,12 @@ void DObject::SerializeUserVars(FArchive &arc)
}
}
//==========================================================================
//
//
//
//==========================================================================
void DObject::Serialize(FSerializer &arc)
{
ObjectFlags |= OF_SerialSuccess;

View File

@ -675,6 +675,7 @@ FSerializer &Serialize(FSerializer &arc, const char *key, subsector_t *&ss, subs
if (num_verts == numvertexes && num_subs == numsubsectors && hasglnodes)
{
success = true;
int sub = 0;
for (int i = 0; str[i] != 0; i++)
{
by = str[i];
@ -688,6 +689,14 @@ FSerializer &Serialize(FSerializer &arc, const char *key, subsector_t *&ss, subs
success = false;
break;
}
for (int s = 0; s < 6; s++)
{
if (sub + s < numsubsectors && (by & (1 << s)))
{
subsectors[sub + s].flags |= SSECF_DRAWN;
}
}
sub += 6;
}
}
if (hasglnodes && !success)