Quasar
Moderator

Posts: 4484
Registered: 08-00 |
Kaiser and I have completed mapping out the player_t structure in Strife. Unlike most of the other structures, this one suffered extensive changes, a couple of which are somewhat surprising - particularly the use of a 40-integer array to track what maps you've used the map/scanner on.
EDIT: Updated 10/11/2009
code:
player_t (sizeof == 1025)
-------------------------------------------------------------------------------
0: mobj_t *mo
4: playerstate_t playerstate (0 = PST_LIVE, 1 = PST_DEAD, 2 = PST_REBORN)
8: ticcmd_t cmd
0: byte forwardmove
1: byte sidemove
2: short angleturn
4: short consistency
6: char chatchar
7: byte buttons
8: byte buttons2 (inventory / updown-look related)
9: int inventoryitem
21: fixed_t viewz
25: fixed_t viewheight
29: fixed_t deltaviewheight
33: fixed_t bob
37: int health
41: short armorpoints (note: was int in DOOM!)
43: short armortype (note: was int in DOOM!)
45: int powers[6]
45: berserk
49: shadowarmor
53: envirosuit
57: map/scanner (1 = map, 2 = scanner)
61: comm unit
65: targeter
69: int sigiltype
73: int nukagecount
77: int questflags
81: int pitch (ranges from 90 to -110)
85: int centerview (if asserted, pitch +=/-= 8 until pitch == 0)
89: inventory_t inventory[32]
89: int sprite
93: int mobjtype
97: int amount
(x32)
473: int st_refresh (used in P_TouchSpecialThing etc, wakes up status bar)
477: short numinventory (# of unique items possessed)
479: short inventorycursor (used in P_GiveInventoryItem etc)
481: short accuracy (Set to 50 in P_SpawnPlayer if deathmatch)
483: short stamina
485: int keys[27] (sizeof == 0x1B * 4 in ST_Responder)
485: Base Key
489: Govs Key
493: Pass Card Key
497: ID Card
501: Prison Key
505: Hand Print
509: Power Key 1
513: Power Key 2
517: Power Key 3
521: Gold Key
525: ID Badge
529: Silver Key
533: Oracle Key
537: Military ID
541: Order Key
545: Warehouse Key
549: Brass Key
553: Red Crystal
557: Blue Crystal
561: Chapel Key
565: Catacomb Key
569: Security Key
573: Core Key
577: Mauler Key
581: Factory Key
585: Mine Key
589: New Key 5
593: int backpack
597: int attackdown (used in A_WeaponReady etc)
601: int usedown
605: int inventorydown (signals item use action)
609: int frags[8]
641: int readyweapon
645: int pendingweapon
649: int weaponowned[11]
649: Punch Dagger (lowest priority in P_CheckAmmo, no ammo used)
653: Electric Crossbow
657: Assault Rifle
661: Mini-Missile Launcher
665: HE Grenade Launcher
669: Flamethrower (uses ammo 705)
673: Mauler (requires 20 ammo in P_CheckAmmo [highest priority weapon])
677: Sigil (set to 1 by P_SpawnPlayer if gamemap == 10)
681: Poison Bolt Crossbow
685: WP Grenade Launcher
689: Mauler Torpedo (requires 30 ammo in P_CheckAmmo [which doesn't work!])
693: int ammo[7]
693: bullets
697: electric bolts
701: poison bolts
705: energy cells
709: mini missiles
713: he grenades
717: wp grenades
721: int maxammo[7]
749: int cheats
0x01: CF_NOCLIP
0x02: CF_GODMODE (also set if -work used)
0x04: CF_NOMOMENTUM (unused vanilla DOOM hack in P_XYMovement)
0x08: inventory use disabled if set (set when on fire)
0x10: autouse health state (0 = off, 1 = on)
753: int refire (Set to 0 in P_SpawnPlayer; used in A_ReFire)
757: short killcount (incremented in P_KillMobj if target->flags & MF_COUNTKILL)
759: char *message
763: int damagecount
767: int bonuscount
771: mobj_t *attacker
775: int extralight
779: int fixedcolormap
783: short allegiance (copied to teleport beacon in P_SpawnTeleportBeacon)
785: pspdef_t psprites[5]
785: state
789: tics
793: sx
797: sy
(x5: gun, flash, targeter l/r/center)
865: int mapstate[40]
1025: END
Last edited by Quasar on 10-12-09 at 00:08
|