Skip to content

Commit

Permalink
Refactor|libcommon: Implement mobj (de)serialization in C++, with Rea…
Browse files Browse the repository at this point in the history
…der/Writer
  • Loading branch information
danij-deng committed Feb 12, 2014
1 parent 2f2a3ce commit 2319cde
Show file tree
Hide file tree
Showing 8 changed files with 608 additions and 575 deletions.
6 changes: 3 additions & 3 deletions doomsday/plugins/common/include/p_saveg.h
Expand Up @@ -28,6 +28,7 @@

DENG_EXTERN_C int thingArchiveVersion;
DENG_EXTERN_C uint thingArchiveSize;
DENG_EXTERN_C int saveToRealPlayerNum[MAXPLAYERS];
DENG_EXTERN_C SaveSlots saveSlots;

#ifdef __cplusplus
Expand Down Expand Up @@ -95,6 +96,8 @@ typedef ushort ThingSerialId;
*/
ThingSerialId SV_ThingArchiveId(mobj_t const *mobj);

void SV_InsertThingInArchive(mobj_t const *mobj, ThingSerialId thingId);

/**
* To be called after reading a game state has been read to lookup a pointer
* to the mobj which is associated with the specified @a thingId.
Expand Down Expand Up @@ -148,9 +151,6 @@ void SV_InitTargetPlayers(void);
class MapStateReader;
class MapStateWriter;

void SV_WriteMobj(thinker_t *th, MapStateWriter *msw);
int SV_ReadMobj(thinker_t *th, MapStateReader *msr);

#if __JHEXEN__
void SV_WriteMovePoly(struct polyevent_s const *movepoly, MapStateWriter *msw);
int SV_ReadMovePoly(struct polyevent_s *movepoly, MapStateReader *msr);
Expand Down

0 comments on commit 2319cde

Please sign in to comment.