Subversion Repositories eduke32

Rev

Rev 5039 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5039 Rev 5045
1
-- CON language definitions
1
-- CON language definitions
2
2
3
local lpeg = require("lpeg")
3
local lpeg = require("lpeg")
4
4
5
local pairs = pairs
5
local pairs = pairs
6
local print = print
6
local print = print
7
local setmetatable = setmetatable
7
local setmetatable = setmetatable
8
local type = type
8
local type = type
9
9
10
10
11
module(...)
11
module(...)
12
12
13
13
14
MAXVOLUMES = 7
14
MAXVOLUMES = 7
15
MAXLEVELS = 64
15
MAXLEVELS = 64
16
MAXGAMETYPES = 16
16
MAXGAMETYPES = 16
17
17
18
MAXSKILLS = 7
18
MAXSKILLS = 7
19
19
20
MAXSOUNDS = 4096
20
MAXSOUNDS = 4096
21
21
22
MAXSESSIONVARS = 8  -- KEEPINSYNC lunatic_game.c
22
MAXSESSIONVARS = 8  -- KEEPINSYNC lunatic_game.c
23
23
24
-- KEEPINSYNC quotes.h
24
-- KEEPINSYNC quotes.h
25
25
26
-- For Lunatic, MAXQUOTES is OBITQUOTEINDEX because starting from that index
26
-- For Lunatic, MAXQUOTES is OBITQUOTEINDEX because starting from that index
27
-- are obituary and suicide quotes which are passed as *format strings* to
27
-- are obituary and suicide quotes which are passed as *format strings* to
28
-- sprintf() in C.
28
-- sprintf() in C.
29
REALMAXQUOTES = 16384
29
REALMAXQUOTES = 16384
30
MAXQUOTES = REALMAXQUOTES-128
30
MAXQUOTES = REALMAXQUOTES-128
31
MAXQUOTELEN = 128
31
MAXQUOTELEN = 128
32
32
33
local STR = {
33
local STR = {
34
    STR_MAPNAME = 0,
34
    STR_MAPNAME = 0,
35
    STR_MAPFILENAME = 1,
35
    STR_MAPFILENAME = 1,
36
    STR_PLAYERNAME = 2,
36
    STR_PLAYERNAME = 2,
37
    STR_VERSION = 3,
37
    STR_VERSION = 3,
38
    STR_GAMETYPE = 4,
38
    STR_GAMETYPE = 4,
39
    STR_VOLUMENAME = 5,
39
    STR_VOLUMENAME = 5,
40
    STR_YOURTIME = 6,
40
    STR_YOURTIME = 6,
41
    STR_PARTIME = 7,
41
    STR_PARTIME = 7,
42
    STR_DESIGNERTIME = 8,
42
    STR_DESIGNERTIME = 8,
43
    STR_BESTTIME = 9,
43
    STR_BESTTIME = 9,
44
}
44
}
45
45
46
PROJ = {
46
PROJ = {
47
    PROJ_WORKSLIKE = 0,
47
    PROJ_WORKSLIKE = 0,
48
    PROJ_SPAWNS = 1,
48
    PROJ_SPAWNS = 1,
49
    PROJ_SXREPEAT = 2,
49
    PROJ_SXREPEAT = 2,
50
    PROJ_SYREPEAT = 3,
50
    PROJ_SYREPEAT = 3,
51
    PROJ_SOUND = 4,
51
    PROJ_SOUND = 4,
52
    PROJ_ISOUND = 5,
52
    PROJ_ISOUND = 5,
53
    PROJ_VEL = 6,
53
    PROJ_VEL = 6,
54
    PROJ_EXTRA = 7,
54
    PROJ_EXTRA = 7,
55
    PROJ_DECAL = 8,
55
    PROJ_DECAL = 8,
56
    PROJ_TRAIL = 9,
56
    PROJ_TRAIL = 9,
57
    PROJ_TXREPEAT = 10,
57
    PROJ_TXREPEAT = 10,
58
    PROJ_TYREPEAT = 11,
58
    PROJ_TYREPEAT = 11,
59
    PROJ_TOFFSET = 12,
59
    PROJ_TOFFSET = 12,
60
    PROJ_TNUM = 13,
60
    PROJ_TNUM = 13,
61
    PROJ_DROP = 14,
61
    PROJ_DROP = 14,
62
    PROJ_CSTAT = 15,
62
    PROJ_CSTAT = 15,
63
    PROJ_CLIPDIST = 16,
63
    PROJ_CLIPDIST = 16,
64
    PROJ_SHADE = 17,
64
    PROJ_SHADE = 17,
65
    PROJ_XREPEAT = 18,
65
    PROJ_XREPEAT = 18,
66
    PROJ_YREPEAT = 19,
66
    PROJ_YREPEAT = 19,
67
    PROJ_PAL = 20,
67
    PROJ_PAL = 20,
68
    PROJ_EXTRA_RAND = 21,
68
    PROJ_EXTRA_RAND = 21,
69
    PROJ_HITRADIUS = 22,
69
    PROJ_HITRADIUS = 22,
70
    PROJ_VEL_MULT = 23,  -- NAME (PROJ_MOVECNT)
70
    PROJ_VEL_MULT = 23,  -- NAME (PROJ_MOVECNT)
71
    PROJ_OFFSET = 24,
71
    PROJ_OFFSET = 24,
72
    PROJ_BOUNCES = 25,
72
    PROJ_BOUNCES = 25,
73
    PROJ_BSOUND = 26,
73
    PROJ_BSOUND = 26,
74
    PROJ_RANGE = 27,
74
    PROJ_RANGE = 27,
75
    PROJ_FLASH_COLOR = 28,
75
    PROJ_FLASH_COLOR = 28,
76
    PROJ_USERDATA = 29,
76
    PROJ_USERDATA = 29,
77
}
77
}
78
78
79
EVENT = {
79
EVENT = {
80
    EVENT_INIT = 0,
80
    EVENT_INIT = 0,
81
    EVENT_ENTERLEVEL = 1,
81
    EVENT_ENTERLEVEL = 1,
82
    EVENT_RESETWEAPONS = 2,
82
    EVENT_RESETWEAPONS = 2,
83
    EVENT_RESETINVENTORY = 3,
83
    EVENT_RESETINVENTORY = 3,
84
    EVENT_HOLSTER = 4,
84
    EVENT_HOLSTER = 4,
85
    EVENT_LOOKLEFT = 5,
85
    EVENT_LOOKLEFT = 5,
86
    EVENT_LOOKRIGHT = 6,
86
    EVENT_LOOKRIGHT = 6,
87
    EVENT_SOARUP = 7,
87
    EVENT_SOARUP = 7,
88
    EVENT_SOARDOWN = 8,
88
    EVENT_SOARDOWN = 8,
89
    EVENT_CROUCH = 9,
89
    EVENT_CROUCH = 9,
90
    EVENT_JUMP = 10,
90
    EVENT_JUMP = 10,
91
    EVENT_RETURNTOCENTER = 11,
91
    EVENT_RETURNTOCENTER = 11,
92
    EVENT_LOOKUP = 12,
92
    EVENT_LOOKUP = 12,
93
    EVENT_LOOKDOWN = 13,
93
    EVENT_LOOKDOWN = 13,
94
    EVENT_AIMUP = 14,
94
    EVENT_AIMUP = 14,
95
    EVENT_FIRE = 15,
95
    EVENT_FIRE = 15,
96
    EVENT_CHANGEWEAPON = 16,
96
    EVENT_CHANGEWEAPON = 16,
97
    EVENT_GETSHOTRANGE = 17,
97
    EVENT_GETSHOTRANGE = 17,
98
    EVENT_GETAUTOAIMANGLE = 18,
98
    EVENT_GETAUTOAIMANGLE = 18,
99
    EVENT_GETLOADTILE = 19,
99
    EVENT_GETLOADTILE = 19,
100
    EVENT_CHEATGETSTEROIDS = 20,
100
    EVENT_CHEATGETSTEROIDS = 20,
101
    EVENT_CHEATGETHEAT = 21,
101
    EVENT_CHEATGETHEAT = 21,
102
    EVENT_CHEATGETBOOT = 22,
102
    EVENT_CHEATGETBOOT = 22,
103
    EVENT_CHEATGETSHIELD = 23,
103
    EVENT_CHEATGETSHIELD = 23,
104
    EVENT_CHEATGETSCUBA = 24,
104
    EVENT_CHEATGETSCUBA = 24,
105
    EVENT_CHEATGETHOLODUKE = 25,
105
    EVENT_CHEATGETHOLODUKE = 25,
106
    EVENT_CHEATGETJETPACK = 26,
106
    EVENT_CHEATGETJETPACK = 26,
107
    EVENT_CHEATGETFIRSTAID = 27,
107
    EVENT_CHEATGETFIRSTAID = 27,
108
    EVENT_QUICKKICK = 28,
108
    EVENT_QUICKKICK = 28,
109
    EVENT_INVENTORY = 29,
109
    EVENT_INVENTORY = 29,
110
    EVENT_USENIGHTVISION = 30,
110
    EVENT_USENIGHTVISION = 30,
111
    EVENT_USESTEROIDS = 31,
111
    EVENT_USESTEROIDS = 31,
112
    EVENT_INVENTORYLEFT = 32,
112
    EVENT_INVENTORYLEFT = 32,
113
    EVENT_INVENTORYRIGHT = 33,
113
    EVENT_INVENTORYRIGHT = 33,
114
    EVENT_HOLODUKEON = 34,
114
    EVENT_HOLODUKEON = 34,
115
    EVENT_HOLODUKEOFF = 35,
115
    EVENT_HOLODUKEOFF = 35,
116
    EVENT_USEMEDKIT = 36,
116
    EVENT_USEMEDKIT = 36,
117
    EVENT_USEJETPACK = 37,
117
    EVENT_USEJETPACK = 37,
118
    EVENT_TURNAROUND = 38,
118
    EVENT_TURNAROUND = 38,
119
    EVENT_DISPLAYWEAPON = 39,
119
    EVENT_DISPLAYWEAPON = 39,
120
    EVENT_FIREWEAPON = 40,
120
    EVENT_FIREWEAPON = 40,
121
    EVENT_SELECTWEAPON = 41,
121
    EVENT_SELECTWEAPON = 41,
122
    EVENT_MOVEFORWARD = 42,
122
    EVENT_MOVEFORWARD = 42,
123
    EVENT_MOVEBACKWARD = 43,
123
    EVENT_MOVEBACKWARD = 43,
124
    EVENT_TURNLEFT = 44,
124
    EVENT_TURNLEFT = 44,
125
    EVENT_TURNRIGHT = 45,
125
    EVENT_TURNRIGHT = 45,
126
    EVENT_STRAFELEFT = 46,
126
    EVENT_STRAFELEFT = 46,
127
    EVENT_STRAFERIGHT = 47,
127
    EVENT_STRAFERIGHT = 47,
128
    EVENT_WEAPKEY1 = 48,
128
    EVENT_WEAPKEY1 = 48,
129
    EVENT_WEAPKEY2 = 49,
129
    EVENT_WEAPKEY2 = 49,
130
    EVENT_WEAPKEY3 = 50,
130
    EVENT_WEAPKEY3 = 50,
131
    EVENT_WEAPKEY4 = 51,
131
    EVENT_WEAPKEY4 = 51,
132
    EVENT_WEAPKEY5 = 52,
132
    EVENT_WEAPKEY5 = 52,
133
    EVENT_WEAPKEY6 = 53,
133
    EVENT_WEAPKEY6 = 53,
134
    EVENT_WEAPKEY7 = 54,
134
    EVENT_WEAPKEY7 = 54,
135
    EVENT_WEAPKEY8 = 55,
135
    EVENT_WEAPKEY8 = 55,
136
    EVENT_WEAPKEY9 = 56,
136
    EVENT_WEAPKEY9 = 56,
137
    EVENT_WEAPKEY10 = 57,
137
    EVENT_WEAPKEY10 = 57,
138
    EVENT_DRAWWEAPON = 58,
138
    EVENT_DRAWWEAPON = 58,
139
    EVENT_DISPLAYCROSSHAIR = 59,
139
    EVENT_DISPLAYCROSSHAIR = 59,
140
    EVENT_DISPLAYREST = 60,
140
    EVENT_DISPLAYREST = 60,
141
    EVENT_DISPLAYSBAR = 61,
141
    EVENT_DISPLAYSBAR = 61,
142
    EVENT_RESETPLAYER = 62,
142
    EVENT_RESETPLAYER = 62,
143
    EVENT_INCURDAMAGE = 63,
143
    EVENT_INCURDAMAGE = 63,
144
    EVENT_AIMDOWN = 64,
144
    EVENT_AIMDOWN = 64,
145
    EVENT_GAME = 65,
145
    EVENT_GAME = 65,
146
    EVENT_PREVIOUSWEAPON = 66,
146
    EVENT_PREVIOUSWEAPON = 66,
147
    EVENT_NEXTWEAPON = 67,
147
    EVENT_NEXTWEAPON = 67,
148
    EVENT_SWIMUP = 68,
148
    EVENT_SWIMUP = 68,
149
    EVENT_SWIMDOWN = 69,
149
    EVENT_SWIMDOWN = 69,
150
    EVENT_GETMENUTILE = 70,
150
    EVENT_GETMENUTILE = 70,
151
    EVENT_SPAWN = 71,
151
    EVENT_SPAWN = 71,
152
    EVENT_LOGO = 72,
152
    EVENT_LOGO = 72,
153
    EVENT_EGS = 73,
153
    EVENT_EGS = 73,
154
    EVENT_DOFIRE = 74,
154
    EVENT_DOFIRE = 74,
155
    EVENT_PRESSEDFIRE = 75,
155
    EVENT_PRESSEDFIRE = 75,
156
    EVENT_USE = 76,
156
    EVENT_USE = 76,
157
    EVENT_PROCESSINPUT = 77,
157
    EVENT_PROCESSINPUT = 77,
158
    EVENT_FAKEDOMOVETHINGS = 78,
158
    EVENT_FAKEDOMOVETHINGS = 78,
159
    EVENT_DISPLAYROOMS = 79,
159
    EVENT_DISPLAYROOMS = 79,
160
    EVENT_KILLIT = 80,
160
    EVENT_KILLIT = 80,
161
    EVENT_LOADACTOR = 81,
161
    EVENT_LOADACTOR = 81,
162
    EVENT_DISPLAYBONUSSCREEN = 82,
162
    EVENT_DISPLAYBONUSSCREEN = 82,
163
    EVENT_DISPLAYMENU = 83,
163
    EVENT_DISPLAYMENU = 83,
164
    EVENT_DISPLAYMENUREST = 84,
164
    EVENT_DISPLAYMENUREST = 84,
165
    EVENT_DISPLAYLOADINGSCREEN = 85,
165
    EVENT_DISPLAYLOADINGSCREEN = 85,
166
    EVENT_ANIMATESPRITES = 86,
166
    EVENT_ANIMATESPRITES = 86,
167
    EVENT_NEWGAME = 87,
167
    EVENT_NEWGAME = 87,
168
    EVENT_SOUND = 88,
168
    EVENT_SOUND = 88,
169
    EVENT_CHECKTOUCHDAMAGE = 89,
169
    EVENT_CHECKTOUCHDAMAGE = 89,
170
    EVENT_CHECKFLOORDAMAGE = 90,
170
    EVENT_CHECKFLOORDAMAGE = 90,
171
    EVENT_LOADGAME = 91,
171
    EVENT_LOADGAME = 91,
172
    EVENT_SAVEGAME = 92,
172
    EVENT_SAVEGAME = 92,
173
    EVENT_PREGAME = 93,
173
    EVENT_PREGAME = 93,
174
    EVENT_CHANGEMENU = 94,
174
    EVENT_CHANGEMENU = 94,
175
    EVENT_DAMAGEHPLANE = 95,
175
    EVENT_DAMAGEHPLANE = 95,
176
    EVENT_ACTIVATECHEAT = 96,
176
    EVENT_ACTIVATECHEAT = 96,
177
    EVENT_DISPLAYINACTIVEMENU = 97,
177
    EVENT_DISPLAYINACTIVEMENU = 97,
178
    EVENT_DISPLAYINACTIVEMENUREST = 98,
178
    EVENT_DISPLAYINACTIVEMENUREST = 98,
179
    EVENT_CUTSCENE = 99,
179
    EVENT_CUTSCENE = 99,
180
    EVENT_DISPLAYCURSOR = 100,
180
    EVENT_DISPLAYCURSOR = 100,
-
 
181
    EVENT_DISPLAYLEVELSTATS = 101,
181
--    EVENT_ANIMATEALLSPRITES = previous+1,  -- internal
182
--    EVENT_ANIMATEALLSPRITES = previous+1,  -- internal
182
-- KEEPINSYNC with MAXEVENTS below
183
-- KEEPINSYNC with MAXEVENTS below
183
}
184
}
184
185
185
MAXEVENTS = 101  -- KEEPINSYNC with above EVENT_* list
186
MAXEVENTS = 102  -- KEEPINSYNC with above EVENT_* list
186
187
187
-- NOTE: negated values are not exported to the ffi.C namespace or CON.
188
-- NOTE: negated values are not exported to the ffi.C namespace or CON.
188
-- See TWEAK_SFLAG below.
189
-- See TWEAK_SFLAG below.
189
SFLAG = {
190
SFLAG = {
190
    SFLAG_SHADOW           = 0x00000001,
191
    SFLAG_SHADOW           = 0x00000001,
191
    SFLAG_NVG              = 0x00000002,
192
    SFLAG_NVG              = 0x00000002,
192
    SFLAG_NOSHADE          = 0x00000004,
193
    SFLAG_NOSHADE          = 0x00000004,
193
    SFLAG_PROJECTILE       = -0x00000008,
194
    SFLAG_PROJECTILE       = -0x00000008,
194
    SFLAG_DECAL            = -0x00000010,
195
    SFLAG_DECAL            = -0x00000010,
195
    SFLAG_BADGUY           = 0x00000020,
196
    SFLAG_BADGUY           = 0x00000020,
196
    SFLAG_NOPAL            = 0x00000040,
197
    SFLAG_NOPAL            = 0x00000040,
197
    SFLAG_NOEVENTS         = 0x00000080,  -- NAME
198
    SFLAG_NOEVENTS         = 0x00000080,  -- NAME
198
    SFLAG_NOLIGHT          = 0x00000100,
199
    SFLAG_NOLIGHT          = 0x00000100,
199
    SFLAG_USEACTIVATOR     = 0x00000200,
200
    SFLAG_USEACTIVATOR     = 0x00000200,
200
    SFLAG_NULL             = -0x00000400,
201
    SFLAG_NULL             = -0x00000400,
201
    SFLAG_NOCLIP           = 0x00000800,
202
    SFLAG_NOCLIP           = 0x00000800,
202
    SFLAG_NOFLOORSHADOW    = -0x00001000,
203
    SFLAG_NOFLOORSHADOW    = -0x00001000,
203
    SFLAG_SMOOTHMOVE       = 0x00002000,
204
    SFLAG_SMOOTHMOVE       = 0x00002000,
204
    SFLAG_NOTELEPORT       = 0x00004000,
205
    SFLAG_NOTELEPORT       = 0x00004000,
205
    SFLAG_BADGUYSTAYPUT    = -0x00008000,
206
    SFLAG_BADGUYSTAYPUT    = -0x00008000,
206
    SFLAG_CACHE            = -0x00010000,
207
    SFLAG_CACHE            = -0x00010000,
207
    SFLAG_ROTFIXED         = -0x00020000,
208
    SFLAG_ROTFIXED         = -0x00020000,
208
    SFLAG_HARDCODED_BADGUY = -0x00040000,
209
    SFLAG_HARDCODED_BADGUY = -0x00040000,
209
    SFLAG_DIDNOSE7WATER    = -0x00080000,
210
    SFLAG_DIDNOSE7WATER    = -0x00080000,
210
    SFLAG_NODAMAGEPUSH     = 0x00100000,
211
    SFLAG_NODAMAGEPUSH     = 0x00100000,
211
    SFLAG_NOWATERDIP       = 0x00200000,
212
    SFLAG_NOWATERDIP       = 0x00200000,
212
    -- RESERVED for actor.FLAGS.chain_*/replace_*:
213
    -- RESERVED for actor.FLAGS.chain_*/replace_*:
213
    -- 0x08000000, 0x10000000, 0x20000000, 0x40000000
214
    -- 0x08000000, 0x10000000, 0x20000000, 0x40000000
214
}
215
}
215
216
216
STAT = {
217
STAT = {
217
    STAT_DEFAULT = 0,
218
    STAT_DEFAULT = 0,
218
    STAT_ACTOR = 1,
219
    STAT_ACTOR = 1,
219
    STAT_ZOMBIEACTOR = 2,
220
    STAT_ZOMBIEACTOR = 2,
220
    STAT_EFFECTOR = 3,
221
    STAT_EFFECTOR = 3,
221
    STAT_PROJECTILE = 4,
222
    STAT_PROJECTILE = 4,
222
    STAT_MISC = 5,
223
    STAT_MISC = 5,
223
    STAT_STANDABLE = 6,
224
    STAT_STANDABLE = 6,
224
    STAT_LOCATOR = 7,
225
    STAT_LOCATOR = 7,
225
    STAT_ACTIVATOR = 8,
226
    STAT_ACTIVATOR = 8,
226
    STAT_TRANSPORT = 9,
227
    STAT_TRANSPORT = 9,
227
    STAT_PLAYER = 10,
228
    STAT_PLAYER = 10,
228
    STAT_FX = 11,
229
    STAT_FX = 11,
229
    STAT_FALLER = 12,
230
    STAT_FALLER = 12,
230
    STAT_DUMMYPLAYER = 13,
231
    STAT_DUMMYPLAYER = 13,
231
    STAT_LIGHT = 14,
232
    STAT_LIGHT = 14,
232
--    STAT_NETALLOC = 1023,  -- MAXSTATUS-1
233
--    STAT_NETALLOC = 1023,  -- MAXSTATUS-1
233
}
234
}
234
235
235
local GAMEFUNC = {
236
local GAMEFUNC = {
236
    GAMEFUNC_MOVE_FORWARD = 0,
237
    GAMEFUNC_MOVE_FORWARD = 0,
237
    GAMEFUNC_MOVE_BACKWARD = 1,
238
    GAMEFUNC_MOVE_BACKWARD = 1,
238
    GAMEFUNC_TURN_LEFT = 2,
239
    GAMEFUNC_TURN_LEFT = 2,
239
    GAMEFUNC_TURN_RIGHT = 3,
240
    GAMEFUNC_TURN_RIGHT = 3,
240
    GAMEFUNC_STRAFE = 4,
241
    GAMEFUNC_STRAFE = 4,
241
    GAMEFUNC_FIRE = 5,
242
    GAMEFUNC_FIRE = 5,
242
    GAMEFUNC_OPEN = 6,
243
    GAMEFUNC_OPEN = 6,
243
    GAMEFUNC_RUN = 7,
244
    GAMEFUNC_RUN = 7,
244
    GAMEFUNC_AUTORUN = 8,
245
    GAMEFUNC_AUTORUN = 8,
245
    GAMEFUNC_JUMP = 9,
246
    GAMEFUNC_JUMP = 9,
246
    GAMEFUNC_CROUCH = 10,
247
    GAMEFUNC_CROUCH = 10,
247
    GAMEFUNC_LOOK_UP = 11,
248
    GAMEFUNC_LOOK_UP = 11,
248
    GAMEFUNC_LOOK_DOWN = 12,
249
    GAMEFUNC_LOOK_DOWN = 12,
249
    GAMEFUNC_LOOK_LEFT = 13,
250
    GAMEFUNC_LOOK_LEFT = 13,
250
    GAMEFUNC_LOOK_RIGHT = 14,
251
    GAMEFUNC_LOOK_RIGHT = 14,
251
    GAMEFUNC_STRAFE_LEFT = 15,
252
    GAMEFUNC_STRAFE_LEFT = 15,
252
    GAMEFUNC_STRAFE_RIGHT = 16,
253
    GAMEFUNC_STRAFE_RIGHT = 16,
253
    GAMEFUNC_AIM_UP = 17,
254
    GAMEFUNC_AIM_UP = 17,
254
    GAMEFUNC_AIM_DOWN = 18,
255
    GAMEFUNC_AIM_DOWN = 18,
255
    GAMEFUNC_WEAPON_1 = 19,
256
    GAMEFUNC_WEAPON_1 = 19,
256
    GAMEFUNC_WEAPON_2 = 20,
257
    GAMEFUNC_WEAPON_2 = 20,
257
    GAMEFUNC_WEAPON_3 = 21,
258
    GAMEFUNC_WEAPON_3 = 21,
258
    GAMEFUNC_WEAPON_4 = 22,
259
    GAMEFUNC_WEAPON_4 = 22,
259
    GAMEFUNC_WEAPON_5 = 23,
260
    GAMEFUNC_WEAPON_5 = 23,
260
    GAMEFUNC_WEAPON_6 = 24,
261
    GAMEFUNC_WEAPON_6 = 24,
261
    GAMEFUNC_WEAPON_7 = 25,
262
    GAMEFUNC_WEAPON_7 = 25,
262
    GAMEFUNC_WEAPON_8 = 26,
263
    GAMEFUNC_WEAPON_8 = 26,
263
    GAMEFUNC_WEAPON_9 = 27,
264
    GAMEFUNC_WEAPON_9 = 27,
264
    GAMEFUNC_WEAPON_10 = 28,
265
    GAMEFUNC_WEAPON_10 = 28,
265
    GAMEFUNC_INVENTORY = 29,
266
    GAMEFUNC_INVENTORY = 29,
266
    GAMEFUNC_INVENTORY_LEFT = 30,
267
    GAMEFUNC_INVENTORY_LEFT = 30,
267
    GAMEFUNC_INVENTORY_RIGHT = 31,
268
    GAMEFUNC_INVENTORY_RIGHT = 31,
268
    GAMEFUNC_HOLO_DUKE = 32,
269
    GAMEFUNC_HOLO_DUKE = 32,
269
    GAMEFUNC_JETPACK = 33,
270
    GAMEFUNC_JETPACK = 33,
270
    GAMEFUNC_NIGHTVISION = 34,
271
    GAMEFUNC_NIGHTVISION = 34,
271
    GAMEFUNC_MEDKIT = 35,
272
    GAMEFUNC_MEDKIT = 35,
272
    GAMEFUNC_TURNAROUND = 36,
273
    GAMEFUNC_TURNAROUND = 36,
273
    GAMEFUNC_SENDMESSAGE = 37,
274
    GAMEFUNC_SENDMESSAGE = 37,
274
    GAMEFUNC_MAP = 38,
275
    GAMEFUNC_MAP = 38,
275
    GAMEFUNC_SHRINK_SCREEN = 39,
276
    GAMEFUNC_SHRINK_SCREEN = 39,
276
    GAMEFUNC_ENLARGE_SCREEN = 40,
277
    GAMEFUNC_ENLARGE_SCREEN = 40,
277
    GAMEFUNC_CENTER_VIEW = 41,
278
    GAMEFUNC_CENTER_VIEW = 41,
278
    GAMEFUNC_HOLSTER_WEAPON = 42,
279
    GAMEFUNC_HOLSTER_WEAPON = 42,
279
    GAMEFUNC_SHOW_OPPONENTS_WEAPON = 43,
280
    GAMEFUNC_SHOW_OPPONENTS_WEAPON = 43,
280
    GAMEFUNC_MAP_FOLLOW_MODE = 44,
281
    GAMEFUNC_MAP_FOLLOW_MODE = 44,
281
    GAMEFUNC_SEE_COOP_VIEW = 45,
282
    GAMEFUNC_SEE_COOP_VIEW = 45,
282
    GAMEFUNC_MOUSE_AIMING = 46,
283
    GAMEFUNC_MOUSE_AIMING = 46,
283
    GAMEFUNC_TOGGLE_CROSSHAIR = 47,
284
    GAMEFUNC_TOGGLE_CROSSHAIR = 47,
284
    GAMEFUNC_STEROIDS = 48,
285
    GAMEFUNC_STEROIDS = 48,
285
    GAMEFUNC_QUICK_KICK = 49,
286
    GAMEFUNC_QUICK_KICK = 49,
286
    GAMEFUNC_NEXT_WEAPON = 50,
287
    GAMEFUNC_NEXT_WEAPON = 50,
287
    GAMEFUNC_PREVIOUS_WEAPON = 51,
288
    GAMEFUNC_PREVIOUS_WEAPON = 51,
288
--    GAMEFUNC_SHOW_CONSOLE = 52,
289
--    GAMEFUNC_SHOW_CONSOLE = 52,
289
    GAMEFUNC_SHOW_DUKEMATCH_SCORES = 53,
290
    GAMEFUNC_SHOW_DUKEMATCH_SCORES = 53,
290
    GAMEFUNC_DPAD_SELECT = 54,
291
    GAMEFUNC_DPAD_SELECT = 54,
291
    GAMEFUNC_DPAD_AIMING = 55,
292
    GAMEFUNC_DPAD_AIMING = 55,
292
}
293
}
293
294
294
local function shallow_copy(tab)
295
local function shallow_copy(tab)
295
    local t = {}
