Subversion Repositories eduke32

Rev

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