Subversion Repositories eduke32

Rev

Rev 4567 | Details | Compare with Previous | Last modification | View Log | RSS feed

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