Subversion Repositories eduke32

Rev

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