static void saveg_write_thinker_t(thinker_t *str) { // struct thinker_s* prev; saveg_writep(str->prev); // struct thinker_s* next; saveg_writep(str->next); // think_t function; saveg_write_think_t(&str->function); }
static void saveg_write_player_t(player_t *str) { int i; // mobj_t* mo; saveg_writep(str->mo); // playerstate_t playerstate; saveg_write_enum(str->playerstate); // ticcmd_t cmd; saveg_write_ticcmd_t(&str->cmd); // fixed_t viewz; saveg_write32(str->viewz); // fixed_t viewheight; saveg_write32(str->viewheight); // fixed_t deltaviewheight; saveg_write32(str->deltaviewheight); // fixed_t bob; saveg_write32(str->bob); // int health; saveg_write32(str->health); // int armorpoints; saveg_write32(str->armorpoints); // int armortype; saveg_write32(str->armortype); // int powers[NUMPOWERS]; for (i=0; i<NUMPOWERS; ++i) { saveg_write32(str->powers[i]); } // boolean cards[NUMCARDS]; for (i=0; i<NUMCARDS; ++i) { saveg_write32(str->cards[i]); } // boolean backpack; saveg_write32(str->backpack); // int frags[MAXPLAYERS]; for (i=0; i<MAXPLAYERS; ++i) { saveg_write32(str->frags[i]); } // weapontype_t readyweapon; saveg_write_enum(str->readyweapon); // weapontype_t pendingweapon; saveg_write_enum(str->pendingweapon); // boolean weaponowned[NUMWEAPONS]; for (i=0; i<NUMWEAPONS; ++i) { saveg_write32(str->weaponowned[i]); } // int ammo[NUMAMMO]; for (i=0; i<NUMAMMO; ++i) { saveg_write32(str->ammo[i]); } // int maxammo[NUMAMMO]; for (i=0; i<NUMAMMO; ++i) { saveg_write32(str->maxammo[i]); } // int attackdown; saveg_write32(str->attackdown); // int usedown; saveg_write32(str->usedown); // int cheats; saveg_write32(str->cheats); // int refire; saveg_write32(str->refire); // int killcount; saveg_write32(str->killcount); // int itemcount; saveg_write32(str->itemcount); // int secretcount; saveg_write32(str->secretcount); // char* message; saveg_writep(str->message); // int damagecount; saveg_write32(str->damagecount); // int bonuscount; saveg_write32(str->bonuscount); // mobj_t* attacker; saveg_writep(str->attacker); // int extralight; saveg_write32(str->extralight); // int fixedcolormap; saveg_write32(str->fixedcolormap); // int colormap; saveg_write32(str->colormap); // pspdef_t psprites[NUMPSPRITES]; for (i=0; i<NUMPSPRITES; ++i) { saveg_write_pspdef_t(&str->psprites[i]); } // boolean didsecret; saveg_write32(str->didsecret); }
static void saveg_write_mobj_t(mobj_t *str) { // thinker_t thinker; saveg_write_thinker_t(&str->thinker); // fixed_t x; saveg_write32(str->x); // fixed_t y; saveg_write32(str->y); // fixed_t z; saveg_write32(str->z); // struct mobj_s* snext; saveg_writep(str->snext); // struct mobj_s* sprev; saveg_writep(str->sprev); // angle_t angle; saveg_write32(str->angle); // spritenum_t sprite; saveg_write_enum(str->sprite); // int frame; saveg_write32(str->frame); // struct mobj_s* bnext; saveg_writep(str->bnext); // struct mobj_s* bprev; saveg_writep(str->bprev); // struct subsector_s* subsector; saveg_writep(str->subsector); // fixed_t floorz; saveg_write32(str->floorz); // fixed_t ceilingz; saveg_write32(str->ceilingz); // fixed_t radius; saveg_write32(str->radius); // fixed_t height; saveg_write32(str->height); // fixed_t momx; saveg_write32(str->momx); // fixed_t momy; saveg_write32(str->momy); // fixed_t momz; saveg_write32(str->momz); // int validcount; saveg_write32(str->validcount); // mobjtype_t type; saveg_write_enum(str->type); // mobjinfo_t* info; saveg_writep(str->info); // int tics; saveg_write32(str->tics); // state_t* state; saveg_write32(str->state - states); // int flags; saveg_write32(str->flags); // int health; saveg_write32(str->health); // int movedir; saveg_write32(str->movedir); // int movecount; saveg_write32(str->movecount); // struct mobj_s* target; saveg_writep(str->target); // int reactiontime; saveg_write32(str->reactiontime); // int threshold; saveg_write32(str->threshold); // struct player_s* player; if (str->player) { saveg_write32(str->player - players + 1); } else { saveg_write32(0); } // int lastlook; saveg_write32(str->lastlook); // mapthing_t spawnpoint; saveg_write_mapthing_t(&str->spawnpoint); // struct mobj_s* tracer; saveg_writep(str->tracer); }
static void saveg_write_actionf_t(actionf_t *str) { // actionf_p1 acp1; saveg_writep(str->acp1); }
static void saveg_write_player_t(player_t *str) { int i; // mobj_t* mo; saveg_writep(str->mo); // playerstate_t playerstate; saveg_write_enum(str->playerstate); // ticcmd_t cmd; saveg_write_ticcmd_t(&str->cmd); // fixed_t viewz; saveg_write32(str->viewz); // fixed_t viewheight; saveg_write32(str->viewheight); // fixed_t deltaviewheight; saveg_write32(str->deltaviewheight); // fixed_t bob; saveg_write32(str->bob); // int health; saveg_write32(str->health); // int armorpoints; saveg_write16(str->armorpoints); // [STRIFE] 32 -> 16 // int armortype; saveg_write16(str->armortype); // [STRIFE] 32 -> 16 // int powers[NUMPOWERS]; for (i=0; i<NUMPOWERS; ++i) { saveg_write32(str->powers[i]); } // int sigiltype; saveg_write32(str->sigiltype); // [STRIFE] // int nukagecount; saveg_write32(str->nukagecount); // [STRIFE] // int questflags; saveg_write32(str->questflags); // [STRIFE] // int pitch; saveg_write32(str->pitch); // [STRIFE] // int centerview; saveg_write32(str->centerview); // [STRIFE] // inventory_t inventory[NUMINVENTORY]; for(i = 0; i < NUMINVENTORY; ++i) // [STRIFE] { saveg_write_inventory_t(&str->inventory[i]); } // int st_update; saveg_write32(str->st_update); // [STRIFE] // short numinventory; saveg_write16(str->numinventory); // [STRIFE] // short inventorycursor; saveg_write16(str->inventorycursor); // [STRIFE] // short accuracy; saveg_write16(str->accuracy); // [STRIFE] // short stamina; saveg_write16(str->stamina); // [STRIFE] // boolean cards[NUMCARDS]; for (i=0; i<NUMCARDS; ++i) { saveg_write32(str->cards[i]); } // boolean backpack; saveg_write32(str->backpack); // int attackdown; saveg_write32(str->attackdown); // int usedown; saveg_write32(str->usedown); // int inventorydown; saveg_write32(str->inventorydown); // [STRIFE] // int frags[MAXPLAYERS]; for (i=0; i<MAXPLAYERS; ++i) { saveg_write32(str->frags[i]); } // weapontype_t readyweapon; saveg_write_enum(str->readyweapon); // weapontype_t pendingweapon; saveg_write_enum(str->pendingweapon); // boolean weaponowned[NUMWEAPONS]; for (i=0; i<NUMWEAPONS; ++i) { saveg_write32(str->weaponowned[i]); } // int ammo[NUMAMMO]; for (i=0; i<NUMAMMO; ++i) { saveg_write32(str->ammo[i]); } // int maxammo[NUMAMMO]; for (i=0; i<NUMAMMO; ++i) { saveg_write32(str->maxammo[i]); } // int cheats; saveg_write32(str->cheats); // int refire; saveg_write32(str->refire); // short killcount; saveg_write16(str->killcount); // [STRIFE] 32 -> 16 // haleyjd 08/30/10 [STRIFE] No itemcount // int itemcount; //saveg_write32(str->itemcount); // haleyjd 08/30/10 [STRIFE] No secretcount // int secretcount; //saveg_write32(str->secretcount); // char* message; saveg_writep(str->message); // int damagecount; saveg_write32(str->damagecount); // int bonuscount; saveg_write32(str->bonuscount); // mobj_t* attacker; saveg_writep(str->attacker); // int extralight; saveg_write32(str->extralight); // int fixedcolormap; saveg_write32(str->fixedcolormap); // int colormap; [STRIFE] no such field //saveg_write32(str->colormap); // short allegiance; saveg_write16(str->allegiance); // [STRIFE] // pspdef_t psprites[NUMPSPRITES]; for (i=0; i<NUMPSPRITES; ++i) { saveg_write_pspdef_t(&str->psprites[i]); } // int mapstate[40]; for(i = 0; i < 40; ++i) // [STRIFE] { saveg_write32(str->mapstate[i]); } // haleyjd 08/30/10: [STRIFE] No intermission, no secret. // boolean didsecret; //saveg_write32(str->didsecret); }