Subversion Repositories eduke32

Rev

Rev 4970 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4970 Rev 4977
1
//-------------------------------------------------------------------------
1
//-------------------------------------------------------------------------
2
/*
2
/*
3
Copyright (C) 2010 EDuke32 developers and contributors
3
Copyright (C) 2010 EDuke32 developers and contributors
4

4

5
This file is part of EDuke32.
5
This file is part of EDuke32.
6

6

7
EDuke32 is free software; you can redistribute it and/or
7
EDuke32 is free software; you can redistribute it and/or
8
modify it under the terms of the GNU General Public License version 2
8
modify it under the terms of the GNU General Public License version 2
9
as published by the Free Software Foundation.
9
as published by the Free Software Foundation.
10

10

11
This program is distributed in the hope that it will be useful,
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14

14

15
See the GNU General Public License for more details.
15
See the GNU General Public License for more details.
16

16

17
You should have received a copy of the GNU General Public License
17
You should have received a copy of the GNU General Public License
18
along with this program; if not, write to the Free Software
18
along with this program; if not, write to the Free Software
19
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20
*/
20
*/
21
//-------------------------------------------------------------------------
21
//-------------------------------------------------------------------------
22
22
23
#include "duke3d.h"
23
#include "duke3d.h"
24
#include "namesdyn.h"
24
#include "namesdyn.h"
25
#include "gamedef.h"
25
#include "gamedef.h"
26
#include "gameexec.h"
26
#include "gameexec.h"
27
#include "savegame.h"
27
#include "savegame.h"
28
#include "common.h"
28
#include "common.h"
29
#include "common_game.h"
29
#include "common_game.h"
30
30
31
#include "osd.h"
31
#include "osd.h"
32
32
33
#ifdef _WIN32
33
#ifdef _WIN32
34
#define WIN32_LEAN_AND_MEAN
34
#define WIN32_LEAN_AND_MEAN
35
#include <windows.h>
35
#include <windows.h>
36
#include <shellapi.h>
36
#include <shellapi.h>
37
#endif
37
#endif
38
38
39
#define NUMKEYWORDS (int32_t)ARRAY_SIZE(keyw)
39
#define NUMKEYWORDS (int32_t)ARRAY_SIZE(keyw)
40
40
41
int32_t g_scriptVersion = 13; // 13 = 1.3D-style CON files, 14 = 1.4/1.5 style CON files
41
int32_t g_scriptVersion = 13; // 13 = 1.3D-style CON files, 14 = 1.4/1.5 style CON files
42
uint32_t g_scriptDateVersion = 99999999;  // YYYYMMDD
42
uint32_t g_scriptDateVersion = 99999999;  // YYYYMMDD
43
#if !defined LUNATIC
43
#if !defined LUNATIC
44
static uint32_t g_scriptLastKeyword; // = NUMKEYWORDS-1;
44
static uint32_t g_scriptLastKeyword; // = NUMKEYWORDS-1;
45
45
46
#define NUMKEYWDATES (int32_t)ARRAY_SIZE(g_keywdate)
46
#define NUMKEYWDATES (int32_t)ARRAY_SIZE(g_keywdate)
47
// { keyw, date } means that at the date, all keywords up to keyw inclusive are available
47
// { keyw, date } means that at the date, all keywords up to keyw inclusive are available
48
static struct { uint32_t keyw; uint32_t date; } g_keywdate[] =
48
static struct { uint32_t keyw; uint32_t date; } g_keywdate[] =
49
{
49
{
50
    // beginning of eduke32 svn
50
    // beginning of eduke32 svn
51
    { CON_CANSEE, 20060423 },    
51
    { CON_CANSEE, 20060423 },    
52
    { CON_CANSEESPR, 20060424 },
52
    { CON_CANSEESPR, 20060424 },
53
    // some stuff here not representable this way
53
    // some stuff here not representable this way
54
    { CON_FINDNEARSPRITEZVAR, 20060516 },
54
    { CON_FINDNEARSPRITEZVAR, 20060516 },
55
    { CON_EZSHOOT, 20060701 },
55
    { CON_EZSHOOT, 20060701 },
56
    { CON_EZSHOOTVAR, 20060822 },
56
    { CON_EZSHOOTVAR, 20060822 },
57
    { CON_JUMP, 20060828 },
57
    { CON_JUMP, 20060828 },
58
    { CON_QSTRLEN, 20060930 },
58
    { CON_QSTRLEN, 20060930 },
59
    { CON_QUAKE, 20070105 },
59
    { CON_QUAKE, 20070105 },
60
    { CON_SHOWVIEW, 20070208 },
60
    { CON_SHOWVIEW, 20070208 },
61
    { CON_NEXTSPRITESECT, 20070819 },
61
    { CON_NEXTSPRITESECT, 20070819 },
62
    { CON_GETKEYNAME, 20071024 },  // keyw numbers have been
62
    { CON_GETKEYNAME, 20071024 },  // keyw numbers have been
63
    { CON_SPRITENOPAL, 20071220 }, // shuffled around here
63
    { CON_SPRITENOPAL, 20071220 }, // shuffled around here
64
    { CON_HITRADIUSVAR, 20080216 },
64
    { CON_HITRADIUSVAR, 20080216 },
65
    { CON_ROTATESPRITE16, 20080314 },
65
    { CON_ROTATESPRITE16, 20080314 },
66
    { CON_SETARRAY, 20080401 },
66
    { CON_SETARRAY, 20080401 },
67
    { CON_READARRAYFROMFILE, 20080405 },
67
    { CON_READARRAYFROMFILE, 20080405 },
68
    { CON_STARTTRACKVAR, 20080510 },
68
    { CON_STARTTRACKVAR, 20080510 },
69
    { CON_QGETSYSSTR, 20080709 },
69
    { CON_QGETSYSSTR, 20080709 },
70
    { CON_GETTICKS, 20080711 },
70
    { CON_GETTICKS, 20080711 },
71
    { CON_SETTSPR, 20080713 },
71
    { CON_SETTSPR, 20080713 },
72
    { CON_CLEARMAPSTATE, 20080716 },
72
    { CON_CLEARMAPSTATE, 20080716 },
73
    { CON_SCRIPTSIZE, 20080720 },
73
    { CON_SCRIPTSIZE, 20080720 },
74
    { CON_SETGAMENAME, 20080722 },
74
    { CON_SETGAMENAME, 20080722 },
75
    { CON_CMENU, 20080725 },
75
    { CON_CMENU, 20080725 },
76
    { CON_GETTIMEDATE, 20080809 },
76
    { CON_GETTIMEDATE, 20080809 },
77
    { CON_ACTIVATECHEAT, 20080810 },
77
    { CON_ACTIVATECHEAT, 20080810 },
78
    { CON_SETGAMEPALETTE, 20080816 },
78
    { CON_SETGAMEPALETTE, 20080816 },
79
    { CON_SETCFGNAME, 20080817 },
79
    { CON_SETCFGNAME, 20080817 },
80
    { CON_IFVARVAREITHER, 20080907 },
80
    { CON_IFVARVAREITHER, 20080907 },
81
    { CON_SAVENN, 20080915 },
81
    { CON_SAVENN, 20080915 },
82
    { CON_COPY, 20090219 },
82
    { CON_COPY, 20090219 },
83
//    { CON_INV, 20090619 },
83
//    { CON_INV, 20090619 },
84
    { CON_QSTRNCAT, 20090712 },
84
    { CON_QSTRNCAT, 20090712 },
85
    { CON_STOPACTORSOUND, 20090715 },
85
    { CON_STOPACTORSOUND, 20090715 },
86
    { CON_IFSERVER, 20100722 },
86
    { CON_IFSERVER, 20100722 },
87
    { CON_CALCHYPOTENUSE, 20100927 },
87
    { CON_CALCHYPOTENUSE, 20100927 },
88
    { CON_CLIPMOVENOSLIDE, 20101009 },
88
    { CON_CLIPMOVENOSLIDE, 20101009 },
89
    { CON_INCLUDEDEFAULT, 20110615 },
89
    { CON_INCLUDEDEFAULT, 20110615 },
90
    { CON_SETACTORSOUNDPITCH, 20111102 },
90
    { CON_SETACTORSOUNDPITCH, 20111102 },
91
    { CON_ECHO, 20120304 },
91
    { CON_ECHO, 20120304 },
92
    { CON_SHOWVIEWUNBIASED, 20120331 },
92
    { CON_SHOWVIEWUNBIASED, 20120331 },
93
    { CON_ROTATESPRITEA, 20130324 },
93
    { CON_ROTATESPRITEA, 20130324 },
94
    { CON_ACTIVATE, 20130522 },
94
    { CON_ACTIVATE, 20130522 },
95
    { CON_SCREENTEXT, 20130529 },
95
    { CON_SCREENTEXT, 20130529 },
96
    { CON_DYNAMICSOUNDREMAP, 20130530 },
96
    { CON_DYNAMICSOUNDREMAP, 20130530 },
97
    { CON_SCREENSOUND, 20130628 },
97
    { CON_SCREENSOUND, 20130628 },
98
    { CON_SETMUSICPOSITION, 20150115 },
98
    { CON_SETMUSICPOSITION, 20150115 },
99
};
99
};
100
#endif
100
#endif
101
101
102
char g_szScriptFileName[BMAX_PATH] = "(none)";  // file we're currently compiling
102
char g_szScriptFileName[BMAX_PATH] = "(none)";  // file we're currently compiling
103
103
104
int32_t g_totalLines,g_lineNumber;
104
int32_t g_totalLines,g_lineNumber;
105
char g_szBuf[1024];
105
char g_szBuf[1024];
106
106
107
#if !defined LUNATIC
107
#if !defined LUNATIC
108
static char g_szCurrentBlockName[256] = "(none)", g_szLastBlockName[256] = "NULL";
108
static char g_szCurrentBlockName[256] = "(none)", g_szLastBlockName[256] = "NULL";
109
static int32_t g_checkingIfElse, g_processingState, g_lastKeyword = -1;
109
static int32_t g_checkingIfElse, g_processingState, g_lastKeyword = -1;
110
110
111
// The pointer to the start of the case table in a switch statement.
111
// The pointer to the start of the case table in a switch statement.
112
// First entry is 'default' code.
112
// First entry is 'default' code.
113
static intptr_t *g_caseScriptPtr=NULL;
113
static intptr_t *g_caseScriptPtr=NULL;
114
static intptr_t *previous_event=NULL;
114
static intptr_t *previous_event=NULL;
115
static int32_t g_numCases = 0;
115
static int32_t g_numCases = 0;
116
static int32_t g_checkingSwitch = 0, g_currentEvent = -1;
116
static int32_t g_checkingSwitch = 0, g_currentEvent = -1;
117
static int32_t g_labelsOnly = 0, g_skipKeywordCheck = 0, g_dynamicTileMapping = 0, g_dynamicSoundMapping = 0;
117
static int32_t g_labelsOnly = 0, g_skipKeywordCheck = 0, g_dynamicTileMapping = 0, g_dynamicSoundMapping = 0;
118
static int32_t g_numBraces = 0;
118
static int32_t g_numBraces = 0;
119
119
120
static int32_t C_ParseCommand(int32_t loop);
120
static int32_t C_ParseCommand(int32_t loop);
121
static int32_t C_SetScriptSize(int32_t size);
121
static int32_t C_SetScriptSize(int32_t size);
122
#endif
122
#endif
123
123
124
int32_t g_numQuoteRedefinitions = 0;
124
int32_t g_numQuoteRedefinitions = 0;
125
125
126
#ifdef LUNATIC
126
#ifdef LUNATIC
127
weapondata_t g_playerWeapon[MAXPLAYERS][MAX_WEAPONS];
127
weapondata_t g_playerWeapon[MAXPLAYERS][MAX_WEAPONS];
128
#endif
128
#endif
129
129
130
#if !defined LUNATIC
130
#if !defined LUNATIC
131
static intptr_t *g_parsingEventPtr=NULL;
131
static intptr_t *g_parsingEventPtr=NULL;
132
static char *textptr;
132
static char *textptr;
133
#endif
133
#endif
134
134
135
int32_t g_numCompilerErrors,g_numCompilerWarnings;
135
int32_t g_numCompilerErrors,g_numCompilerWarnings;
136
136
137
extern int32_t g_maxSoundPos;
137
extern int32_t g_maxSoundPos;
138
138
139
enum
139
enum
140
{
140
{
141
    LABEL_ANY    = -1,
141
    LABEL_ANY    = -1,
142
    LABEL_DEFINE = 1,
142
    LABEL_DEFINE = 1,
143
    LABEL_STATE  = 2,
143
    LABEL_STATE  = 2,
144
    LABEL_ACTOR  = 4,
144
    LABEL_ACTOR  = 4,
145
    LABEL_ACTION = 8,
145
    LABEL_ACTION = 8,
146
    LABEL_AI     = 16,
146
    LABEL_AI     = 16,
147
    LABEL_MOVE   = 32,
147
    LABEL_MOVE   = 32,
148
};
148
};
149
149
150
#if !defined LUNATIC
150
#if !defined LUNATIC
151
static const char *C_GetLabelType(int32_t type)
151
static const char *C_GetLabelType(int32_t type)
152
{
152
{
153
    int32_t i;
153
    int32_t i;
154
    char x[64];
154
    char x[64];
155
155
156
    const char *LabelTypeText[] =
156
    const char *LabelTypeText[] =
157
    {
157
    {
158
        "define",
158
        "define",
159
        "state",
159
        "state",
160
        "actor",
160
        "actor",
161
        "action",
161
        "action",
162
        "ai",
162
        "ai",
163
        "move"
163
        "move"
164
    };
164
    };
165
165
166
    x[0] = 0;
166
    x[0] = 0;
167
    for (i=0; i<6; i++)
167
    for (i=0; i<6; i++)
168
    {
168
    {
169
        if (!(type & (1<<i))) continue;
169
        if (!(type & (1<<i))) continue;
170
        if (x[0]) Bstrcat(x, " or ");
170
        if (x[0]) Bstrcat(x, " or ");
171
        Bstrcat(x, LabelTypeText[i]);
171
        Bstrcat(x, LabelTypeText[i]);
172
    }
172
    }
173
173
174
    return Xstrdup(x);
174
    return Xstrdup(x);
175
}
175
}
176
176
177
177
178
const char *keyw[] =
178
const char *keyw[] =
179
{
179
{
180
    "definelevelname",          // 0  defines level name
180
    "definelevelname",          // 0  defines level name
181
    "actor",                    // 1  defines an actor
181
    "actor",                    // 1  defines an actor
182
    "addammo",                  // 2  adds ammo to a weapon
182
    "addammo",                  // 2  adds ammo to a weapon
183
    "ifrnd",                    // 3  checks against a randomizer
183
    "ifrnd",                    // 3  checks against a randomizer
184
    "enda",                     // 4  ends an actor definition
184
    "enda",                     // 4  ends an actor definition
185
    "ifcansee",                 // 5  checks if the player can see an object
185
    "ifcansee",                 // 5  checks if the player can see an object
186
    "ifhitweapon",              // 6  checks if an object was hit by a weapon
186
    "ifhitweapon",              // 6  checks if an object was hit by a weapon
187
    "action",                   // 7  defines an action if used outside a state or actor, otherwise triggers actor to perform action
187
    "action",                   // 7  defines an action if used outside a state or actor, otherwise triggers actor to perform action
188
    "ifpdistl",                 // 8  checks if player distance is less than value
188
    "ifpdistl",                 // 8  checks if player distance is less than value
189
    "ifpdistg",                 // 9  checks if player distance is more than value
189
    "ifpdistg",                 // 9  checks if player distance is more than value
190
    "else",                     // 10 used with if checks
190
    "else",                     // 10 used with if checks
191
    "strength",                 // 11 sets health
191
    "strength",                 // 11 sets health
192
    "break",                    // 12 stops processing
192
    "break",                    // 12 stops processing
193
    "shoot",                    // 13 shoots a projectile
193
    "shoot",                    // 13 shoots a projectile
194
    "palfrom",                  // 14 used for player screen shading effect, sets p->pals
194
    "palfrom",                  // 14 used for player screen shading effect, sets p->pals
195
    "sound",                    // 15 plays a sound that was defined with definesound
195
    "sound",                    // 15 plays a sound that was defined with definesound
196
    "fall",                     // 16 causes actor to fall to sector floor height
196
    "fall",                     // 16 causes actor to fall to sector floor height
197
    "state",                    // 17 begins defining a state if used outside a state or actor, otherwise calls a state
197
    "state",                    // 17 begins defining a state if used outside a state or actor, otherwise calls a state
198
    "ends",                     // 18 ends defining a state
198
    "ends",                     // 18 ends defining a state
199
    "define",                   // 19 defines a value
199
    "define",                   // 19 defines a value
200
    "return",                   // 20
200
    "return",                   // 20
201
    "ifai",                     // 21 checks if actor is currently performing a specific ai function
201
    "ifai",                     // 21 checks if actor is currently performing a specific ai function
202
    "killit",                   // 22 kills an actor
202
    "killit",                   // 22 kills an actor
203
    "addweapon",                // 23 adds a weapon to the closest player
203
    "addweapon",                // 23 adds a weapon to the closest player
204
    "ai",                       // 24 sets an ai function to be used by an actor
204
    "ai",                       // 24 sets an ai function to be used by an actor
205
    "addphealth",               // 25 adds health to the player
205
    "addphealth",               // 25 adds health to the player
206
    "ifdead",                   // 26 checks if actor is dead
206
    "ifdead",                   // 26 checks if actor is dead
207
    "ifsquished",               // 27 checks if actor has been squished
207
    "ifsquished",               // 27 checks if actor has been squished
208
    "sizeto",                   // 28 gradually increases actor size until it matches parameters given
208
    "sizeto",                   // 28 gradually increases actor size until it matches parameters given
209
    "{",                        // 29 used to indicate segments of code
209
    "{",                        // 29 used to indicate segments of code
210
    "}",                        // 30 used to indicate segments of code
210
    "}",                        // 30 used to indicate segments of code
211
    "spawn",                    // 31 spawns an actor
211
    "spawn",                    // 31 spawns an actor
212
    "move",                     // 32
212
    "move",                     // 32
213
    "ifwasweapon",              // 33
213
    "ifwasweapon",              // 33
214
    "ifaction",                 // 34
214
    "ifaction",                 // 34
215
    "ifactioncount",            // 35
215
    "ifactioncount",            // 35
216
    "resetactioncount",         // 36
216
    "resetactioncount",         // 36
217
    "debris",                   // 37
217
    "debris",                   // 37
218
    "pstomp",                   // 38
218
    "pstomp",                   // 38
219
    "<null>",                   // 39 was previously used to define the start of a comment block
219
    "<null>",                   // 39 was previously used to define the start of a comment block
220
    "cstat",                    // 40
220
    "cstat",                    // 40
221
    "ifmove",                   // 41
221
    "ifmove",                   // 41
222
    "resetplayer",              // 42
222
    "resetplayer",              // 42
223
    "ifonwater",                // 43
223
    "ifonwater",                // 43
224
    "ifinwater",                // 44
224
    "ifinwater",                // 44
225
    "ifcanshoottarget",         // 45
225
    "ifcanshoottarget",         // 45
226
    "ifcount",                  // 46
226
    "ifcount",                  // 46
227
    "resetcount",               // 47
227
    "resetcount",               // 47
228
    "addinventory",             // 48
228
    "addinventory",             // 48
229
    "ifactornotstayput",        // 49
229
    "ifactornotstayput",        // 49
230
    "hitradius",                // 50
230
    "hitradius",                // 50
231
    "ifp",                      // 51
231
    "ifp",                      // 51
232
    "count",                    // 52
232
    "count",                    // 52
233
    "ifactor",                  // 53
233
    "ifactor",                  // 53
234
    "music",                    // 54
234
    "music",                    // 54
235
    "include",                  // 55
235
    "include",                  // 55
236
    "ifstrength",               // 56
236
    "ifstrength",               // 56
237
    "definesound",              // 57
237
    "definesound",              // 57
238
    "guts",                     // 58
238
    "guts",                     // 58
239
    "ifspawnedby",              // 59
239
    "ifspawnedby",              // 59
240
    "gamestartup",              // 60
240
    "gamestartup",              // 60
241
    "wackplayer",               // 61
241
    "wackplayer",               // 61
242
    "ifgapzl",                  // 62
242
    "ifgapzl",                  // 62
243
    "ifhitspace",               // 63
243
    "ifhitspace",               // 63
244
    "ifoutside",                // 64
244
    "ifoutside",                // 64
245
    "ifmultiplayer",            // 65
245
    "ifmultiplayer",            // 65
246
    "operate",                  // 66
246
    "operate",                  // 66
247
    "ifinspace",                // 67
247
    "ifinspace",                // 67
248
    "debug",                    // 68
248
    "debug",                    // 68
249
    "endofgame",                // 69
249
    "endofgame",                // 69
250
    "ifbulletnear",             // 70
250
    "ifbulletnear",             // 70
251
    "ifrespawn",                // 71
251
    "ifrespawn",                // 71
252
    "iffloordistl",             // 72
252
    "iffloordistl",             // 72
253
    "ifceilingdistl",           // 73
253
    "ifceilingdistl",           // 73
254
    "spritepal",                // 74
254
    "spritepal",                // 74
255
    "ifpinventory",             // 75
255
    "ifpinventory",             // 75
256
    "betaname",                 // 76
256
    "betaname",                 // 76
257
    "cactor",                   // 77
257
    "cactor",                   // 77
258
    "ifphealthl",               // 78
258
    "ifphealthl",               // 78
259
    "definequote",              // 79
259
    "definequote",              // 79
260
    "quote",                    // 80
260
    "quote",                    // 80
261
    "ifinouterspace",           // 81
261
    "ifinouterspace",           // 81
262
    "ifnotmoving",              // 82
262
    "ifnotmoving",              // 82
263
    "respawnhitag",             // 83
263
    "respawnhitag",             // 83
264
    "tip",                      // 84
264
    "tip",                      // 84
265
    "ifspritepal",              // 85
265
    "ifspritepal",              // 85
266
    "money",                    // 86
266
    "money",                    // 86
267
    "soundonce",                // 87
267
    "soundonce",                // 87
268
    "addkills",                 // 88
268
    "addkills",                 // 88
269
    "stopsound",                // 89
269
    "stopsound",                // 89
270
    "ifawayfromwall",           // 90
270
    "ifawayfromwall",           // 90
271
    "ifcanseetarget",           // 91
271
    "ifcanseetarget",           // 91
272
    "globalsound",              // 92
272
    "globalsound",              // 92
273
    "lotsofglass",              // 93
273
    "lotsofglass",              // 93
274
    "ifgotweaponce",            // 94
274
    "ifgotweaponce",            // 94
275
    "getlastpal",               // 95
275
    "getlastpal",               // 95
276
    "pkick",                    // 96
276
    "pkick",                    // 96
277
    "mikesnd",                  // 97
277
    "mikesnd",                  // 97
278
    "useractor",                // 98
278
    "useractor",                // 98
279
    "sizeat",                   // 99
279
    "sizeat",                   // 99
280
    "addstrength",              // 100  [#]
280
    "addstrength",              // 100  [#]
281
    "cstator",                  // 101
281
    "cstator",                  // 101
282
    "mail",                     // 102
282
    "mail",                     // 102
283
    "paper",                    // 103
283
    "paper",                    // 103
284
    "tossweapon",               // 104
284
    "tossweapon",               // 104
285
    "sleeptime",                // 105
285
    "sleeptime",                // 105
286
    "nullop",                   // 106
286
    "nullop",                   // 106
287
    "definevolumename",         // 107
287
    "definevolumename",         // 107
288
    "defineskillname",          // 108
288
    "defineskillname",          // 108
289
    "ifnosounds",               // 109
289
    "ifnosounds",               // 109
290
    "clipdist",                 // 110
290
    "clipdist",                 // 110
291
    "ifangdiffl",               // 111  Last Duke3D 1.5 CON command
291
    "ifangdiffl",               // 111  Last Duke3D 1.5 CON command
292
    "gamevar",                  // 112
292
    "gamevar",                  // 112
293
    "ifvarl",                   // 113
293
    "ifvarl",                   // 113
294
    "ifvarg",                   // 114
294
    "ifvarg",                   // 114
295
    "setvarvar",                // 115
295
    "setvarvar",                // 115
296
    "setvar",                   // 116
296
    "setvar",                   // 116
297
    "addvarvar",                // 117
297
    "addvarvar",                // 117
298
    "addvar",                   // 118
298
    "addvar",                   // 118
299
    "ifvarvarl",                // 119
299
    "ifvarvarl",                // 119
300
    "ifvarvarg",                // 120
300
    "ifvarvarg",                // 120
301
    "addlogvar",                // 121
301
    "addlogvar",                // 121
302
    "addlog",                   // 122
302
    "addlog",                   // 122
303
    "onevent",                  // 123
303
    "onevent",                  // 123
304
    "endevent",                 // 124
304
    "endevent",                 // 124
305
    "ifvare",                   // 125
305
    "ifvare",                   // 125
306
    "ifvarvare",                // 126
306
    "ifvarvare",                // 126
307
    "spgetlotag",               // 127
307
    "spgetlotag",               // 127
308
    "spgethitag",               // 128
308
    "spgethitag",               // 128
309
    "sectgetlotag",             // 129
309
    "sectgetlotag",             // 129
310
    "sectgethitag",             // 130
310
    "sectgethitag",             // 130
311
    "ifsound",                  // 131
311
    "ifsound",                  // 131
312
    "gettexturefloor",          // 132
312
    "gettexturefloor",          // 132
313
    "gettextureceiling",        // 133
313
    "gettextureceiling",        // 133
314
    "inittimer",                // 134
314
    "inittimer",                // 134
315
    "starttrack",               // 135
315
    "starttrack",               // 135
316
    "randvar",                  // 136
316
    "randvar",                  // 136
317
    "enhanced",                 // 137
317
    "enhanced",                 // 137
318
    "getangletotarget",         // 138
318
    "getangletotarget",         // 138
319
    "getactorangle",            // 139
319
    "getactorangle",            // 139
320
    "setactorangle",            // 140
320
    "setactorangle",            // 140
321
    "mulvar",                   // 141
321
    "mulvar",                   // 141
322
    "mulvarvar",                // 142
322
    "mulvarvar",                // 142
323
    "divvar",                   // 143
323
    "divvar",                   // 143
324
    "divvarvar",                // 144
324
    "divvarvar",                // 144
325
    "modvar",                   // 145
325
    "modvar",                   // 145
326
    "modvarvar",                // 146
326
    "modvarvar",                // 146
327
    "andvar",                   // 147
327
    "andvar",                   // 147
328
    "andvarvar",                // 148
328
    "andvarvar",                // 148
329
    "orvar",                    // 149
329
    "orvar",                    // 149
330
    "orvarvar",                 // 150
330
    "orvarvar",                 // 150
331
    "getplayerangle",           // 151
331
    "getplayerangle",           // 151
332
    "setplayerangle",           // 152
332
    "setplayerangle",           // 152
333
    "lockplayer",               // 153
333
    "lockplayer",               // 153
334
    "setsector",                // 154
334
    "setsector",                // 154
335
    "getsector",                // 155
335
    "getsector",                // 155
336
    "setactor",                 // 156
336
    "setactor",                 // 156
337
    "getactor",                 // 157
337
    "getactor",                 // 157
338
    "setwall",                  // 158
338
    "setwall",                  // 158
339
    "getwall",                  // 159
339
    "getwall",                  // 159
340
    "findnearactor",            // 160
340
    "findnearactor",            // 160
341
    "findnearactorvar",         // 161
341
    "findnearactorvar",         // 161
342
    "setactorvar",              // 162
342
    "setactorvar",              // 162
343
    "getactorvar",              // 163
343
    "getactorvar",              // 163
344
    "espawn",                   // 164
344
    "espawn",                   // 164
345
    "getplayer",                // 165
345
    "getplayer",                // 165
346
    "setplayer",                // 166
346
    "setplayer",                // 166
347
    "sqrt",                     // 167
347
    "sqrt",                     // 167
348
    "eventloadactor",           // 168
348
    "eventloadactor",           // 168
349
    "espawnvar",                // 169
349
    "espawnvar",                // 169
350
    "getuserdef",               // 170
350
    "getuserdef",               // 170
351
    "setuserdef",               // 171
351
    "setuserdef",               // 171
352
    "subvarvar",                // 172
352
    "subvarvar",                // 172
353
    "subvar",                   // 173
353
    "subvar",                   // 173
354
    "ifvarn",                   // 174
354
    "ifvarn",                   // 174
355
    "ifvarvarn",                // 175
355
    "ifvarvarn",                // 175
356
    "ifvarand",                 // 176
356
    "ifvarand",                 // 176
357
    "ifvarvarand",              // 177
357
    "ifvarvarand",              // 177
358
    "myos",                     // 178
358
    "myos",                     // 178
359
    "myospal",                  // 179
359
    "myospal",                  // 179
360
    "displayrand",              // 180
360
    "displayrand",              // 180
361
    "sin",                      // 181
361
    "sin",                      // 181
362
    "xorvarvar",                // 182
362
    "xorvarvar",                // 182
363
    "xorvar",                   // 183
363
    "xorvar",                   // 183
364
    "randvarvar",               // 184
364
    "randvarvar",               // 184
365
    "myosx",                    // 185
365
    "myosx",                    // 185
366
    "myospalx",                 // 186
366
    "myospalx",                 // 186
367
    "gmaxammo",                 // 187
367
    "gmaxammo",                 // 187
368
    "smaxammo",                 // 188
368
    "smaxammo",                 // 188
369
    "startlevel",               // 189
369
    "startlevel",               // 189
370
    "eshoot",                   // 190
370
    "eshoot",                   // 190
371
    "qspawn",                   // 191
371
    "qspawn",                   // 191
372
    "rotatesprite",             // 192
372
    "rotatesprite",             // 192
373
    "defineprojectile",         // 193
373
    "defineprojectile",         // 193
374
    "spriteshadow",             // 194
374
    "spriteshadow",             // 194
375
    "cos",                      // 195
375
    "cos",                      // 195
376
    "eshootvar",                // 196
376
    "eshootvar",                // 196
377
    "findnearactor3d",          // 197
377
    "findnearactor3d",          // 197
378
    "findnearactor3dvar",       // 198
378
    "findnearactor3dvar",       // 198
379
    "flash",                    // 199
379
    "flash",                    // 199
380
    "qspawnvar",                // 200
380
    "qspawnvar",                // 200
381
    "eqspawn",                  // 201
381
    "eqspawn",                  // 201
382
    "eqspawnvar",               // 202
382
    "eqspawnvar",               // 202
383
    "minitext",                 // 203
383
    "minitext",                 // 203
384
    "gametext",                 // 204
384
    "gametext",                 // 204
385
    "digitalnumber",            // 205
385
    "digitalnumber",            // 205
386
    "addweaponvar",             // 206
386
    "addweaponvar",             // 206
387
    "setprojectile",            // 207
387
    "setprojectile",            // 207
388
    "angoff",                   // 208
388
    "angoff",                   // 208
389
    "updatesector",             // 209
389
    "updatesector",             // 209
390
    "insertspriteq",            // 210
390
    "insertspriteq",            // 210
391
    "angoffvar",                // 211
391
    "angoffvar",                // 211
392
    "whilevarn",                // 212
392
    "whilevarn",                // 212
393
    "switch",                   // 213
393
    "switch",                   // 213
394
    "case",                     // 214
394
    "case",                     // 214
395
    "default",                  // 215
395
    "default",                  // 215
396
    "endswitch",                // 216
396
    "endswitch",                // 216
397
    "shootvar",                 // 217
397
    "shootvar",                 // 217
398
    "soundvar",                 // 218
398
    "soundvar",                 // 218
399
    "findplayer",               // 219
399
    "findplayer",               // 219
400
    "findotherplayer",          // 220
400
    "findotherplayer",          // 220
401
    "activatebysector",         // 221 sectnum, spriteid
401
    "activatebysector",         // 221 sectnum, spriteid
402
    "operatesectors",           // 222 sectnum, spriteid
402
    "operatesectors",           // 222 sectnum, spriteid
403
    "operaterespawns",          // 223 lotag
403
    "operaterespawns",          // 223 lotag
404
    "operateactivators",        // 224 lotag, player index
404
    "operateactivators",        // 224 lotag, player index
405
    "operatemasterswitches",    // 225 lotag
405
    "operatemasterswitches",    // 225 lotag
406
    "checkactivatormotion",     // 226 lotag
406
    "checkactivatormotion",     // 226 lotag
407
    "zshoot",                   // 227 zvar projnum
407
    "zshoot",                   // 227 zvar projnum
408
    "dist",                     // 228 sprite1 sprite2
408
    "dist",                     // 228 sprite1 sprite2
409
    "ldist",                    // 229 sprite1 sprite2
409
    "ldist",                    // 229 sprite1 sprite2
410
    "shiftvarl",                // 230
410
    "shiftvarl",                // 230
411
    "shiftvarr",                // 231
411
    "shiftvarr",                // 231
412
    "spritenvg",                // 232
412
    "spritenvg",                // 232
413
    "getangle",                 // 233
413
    "getangle",                 // 233
414
    "whilevarvarn",             // 234
414
    "whilevarvarn",             // 234
415
    "hitscan",                  // 235
415
    "hitscan",                  // 235
416
    "time",                     // 236
416
    "time",                     // 236
417
    "getplayervar",             // 237
417
    "getplayervar",             // 237
418
    "setplayervar",             // 238
418
    "setplayervar",             // 238
419
    "mulscale",                 // 239
419
    "mulscale",                 // 239
420
    "setaspect",                // 240
420
    "setaspect",                // 240
421
    "ezshoot",                  // 241
421
    "ezshoot",                  // 241
422
    "spritenoshade",            // 242
422
    "spritenoshade",            // 242
423
    "movesprite",               // 243
423
    "movesprite",               // 243
424
    "checkavailweapon",         // 244
424
    "checkavailweapon",         // 244
425
    "soundoncevar",             // 245
425
    "soundoncevar",             // 245
426
    "updatesectorz",            // 246
426
    "updatesectorz",            // 246
427
    "stopallsounds",            // 247
427
    "stopallsounds",            // 247
428
    "ssp",                      // 248
428
    "ssp",                      // 248
429
    "stopsoundvar",             // 249
429
    "stopsoundvar",             // 249
430
    "displayrandvar",           // 250
430
    "displayrandvar",           // 250
431
    "displayrandvarvar",        // 251
431
    "displayrandvarvar",        // 251
432
    "checkavailinven",          // 252
432
    "checkavailinven",          // 252
433
    "globalsoundvar",           // 253
433
    "globalsoundvar",           // 253
434
    "guniqhudid",               // 254
434
    "guniqhudid",               // 254
435
    "getprojectile",            // 255
435
    "getprojectile",            // 255
436
    "getthisprojectile",        // 256
436
    "getthisprojectile",        // 256
437
    "setthisprojectile",        // 257
437
    "setthisprojectile",        // 257
438
    "definecheat",              // 258
438
    "definecheat",              // 258
439
    "cheatkeys",                // 259
439
    "cheatkeys",                // 259
440
    "userquote",                // 260
440
    "userquote",                // 260
441
    "precache",                 // 261
441
    "precache",                 // 261
442
    "definegamefuncname",       // 262
442
    "definegamefuncname",       // 262
443
    "redefinequote",            // 263
443
    "redefinequote",            // 263
444
    "qsprintf",                 // 264
444
    "qsprintf",                 // 264
445
    "getpname",                 // 265
445
    "getpname",                 // 265
446
    "qstrcat",                  // 266
446
    "qstrcat",                  // 266
447
    "qstrcpy",                  // 267
447
    "qstrcpy",                  // 267
448
    "setsprite",                // 268
448
    "setsprite",                // 268
449
    "rotatepoint",              // 269
449
    "rotatepoint",              // 269
450
    "dragpoint",                // 270
450
    "dragpoint",                // 270
451
    "getzrange",                // 271
451
    "getzrange",                // 271
452
    "changespritestat",         // 272
452
    "changespritestat",         // 272
453
    "getceilzofslope",          // 273
453
    "getceilzofslope",          // 273
454
    "getflorzofslope",          // 274
454
    "getflorzofslope",          // 274
455
    "neartag",                  // 275
455
    "neartag",                  // 275
456
    "definegametype",           // 276
456
    "definegametype",           // 276
457
    "changespritesect",         // 277
457
    "changespritesect",         // 277
458
    "spriteflags",              // 278
458
    "spriteflags",              // 278
459
    "savegamevar",              // 279
459
    "savegamevar",              // 279
460
    "readgamevar",              // 280
460
    "readgamevar",              // 280
461
    "findnearsprite",           // 281
461
    "findnearsprite",           // 281
462
    "findnearspritevar",        // 282
462
    "findnearspritevar",        // 282
463
    "findnearsprite3d",         // 283
463
    "findnearsprite3d",         // 283
464
    "findnearsprite3dvar",      // 284
464
    "findnearsprite3dvar",      // 284
465
    "dynamicremap",             // 285
465
    "dynamicremap",             // 285
466
    "setinput",                 // 286
466
    "setinput",                 // 286
467
    "getinput",                 // 287
467
    "getinput",                 // 287
468
    "save",                     // 288
468
    "save",                     // 288
469
    "cansee",                   // 289  Beginning EDuke32 SVN
469
    "cansee",                   // 289  Beginning EDuke32 SVN
470
    "canseespr",                // 290
470
    "canseespr",                // 290
471
    "findnearactorz",           // 291
471
    "findnearactorz",           // 291
472
    "findnearactorzvar",        // 292
472
    "findnearactorzvar",        // 292
473
    "findnearspritez",          // 293
473
    "findnearspritez",          // 293
474
    "findnearspritezvar",       // 294
474
    "findnearspritezvar",       // 294
475
    "zshootvar",                // 295
475
    "zshootvar",                // 295
476
    "ezshootvar",               // 296
476
    "ezshootvar",               // 296
477
    "getcurraddress",           // 297
477
    "getcurraddress",           // 297
478
    "jump",                     // 298
478
    "jump",                     // 298
479
    "qstrlen",                  // 299
479
    "qstrlen",                  // 299
480
    "getincangle",              // 300
480
    "getincangle",              // 300
481
    "quake",                    // 301
481
    "quake",                    // 301
482
    "showview",                 // 302
482
    "showview",                 // 302
483
    "headspritestat",           // 303
483
    "headspritestat",           // 303
484
    "prevspritestat",           // 304
484
    "prevspritestat",           // 304
485
    "nextspritestat",           // 305
485
    "nextspritestat",           // 305
486
    "headspritesect",           // 306
486
    "headspritesect",           // 306
487
    "prevspritesect",           // 307
487
    "prevspritesect",           // 307
488
    "nextspritesect",           // 308
488
    "nextspritesect",           // 308
489
    "getkeyname",               // 309
489
    "getkeyname",               // 309
490
    "qsubstr",                  // 310
490
    "qsubstr",                  // 310
491
    "gametextz",                // 311
491
    "gametextz",                // 311
492
    "digitalnumberz",           // 312
492
    "digitalnumberz",           // 312
493
    "spritenopal",              // 313
493
    "spritenopal",              // 313
494
    "hitradiusvar",             // 314
494
    "hitradiusvar",             // 314
495
    "rotatesprite16",           // 315
495
    "rotatesprite16",           // 315
496
    "gamearray",                // 316
496
    "gamearray",                // 316
497
    "setarray",                 // 317
497
    "setarray",                 // 317
498
    "resizearray",              // 318
498
    "resizearray",              // 318
499
    "writearraytofile",         // 319
499
    "writearraytofile",         // 319
500
    "readarrayfromfile",        // 320
500
    "readarrayfromfile",        // 320
501
    "starttrackvar",            // 321
501
    "starttrackvar",            // 321
502
    "qgetsysstr",               // 322
502
    "qgetsysstr",               // 322
503
    "getticks",                 // 323
503
    "getticks",                 // 323
504
    "gettspr",                  // 324
504
    "gettspr",                  // 324
505
    "settspr",                  // 325
505
    "settspr",                  // 325
506
    "savemapstate",             // 326
506
    "savemapstate",             // 326
507
    "loadmapstate",             // 327
507
    "loadmapstate",             // 327
508
    "clearmapstate",            // 328
508
    "clearmapstate",            // 328
509
    "scriptsize",               // 329
509
    "scriptsize",               // 329
510
    "setgamename",              // 330
510
    "setgamename",              // 330
511
    "cmenu",                    // 331
511
    "cmenu",                    // 331
512
    "gettimedate",              // 332
512
    "gettimedate",              // 332
513
    "activatecheat",            // 333
513
    "activatecheat",            // 333
514
    "setgamepalette",           // 334
514
    "setgamepalette",           // 334
515
    "setdefname",               // 335
515
    "setdefname",               // 335
516
    "setcfgname",               // 336
516
    "setcfgname",               // 336
517
    "ifvaror",                  // 337
517
    "ifvaror",                  // 337
518
    "ifvarvaror",               // 338
518
    "ifvarvaror",               // 338
519
    "ifvarxor",                 // 339
519
    "ifvarxor",                 // 339
520
    "ifvarvarxor",              // 340
520
    "ifvarvarxor",              // 340
521
    "ifvareither",              // 341
521
    "ifvareither",              // 341
522
    "ifvarvareither",           // 342
522
    "ifvarvareither",           // 342
523
    "getarraysize",             // 343
523
    "getarraysize",             // 343
524
    "savenn",                   // 344
524
    "savenn",                   // 344
525
    "copy",                     // 345
525
    "copy",                     // 345
526
    "<null>",                   // 346 internal inversion function
526
    "<null>",                   // 346 internal inversion function
527
    "sectorofwall",             // 347
527
    "sectorofwall",             // 347
528
    "qstrncat",                 // 348
528
    "qstrncat",                 // 348
529
    "ifactorsound",             // 349
529
    "ifactorsound",             // 349
530
    "stopactorsound",           // 350
530
    "stopactorsound",           // 350
531
    "ifclient",                 // 351
531
    "ifclient",                 // 351
532
    "ifserver",                 // 352
532
    "ifserver",                 // 352
533
    "sectsetinterpolation",     // 353
533
    "sectsetinterpolation",     // 353
534
    "sectclearinterpolation",   // 354
534
    "sectclearinterpolation",   // 354
535
    "clipmove",                 // 355
535
    "clipmove",                 // 355
536
    "lineintersect",            // 356
536
    "lineintersect",            // 356
537
    "rayintersect",             // 357
537
    "rayintersect",             // 357
538
    "calchypotenuse",           // 358
538
    "calchypotenuse",           // 358
539
    "clipmovenoslide",          // 359
539
    "clipmovenoslide",          // 359
540
    "includedefault",           // 360
540
    "includedefault",           // 360
541
    "setactorsoundpitch",       // 361
541
    "setactorsoundpitch",       // 361
542
    "echo",                     // 362
542
    "echo",                     // 362
543
    "showviewunbiased",         // 363
543
    "showviewunbiased",         // 363
544
    "rotatespritea",            // 364
544
    "rotatespritea",            // 364
545
    "shadeto",                  // 365
545
    "shadeto",                  // 365
546
    "endoflevel",               // 366
546
    "endoflevel",               // 366
547
    "ifplayersl",               // 367
547
    "ifplayersl",               // 367
548
    "activate",                 // 368
548
    "activate",                 // 368
549
    "qstrdim",                  // 369
549
    "qstrdim",                  // 369
550
    "screentext",               // 370
550
    "screentext",               // 370
551
    "dynamicsoundremap",        // 371
551
    "dynamicsoundremap",        // 371
552
    "screensound",              // 372
552
    "screensound",              // 372
553
    "getmusicposition",         // 373
553
    "getmusicposition",         // 373
554
    "setmusicposition",         // 374
554
    "setmusicposition",         // 374
-
 
555
    "undefinevolume",           // 375
-
 
556
    "undefineskill",            // 376
-
 
557
    "undefinelevel",            // 377
555
    "<null>"
558
    "<null>"
556
};
559
};
557
#endif
560
#endif
558
561
559
// KEEPINSYNC with enum GameEvent_t and lunatic/con_lang.lua
562
// KEEPINSYNC with enum GameEvent_t and lunatic/con_lang.lua
560
const char *EventNames[MAXEVENTS] =
563
const char *EventNames[MAXEVENTS] =
561
{
564
{
562
    "EVENT_INIT",
565
    "EVENT_INIT",
563
    "EVENT_ENTERLEVEL",
566
    "EVENT_ENTERLEVEL",
564
    "EVENT_RESETWEAPONS",
567
    "EVENT_RESETWEAPONS",
565
    "EVENT_RESETINVENTORY",
568
    "EVENT_RESETINVENTORY",
566
    "EVENT_HOLSTER",
569
    "EVENT_HOLSTER",
567
    "EVENT_LOOKLEFT",
570
    "EVENT_LOOKLEFT",
568
    "EVENT_LOOKRIGHT",
571
    "EVENT_LOOKRIGHT",
569
    "EVENT_SOARUP",
572
    "EVENT_SOARUP",
570
    "EVENT_SOARDOWN",
573
    "EVENT_SOARDOWN",
571
    "EVENT_CROUCH",
574
    "EVENT_CROUCH",
572
    "EVENT_JUMP",
575
    "EVENT_JUMP",
573
    "EVENT_RETURNTOCENTER",
576
    "EVENT_RETURNTOCENTER",
574
    "EVENT_LOOKUP",
577
    "EVENT_LOOKUP",
575
    "EVENT_LOOKDOWN",
578
    "EVENT_LOOKDOWN",
576
    "EVENT_AIMUP",
579
    "EVENT_AIMUP",
577
    "EVENT_FIRE",
580
    "EVENT_FIRE",
578
    "EVENT_CHANGEWEAPON",
581
    "EVENT_CHANGEWEAPON",
579
    "EVENT_GETSHOTRANGE",
582
    "EVENT_GETSHOTRANGE",
580
    "EVENT_GETAUTOAIMANGLE",
583
    "EVENT_GETAUTOAIMANGLE",
581
    "EVENT_GETLOADTILE",
584
    "EVENT_GETLOADTILE",
582
    "EVENT_CHEATGETSTEROIDS",
585
    "EVENT_CHEATGETSTEROIDS",
583
    "EVENT_CHEATGETHEAT",
586
    "EVENT_CHEATGETHEAT",
584
    "EVENT_CHEATGETBOOT",
587
    "EVENT_CHEATGETBOOT",
585
    "EVENT_CHEATGETSHIELD",
588
    "EVENT_CHEATGETSHIELD",
586
    "EVENT_CHEATGETSCUBA",
589
    "EVENT_CHEATGETSCUBA",
587
    "EVENT_CHEATGETHOLODUKE",
590
    "EVENT_CHEATGETHOLODUKE",
588
    "EVENT_CHEATGETJETPACK",
591
    "EVENT_CHEATGETJETPACK",
589
    "EVENT_CHEATGETFIRSTAID",
592
    "EVENT_CHEATGETFIRSTAID",
590
    "EVENT_QUICKKICK",
593
    "EVENT_QUICKKICK",
591
    "EVENT_INVENTORY",
594
    "EVENT_INVENTORY",
592
    "EVENT_USENIGHTVISION",
595
    "EVENT_USENIGHTVISION",
593
    "EVENT_USESTEROIDS",
596
    "EVENT_USESTEROIDS",
594
    "EVENT_INVENTORYLEFT",
597
    "EVENT_INVENTORYLEFT",
595
    "EVENT_INVENTORYRIGHT",
598
    "EVENT_INVENTORYRIGHT",
596
    "EVENT_HOLODUKEON",
599
    "EVENT_HOLODUKEON",
597
    "EVENT_HOLODUKEOFF",
600
    "EVENT_HOLODUKEOFF",
598
    "EVENT_USEMEDKIT",
601
    "EVENT_USEMEDKIT",
599
    "EVENT_USEJETPACK",
602
    "EVENT_USEJETPACK",
600
    "EVENT_TURNAROUND",
603
    "EVENT_TURNAROUND",
601
    "EVENT_DISPLAYWEAPON",
604
    "EVENT_DISPLAYWEAPON",
602
    "EVENT_FIREWEAPON",
605
    "EVENT_FIREWEAPON",
603
    "EVENT_SELECTWEAPON",
606
    "EVENT_SELECTWEAPON",
604
    "EVENT_MOVEFORWARD",
607
    "EVENT_MOVEFORWARD",
605
    "EVENT_MOVEBACKWARD",
608
    "EVENT_MOVEBACKWARD",
606
    "EVENT_TURNLEFT",
609
    "EVENT_TURNLEFT",
607
    "EVENT_TURNRIGHT",
610
    "EVENT_TURNRIGHT",
608
    "EVENT_STRAFELEFT",
611
    "EVENT_STRAFELEFT",
609
    "EVENT_STRAFERIGHT",
612
    "EVENT_STRAFERIGHT",
610
    "EVENT_WEAPKEY1",
613
    "EVENT_WEAPKEY1",
611
    "EVENT_WEAPKEY2",
614
    "EVENT_WEAPKEY2",
612
    "EVENT_WEAPKEY3",
615
    "EVENT_WEAPKEY3",
613
    "EVENT_WEAPKEY4",
616
    "EVENT_WEAPKEY4",
614
    "EVENT_WEAPKEY5",
617
    "EVENT_WEAPKEY5",
615
    "EVENT_WEAPKEY6",
618
    "EVENT_WEAPKEY6",
616
    "EVENT_WEAPKEY7",
619
    "EVENT_WEAPKEY7",
617
    "EVENT_WEAPKEY8",
620
    "EVENT_WEAPKEY8",
618
    "EVENT_WEAPKEY9",
621
    "EVENT_WEAPKEY9",
619
    "EVENT_WEAPKEY10",
622
    "EVENT_WEAPKEY10",
620
    "EVENT_DRAWWEAPON",
623
    "EVENT_DRAWWEAPON",
621
    "EVENT_DISPLAYCROSSHAIR",
624
    "EVENT_DISPLAYCROSSHAIR",
622
    "EVENT_DISPLAYREST",
625
    "EVENT_DISPLAYREST",
623
    "EVENT_DISPLAYSBAR",
626
    "EVENT_DISPLAYSBAR",
624
    "EVENT_RESETPLAYER",
627
    "EVENT_RESETPLAYER",
625
    "EVENT_INCURDAMAGE",
628
    "EVENT_INCURDAMAGE",
626
    "EVENT_AIMDOWN",
629
    "EVENT_AIMDOWN",
627
    "EVENT_GAME",
630
    "EVENT_GAME",
628
    "EVENT_PREVIOUSWEAPON",
631
    "EVENT_PREVIOUSWEAPON",
629
    "EVENT_NEXTWEAPON",
632
    "EVENT_NEXTWEAPON",
630
    "EVENT_SWIMUP",
633
    "EVENT_SWIMUP",
631
    "EVENT_SWIMDOWN",
634
    "EVENT_SWIMDOWN",
632
    "EVENT_GETMENUTILE",
635
    "EVENT_GETMENUTILE",
633
    "EVENT_SPAWN",
636
    "EVENT_SPAWN",
634
    "EVENT_LOGO",
637
    "EVENT_LOGO",
635
    "EVENT_EGS",
638
    "EVENT_EGS",
636
    "EVENT_DOFIRE",
639
    "EVENT_DOFIRE",
637
    "EVENT_PRESSEDFIRE",
640
    "EVENT_PRESSEDFIRE",
638
    "EVENT_USE",
641
    "EVENT_USE",
639
    "EVENT_PROCESSINPUT",
642
    "EVENT_PROCESSINPUT",
640
    "EVENT_FAKEDOMOVETHINGS",
643
    "EVENT_FAKEDOMOVETHINGS",
641
    "EVENT_DISPLAYROOMS",
644
    "EVENT_DISPLAYROOMS",
642
    "EVENT_KILLIT",
645
    "EVENT_KILLIT",
643
    "EVENT_LOADACTOR",
646
    "EVENT_LOADACTOR",
644
    "EVENT_DISPLAYBONUSSCREEN",
647
    "EVENT_DISPLAYBONUSSCREEN",
645
    "EVENT_DISPLAYMENU",
648
    "EVENT_DISPLAYMENU",
646
    "EVENT_DISPLAYMENUREST",
649
    "EVENT_DISPLAYMENUREST",
647
    "EVENT_DISPLAYLOADINGSCREEN",
650
    "EVENT_DISPLAYLOADINGSCREEN",
648
    "EVENT_ANIMATESPRITES",
651
    "EVENT_ANIMATESPRITES",
649
    "EVENT_NEWGAME",
652
    "EVENT_NEWGAME",
650
    "EVENT_SOUND",
653
    "EVENT_SOUND",
651
    "EVENT_CHECKTOUCHDAMAGE",
654
    "EVENT_CHECKTOUCHDAMAGE",
652
    "EVENT_CHECKFLOORDAMAGE",
655
    "EVENT_CHECKFLOORDAMAGE",
653
    "EVENT_LOADGAME",
656
    "EVENT_LOADGAME",
654
    "EVENT_SAVEGAME",
657
    "EVENT_SAVEGAME",
655
    "EVENT_PREGAME",
658
    "EVENT_PREGAME",
656
    "EVENT_CHANGEMENU",
659
    "EVENT_CHANGEMENU",
657
    "EVENT_DAMAGEHPLANE",
660
    "EVENT_DAMAGEHPLANE",
658
    "EVENT_ACTIVATECHEAT",
661
    "EVENT_ACTIVATECHEAT",
659
    "EVENT_DISPLAYINACTIVEMENU",
662
    "EVENT_DISPLAYINACTIVEMENU",
660
    "EVENT_DISPLAYINACTIVEMENUREST",
663
    "EVENT_DISPLAYINACTIVEMENUREST",
661
#ifdef LUNATIC
664
#ifdef LUNATIC
662
    "EVENT_ANIMATEALLSPRITES",
665
    "EVENT_ANIMATEALLSPRITES",
663
#endif
666
#endif
664
};
667
};
665
668
666
#if !defined LUNATIC
669
#if !defined LUNATIC
667
const memberlabel_t SectorLabels[]=
670
const memberlabel_t SectorLabels[]=
668
{
671
{
669
    { "wallptr", SECTOR_WALLPTR, 0, 0 },
672
    { "wallptr", SECTOR_WALLPTR, 0, 0 },
670
    { "wallnum", SECTOR_WALLNUM, 0, 0 },
673
    { "wallnum", SECTOR_WALLNUM, 0, 0 },
671
    { "ceilingz", SECTOR_CEILINGZ, 0, 0 },
674
    { "ceilingz", SECTOR_CEILINGZ, 0, 0 },
672
    { "floorz", SECTOR_FLOORZ, 0, 0 },
675
    { "floorz", SECTOR_FLOORZ, 0, 0 },
673
    { "ceilingstat", SECTOR_CEILINGSTAT, 0, 0 },
676
    { "ceilingstat", SECTOR_CEILINGSTAT, 0, 0 },
674
    { "floorstat", SECTOR_FLOORSTAT, 0, 0 },
677
    { "floorstat", SECTOR_FLOORSTAT, 0, 0 },
675
    { "ceilingpicnum", SECTOR_CEILINGPICNUM, 0, 0 },
678
    { "ceilingpicnum", SECTOR_CEILINGPICNUM, 0, 0 },
676
    { "ceilingslope", SECTOR_CEILINGSLOPE, 0, 0 },
679
    { "ceilingslope", SECTOR_CEILINGSLOPE, 0, 0 },
677
    { "ceilingshade", SECTOR_CEILINGSHADE, 0, 0 },
680
    { "ceilingshade", SECTOR_CEILINGSHADE, 0, 0 },
678
    { "ceilingpal", SECTOR_CEILINGPAL, 0, 0 },
681
    { "ceilingpal", SECTOR_CEILINGPAL, 0, 0 },
679
    { "ceilingxpanning", SECTOR_CEILINGXPANNING, 0, 0 },
682
    { "ceilingxpanning", SECTOR_CEILINGXPANNING, 0, 0 },
680
    { "ceilingypanning", SECTOR_CEILINGYPANNING, 0, 0 },
683
    { "ceilingypanning", SECTOR_CEILINGYPANNING, 0, 0 },
681
    { "floorpicnum", SECTOR_FLOORPICNUM, 0, 0 },
684
    { "floorpicnum", SECTOR_FLOORPICNUM, 0, 0 },
682
    { "floorslope", SECTOR_FLOORSLOPE, 0, 0 },
685
    { "floorslope", SECTOR_FLOORSLOPE, 0, 0 },
683
    { "floorshade", SECTOR_FLOORSHADE, 0, 0 },
686
    { "floorshade", SECTOR_FLOORSHADE, 0, 0 },
684
    { "floorpal", SECTOR_FLOORPAL, 0, 0 },
687
    { "floorpal", SECTOR_FLOORPAL, 0, 0 },
685
    { "floorxpanning", SECTOR_FLOORXPANNING, 0, 0 },
688
    { "floorxpanning", SECTOR_FLOORXPANNING, 0, 0 },
686
    { "floorypanning", SECTOR_FLOORYPANNING, 0, 0 },
689
    { "floorypanning", SECTOR_FLOORYPANNING, 0, 0 },
687
    { "visibility", SECTOR_VISIBILITY, 0, 0 },
690
    { "visibility", SECTOR_VISIBILITY, 0, 0 },
688
    { "fogpal", SECTOR_FOGPAL, 0, 0 }, // formerly filler
691
    { "fogpal", SECTOR_FOGPAL, 0, 0 }, // formerly filler
689
    { "alignto", SECTOR_FOGPAL, 0, 0 }, // formerly filler
692
    { "alignto", SECTOR_FOGPAL, 0, 0 }, // formerly filler
690
    { "lotag", SECTOR_LOTAG, 0, 0 },
693
    { "lotag", SECTOR_LOTAG, 0, 0 },
691
    { "hitag", SECTOR_HITAG, 0, 0 },
694
    { "hitag", SECTOR_HITAG, 0, 0 },
692
    { "extra", SECTOR_EXTRA, 0, 0 },
695
    { "extra", SECTOR_EXTRA, 0, 0 },
693
    { "ceilingbunch", SECTOR_CEILINGBUNCH, 0, 0 },
696
    { "ceilingbunch", SECTOR_CEILINGBUNCH, 0, 0 },
694
    { "floorbunch", SECTOR_FLOORBUNCH, 0, 0 },
697
    { "floorbunch", SECTOR_FLOORBUNCH, 0, 0 },
695
    { "ulotag", SECTOR_ULOTAG, 0, 0 },
698
    { "ulotag", SECTOR_ULOTAG, 0, 0 },
696
    { "uhitag", SECTOR_UHITAG, 0, 0 },
699
    { "uhitag", SECTOR_UHITAG, 0, 0 },
697
    { "", -1, 0, 0  }     // END OF LIST
700
    { "", -1, 0, 0  }     // END OF LIST
698
};
701
};
699
702
700
const memberlabel_t WallLabels[]=
703
const memberlabel_t WallLabels[]=
701
{
704
{
702
    { "x", WALL_X, 0, 0 },
705
    { "x", WALL_X, 0, 0 },
703
    { "y", WALL_Y, 0, 0 },
706
    { "y", WALL_Y, 0, 0 },
704
    { "point2", WALL_POINT2, 0, 0 },
707
    { "point2", WALL_POINT2, 0, 0 },
705
    { "nextwall", WALL_NEXTWALL, 0, 0 },
708
    { "nextwall", WALL_NEXTWALL, 0, 0 },
706
    { "nextsector", WALL_NEXTSECTOR, 0, 0 },
709
    { "nextsector", WALL_NEXTSECTOR, 0, 0 },
707
    { "cstat", WALL_CSTAT, 0, 0 },
710
    { "cstat", WALL_CSTAT, 0, 0 },
708
    { "picnum", WALL_PICNUM, 0, 0 },
711
    { "picnum", WALL_PICNUM, 0, 0 },
709
    { "overpicnum", WALL_OVERPICNUM, 0, 0 },
712
    { "overpicnum", WALL_OVERPICNUM, 0, 0 },
710
    { "shade", WALL_SHADE, 0, 0 },
713
    { "shade", WALL_SHADE, 0, 0 },
711
    { "pal", WALL_PAL, 0, 0 },
714
    { "pal", WALL_PAL, 0, 0 },
712
    { "xrepeat", WALL_XREPEAT, 0, 0 },
715
    { "xrepeat", WALL_XREPEAT, 0, 0 },
713
    { "yrepeat", WALL_YREPEAT, 0, 0 },
716
    { "yrepeat", WALL_YREPEAT, 0, 0 },
714
    { "xpanning", WALL_XPANNING, 0, 0 },
717
    { "xpanning", WALL_XPANNING, 0, 0 },
715
    { "ypanning", WALL_YPANNING, 0, 0 },
718
    { "ypanning", WALL_YPANNING, 0, 0 },
716
    { "lotag", WALL_LOTAG, 0, 0 },
719
    { "lotag", WALL_LOTAG, 0, 0 },
717
    { "hitag", WALL_HITAG, 0, 0 },
720
    { "hitag", WALL_HITAG, 0, 0 },
718
    { "extra", WALL_EXTRA, 0, 0 },
721
    { "extra", WALL_EXTRA, 0, 0 },
719
    { "ulotag", WALL_ULOTAG, 0, 0 },
722
    { "ulotag", WALL_ULOTAG, 0, 0 },
720
    { "uhitag", WALL_UHITAG, 0, 0 },
723
    { "uhitag", WALL_UHITAG, 0, 0 },
721
    { "", -1, 0, 0  }     // END OF LIST
724
    { "", -1, 0, 0  }     // END OF LIST
722
};
725
};
723
726
724
const memberlabel_t ActorLabels[]=
727
const memberlabel_t ActorLabels[]=
725
{
728
{
726
    { "x", ACTOR_X, 0, 0 },
729
    { "x", ACTOR_X, 0, 0 },
727
    { "y", ACTOR_Y, 0, 0 },
730
    { "y", ACTOR_Y, 0, 0 },
728
    { "z", ACTOR_Z, 0, 0 },
731
    { "z", ACTOR_Z, 0, 0 },
729
    { "cstat", ACTOR_CSTAT, 0, 0 },
732
    { "cstat", ACTOR_CSTAT, 0, 0 },
730
    { "picnum", ACTOR_PICNUM, 0, 0 },
733
    { "picnum", ACTOR_PICNUM, 0, 0 },
731
    { "shade", ACTOR_SHADE, 0, 0 },
734
    { "shade", ACTOR_SHADE, 0, 0 },
732
    { "pal", ACTOR_PAL, 0, 0 },
735
    { "pal", ACTOR_PAL, 0, 0 },
733
    { "clipdist", ACTOR_CLIPDIST, 0, 0 },
736
    { "clipdist", ACTOR_CLIPDIST, 0, 0 },
734
//    { "filler", ACTOR_DETAIL, 0, 0 },
737
//    { "filler", ACTOR_DETAIL, 0, 0 },
735
    { "blend", ACTOR_DETAIL, 0, 0 },
738
    { "blend", ACTOR_DETAIL, 0, 0 },
736
    { "xrepeat", ACTOR_XREPEAT, 0, 0 },
739
    { "xrepeat", ACTOR_XREPEAT, 0, 0 },
737
    { "yrepeat", ACTOR_YREPEAT, 0, 0 },
740
    { "yrepeat", ACTOR_YREPEAT, 0, 0 },
738
    { "xoffset", ACTOR_XOFFSET, 0, 0 },
741
    { "xoffset", ACTOR_XOFFSET, 0, 0 },
739
    { "yoffset", ACTOR_YOFFSET, 0, 0 },
742
    { "yoffset", ACTOR_YOFFSET, 0, 0 },
740
    { "sectnum", ACTOR_SECTNUM, 0, 0 },
743
    { "sectnum", ACTOR_SECTNUM, 0, 0 },
741
    { "statnum", ACTOR_STATNUM, 0, 0 },
744
    { "statnum", ACTOR_STATNUM, 0, 0 },
742
    { "ang", ACTOR_ANG, 0, 0 },
745
    { "ang", ACTOR_ANG, 0, 0 },
743
    { "owner", ACTOR_OWNER, 0, 0 },
746
    { "owner", ACTOR_OWNER, 0, 0 },
744
    { "xvel", ACTOR_XVEL, 0, 0 },
747
    { "xvel", ACTOR_XVEL, 0, 0 },
745
    { "yvel", ACTOR_YVEL, 0, 0 },
748
    { "yvel", ACTOR_YVEL, 0, 0 },
746
    { "zvel", ACTOR_ZVEL, 0, 0 },
749
    { "zvel", ACTOR_ZVEL, 0, 0 },
747
    { "lotag", ACTOR_LOTAG, 0, 0 },
750
    { "lotag", ACTOR_LOTAG, 0, 0 },
748
    { "hitag", ACTOR_HITAG, 0, 0 },
751
    { "hitag", ACTOR_HITAG, 0, 0 },
749
    { "extra", ACTOR_EXTRA, 0, 0 },
752
    { "extra", ACTOR_EXTRA, 0, 0 },
750
753
751
    // ActorExtra labels...
754
    // ActorExtra labels...
752
    { "htcgg", ACTOR_HTCGG, 0, 0 },
755
    { "htcgg", ACTOR_HTCGG, 0, 0 },
753
    { "htpicnum", ACTOR_HTPICNUM, 0, 0 },
756
    { "htpicnum", ACTOR_HTPICNUM, 0, 0 },
754
    { "htang", ACTOR_HTANG, 0, 0 },
757
    { "htang", ACTOR_HTANG, 0, 0 },
755
    { "htextra", ACTOR_HTEXTRA, 0, 0 },
758
    { "htextra", ACTOR_HTEXTRA, 0, 0 },
756
    { "htowner", ACTOR_HTOWNER, 0, 0 },
759
    { "htowner", ACTOR_HTOWNER, 0, 0 },
757
    { "htmovflag", ACTOR_HTMOVFLAG, 0, 0 },
760
    { "htmovflag", ACTOR_HTMOVFLAG, 0, 0 },
758
    { "httempang", ACTOR_HTTEMPANG, 0, 0 },
761
    { "httempang", ACTOR_HTTEMPANG, 0, 0 },
759
    { "htactorstayput", ACTOR_HTACTORSTAYPUT, 0, 0 },
762
    { "htactorstayput", ACTOR_HTACTORSTAYPUT, 0, 0 },
760
    { "htdispicnum", ACTOR_HTDISPICNUM, 0, 0 },
763
    { "htdispicnum", ACTOR_HTDISPICNUM, 0, 0 },
761
    { "httimetosleep", ACTOR_HTTIMETOSLEEP, 0, 0 },
764
    { "httimetosleep", ACTOR_HTTIMETOSLEEP, 0, 0 },
762
    { "htfloorz", ACTOR_HTFLOORZ, 0, 0 },
765
    { "htfloorz", ACTOR_HTFLOORZ, 0, 0 },
763
    { "htceilingz", ACTOR_HTCEILINGZ, 0, 0 },
766
    { "htceilingz", ACTOR_HTCEILINGZ, 0, 0 },
764
    { "htlastvx", ACTOR_HTLASTVX, 0, 0 },
767
    { "htlastvx", ACTOR_HTLASTVX, 0, 0 },
765
    { "htlastvy", ACTOR_HTLASTVY, 0, 0 },
768
    { "htlastvy", ACTOR_HTLASTVY, 0, 0 },
766
    { "htbposx", ACTOR_HTBPOSX, 0, 0 },
769
    { "htbposx", ACTOR_HTBPOSX, 0, 0 },
767
    { "htbposy", ACTOR_HTBPOSY, 0, 0 },
770
    { "htbposy", ACTOR_HTBPOSY, 0, 0 },
768
    { "htbposz", ACTOR_HTBPOSZ, 0, 0 },
771
    { "htbposz", ACTOR_HTBPOSZ, 0, 0 },
769
    { "htg_t", ACTOR_HTG_T, LABEL_HASPARM2, 10 },
772
    { "htg_t", ACTOR_HTG_T, LABEL_HASPARM2, 10 },
770
773
771
    // model flags
774
    // model flags
772
775
773
    { "angoff", ACTOR_ANGOFF, 0, 0 },
776
    { "angoff", ACTOR_ANGOFF, 0, 0 },
774
    { "pitch", ACTOR_PITCH, 0, 0 },
777
    { "pitch", ACTOR_PITCH, 0, 0 },
775
    { "roll", ACTOR_ROLL, 0, 0 },
778
    { "roll", ACTOR_ROLL, 0, 0 },
776
    { "mdxoff", ACTOR_MDXOFF, 0, 0 },
779
    { "mdxoff", ACTOR_MDXOFF, 0, 0 },
777
    { "mdyoff", ACTOR_MDYOFF, 0, 0 },
780
    { "mdyoff", ACTOR_MDYOFF, 0, 0 },
778
    { "mdzoff", ACTOR_MDZOFF, 0, 0 },
781
    { "mdzoff", ACTOR_MDZOFF, 0, 0 },
779
    { "mdflags", ACTOR_MDFLAGS, 0, 0 },
782
    { "mdflags", ACTOR_MDFLAGS, 0, 0 },
780
    { "xpanning", ACTOR_XPANNING, 0, 0 },
783
    { "xpanning", ACTOR_XPANNING, 0, 0 },
781
    { "ypanning", ACTOR_YPANNING, 0, 0 },
784
    { "ypanning", ACTOR_YPANNING, 0, 0 },
782
785
783
    { "htflags", ACTOR_HTFLAGS, 0, 0 },
786
    { "htflags", ACTOR_HTFLAGS, 0, 0 },
784
787
785
    { "alpha", ACTOR_ALPHA, 0, 0 },
788
    { "alpha", ACTOR_ALPHA, 0, 0 },
786
789
787
    { "ulotag", ACTOR_ULOTAG, 0, 0 },
790
    { "ulotag", ACTOR_ULOTAG, 0, 0 },
788
    { "uhitag", ACTOR_UHITAG, 0, 0 },
791
    { "uhitag", ACTOR_UHITAG, 0, 0 },
789
792
790
    { "isvalid", ACTOR_ISVALID, 0, 0 },
793
    { "isvalid", ACTOR_ISVALID, 0, 0 },
791
// aliases:
794
// aliases:
792
    { "movflags", ACTOR_HITAG, 0, 0 },
795
    { "movflags", ACTOR_HITAG, 0, 0 },
793
    { "detail", ACTOR_DETAIL, 0, 0 },  // deprecated name for 'blend'
796
    { "detail", ACTOR_DETAIL, 0, 0 },  // deprecated name for 'blend'
794
797
795
    { "", -1, 0, 0  }     // END OF LIST
798
    { "", -1, 0, 0  }     // END OF LIST
796
};
799
};
797
800
798
const memberlabel_t TsprLabels[]=
801
const memberlabel_t TsprLabels[]=
799
{
802
{
800
    // tsprite access
803
    // tsprite access
801
804
802
    { "tsprx", ACTOR_X, 0, 0 },
805
    { "tsprx", ACTOR_X, 0, 0 },
803
    { "tspry", ACTOR_Y, 0, 0 },
806
    { "tspry", ACTOR_Y, 0, 0 },
804
    { "tsprz", ACTOR_Z, 0, 0 },
807
    { "tsprz", ACTOR_Z, 0, 0 },
805
    { "tsprcstat", ACTOR_CSTAT, 0, 0 },
808
    { "tsprcstat", ACTOR_CSTAT, 0, 0 },
806
    { "tsprpicnum", ACTOR_PICNUM, 0, 0 },
809
    { "tsprpicnum", ACTOR_PICNUM, 0, 0 },
807
    { "tsprshade", ACTOR_SHADE, 0, 0 },
810
    { "tsprshade", ACTOR_SHADE, 0, 0 },
808
    { "tsprpal", ACTOR_PAL, 0, 0 },
811
    { "tsprpal", ACTOR_PAL, 0, 0 },
809
    { "tsprclipdist", ACTOR_CLIPDIST, 0, 0 },
812
    { "tsprclipdist", ACTOR_CLIPDIST, 0, 0 },
810
//    { "tsprfiller", ACTOR_DETAIL, 0, 0 },
813
//    { "tsprfiller", ACTOR_DETAIL, 0, 0 },
811
    { "tsprblend", ACTOR_DETAIL, 0, 0 },
814
    { "tsprblend", ACTOR_DETAIL, 0, 0 },
812
    { "tsprxrepeat", ACTOR_XREPEAT, 0, 0 },
815
    { "tsprxrepeat", ACTOR_XREPEAT, 0, 0 },
813
    { "tspryrepeat", ACTOR_YREPEAT, 0, 0 },
816
    { "tspryrepeat", ACTOR_YREPEAT, 0, 0 },
814
    { "tsprxoffset", ACTOR_XOFFSET, 0, 0 },
817
    { "tsprxoffset", ACTOR_XOFFSET, 0, 0 },
815
    { "tspryoffset", ACTOR_YOFFSET, 0, 0 },
818
    { "tspryoffset", ACTOR_YOFFSET, 0, 0 },
816
    { "tsprsectnum", ACTOR_SECTNUM, 0, 0 },
819
    { "tsprsectnum", ACTOR_SECTNUM, 0, 0 },
817
    { "tsprstatnum", ACTOR_STATNUM, 0, 0 },
820
    { "tsprstatnum", ACTOR_STATNUM, 0, 0 },
818
    { "tsprang", ACTOR_ANG, 0, 0 },
821
    { "tsprang", ACTOR_ANG, 0, 0 },
819
    { "tsprowner", ACTOR_OWNER, 0, 0 },
822
    { "tsprowner", ACTOR_OWNER, 0, 0 },
820
#if 1
823
#if 1
821
    { "tsprxvel", ACTOR_XVEL, 0, 0 },
824
    { "tsprxvel", ACTOR_XVEL, 0, 0 },
822
    { "tspryvel", ACTOR_YVEL, 0, 0 },
825
    { "tspryvel", ACTOR_YVEL, 0, 0 },
823
    { "tsprzvel", ACTOR_ZVEL, 0, 0 },
826
    { "tsprzvel", ACTOR_ZVEL, 0, 0 },
824
    { "tsprlotag", ACTOR_LOTAG, 0, 0 },
827
    { "tsprlotag", ACTOR_LOTAG, 0, 0 },
825
    { "tsprhitag", ACTOR_HITAG, 0, 0 },
828
    { "tsprhitag", ACTOR_HITAG, 0, 0 },
826
    { "tsprextra", ACTOR_EXTRA, 0, 0 },
829
    { "tsprextra", ACTOR_EXTRA, 0, 0 },
827
#endif
830
#endif
828
// aliases:
831
// aliases:
829
    { "tsprdetail", ACTOR_DETAIL, 0, 0 },  // deprecated name for 'tsprblend'
832
    { "tsprdetail", ACTOR_DETAIL, 0, 0 },  // deprecated name for 'tsprblend'
830
833
831
    { "", -1, 0, 0  }     // END OF LIST
834
    { "", -1, 0, 0  }     // END OF LIST
832
};
835
};
833
836
834
const memberlabel_t PlayerLabels[]=
837
const memberlabel_t PlayerLabels[]=
835
{
838
{
836
    { "zoom", PLAYER_ZOOM, 0, 0 },
839
    { "zoom", PLAYER_ZOOM, 0, 0 },
837
    { "exitx", PLAYER_EXITX, 0, 0 },
840
    { "exitx", PLAYER_EXITX, 0, 0 },
838
    { "exity", PLAYER_EXITY, 0, 0 },
841
    { "exity", PLAYER_EXITY, 0, 0 },
839
    { "loogiex", PLAYER_LOOGIEX, LABEL_HASPARM2, 64 },
842
    { "loogiex", PLAYER_LOOGIEX, LABEL_HASPARM2, 64 },
840
    { "loogiey", PLAYER_LOOGIEY, LABEL_HASPARM2, 64 },
843
    { "loogiey", PLAYER_LOOGIEY, LABEL_HASPARM2, 64 },
841
    { "numloogs", PLAYER_NUMLOOGS, 0, 0 },
844
    { "numloogs", PLAYER_NUMLOOGS, 0, 0 },
842
    { "loogcnt", PLAYER_LOOGCNT, 0, 0 },
845
    { "loogcnt", PLAYER_LOOGCNT, 0, 0 },
843
    { "posx", PLAYER_POSX, 0, 0 },
846
    { "posx", PLAYER_POSX, 0, 0 },
844
    { "posy", PLAYER_POSY, 0, 0 },
847
    { "posy", PLAYER_POSY, 0, 0 },
845
    { "posz", PLAYER_POSZ, 0, 0 },
848
    { "posz", PLAYER_POSZ, 0, 0 },
846
    { "horiz", PLAYER_HORIZ, 0, 0 },
849
    { "horiz", PLAYER_HORIZ, 0, 0 },
847
    { "ohoriz", PLAYER_OHORIZ, 0, 0 },
850
    { "ohoriz", PLAYER_OHORIZ, 0, 0 },
848
    { "ohorizoff", PLAYER_OHORIZOFF, 0, 0 },
851
    { "ohorizoff", PLAYER_OHORIZOFF, 0, 0 },
849
    { "invdisptime", PLAYER_INVDISPTIME, 0, 0 },
852
    { "invdisptime", PLAYER_INVDISPTIME, 0, 0 },
850
    { "bobposx", PLAYER_BOBPOSX, 0, 0 },
853
    { "bobposx", PLAYER_BOBPOSX, 0, 0 },
851
    { "bobposy", PLAYER_BOBPOSY, 0, 0 },
854
    { "bobposy", PLAYER_BOBPOSY, 0, 0 },
852
    { "oposx", PLAYER_OPOSX, 0, 0 },
855
    { "oposx", PLAYER_OPOSX, 0, 0 },
853
    { "oposy", PLAYER_OPOSY, 0, 0 },
856
    { "oposy", PLAYER_OPOSY, 0, 0 },
854
    { "oposz", PLAYER_OPOSZ, 0, 0 },
857
    { "oposz", PLAYER_OPOSZ, 0, 0 },
855
    { "pyoff", PLAYER_PYOFF, 0, 0 },
858
    { "pyoff", PLAYER_PYOFF, 0, 0 },
856
    { "opyoff", PLAYER_OPYOFF, 0, 0 },
859
    { "opyoff", PLAYER_OPYOFF, 0, 0 },
857
    { "posxv", PLAYER_POSXV, 0, 0 },
860
    { "posxv", PLAYER_POSXV, 0, 0 },
858
    { "posyv", PLAYER_POSYV, 0, 0 },
861
    { "posyv", PLAYER_POSYV, 0, 0 },
859
    { "poszv", PLAYER_POSZV, 0, 0 },
862
    { "poszv", PLAYER_POSZV, 0, 0 },
860
    { "last_pissed_time", PLAYER_LAST_PISSED_TIME, 0, 0 },
863
    { "last_pissed_time", PLAYER_LAST_PISSED_TIME, 0, 0 },
861
    { "truefz", PLAYER_TRUEFZ, 0, 0 },
864
    { "truefz", PLAYER_TRUEFZ, 0, 0 },
862
    { "truecz", PLAYER_TRUECZ, 0, 0 },
865
    { "truecz", PLAYER_TRUECZ, 0, 0 },
863
    { "player_par", PLAYER_PLAYER_PAR, 0, 0 },
866
    { "player_par", PLAYER_PLAYER_PAR, 0, 0 },
864
    { "visibility", PLAYER_VISIBILITY, 0, 0 },
867
    { "visibility", PLAYER_VISIBILITY, 0, 0 },
865
    { "bobcounter", PLAYER_BOBCOUNTER, 0, 0 },
868
    { "bobcounter", PLAYER_BOBCOUNTER, 0, 0 },
866
    { "weapon_sway", PLAYER_WEAPON_SWAY, 0, 0 },
869
    { "weapon_sway", PLAYER_WEAPON_SWAY, 0, 0 },
867
    { "pals_time", PLAYER_PALS_TIME, 0, 0 },
870
    { "pals_time", PLAYER_PALS_TIME, 0, 0 },
868
    { "randomflamex", PLAYER_RANDOMFLAMEX, 0, 0 },
871
    { "randomflamex", PLAYER_RANDOMFLAMEX, 0, 0 },
869
    { "crack_time", PLAYER_CRACK_TIME, 0, 0 },
872
    { "crack_time", PLAYER_CRACK_TIME, 0, 0 },
870
    { "aim_mode", PLAYER_AIM_MODE, 0, 0 },
873
    { "aim_mode", PLAYER_AIM_MODE, 0, 0 },
871
    { "ang", PLAYER_ANG, 0, 0 },
874
    { "ang", PLAYER_ANG, 0, 0 },
872
    { "oang", PLAYER_OANG, 0, 0 },
875
    { "oang", PLAYER_OANG, 0, 0 },
873
    { "angvel", PLAYER_ANGVEL, 0, 0 },
876
    { "angvel", PLAYER_ANGVEL, 0, 0 },
874
    { "cursectnum", PLAYER_CURSECTNUM, 0, 0 },
877
    { "cursectnum", PLAYER_CURSECTNUM, 0, 0 },
875
    { "look_ang", PLAYER_LOOK_ANG, 0, 0 },
878
    { "look_ang", PLAYER_LOOK_ANG, 0, 0 },
876
    { "last_extra", PLAYER_LAST_EXTRA, 0, 0 },
879
    { "last_extra", PLAYER_LAST_EXTRA, 0, 0 },
877
    { "subweapon", PLAYER_SUBWEAPON, 0, 0 },
880
    { "subweapon", PLAYER_SUBWEAPON, 0, 0 },
878
    { "ammo_amount", PLAYER_AMMO_AMOUNT, LABEL_HASPARM2, MAX_WEAPONS },
881
    { "ammo_amount", PLAYER_AMMO_AMOUNT, LABEL_HASPARM2, MAX_WEAPONS },
879
    { "wackedbyactor", PLAYER_WACKEDBYACTOR, 0, 0 },
882
    { "wackedbyactor", PLAYER_WACKEDBYACTOR, 0, 0 },
880
    { "frag", PLAYER_FRAG, 0, 0 },
883
    { "frag", PLAYER_FRAG, 0, 0 },
881
    { "fraggedself", PLAYER_FRAGGEDSELF, 0, 0 },
884
    { "fraggedself", PLAYER_FRAGGEDSELF, 0, 0 },
882
    { "curr_weapon", PLAYER_CURR_WEAPON, 0, 0 },
885
    { "curr_weapon", PLAYER_CURR_WEAPON, 0, 0 },
883
    { "last_weapon", PLAYER_LAST_WEAPON, 0, 0 },
886
    { "last_weapon", PLAYER_LAST_WEAPON, 0, 0 },
884
    { "tipincs", PLAYER_TIPINCS, 0, 0 },
887
    { "tipincs", PLAYER_TIPINCS, 0, 0 },
885
    { "horizoff", PLAYER_HORIZOFF, 0, 0 },
888
    { "horizoff", PLAYER_HORIZOFF, 0, 0 },
886
    { "wantweaponfire", PLAYER_WANTWEAPONFIRE, 0, 0 },
889
    { "wantweaponfire", PLAYER_WANTWEAPONFIRE, 0, 0 },
887
    { "holoduke_amount", PLAYER_HOLODUKE_AMOUNT, 0, 0 },
890
    { "holoduke_amount", PLAYER_HOLODUKE_AMOUNT, 0, 0 },
888
    { "newowner", PLAYER_NEWOWNER, 0, 0 },
891
    { "newowner", PLAYER_NEWOWNER, 0, 0 },
889
    { "hurt_delay", PLAYER_HURT_DELAY, 0, 0 },
892
    { "hurt_delay", PLAYER_HURT_DELAY, 0, 0 },
890
    { "hbomb_hold_delay", PLAYER_HBOMB_HOLD_DELAY, 0, 0 },
893
    { "hbomb_hold_delay", PLAYER_HBOMB_HOLD_DELAY, 0, 0 },
891
    { "jumping_counter", PLAYER_JUMPING_COUNTER, 0, 0 },
894
    { "jumping_counter", PLAYER_JUMPING_COUNTER, 0, 0 },
892
    { "airleft", PLAYER_AIRLEFT, 0, 0 },
895
    { "airleft", PLAYER_AIRLEFT, 0, 0 },
893
    { "knee_incs", PLAYER_KNEE_INCS, 0, 0 },
896
    { "knee_incs", PLAYER_KNEE_INCS, 0, 0 },
894
    { "access_incs", PLAYER_ACCESS_INCS, 0, 0 },
897
    { "access_incs", PLAYER_ACCESS_INCS, 0, 0 },
895
    { "fta", PLAYER_FTA, 0, 0 },
898
    { "fta", PLAYER_FTA, 0, 0 },
896
    { "ftq", PLAYER_FTQ, 0, 0 },
899
    { "ftq", PLAYER_FTQ, 0, 0 },
897
    { "access_wallnum", PLAYER_ACCESS_WALLNUM, 0, 0 },
900
    { "access_wallnum", PLAYER_ACCESS_WALLNUM, 0, 0 },
898
    { "access_spritenum", PLAYER_ACCESS_SPRITENUM, 0, 0 },
901
    { "access_spritenum", PLAYER_ACCESS_SPRITENUM, 0, 0 },
899
    { "kickback_pic", PLAYER_KICKBACK_PIC, 0, 0 },
902
    { "kickback_pic", PLAYER_KICKBACK_PIC, 0, 0 },
900
    { "got_access", PLAYER_GOT_ACCESS, 0, 0 },
903
    { "got_access", PLAYER_GOT_ACCESS, 0, 0 },
901
    { "weapon_ang", PLAYER_WEAPON_ANG, 0, 0 },
904
    { "weapon_ang", PLAYER_WEAPON_ANG, 0, 0 },
902
    { "firstaid_amount", PLAYER_FIRSTAID_AMOUNT, 0, 0 },
905
    { "firstaid_amount", PLAYER_FIRSTAID_AMOUNT, 0, 0 },
903
    { "somethingonplayer", PLAYER_SOMETHINGONPLAYER, 0, 0 },
906
    { "somethingonplayer", PLAYER_SOMETHINGONPLAYER, 0, 0 },
904
    { "on_crane", PLAYER_ON_CRANE, 0, 0 },
907
    { "on_crane", PLAYER_ON_CRANE, 0, 0 },
905
    { "i", PLAYER_I, 0, 0 },
908
    { "i", PLAYER_I, 0, 0 },
906
    { "one_parallax_sectnum", PLAYER_ONE_PARALLAX_SECTNUM, 0, 0 },
909
    { "one_parallax_sectnum", PLAYER_ONE_PARALLAX_SECTNUM, 0, 0 },
907
    { "over_shoulder_on", PLAYER_OVER_SHOULDER_ON, 0, 0 },
910
    { "over_shoulder_on", PLAYER_OVER_SHOULDER_ON, 0, 0 },
908
    { "random_club_frame", PLAYER_RANDOM_CLUB_FRAME, 0, 0 },
911
    { "random_club_frame", PLAYER_RANDOM_CLUB_FRAME, 0, 0 },
909
    { "fist_incs", PLAYER_FIST_INCS, 0, 0 },
912
    { "fist_incs", PLAYER_FIST_INCS, 0, 0 },
910
    { "one_eighty_count", PLAYER_ONE_EIGHTY_COUNT, 0, 0 },
913
    { "one_eighty_count", PLAYER_ONE_EIGHTY_COUNT, 0, 0 },
911
    { "cheat_phase", PLAYER_CHEAT_PHASE, 0, 0 },
914
    { "cheat_phase", PLAYER_CHEAT_PHASE, 0, 0 },
912
    { "dummyplayersprite", PLAYER_DUMMYPLAYERSPRITE, 0, 0 },
915
    { "dummyplayersprite", PLAYER_DUMMYPLAYERSPRITE, 0, 0 },
913
    { "extra_extra8", PLAYER_EXTRA_EXTRA8, 0, 0 },
916
    { "extra_extra8", PLAYER_EXTRA_EXTRA8, 0, 0 },
914
    { "quick_kick", PLAYER_QUICK_KICK, 0, 0 },
917
    { "quick_kick", PLAYER_QUICK_KICK, 0, 0 },
915
    { "heat_amount", PLAYER_HEAT_AMOUNT, 0, 0 },
918
    { "heat_amount", PLAYER_HEAT_AMOUNT, 0, 0 },
916
    { "actorsqu", PLAYER_ACTORSQU, 0, 0 },
919
    { "actorsqu", PLAYER_ACTORSQU, 0, 0 },
917
    { "timebeforeexit", PLAYER_TIMEBEFOREEXIT, 0, 0 },
920
    { "timebeforeexit", PLAYER_TIMEBEFOREEXIT, 0, 0 },
918
    { "customexitsound", PLAYER_CUSTOMEXITSOUND, 0, 0 },
921
    { "customexitsound", PLAYER_CUSTOMEXITSOUND, 0, 0 },
919
    { "weaprecs", PLAYER_WEAPRECS, LABEL_HASPARM2, MAX_WEAPONS },
922
    { "weaprecs", PLAYER_WEAPRECS, LABEL_HASPARM2, MAX_WEAPONS },
920
    { "weapreccnt", PLAYER_WEAPRECCNT, 0, 0 },
923
    { "weapreccnt", PLAYER_WEAPRECCNT, 0, 0 },
921
    { "interface_toggle_flag", PLAYER_INTERFACE_TOGGLE_FLAG, 0, 0 },
924
    { "interface_toggle_flag", PLAYER_INTERFACE_TOGGLE_FLAG, 0, 0 },
922
    { "rotscrnang", PLAYER_ROTSCRNANG, 0, 0 },
925
    { "rotscrnang", PLAYER_ROTSCRNANG, 0, 0 },
923
    { "dead_flag", PLAYER_DEAD_FLAG, 0, 0 },
926
    { "dead_flag", PLAYER_DEAD_FLAG, 0, 0 },
924
    { "show_empty_weapon", PLAYER_SHOW_EMPTY_WEAPON, 0, 0 },
927
    { "show_empty_weapon", PLAYER_SHOW_EMPTY_WEAPON, 0, 0 },
925
    { "scuba_amount", PLAYER_SCUBA_AMOUNT, 0, 0 },
928
    { "scuba_amount", PLAYER_SCUBA_AMOUNT, 0, 0 },
926
    { "jetpack_amount", PLAYER_JETPACK_AMOUNT, 0, 0 },
929
    { "jetpack_amount", PLAYER_JETPACK_AMOUNT, 0, 0 },
927
    { "steroids_amount", PLAYER_STEROIDS_AMOUNT, 0, 0 },
930
    { "steroids_amount", PLAYER_STEROIDS_AMOUNT, 0, 0 },
928
    { "shield_amount", PLAYER_SHIELD_AMOUNT, 0, 0 },
931
    { "shield_amount", PLAYER_SHIELD_AMOUNT, 0, 0 },
929
    { "holoduke_on", PLAYER_HOLODUKE_ON, 0, 0 },
932
    { "holoduke_on", PLAYER_HOLODUKE_ON, 0, 0 },
930
    { "pycount", PLAYER_PYCOUNT, 0, 0 },
933
    { "pycount", PLAYER_PYCOUNT, 0, 0 },
931
    { "weapon_pos", PLAYER_WEAPON_POS, 0, 0 },
934
    { "weapon_pos", PLAYER_WEAPON_POS, 0, 0 },
932
    { "frag_ps", PLAYER_FRAG_PS, 0, 0 },
935
    { "frag_ps", PLAYER_FRAG_PS, 0, 0 },
933
    { "transporter_hold", PLAYER_TRANSPORTER_HOLD, 0, 0 },
936
    { "transporter_hold", PLAYER_TRANSPORTER_HOLD, 0, 0 },
934
    { "last_full_weapon", PLAYER_LAST_FULL_WEAPON, 0, 0 },
937
    { "last_full_weapon", PLAYER_LAST_FULL_WEAPON, 0, 0 },
935
    { "footprintshade", PLAYER_FOOTPRINTSHADE, 0, 0 },
938
    { "footprintshade", PLAYER_FOOTPRINTSHADE, 0, 0 },
936
    { "boot_amount", PLAYER_BOOT_AMOUNT, 0, 0 },
939
    { "boot_amount", PLAYER_BOOT_AMOUNT, 0, 0 },
937
    { "scream_voice", PLAYER_SCREAM_VOICE, 0, 0 },
940
    { "scream_voice", PLAYER_SCREAM_VOICE, 0, 0 },
938
    { "gm", PLAYER_GM, 0, 0 },
941
    { "gm", PLAYER_GM, 0, 0 },
939
    { "on_warping_sector", PLAYER_ON_WARPING_SECTOR, 0, 0 },
942
    { "on_warping_sector", PLAYER_ON_WARPING_SECTOR, 0, 0 },
940
    { "footprintcount", PLAYER_FOOTPRINTCOUNT, 0, 0 },
943
    { "footprintcount", PLAYER_FOOTPRINTCOUNT, 0, 0 },
941
    { "hbomb_on", PLAYER_HBOMB_ON, 0, 0 },
944
    { "hbomb_on", PLAYER_HBOMB_ON, 0, 0 },
942
    { "jumping_toggle", PLAYER_JUMPING_TOGGLE, 0, 0 },
945
    { "jumping_toggle", PLAYER_JUMPING_TOGGLE, 0, 0 },
943
    { "rapid_fire_hold", PLAYER_RAPID_FIRE_HOLD, 0, 0 },
946
    { "rapid_fire_hold", PLAYER_RAPID_FIRE_HOLD, 0, 0 },
944
    { "on_ground", PLAYER_ON_GROUND, 0, 0 },
947
    { "on_ground", PLAYER_ON_GROUND, 0, 0 },
945
    { "name", PLAYER_NAME,  LABEL_ISSTRING, 32 },
948
    { "name", PLAYER_NAME,  LABEL_ISSTRING, 32 },
946
    { "inven_icon", PLAYER_INVEN_ICON, 0, 0 },
949
    { "inven_icon", PLAYER_INVEN_ICON, 0, 0 },
947
    { "buttonpalette", PLAYER_BUTTONPALETTE, 0, 0 },
950
    { "buttonpalette", PLAYER_BUTTONPALETTE, 0, 0 },
948
    { "jetpack_on", PLAYER_JETPACK_ON, 0, 0 },
951
    { "jetpack_on", PLAYER_JETPACK_ON, 0, 0 },
949
    { "spritebridge", PLAYER_SPRITEBRIDGE, 0, 0 },
952
    { "spritebridge", PLAYER_SPRITEBRIDGE, 0, 0 },
950
    { "lastrandomspot", PLAYER_LASTRANDOMSPOT, 0, 0 },
953
    { "lastrandomspot", PLAYER_LASTRANDOMSPOT, 0, 0 },
951
    { "scuba_on", PLAYER_SCUBA_ON, 0, 0 },
954
    { "scuba_on", PLAYER_SCUBA_ON, 0, 0 },
952
    { "footprintpal", PLAYER_FOOTPRINTPAL, 0, 0 },
955
    { "footprintpal", PLAYER_FOOTPRINTPAL, 0, 0 },
953
    { "heat_on", PLAYER_HEAT_ON, 0, 0 },
956
    { "heat_on", PLAYER_HEAT_ON, 0, 0 },
954
    { "holster_weapon", PLAYER_HOLSTER_WEAPON, 0, 0 },
957
    { "holster_weapon", PLAYER_HOLSTER_WEAPON, 0, 0 },
955
    { "falling_counter", PLAYER_FALLING_COUNTER, 0, 0 },
958
    { "falling_counter", PLAYER_FALLING_COUNTER, 0, 0 },
956
    { "gotweapon", PLAYER_GOTWEAPON, LABEL_HASPARM2, MAX_WEAPONS },
959
    { "gotweapon", PLAYER_GOTWEAPON, LABEL_HASPARM2, MAX_WEAPONS },
957
    { "refresh_inventory", PLAYER_REFRESH_INVENTORY, 0, 0 },
960
    { "refresh_inventory", PLAYER_REFRESH_INVENTORY, 0, 0 },
958
    { "palette", PLAYER_PALETTE, 0, 0 },
961
    { "palette", PLAYER_PALETTE, 0, 0 },
959
    { "toggle_key_flag", PLAYER_TOGGLE_KEY_FLAG, 0, 0 },
962
    { "toggle_key_flag", PLAYER_TOGGLE_KEY_FLAG, 0, 0 },
960
    { "knuckle_incs", PLAYER_KNUCKLE_INCS, 0, 0 },
963
    { "knuckle_incs", PLAYER_KNUCKLE_INCS, 0, 0 },
961
    { "walking_snd_toggle", PLAYER_WALKING_SND_TOGGLE, 0, 0 },
964
    { "walking_snd_toggle", PLAYER_WALKING_SND_TOGGLE, 0, 0 },
962
    { "palookup", PLAYER_PALOOKUP, 0, 0 },
965
    { "palookup", PLAYER_PALOOKUP, 0, 0 },
963
    { "hard_landing", PLAYER_HARD_LANDING, 0, 0 },
966
    { "hard_landing", PLAYER_HARD_LANDING, 0, 0 },
964
    { "max_secret_rooms", PLAYER_MAX_SECRET_ROOMS, 0, 0 },
967
    { "max_secret_rooms", PLAYER_MAX_SECRET_ROOMS, 0, 0 },
965
    { "secret_rooms", PLAYER_SECRET_ROOMS, 0, 0 },
968
    { "secret_rooms", PLAYER_SECRET_ROOMS, 0, 0 },
966
    { "pals", PLAYER_PALS, LABEL_HASPARM2, 3 },
969
    { "pals", PLAYER_PALS, LABEL_HASPARM2, 3 },
967
    { "max_actors_killed", PLAYER_MAX_ACTORS_KILLED, 0, 0 },
970
    { "max_actors_killed", PLAYER_MAX_ACTORS_KILLED, 0, 0 },
968
    { "actors_killed", PLAYER_ACTORS_KILLED, 0, 0 },
971
    { "actors_killed", PLAYER_ACTORS_KILLED, 0, 0 },
969
    { "return_to_center", PLAYER_RETURN_TO_CENTER, 0, 0 },
972
    { "return_to_center", PLAYER_RETURN_TO_CENTER, 0, 0 },
970
    { "runspeed", PLAYER_RUNSPEED, 0, 0 },
973
    { "runspeed", PLAYER_RUNSPEED, 0, 0 },
971
    { "sbs", PLAYER_SBS, 0, 0 },
974
    { "sbs", PLAYER_SBS, 0, 0 },
972
    { "reloading", PLAYER_RELOADING, 0, 0 },
975
    { "reloading", PLAYER_RELOADING, 0, 0 },
973
    { "auto_aim", PLAYER_AUTO_AIM, 0, 0 },
976
    { "auto_aim", PLAYER_AUTO_AIM, 0, 0 },
974
    { "movement_lock", PLAYER_MOVEMENT_LOCK, 0, 0 },
977
    { "movement_lock", PLAYER_MOVEMENT_LOCK, 0, 0 },
975
    { "sound_pitch", PLAYER_SOUND_PITCH, 0, 0 },
978
    { "sound_pitch", PLAYER_SOUND_PITCH, 0, 0 },
976
    { "weaponswitch", PLAYER_WEAPONSWITCH, 0, 0 },
979
    { "weaponswitch", PLAYER_WEAPONSWITCH, 0, 0 },
977
    { "team", PLAYER_TEAM, 0, 0 },
980
    { "team", PLAYER_TEAM, 0, 0 },
978
    { "max_player_health", PLAYER_MAX_PLAYER_HEALTH, 0, 0 },
981
    { "max_player_health", PLAYER_MAX_PLAYER_HEALTH, 0, 0 },
979
    { "max_shield_amount", PLAYER_MAX_SHIELD_AMOUNT, 0, 0 },
982
    { "max_shield_amount", PLAYER_MAX_SHIELD_AMOUNT, 0, 0 },
980
    { "max_ammo_amount", PLAYER_MAX_AMMO_AMOUNT, LABEL_HASPARM2, MAX_WEAPONS },
983
    { "max_ammo_amount", PLAYER_MAX_AMMO_AMOUNT, LABEL_HASPARM2, MAX_WEAPONS },
981
    { "last_quick_kick", PLAYER_LAST_QUICK_KICK, 0, 0 },
984
    { "last_quick_kick", PLAYER_LAST_QUICK_KICK, 0, 0 },
982
    { "autostep", PLAYER_AUTOSTEP, 0, 0 },
985
    { "autostep", PLAYER_AUTOSTEP, 0, 0 },
983
    { "autostep_sbw", PLAYER_AUTOSTEP_SBW, 0, 0 },
986
    { "autostep_sbw", PLAYER_AUTOSTEP_SBW, 0, 0 },
984
    { "", -1, 0, 0  }     // END OF LIST
987
    { "", -1, 0, 0  }     // END OF LIST
985
};
988
};
986
989
987
const memberlabel_t ProjectileLabels[]=
990
const memberlabel_t ProjectileLabels[]=
988
{
991
{
989
    { "workslike", PROJ_WORKSLIKE, 0, 0 },
992
    { "workslike", PROJ_WORKSLIKE, 0, 0 },
990
    { "spawns", PROJ_SPAWNS, 0, 0 },
993
    { "spawns", PROJ_SPAWNS, 0, 0 },
991
    { "sxrepeat", PROJ_SXREPEAT, 0, 0 },
994
    { "sxrepeat", PROJ_SXREPEAT, 0, 0 },
992
    { "syrepeat", PROJ_SYREPEAT, 0, 0 },
995
    { "syrepeat", PROJ_SYREPEAT, 0, 0 },
993
    { "sound", PROJ_SOUND, 0, 0 },
996
    { "sound", PROJ_SOUND, 0, 0 },
994
    { "isound", PROJ_ISOUND, 0, 0 },
997
    { "isound", PROJ_ISOUND, 0, 0 },
995
    { "vel", PROJ_VEL, 0, 0 },
998
    { "vel", PROJ_VEL, 0, 0 },
996
    { "extra", PROJ_EXTRA, 0, 0 },
999
    { "extra", PROJ_EXTRA, 0, 0 },
997
    { "decal", PROJ_DECAL, 0, 0 },
1000
    { "decal", PROJ_DECAL, 0, 0 },
998
    { "trail", PROJ_TRAIL, 0, 0 },
1001
    { "trail", PROJ_TRAIL, 0, 0 },
999
    { "txrepeat", PROJ_TXREPEAT, 0, 0 },
1002
    { "txrepeat", PROJ_TXREPEAT, 0, 0 },
1000
    { "tyrepeat", PROJ_TYREPEAT, 0, 0 },
1003
    { "tyrepeat", PROJ_TYREPEAT, 0, 0 },
1001
    { "toffset", PROJ_TOFFSET, 0, 0 },
1004
    { "toffset", PROJ_TOFFSET, 0, 0 },
1002
    { "tnum", PROJ_TNUM, 0, 0 },
1005
    { "tnum", PROJ_TNUM, 0, 0 },
1003
    { "drop", PROJ_DROP, 0, 0 },
1006
    { "drop", PROJ_DROP, 0, 0 },
1004
    { "cstat", PROJ_CSTAT, 0, 0 },
1007
    { "cstat", PROJ_CSTAT, 0, 0 },
1005
    { "clipdist", PROJ_CLIPDIST, 0, 0 },
1008
    { "clipdist", PROJ_CLIPDIST, 0, 0 },
1006
    { "shade", PROJ_SHADE, 0, 0 },
1009
    { "shade", PROJ_SHADE, 0, 0 },
1007
    { "xrepeat", PROJ_XREPEAT, 0, 0 },
1010
    { "xrepeat", PROJ_XREPEAT, 0, 0 },
1008
    { "yrepeat", PROJ_YREPEAT, 0, 0 },
1011
    { "yrepeat", PROJ_YREPEAT, 0, 0 },
1009
    { "pal", PROJ_PAL, 0, 0 },
1012
    { "pal", PROJ_PAL, 0, 0 },
1010
    { "extra_rand", PROJ_EXTRA_RAND, 0, 0 },
1013
    { "extra_rand", PROJ_EXTRA_RAND, 0, 0 },
1011
    { "hitradius", PROJ_HITRADIUS, 0, 0 },
1014
    { "hitradius", PROJ_HITRADIUS, 0, 0 },
1012
    { "velmult", PROJ_MOVECNT, 0, 0 },
1015
    { "velmult", PROJ_MOVECNT, 0, 0 },
1013
    { "offset", PROJ_OFFSET, 0, 0 },
1016
    { "offset", PROJ_OFFSET, 0, 0 },
1014
    { "bounces", PROJ_BOUNCES, 0, 0 },
1017
    { "bounces", PROJ_BOUNCES, 0, 0 },
1015
    { "bsound", PROJ_BSOUND, 0, 0 },
1018
    { "bsound", PROJ_BSOUND, 0, 0 },
1016
    { "range", PROJ_RANGE, 0, 0 },
1019
    { "range", PROJ_RANGE, 0, 0 },
1017
    { "flashcolor", PROJ_FLASH_COLOR, 0, 0 },
1020
    { "flashcolor", PROJ_FLASH_COLOR, 0, 0 },
1018
    { "userdata", PROJ_USERDATA, 0, 0 },
1021
    { "userdata", PROJ_USERDATA, 0, 0 },
1019
    { "", -1, 0, 0  }     // END OF LIST
1022
    { "", -1, 0, 0  }     // END OF LIST
1020
};
1023
};
1021
1024
1022
const memberlabel_t UserdefsLabels[]=
1025
const memberlabel_t UserdefsLabels[]=
1023
{
1026
{
1024
    //        { "<null>", 1, 0, 0 },
1027
    //        { "<null>", 1, 0, 0 },
1025
    { "god", USERDEFS_GOD, 0, 0 },
1028
    { "god", USERDEFS_GOD, 0, 0 },
1026
    { "warp_on", USERDEFS_WARP_ON, 0, 0 },
1029
    { "warp_on", USERDEFS_WARP_ON, 0, 0 },
1027
    { "cashman", USERDEFS_CASHMAN, 0, 0 },
1030
    { "cashman", USERDEFS_CASHMAN, 0, 0 },
1028
    { "eog", USERDEFS_EOG, 0, 0 },
1031
    { "eog", USERDEFS_EOG, 0, 0 },
1029
    { "showallmap", USERDEFS_SHOWALLMAP, 0, 0 },
1032
    { "showallmap", USERDEFS_SHOWALLMAP, 0, 0 },
1030
    { "show_help", USERDEFS_SHOW_HELP, 0, 0 },
1033
    { "show_help", USERDEFS_SHOW_HELP, 0, 0 },
1031
    { "scrollmode", USERDEFS_SCROLLMODE, 0, 0 },
1034
    { "scrollmode", USERDEFS_SCROLLMODE, 0, 0 },
1032
    { "clipping", USERDEFS_CLIPPING, 0, 0 },
1035
    { "clipping", USERDEFS_CLIPPING, 0, 0 },
1033
    { "user_name", USERDEFS_USER_NAME, LABEL_HASPARM2, MAXPLAYERS },
1036
    { "user_name", USERDEFS_USER_NAME, LABEL_HASPARM2, MAXPLAYERS },
1034
    { "ridecule", USERDEFS_RIDECULE, LABEL_HASPARM2 | LABEL_ISSTRING, 10 },
1037
    { "ridecule", USERDEFS_RIDECULE, LABEL_HASPARM2 | LABEL_ISSTRING, 10 },
1035
    { "savegame", USERDEFS_SAVEGAME, LABEL_HASPARM2 | LABEL_ISSTRING, 10 },
1038
    { "savegame", USERDEFS_SAVEGAME, LABEL_HASPARM2 | LABEL_ISSTRING, 10 },
1036
    { "pwlockout", USERDEFS_PWLOCKOUT, LABEL_ISSTRING, 128 },
1039
    { "pwlockout", USERDEFS_PWLOCKOUT, LABEL_ISSTRING, 128 },
1037
    { "rtsname;", USERDEFS_RTSNAME,  LABEL_ISSTRING, 128 },
1040
    { "rtsname;", USERDEFS_RTSNAME,  LABEL_ISSTRING, 128 },
1038
    { "overhead_on", USERDEFS_OVERHEAD_ON, 0, 0 },
1041
    { "overhead_on", USERDEFS_OVERHEAD_ON, 0, 0 },
1039
    { "last_overhead", USERDEFS_LAST_OVERHEAD, 0, 0 },
1042
    { "last_overhead", USERDEFS_LAST_OVERHEAD, 0, 0 },
1040
    { "showweapons", USERDEFS_SHOWWEAPONS, 0, 0 },
1043
    { "showweapons", USERDEFS_SHOWWEAPONS, 0, 0 },
1041
1044
1042
    { "pause_on", USERDEFS_PAUSE_ON, 0, 0 },
1045
    { "pause_on", USERDEFS_PAUSE_ON, 0, 0 },
1043
    { "from_bonus", USERDEFS_FROM_BONUS, 0, 0 },
1046
    { "from_bonus", USERDEFS_FROM_BONUS, 0, 0 },
1044
    { "camerasprite", USERDEFS_CAMERASPRITE, 0, 0 },
1047
    { "camerasprite", USERDEFS_CAMERASPRITE, 0, 0 },
1045
    { "last_camsprite", USERDEFS_LAST_CAMSPRITE, 0, 0 },
1048
    { "last_camsprite", USERDEFS_LAST_CAMSPRITE, 0, 0 },
1046
    { "last_level", USERDEFS_LAST_LEVEL, 0, 0 },
1049
    { "last_level", USERDEFS_LAST_LEVEL, 0, 0 },
1047
    { "secretlevel", USERDEFS_SECRETLEVEL, 0, 0 },
1050
    { "secretlevel", USERDEFS_SECRETLEVEL, 0, 0 },
1048
    { "playerbest", USERDEFS_PLAYERBEST, 0, 0 },
1051
    { "playerbest", USERDEFS_PLAYERBEST, 0, 0 },
1049
1052
1050
    { "const_visibility", USERDEFS_CONST_VISIBILITY, 0, 0 },
1053
    { "const_visibility", USERDEFS_CONST_VISIBILITY, 0, 0 },
1051
    { "uw_framerate", USERDEFS_UW_FRAMERATE, 0, 0 },
1054
    { "uw_framerate", USERDEFS_UW_FRAMERATE, 0, 0 },
1052
    { "camera_time", USERDEFS_CAMERA_TIME, 0, 0 },
1055
    { "camera_time", USERDEFS_CAMERA_TIME, 0, 0 },
1053
    { "folfvel", USERDEFS_FOLFVEL, 0, 0 },
1056
    { "folfvel", USERDEFS_FOLFVEL, 0, 0 },
1054
    { "folavel", USERDEFS_FOLAVEL, 0, 0 },
1057
    { "folavel", USERDEFS_FOLAVEL, 0, 0 },
1055
    { "folx", USERDEFS_FOLX, 0, 0 },
1058
    { "folx", USERDEFS_FOLX, 0, 0 },
1056
    { "foly", USERDEFS_FOLY, 0, 0 },
1059
    { "foly", USERDEFS_FOLY, 0, 0 },
1057
    { "fola", USERDEFS_FOLA, 0, 0 },
1060
    { "fola", USERDEFS_FOLA, 0, 0 },
1058
    { "reccnt", USERDEFS_RECCNT, 0, 0 },
1061
    { "reccnt", USERDEFS_RECCNT, 0, 0 },
1059
1062
1060
    { "m_origin_x", USERDEFS_M_ORIGIN_X, 0, 0 },
1063
    { "m_origin_x", USERDEFS_M_ORIGIN_X, 0, 0 },
1061
    { "m_origin_y", USERDEFS_M_ORIGIN_Y, 0, 0 },
1064
    { "m_origin_y", USERDEFS_M_ORIGIN_Y, 0, 0 },
1062
1065
1063
    { "entered_name", USERDEFS_ENTERED_NAME, 0, 0 },
1066
    { "entered_name", USERDEFS_ENTERED_NAME, 0, 0 },
1064
    { "screen_tilting", USERDEFS_SCREEN_TILTING, 0, 0 },
1067
    { "screen_tilting", USERDEFS_SCREEN_TILTING, 0, 0 },
1065
    { "shadows", USERDEFS_SHADOWS, 0, 0 },
1068
    { "shadows", USERDEFS_SHADOWS, 0, 0 },
1066
    { "fta_on", USERDEFS_FTA_ON, 0, 0 },
1069
    { "fta_on", USERDEFS_FTA_ON, 0, 0 },
1067
    { "executions", USERDEFS_EXECUTIONS, 0, 0 },
1070
    { "executions", USERDEFS_EXECUTIONS, 0, 0 },
1068
    { "auto_run", USERDEFS_AUTO_RUN, 0, 0 },
1071
    { "auto_run", USERDEFS_AUTO_RUN, 0, 0 },
1069
    { "coords", USERDEFS_COORDS, 0, 0 },
1072
    { "coords", USERDEFS_COORDS, 0, 0 },
1070
    { "tickrate", USERDEFS_TICKRATE, 0, 0 },
1073
    { "tickrate", USERDEFS_TICKRATE, 0, 0 },
1071
    { "m_coop", USERDEFS_M_COOP, 0, 0 },
1074
    { "m_coop", USERDEFS_M_COOP, 0, 0 },
1072
    { "coop", USERDEFS_COOP, 0, 0 },
1075
    { "coop", USERDEFS_COOP, 0, 0 },
1073
    { "screen_size", USERDEFS_SCREEN_SIZE, 0, 0 },
1076
    { "screen_size", USERDEFS_SCREEN_SIZE, 0, 0 },
1074
    { "lockout", USERDEFS_LOCKOUT, 0, 0 },
1077
    { "lockout", USERDEFS_LOCKOUT, 0, 0 },
1075
    { "crosshair", USERDEFS_CROSSHAIR, 0, 0 },
1078
    { "crosshair", USERDEFS_CROSSHAIR, 0, 0 },
1076
//    { "wchoice[MAXPLAYERS][MAX_WEAPONS]", USERDEFS_WCHOICE, 0, 0 },
1079
//    { "wchoice[MAXPLAYERS][MAX_WEAPONS]", USERDEFS_WCHOICE, 0, 0 },
1077
    { "playerai", USERDEFS_PLAYERAI, 0, 0 },
1080
    { "playerai", USERDEFS_PLAYERAI, 0, 0 },
1078
    { "respawn_monsters", USERDEFS_RESPAWN_MONSTERS, 0, 0 },
1081
    { "respawn_monsters", USERDEFS_RESPAWN_MONSTERS, 0, 0 },
1079
    { "respawn_items", USERDEFS_RESPAWN_ITEMS, 0, 0 },
1082
    { "respawn_items", USERDEFS_RESPAWN_ITEMS, 0, 0 },
1080
    { "respawn_inventory", USERDEFS_RESPAWN_INVENTORY, 0, 0 },
1083
    { "respawn_inventory", USERDEFS_RESPAWN_INVENTORY, 0, 0 },
1081
    { "recstat", USERDEFS_RECSTAT, 0, 0 },
1084
    { "recstat", USERDEFS_RECSTAT, 0, 0 },
1082
    { "monsters_off", USERDEFS_MONSTERS_OFF, 0, 0 },
1085
    { "monsters_off", USERDEFS_MONSTERS_OFF, 0, 0 },
1083
    { "brightness", USERDEFS_BRIGHTNESS, 0, 0 },
1086
    { "brightness", USERDEFS_BRIGHTNESS, 0, 0 },
1084
    { "m_respawn_items", USERDEFS_M_RESPAWN_ITEMS, 0, 0 },
1087
    { "m_respawn_items", USERDEFS_M_RESPAWN_ITEMS, 0, 0 },
1085
    { "m_respawn_monsters", USERDEFS_M_RESPAWN_MONSTERS, 0, 0 },
1088
    { "m_respawn_monsters", USERDEFS_M_RESPAWN_MONSTERS, 0, 0 },
1086
    { "m_respawn_inventory", USERDEFS_M_RESPAWN_INVENTORY, 0, 0 },
1089
    { "m_respawn_inventory", USERDEFS_M_RESPAWN_INVENTORY, 0, 0 },
1087
    { "m_recstat", USERDEFS_M_RECSTAT, 0, 0 },
1090
    { "m_recstat", USERDEFS_M_RECSTAT, 0, 0 },
1088
    { "m_monsters_off", USERDEFS_M_MONSTERS_OFF, 0, 0 },
1091
    { "m_monsters_off", USERDEFS_M_MONSTERS_OFF, 0, 0 },
1089
    { "detail", USERDEFS_DETAIL, 0, 0 },
1092
    { "detail", USERDEFS_DETAIL, 0, 0 },
1090
    { "m_ffire", USERDEFS_M_FFIRE, 0, 0 },
1093
    { "m_ffire", USERDEFS_M_FFIRE, 0, 0 },
1091
    { "ffire", USERDEFS_FFIRE, 0, 0 },
1094
    { "ffire", USERDEFS_FFIRE, 0, 0 },
1092
    { "m_player_skill", USERDEFS_M_PLAYER_SKILL, 0, 0 },
1095
    { "m_player_skill", USERDEFS_M_PLAYER_SKILL, 0, 0 },
1093
    { "m_level_number", USERDEFS_M_LEVEL_NUMBER, 0, 0 },
1096
    { "m_level_number", USERDEFS_M_LEVEL_NUMBER, 0, 0 },
1094
    { "m_volume_number", USERDEFS_M_VOLUME_NUMBER, 0, 0 },
1097
    { "m_volume_number", USERDEFS_M_VOLUME_NUMBER, 0, 0 },
1095
    { "multimode", USERDEFS_MULTIMODE, 0, 0 },
1098
    { "multimode", USERDEFS_MULTIMODE, 0, 0 },
1096
    { "player_skill", USERDEFS_PLAYER_SKILL, 0, 0 },
1099
    { "player_skill", USERDEFS_PLAYER_SKILL, 0, 0 },
1097
    { "level_number", USERDEFS_LEVEL_NUMBER, 0, 0 },
1100
    { "level_number", USERDEFS_LEVEL_NUMBER, 0, 0 },
1098
    { "volume_number", USERDEFS_VOLUME_NUMBER, 0, 0 },
1101
    { "volume_number", USERDEFS_VOLUME_NUMBER, 0, 0 },
1099
    { "m_marker", USERDEFS_M_MARKER, 0, 0 },
1102
    { "m_marker", USERDEFS_M_MARKER, 0, 0 },
1100
    { "marker", USERDEFS_MARKER, 0, 0 },
1103
    { "marker", USERDEFS_MARKER, 0, 0 },
1101
    { "mouseflip", USERDEFS_MOUSEFLIP, 0, 0 },
1104
    { "mouseflip", USERDEFS_MOUSEFLIP, 0, 0 },
1102
    { "statusbarscale", USERDEFS_STATUSBARSCALE, 0, 0 },
1105
    { "statusbarscale", USERDEFS_STATUSBARSCALE, 0, 0 },
1103
    { "drawweapon", USERDEFS_DRAWWEAPON, 0, 0 },
1106
    { "drawweapon", USERDEFS_DRAWWEAPON, 0, 0 },
1104
    { "mouseaiming", USERDEFS_MOUSEAIMING, 0, 0 },
1107
    { "mouseaiming", USERDEFS_MOUSEAIMING, 0, 0 },
1105
    { "weaponswitch", USERDEFS_WEAPONSWITCH, 0, 0 },
1108
    { "weaponswitch", USERDEFS_WEAPONSWITCH, 0, 0 },
1106
    { "democams", USERDEFS_DEMOCAMS, 0, 0 },
1109
    { "democams", USERDEFS_DEMOCAMS, 0, 0 },
1107
    { "color", USERDEFS_COLOR, 0, 0 },
1110
    { "color", USERDEFS_COLOR, 0, 0 },
1108
    { "msgdisptime", USERDEFS_MSGDISPTIME, 0, 0 },
1111
    { "msgdisptime", USERDEFS_MSGDISPTIME, 0, 0 },
1109
    { "statusbarmode", USERDEFS_STATUSBARMODE, 0, 0 },
1112
    { "statusbarmode", USERDEFS_STATUSBARMODE, 0, 0 },
1110
    { "m_noexits", USERDEFS_M_NOEXITS, 0, 0 },
1113
    { "m_noexits", USERDEFS_M_NOEXITS, 0, 0 },
1111
    { "noexits", USERDEFS_NOEXITS, 0, 0 },
1114
    { "noexits", USERDEFS_NOEXITS, 0, 0 },
1112
    { "autovote", USERDEFS_AUTOVOTE, 0, 0 },
1115
    { "autovote", USERDEFS_AUTOVOTE, 0, 0 },
1113
    { "automsg", USERDEFS_AUTOMSG, 0, 0 },
1116
    { "automsg", USERDEFS_AUTOMSG, 0, 0 },
1114
    { "idplayers", USERDEFS_IDPLAYERS, 0, 0 },
1117
    { "idplayers", USERDEFS_IDPLAYERS, 0, 0 },
1115
    { "team", USERDEFS_TEAM, 0, 0 },
1118
    { "team", USERDEFS_TEAM, 0, 0 },
1116
    { "viewbob", USERDEFS_VIEWBOB, 0, 0 },
1119
    { "viewbob", USERDEFS_VIEWBOB, 0, 0 },
1117
    { "weaponsway", USERDEFS_WEAPONSWAY, 0, 0 },
1120
    { "weaponsway", USERDEFS_WEAPONSWAY, 0, 0 },
1118
    { "angleinterpolation", USERDEFS_ANGLEINTERPOLATION, 0, 0 },
1121
    { "angleinterpolation", USERDEFS_ANGLEINTERPOLATION, 0, 0 },
1119
    { "obituaries", USERDEFS_OBITUARIES, 0, 0 },
1122
    { "obituaries", USERDEFS_OBITUARIES, 0, 0 },
1120
    { "levelstats", USERDEFS_LEVELSTATS, 0, 0 },
1123
    { "levelstats", USERDEFS_LEVELSTATS, 0, 0 },
1121
    { "crosshairscale", USERDEFS_CROSSHAIRSCALE, 0, 0 },
1124
    { "crosshairscale", USERDEFS_CROSSHAIRSCALE, 0, 0 },
1122
    { "althud", USERDEFS_ALTHUD, 0, 0 },
1125
    { "althud", USERDEFS_ALTHUD, 0, 0 },
1123
    { "display_bonus_screen", USERDEFS_DISPLAY_BONUS_SCREEN, 0, 0 },
1126
    { "display_bonus_screen", USERDEFS_DISPLAY_BONUS_SCREEN, 0, 0 },
1124
    { "show_level_text", USERDEFS_SHOW_LEVEL_TEXT, 0, 0 },
1127
    { "show_level_text", USERDEFS_SHOW_LEVEL_TEXT, 0, 0 },
1125
    { "weaponscale", USERDEFS_WEAPONSCALE, 0, 0 },
1128
    { "weaponscale", USERDEFS_WEAPONSCALE, 0, 0 },
1126
    { "textscale", USERDEFS_TEXTSCALE, 0, 0 },
1129
    { "textscale", USERDEFS_TEXTSCALE, 0, 0 },
1127
    { "runkey_mode", USERDEFS_RUNKEY_MODE, 0, 0 },
1130
    { "runkey_mode", USERDEFS_RUNKEY_MODE, 0, 0 },
1128
    { "musictoggle", USERDEFS_MUSICTOGGLE, 0, 0 },
1131
    { "musictoggle", USERDEFS_MUSICTOGGLE, 0, 0 },
1129
    { "", -1, 0, 0  }     // END OF LIST
1132
    { "", -1, 0, 0  }     // END OF LIST
1130
};
1133
};
1131
1134
1132
const memberlabel_t InputLabels[]=
1135
const memberlabel_t InputLabels[]=
1133
{
1136
{
1134
    { "avel", INPUT_AVEL, 0, 0 },
1137
    { "avel", INPUT_AVEL, 0, 0 },
1135
    { "horz", INPUT_HORZ, 0, 0 },
1138
    { "horz", INPUT_HORZ, 0, 0 },
1136
    { "fvel", INPUT_FVEL, 0, 0 },
1139
    { "fvel", INPUT_FVEL, 0, 0 },
1137
    { "svel", INPUT_SVEL, 0, 0 },
1140
    { "svel", INPUT_SVEL, 0, 0 },
1138
    { "bits", INPUT_BITS, 0, 0 },
1141
    { "bits", INPUT_BITS, 0, 0 },
1139
    { "extbits", INPUT_EXTBITS, 0, 0 },
1142
    { "extbits", INPUT_EXTBITS, 0, 0 },
1140
    { "", -1, 0, 0  }     // END OF LIST
1143
    { "", -1, 0, 0  }     // END OF LIST
1141
};
1144
};
1142
1145
1143
#endif
1146
#endif
1144
1147
1145
char *bitptr; // pointer to bitmap of which bytecode positions contain pointers
1148
char *bitptr; // pointer to bitmap of which bytecode positions contain pointers
1146
#define BITPTR_POINTER 1
1149
#define BITPTR_POINTER 1
1147
1150
1148
#if !defined LUNATIC
1151
#if !defined LUNATIC
1149
hashtable_t h_gamevars    = { MAXGAMEVARS>>1, NULL };
1152
hashtable_t h_gamevars    = { MAXGAMEVARS>>1, NULL };
1150
hashtable_t h_arrays      = { MAXGAMEARRAYS>>1, NULL };
1153
hashtable_t h_arrays      = { MAXGAMEARRAYS>>1, NULL };
1151
hashtable_t h_labels      = { 11264>>1, NULL };
1154
hashtable_t h_labels      = { 11264>>1, NULL };
1152
1155
1153
static hashtable_t h_keywords       = { CON_END>>1, NULL };
1156
static hashtable_t h_keywords       = { CON_END>>1, NULL };
1154
1157
1155
static hashtable_t sectorH     = { SECTOR_END>>1, NULL };
1158
static hashtable_t sectorH     = { SECTOR_END>>1, NULL };
1156
static hashtable_t wallH       = { WALL_END>>1, NULL };
1159
static hashtable_t wallH       = { WALL_END>>1, NULL };
1157
static hashtable_t userdefH    = { USERDEFS_END>>1, NULL };
1160
static hashtable_t userdefH    = { USERDEFS_END>>1, NULL };
1158
1161
1159
static hashtable_t projectileH = { PROJ_END>>1, NULL };
1162
static hashtable_t projectileH = { PROJ_END>>1, NULL };
1160
static hashtable_t playerH     = { PLAYER_END>>1, NULL };
1163
static hashtable_t playerH     = { PLAYER_END>>1, NULL };
1161
static hashtable_t inputH      = { INPUT_END>>1, NULL };
1164
static hashtable_t inputH      = { INPUT_END>>1, NULL };
1162
static hashtable_t actorH      = { ACTOR_END>>1, NULL };
1165
static hashtable_t actorH      = { ACTOR_END>>1, NULL };
1163
static hashtable_t tspriteH    = { ACTOR_END>>1, NULL };
1166
static hashtable_t tspriteH    = { ACTOR_END>>1, NULL };
1164
1167
1165
void C_InitHashes()
1168
void C_InitHashes()
1166
{
1169
{
1167
    int32_t i;
1170
    int32_t i;
1168
1171
1169
    hash_init(&h_gamevars);
1172
    hash_init(&h_gamevars);
1170
    hash_init(&h_arrays);
1173
    hash_init(&h_arrays);
1171
    hash_init(&h_labels);
1174
    hash_init(&h_labels);
1172
    inithashnames();
1175
    inithashnames();
1173
    initsoundhashnames();
1176
    initsoundhashnames();
1174
1177
1175
    hash_init(&h_keywords);
1178
    hash_init(&h_keywords);
1176
    hash_init(&sectorH);
1179
    hash_init(&sectorH);
1177
    hash_init(&wallH);
1180
    hash_init(&wallH);
1178
    hash_init(&userdefH);
1181
    hash_init(&userdefH);
1179
    hash_init(&projectileH);
1182
    hash_init(&projectileH);
1180
    hash_init(&playerH);
1183
    hash_init(&playerH);
1181
    hash_init(&inputH);
1184
    hash_init(&inputH);
1182
    hash_init(&actorH);
1185
    hash_init(&actorH);
1183
    hash_init(&tspriteH);
1186
    hash_init(&tspriteH);
1184
1187
1185
    g_scriptLastKeyword = NUMKEYWORDS-1;
1188
    g_scriptLastKeyword = NUMKEYWORDS-1;
1186
    // determine last CON keyword for backward compatibility with older mods
1189
    // determine last CON keyword for backward compatibility with older mods
1187
    if (g_scriptDateVersion < g_keywdate[NUMKEYWDATES-1].date)
1190
    if (g_scriptDateVersion < g_keywdate[NUMKEYWDATES-1].date)
1188
    {
1191
    {
1189
        for (i=NUMKEYWDATES-1; i>=0; i--)
1192
        for (i=NUMKEYWDATES-1; i>=0; i--)
1190
        {
1193
        {
1191
            if (g_scriptDateVersion >= g_keywdate[i].date)
1194
            if (g_scriptDateVersion >= g_keywdate[i].date)
1192
            {
1195
            {
1193
                g_scriptLastKeyword = g_keywdate[i].keyw;
1196
                g_scriptLastKeyword = g_keywdate[i].keyw;
1194
                break;
1197
                break;
1195
            }
1198
            }
1196
        }
1199
        }
1197
1200
1198
        if (i<0)
1201
        if (i<0)
1199
            g_scriptLastKeyword = g_keywdate[0].keyw-1;  // may be slightly imprecise
1202
            g_scriptLastKeyword = g_keywdate[0].keyw-1;  // may be slightly imprecise
1200
    }
1203
    }
1201
1204
1202
    for (i=g_scriptLastKeyword; i>=0; i--) hash_add(&h_keywords,keyw[i],i,0);
1205
    for (i=g_scriptLastKeyword; i>=0; i--) hash_add(&h_keywords,keyw[i],i,0);
1203
    for (i=0; SectorLabels[i].lId >= 0; i++) hash_add(&sectorH,SectorLabels[i].name,i,0);
1206
    for (i=0; SectorLabels[i].lId >= 0; i++) hash_add(&sectorH,SectorLabels[i].name,i,0);
1204
    for (i=0; WallLabels[i].lId >= 0; i++) hash_add(&wallH,WallLabels[i].name,i,0);
1207
    for (i=0; WallLabels[i].lId >= 0; i++) hash_add(&wallH,WallLabels[i].name,i,0);
1205
    for (i=0; UserdefsLabels[i].lId >= 0; i++) hash_add(&userdefH,UserdefsLabels[i].name,i,0);
1208
    for (i=0; UserdefsLabels[i].lId >= 0; i++) hash_add(&userdefH,UserdefsLabels[i].name,i,0);
1206
    for (i=0; ProjectileLabels[i].lId >= 0; i++) hash_add(&projectileH,ProjectileLabels[i].name,i,0);
1209
    for (i=0; ProjectileLabels[i].lId >= 0; i++) hash_add(&projectileH,ProjectileLabels[i].name,i,0);
1207
    for (i=0; PlayerLabels[i].lId >= 0; i++) hash_add(&playerH,PlayerLabels[i].name,i,0);
1210
    for (i=0; PlayerLabels[i].lId >= 0; i++) hash_add(&playerH,PlayerLabels[i].name,i,0);
1208
    for (i=0; InputLabels[i].lId >= 0; i++) hash_add(&inputH,InputLabels[i].name,i,0);
1211
    for (i=0; InputLabels[i].lId >= 0; i++) hash_add(&inputH,InputLabels[i].name,i,0);
1209
    for (i=0; ActorLabels[i].lId >= 0; i++) hash_add(&actorH,ActorLabels[i].name,i,0);
1212
    for (i=0; ActorLabels[i].lId >= 0; i++) hash_add(&actorH,ActorLabels[i].name,i,0);
1210
    for (i=0; TsprLabels[i].lId >= 0; i++) hash_add(&tspriteH,TsprLabels[i].name,i,0);
1213
    for (i=0; TsprLabels[i].lId >= 0; i++) hash_add(&tspriteH,TsprLabels[i].name,i,0);
1211
}
1214
}
1212
1215
1213
// "magic" number for { and }, overrides line number in compiled code for later detection
1216
// "magic" number for { and }, overrides line number in compiled code for later detection
1214
#define IFELSE_MAGIC 31337
1217
#define IFELSE_MAGIC 31337
1215
static int32_t g_ifElseAborted;
1218
static int32_t g_ifElseAborted;
1216
1219
1217
static int32_t C_SetScriptSize(int32_t newsize)
1220
static int32_t C_SetScriptSize(int32_t newsize)
1218
{
1221
{
1219
    intptr_t oscriptPtr = (unsigned)(g_scriptPtr-script);
1222
    intptr_t oscriptPtr = (unsigned)(g_scriptPtr-script);
1220
    intptr_t ocaseScriptPtr = (unsigned)(g_caseScriptPtr-script);
1223
    intptr_t ocaseScriptPtr = (unsigned)(g_caseScriptPtr-script);
1221
    intptr_t oparsingEventPtr = (unsigned)(g_parsingEventPtr-script);
1224
    intptr_t oparsingEventPtr = (unsigned)(g_parsingEventPtr-script);
1222
    intptr_t oparsingActorPtr = (unsigned)(g_parsingActorPtr-script);
1225
    intptr_t oparsingActorPtr = (unsigned)(g_parsingActorPtr-script);
1223
    intptr_t *newscript;
1226
    intptr_t *newscript;
1224
    intptr_t i, j;
1227
    intptr_t i, j;
1225
    int32_t osize = g_scriptSize;
1228
    int32_t osize = g_scriptSize;
1226
    char *scriptptrs;
1229
    char *scriptptrs;
1227
    char *newbitptr;
1230
    char *newbitptr;
1228
1231
1229
    scriptptrs = (char *)Xcalloc(1, g_scriptSize * sizeof(uint8_t));
1232
    scriptptrs = (char *)Xcalloc(1, g_scriptSize * sizeof(uint8_t));
1230
1233
1231
    for (i=g_scriptSize-1; i>=0; i--)
1234
    for (i=g_scriptSize-1; i>=0; i--)
1232
    {
1235
    {
1233
        if (bitptr[i>>3]&(BITPTR_POINTER<<(i&7)))
1236
        if (bitptr[i>>3]&(BITPTR_POINTER<<(i&7)))
1234
        {
1237
        {
1235
            if (EDUKE32_PREDICT_FALSE((intptr_t)script[i] < (intptr_t)&script[0] || (intptr_t)script[i] >= (intptr_t)&script[g_scriptSize]))
1238
            if (EDUKE32_PREDICT_FALSE((intptr_t)script[i] < (intptr_t)&script[0] || (intptr_t)script[i] >= (intptr_t)&script[g_scriptSize]))
1236
            {
1239
            {
1237
                g_numCompilerErrors++;
1240
                g_numCompilerErrors++;
1238
                initprintf("Internal compiler error at %" PRIdPTR " (0x%" PRIxPTR ")\n",i,i);
1241
                initprintf("Internal compiler error at %" PRIdPTR " (0x%" PRIxPTR ")\n",i,i);
1239
            }
1242
            }
1240
1243
1241
            scriptptrs[i] = 1;
1244
            scriptptrs[i] = 1;
1242
            script[i] -= (intptr_t)&script[0];
1245
            script[i] -= (intptr_t)&script[0];
1243
        }
1246
        }
1244
        else scriptptrs[i] = 0;
1247
        else scriptptrs[i] = 0;
1245
    }
1248
    }
1246
1249
1247
    G_Util_PtrToIdx2(&g_tile[0].execPtr, MAXTILES, sizeof(tiledata_t), script, P2I_FWD_NON0);
1250
    G_Util_PtrToIdx2(&g_tile[0].execPtr, MAXTILES, sizeof(tiledata_t), script, P2I_FWD_NON0);
1248
    G_Util_PtrToIdx2(&g_tile[0].loadPtr, MAXTILES, sizeof(tiledata_t), script, P2I_FWD_NON0);
1251
    G_Util_PtrToIdx2(&g_tile[0].loadPtr, MAXTILES, sizeof(tiledata_t), script, P2I_FWD_NON0);
1249
    G_Util_PtrToIdx(apScriptGameEvent, MAXGAMEEVENTS, script, P2I_FWD_NON0);
1252
    G_Util_PtrToIdx(apScriptGameEvent, MAXGAMEEVENTS, script, P2I_FWD_NON0);
1250
1253
1251
    initprintf("Resizing code buffer to %d*%d bytes\n",newsize, (int32_t)sizeof(intptr_t));
1254
    initprintf("Resizing code buffer to %d*%d bytes\n",newsize, (int32_t)sizeof(intptr_t));
1252
1255
1253
    newscript = (intptr_t *)Xrealloc(script, newsize * sizeof(intptr_t));
1256
    newscript = (intptr_t *)Xrealloc(script, newsize * sizeof(intptr_t));
1254
    newbitptr = (char *)Xcalloc(1,(((newsize+7)>>3)+1) * sizeof(uint8_t));
1257
    newbitptr = (char *)Xcalloc(1,(((newsize+7)>>3)+1) * sizeof(uint8_t));
1255
1258
1256
    if (newsize >= osize)
1259
    if (newsize >= osize)
1257
    {
1260
    {
1258
        Bmemset(&newscript[0]+osize,0,(newsize-osize) * sizeof(uint8_t));
1261
        Bmemset(&newscript[0]+osize,0,(newsize-osize) * sizeof(uint8_t));
1259
        Bmemcpy(newbitptr,bitptr,sizeof(uint8_t) *((osize+7)>>3));
1262
        Bmemcpy(newbitptr,bitptr,sizeof(uint8_t) *((osize+7)>>3));
1260
    }
1263
    }
1261
    else
1264
    else
1262
        Bmemcpy(newbitptr,bitptr,sizeof(uint8_t) *((newsize+7)>>3));
1265
        Bmemcpy(newbitptr,bitptr,sizeof(uint8_t) *((newsize+7)>>3));
1263
1266
1264
    Bfree(bitptr);
1267
    Bfree(bitptr);
1265
    bitptr = newbitptr;
1268
    bitptr = newbitptr;
1266
    if (script != newscript)
1269
    if (script != newscript)
1267
    {
1270
    {
1268
        initprintf("Relocating compiled code from to 0x%" PRIxPTR " to 0x%" PRIxPTR "\n", (intptr_t)script, (intptr_t)newscript);
1271
        initprintf("Relocating compiled code from to 0x%" PRIxPTR " to 0x%" PRIxPTR "\n", (intptr_t)script, (intptr_t)newscript);
1269
        script = newscript;
1272
        script = newscript;
1270
    }
1273
    }
1271
1274
1272
    g_scriptSize = newsize;
1275
    g_scriptSize = newsize;
1273
    g_scriptPtr = (intptr_t *)(script+oscriptPtr);
1276
    g_scriptPtr = (intptr_t *)(script+oscriptPtr);
1274
1277
1275
    if (g_caseScriptPtr)
1278
    if (g_caseScriptPtr)
1276
        g_caseScriptPtr = (intptr_t *)(script+ocaseScriptPtr);
1279
        g_caseScriptPtr = (intptr_t *)(script+ocaseScriptPtr);
1277
1280
1278
    if (g_parsingEventPtr)
1281
    if (g_parsingEventPtr)
1279
        g_parsingEventPtr = (intptr_t *)(script+oparsingEventPtr);
1282
        g_parsingEventPtr = (intptr_t *)(script+oparsingEventPtr);
1280
1283
1281
    if (g_parsingActorPtr)
1284
    if (g_parsingActorPtr)
1282
        g_parsingActorPtr = (intptr_t *)(script+oparsingActorPtr);
1285
        g_parsingActorPtr = (intptr_t *)(script+oparsingActorPtr);
1283
1286
1284
    for (i=(((newsize>=osize)?osize:newsize))-1; i>=0; i--)
1287
    for (i=(((newsize>=osize)?osize:newsize))-1; i>=0; i--)
1285
        if (scriptptrs[i])
1288
        if (scriptptrs[i])
1286
        {
1289
        {
1287
            j = (intptr_t)script[i]+(intptr_t)&script[0];
1290
            j = (intptr_t)script[i]+(intptr_t)&script[0];
1288
            script[i] = j;
1291
            script[i] = j;
1289
        }
1292
        }
1290
1293
1291
    G_Util_PtrToIdx2(&g_tile[0].execPtr, MAXTILES, sizeof(tiledata_t), script, P2I_BACK_NON0);
1294
    G_Util_PtrToIdx2(&g_tile[0].execPtr, MAXTILES, sizeof(tiledata_t), script, P2I_BACK_NON0);
1292
    G_Util_PtrToIdx2(&g_tile[0].loadPtr, MAXTILES, sizeof(tiledata_t), script, P2I_BACK_NON0);
1295
    G_Util_PtrToIdx2(&g_tile[0].loadPtr, MAXTILES, sizeof(tiledata_t), script, P2I_BACK_NON0);
1293
    G_Util_PtrToIdx(apScriptGameEvent, MAXGAMEEVENTS, script, P2I_BACK_NON0);
1296
    G_Util_PtrToIdx(apScriptGameEvent, MAXGAMEEVENTS, script, P2I_BACK_NON0);
1294
1297
1295
    Bfree(scriptptrs);
1298
    Bfree(scriptptrs);
1296
    return 0;
1299
    return 0;
1297
}
1300
}
1298
1301
1299
static int32_t ispecial(const char c)
1302
static int32_t ispecial(const char c)
1300
{
1303
{
1301
    if (c == ' ' || c == 0x0d || c == '(' || c == ')' ||
1304
    if (c == ' ' || c == 0x0d || c == '(' || c == ')' ||
1302
            c == ',' || c == ';' || (c == 0x0a /*&& ++g_lineNumber*/))
1305
            c == ',' || c == ';' || (c == 0x0a /*&& ++g_lineNumber*/))
1303
        return 1;
1306
        return 1;
1304
1307
1305
    return 0;
1308
    return 0;
1306
}
1309
}
1307
1310
1308
#define C_NextLine() while (*textptr != 0x0a && *textptr != 0x0d && *textptr != 0) textptr++
1311
#define C_NextLine() while (*textptr != 0x0a && *textptr != 0x0d && *textptr != 0) textptr++
1309
1312
1310
static int32_t C_SkipComments(void)
1313
static int32_t C_SkipComments(void)
1311
{
1314
{
1312
    do
1315
    do
1313
    {
1316
    {
1314
        switch (*textptr)
1317
        switch (*textptr)
1315
        {
1318
        {
1316
        case '\n':
1319
        case '\n':
1317
            g_lineNumber++;
1320
            g_lineNumber++;
1318
        case ' ':
1321
        case ' ':
1319
        case '\t':
1322
        case '\t':
1320
        case '\r':
1323
        case '\r':
1321
        case 0x1a:
1324
        case 0x1a:
1322
            textptr++;
1325
            textptr++;
1323
            break;
1326
            break;
1324
        case '/':
1327
        case '/':
1325
            switch (textptr[1])
1328
            switch (textptr[1])
1326
            {
1329
            {
1327
            case '/': // C++ style comment
1330
            case '/': // C++ style comment
1328
                if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
1331
                if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
1329
                    initprintf("%s:%d: debug: got comment.\n",g_szScriptFileName,g_lineNumber);
1332
                    initprintf("%s:%d: debug: got comment.\n",g_szScriptFileName,g_lineNumber);
1330
                C_NextLine();
1333
                C_NextLine();
1331
                continue;
1334
                continue;
1332
            case '*': // beginning of a C style comment
1335
            case '*': // beginning of a C style comment
1333
                if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
1336
                if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
1334
                    initprintf("%s:%d: debug: got start of comment block.\n",g_szScriptFileName,g_lineNumber);
1337
                    initprintf("%s:%d: debug: got start of comment block.\n",g_szScriptFileName,g_lineNumber);
1335
                do
1338
                do
1336
                {
1339
                {
1337
                    if (*textptr == '\n')
1340
                    if (*textptr == '\n')
1338
                        g_lineNumber++;
1341
                        g_lineNumber++;
1339
                    textptr++;
1342
                    textptr++;
1340
                }
1343
                }
1341
                while (*textptr && (textptr[0] != '*' || textptr[1] != '/'));
1344
                while (*textptr && (textptr[0] != '*' || textptr[1] != '/'));
1342
1345
1343
                if (EDUKE32_PREDICT_FALSE(!*textptr))
1346
                if (EDUKE32_PREDICT_FALSE(!*textptr))
1344
                {
1347
                {
1345
                    if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug)
1348
                    if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug)
1346
                        initprintf("%s:%d: debug: EOF in comment!\n",g_szScriptFileName,g_lineNumber);
1349
                        initprintf("%s:%d: debug: EOF in comment!\n",g_szScriptFileName,g_lineNumber);
1347
                    C_ReportError(-1);
1350
                    C_ReportError(-1);
1348
                    initprintf("%s:%d: error: found `/*' with no `*/'.\n",g_szScriptFileName,g_lineNumber);
1351
                    initprintf("%s:%d: error: found `/*' with no `*/'.\n",g_szScriptFileName,g_lineNumber);
1349
                    g_parsingActorPtr = NULL; g_processingState = g_numBraces = 0;
1352
                    g_parsingActorPtr = NULL; g_processingState = g_numBraces = 0;
1350
                    g_numCompilerErrors++;
1353
                    g_numCompilerErrors++;
1351
                    continue;
1354
                    continue;
1352
                }
1355
                }
1353
1356
1354
                if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
1357
                if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
1355
                    initprintf("%s:%d: debug: got end of comment block.\n",g_szScriptFileName,g_lineNumber);
1358
                    initprintf("%s:%d: debug: got end of comment block.\n",g_szScriptFileName,g_lineNumber);
1356
1359
1357
                textptr+=2;
1360
                textptr+=2;
1358
                continue;
1361
                continue;
1359
            }
1362
            }
1360
            continue;
1363
            continue;
1361
1364
1362
        default:
1365
        default:
1363
            if (ispecial(*textptr))
1366
            if (ispecial(*textptr))
1364
            {
1367
            {
1365
                textptr++;
1368
                textptr++;
1366
                continue;
1369
                continue;
1367
            }
1370
            }
1368
        case 0: // EOF
1371
        case 0: // EOF
1369
            return ((g_scriptPtr-script) > (g_scriptSize-32)) ? C_SetScriptSize(g_scriptSize<<1) : 0;
1372
            return ((g_scriptPtr-script) > (g_scriptSize-32)) ? C_SetScriptSize(g_scriptSize<<1) : 0;
1370
        }
1373
        }
1371
    }
1374
    }