296
    local t = {}
296
    for k,v in pairs(tab) do
297
    for k,v in pairs(tab) do
297
        t[k] = v
298
        t[k] = v
298
    end
299
    end
299
    return t
300
    return t
300
end
301
end
301
302
302
-- KEEPINSYNC with gamedef.c:C_AddDefaultDefinitions() and the respective
303
-- KEEPINSYNC with gamedef.c:C_AddDefaultDefinitions() and the respective
303
-- defines. These are exported to the ffi.C namespace (except STAT) and as
304
-- defines. These are exported to the ffi.C namespace (except STAT) and as
304
-- literal defines in lunacon.lua.
305
-- literal defines in lunacon.lua.
305
labels =
306
labels =
306
{
307
{
307
    STR,
308
    STR,
308
    PROJ,
309
    PROJ,
309
    EVENT,
310
    EVENT,
310
    shallow_copy(SFLAG),
311
    shallow_copy(SFLAG),
311
    setmetatable(STAT, { __metatable="noffiC" }),
312
    setmetatable(STAT, { __metatable="noffiC" }),
312
    GAMEFUNC,
313
    GAMEFUNC,
313
}
314
}
314
315
315
user_sflags = 0
316
user_sflags = 0
316
-- TWEAK_SFLAG
317
-- TWEAK_SFLAG
317
for name, flag in pairs(SFLAG) do
318
for name, flag in pairs(SFLAG) do
318
    if (flag > 0) then
