Subversion Repositories eduke32

Rev

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