Skip to content

Commit

Permalink
Refactor|libcommon: Implement player (de)serialization in C++, with R…
Browse files Browse the repository at this point in the history
…eader/Writer
  • Loading branch information
danij-deng committed Feb 12, 2014
1 parent a1db720 commit 4d7c9ea
Show file tree
Hide file tree
Showing 9 changed files with 501 additions and 473 deletions.
17 changes: 17 additions & 0 deletions doomsday/plugins/common/include/p_saveg.h
Expand Up @@ -119,6 +119,23 @@ mobj_t *SV_GetArchiveThing(ThingSerialId thingid, void *address);
*/
void SV_TranslateLegacyMobjFlags(mobj_t *mo, int ver);

typedef struct playerheader_s {
int numPowers;
int numKeys;
int numFrags;
int numWeapons;
int numAmmoTypes;
int numPSprites;
#if __JDOOM64__ || __JHERETIC__ || __JHEXEN__
int numInvItemTypes;
#endif
#if __JHEXEN__
int numArmorTypes;
#endif
} playerheader_t;

playerheader_t *SV_GetPlayerHeader(void);

#if __JHEXEN__
void SV_HxSaveHubMap(void);
void SV_HxLoadHubMap(void);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/common/include/player.h
Expand Up @@ -71,7 +71,7 @@ weapontype_t P_WeaponSlotCycle(weapontype_t type, dd_bool prev);
*
* @return Number of the given player.
*/
int P_GetPlayerNum(player_t *plr);
int P_GetPlayerNum(player_t const *plr);

/**
* Return a bit field for the current player's cheats.
Expand Down

0 comments on commit 4d7c9ea

Please sign in to comment.