319
    if (flag > 0) then
319
        user_sflags = user_sflags + flag
320
        user_sflags = user_sflags + flag
320
    else
321
    else
321
        SFLAG[name] = -flag
322
        SFLAG[name] = -flag
322
        labels[4][name] = nil
323
        labels[4][name] = nil
323
    end
324
    end
324
end
325
end
325
326
326
-- KEEPINSYNC player.h
327
-- KEEPINSYNC player.h
327
wdata_members =
328
wdata_members =
328
{
329
{
329
    -- NOTE: they are lowercased for Lunatic
330
    -- NOTE: they are lowercased for Lunatic
330
    -- NOTE: members _*sound*, _spawn and _shoots assume *zero* to mean "none"
331
    -- NOTE: members _*sound*, _spawn and _shoots assume *zero* to mean "none"
331
    --  (-1 would be more logical).
332
    --  (-1 would be more logical).
332
    "const int32_t _workslike",
333
    "const int32_t _workslike",
333
    "int32_t clip",
334
    "int32_t clip",
334
    "int32_t reload",
335
    "int32_t reload",
335
    "int32_t firedelay",
336
    "int32_t firedelay",
336
    "int32_t totaltime",
337
    "int32_t totaltime",
337
    "int32_t holddelay",
338
    "int32_t holddelay",
338
    "int32_t flags",
339
    "int32_t flags",
339
    "const int32_t _shoots",
340
    "const int32_t _shoots",
340
    "int32_t spawntime",
341
    "int32_t spawntime",
341
    "const int32_t _spawn",
342
    "const int32_t _spawn",
342
    "int32_t shotsperburst",
343
    "int32_t shotsperburst",
343
    "const int32_t _initialsound",
344
    "const int32_t _initialsound",
344
    "const int32_t _firesound",
345
    "const int32_t _firesound",
345
    "int32_t sound2time",  -- NOTE: this is a time number, not a sound
346
    "int32_t sound2time",  -- NOTE: this is a time number, not a sound
346
    "const int32_t _sound2sound",
347
    "const int32_t _sound2sound",
347
    "const int32_t _reloadsound1",
348
    "const int32_t _reloadsound1",
348
    "const int32_t _reloadsound2",
349
    "const int32_t _reloadsound2",
349
    "const int32_t _selectsound",
350
    "const int32_t _selectsound",
350
    "int32_t flashcolor",
351
    "int32_t flashcolor",
351
}
352
}
352
353
353
354
354
local SP = function(memb) return "sprite[%s]"..memb end
355
local SP = function(memb) return "sprite[%s]"..memb end
355
local ATSP = function(memb) return "_atsprite[%s]"..memb end
356
local ATSP = function(memb) return "_atsprite[%s]"..memb end
356
local AC = function(memb) return "actor[%s]"..memb end
357
local AC = function(memb) return "actor[%s]"..memb end
357
local SX = function(memb) return "spriteext[%s]"..memb end
358
local SX = function(memb) return "spriteext[%s]"..memb end
358
359
359
-- Generate code to access a signed member as unsigned.
360
-- Generate code to access a signed member as unsigned.
360
local function s2u(label)
361
local function s2u(label)
361
    return "(_band("..label.."+65536,65535))"
362
    return "(_band("..label.."+65536,65535))"
362
end
363
end
363
364
364
local function S2U(label)
365
local function S2U(label)
365
    return { s2u(label), label }
366
    return { s2u(label), label }
366
end
367
end
367
368
368
-- Some literal checker functions (LITERAL_CHECKING).
369
-- Some literal checker functions (LITERAL_CHECKING).
369
-- KEEPINSYNC with the actual setter code.
370
-- KEEPINSYNC with the actual setter code.
370
local function litok_gem1(lit)
371
local function litok_gem1(lit)
371
    return (lit >= -1)
372
    return (lit >= -1)
372
end
373
end
373
374
374
local function litok_ge0(lit)
375
local function litok_ge0(lit)
375
    return (lit >= 0)
376
    return (lit >= 0)
376
end
377
end
377
378
378
local ActorLabels = {
379
local ActorLabels = {
379
    x = SP".x",
380
    x = SP".x",
380
    y = SP".y",
381
    y = SP".y",
381
    z = SP".z",
382
    z = SP".z",
382
    cstat = SP".cstat",
383
    cstat = SP".cstat",
383
    picnum = { SP".picnum", SP":set_picnum(%%s)", litok_ge0 },
384
    picnum = { SP".picnum", SP":set_picnum(%%s)", litok_ge0 },
384
    shade = SP".shade",
385
    shade = SP".shade",
385
    pal = SP".pal",
386
    pal = SP".pal",
386
    clipdist = SP".clipdist",
387
    clipdist = SP".clipdist",
387
--    filler = SP".filler",
388
--    filler = SP".filler",
388
--    detail = SP".filler",  -- NAME
389
--    detail = SP".filler",  -- NAME
389
    blend = SP".blend",
390
    blend = SP".blend",
390
    xrepeat = SP".xrepeat",
391
    xrepeat = SP".xrepeat",
391
    yrepeat = SP".yrepeat",
392
    yrepeat = SP".yrepeat",
392
    xoffset = SP".xoffset",
393
    xoffset = SP".xoffset",
393
    yoffset = SP".yoffset",
394
    yoffset = SP".yoffset",
394
    sectnum = { SP".sectnum", SP":changesect(%%s)", litok_ge0 },  -- set: for tsprite
395
    sectnum = { SP".sectnum", SP":changesect(%%s)", litok_ge0 },  -- set: for tsprite
395
    statnum = { SP".statnum" },
396
    statnum = { SP".statnum" },
396
    ang = SP".ang",
397
    ang = SP".ang",
397
    owner = { SP".owner", SP":_set_owner(%%s)", litok_ge0 },
398
    owner = { SP".owner", SP":_set_owner(%%s)", litok_ge0 },
398
    xvel = SP".xvel",
399
    xvel = SP".xvel",
399
    yvel = { SP".yvel", SP":set_yvel(%%s)" },
400
    yvel = { SP".yvel", SP":set_yvel(%%s)" },
400
    zvel = SP".zvel",
401
    zvel = SP".zvel",
401
    lotag = SP".lotag",
402
    lotag = SP".lotag",
402
    hitag = SP".hitag",
403
    hitag = SP".hitag",
403
    extra = SP".extra",
404
    extra = SP".extra",
404
405
405
    ulotag = S2U(SP".lotag"),
406
    ulotag = S2U(SP".lotag"),
406
    uhitag = S2U(SP".hitag"),
407
    uhitag = S2U(SP".hitag"),
407
408
408
    -- ActorExtra labels...
409
    -- ActorExtra labels...
409
    htcgg = AC".cgg",
410
    htcgg = AC".cgg",
410
    -- XXX: why <0 allowed?
411
    -- XXX: why <0 allowed?
411
    htpicnum = { AC".picnum", AC":set_picnum(%%s)" },
412
    htpicnum = { AC".picnum", AC":set_picnum(%%s)" },
412
    htang = AC".ang",
413
    htang = AC".ang",
413
    htextra = AC".extra",
414
    htextra = AC".extra",
414
    htowner = { AC".owner", AC":set_owner(%%s)", litok_ge0 },
415
    htowner = { AC".owner", AC":set_owner(%%s)", litok_ge0 },
415
    htmovflag = AC"._movflag",
416
    htmovflag = AC"._movflag",
416
    httempang = AC".tempang",
417
    httempang = AC".tempang",
417
    htactorstayput = AC".stayputsect",  -- NAME
418
    htactorstayput = AC".stayputsect",  -- NAME
418
    htdispicnum = { AC".dispicnum" },
419
    htdispicnum = { AC".dispicnum" },
419
    -- NOTE: no access for .shootzvel
420
    -- NOTE: no access for .shootzvel
420
    httimetosleep = AC".timetosleep",
421
    httimetosleep = AC".timetosleep",
421
    htfloorz = AC".floorz",
422
    htfloorz = AC".floorz",
422
    htceilingz = AC".ceilingz",
423
    htceilingz = AC".ceilingz",
423
    htlastvx = AC".lastvx",
424
    htlastvx = AC".lastvx",
424
    htlastvy = AC".lastvy",
425
    htlastvy = AC".lastvy",
425
    htbposx = AC".bpos.x",
426
    htbposx = AC".bpos.x",
426
    htbposy = AC".bpos.y",
427
    htbposy = AC".bpos.y",
427
    htbposz = AC".bpos.z",
428
    htbposz = AC".bpos.z",
428
    -- Read access differs from write ({ get, set }):
429
    -- Read access differs from write ({ get, set }):
429
    htg_t = { AC":_get_t_data(%s)", AC":_set_t_data(%s,%%s)" },
430
    htg_t = { AC":_get_t_data(%s)", AC":_set_t_data(%s,%%s)" },
430
    htflags = AC".flags",
431
    htflags = AC".flags",
431
    movflags = AC".movflags",
432
    movflags = AC".movflags",
432
433
433
    -- (mostly) model-related flags
434
    -- (mostly) model-related flags
434
    angoff = SX".angoff",
435
    angoff = SX".angoff",
435
    pitch = SX".pitch",
436
    pitch = SX".pitch",
436
    roll = SX".roll",
437
    roll = SX".roll",
437
    mdxoff = SX".mdoff.x",  -- NAME
438
    mdxoff = SX".mdoff.x",  -- NAME
438
    mdyoff = SX".mdoff.y",
439
    mdyoff = SX".mdoff.y",
439
    mdzoff = SX".mdoff.z",
440
    mdzoff = SX".mdoff.z",
440
    mdflags = SX".flags",
441
    mdflags = SX".flags",
441
    xpanning = SX".xpanning",
442
    xpanning = SX".xpanning",
442
    ypanning = SX".ypanning",
443
    ypanning = SX".ypanning",
443
444
444
    alpha = { "_math.floor(spriteext[%s].alpha*255)", "spriteext[%s].alpha=(%%s)/255" },
445
    alpha = { "_math.floor(spriteext[%s].alpha*255)", "spriteext[%s].alpha=(%%s)/255" },
445
446
446
    isvalid = { "_con._isvalid(%s)" },
447
    isvalid = { "_con._isvalid(%s)" },
447
}
448
}
448
449
449
local function spr2tspr(code)
450
local function spr2tspr(code)
450
    if (code and code:find(SP"", 1, true)==1) then
