Skip to content

Commit f870221

Browse files
committed
Complete player and mobj defs
1 parent ba6674d commit f870221

File tree

1 file changed

+50
-9
lines changed

1 file changed

+50
-9
lines changed

Assets/Lua/Doom/dsda-data.lua

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ end
6363
-- player_t https://github.com/TASEmulators/dsda-doom/blob/5608ee441410ecae10a17ecdbe1940bd4e1a2856/prboom2/src/d_player.h#L143-L267
6464
dsda.player = dsda.struct_layout()
6565
.ptr ("mobj")
66-
.s32 ("playerstate")
66+
.s32 ("playerstate") -- playerstate_t
6767
.add ("cmd", 14, 2)
6868
.s32 ("viewz")
6969
.s32 ("viewheight")
@@ -76,8 +76,8 @@ dsda.player = dsda.struct_layout()
7676
.array("cards", "bool", 11)
7777
.bool ("backpack")
7878
.array("frags", "s32", 8)
79-
.s32 ("readyweapon")
80-
.s32 ("pendingweapon")
79+
.s32 ("readyweapon") -- weapontype_t
80+
.s32 ("pendingweapon") -- weapontype_t
8181
.array("weaponowned", "bool", 9)
8282
.array("ammo", "s32", 6)
8383
.array("maxammo", "s32", 6)
@@ -94,15 +94,39 @@ dsda.player = dsda.struct_layout()
9494
.s32 ("extralight")
9595
.s32 ("fixedcolormap")
9696
.s32 ("colormap")
97-
.add ("psprites", 24*2, 8)
97+
.add ("psprites", 24*2, 8) -- pspdef_t[2]
9898
.bool ("didsecret")
9999
.s32 ("momx")
100100
.s32 ("mony")
101101
.s32 ("maxkilldiscount")
102102
.s32 ("prev_viewz")
103103
.u32 ("prev_viewangle")
104104
.u32 ("prev_viewpitch")
105-
-- the rest are non-doom
105+
-- heretic
106+
.s32 ("flyheight")
107+
.s32 ("lookdir")
108+
.bool ("centering")
109+
.array("inventory", "s32", 33*2) -- inventory_t { int type, int count }
110+
.s32 ("readyArtifact") -- artitype_t
111+
.s32 ("artifactCount")
112+
.s32 ("inventorySlotNum")
113+
.s32 ("flamecount")
114+
.s32 ("chickenTics")
115+
.s32 ("chickenPeck")
116+
.ptr ("rain1")
117+
.ptr ("rain2")
118+
-- hexen
119+
.s32 ("pclass") -- pclass_t
120+
.s32 ("morphTics")
121+
.s32 ("pieces")
122+
.s16 ("yellowMessage")
123+
.s32 ("poisoncount")
124+
.ptr ("poisoner")
125+
.u32 ("jumpTics")
126+
.u32 ("worldTimer")
127+
-- zdoom
128+
.s32 ("hazardcount")
129+
.u8 ("hazardinterval")
106130

107131
-- mobj_t https://github.com/TASEmulators/dsda-doom/blob/5608ee441410ecae10a17ecdbe1940bd4e1a2856/prboom2/src/p_mobj.h#L277-L413
108132
dsda.mobj = dsda.struct_layout()
@@ -113,7 +137,7 @@ dsda.mobj = dsda.struct_layout()
113137
.ptr("snext")
114138
.ptr("sprev")
115139
.u32("angle")
116-
.s32("sprite")
140+
.s32("sprite") -- spritenum_t
117141
.s32("frame")
118142
.ptr("bnext")
119143
.ptr("bprev")
@@ -127,7 +151,7 @@ dsda.mobj = dsda.struct_layout()
127151
.s32("momy")
128152
.s32("momz")
129153
.s32("validcount")
130-
.s32("type")
154+
.s32("type") -- mobjtype_t
131155
.ptr("info")
132156
.s32("tics")
133157
.ptr("state")
@@ -144,7 +168,7 @@ dsda.mobj = dsda.struct_layout()
144168
.s16("gear")
145169
.ptr("player")
146170
.s16("lastlook")
147-
.add("spawnpoint", 58, 4)
171+
.add("spawnpoint", 58, 4) -- mapthing_t
148172
.ptr("tracer")
149173
.ptr("lastenemy")
150174
.s32("friction")
@@ -157,7 +181,24 @@ dsda.mobj = dsda.struct_layout()
157181
.s32("index")
158182
.s16("patch_width")
159183
.s32("iden_nums")
160-
-- the rest are non-doom
184+
-- heretic
185+
.s32 ("damage")
186+
.u64 ("flags2")
187+
.add ("special1", 16, 8) -- specialval_t
188+
.add ("special2", 16, 8) -- specialval_t
189+
-- hexen
190+
.s32 ("floorpic")
191+
.s32 ("floorclip")
192+
.s32 ("archiveNum")
193+
.s16 ("tid")
194+
.s32 ("special")
195+
.array("special_args", "s32", 5)
196+
-- zdoom
197+
.s32 ("gravity")
198+
.float("alpha")
199+
-- misc
200+
.u8 ("color")
201+
.ptr ("tranmap")
161202

162203
-- sector_t https://github.com/TASEmulators/dsda-doom/blob/5608ee441410ecae10a17ecdbe1940bd4e1a2856/prboom2/src/r_defs.h#L124-L213
163204
dsda.sector = dsda.struct_layout()

0 commit comments

Comments
 (0)