1372
    while (1);
1375
    while (1);
1373
}
1376
}
1374
1377
1375
#define GetDefID(szGameLabel) hash_find(&h_gamevars,szGameLabel)
1378
#define GetDefID(szGameLabel) hash_find(&h_gamevars,szGameLabel)
1376
#define GetADefID(szGameLabel) hash_find(&h_arrays,szGameLabel)
1379
#define GetADefID(szGameLabel) hash_find(&h_arrays,szGameLabel)
1377
1380
1378
static int32_t isaltok(const char c)
1381
static int32_t isaltok(const char c)
1379
{
1382
{
1380
    return (isalnum(c) || c == '{' || c == '}' || c == '/' || c == '\\' ||
1383
    return (isalnum(c) || c == '{' || c == '}' || c == '/' || c == '\\' ||
1381
            c == '*' || c == '-' || c == '_' || c == '.');
1384
            c == '*' || c == '-' || c == '_' || c == '.');
1382
}
1385
}
1383
1386
1384
static int32_t C_IsLabelChar(const char c, int32_t i)
1387
static int32_t C_IsLabelChar(const char c, int32_t i)
1385
{
1388
{
1386
    return (isalnum(c) || c=='_' || c=='*' || c=='?' ||
1389
    return (isalnum(c) || c=='_' || c=='*' || c=='?' ||
1387
            (i > 0 && (c=='+' || c=='-' || c=='.')));
1390
            (i > 0 && (c=='+' || c=='-' || c=='.')));
1388
}
1391
}
1389
1392
1390
static inline int32_t C_GetLabelNameID(const memberlabel_t *pLabel, hashtable_t *tH, const char *psz)
1393
static inline int32_t C_GetLabelNameID(const memberlabel_t *pLabel, hashtable_t *tH, const char *psz)
1391
{
1394
{
1392
    // find the label psz in the table pLabel.
1395
    // find the label psz in the table pLabel.
1393
    // returns the ID for the label, or -1
1396
    // returns the ID for the label, or -1
1394
1397
1395
    int32_t l = hash_findcase(tH,psz);
1398
    int32_t l = hash_findcase(tH,psz);
1396
    return (l >= 0) ? pLabel[l].lId : -1;
1399
    return (l >= 0) ? pLabel[l].lId : -1;
1397
}
1400
}
1398
1401
1399
static inline int32_t C_GetLabelNameOffset(hashtable_t *tH, const char *psz)
1402
static inline int32_t C_GetLabelNameOffset(hashtable_t *tH, const char *psz)
1400
{
1403
{
1401
    // find the label psz in the table pLabel.
1404
    // find the label psz in the table pLabel.
1402
    // returns the offset in the array for the label, or -1
1405
    // returns the offset in the array for the label, or -1
1403
1406
1404
    return hash_findcase(tH,psz);
1407
    return hash_findcase(tH,psz);
1405
}
1408
}
1406
1409
1407
static void C_GetNextLabelName(void)
1410
static void C_GetNextLabelName(void)
1408
{
1411
{
1409
    int32_t i = 0;
1412
    int32_t i = 0;
1410
1413
1411
    C_SkipComments();
1414
    C_SkipComments();
1412
1415
1413
//    while (ispecial(*textptr) == 0 && *textptr!='['&& *textptr!=']' && *textptr!='\t' && *textptr!='\n' && *textptr!='\r')
1416
//    while (ispecial(*textptr) == 0 && *textptr!='['&& *textptr!=']' && *textptr!='\t' && *textptr!='\n' && *textptr!='\r')
1414
    while (C_IsLabelChar(*textptr, i))
1417
    while (C_IsLabelChar(*textptr, i))
1415
        label[(g_numLabels<<6)+(i++)] = *(textptr++);
1418
        label[(g_numLabels<<6)+(i++)] = *(textptr++);
1416
    label[(g_numLabels<<6)+i] = 0;
1419
    label[(g_numLabels<<6)+i] = 0;
1417
1420
1418
    if (!(g_numCompilerErrors|g_numCompilerWarnings) && g_scriptDebug > 1)
1421
    if (!(g_numCompilerErrors|g_numCompilerWarnings) && g_scriptDebug > 1)
1419
        initprintf("%s:%d: debug: got label `%s'.\n",g_szScriptFileName,g_lineNumber,label+(g_numLabels<<6));
1422
        initprintf("%s:%d: debug: got label `%s'.\n",g_szScriptFileName,g_lineNumber,label+(g_numLabels<<6));
1420
}
1423
}
1421
1424
1422
static int32_t C_GetKeyword(void)
1425
static int32_t C_GetKeyword(void)
1423
{
1426
{
1424
    int32_t i;
1427
    int32_t i;
1425
    char *temptextptr;
1428
    char *temptextptr;
1426
1429
1427
    C_SkipComments();
1430
    C_SkipComments();
1428
1431
1429
    temptextptr = textptr;
1432
    temptextptr = textptr;
1430
1433
1431
    if (*temptextptr == 0) // EOF
1434
    if (*temptextptr == 0) // EOF
1432
        return -2;
1435
        return -2;
1433
1436
1434
    while (isaltok(*temptextptr) == 0)
1437
    while (isaltok(*temptextptr) == 0)
1435
    {
1438
    {
1436
        temptextptr++;
1439
        temptextptr++;
1437
        if (*temptextptr == 0)
1440
        if (*temptextptr == 0)
1438
            return 0;
1441
            return 0;
1439
    }
1442
    }
1440