451
    if (code and code:find(SP"", 1, true)==1) then
451
        return ATSP(code:sub(#SP"" + 1))
452
        return ATSP(code:sub(#SP"" + 1))
452
    end
453
    end
453
    -- else return nothing
454
    -- else return nothing
454
end
455
end
455
456
456
local TspriteLabels = {}
457
local TspriteLabels = {}
457
458
458
for member, code in pairs(ActorLabels) do
459
for member, code in pairs(ActorLabels) do
459
    if (type(code)=="string") then
460
    if (type(code)=="string") then
460
        TspriteLabels["tspr"..member] = spr2tspr(code)
461
        TspriteLabels["tspr"..member] = spr2tspr(code)
461
    else
462
    else
462
        TspriteLabels["tspr"..member] = { spr2tspr(code[1]), spr2tspr(code[2]) }
463
        TspriteLabels["tspr"..member] = { spr2tspr(code[1]), spr2tspr(code[2]) }
463
    end
464
    end
464
end
465
end
465
466
466
-- Sprites set stat- and sectnum via sprite.change{stat,sect} functions.
467
-- Sprites set stat- and sectnum via sprite.change{stat,sect} functions.
467
ActorLabels.sectnum[2] = "sprite.changesect(%s,%%s,true)"
468
ActorLabels.sectnum[2] = "sprite.changesect(%s,%%s,true)"
468
ActorLabels.statnum[2] = "sprite.changestat(%s,%%s,true)"
469
ActorLabels.statnum[2] = "sprite.changestat(%s,%%s,true)"
469
470
470
local PL = function(memb) return "player[%s]"..memb end
471
local PL = function(memb) return "player[%s]"..memb end
471
-- Access to DukePlayer_t's bool members: they must be read as numbers.
472
-- Access to DukePlayer_t's bool members: they must be read as numbers.
472
local PLBOOL = function(memb) return { "("..PL(memb).." and 1 or 0)", PL(memb) } end
473
local PLBOOL = function(memb) return { "("..PL(memb).." and 1 or 0)", PL(memb) } end
473
474
474
local empty_table = {}
475
local empty_table = {}
475
local DISABLED_PL = function() return empty_table end
476
local DISABLED_PL = function() return empty_table end
476
local DISABLED = DISABLED_PL
477
local DISABLED = DISABLED_PL
477
478
478
local PlayerLabels = {
479
local PlayerLabels = {
479
    posx = PL".pos.x",
480
    posx = PL".pos.x",
480
    posy = PL".pos.y",
481
    posy = PL".pos.y",
481
    posz = PL".pos.z",
482
    posz = PL".pos.z",
482
    oposx = PL".opos.x",
483
    oposx = PL".opos.x",
483
    oposy = PL".opos.y",
484
    oposy = PL".opos.y",
484
    oposz = PL".opos.z",
485
    oposz = PL".opos.z",
485
    posxv = PL".vel.x",  -- NAME
486
    posxv = PL".vel.x",  -- NAME
486
    posyv = PL".vel.y",
487
    posyv = PL".vel.y",
487
    poszv = PL".vel.z",
488
    poszv = PL".vel.z",
488
    -- NOTE: no access for .npos
489
    -- NOTE: no access for .npos
489
    bobposx = DISABLED_PL".bobposx",
490
    bobposx = DISABLED_PL".bobposx",
490
    bobposy = DISABLED_PL".bobposy",
491
    bobposy = DISABLED_PL".bobposy",
491
492
492
    truefz = DISABLED_PL".truefz",
493
    truefz = DISABLED_PL".truefz",
493
    truecz = DISABLED_PL".truecz",
494
    truecz = DISABLED_PL".truecz",
494
    player_par = PL".player_par",
495
    player_par = PL".player_par",
495
496
496
    randomflamex = DISABLED_PL".randomflamex",
497
    randomflamex = DISABLED_PL".randomflamex",
497
    exitx = DISABLED_PL".exitx",
498
    exitx = DISABLED_PL".exitx",
498
    exity = DISABLED_PL".exity",
499
    exity = DISABLED_PL".exity",
499
500
500
    runspeed = PL".runspeed",
501
    runspeed = PL".runspeed",
501
    max_player_health = PL".max_player_health",
502
    max_player_health = PL".max_player_health",
502
    max_shield_amount = PL".max_shield_amount",
503
    max_shield_amount = PL".max_shield_amount",
503
504
504
    autostep = PL".autostep",
505
    autostep = PL".autostep",
505
    autostep_sbw = PL".autostep_sbw",
506
    autostep_sbw = PL".autostep_sbw",
506
507
507
    interface_toggle_flag = DISABLED_PL".interface_toggle_flag",
508
    interface_toggle_flag = DISABLED_PL".interface_toggle_flag",
508
509
509
    -- NOTE: *bombControl etc. are accessed by gamevars in CON
510
    -- NOTE: *bombControl etc. are accessed by gamevars in CON
510
511
511
    max_actors_killed = PL".max_actors_killed",
512
    max_actors_killed = PL".max_actors_killed",
512
    actors_killed = PL".actors_killed",
513
    actors_killed = PL".actors_killed",
513
514
514
    -- NOTE the special case; "%%s" is used to mark settable members
515
    -- NOTE the special case; "%%s" is used to mark settable members
515
    -- with METHOD_MEMBER syntax, it's the value to be set.
516
    -- with METHOD_MEMBER syntax, it's the value to be set.
516
    gotweapon = { "("..PL":has_weapon(%s) and 1 or 0)", PL":_gt_weapon(%s,%%s)" },
517
    gotweapon = { "("..PL":has_weapon(%s) and 1 or 0)", PL":_gt_weapon(%s,%%s)" },
517
    zoom = PL".zoom",
518
    zoom = PL".zoom",
518
519
519
    loogiex = {},
520
    loogiex = {},
520
    loogiey = {},
521
    loogiey = {},
521
522
522
    sbs = PL".sbs",
523
    sbs = PL".sbs",
523
    sound_pitch = PL".sound_pitch",
524
    sound_pitch = PL".sound_pitch",
524
525
525
    ang = PL".ang",
526
    ang = PL".ang",
526
    oang = PL".oang",
527
    oang = PL".oang",
527
    angvel = PL".angvel",
528
    angvel = PL".angvel",
528
529
529
    cursectnum = PL".cursectnum",
530
    cursectnum = PL".cursectnum",
530
531
531
    look_ang = PL".look_ang",
532
    look_ang = PL".look_ang",
532
    last_extra = PL".last_extra",
533
    last_extra = PL".last_extra",
533
    subweapon = PL".subweapon",
534
    subweapon = PL".subweapon",
534
535
535
    max_ammo_amount = PL".max_ammo_amount[%s]",
536
    max_ammo_amount = PL".max_ammo_amount[%s]",
536
    ammo_amount = PL".ammo_amount[%s]",
537
    ammo_amount = PL".ammo_amount[%s]",
537
    -- NOTE: no direct access for .inv_amount (but see end)
538
    -- NOTE: no direct access for .inv_amount (but see end)
538
539
539
    wackedbyactor = PL".wackedbyactor",
540
    wackedbyactor = PL".wackedbyactor",
540
    pyoff = PL".pyoff",
541
    pyoff = PL".pyoff",
541
    opyoff = PL".opyoff",
542
    opyoff = PL".opyoff",
542
543
543
    horiz = PL".horiz",
544
    horiz = PL".horiz",
544
    horizoff = PL".horizoff",
545
    horizoff = PL".horizoff",
545
    ohoriz = PL".ohoriz",
546
    ohoriz = PL".ohoriz",
546
    ohorizoff = PL".ohorizoff",
547
    ohorizoff = PL".ohorizoff",
547
548
548
    newowner = { PL".newowner" },
549
    newowner = { PL".newowner" },
549
550
550
    jumping_counter = PL".jumping_counter",
551
    jumping_counter = PL".jumping_counter",
551
    airleft = PL".airleft",
552
    airleft = PL".airleft",
552
553
553
    fta = PL".fta",
554
    fta = PL".fta",
554
    ftq = PL".ftq",
555
    ftq = PL".ftq",
555
    access_wallnum = { PL".access_wallnum" },
556
    access_wallnum = { PL".access_wallnum" },
556
    access_spritenum = { PL".access_spritenum" },
557
    access_spritenum = { PL".access_spritenum" },
557
558
558
    got_access = PL".got_access",
559
    got_access = PL".got_access",
559
    weapon_ang = PL".weapon_ang",
560
    weapon_ang = PL".weapon_ang",
560
    visibility = PL".visibility",
561
    visibility = PL".visibility",
561
562
562
    somethingonplayer = PL".somethingonplayer",
563
    somethingonplayer = PL".somethingonplayer",
563
    on_crane = PL".on_crane",
564
    on_crane = PL".on_crane",
564
565
565
    i = { PL".i" },
566
    i = { PL".i" },
566
567
567
    one_parallax_sectnum = DISABLED{ PL".one_parallax_sectnum" },
568
    one_parallax_sectnum = DISABLED{ PL".one_parallax_sectnum" },
568
569
569
    random_club_frame = PL".random_club_frame",
570
    random_club_frame = PL".random_club_frame",
570
    one_eighty_count = PL".one_eighty_count",
571
    one_eighty_count = PL".one_eighty_count",
571
572
572
    dummyplayersprite = DISABLED_PL".dummyplayersprite",
573
    dummyplayersprite = DISABLED_PL".dummyplayersprite",
573
    extra_extra8 = PL".extra_extra8",
574
    extra_extra8 = PL".extra_extra8",
574
575
575
    actorsqu = PL".actorsqu",
576
    actorsqu = PL".actorsqu",
576
    timebeforeexit = PL".timebeforeexit",
577
    timebeforeexit = PL".timebeforeexit",
577
    customexitsound = { PL".customexitsound" },
578
    customexitsound = { PL".customexitsound" },
578
579
579
    last_pissed_time = PL".last_pissed_time",
580
    last_pissed_time = PL".last_pissed_time",
580
581
581
    weaprecs = PL".weaprecs[%s]",
582
    weaprecs = PL".weaprecs[%s]",
582
583
583
    weapon_sway = PL".weapon_sway",
584
    weapon_sway = PL".weapon_sway",
584
    crack_time = PL".crack_time",
585
    crack_time = PL".crack_time",
585
    bobcounter = PL".bobcounter",
586
    bobcounter = PL".bobcounter",
586
587
587
    -- NOTE: no access for .orotscrnang
588
    -- NOTE: no access for .orotscrnang
588
    rotscrnang = PL".rotscrnang",
589
    rotscrnang = PL".rotscrnang",
589
    dead_flag = PL".dead_flag",
590
    dead_flag = PL".dead_flag",
590
591
591
    holoduke_on = PL".holoduke_on",
592
    holoduke_on = PL".holoduke_on",
592
    pycount = PL".pycount",
593
    pycount = PL".pycount",
593
    transporter_hold = PL".transporter_hold",
594
    transporter_hold = PL".transporter_hold",
594
595
595
    max_secret_rooms = PL".max_secret_rooms",
596
    max_secret_rooms = PL".max_secret_rooms",
596
    secret_rooms = PL".secret_rooms",
597
    secret_rooms = PL".secret_rooms",
597
598
598
    frag = PL".frag",
599
    frag = PL".frag",
599
    fraggedself = PL".fraggedself",
600
    fraggedself = PL".fraggedself",
600
    quick_kick = PL".quick_kick",
601
    quick_kick = PL".quick_kick",
601
    last_quick_kick = PL".last_quick_kick",
602
    last_quick_kick = PL".last_quick_kick",
602
603
603
    return_to_center = DISABLED_PL".return_to_center",
604
    return_to_center = DISABLED_PL".return_to_center",
604
    reloading = PLBOOL".reloading",
605
    reloading = PLBOOL".reloading",
605
    weapreccnt = { PL".weapreccnt" },
606
    weapreccnt = { PL".weapreccnt" },
606
607
607
    aim_mode = PL".aim_mode",
608
    aim_mode = PL".aim_mode",
608
    auto_aim = PL".auto_aim",
609
    auto_aim = PL".auto_aim",
609
    weaponswitch = PL".weaponswitch",
610
    weaponswitch = PL".weaponswitch",
610
    movement_lock = PL".movement_lock",
611
    movement_lock = PL".movement_lock",
611
    team = PL".team",
612
    team = PL".team",
612
613
613
    tipincs = PL".tipincs",
614
    tipincs = PL".tipincs",
614
    hbomb_hold_delay = PL".hbomb_hold_delay",
615
    hbomb_hold_delay = PL".hbomb_hold_delay",
615
    frag_ps = PL".frag_ps",
616
    frag_ps = PL".frag_ps",
616
    kickback_pic = PL".kickback_pic",
617
    kickback_pic = PL".kickback_pic",
617
618
618
    gm = PL".gm",
619
    gm = PL".gm",
619
    on_warping_sector = PLBOOL".on_warping_sector",
620
    on_warping_sector = PLBOOL".on_warping_sector",
620
    footprintcount = PL".footprintcount",
621
    footprintcount = PL".footprintcount",
621
    hurt_delay = PL".hurt_delay",
622
    hurt_delay = PL".hurt_delay",
622
623
623
    hbomb_on = PLBOOL".hbomb_on",
624
    hbomb_on = PLBOOL".hbomb_on",
624
    jumping_toggle = PLBOOL".jumping_toggle",
625
    jumping_toggle = PLBOOL".jumping_toggle",
625
    rapid_fire_hold = PLBOOL".rapid_fire_hold",
626
    rapid_fire_hold = PLBOOL".rapid_fire_hold",
626
    on_ground = PLBOOL".on_ground",
627
    on_ground = PLBOOL".on_ground",
627
628
628
    inven_icon = PL".inven_icon",
629
    inven_icon = PL".inven_icon",
629
    buttonpalette = PL".buttonpalette",
630
    buttonpalette = PL".buttonpalette",
630
    over_shoulder_on = PLBOOL".over_shoulder_on",
631
    over_shoulder_on = PLBOOL".over_shoulder_on",
631
    show_empty_weapon = PL".show_empty_weapon",
632
    show_empty_weapon = PL".show_empty_weapon",
632
633
633
    jetpack_on = PLBOOL".jetpack_on",
634
    jetpack_on = PLBOOL".jetpack_on",
634
    spritebridge = PLBOOL".spritebridge",
635
    spritebridge = PLBOOL".spritebridge",
635
    lastrandomspot = DISABLED_PL".lastrandomspot",
636
    lastrandomspot = DISABLED_PL".lastrandomspot",
636
637
637
    scuba_on = PLBOOL".scuba_on",
638
    scuba_on = PLBOOL".scuba_on",
638
    footprintpal = PL".footprintpal",
639
    footprintpal = PL".footprintpal",
639
    heat_on = PLBOOL".heat_on",
640
    heat_on = PLBOOL".heat_on",
640
    invdisptime = PL".invdisptime",
641
    invdisptime = PL".invdisptime",
641
    holster_weapon = PLBOOL".holster_weapon",
642
    holster_weapon = PLBOOL".holster_weapon",
642
    falling_counter = PL".falling_counter",
643
    falling_counter = PL".falling_counter",
643
    footprintshade = PL".footprintshade",
644
    footprintshade = PL".footprintshade",
644
645
645
    refresh_inventory = PL".refresh_inventory",
646
    refresh_inventory = PL".refresh_inventory",
646
    last_full_weapon = PL".last_full_weapon",
647
    last_full_weapon = PL".last_full_weapon",
647
648
648
    walking_snd_toggle = PL".walking_snd_toggle",
649
    walking_snd_toggle = PL".walking_snd_toggle",
649
    palookup = PL".palookup",
650
    palookup = PL".palookup",
650
    hard_landing = PL".hard_landing",
651
    hard_landing = PL".hard_landing",
651
    fist_incs = PL".fist_incs",
652
    fist_incs = PL".fist_incs",
652
653
653
    toggle_key_flag = { PL".toggle_key_flag" },
654
    toggle_key_flag = { PL".toggle_key_flag" },
654
    knuckle_incs = PL".knuckle_incs",
655
    knuckle_incs = PL".knuckle_incs",
655
    knee_incs = PL".knee_incs",
656
    knee_incs = PL".knee_incs",
656
    access_incs = PL".access_incs",
657
    access_incs = PL".access_incs",
657
658
658
    numloogs = DISABLED_PL".numloogs",
659
    numloogs = DISABLED_PL".numloogs",
659
    loogcnt = PL".loogcnt",
660
    loogcnt = PL".loogcnt",
660
    scream_voice = { PL".scream_voice" },
661
    scream_voice = { PL".scream_voice" },
661
662
662
    last_weapon = PL".last_weapon",
663
    last_weapon = PL".last_weapon",
663
    cheat_phase = { PL".cheat_phase" },
664
    cheat_phase = { PL".cheat_phase" },
664
    weapon_pos = PL".weapon_pos",
665
    weapon_pos = PL".weapon_pos",
665
    wantweaponfire = PL".wantweaponfire",
666
    wantweaponfire = PL".wantweaponfire",
666
667
667
    curr_weapon = PL".curr_weapon",
668
    curr_weapon = PL".curr_weapon",
668
669
669
    palette = { PL".palette" },
670
    palette = { PL".palette" },
670
671
671
    -- NOTE the special case:
672
    -- NOTE the special case:
672
    pals = PL"._pals[%s]",
673
    pals = PL"._pals[%s]",
673
    pals_time = PL"._pals.f",
674
    pals_time = PL"._pals.f",
674
675
675
    name = {},
676
    name = {},
676
677
677
    -- Access to .inv_amount
678
    -- Access to .inv_amount
678
    steroids_amount = PL".inv_amount[0]",
679
    steroids_amount = PL".inv_amount[0]",
679
    shield_amount = PL".inv_amount[1]",
680
    shield_amount = PL".inv_amount[1]",
680
    scuba_amount = PL".inv_amount[2]",
681
    scuba_amount = PL".inv_amount[2]",
681
    holoduke_amount = PL".inv_amount[3]",
682
    holoduke_amount = PL".inv_amount[3]",
682
    jetpack_amount = PL".inv_amount[4]",
683
    jetpack_amount = PL".inv_amount[4]",
683
    -- 5: dummy
684
    -- 5: dummy
684
    -- 6: no "access_amount"
685
    -- 6: no "access_amount"
685
    heat_amount = PL".inv_amount[7]",
686
    heat_amount = PL".inv_amount[7]",
686
    -- 8: dummy
687
    -- 8: dummy
687
    firstaid_amount = PL".inv_amount[9]",
688
    firstaid_amount = PL".inv_amount[9]",
688
    boot_amount = PL".inv_amount[10]",
689
    boot_amount = PL".inv_amount[10]",
689
}
690
}
690
691
691
local SEC = function(memb) return "sector[%s]"..memb end
692
local SEC = function(memb) return "sector[%s]"..memb end
692
local SECRO = function(memb) return { "sector[%s]"..memb } end
693
local SECRO = function(memb) return { "sector[%s]"..memb } end
693
694
694
local SectorLabels = {
695
local SectorLabels = {
695
    wallptr = SECRO".wallptr",
696
    wallptr = SECRO".wallptr",
696
    wallnum = SECRO".wallnum",
697
    wallnum = SECRO".wallnum",
697
698
698
    ceilingz = SEC".ceilingz",
699
    ceilingz = SEC".ceilingz",
699
    floorz = SEC".floorz",
700
    floorz = SEC".floorz",
700
701
701
    ceilingstat = SEC".ceilingstat",
702
    ceilingstat = SEC".ceilingstat",
702
    floorstat = SEC".floorstat",
703
    floorstat = SEC".floorstat",
703
704
704
    -- CEILING
705
    -- CEILING
705
    ceilingpicnum = { SEC".ceilingpicnum", SEC":set_ceilingpicnum(%%s)", litok_ge0 },
706
    ceilingpicnum = { SEC".ceilingpicnum", SEC":set_ceilingpicnum(%%s)", litok_ge0 },
706
707
707
    ceilingslope = SEC".ceilingheinum",  -- NAME
708
    ceilingslope = SEC".ceilingheinum",  -- NAME
708
    ceilingshade = SEC".ceilingshade",
709
    ceilingshade = SEC".ceilingshade",
709
710
710
    ceilingpal = SEC".ceilingpal",
711
    ceilingpal = SEC".ceilingpal",
711
    ceilingxpanning = SEC".ceilingxpanning",
712
    ceilingxpanning = SEC".ceilingxpanning",
712
    ceilingypanning = SEC".ceilingypanning",
713
    ceilingypanning = SEC".ceilingypanning",
713
714
714
    -- FLOOR
715
    -- FLOOR
715
    floorpicnum = { SEC".floorpicnum", SEC":set_floorpicnum(%%s)", litok_ge0 },
716
    floorpicnum = { SEC".floorpicnum", SEC":set_floorpicnum(%%s)", litok_ge0 },
716
717
717
    floorslope = SEC".floorheinum",  -- NAME
718
    floorslope = SEC".floorheinum",  -- NAME
718
    floorshade = SEC".floorshade",
719
    floorshade = SEC".floorshade",
719
720
720
    floorpal = SEC".floorpal",
721
    floorpal = SEC".floorpal",
721
    floorxpanning = SEC".floorxpanning",
722
    floorxpanning = SEC".floorxpanning",
722
    floorypanning = SEC".floorypanning",
723
    floorypanning = SEC".floorypanning",
723
724
724
    visibility = SEC".visibility",
725
    visibility = SEC".visibility",
725
    fogpal = SEC".fogpal",
726
    fogpal = SEC".fogpal",
726
    alignto = SEC".fogpal",  -- NAME
727
    alignto = SEC".fogpal",  -- NAME
727
728
728
    lotag = SEC".lotag",
729
    lotag = SEC".lotag",
729
    hitag = SEC".hitag",
730
    hitag = SEC".hitag",
730
    extra = SEC".extra",
731
    extra = SEC".extra",
731
732
732
    ceilingbunch = { SEC".ceilingbunch" },
733
    ceilingbunch = { SEC".ceilingbunch" },
733
    floorbunch = { SEC".floorbunch" },
734
    floorbunch = { SEC".floorbunch" },
734
735
735
    ulotag = S2U(SEC".lotag"),
736
    ulotag = S2U(SEC".lotag"),
736
    uhitag = S2U(SEC".hitag"),
737
    uhitag = S2U(SEC".hitag"),
737
}
738
}
738
739
739
local WAL = function(memb) return "wall[%s]"..memb end
740
local WAL = function(memb) return "wall[%s]"..memb end
740
local WALRO = function(memb) return { "wall[%s]"..memb } end
741
local WALRO = function(memb) return { "wall[%s]"..memb } end
741
742
742
local WallLabels = {
743
local WallLabels = {
743
    x = WAL".x",
744
    x = WAL".x",
744
    y = WAL".y",
745
    y = WAL".y",
745
    point2 = WALRO".point2",
746
    point2 = WALRO".point2",
746
    nextwall = { WAL".nextwall", WAL":_set_nextwall(%%s)" },
747
    nextwall = { WAL".nextwall", WAL":_set_nextwall(%%s)" },
747
    nextsector = { WAL".nextsector", WAL":_set_nextsector(%%s)" },
748
    nextsector = { WAL".nextsector", WAL":_set_nextsector(%%s)" },
748
    cstat = WAL".cstat",
749
    cstat = WAL".cstat",
749
    picnum = { WAL".picnum", WAL":set_picnum(%%s)", litok_ge0 },
750
    picnum = { WAL".picnum", WAL":set_picnum(%%s)", litok_ge0 },
750
    overpicnum = { WAL".overpicnum", WAL":set_overpicnum(%%s)", litok_ge0 },
751
    overpicnum = { WAL".overpicnum", WAL":set_overpicnum(%%s)", litok_ge0 },
751
    shade = WAL".shade",
752
    shade = WAL".shade",
752
    pal = WAL".pal",
753
    pal = WAL".pal",
753
    xrepeat = WAL".xrepeat",
754
    xrepeat = WAL".xrepeat",
754
    yrepeat = WAL".yrepeat",
755
    yrepeat = WAL".yrepeat",
755
    xpanning = WAL".xpanning",
756
    xpanning = WAL".xpanning",
756
    ypanning = WAL".ypanning",
757
    ypanning = WAL".ypanning",
757
    lotag = WAL".lotag",
758
    lotag = WAL".lotag",
758
    hitag = WAL".hitag",
759
    hitag = WAL".hitag",
759
    extra = WAL".extra",
760
    extra = WAL".extra",
760
    blend = WAL".blend",
761
    blend = WAL".blend",
761
762
762
    ulotag = S2U(WAL".lotag"),
763
    ulotag = S2U(WAL".lotag"),
763
    uhitag = S2U(WAL".hitag"),
764
    uhitag = S2U(WAL".hitag"),
764
}
765
}
765
766
766
StructAccessCode =
767
StructAccessCode =
767
{
768
{
768
    sector = SectorLabels,
769
    sector = SectorLabels,
769
    wall = WallLabels,
770
    wall = WallLabels,
770
    sprite = ActorLabels,
771
    sprite = ActorLabels,
771
    player = PlayerLabels,
772
    player = PlayerLabels,
772
}
773
}
773
774
774
local function tonegtag(LabelsTab, member, funcname)
775
local function tonegtag(LabelsTab, member, funcname)
775
    local memb = LabelsTab[member]
776
    local memb = LabelsTab[member]
776
    LabelsTab[member] = { memb, memb.."="..funcname.."(%%s)" }
777
    LabelsTab[member] = { memb, memb.."="..funcname.."(%%s)" }
777
end
778
end
778
779
779
function setup_negative_tag_check(funcname)
780
function setup_negative_tag_check(funcname)
780
    tonegtag(TspriteLabels, "tsprlotag", funcname)
781
    tonegtag(TspriteLabels, "tsprlotag", funcname)
781
    tonegtag(TspriteLabels, "tsprhitag", funcname)
782
    tonegtag(TspriteLabels, "tsprhitag", funcname)
782
    tonegtag(ActorLabels, "lotag", funcname)
783
    tonegtag(ActorLabels, "lotag", funcname)
783
    tonegtag(ActorLabels, "hitag", funcname)
784
    tonegtag(ActorLabels, "hitag", funcname)
784
    tonegtag(WallLabels, "lotag", funcname)
785
    tonegtag(WallLabels, "lotag", funcname)
785
    tonegtag(WallLabels, "hitag", funcname)
786
    tonegtag(WallLabels, "hitag", funcname)
786
    tonegtag(SectorLabels, "lotag", funcname)
787
    tonegtag(SectorLabels, "lotag", funcname)
787
    tonegtag(SectorLabels, "hitag", funcname)
788
    tonegtag(SectorLabels, "hitag", funcname)
788
end
789
end
789
790
790
local PROJ = function(memb) return "projectile[%s]"..memb end
791
local PROJ = function(memb) return "projectile[%s]"..memb end
791
local THISPROJ = function(memb) return "actor[%s].proj"..memb end
792
local THISPROJ = function(memb) return "actor[%s].proj"..memb end
792
793
793
local ProjectileLabels = {
794
local ProjectileLabels = {
794
    workslike = PROJ".workslike",
795
    workslike = PROJ".workslike",
795
    cstat = PROJ".cstat",
796
    cstat = PROJ".cstat",
796
    hitradius = PROJ".hitradius",
797
    hitradius = PROJ".hitradius",
797
    range = PROJ".range",
798
    range = PROJ".range",
798
    flashcolor = PROJ".flashcolor",
799
    flashcolor = PROJ".flashcolor",
799
    spawns = { PROJ".spawns", PROJ":set_spawns(%%s)", litok_gem1 },
800
    spawns = { PROJ".spawns", PROJ":set_spawns(%%s)", litok_gem1 },
800
    sound = { PROJ".sound", PROJ":set_sound(%%s)", litok_gem1 },
801
    sound = { PROJ".sound", PROJ":set_sound(%%s)", litok_gem1 },
801
    isound = { PROJ".isound", PROJ":set_isound(%%s)", litok_gem1 },
802
    isound = { PROJ".isound", PROJ":set_isound(%%s)", litok_gem1 },
802
    vel = PROJ".vel",
803
    vel = PROJ".vel",
803
    decal = { PROJ".decal", PROJ":set_decal(%%s)", litok_gem1 },
804
    decal = { PROJ".decal", PROJ":set_decal(%%s)", litok_gem1 },
804
    trail = { PROJ".trail", PROJ":set_trail(%%s)", litok_gem1 },
805
    trail = { PROJ".trail", PROJ":set_trail(%%s)", litok_gem1 },
805
    tnum = PROJ".tnum",
806
    tnum = PROJ".tnum",
806
    drop = PROJ".drop",
807
    drop = PROJ".drop",
807
    offset = PROJ".offset",
808
    offset = PROJ".offset",
808
    bounces = PROJ".bounces",
809
    bounces = PROJ".bounces",
809
    bsound = { PROJ".bsound", PROJ":set_bsound(%%s)", litok_gem1 },
810
    bsound = { PROJ".bsound", PROJ":set_bsound(%%s)", litok_gem1 },
810
    toffset = PROJ".toffset",
811
    toffset = PROJ".toffset",
811
    extra = PROJ".extra",
812
    extra = PROJ".extra",
812
    extra_rand = PROJ".extra_rand",
813
    extra_rand = PROJ".extra_rand",
813
    sxrepeat = PROJ".sxrepeat",
814
    sxrepeat = PROJ".sxrepeat",
814
    syrepeat = PROJ".syrepeat",
815
    syrepeat = PROJ".syrepeat",
815
    txrepeat = PROJ".txrepeat",
816
    txrepeat = PROJ".txrepeat",
816
    tyrepeat = PROJ".tyrepeat",
817
    tyrepeat = PROJ".tyrepeat",
817
    shade = PROJ".shade",
818
    shade = PROJ".shade",
818
    xrepeat = PROJ".xrepeat",
819
    xrepeat = PROJ".xrepeat",
819
    yrepeat = PROJ".yrepeat",
820
    yrepeat = PROJ".yrepeat",
820
    pal = PROJ".pal",
821
    pal = PROJ".pal",
821
    velmult = PROJ".movecnt",  -- NAME
822
    velmult = PROJ".movecnt",  -- NAME
822
    clipdist = PROJ".clipdist",
823
    clipdist = PROJ".clipdist",
823
    userdata = PROJ".userdata",
824
    userdata = PROJ".userdata",
824
}
825
}
825
826
826
-- XXX: kind of CODEDUP form spr2tspr
827
-- XXX: kind of CODEDUP form spr2tspr
827
local function proj2thisproj(code)
828
local function proj2thisproj(code)
828
    if (code and code:find(PROJ"", 1, true)==1) then
829
    if (code and code:find(PROJ"", 1, true)==1) then
829
        return THISPROJ(code:sub(#PROJ"" + 1))
830
        return THISPROJ(code:sub(#PROJ"" + 1))
830
    end
831
    end
831
    -- else return nothing
832
    -- else return nothing
832
end
833
end
833
834
834
local SpriteProjectileLabels = {}
835
local SpriteProjectileLabels = {}
835
836
836
for member, code in pairs(ProjectileLabels) do
837
for member, code in pairs(ProjectileLabels) do
837
    if (type(code)=="string") then
838
    if (type(code)=="string") then
838
        SpriteProjectileLabels[member] = proj2thisproj(code)
839
        SpriteProjectileLabels[member] = proj2thisproj(code)
839
    else
840
    else
840
        SpriteProjectileLabels[member] = { proj2thisproj(code[1]), proj2thisproj(code[2]) }
841
        SpriteProjectileLabels[member] = { proj2thisproj(code[1]), proj2thisproj(code[2]) }
841
    end
842
    end
842
end
843
end
843
844
844
local UD = function(memb) return "_gud(_pli)"..memb end
845
local UD = function(memb) return "_gud(_pli)"..memb end
845
local UDRO = function(memb) return { UD(memb) } end
846
local UDRO = function(memb) return { UD(memb) } end
846
847
847
-- NOTE: Only members that actually encountered in existing mods are added here.
848
-- NOTE: Only members that actually encountered in existing mods are added here.
848
local UserdefLabels = {
849
local UserdefLabels = {
849
    althud = UD".althud",
850
    althud = UD".althud",
850
    auto_run = UD".auto_run",
851
    auto_run = UD".auto_run",
851
    camerasprite = UDRO".camerasprite",
852
    camerasprite = UDRO".camerasprite",
852
    cashman = UDRO".cashman",
853
    cashman = UDRO".cashman",
853
    clipping = UD".noclip",  -- NAME
854
    clipping = UD".noclip",  -- NAME
854
    color = UD".color",
855
    color = UD".color",
855
    const_visibility = UD".const_visibility",
856
    const_visibility = UD".const_visibility",
856
    crosshair = UD".crosshair",
857
    crosshair = UD".crosshair",
857
    crosshairscale = UDRO".crosshairscale",
858
    crosshairscale = UDRO".crosshairscale",
858
    detail = { "1" },
859
    detail = { "1" },
859
    display_bonus_screen = UD".display_bonus_screen",
860
    display_bonus_screen = UD".display_bonus_screen",
860
    drawweapon = UDRO".drawweapon",
861
    drawweapon = UDRO".drawweapon",
861
    eog = UD".eog",
862
    eog = UD".eog",
862
    ffire = UDRO".ffire",
863
    ffire = UDRO".ffire",
863
    fta_on = UD".fta_on",
864
    fta_on = UD".fta_on",
864
    god = UDRO".god",
865
    god = UDRO".god",
865
    idplayers = UDRO".idplayers",
866
    idplayers = UDRO".idplayers",
866
    last_level = UDRO".last_level",
867
    last_level = UDRO".last_level",
867
    level_number = { UD".level_number", UD":set_level_number(%%s)", {0, MAXLEVELS-1} },
868
    level_number = { UD".level_number", UD":set_level_number(%%s)", {0, MAXLEVELS-1} },
868
    levelstats = UD".levelstats",
869
    levelstats = UD".levelstats",
869
    lockout = UDRO".lockout",
870
    lockout = UDRO".lockout",
870
    m_origin_x = UD".m_origin.x",
871
    m_origin_x = UD".m_origin.x",
871
    m_origin_y = UD".m_origin.y",
872
    m_origin_y = UD".m_origin.y",
872
    m_player_skill = UDRO".m_player_skill",
873
    m_player_skill = UDRO".m_player_skill",
873
    m_volume_number = { UD".m_volume_number", UD":set_m_volume_number(%%s)", {0, MAXVOLUMES} },
874
    m_volume_number = { UD".m_volume_number", UD":set_m_volume_number(%%s)", {0, MAXVOLUMES} },
874
    mouseaiming = UD".mouseaiming",
875
    mouseaiming = UD".mouseaiming",
875
    pause_on = UDRO".pause_on",
876
    pause_on = UDRO".pause_on",
876
    player_skill = UD".player_skill",
877
    player_skill = UD".player_skill",
877
    playerbest = UDRO".playerbest",
878
    playerbest = UDRO".playerbest",
878
    mouseflip = UDRO".mouseflip",
879
    mouseflip = UDRO".mouseflip",
879
    multimode = { "1" },
880
    multimode = { "1" },
880
    musictoggle = UDRO".config.MusicToggle",
881
    musictoggle = UDRO".config.MusicToggle",
881
    noexits = UDRO".noexits",
882
    noexits = UDRO".noexits",
882
    overhead_on = UD".overhead_on",
883
    overhead_on = UD".overhead_on",
883
    recstat = UDRO".recstat",
884
    recstat = UDRO".recstat",
884
    runkey_mode = UD".runkey_mode",
885
    runkey_mode = UD".runkey_mode",
885
    show_level_text = UD".show_level_text",
886
    show_level_text = UD".show_level_text",
886
    screen_size = { UD".screen_size", UD":set_screen_size(%%s)" },
887
    screen_size = { UD".screen_size", UD":set_screen_size(%%s)" },
887
    screen_tilting = UD".screen_tilting",
888
    screen_tilting = UD".screen_tilting",
888
    showallmap = UD".showallmap",
889
    showallmap = UD".showallmap",
889
    showweapons = UDRO".showweapons",
890
    showweapons = UDRO".showweapons",
890
    statusbarmode = UDRO".statusbarmode",
891
    statusbarmode = UDRO".statusbarmode",
891
    statusbarscale = UDRO".statusbarscale",
892
    statusbarscale = UDRO".statusbarscale",
892
    volume_number = { UD".volume_number", UD":set_volume_number(%%s)", {0, MAXVOLUMES} },
893
    volume_number = { UD".volume_number", UD":set_volume_number(%%s)", {0, MAXVOLUMES} },
893
    weaponscale = UDRO".weaponscale",
894
    weaponscale = UDRO".weaponscale",
894
    weaponswitch = UD".weaponswitch",
895
    weaponswitch = UD".weaponswitch",
895
}
896
}
896
897
897
local INP = function(memb) return PL"._input"..memb end
898
local INP = function(memb) return PL"._input"..memb end
898
899
899
local InputLabels = {
900
local InputLabels = {
900
    avel = INP".avel",
901
    avel = INP".avel",
901
    horz = INP".horz",
902
    horz = INP".horz",
902
    fvel = INP".fvel",
903
    fvel = INP".fvel",
903
    svel = INP".svel",
904
    svel = INP".svel",
904
    bits = INP".bits",
905
    bits = INP".bits",
905
    extbits = INP".extbits",
906
    extbits = INP".extbits",
906
}
907
}
907
908
908
-- These structs cannot be accessed by inline array exprs in CON:
909
-- These structs cannot be accessed by inline array exprs in CON:
909
StructAccessCode2 =
910
StructAccessCode2 =
910
{
911
{
911
    tspr = TspriteLabels,
912
    tspr = TspriteLabels,
912
    projectile = ProjectileLabels,
913
    projectile = ProjectileLabels,
913
    thisprojectile = SpriteProjectileLabels,
914
    thisprojectile = SpriteProjectileLabels,
914
    userdef = UserdefLabels,
915
    userdef = UserdefLabels,
915
    input = InputLabels,
916
    input = InputLabels,
916
}
917
}
917
918
918
-- NOTE: These MUST be in reverse lexicographical order!
919
-- NOTE: These MUST be in reverse lexicographical order!
919
-- Per CON syntax, valid identifiers names are disjoint from keywords,
920
-- Per CON syntax, valid identifiers names are disjoint from keywords,
920
-- so that a rule like
921
-- so that a rule like
921
--      t_identifier = -con_keyword * (sp1 + "[") * t_identifier_all
922
--      t_identifier = -con_keyword * (sp1 + "[") * t_identifier_all
922
-- (from the final grammar in lunacon.lua) must match the longest
923
-- (from the final grammar in lunacon.lua) must match the longest
923
-- possible keyword name, else the negation might wrongly not fail.
924
-- possible keyword name, else the negation might wrongly not fail.
924
925
925
keyword =
926
keyword =
926
927
927
lpeg.P(false) +
928
lpeg.P(false) +
928
"}" +
929
"}" +
929
"{" +
930
"{" +
930
"zshootvar" +
931
"zshootvar" +
931
"zshoot" +
932
"zshoot" +
932
"xorvarvar" +
933
"xorvarvar" +
933
"xorvar" +
934
"xorvar" +
934
"writearraytofile" +
935
"writearraytofile" +
935
"whilevarvarn" +
936
"whilevarvarn" +
936
"whilevarn" +
937
"whilevarn" +
937
"wackplayer" +
938
"wackplayer" +
938
"userquote" +
939
"userquote" +
939
"useractor" +
940
"useractor" +
940
"updatesectorz" +
941
"updatesectorz" +
941
"updatesector" +
942
"updatesector" +
942
"undefinevolume" +
943
"undefinevolume" +
943
"undefineskill" +
944
"undefineskill" +
944
"undefinelevel" +
945
"undefinelevel" +
945
"tossweapon" +
946
"tossweapon" +
946
"tip" +
947
"tip" +
947
"time" +
948
"time" +
948
"switch" +
949
"switch" +
949
"subvarvar" +
950
"subvarvar" +
950
"subvar" +
951
"subvar" +
951
"strength" +
952
"strength" +
952
"stopsoundvar" +
953
"stopsoundvar" +
953
"stopsound" +
954
"stopsound" +
954
"stopallsounds" +
955
"stopallsounds" +
955
"stopactorsound" +
956
"stopactorsound" +
956
"state" +
957
"state" +
957
"starttrackvar" +
958
"starttrackvar" +
958
"starttrack" +
959
"starttrack" +
959
"startlevel" +
960
"startlevel" +
960
"startcutscene" +
961
"startcutscene" +
961
"ssp" +
962
"ssp" +
962
"sqrt" +
963
"sqrt" +
963
"spriteshadow" +
964
"spriteshadow" +
964
"spritepal" +
965
"spritepal" +
965
"spritenvg" +
966
"spritenvg" +
966
"spritenoshade" +
967
"spritenoshade" +
967
"spritenopal" +
968
"spritenopal" +
968
"spriteflags" +
969
"spriteflags" +
969
"spgetlotag" +
970
"spgetlotag" +
970
"spgethitag" +
971
"spgethitag" +
971
"spawn" +
972
"spawn" +
972
"soundvar" +
973
"soundvar" +
973
"soundoncevar" +
974
"soundoncevar" +
974
"soundonce" +
975
"soundonce" +
975
"sound" +
976
"sound" +
976
"smaxammo" +
977
"smaxammo" +
977
"sleeptime" +
978
"sleeptime" +
978
"sizeto" +
979
"sizeto" +
979
"sizeat" +
980
"sizeat" +
980
"sin" +
981
"sin" +
981
"showviewunbiased" +
982
"showviewunbiased" +
982
"showview" +
983
"showview" +
983
"shootvar" +
984
"shootvar" +
984
"shoot" +
985
"shoot" +
985
"shiftvarr" +
986
"shiftvarr" +
986
"shiftvarl" +
987
"shiftvarl" +
987
"shadeto" +
988
"shadeto" +
988
"setwall" +
989
"setwall" +
989
"setvarvar" +
990
"setvarvar" +
990
"setvar" +
991
"setvar" +
991
"setuserdef" +
992
"setuserdef" +
992
"settspr" +
993
"settspr" +
993
"setthisprojectile" +
994
"setthisprojectile" +
994
"setsprite" +
995
"setsprite" +
995
"setsector" +
996
"setsector" +
996
"setprojectile" +
997
"setprojectile" +
997
"setplayervar" +
998
"setplayervar" +
998
"setplayerangle" +
999
"setplayerangle" +
999
"setplayer" +
1000
"setplayer" +
1000
"setmusicposition" +
1001
"setmusicposition" +
1001
"setinput" +
1002
"setinput" +
1002
"setgamepalette" +
1003
"setgamepalette" +
1003
"setgamename" +
1004
"setgamename" +
1004
"setdefname" +
1005
"setdefname" +
1005
"setcfgname" +
1006
"setcfgname" +
1006
"setaspect" +
1007
"setaspect" +
1007
"setarray" +
1008
"setarray" +
1008
"setactorvar" +
1009
"setactorvar" +
1009
"setactorsoundpitch" +
1010
"setactorsoundpitch" +
1010
"setactorangle" +
1011
"setactorangle" +
1011
"setactor" +
1012
"setactor" +
1012
"sectsetinterpolation" +
1013
"sectsetinterpolation" +
1013
"sectorofwall" +
1014
"sectorofwall" +
1014
"sectgetlotag" +
1015
"sectgetlotag" +
1015
"sectgethitag" +
1016
"sectgethitag" +
1016
"sectclearinterpolation" +
1017
"sectclearinterpolation" +
1017
"scriptsize" +
1018
"scriptsize" +
1018
"screentext" +
1019
"screentext" +
1019
"screensound" +
1020
"screensound" +
1020
"savenn" +
1021
"savenn" +
1021
"savemapstate" +
1022
"savemapstate" +
1022
"savegamevar" +
1023
"savegamevar" +
1023
"save" +
1024
"save" +
1024
"rotatespritea" +
1025
"rotatespritea" +
1025
"rotatesprite16" +
1026
"rotatesprite16" +
1026
"rotatesprite" +
1027
"rotatesprite" +
1027
"rotatepoint" +
1028
"rotatepoint" +
1028
"return" +
1029
"return" +
1029
"respawnhitag" +
1030
"respawnhitag" +
1030
"resizearray" +
1031
"resizearray" +
1031
"resetplayerflags" +
1032
"resetplayerflags" +
1032
"resetplayer" +
1033
"resetplayer" +
1033
"resetcount" +
1034
"resetcount" +
1034
"resetactioncount" +
1035
"resetactioncount" +
1035
"redefinequote" +
1036
"redefinequote" +
1036
"readgamevar" +
1037
"readgamevar" +
1037
"readarrayfromfile" +
1038
"readarrayfromfile" +
1038
"rayintersect" +
1039
"rayintersect" +
1039
"randvarvar" +
1040
"randvarvar" +
1040
"randvar" +
1041
"randvar" +
1041
"quote" +
1042
"quote" +
1042
"quake" +
1043
"quake" +
1043
"qsubstr" +
1044
"qsubstr" +
1044
"qstrncat" +
1045
"qstrncat" +
1045
"qstrlen" +
1046
"qstrlen" +
1046
"qstrdim" +
1047
"qstrdim" +
1047
"qstrcpy" +
1048
"qstrcpy" +
1048
"qstrcat" +
1049
"qstrcat" +
1049
"qsprintf" +
1050
"qsprintf" +
1050
"qspawnvar" +
1051
"qspawnvar" +
1051
"qspawn" +
1052
"qspawn" +
1052
"qgetsysstr" +
1053
"qgetsysstr" +
1053
"pstomp" +
1054
"pstomp" +
1054
"prevspritestat" +
1055
"prevspritestat" +
1055
"prevspritesect" +
1056
"prevspritesect" +
1056
"precache" +
1057
"precache" +
1057
"pkick" +
1058
"pkick" +
1058
"paper" +
1059
"paper" +
1059
"palfrom" +
1060
"palfrom" +
1060
"orvarvar" +
1061
"orvarvar" +
1061
"orvar" +
1062
"orvar" +
1062
"operatesectors" +
1063
"operatesectors" +
1063
"operaterespawns" +
1064
"operaterespawns" +
1064
"operatemasterswitches" +
1065
"operatemasterswitches" +
1065
"operateactivators" +
1066
"operateactivators" +
1066
"operate" +
1067
"operate" +
1067
"onevent" +
1068
"onevent" +
1068
"nullop" +
1069
"nullop" +
1069
"nextspritestat" +
1070
"nextspritestat" +
1070
"nextspritesect" +
1071
"nextspritesect" +
1071
"neartag" +
1072
"neartag" +
1072
"myosx" +
1073
"myosx" +
1073
"myospalx" +
1074
"myospalx" +
1074
"myospal" +
1075
"myospal" +
1075
"myos" +
1076
"myos" +
1076
"music" +
1077
"music" +
1077
"mulvarvar" +
1078
"mulvarvar" +
1078
"mulvar" +
1079
"mulvar" +
1079
"mulscale" +
1080
"mulscale" +
1080
"movesprite" +
1081
"movesprite" +
1081
"move" +
1082
"move" +
1082
"money" +
1083
"money" +
1083
"modvarvar" +
1084
"modvarvar" +
1084
"modvar" +
1085
"modvar" +
1085
"minitext" +
1086
"minitext" +
1086
"mikesnd" +
1087
"mikesnd" +
1087
"mail" +
1088
"mail" +
1088
"lotsofglass" +
1089
"lotsofglass" +
1089
"lockplayer" +
1090
"lockplayer" +
1090
"loadmapstate" +
1091
"loadmapstate" +
1091
"lineintersect" +
1092
"lineintersect" +
1092
"ldist" +
1093
"ldist" +
1093
"killit" +
1094
"killit" +
1094
"jump" +
1095
"jump" +
1095
"insertspriteq" +
1096
"insertspriteq" +
1096
"inittimer" +
1097
"inittimer" +
1097
"includedefault" +
1098
"includedefault" +
1098
"include" +
1099
"include" +
1099
"ifwasweapon" +
1100
"ifwasweapon" +
1100
"ifvarxor" +
1101
"ifvarxor" +
1101
"ifvarvarxor" +
1102
"ifvarvarxor" +
1102
"ifvarvaror" +
1103
"ifvarvaror" +
1103
"ifvarvarn" +
1104
"ifvarvarn" +
1104
"ifvarvarl" +
1105
"ifvarvarl" +
1105
"ifvarvarg" +
1106
"ifvarvarg" +
1106
"ifvarvareither" +
1107
"ifvarvareither" +
1107
"ifvarvare" +
1108
"ifvarvare" +
1108
"ifvarvarand" +
1109
"ifvarvarand" +
1109
"ifvaror" +
1110
"ifvaror" +
1110
"ifvarn" +
1111
"ifvarn" +
1111
"ifvarl" +
1112
"ifvarl" +
1112
"ifvarg" +
1113
"ifvarg" +
1113
"ifvareither" +
1114
"ifvareither" +
1114
"ifvare" +
1115
"ifvare" +
1115
"ifvarand" +
1116
"ifvarand" +
1116
"ifstrength" +
1117
"ifstrength" +
1117
"ifsquished" +
1118
"ifsquished" +
1118
"ifspritepal" +
1119
"ifspritepal" +
1119
"ifspawnedby" +
1120
"ifspawnedby" +
1120
"ifsound" +
1121
"ifsound" +
1121
"ifserver" +
1122
"ifserver" +
1122
"ifrnd" +
1123
"ifrnd" +
1123
"ifrespawn" +
1124
"ifrespawn" +
1124
"ifplayersl" +
1125
"ifplayersl" +
1125
"ifpinventory" +
1126
"ifpinventory" +
1126
"ifphealthl" +
1127
"ifphealthl" +
1127
"ifpdistl" +
1128
"ifpdistl" +
1128
"ifpdistg" +
1129
"ifpdistg" +
1129
"ifp" +
1130
"ifp" +
1130
"ifoutside" +
1131
"ifoutside" +
1131
"ifonwater" +
1132
"ifonwater" +
1132
"ifnotmoving" +
1133
"ifnotmoving" +
1133
"ifnosounds" +
1134
"ifnosounds" +
1134
"ifmultiplayer" +
1135
"ifmultiplayer" +
1135
"ifmove" +
1136
"ifmove" +
1136
"ifinwater" +
1137
"ifinwater" +
1137
"ifinspace" +
1138
"ifinspace" +
1138
"ifinouterspace" +
1139
"ifinouterspace" +
1139
"ifhitweapon" +
1140
"ifhitweapon" +
1140
"ifhitspace" +
1141
"ifhitspace" +
1141
"ifgotweaponce" +
1142
"ifgotweaponce" +
1142
"ifgapzl" +
1143
"ifgapzl" +
1143
"iffloordistl" +
1144
"iffloordistl" +
1144
"ifdead" +
1145
"ifdead" +
1145
"ifcutscene" +
1146
"ifcutscene" +
1146
"ifcount" +
1147
"ifcount" +
1147
"ifclient" +
1148
"ifclient" +
1148
"ifceilingdistl" +
1149
"ifceilingdistl" +
1149
"ifcanshoottarget" +
1150
"ifcanshoottarget" +
1150
"ifcanseetarget" +
1151
"ifcanseetarget" +
1151
"ifcansee" +
1152
"ifcansee" +
1152
"ifbulletnear" +
1153
"ifbulletnear" +
1153
"ifawayfromwall" +
1154
"ifawayfromwall" +
1154
"ifangdiffl" +
1155
"ifangdiffl" +
1155
"ifai" +
1156
"ifai" +
1156
"ifactorsound" +
1157
"ifactorsound" +
1157
"ifactornotstayput" +
1158
"ifactornotstayput" +
1158
"ifactor" +
1159
"ifactor" +
1159
"ifactioncount" +
1160
"ifactioncount" +
1160
"ifaction" +
1161
"ifaction" +
1161
"hitscan" +
1162
"hitscan" +
1162
"hitradiusvar" +
1163
"hitradiusvar" +
1163
"hitradius" +
1164
"hitradius" +
1164
"headspritestat" +
1165
"headspritestat" +
1165
"headspritesect" +
1166
"headspritesect" +
1166
"guts" +
1167
"guts" +
1167
"guniqhudid" +
1168
"guniqhudid" +
1168
"gmaxammo" +
1169
"gmaxammo" +
1169
"globalsoundvar" +
1170
"globalsoundvar" +
1170
"globalsound" +
1171
"globalsound" +
1171
"getzrange" +
1172
"getzrange" +
1172
"getwall" +
1173
"getwall" +
1173
"getuserdef" +
1174
"getuserdef" +
1174
"gettspr" +
1175
"gettspr" +
1175
"gettimedate" +
1176
"gettimedate" +
1176
"getticks" +
1177
"getticks" +
1177
"getthisprojectile" +
1178
"getthisprojectile" +
1178
"gettexturefloor" +
1179
"gettexturefloor" +
1179
"gettextureceiling" +
1180
"gettextureceiling" +
1180
"getsector" +
1181
"getsector" +
1181
"getprojectile" +
1182
"getprojectile" +
1182
"getpname" +
1183
"getpname" +
1183
"getplayervar" +
1184
"getplayervar" +
1184
"getplayerangle" +
1185
"getplayerangle" +
1185
"getplayer" +
1186
"getplayer" +
1186
"getmusicposition" +
1187
"getmusicposition" +
1187
"getlastpal" +
1188
"getlastpal" +
1188
"getkeyname" +
1189
"getkeyname" +
1189
"getinput" +
1190
"getinput" +
1190
"getincangle" +
1191
"getincangle" +
1191
"getflorzofslope" +
1192
"getflorzofslope" +
1192
"getcurraddress" +
1193
"getcurraddress" +
1193
"getceilzofslope" +
1194
"getceilzofslope" +
1194
"getarraysize" +
1195
"getarraysize" +
1195
"getangletotarget" +
1196
"getangletotarget" +
1196
"getangle" +
1197
"getangle" +
1197
"getactorvar" +
1198
"getactorvar" +
1198
"getactorangle" +
1199
"getactorangle" +
1199
"getactor" +
1200
"getactor" +
1200
"gamevar" +
1201
"gamevar" +
1201
"gametextz" +
1202
"gametextz" +
1202
"gametext" +
1203
"gametext" +
1203
"gamestartup" +
1204
"gamestartup" +
1204
"gamearray" +
1205
"gamearray" +
1205
"flash" +
1206
"flash" +
1206
"findplayer" +
1207
"findplayer" +
1207
"findotherplayer" +
1208
"findotherplayer" +
1208
"findnearspritezvar" +
1209
"findnearspritezvar" +
1209
"findnearspritez" +
1210
"findnearspritez" +
1210
"findnearspritevar" +
1211
"findnearspritevar" +
1211
"findnearsprite3dvar" +
1212
"findnearsprite3dvar" +
1212
"findnearsprite3d" +
1213
"findnearsprite3d" +
1213
"findnearsprite" +
1214
"findnearsprite" +
1214
"findnearactorzvar" +
1215
"findnearactorzvar" +
1215
"findnearactorz" +
1216
"findnearactorz" +
1216
"findnearactorvar" +
1217
"findnearactorvar" +
1217
"findnearactor3dvar" +
1218
"findnearactor3dvar" +
1218
"findnearactor3d" +
1219
"findnearactor3d" +
1219
"findnearactor" +
1220
"findnearactor" +
1220
"fall" +
1221
"fall" +
1221
"ezshootvar" +
1222
"ezshootvar" +
1222
"ezshoot" +
1223
"ezshoot" +
1223
"eventloadactor" +
1224
"eventloadactor" +
1224
"espawnvar" +
1225
"espawnvar" +
1225
"espawn" +
1226
"espawn" +
1226
"eshootvar" +
1227
"eshootvar" +
1227
"eshoot" +
1228
"eshoot" +
1228
"eqspawnvar" +
1229
"eqspawnvar" +
1229
"eqspawn" +
1230
"eqspawn" +
1230
"enhanced" +
1231
"enhanced" +
1231
"endswitch" +
1232
"endswitch" +
1232
"ends" +
1233
"ends" +
1233
"endoflevel" +
1234
"endoflevel" +
1234
"endofgame" +
1235
"endofgame" +
1235
"endevent" +
1236
"endevent" +
1236
"enda" +
1237
"enda" +
1237
"else" +
1238
"else" +
1238
"echo" +
1239
"echo" +
1239
"dynamicsoundremap" +
1240
"dynamicsoundremap" +
1240
"dynamicremap" +
1241
"dynamicremap" +
1241
"dragpoint" +
1242
"dragpoint" +
1242
"divvarvar" +
1243
"divvarvar" +
1243
"divvar" +
1244
"divvar" +
1244
"dist" +
1245
"dist" +
1245
"displayrandvarvar" +
1246
"displayrandvarvar" +
1246
"displayrandvar" +
1247
"displayrandvar" +
1247
"displayrand" +
1248
"displayrand" +
1248
"digitalnumberz" +
1249
"digitalnumberz" +
1249
"digitalnumber" +
1250
"digitalnumber" +
1250
"definevolumename" +
1251
"definevolumename" +
1251
"definevolumeflags" +
1252
"definevolumeflags" +
1252
"definesound" +
1253
"definesound" +
1253
"defineskillname" +
1254
"defineskillname" +
1254
"definequote" +
1255
"definequote" +
1255
"defineprojectile" +
1256
"defineprojectile" +
1256
"definelevelname" +
1257
"definelevelname" +
1257
"definegametype" +
1258
"definegametype" +
1258
"definegamefuncname" +
1259
"definegamefuncname" +
1259
"definecheat" +
1260
"definecheat" +
1260
"define" +
1261
"define" +
1261
"default" +
1262
"default" +
1262
"debug" +
1263
"debug" +
1263
"debris" +
1264
"debris" +
1264
"cstator" +
1265
"cstator" +
1265
"cstat" +
1266
"cstat" +
1266
"count" +
1267
"count" +
1267
"cos" +
1268
"cos" +
1268
"copy" +
1269
"copy" +
1269
"cmenu" +
1270
"cmenu" +
1270
"clipmovenoslide" +
1271
"clipmovenoslide" +
1271
"clipmove" +
1272
"clipmove" +
1272
"clipdist" +
1273
"clipdist" +
1273
"clearmapstate" +
1274
"clearmapstate" +
1274
"checkavailweapon" +
1275
"checkavailweapon" +
1275
"checkavailinven" +
1276
"checkavailinven" +
1276
"checkactivatormotion" +
1277
"checkactivatormotion" +
1277
"cheatkeys" +
1278
"cheatkeys" +
1278
"changespritestat" +
1279
"changespritestat" +
1279
"changespritesect" +
1280
"changespritesect" +
1280
"case" +
1281
"case" +
1281
"canseespr" +
1282
"canseespr" +
1282
"cansee" +
1283
"cansee" +
1283
"calchypotenuse" +
1284
"calchypotenuse" +
1284
"cactor" +
1285
"cactor" +
1285
"break" +
1286
"break" +
1286
"betaname" +
1287
"betaname" +
1287
"angoffvar" +
1288
"angoffvar" +
1288
"angoff" +
1289
"angoff" +
1289
"andvarvar" +
1290
"andvarvar" +
1290
"andvar" +
1291
"andvar" +
1291
"ai" +
1292
"ai" +
1292
"addweaponvar" +
1293
"addweaponvar" +
1293
"addweapon" +
1294
"addweapon" +
1294
"addvarvar" +
1295
"addvarvar" +
1295
"addvar" +
1296
"addvar" +
1296
"addstrength" +
1297
"addstrength" +
1297
"addphealth" +
1298
"addphealth" +
1298
"addlogvar" +
1299
"addlogvar" +
1299
"addlog" +
1300
"addlog" +
1300
"addkills" +
1301
"addkills" +
1301
"addinventory" +
1302
"addinventory" +
1302
"addammo" +
1303
"addammo" +
1303
"actor" +
1304
"actor" +
1304
"activatecheat" +
1305
"activatecheat" +
1305
"activatebysector" +
1306
"activatebysector" +
1306
"activate" +
1307
"activate" +
1307
"action" +
1308
"action" +
1308
lpeg.P(false)
1309
lpeg.P(false)
1309
 
1310