Subversion Repositories eduke32

Rev

Rev 4969 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4969 Rev 4970
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
    "<null>"
555
    "<null>"
556
};
556
};
557
#endif
557
#endif
558
558
559
// KEEPINSYNC with enum GameEvent_t and lunatic/con_lang.lua
559
// KEEPINSYNC with enum GameEvent_t and lunatic/con_lang.lua
560
const char *EventNames[MAXEVENTS] =
560
const char *EventNames[MAXEVENTS] =
561
{
561
{
562
    "EVENT_INIT",
562
    "EVENT_INIT",
563
    "EVENT_ENTERLEVEL",
563
    "EVENT_ENTERLEVEL",
564
    "EVENT_RESETWEAPONS",
564
    "EVENT_RESETWEAPONS",
565
    "EVENT_RESETINVENTORY",
565
    "EVENT_RESETINVENTORY",
566
    "EVENT_HOLSTER",
566
    "EVENT_HOLSTER",
567
    "EVENT_LOOKLEFT",
567
    "EVENT_LOOKLEFT",
568
    "EVENT_LOOKRIGHT",
568
    "EVENT_LOOKRIGHT",
569
    "EVENT_SOARUP",
569
    "EVENT_SOARUP",
570
    "EVENT_SOARDOWN",
570
    "EVENT_SOARDOWN",
571
    "EVENT_CROUCH",
571
    "EVENT_CROUCH",
572
    "EVENT_JUMP",
572
    "EVENT_JUMP",
573
    "EVENT_RETURNTOCENTER",
573
    "EVENT_RETURNTOCENTER",
574
    "EVENT_LOOKUP",
574
    "EVENT_LOOKUP",
575
    "EVENT_LOOKDOWN",
575
    "EVENT_LOOKDOWN",
576
    "EVENT_AIMUP",
576
    "EVENT_AIMUP",
577
    "EVENT_FIRE",
577
    "EVENT_FIRE",
578
    "EVENT_CHANGEWEAPON",
578
    "EVENT_CHANGEWEAPON",
579
    "EVENT_GETSHOTRANGE",
579
    "EVENT_GETSHOTRANGE",
580
    "EVENT_GETAUTOAIMANGLE",
580
    "EVENT_GETAUTOAIMANGLE",
581
    "EVENT_GETLOADTILE",
581
    "EVENT_GETLOADTILE",
582
    "EVENT_CHEATGETSTEROIDS",
582
    "EVENT_CHEATGETSTEROIDS",
583
    "EVENT_CHEATGETHEAT",
583
    "EVENT_CHEATGETHEAT",
584
    "EVENT_CHEATGETBOOT",
584
    "EVENT_CHEATGETBOOT",
585
    "EVENT_CHEATGETSHIELD",
585
    "EVENT_CHEATGETSHIELD",
586
    "EVENT_CHEATGETSCUBA",
586
    "EVENT_CHEATGETSCUBA",
587
    "EVENT_CHEATGETHOLODUKE",
587
    "EVENT_CHEATGETHOLODUKE",
588
    "EVENT_CHEATGETJETPACK",
588
    "EVENT_CHEATGETJETPACK",
589
    "EVENT_CHEATGETFIRSTAID",
589
    "EVENT_CHEATGETFIRSTAID",
590
    "EVENT_QUICKKICK",
590
    "EVENT_QUICKKICK",
591
    "EVENT_INVENTORY",
591
    "EVENT_INVENTORY",
592
    "EVENT_USENIGHTVISION",
592
    "EVENT_USENIGHTVISION",
593
    "EVENT_USESTEROIDS",
593
    "EVENT_USESTEROIDS",
594
    "EVENT_INVENTORYLEFT",
594
    "EVENT_INVENTORYLEFT",
595
    "EVENT_INVENTORYRIGHT",
595
    "EVENT_INVENTORYRIGHT",
596
    "EVENT_HOLODUKEON",
596
    "EVENT_HOLODUKEON",
597
    "EVENT_HOLODUKEOFF",
597
    "EVENT_HOLODUKEOFF",
598
    "EVENT_USEMEDKIT",
598
    "EVENT_USEMEDKIT",
599
    "EVENT_USEJETPACK",
599
    "EVENT_USEJETPACK",
600
    "EVENT_TURNAROUND",
600
    "EVENT_TURNAROUND",
601
    "EVENT_DISPLAYWEAPON",
601
    "EVENT_DISPLAYWEAPON",
602
    "EVENT_FIREWEAPON",
602
    "EVENT_FIREWEAPON",
603
    "EVENT_SELECTWEAPON",
603
    "EVENT_SELECTWEAPON",
604
    "EVENT_MOVEFORWARD",
604
    "EVENT_MOVEFORWARD",
605
    "EVENT_MOVEBACKWARD",
605
    "EVENT_MOVEBACKWARD",
606
    "EVENT_TURNLEFT",
606
    "EVENT_TURNLEFT",
607
    "EVENT_TURNRIGHT",
607
    "EVENT_TURNRIGHT",
608
    "EVENT_STRAFELEFT",
608
    "EVENT_STRAFELEFT",
609
    "EVENT_STRAFERIGHT",
609
    "EVENT_STRAFERIGHT",
610
    "EVENT_WEAPKEY1",
610
    "EVENT_WEAPKEY1",
611
    "EVENT_WEAPKEY2",
611
    "EVENT_WEAPKEY2",
612
    "EVENT_WEAPKEY3",
612
    "EVENT_WEAPKEY3",
613
    "EVENT_WEAPKEY4",
613
    "EVENT_WEAPKEY4",
614
    "EVENT_WEAPKEY5",
614
    "EVENT_WEAPKEY5",
615
    "EVENT_WEAPKEY6",
615
    "EVENT_WEAPKEY6",
616
    "EVENT_WEAPKEY7",
616
    "EVENT_WEAPKEY7",
617
    "EVENT_WEAPKEY8",
617
    "EVENT_WEAPKEY8",
618
    "EVENT_WEAPKEY9",
618
    "EVENT_WEAPKEY9",
619
    "EVENT_WEAPKEY10",
619
    "EVENT_WEAPKEY10",
620
    "EVENT_DRAWWEAPON",
620
    "EVENT_DRAWWEAPON",
621
    "EVENT_DISPLAYCROSSHAIR",
621
    "EVENT_DISPLAYCROSSHAIR",
622
    "EVENT_DISPLAYREST",
622
    "EVENT_DISPLAYREST",
623
    "EVENT_DISPLAYSBAR",
623
    "EVENT_DISPLAYSBAR",
624
    "EVENT_RESETPLAYER",
624
    "EVENT_RESETPLAYER",
625
    "EVENT_INCURDAMAGE",
625
    "EVENT_INCURDAMAGE",
626
    "EVENT_AIMDOWN",
626
    "EVENT_AIMDOWN",
627
    "EVENT_GAME",
627
    "EVENT_GAME",
628
    "EVENT_PREVIOUSWEAPON",
628
    "EVENT_PREVIOUSWEAPON",
629
    "EVENT_NEXTWEAPON",
629
    "EVENT_NEXTWEAPON",
630
    "EVENT_SWIMUP",
630
    "EVENT_SWIMUP",
631
    "EVENT_SWIMDOWN",
631
    "EVENT_SWIMDOWN",
632
    "EVENT_GETMENUTILE",
632
    "EVENT_GETMENUTILE",
633
    "EVENT_SPAWN",
633
    "EVENT_SPAWN",
634
    "EVENT_LOGO",
634
    "EVENT_LOGO",
635
    "EVENT_EGS",
635
    "EVENT_EGS",
636
    "EVENT_DOFIRE",
636
    "EVENT_DOFIRE",
637
    "EVENT_PRESSEDFIRE",
637
    "EVENT_PRESSEDFIRE",
638
    "EVENT_USE",
638
    "EVENT_USE",
639
    "EVENT_PROCESSINPUT",
639
    "EVENT_PROCESSINPUT",
640
    "EVENT_FAKEDOMOVETHINGS",
640
    "EVENT_FAKEDOMOVETHINGS",
641
    "EVENT_DISPLAYROOMS",
641
    "EVENT_DISPLAYROOMS",
642
    "EVENT_KILLIT",
642
    "EVENT_KILLIT",
643
    "EVENT_LOADACTOR",
643
    "EVENT_LOADACTOR",
644
    "EVENT_DISPLAYBONUSSCREEN",
644
    "EVENT_DISPLAYBONUSSCREEN",
645
    "EVENT_DISPLAYMENU",
645
    "EVENT_DISPLAYMENU",
646
    "EVENT_DISPLAYMENUREST",
646
    "EVENT_DISPLAYMENUREST",
647
    "EVENT_DISPLAYLOADINGSCREEN",
647
    "EVENT_DISPLAYLOADINGSCREEN",
648
    "EVENT_ANIMATESPRITES",
648
    "EVENT_ANIMATESPRITES",
649
    "EVENT_NEWGAME",
649
    "EVENT_NEWGAME",
650
    "EVENT_SOUND",
650
    "EVENT_SOUND",
651
    "EVENT_CHECKTOUCHDAMAGE",
651
    "EVENT_CHECKTOUCHDAMAGE",
652
    "EVENT_CHECKFLOORDAMAGE",
652
    "EVENT_CHECKFLOORDAMAGE",
653
    "EVENT_LOADGAME",
653
    "EVENT_LOADGAME",
654
    "EVENT_SAVEGAME",
654
    "EVENT_SAVEGAME",
655
    "EVENT_PREGAME",
655
    "EVENT_PREGAME",
656
    "EVENT_CHANGEMENU",
656
    "EVENT_CHANGEMENU",
657
    "EVENT_DAMAGEHPLANE",
657
    "EVENT_DAMAGEHPLANE",
658
    "EVENT_ACTIVATECHEAT",
658
    "EVENT_ACTIVATECHEAT",
659
    "EVENT_DISPLAYINACTIVEMENU",
659
    "EVENT_DISPLAYINACTIVEMENU",
660
    "EVENT_DISPLAYINACTIVEMENUREST",
660
    "EVENT_DISPLAYINACTIVEMENUREST",
661
#ifdef LUNATIC
661
#ifdef LUNATIC
662
    "EVENT_ANIMATEALLSPRITES",
662
    "EVENT_ANIMATEALLSPRITES",
663
#endif
663
#endif
664
};
664
};
665
665
666
#if !defined LUNATIC
666
#if !defined LUNATIC
667
const memberlabel_t SectorLabels[]=
667
const memberlabel_t SectorLabels[]=
668
{
668
{
669
    { "wallptr", SECTOR_WALLPTR, 0, 0 },
669
    { "wallptr", SECTOR_WALLPTR, 0, 0 },
670
    { "wallnum", SECTOR_WALLNUM, 0, 0 },
670
    { "wallnum", SECTOR_WALLNUM, 0, 0 },
671
    { "ceilingz", SECTOR_CEILINGZ, 0, 0 },
671
    { "ceilingz", SECTOR_CEILINGZ, 0, 0 },
672
    { "floorz", SECTOR_FLOORZ, 0, 0 },
672
    { "floorz", SECTOR_FLOORZ, 0, 0 },
673
    { "ceilingstat", SECTOR_CEILINGSTAT, 0, 0 },
673
    { "ceilingstat", SECTOR_CEILINGSTAT, 0, 0 },
674
    { "floorstat", SECTOR_FLOORSTAT, 0, 0 },
674
    { "floorstat", SECTOR_FLOORSTAT, 0, 0 },
675
    { "ceilingpicnum", SECTOR_CEILINGPICNUM, 0, 0 },
675
    { "ceilingpicnum", SECTOR_CEILINGPICNUM, 0, 0 },
676
    { "ceilingslope", SECTOR_CEILINGSLOPE, 0, 0 },
676
    { "ceilingslope", SECTOR_CEILINGSLOPE, 0, 0 },
677
    { "ceilingshade", SECTOR_CEILINGSHADE, 0, 0 },
677
    { "ceilingshade", SECTOR_CEILINGSHADE, 0, 0 },
678
    { "ceilingpal", SECTOR_CEILINGPAL, 0, 0 },
678
    { "ceilingpal", SECTOR_CEILINGPAL, 0, 0 },
679
    { "ceilingxpanning", SECTOR_CEILINGXPANNING, 0, 0 },
679
    { "ceilingxpanning", SECTOR_CEILINGXPANNING, 0, 0 },
680
    { "ceilingypanning", SECTOR_CEILINGYPANNING, 0, 0 },
680
    { "ceilingypanning", SECTOR_CEILINGYPANNING, 0, 0 },
681
    { "floorpicnum", SECTOR_FLOORPICNUM, 0, 0 },
681
    { "floorpicnum", SECTOR_FLOORPICNUM, 0, 0 },
682
    { "floorslope", SECTOR_FLOORSLOPE, 0, 0 },
682
    { "floorslope", SECTOR_FLOORSLOPE, 0, 0 },
683
    { "floorshade", SECTOR_FLOORSHADE, 0, 0 },
683
    { "floorshade", SECTOR_FLOORSHADE, 0, 0 },
684
    { "floorpal", SECTOR_FLOORPAL, 0, 0 },
684
    { "floorpal", SECTOR_FLOORPAL, 0, 0 },
685
    { "floorxpanning", SECTOR_FLOORXPANNING, 0, 0 },
685
    { "floorxpanning", SECTOR_FLOORXPANNING, 0, 0 },
686
    { "floorypanning", SECTOR_FLOORYPANNING, 0, 0 },
686
    { "floorypanning", SECTOR_FLOORYPANNING, 0, 0 },
687
    { "visibility", SECTOR_VISIBILITY, 0, 0 },
687
    { "visibility", SECTOR_VISIBILITY, 0, 0 },
688
    { "fogpal", SECTOR_FOGPAL, 0, 0 }, // formerly filler
688
    { "fogpal", SECTOR_FOGPAL, 0, 0 }, // formerly filler
689
    { "alignto", SECTOR_FOGPAL, 0, 0 }, // formerly filler
689
    { "alignto", SECTOR_FOGPAL, 0, 0 }, // formerly filler
690
    { "lotag", SECTOR_LOTAG, 0, 0 },
690
    { "lotag", SECTOR_LOTAG, 0, 0 },
691
    { "hitag", SECTOR_HITAG, 0, 0 },
691
    { "hitag", SECTOR_HITAG, 0, 0 },
692
    { "extra", SECTOR_EXTRA, 0, 0 },
692
    { "extra", SECTOR_EXTRA, 0, 0 },
693
    { "ceilingbunch", SECTOR_CEILINGBUNCH, 0, 0 },
693
    { "ceilingbunch", SECTOR_CEILINGBUNCH, 0, 0 },
694
    { "floorbunch", SECTOR_FLOORBUNCH, 0, 0 },
694
    { "floorbunch", SECTOR_FLOORBUNCH, 0, 0 },
695
    { "ulotag", SECTOR_ULOTAG, 0, 0 },
695
    { "ulotag", SECTOR_ULOTAG, 0, 0 },
696
    { "uhitag", SECTOR_UHITAG, 0, 0 },
696
    { "uhitag", SECTOR_UHITAG, 0, 0 },
697
    { "", -1, 0, 0  }     // END OF LIST
697
    { "", -1, 0, 0  }     // END OF LIST
698
};
698
};
699
699
700
const memberlabel_t WallLabels[]=
700
const memberlabel_t WallLabels[]=
701
{
701
{
702
    { "x", WALL_X, 0, 0 },
702
    { "x", WALL_X, 0, 0 },
703
    { "y", WALL_Y, 0, 0 },
703
    { "y", WALL_Y, 0, 0 },
704
    { "point2", WALL_POINT2, 0, 0 },
704
    { "point2", WALL_POINT2, 0, 0 },
705
    { "nextwall", WALL_NEXTWALL, 0, 0 },
705
    { "nextwall", WALL_NEXTWALL, 0, 0 },
706
    { "nextsector", WALL_NEXTSECTOR, 0, 0 },
706
    { "nextsector", WALL_NEXTSECTOR, 0, 0 },
707
    { "cstat", WALL_CSTAT, 0, 0 },
707
    { "cstat", WALL_CSTAT, 0, 0 },
708
    { "picnum", WALL_PICNUM, 0, 0 },
708
    { "picnum", WALL_PICNUM, 0, 0 },
709
    { "overpicnum", WALL_OVERPICNUM, 0, 0 },
709
    { "overpicnum", WALL_OVERPICNUM, 0, 0 },
710
    { "shade", WALL_SHADE, 0, 0 },
710
    { "shade", WALL_SHADE, 0, 0 },
711
    { "pal", WALL_PAL, 0, 0 },
711
    { "pal", WALL_PAL, 0, 0 },
712
    { "xrepeat", WALL_XREPEAT, 0, 0 },
712
    { "xrepeat", WALL_XREPEAT, 0, 0 },
713
    { "yrepeat", WALL_YREPEAT, 0, 0 },
713
    { "yrepeat", WALL_YREPEAT, 0, 0 },
714
    { "xpanning", WALL_XPANNING, 0, 0 },
714
    { "xpanning", WALL_XPANNING, 0, 0 },
715
    { "ypanning", WALL_YPANNING, 0, 0 },
715
    { "ypanning", WALL_YPANNING, 0, 0 },
716
    { "lotag", WALL_LOTAG, 0, 0 },
716
    { "lotag", WALL_LOTAG, 0, 0 },
717
    { "hitag", WALL_HITAG, 0, 0 },
717
    { "hitag", WALL_HITAG, 0, 0 },
718
    { "extra", WALL_EXTRA, 0, 0 },
718
    { "extra", WALL_EXTRA, 0, 0 },
719
    { "ulotag", WALL_ULOTAG, 0, 0 },
719
    { "ulotag", WALL_ULOTAG, 0, 0 },
720
    { "uhitag", WALL_UHITAG, 0, 0 },
720
    { "uhitag", WALL_UHITAG, 0, 0 },
721
    { "", -1, 0, 0  }     // END OF LIST
721
    { "", -1, 0, 0  }     // END OF LIST
722
};
722
};
723
723
724
const memberlabel_t ActorLabels[]=
724
const memberlabel_t ActorLabels[]=
725
{
725
{
726
    { "x", ACTOR_X, 0, 0 },
726
    { "x", ACTOR_X, 0, 0 },
727
    { "y", ACTOR_Y, 0, 0 },
727
    { "y", ACTOR_Y, 0, 0 },
728
    { "z", ACTOR_Z, 0, 0 },
728
    { "z", ACTOR_Z, 0, 0 },
729
    { "cstat", ACTOR_CSTAT, 0, 0 },
729
    { "cstat", ACTOR_CSTAT, 0, 0 },
730
    { "picnum", ACTOR_PICNUM, 0, 0 },
730
    { "picnum", ACTOR_PICNUM, 0, 0 },
731
    { "shade", ACTOR_SHADE, 0, 0 },
731
    { "shade", ACTOR_SHADE, 0, 0 },
732
    { "pal", ACTOR_PAL, 0, 0 },
732
    { "pal", ACTOR_PAL, 0, 0 },
733
    { "clipdist", ACTOR_CLIPDIST, 0, 0 },
733
    { "clipdist", ACTOR_CLIPDIST, 0, 0 },
734
//    { "filler", ACTOR_DETAIL, 0, 0 },
734
//    { "filler", ACTOR_DETAIL, 0, 0 },
735
    { "blend", ACTOR_DETAIL, 0, 0 },
735
    { "blend", ACTOR_DETAIL, 0, 0 },
736
    { "xrepeat", ACTOR_XREPEAT, 0, 0 },
736
    { "xrepeat", ACTOR_XREPEAT, 0, 0 },
737
    { "yrepeat", ACTOR_YREPEAT, 0, 0 },
737
    { "yrepeat", ACTOR_YREPEAT, 0, 0 },
738
    { "xoffset", ACTOR_XOFFSET, 0, 0 },
738
    { "xoffset", ACTOR_XOFFSET, 0, 0 },
739
    { "yoffset", ACTOR_YOFFSET, 0, 0 },
739
    { "yoffset", ACTOR_YOFFSET, 0, 0 },
740
    { "sectnum", ACTOR_SECTNUM, 0, 0 },
740
    { "sectnum", ACTOR_SECTNUM, 0, 0 },
741
    { "statnum", ACTOR_STATNUM, 0, 0 },
741
    { "statnum", ACTOR_STATNUM, 0, 0 },
742
    { "ang", ACTOR_ANG, 0, 0 },
742
    { "ang", ACTOR_ANG, 0, 0 },
743
    { "owner", ACTOR_OWNER, 0, 0 },
743
    { "owner", ACTOR_OWNER, 0, 0 },
744
    { "xvel", ACTOR_XVEL, 0, 0 },
744
    { "xvel", ACTOR_XVEL, 0, 0 },
745
    { "yvel", ACTOR_YVEL, 0, 0 },
745
    { "yvel", ACTOR_YVEL, 0, 0 },
746
    { "zvel", ACTOR_ZVEL, 0, 0 },
746
    { "zvel", ACTOR_ZVEL, 0, 0 },
747
    { "lotag", ACTOR_LOTAG, 0, 0 },
747
    { "lotag", ACTOR_LOTAG, 0, 0 },
748
    { "hitag", ACTOR_HITAG, 0, 0 },
748
    { "hitag", ACTOR_HITAG, 0, 0 },
749
    { "extra", ACTOR_EXTRA, 0, 0 },
749
    { "extra", ACTOR_EXTRA, 0, 0 },
750
750
751
    // ActorExtra labels...
751
    // ActorExtra labels...
752
    { "htcgg", ACTOR_HTCGG, 0, 0 },
752
    { "htcgg", ACTOR_HTCGG, 0, 0 },
753
    { "htpicnum", ACTOR_HTPICNUM, 0, 0 },
753
    { "htpicnum", ACTOR_HTPICNUM, 0, 0 },
754
    { "htang", ACTOR_HTANG, 0, 0 },
754
    { "htang", ACTOR_HTANG, 0, 0 },
755
    { "htextra", ACTOR_HTEXTRA, 0, 0 },
755
    { "htextra", ACTOR_HTEXTRA, 0, 0 },
756
    { "htowner", ACTOR_HTOWNER, 0, 0 },
756
    { "htowner", ACTOR_HTOWNER, 0, 0 },
757
    { "htmovflag", ACTOR_HTMOVFLAG, 0, 0 },
757
    { "htmovflag", ACTOR_HTMOVFLAG, 0, 0 },
758
    { "httempang", ACTOR_HTTEMPANG, 0, 0 },
758
    { "httempang", ACTOR_HTTEMPANG, 0, 0 },
759
    { "htactorstayput", ACTOR_HTACTORSTAYPUT, 0, 0 },
759
    { "htactorstayput", ACTOR_HTACTORSTAYPUT, 0, 0 },
760
    { "htdispicnum", ACTOR_HTDISPICNUM, 0, 0 },
760
    { "htdispicnum", ACTOR_HTDISPICNUM, 0, 0 },
761
    { "httimetosleep", ACTOR_HTTIMETOSLEEP, 0, 0 },
761
    { "httimetosleep", ACTOR_HTTIMETOSLEEP, 0, 0 },
762
    { "htfloorz", ACTOR_HTFLOORZ, 0, 0 },
762
    { "htfloorz", ACTOR_HTFLOORZ, 0, 0 },
763
    { "htceilingz", ACTOR_HTCEILINGZ, 0, 0 },
763
    { "htceilingz", ACTOR_HTCEILINGZ, 0, 0 },
764
    { "htlastvx", ACTOR_HTLASTVX, 0, 0 },
764
    { "htlastvx", ACTOR_HTLASTVX, 0, 0 },
765
    { "htlastvy", ACTOR_HTLASTVY, 0, 0 },
765
    { "htlastvy", ACTOR_HTLASTVY, 0, 0 },
766
    { "htbposx", ACTOR_HTBPOSX, 0, 0 },
766
    { "htbposx", ACTOR_HTBPOSX, 0, 0 },
767
    { "htbposy", ACTOR_HTBPOSY, 0, 0 },
767
    { "htbposy", ACTOR_HTBPOSY, 0, 0 },
768
    { "htbposz", ACTOR_HTBPOSZ, 0, 0 },
768
    { "htbposz", ACTOR_HTBPOSZ, 0, 0 },
769
    { "htg_t", ACTOR_HTG_T, LABEL_HASPARM2, 10 },
769
    { "htg_t", ACTOR_HTG_T, LABEL_HASPARM2, 10 },
770
770
771
    // model flags
771
    // model flags
772
772
773
    { "angoff", ACTOR_ANGOFF, 0, 0 },
773
    { "angoff", ACTOR_ANGOFF, 0, 0 },
774
    { "pitch", ACTOR_PITCH, 0, 0 },
774
    { "pitch", ACTOR_PITCH, 0, 0 },
775
    { "roll", ACTOR_ROLL, 0, 0 },
775
    { "roll", ACTOR_ROLL, 0, 0 },
776
    { "mdxoff", ACTOR_MDXOFF, 0, 0 },
776
    { "mdxoff", ACTOR_MDXOFF, 0, 0 },
777
    { "mdyoff", ACTOR_MDYOFF, 0, 0 },
777
    { "mdyoff", ACTOR_MDYOFF, 0, 0 },
778
    { "mdzoff", ACTOR_MDZOFF, 0, 0 },
778
    { "mdzoff", ACTOR_MDZOFF, 0, 0 },
779
    { "mdflags", ACTOR_MDFLAGS, 0, 0 },
779
    { "mdflags", ACTOR_MDFLAGS, 0, 0 },
780
    { "xpanning", ACTOR_XPANNING, 0, 0 },
780
    { "xpanning", ACTOR_XPANNING, 0, 0 },
781
    { "ypanning", ACTOR_YPANNING, 0, 0 },
781
    { "ypanning", ACTOR_YPANNING, 0, 0 },
782
782
783
    { "htflags", ACTOR_HTFLAGS, 0, 0 },
783
    { "htflags", ACTOR_HTFLAGS, 0, 0 },
784
784
785
    { "alpha", ACTOR_ALPHA, 0, 0 },
785
    { "alpha", ACTOR_ALPHA, 0, 0 },
786
786
787
    { "ulotag", ACTOR_ULOTAG, 0, 0 },
787
    { "ulotag", ACTOR_ULOTAG, 0, 0 },
788
    { "uhitag", ACTOR_UHITAG, 0, 0 },
788
    { "uhitag", ACTOR_UHITAG, 0, 0 },
789
789
790
    { "isvalid", ACTOR_ISVALID, 0, 0 },
790
    { "isvalid", ACTOR_ISVALID, 0, 0 },
791
// aliases:
791
// aliases:
792
    { "movflags", ACTOR_HITAG, 0, 0 },
792
    { "movflags", ACTOR_HITAG, 0, 0 },
793
    { "detail", ACTOR_DETAIL, 0, 0 },  // deprecated name for 'blend'
793
    { "detail", ACTOR_DETAIL, 0, 0 },  // deprecated name for 'blend'
794
794
795
    { "", -1, 0, 0  }     // END OF LIST
795
    { "", -1, 0, 0  }     // END OF LIST
796
};
796
};
797
797
798
const memberlabel_t TsprLabels[]=
798
const memberlabel_t TsprLabels[]=
799
{
799
{
800
    // tsprite access
800
    // tsprite access
801
801
802
    { "tsprx", ACTOR_X, 0, 0 },
802
    { "tsprx", ACTOR_X, 0, 0 },
803
    { "tspry", ACTOR_Y, 0, 0 },
803
    { "tspry", ACTOR_Y, 0, 0 },
804
    { "tsprz", ACTOR_Z, 0, 0 },
804
    { "tsprz", ACTOR_Z, 0, 0 },
805
    { "tsprcstat", ACTOR_CSTAT, 0, 0 },
805
    { "tsprcstat", ACTOR_CSTAT, 0, 0 },
806
    { "tsprpicnum", ACTOR_PICNUM, 0, 0 },
806
    { "tsprpicnum", ACTOR_PICNUM, 0, 0 },
807
    { "tsprshade", ACTOR_SHADE, 0, 0 },
807
    { "tsprshade", ACTOR_SHADE, 0, 0 },
808
    { "tsprpal", ACTOR_PAL, 0, 0 },
808
    { "tsprpal", ACTOR_PAL, 0, 0 },
809
    { "tsprclipdist", ACTOR_CLIPDIST, 0, 0 },
809
    { "tsprclipdist", ACTOR_CLIPDIST, 0, 0 },
810
//    { "tsprfiller", ACTOR_DETAIL, 0, 0 },
810
//    { "tsprfiller", ACTOR_DETAIL, 0, 0 },
811
    { "tsprblend", ACTOR_DETAIL, 0, 0 },
811
    { "tsprblend", ACTOR_DETAIL, 0, 0 },
812
    { "tsprxrepeat", ACTOR_XREPEAT, 0, 0 },
812
    { "tsprxrepeat", ACTOR_XREPEAT, 0, 0 },
813
    { "tspryrepeat", ACTOR_YREPEAT, 0, 0 },
813
    { "tspryrepeat", ACTOR_YREPEAT, 0, 0 },
814
    { "tsprxoffset", ACTOR_XOFFSET, 0, 0 },
814
    { "tsprxoffset", ACTOR_XOFFSET, 0, 0 },
815
    { "tspryoffset", ACTOR_YOFFSET, 0, 0 },
815
    { "tspryoffset", ACTOR_YOFFSET, 0, 0 },
816
    { "tsprsectnum", ACTOR_SECTNUM, 0, 0 },
816
    { "tsprsectnum", ACTOR_SECTNUM, 0, 0 },
817
    { "tsprstatnum", ACTOR_STATNUM, 0, 0 },
817
    { "tsprstatnum", ACTOR_STATNUM, 0, 0 },
818
    { "tsprang", ACTOR_ANG, 0, 0 },
818
    { "tsprang", ACTOR_ANG, 0, 0 },
819
    { "tsprowner", ACTOR_OWNER, 0, 0 },
819
    { "tsprowner", ACTOR_OWNER, 0, 0 },
820
#if 1
820
#if 1
821
    { "tsprxvel", ACTOR_XVEL, 0, 0 },
821
    { "tsprxvel", ACTOR_XVEL, 0, 0 },
822
    { "tspryvel", ACTOR_YVEL, 0, 0 },
822
    { "tspryvel", ACTOR_YVEL, 0, 0 },
823
    { "tsprzvel", ACTOR_ZVEL, 0, 0 },
823
    { "tsprzvel", ACTOR_ZVEL, 0, 0 },
824
    { "tsprlotag", ACTOR_LOTAG, 0, 0 },
824
    { "tsprlotag", ACTOR_LOTAG, 0, 0 },
825
    { "tsprhitag", ACTOR_HITAG, 0, 0 },
825
    { "tsprhitag", ACTOR_HITAG, 0, 0 },
826
    { "tsprextra", ACTOR_EXTRA, 0, 0 },
826
    { "tsprextra", ACTOR_EXTRA, 0, 0 },
827
#endif
827
#endif
828
// aliases:
828
// aliases:
829
    { "tsprdetail", ACTOR_DETAIL, 0, 0 },  // deprecated name for 'tsprblend'
829
    { "tsprdetail", ACTOR_DETAIL, 0, 0 },  // deprecated name for 'tsprblend'
830
830
831
    { "", -1, 0, 0  }     // END OF LIST
831
    { "", -1, 0, 0  }     // END OF LIST
832
};
832
};
833
833
834
const memberlabel_t PlayerLabels[]=
834
const memberlabel_t PlayerLabels[]=
835
{
835
{
836
    { "zoom", PLAYER_ZOOM, 0, 0 },
836
    { "zoom", PLAYER_ZOOM, 0, 0 },
837
    { "exitx", PLAYER_EXITX, 0, 0 },
837
    { "exitx", PLAYER_EXITX, 0, 0 },
838
    { "exity", PLAYER_EXITY, 0, 0 },
838
    { "exity", PLAYER_EXITY, 0, 0 },
839
    { "loogiex", PLAYER_LOOGIEX, LABEL_HASPARM2, 64 },
839
    { "loogiex", PLAYER_LOOGIEX, LABEL_HASPARM2, 64 },
840
    { "loogiey", PLAYER_LOOGIEY, LABEL_HASPARM2, 64 },
840
    { "loogiey", PLAYER_LOOGIEY, LABEL_HASPARM2, 64 },
841
    { "numloogs", PLAYER_NUMLOOGS, 0, 0 },
841
    { "numloogs", PLAYER_NUMLOOGS, 0, 0 },
842
    { "loogcnt", PLAYER_LOOGCNT, 0, 0 },
842
    { "loogcnt", PLAYER_LOOGCNT, 0, 0 },
843
    { "posx", PLAYER_POSX, 0, 0 },
843
    { "posx", PLAYER_POSX, 0, 0 },
844
    { "posy", PLAYER_POSY, 0, 0 },
844
    { "posy", PLAYER_POSY, 0, 0 },
845
    { "posz", PLAYER_POSZ, 0, 0 },
845
    { "posz", PLAYER_POSZ, 0, 0 },
846
    { "horiz", PLAYER_HORIZ, 0, 0 },
846
    { "horiz", PLAYER_HORIZ, 0, 0 },
847
    { "ohoriz", PLAYER_OHORIZ, 0, 0 },
847
    { "ohoriz", PLAYER_OHORIZ, 0, 0 },
848
    { "ohorizoff", PLAYER_OHORIZOFF, 0, 0 },
848
    { "ohorizoff", PLAYER_OHORIZOFF, 0, 0 },
849
    { "invdisptime", PLAYER_INVDISPTIME, 0, 0 },
849
    { "invdisptime", PLAYER_INVDISPTIME, 0, 0 },
850
    { "bobposx", PLAYER_BOBPOSX, 0, 0 },
850
    { "bobposx", PLAYER_BOBPOSX, 0, 0 },
851
    { "bobposy", PLAYER_BOBPOSY, 0, 0 },
851
    { "bobposy", PLAYER_BOBPOSY, 0, 0 },
852
    { "oposx", PLAYER_OPOSX, 0, 0 },
852
    { "oposx", PLAYER_OPOSX, 0, 0 },
853
    { "oposy", PLAYER_OPOSY, 0, 0 },
853
    { "oposy", PLAYER_OPOSY, 0, 0 },
854
    { "oposz", PLAYER_OPOSZ, 0, 0 },
854
    { "oposz", PLAYER_OPOSZ, 0, 0 },
855
    { "pyoff", PLAYER_PYOFF, 0, 0 },
855
    { "pyoff", PLAYER_PYOFF, 0, 0 },
856
    { "opyoff", PLAYER_OPYOFF, 0, 0 },
856
    { "opyoff", PLAYER_OPYOFF, 0, 0 },
857
    { "posxv", PLAYER_POSXV, 0, 0 },
857
    { "posxv", PLAYER_POSXV, 0, 0 },
858
    { "posyv", PLAYER_POSYV, 0, 0 },
858
    { "posyv", PLAYER_POSYV, 0, 0 },
859
    { "poszv", PLAYER_POSZV, 0, 0 },
859
    { "poszv", PLAYER_POSZV, 0, 0 },
860
    { "last_pissed_time", PLAYER_LAST_PISSED_TIME, 0, 0 },
860
    { "last_pissed_time", PLAYER_LAST_PISSED_TIME, 0, 0 },
861
    { "truefz", PLAYER_TRUEFZ, 0, 0 },
861
    { "truefz", PLAYER_TRUEFZ, 0, 0 },
862
    { "truecz", PLAYER_TRUECZ, 0, 0 },
862
    { "truecz", PLAYER_TRUECZ, 0, 0 },
863
    { "player_par", PLAYER_PLAYER_PAR, 0, 0 },
863
    { "player_par", PLAYER_PLAYER_PAR, 0, 0 },
864
    { "visibility", PLAYER_VISIBILITY, 0, 0 },
864
    { "visibility", PLAYER_VISIBILITY, 0, 0 },
865
    { "bobcounter", PLAYER_BOBCOUNTER, 0, 0 },
865
    { "bobcounter", PLAYER_BOBCOUNTER, 0, 0 },
866
    { "weapon_sway", PLAYER_WEAPON_SWAY, 0, 0 },
866
    { "weapon_sway", PLAYER_WEAPON_SWAY, 0, 0 },
867
    { "pals_time", PLAYER_PALS_TIME, 0, 0 },
867
    { "pals_time", PLAYER_PALS_TIME, 0, 0 },
868
    { "randomflamex", PLAYER_RANDOMFLAMEX, 0, 0 },
868
    { "randomflamex", PLAYER_RANDOMFLAMEX, 0, 0 },
869
    { "crack_time", PLAYER_CRACK_TIME, 0, 0 },
869
    { "crack_time", PLAYER_CRACK_TIME, 0, 0 },
870
    { "aim_mode", PLAYER_AIM_MODE, 0, 0 },
870
    { "aim_mode", PLAYER_AIM_MODE, 0, 0 },
871
    { "ang", PLAYER_ANG, 0, 0 },
871
    { "ang", PLAYER_ANG, 0, 0 },
872
    { "oang", PLAYER_OANG, 0, 0 },
872
    { "oang", PLAYER_OANG, 0, 0 },
873
    { "angvel", PLAYER_ANGVEL, 0, 0 },
873
    { "angvel", PLAYER_ANGVEL, 0, 0 },
874
    { "cursectnum", PLAYER_CURSECTNUM, 0, 0 },
874
    { "cursectnum", PLAYER_CURSECTNUM, 0, 0 },
875
    { "look_ang", PLAYER_LOOK_ANG, 0, 0 },
875
    { "look_ang", PLAYER_LOOK_ANG, 0, 0 },
876
    { "last_extra", PLAYER_LAST_EXTRA, 0, 0 },
876
    { "last_extra", PLAYER_LAST_EXTRA, 0, 0 },
877
    { "subweapon", PLAYER_SUBWEAPON, 0, 0 },
877
    { "subweapon", PLAYER_SUBWEAPON, 0, 0 },
878
    { "ammo_amount", PLAYER_AMMO_AMOUNT, LABEL_HASPARM2, MAX_WEAPONS },
878
    { "ammo_amount", PLAYER_AMMO_AMOUNT, LABEL_HASPARM2, MAX_WEAPONS },
879
    { "wackedbyactor", PLAYER_WACKEDBYACTOR, 0, 0 },
879
    { "wackedbyactor", PLAYER_WACKEDBYACTOR, 0, 0 },
880
    { "frag", PLAYER_FRAG, 0, 0 },
880
    { "frag", PLAYER_FRAG, 0, 0 },
881
    { "fraggedself", PLAYER_FRAGGEDSELF, 0, 0 },
881
    { "fraggedself", PLAYER_FRAGGEDSELF, 0, 0 },
882
    { "curr_weapon", PLAYER_CURR_WEAPON, 0, 0 },
882
    { "curr_weapon", PLAYER_CURR_WEAPON, 0, 0 },
883
    { "last_weapon", PLAYER_LAST_WEAPON, 0, 0 },
883
    { "last_weapon", PLAYER_LAST_WEAPON, 0, 0 },
884
    { "tipincs", PLAYER_TIPINCS, 0, 0 },
884
    { "tipincs", PLAYER_TIPINCS, 0, 0 },
885
    { "horizoff", PLAYER_HORIZOFF, 0, 0 },
885
    { "horizoff", PLAYER_HORIZOFF, 0, 0 },
886
    { "wantweaponfire", PLAYER_WANTWEAPONFIRE, 0, 0 },
886
    { "wantweaponfire", PLAYER_WANTWEAPONFIRE, 0, 0 },
887
    { "holoduke_amount", PLAYER_HOLODUKE_AMOUNT, 0, 0 },
887
    { "holoduke_amount", PLAYER_HOLODUKE_AMOUNT, 0, 0 },
888
    { "newowner", PLAYER_NEWOWNER, 0, 0 },
888
    { "newowner", PLAYER_NEWOWNER, 0, 0 },
889
    { "hurt_delay", PLAYER_HURT_DELAY, 0, 0 },
889
    { "hurt_delay", PLAYER_HURT_DELAY, 0, 0 },
890
    { "hbomb_hold_delay", PLAYER_HBOMB_HOLD_DELAY, 0, 0 },
890
    { "hbomb_hold_delay", PLAYER_HBOMB_HOLD_DELAY, 0, 0 },
891
    { "jumping_counter", PLAYER_JUMPING_COUNTER, 0, 0 },
891
    { "jumping_counter", PLAYER_JUMPING_COUNTER, 0, 0 },
892
    { "airleft", PLAYER_AIRLEFT, 0, 0 },
892
    { "airleft", PLAYER_AIRLEFT, 0, 0 },
893
    { "knee_incs", PLAYER_KNEE_INCS, 0, 0 },
893
    { "knee_incs", PLAYER_KNEE_INCS, 0, 0 },
894
    { "access_incs", PLAYER_ACCESS_INCS, 0, 0 },
894
    { "access_incs", PLAYER_ACCESS_INCS, 0, 0 },
895
    { "fta", PLAYER_FTA, 0, 0 },
895
    { "fta", PLAYER_FTA, 0, 0 },
896
    { "ftq", PLAYER_FTQ, 0, 0 },
896
    { "ftq", PLAYER_FTQ, 0, 0 },
897
    { "access_wallnum", PLAYER_ACCESS_WALLNUM, 0, 0 },
897
    { "access_wallnum", PLAYER_ACCESS_WALLNUM, 0, 0 },
898
    { "access_spritenum", PLAYER_ACCESS_SPRITENUM, 0, 0 },
898
    { "access_spritenum", PLAYER_ACCESS_SPRITENUM, 0, 0 },
899
    { "kickback_pic", PLAYER_KICKBACK_PIC, 0, 0 },
899
    { "kickback_pic", PLAYER_KICKBACK_PIC, 0, 0 },
900
    { "got_access", PLAYER_GOT_ACCESS, 0, 0 },
900
    { "got_access", PLAYER_GOT_ACCESS, 0, 0 },
901
    { "weapon_ang", PLAYER_WEAPON_ANG, 0, 0 },
901
    { "weapon_ang", PLAYER_WEAPON_ANG, 0, 0 },
902
    { "firstaid_amount", PLAYER_FIRSTAID_AMOUNT, 0, 0 },
902
    { "firstaid_amount", PLAYER_FIRSTAID_AMOUNT, 0, 0 },
903
    { "somethingonplayer", PLAYER_SOMETHINGONPLAYER, 0, 0 },
903
    { "somethingonplayer", PLAYER_SOMETHINGONPLAYER, 0, 0 },
904
    { "on_crane", PLAYER_ON_CRANE, 0, 0 },
904
    { "on_crane", PLAYER_ON_CRANE, 0, 0 },
905
    { "i", PLAYER_I, 0, 0 },
905
    { "i", PLAYER_I, 0, 0 },
906
    { "one_parallax_sectnum", PLAYER_ONE_PARALLAX_SECTNUM, 0, 0 },
906
    { "one_parallax_sectnum", PLAYER_ONE_PARALLAX_SECTNUM, 0, 0 },
907
    { "over_shoulder_on", PLAYER_OVER_SHOULDER_ON, 0, 0 },
907
    { "over_shoulder_on", PLAYER_OVER_SHOULDER_ON, 0, 0 },
908
    { "random_club_frame", PLAYER_RANDOM_CLUB_FRAME, 0, 0 },
908
    { "random_club_frame", PLAYER_RANDOM_CLUB_FRAME, 0, 0 },
909
    { "fist_incs", PLAYER_FIST_INCS, 0, 0 },
909
    { "fist_incs", PLAYER_FIST_INCS, 0, 0 },
910
    { "one_eighty_count", PLAYER_ONE_EIGHTY_COUNT, 0, 0 },
910
    { "one_eighty_count", PLAYER_ONE_EIGHTY_COUNT, 0, 0 },
911
    { "cheat_phase", PLAYER_CHEAT_PHASE, 0, 0 },
911
    { "cheat_phase", PLAYER_CHEAT_PHASE, 0, 0 },
912
    { "dummyplayersprite", PLAYER_DUMMYPLAYERSPRITE, 0, 0 },
912
    { "dummyplayersprite", PLAYER_DUMMYPLAYERSPRITE, 0, 0 },
913
    { "extra_extra8", PLAYER_EXTRA_EXTRA8, 0, 0 },
913
    { "extra_extra8", PLAYER_EXTRA_EXTRA8, 0, 0 },
914
    { "quick_kick", PLAYER_QUICK_KICK, 0, 0 },
914
    { "quick_kick", PLAYER_QUICK_KICK, 0, 0 },
915
    { "heat_amount", PLAYER_HEAT_AMOUNT, 0, 0 },
915
    { "heat_amount", PLAYER_HEAT_AMOUNT, 0, 0 },
916
    { "actorsqu", PLAYER_ACTORSQU, 0, 0 },
916
    { "actorsqu", PLAYER_ACTORSQU, 0, 0 },
917
    { "timebeforeexit", PLAYER_TIMEBEFOREEXIT, 0, 0 },
917
    { "timebeforeexit", PLAYER_TIMEBEFOREEXIT, 0, 0 },
918
    { "customexitsound", PLAYER_CUSTOMEXITSOUND, 0, 0 },
918
    { "customexitsound", PLAYER_CUSTOMEXITSOUND, 0, 0 },
919
    { "weaprecs", PLAYER_WEAPRECS, LABEL_HASPARM2, MAX_WEAPONS },
919
    { "weaprecs", PLAYER_WEAPRECS, LABEL_HASPARM2, MAX_WEAPONS },
920
    { "weapreccnt", PLAYER_WEAPRECCNT, 0, 0 },
920
    { "weapreccnt", PLAYER_WEAPRECCNT, 0, 0 },
921
    { "interface_toggle_flag", PLAYER_INTERFACE_TOGGLE_FLAG, 0, 0 },
921
    { "interface_toggle_flag", PLAYER_INTERFACE_TOGGLE_FLAG, 0, 0 },
922
    { "rotscrnang", PLAYER_ROTSCRNANG, 0, 0 },
922
    { "rotscrnang", PLAYER_ROTSCRNANG, 0, 0 },
923
    { "dead_flag", PLAYER_DEAD_FLAG, 0, 0 },
923
    { "dead_flag", PLAYER_DEAD_FLAG, 0, 0 },
924
    { "show_empty_weapon", PLAYER_SHOW_EMPTY_WEAPON, 0, 0 },
924
    { "show_empty_weapon", PLAYER_SHOW_EMPTY_WEAPON, 0, 0 },
925
    { "scuba_amount", PLAYER_SCUBA_AMOUNT, 0, 0 },
925
    { "scuba_amount", PLAYER_SCUBA_AMOUNT, 0, 0 },
926
    { "jetpack_amount", PLAYER_JETPACK_AMOUNT, 0, 0 },
926
    { "jetpack_amount", PLAYER_JETPACK_AMOUNT, 0, 0 },
927
    { "steroids_amount", PLAYER_STEROIDS_AMOUNT, 0, 0 },
927
    { "steroids_amount", PLAYER_STEROIDS_AMOUNT, 0, 0 },
928
    { "shield_amount", PLAYER_SHIELD_AMOUNT, 0, 0 },
928
    { "shield_amount", PLAYER_SHIELD_AMOUNT, 0, 0 },
929
    { "holoduke_on", PLAYER_HOLODUKE_ON, 0, 0 },
929
    { "holoduke_on", PLAYER_HOLODUKE_ON, 0, 0 },
930
    { "pycount", PLAYER_PYCOUNT, 0, 0 },
930
    { "pycount", PLAYER_PYCOUNT, 0, 0 },
931
    { "weapon_pos", PLAYER_WEAPON_POS, 0, 0 },
931
    { "weapon_pos", PLAYER_WEAPON_POS, 0, 0 },
932
    { "frag_ps", PLAYER_FRAG_PS, 0, 0 },
932
    { "frag_ps", PLAYER_FRAG_PS, 0, 0 },
933
    { "transporter_hold", PLAYER_TRANSPORTER_HOLD, 0, 0 },
933
    { "transporter_hold", PLAYER_TRANSPORTER_HOLD, 0, 0 },
934
    { "last_full_weapon", PLAYER_LAST_FULL_WEAPON, 0, 0 },
934
    { "last_full_weapon", PLAYER_LAST_FULL_WEAPON, 0, 0 },
935
    { "footprintshade", PLAYER_FOOTPRINTSHADE, 0, 0 },
935
    { "footprintshade", PLAYER_FOOTPRINTSHADE, 0, 0 },
936
    { "boot_amount", PLAYER_BOOT_AMOUNT, 0, 0 },
936
    { "boot_amount", PLAYER_BOOT_AMOUNT, 0, 0 },
937
    { "scream_voice", PLAYER_SCREAM_VOICE, 0, 0 },
937
    { "scream_voice", PLAYER_SCREAM_VOICE, 0, 0 },
938
    { "gm", PLAYER_GM, 0, 0 },
938
    { "gm", PLAYER_GM, 0, 0 },
939
    { "on_warping_sector", PLAYER_ON_WARPING_SECTOR, 0, 0 },
939
    { "on_warping_sector", PLAYER_ON_WARPING_SECTOR, 0, 0 },
940
    { "footprintcount", PLAYER_FOOTPRINTCOUNT, 0, 0 },
940
    { "footprintcount", PLAYER_FOOTPRINTCOUNT, 0, 0 },
941
    { "hbomb_on", PLAYER_HBOMB_ON, 0, 0 },
941
    { "hbomb_on", PLAYER_HBOMB_ON, 0, 0 },
942
    { "jumping_toggle", PLAYER_JUMPING_TOGGLE, 0, 0 },
942
    { "jumping_toggle", PLAYER_JUMPING_TOGGLE, 0, 0 },
943
    { "rapid_fire_hold", PLAYER_RAPID_FIRE_HOLD, 0, 0 },
943
    { "rapid_fire_hold", PLAYER_RAPID_FIRE_HOLD, 0, 0 },
944
    { "on_ground", PLAYER_ON_GROUND, 0, 0 },
944
    { "on_ground", PLAYER_ON_GROUND, 0, 0 },
945
    { "name", PLAYER_NAME,  LABEL_ISSTRING, 32 },
945
    { "name", PLAYER_NAME,  LABEL_ISSTRING, 32 },
946
    { "inven_icon", PLAYER_INVEN_ICON, 0, 0 },
946
    { "inven_icon", PLAYER_INVEN_ICON, 0, 0 },
947
    { "buttonpalette", PLAYER_BUTTONPALETTE, 0, 0 },
947
    { "buttonpalette", PLAYER_BUTTONPALETTE, 0, 0 },
948
    { "jetpack_on", PLAYER_JETPACK_ON, 0, 0 },
948
    { "jetpack_on", PLAYER_JETPACK_ON, 0, 0 },
949
    { "spritebridge", PLAYER_SPRITEBRIDGE, 0, 0 },
949
    { "spritebridge", PLAYER_SPRITEBRIDGE, 0, 0 },
950
    { "lastrandomspot", PLAYER_LASTRANDOMSPOT, 0, 0 },
950
    { "lastrandomspot", PLAYER_LASTRANDOMSPOT, 0, 0 },
951
    { "scuba_on", PLAYER_SCUBA_ON, 0, 0 },
951
    { "scuba_on", PLAYER_SCUBA_ON, 0, 0 },
952
    { "footprintpal", PLAYER_FOOTPRINTPAL, 0, 0 },
952
    { "footprintpal", PLAYER_FOOTPRINTPAL, 0, 0 },
953
    { "heat_on", PLAYER_HEAT_ON, 0, 0 },
953
    { "heat_on", PLAYER_HEAT_ON, 0, 0 },
954
    { "holster_weapon", PLAYER_HOLSTER_WEAPON, 0, 0 },
954
    { "holster_weapon", PLAYER_HOLSTER_WEAPON, 0, 0 },
955
    { "falling_counter", PLAYER_FALLING_COUNTER, 0, 0 },
955
    { "falling_counter", PLAYER_FALLING_COUNTER, 0, 0 },
956
    { "gotweapon", PLAYER_GOTWEAPON, LABEL_HASPARM2, MAX_WEAPONS },
956
    { "gotweapon", PLAYER_GOTWEAPON, LABEL_HASPARM2, MAX_WEAPONS },
957
    { "refresh_inventory", PLAYER_REFRESH_INVENTORY, 0, 0 },
957
    { "refresh_inventory", PLAYER_REFRESH_INVENTORY, 0, 0 },
958
    { "palette", PLAYER_PALETTE, 0, 0 },
958
    { "palette", PLAYER_PALETTE, 0, 0 },
959
    { "toggle_key_flag", PLAYER_TOGGLE_KEY_FLAG, 0, 0 },
959
    { "toggle_key_flag", PLAYER_TOGGLE_KEY_FLAG, 0, 0 },
960
    { "knuckle_incs", PLAYER_KNUCKLE_INCS, 0, 0 },
960
    { "knuckle_incs", PLAYER_KNUCKLE_INCS, 0, 0 },
961
    { "walking_snd_toggle", PLAYER_WALKING_SND_TOGGLE, 0, 0 },
961
    { "walking_snd_toggle", PLAYER_WALKING_SND_TOGGLE, 0, 0 },
962
    { "palookup", PLAYER_PALOOKUP, 0, 0 },
962
    { "palookup", PLAYER_PALOOKUP, 0, 0 },
963
    { "hard_landing", PLAYER_HARD_LANDING, 0, 0 },
963
    { "hard_landing", PLAYER_HARD_LANDING, 0, 0 },
964
    { "max_secret_rooms", PLAYER_MAX_SECRET_ROOMS, 0, 0 },
964
    { "max_secret_rooms", PLAYER_MAX_SECRET_ROOMS, 0, 0 },
965
    { "secret_rooms", PLAYER_SECRET_ROOMS, 0, 0 },
965
    { "secret_rooms", PLAYER_SECRET_ROOMS, 0, 0 },
966
    { "pals", PLAYER_PALS, LABEL_HASPARM2, 3 },
966
    { "pals", PLAYER_PALS, LABEL_HASPARM2, 3 },
967
    { "max_actors_killed", PLAYER_MAX_ACTORS_KILLED, 0, 0 },
967
    { "max_actors_killed", PLAYER_MAX_ACTORS_KILLED, 0, 0 },
968
    { "actors_killed", PLAYER_ACTORS_KILLED, 0, 0 },
968
    { "actors_killed", PLAYER_ACTORS_KILLED, 0, 0 },
969
    { "return_to_center", PLAYER_RETURN_TO_CENTER, 0, 0 },
969
    { "return_to_center", PLAYER_RETURN_TO_CENTER, 0, 0 },
970
    { "runspeed", PLAYER_RUNSPEED, 0, 0 },
970
    { "runspeed", PLAYER_RUNSPEED, 0, 0 },
971
    { "sbs", PLAYER_SBS, 0, 0 },
971
    { "sbs", PLAYER_SBS, 0, 0 },
972
    { "reloading", PLAYER_RELOADING, 0, 0 },
972
    { "reloading", PLAYER_RELOADING, 0, 0 },
973
    { "auto_aim", PLAYER_AUTO_AIM, 0, 0 },
973
    { "auto_aim", PLAYER_AUTO_AIM, 0, 0 },
974
    { "movement_lock", PLAYER_MOVEMENT_LOCK, 0, 0 },
974
    { "movement_lock", PLAYER_MOVEMENT_LOCK, 0, 0 },
975
    { "sound_pitch", PLAYER_SOUND_PITCH, 0, 0 },
975
    { "sound_pitch", PLAYER_SOUND_PITCH, 0, 0 },
976
    { "weaponswitch", PLAYER_WEAPONSWITCH, 0, 0 },
976
    { "weaponswitch", PLAYER_WEAPONSWITCH, 0, 0 },
977
    { "team", PLAYER_TEAM, 0, 0 },
977
    { "team", PLAYER_TEAM, 0, 0 },
978
    { "max_player_health", PLAYER_MAX_PLAYER_HEALTH, 0, 0 },
978
    { "max_player_health", PLAYER_MAX_PLAYER_HEALTH, 0, 0 },
979
    { "max_shield_amount", PLAYER_MAX_SHIELD_AMOUNT, 0, 0 },
979
    { "max_shield_amount", PLAYER_MAX_SHIELD_AMOUNT, 0, 0 },
980
    { "max_ammo_amount", PLAYER_MAX_AMMO_AMOUNT, LABEL_HASPARM2, MAX_WEAPONS },
980
    { "max_ammo_amount", PLAYER_MAX_AMMO_AMOUNT, LABEL_HASPARM2, MAX_WEAPONS },
981
    { "last_quick_kick", PLAYER_LAST_QUICK_KICK, 0, 0 },
981
    { "last_quick_kick", PLAYER_LAST_QUICK_KICK, 0, 0 },
982
    { "autostep", PLAYER_AUTOSTEP, 0, 0 },
982
    { "autostep", PLAYER_AUTOSTEP, 0, 0 },
983
    { "autostep_sbw", PLAYER_AUTOSTEP_SBW, 0, 0 },
983
    { "autostep_sbw", PLAYER_AUTOSTEP_SBW, 0, 0 },
984
    { "", -1, 0, 0  }     // END OF LIST
984
    { "", -1, 0, 0  }     // END OF LIST
985
};
985
};
986
986
987
const memberlabel_t ProjectileLabels[]=
987
const memberlabel_t ProjectileLabels[]=
988
{
988
{
989
    { "workslike", PROJ_WORKSLIKE, 0, 0 },
989
    { "workslike", PROJ_WORKSLIKE, 0, 0 },
990
    { "spawns", PROJ_SPAWNS, 0, 0 },
990
    { "spawns", PROJ_SPAWNS, 0, 0 },
991
    { "sxrepeat", PROJ_SXREPEAT, 0, 0 },
991
    { "sxrepeat", PROJ_SXREPEAT, 0, 0 },
992
    { "syrepeat", PROJ_SYREPEAT, 0, 0 },
992
    { "syrepeat", PROJ_SYREPEAT, 0, 0 },
993
    { "sound", PROJ_SOUND, 0, 0 },
993
    { "sound", PROJ_SOUND, 0, 0 },
994
    { "isound", PROJ_ISOUND, 0, 0 },
994
    { "isound", PROJ_ISOUND, 0, 0 },
995
    { "vel", PROJ_VEL, 0, 0 },
995
    { "vel", PROJ_VEL, 0, 0 },
996
    { "extra", PROJ_EXTRA, 0, 0 },
996
    { "extra", PROJ_EXTRA, 0, 0 },
997
    { "decal", PROJ_DECAL, 0, 0 },
997
    { "decal", PROJ_DECAL, 0, 0 },
998
    { "trail", PROJ_TRAIL, 0, 0 },
998
    { "trail", PROJ_TRAIL, 0, 0 },
999
    { "txrepeat", PROJ_TXREPEAT, 0, 0 },
999
    { "txrepeat", PROJ_TXREPEAT, 0, 0 },
1000
    { "tyrepeat", PROJ_TYREPEAT, 0, 0 },
1000
    { "tyrepeat", PROJ_TYREPEAT, 0, 0 },
1001
    { "toffset", PROJ_TOFFSET, 0, 0 },
1001
    { "toffset", PROJ_TOFFSET, 0, 0 },
1002
    { "tnum", PROJ_TNUM, 0, 0 },
1002
    { "tnum", PROJ_TNUM, 0, 0 },
1003
    { "drop", PROJ_DROP, 0, 0 },
1003
    { "drop", PROJ_DROP, 0, 0 },
1004
    { "cstat", PROJ_CSTAT, 0, 0 },
1004
    { "cstat", PROJ_CSTAT, 0, 0 },
1005
    { "clipdist", PROJ_CLIPDIST, 0, 0 },
1005
    { "clipdist", PROJ_CLIPDIST, 0, 0 },
1006
    { "shade", PROJ_SHADE, 0, 0 },
1006
    { "shade", PROJ_SHADE, 0, 0 },
1007
    { "xrepeat", PROJ_XREPEAT, 0, 0 },
1007
    { "xrepeat", PROJ_XREPEAT, 0, 0 },
1008
    { "yrepeat", PROJ_YREPEAT, 0, 0 },
1008
    { "yrepeat", PROJ_YREPEAT, 0, 0 },
1009
    { "pal", PROJ_PAL, 0, 0 },
1009
    { "pal", PROJ_PAL, 0, 0 },
1010
    { "extra_rand", PROJ_EXTRA_RAND, 0, 0 },
1010
    { "extra_rand", PROJ_EXTRA_RAND, 0, 0 },
1011
    { "hitradius", PROJ_HITRADIUS, 0, 0 },
1011
    { "hitradius", PROJ_HITRADIUS, 0, 0 },
1012
    { "velmult", PROJ_MOVECNT, 0, 0 },
1012
    { "velmult", PROJ_MOVECNT, 0, 0 },
1013
    { "offset", PROJ_OFFSET, 0, 0 },
1013
    { "offset", PROJ_OFFSET, 0, 0 },
1014
    { "bounces", PROJ_BOUNCES, 0, 0 },
1014
    { "bounces", PROJ_BOUNCES, 0, 0 },
1015
    { "bsound", PROJ_BSOUND, 0, 0 },
1015
    { "bsound", PROJ_BSOUND, 0, 0 },
1016
    { "range", PROJ_RANGE, 0, 0 },
1016
    { "range", PROJ_RANGE, 0, 0 },
1017
    { "flashcolor", PROJ_FLASH_COLOR, 0, 0 },
1017
    { "flashcolor", PROJ_FLASH_COLOR, 0, 0 },
1018
    { "userdata", PROJ_USERDATA, 0, 0 },
1018
    { "userdata", PROJ_USERDATA, 0, 0 },
1019
    { "", -1, 0, 0  }     // END OF LIST
1019
    { "", -1, 0, 0  }     // END OF LIST
1020
};
1020
};
1021
1021
1022
const memberlabel_t UserdefsLabels[]=
1022
const memberlabel_t UserdefsLabels[]=
1023
{
1023
{
1024
    //        { "<null>", 1, 0, 0 },
1024
    //        { "<null>", 1, 0, 0 },
1025
    { "god", USERDEFS_GOD, 0, 0 },
1025
    { "god", USERDEFS_GOD, 0, 0 },
1026
    { "warp_on", USERDEFS_WARP_ON, 0, 0 },
1026
    { "warp_on", USERDEFS_WARP_ON, 0, 0 },
1027
    { "cashman", USERDEFS_CASHMAN, 0, 0 },
1027
    { "cashman", USERDEFS_CASHMAN, 0, 0 },
1028
    { "eog", USERDEFS_EOG, 0, 0 },
1028
    { "eog", USERDEFS_EOG, 0, 0 },
1029
    { "showallmap", USERDEFS_SHOWALLMAP, 0, 0 },
1029
    { "showallmap", USERDEFS_SHOWALLMAP, 0, 0 },
1030
    { "show_help", USERDEFS_SHOW_HELP, 0, 0 },
1030
    { "show_help", USERDEFS_SHOW_HELP, 0, 0 },
1031
    { "scrollmode", USERDEFS_SCROLLMODE, 0, 0 },
1031
    { "scrollmode", USERDEFS_SCROLLMODE, 0, 0 },
1032
    { "clipping", USERDEFS_CLIPPING, 0, 0 },
1032
    { "clipping", USERDEFS_CLIPPING, 0, 0 },
1033
    { "user_name", USERDEFS_USER_NAME, LABEL_HASPARM2, MAXPLAYERS },
1033
    { "user_name", USERDEFS_USER_NAME, LABEL_HASPARM2, MAXPLAYERS },
1034
    { "ridecule", USERDEFS_RIDECULE, LABEL_HASPARM2 | LABEL_ISSTRING, 10 },
1034
    { "ridecule", USERDEFS_RIDECULE, LABEL_HASPARM2 | LABEL_ISSTRING, 10 },
1035
    { "savegame", USERDEFS_SAVEGAME, LABEL_HASPARM2 | LABEL_ISSTRING, 10 },
1035
    { "savegame", USERDEFS_SAVEGAME, LABEL_HASPARM2 | LABEL_ISSTRING, 10 },
1036
    { "pwlockout", USERDEFS_PWLOCKOUT, LABEL_ISSTRING, 128 },
1036
    { "pwlockout", USERDEFS_PWLOCKOUT, LABEL_ISSTRING, 128 },
1037
    { "rtsname;", USERDEFS_RTSNAME,  LABEL_ISSTRING, 128 },
1037
    { "rtsname;", USERDEFS_RTSNAME,  LABEL_ISSTRING, 128 },
1038
    { "overhead_on", USERDEFS_OVERHEAD_ON, 0, 0 },
1038
    { "overhead_on", USERDEFS_OVERHEAD_ON, 0, 0 },
1039
    { "last_overhead", USERDEFS_LAST_OVERHEAD, 0, 0 },
1039
    { "last_overhead", USERDEFS_LAST_OVERHEAD, 0, 0 },
1040
    { "showweapons", USERDEFS_SHOWWEAPONS, 0, 0 },
1040
    { "showweapons", USERDEFS_SHOWWEAPONS, 0, 0 },
1041
1041
1042
    { "pause_on", USERDEFS_PAUSE_ON, 0, 0 },
1042
    { "pause_on", USERDEFS_PAUSE_ON, 0, 0 },
1043
    { "from_bonus", USERDEFS_FROM_BONUS, 0, 0 },
1043
    { "from_bonus", USERDEFS_FROM_BONUS, 0, 0 },
1044
    { "camerasprite", USERDEFS_CAMERASPRITE, 0, 0 },
1044
    { "camerasprite", USERDEFS_CAMERASPRITE, 0, 0 },
1045
    { "last_camsprite", USERDEFS_LAST_CAMSPRITE, 0, 0 },
1045
    { "last_camsprite", USERDEFS_LAST_CAMSPRITE, 0, 0 },
1046
    { "last_level", USERDEFS_LAST_LEVEL, 0, 0 },
1046
    { "last_level", USERDEFS_LAST_LEVEL, 0, 0 },
1047
    { "secretlevel", USERDEFS_SECRETLEVEL, 0, 0 },
1047
    { "secretlevel", USERDEFS_SECRETLEVEL, 0, 0 },
1048
    { "playerbest", USERDEFS_PLAYERBEST, 0, 0 },
1048
    { "playerbest", USERDEFS_PLAYERBEST, 0, 0 },
1049
1049
1050
    { "const_visibility", USERDEFS_CONST_VISIBILITY, 0, 0 },
1050
    { "const_visibility", USERDEFS_CONST_VISIBILITY, 0, 0 },
1051
    { "uw_framerate", USERDEFS_UW_FRAMERATE, 0, 0 },
1051
    { "uw_framerate", USERDEFS_UW_FRAMERATE, 0, 0 },
1052
    { "camera_time", USERDEFS_CAMERA_TIME, 0, 0 },
1052
    { "camera_time", USERDEFS_CAMERA_TIME, 0, 0 },
1053
    { "folfvel", USERDEFS_FOLFVEL, 0, 0 },
1053
    { "folfvel", USERDEFS_FOLFVEL, 0, 0 },
1054
    { "folavel", USERDEFS_FOLAVEL, 0, 0 },
1054
    { "folavel", USERDEFS_FOLAVEL, 0, 0 },
1055
    { "folx", USERDEFS_FOLX, 0, 0 },
1055
    { "folx", USERDEFS_FOLX, 0, 0 },
1056
    { "foly", USERDEFS_FOLY, 0, 0 },
1056
    { "foly", USERDEFS_FOLY, 0, 0 },
1057
    { "fola", USERDEFS_FOLA, 0, 0 },
1057
    { "fola", USERDEFS_FOLA, 0, 0 },
1058
    { "reccnt", USERDEFS_RECCNT, 0, 0 },
1058
    { "reccnt", USERDEFS_RECCNT, 0, 0 },
1059
1059
1060
    { "m_origin_x", USERDEFS_M_ORIGIN_X, 0, 0 },
1060
    { "m_origin_x", USERDEFS_M_ORIGIN_X, 0, 0 },
1061
    { "m_origin_y", USERDEFS_M_ORIGIN_Y, 0, 0 },
1061
    { "m_origin_y", USERDEFS_M_ORIGIN_Y, 0, 0 },
1062
1062
1063
    { "entered_name", USERDEFS_ENTERED_NAME, 0, 0 },
1063
    { "entered_name", USERDEFS_ENTERED_NAME, 0, 0 },
1064
    { "screen_tilting", USERDEFS_SCREEN_TILTING, 0, 0 },
1064
    { "screen_tilting", USERDEFS_SCREEN_TILTING, 0, 0 },
1065
    { "shadows", USERDEFS_SHADOWS, 0, 0 },
1065
    { "shadows", USERDEFS_SHADOWS, 0, 0 },
1066
    { "fta_on", USERDEFS_FTA_ON, 0, 0 },
1066
    { "fta_on", USERDEFS_FTA_ON, 0, 0 },
1067
    { "executions", USERDEFS_EXECUTIONS, 0, 0 },
1067
    { "executions", USERDEFS_EXECUTIONS, 0, 0 },
1068
    { "auto_run", USERDEFS_AUTO_RUN, 0, 0 },
1068
    { "auto_run", USERDEFS_AUTO_RUN, 0, 0 },
1069
    { "coords", USERDEFS_COORDS, 0, 0 },
1069
    { "coords", USERDEFS_COORDS, 0, 0 },
1070
    { "tickrate", USERDEFS_TICKRATE, 0, 0 },
1070
    { "tickrate", USERDEFS_TICKRATE, 0, 0 },
1071
    { "m_coop", USERDEFS_M_COOP, 0, 0 },
1071
    { "m_coop", USERDEFS_M_COOP, 0, 0 },
1072
    { "coop", USERDEFS_COOP, 0, 0 },
1072
    { "coop", USERDEFS_COOP, 0, 0 },
1073
    { "screen_size", USERDEFS_SCREEN_SIZE, 0, 0 },
1073
    { "screen_size", USERDEFS_SCREEN_SIZE, 0, 0 },
1074
    { "lockout", USERDEFS_LOCKOUT, 0, 0 },
1074
    { "lockout", USERDEFS_LOCKOUT, 0, 0 },
1075
    { "crosshair", USERDEFS_CROSSHAIR, 0, 0 },
1075
    { "crosshair", USERDEFS_CROSSHAIR, 0, 0 },
1076
//    { "wchoice[MAXPLAYERS][MAX_WEAPONS]", USERDEFS_WCHOICE, 0, 0 },
1076
//    { "wchoice[MAXPLAYERS][MAX_WEAPONS]", USERDEFS_WCHOICE, 0, 0 },
1077
    { "playerai", USERDEFS_PLAYERAI, 0, 0 },
1077
    { "playerai", USERDEFS_PLAYERAI, 0, 0 },
1078
    { "respawn_monsters", USERDEFS_RESPAWN_MONSTERS, 0, 0 },
1078
    { "respawn_monsters", USERDEFS_RESPAWN_MONSTERS, 0, 0 },
1079
    { "respawn_items", USERDEFS_RESPAWN_ITEMS, 0, 0 },
1079
    { "respawn_items", USERDEFS_RESPAWN_ITEMS, 0, 0 },
1080
    { "respawn_inventory", USERDEFS_RESPAWN_INVENTORY, 0, 0 },
1080
    { "respawn_inventory", USERDEFS_RESPAWN_INVENTORY, 0, 0 },
1081
    { "recstat", USERDEFS_RECSTAT, 0, 0 },
1081
    { "recstat", USERDEFS_RECSTAT, 0, 0 },
1082
    { "monsters_off", USERDEFS_MONSTERS_OFF, 0, 0 },
1082
    { "monsters_off", USERDEFS_MONSTERS_OFF, 0, 0 },
1083
    { "brightness", USERDEFS_BRIGHTNESS, 0, 0 },
1083
    { "brightness", USERDEFS_BRIGHTNESS, 0, 0 },
1084
    { "m_respawn_items", USERDEFS_M_RESPAWN_ITEMS, 0, 0 },
1084
    { "m_respawn_items", USERDEFS_M_RESPAWN_ITEMS, 0, 0 },
1085
    { "m_respawn_monsters", USERDEFS_M_RESPAWN_MONSTERS, 0, 0 },
1085
    { "m_respawn_monsters", USERDEFS_M_RESPAWN_MONSTERS, 0, 0 },
1086
    { "m_respawn_inventory", USERDEFS_M_RESPAWN_INVENTORY, 0, 0 },
1086
    { "m_respawn_inventory", USERDEFS_M_RESPAWN_INVENTORY, 0, 0 },
1087
    { "m_recstat", USERDEFS_M_RECSTAT, 0, 0 },
1087
    { "m_recstat", USERDEFS_M_RECSTAT, 0, 0 },
1088
    { "m_monsters_off", USERDEFS_M_MONSTERS_OFF, 0, 0 },
1088
    { "m_monsters_off", USERDEFS_M_MONSTERS_OFF, 0, 0 },
1089
    { "detail", USERDEFS_DETAIL, 0, 0 },
1089
    { "detail", USERDEFS_DETAIL, 0, 0 },
1090
    { "m_ffire", USERDEFS_M_FFIRE, 0, 0 },
1090
    { "m_ffire", USERDEFS_M_FFIRE, 0, 0 },
1091
    { "ffire", USERDEFS_FFIRE, 0, 0 },
1091
    { "ffire", USERDEFS_FFIRE, 0, 0 },
1092
    { "m_player_skill", USERDEFS_M_PLAYER_SKILL, 0, 0 },
1092
    { "m_player_skill", USERDEFS_M_PLAYER_SKILL, 0, 0 },
1093
    { "m_level_number", USERDEFS_M_LEVEL_NUMBER, 0, 0 },
1093
    { "m_level_number", USERDEFS_M_LEVEL_NUMBER, 0, 0 },
1094
    { "m_volume_number", USERDEFS_M_VOLUME_NUMBER, 0, 0 },
1094
    { "m_volume_number", USERDEFS_M_VOLUME_NUMBER, 0, 0 },
1095
    { "multimode", USERDEFS_MULTIMODE, 0, 0 },
1095
    { "multimode", USERDEFS_MULTIMODE, 0, 0 },
1096
    { "player_skill", USERDEFS_PLAYER_SKILL, 0, 0 },
1096
    { "player_skill", USERDEFS_PLAYER_SKILL, 0, 0 },
1097
    { "level_number", USERDEFS_LEVEL_NUMBER, 0, 0 },
1097
    { "level_number", USERDEFS_LEVEL_NUMBER, 0, 0 },
1098
    { "volume_number", USERDEFS_VOLUME_NUMBER, 0, 0 },
1098
    { "volume_number", USERDEFS_VOLUME_NUMBER, 0, 0 },
1099
    { "m_marker", USERDEFS_M_MARKER, 0, 0 },
1099
    { "m_marker", USERDEFS_M_MARKER, 0, 0 },
1100
    { "marker", USERDEFS_MARKER, 0, 0 },
1100
    { "marker", USERDEFS_MARKER, 0, 0 },
1101
    { "mouseflip", USERDEFS_MOUSEFLIP, 0, 0 },
1101
    { "mouseflip", USERDEFS_MOUSEFLIP, 0, 0 },
1102
    { "statusbarscale", USERDEFS_STATUSBARSCALE, 0, 0 },
1102
    { "statusbarscale", USERDEFS_STATUSBARSCALE, 0, 0 },
1103
    { "drawweapon", USERDEFS_DRAWWEAPON, 0, 0 },
1103
    { "drawweapon", USERDEFS_DRAWWEAPON, 0, 0 },
1104
    { "mouseaiming", USERDEFS_MOUSEAIMING, 0, 0 },
1104
    { "mouseaiming", USERDEFS_MOUSEAIMING, 0, 0 },
1105
    { "weaponswitch", USERDEFS_WEAPONSWITCH, 0, 0 },
1105
    { "weaponswitch", USERDEFS_WEAPONSWITCH, 0, 0 },
1106
    { "democams", USERDEFS_DEMOCAMS, 0, 0 },
1106
    { "democams", USERDEFS_DEMOCAMS, 0, 0 },
1107
    { "color", USERDEFS_COLOR, 0, 0 },
1107
    { "color", USERDEFS_COLOR, 0, 0 },
1108
    { "msgdisptime", USERDEFS_MSGDISPTIME, 0, 0 },
1108
    { "msgdisptime", USERDEFS_MSGDISPTIME, 0, 0 },
1109
    { "statusbarmode", USERDEFS_STATUSBARMODE, 0, 0 },
1109
    { "statusbarmode", USERDEFS_STATUSBARMODE, 0, 0 },
1110
    { "m_noexits", USERDEFS_M_NOEXITS, 0, 0 },
1110
    { "m_noexits", USERDEFS_M_NOEXITS, 0, 0 },
1111
    { "noexits", USERDEFS_NOEXITS, 0, 0 },
1111
    { "noexits", USERDEFS_NOEXITS, 0, 0 },
1112
    { "autovote", USERDEFS_AUTOVOTE, 0, 0 },
1112
    { "autovote", USERDEFS_AUTOVOTE, 0, 0 },
1113
    { "automsg", USERDEFS_AUTOMSG, 0, 0 },
1113
    { "automsg", USERDEFS_AUTOMSG, 0, 0 },
1114
    { "idplayers", USERDEFS_IDPLAYERS, 0, 0 },
1114
    { "idplayers", USERDEFS_IDPLAYERS, 0, 0 },
1115
    { "team", USERDEFS_TEAM, 0, 0 },
1115
    { "team", USERDEFS_TEAM, 0, 0 },
1116
    { "viewbob", USERDEFS_VIEWBOB, 0, 0 },
1116
    { "viewbob", USERDEFS_VIEWBOB, 0, 0 },
1117
    { "weaponsway", USERDEFS_WEAPONSWAY, 0, 0 },
1117
    { "weaponsway", USERDEFS_WEAPONSWAY, 0, 0 },
1118
    { "angleinterpolation", USERDEFS_ANGLEINTERPOLATION, 0, 0 },
1118
    { "angleinterpolation", USERDEFS_ANGLEINTERPOLATION, 0, 0 },
1119
    { "obituaries", USERDEFS_OBITUARIES, 0, 0 },
1119
    { "obituaries", USERDEFS_OBITUARIES, 0, 0 },
1120
    { "levelstats", USERDEFS_LEVELSTATS, 0, 0 },
1120
    { "levelstats", USERDEFS_LEVELSTATS, 0, 0 },
1121
    { "crosshairscale", USERDEFS_CROSSHAIRSCALE, 0, 0 },
1121
    { "crosshairscale", USERDEFS_CROSSHAIRSCALE, 0, 0 },
1122
    { "althud", USERDEFS_ALTHUD, 0, 0 },
1122
    { "althud", USERDEFS_ALTHUD, 0, 0 },
1123
    { "display_bonus_screen", USERDEFS_DISPLAY_BONUS_SCREEN, 0, 0 },
1123
    { "display_bonus_screen", USERDEFS_DISPLAY_BONUS_SCREEN, 0, 0 },
1124
    { "show_level_text", USERDEFS_SHOW_LEVEL_TEXT, 0, 0 },
1124
    { "show_level_text", USERDEFS_SHOW_LEVEL_TEXT, 0, 0 },
1125
    { "weaponscale", USERDEFS_WEAPONSCALE, 0, 0 },
1125
    { "weaponscale", USERDEFS_WEAPONSCALE, 0, 0 },
1126
    { "textscale", USERDEFS_TEXTSCALE, 0, 0 },
1126
    { "textscale", USERDEFS_TEXTSCALE, 0, 0 },
1127
    { "runkey_mode", USERDEFS_RUNKEY_MODE, 0, 0 },
1127
    { "runkey_mode", USERDEFS_RUNKEY_MODE, 0, 0 },
-
 
1128
    { "musictoggle", USERDEFS_MUSICTOGGLE, 0, 0 },
1128
    { "", -1, 0, 0  }     // END OF LIST
1129
    { "", -1, 0, 0  }     // END OF LIST
1129
};
1130
};
1130
1131
1131
const memberlabel_t InputLabels[]=
1132
const memberlabel_t InputLabels[]=
1132
{
1133
{
1133
    { "avel", INPUT_AVEL, 0, 0 },
1134
    { "avel", INPUT_AVEL, 0, 0 },
1134
    { "horz", INPUT_HORZ, 0, 0 },
1135
    { "horz", INPUT_HORZ, 0, 0 },
1135
    { "fvel", INPUT_FVEL, 0, 0 },
1136
    { "fvel", INPUT_FVEL, 0, 0 },
1136
    { "svel", INPUT_SVEL, 0, 0 },
1137
    { "svel", INPUT_SVEL, 0, 0 },
1137
    { "bits", INPUT_BITS, 0, 0 },
1138
    { "bits", INPUT_BITS, 0, 0 },
1138
    { "extbits", INPUT_EXTBITS, 0, 0 },
1139
    { "extbits", INPUT_EXTBITS, 0, 0 },
1139
    { "", -1, 0, 0  }     // END OF LIST
1140
    { "", -1, 0, 0  }     // END OF LIST
1140
};
1141
};
1141
1142
1142
#endif
1143
#endif
1143
1144
1144
char *bitptr; // pointer to bitmap of which bytecode positions contain pointers
1145
char *bitptr; // pointer to bitmap of which bytecode positions contain pointers
1145
#define BITPTR_POINTER 1
1146
#define BITPTR_POINTER 1
1146
1147
1147
#if !defined LUNATIC
1148
#if !defined LUNATIC
1148
hashtable_t h_gamevars    = { MAXGAMEVARS>>1, NULL };
1149
hashtable_t h_gamevars    = { MAXGAMEVARS>>1, NULL };
1149
hashtable_t h_arrays      = { MAXGAMEARRAYS>>1, NULL };
1150
hashtable_t h_arrays      = { MAXGAMEARRAYS>>1, NULL };
1150
hashtable_t h_labels      = { 11264>>1, NULL };
1151
hashtable_t h_labels      = { 11264>>1, NULL };
1151
1152
1152
static hashtable_t h_keywords       = { CON_END>>1, NULL };
1153
static hashtable_t h_keywords       = { CON_END>>1, NULL };
1153
1154
1154
static hashtable_t sectorH     = { SECTOR_END>>1, NULL };
1155
static hashtable_t sectorH     = { SECTOR_END>>1, NULL };
1155
static hashtable_t wallH       = { WALL_END>>1, NULL };
1156
static hashtable_t wallH       = { WALL_END>>1, NULL };
1156
static hashtable_t userdefH    = { USERDEFS_END>>1, NULL };
1157
static hashtable_t userdefH    = { USERDEFS_END>>1, NULL };
1157
1158
1158
static hashtable_t projectileH = { PROJ_END>>1, NULL };
1159
static hashtable_t projectileH = { PROJ_END>>1, NULL };
1159
static hashtable_t playerH     = { PLAYER_END>>1, NULL };
1160
static hashtable_t playerH     = { PLAYER_END>>1, NULL };
1160
static hashtable_t inputH      = { INPUT_END>>1, NULL };
1161
static hashtable_t inputH      = { INPUT_END>>1, NULL };
1161
static hashtable_t actorH      = { ACTOR_END>>1, NULL };
1162
static hashtable_t actorH      = { ACTOR_END>>1, NULL };
1162
static hashtable_t tspriteH    = { ACTOR_END>>1, NULL };
1163
static hashtable_t tspriteH    = { ACTOR_END>>1, NULL };
1163
1164
1164
void C_InitHashes()
1165
void C_InitHashes()
1165
{
1166
{
1166
    int32_t i;
1167
    int32_t i;
1167
1168
1168
    hash_init(&h_gamevars);
1169
    hash_init(&h_gamevars);
1169
    hash_init(&h_arrays);
1170
    hash_init(&h_arrays);
1170
    hash_init(&h_labels);
1171
    hash_init(&h_labels);
1171
    inithashnames();
1172
    inithashnames();
1172
    initsoundhashnames();
1173
    initsoundhashnames();
1173
1174
1174
    hash_init(&h_keywords);
1175
    hash_init(&h_keywords);
1175
    hash_init(&sectorH);
1176
    hash_init(&sectorH);
1176
    hash_init(&wallH);
1177
    hash_init(&wallH);
1177
    hash_init(&userdefH);
1178
    hash_init(&userdefH);
1178
    hash_init(&projectileH);
1179
    hash_init(&projectileH);
1179
    hash_init(&playerH);
1180
    hash_init(&playerH);
1180
    hash_init(&inputH);
1181
    hash_init(&inputH);
1181
    hash_init(&actorH);
1182
    hash_init(&actorH);
1182
    hash_init(&tspriteH);
1183
    hash_init(&tspriteH);
1183
1184
1184
    g_scriptLastKeyword = NUMKEYWORDS-1;
1185
    g_scriptLastKeyword = NUMKEYWORDS-1;
1185
    // determine last CON keyword for backward compatibility with older mods
1186
    // determine last CON keyword for backward compatibility with older mods
1186
    if (g_scriptDateVersion < g_keywdate[NUMKEYWDATES-1].date)
1187
    if (g_scriptDateVersion < g_keywdate[NUMKEYWDATES-1].date)
1187
    {
1188
    {
1188
        for (i=NUMKEYWDATES-1; i>=0; i--)
1189
        for (i=NUMKEYWDATES-1; i>=0; i--)
1189
        {
1190
        {
1190
            if (g_scriptDateVersion >= g_keywdate[i].date)
1191
            if (g_scriptDateVersion >= g_keywdate[i].date)
1191
            {
1192
            {
1192
                g_scriptLastKeyword = g_keywdate[i].keyw;
1193
                g_scriptLastKeyword = g_keywdate[i].keyw;
1193
                break;
1194
                break;
1194
            }
1195
            }
1195
        }
1196
        }
1196
1197
1197
        if (i<0)
1198
        if (i<0)
1198
            g_scriptLastKeyword = g_keywdate[0].keyw-1;  // may be slightly imprecise
1199
            g_scriptLastKeyword = g_keywdate[0].keyw-1;  // may be slightly imprecise
1199
    }
1200
    }
1200
1201
1201
    for (i=g_scriptLastKeyword; i>=0; i--) hash_add(&h_keywords,keyw[i],i,0);
1202
    for (i=g_scriptLastKeyword; i>=0; i--) hash_add(&h_keywords,keyw[i],i,0);
1202
    for (i=0; SectorLabels[i].lId >= 0; i++) hash_add(&sectorH,SectorLabels[i].name,i,0);
1203
    for (i=0; SectorLabels[i].lId >= 0; i++) hash_add(&sectorH,SectorLabels[i].name,i,0);
1203
    for (i=0; WallLabels[i].lId >= 0; i++) hash_add(&wallH,WallLabels[i].name,i,0);
1204
    for (i=0; WallLabels[i].lId >= 0; i++) hash_add(&wallH,WallLabels[i].name,i,0);
1204
    for (i=0; UserdefsLabels[i].lId >= 0; i++) hash_add(&userdefH,UserdefsLabels[i].name,i,0);
1205
    for (i=0; UserdefsLabels[i].lId >= 0; i++) hash_add(&userdefH,UserdefsLabels[i].name,i,0);
1205
    for (i=0; ProjectileLabels[i].lId >= 0; i++) hash_add(&projectileH,ProjectileLabels[i].name,i,0);
1206
    for (i=0; ProjectileLabels[i].lId >= 0; i++) hash_add(&projectileH,ProjectileLabels[i].name,i,0);
1206
    for (i=0; PlayerLabels[i].lId >= 0; i++) hash_add(&playerH,PlayerLabels[i].name,i,0);
1207
    for (i=0; PlayerLabels[i].lId >= 0; i++) hash_add(&playerH,PlayerLabels[i].name,i,0);
1207
    for (i=0; InputLabels[i].lId >= 0; i++) hash_add(&inputH,InputLabels[i].name,i,0);
1208
    for (i=0; InputLabels[i].lId >= 0; i++) hash_add(&inputH,InputLabels[i].name,i,0);
1208
    for (i=0; ActorLabels[i].lId >= 0; i++) hash_add(&actorH,ActorLabels[i].name,i,0);
1209
    for (i=0; ActorLabels[i].lId >= 0; i++) hash_add(&actorH,ActorLabels[i].name,i,0);
1209
    for (i=0; TsprLabels[i].lId >= 0; i++) hash_add(&tspriteH,TsprLabels[i].name,i,0);
1210
    for (i=0; TsprLabels[i].lId >= 0; i++) hash_add(&tspriteH,TsprLabels[i].name,i,0);
1210
}
1211
}
1211
1212
1212
// "magic" number for { and }, overrides line number in compiled code for later detection
1213
// "magic" number for { and }, overrides line number in compiled code for later detection
1213
#define IFELSE_MAGIC 31337
1214
#define IFELSE_MAGIC 31337
1214
static int32_t g_ifElseAborted;
1215
static int32_t g_ifElseAborted;
1215
1216
1216
static int32_t C_SetScriptSize(int32_t newsize)
1217
static int32_t C_SetScriptSize(int32_t newsize)
1217
{
1218
{
1218
    intptr_t oscriptPtr = (unsigned)(g_scriptPtr-script);
1219
    intptr_t oscriptPtr = (unsigned)(g_scriptPtr-script);
1219
    intptr_t ocaseScriptPtr = (unsigned)(g_caseScriptPtr-script);
1220
    intptr_t ocaseScriptPtr = (unsigned)(g_caseScriptPtr-script);
1220
    intptr_t oparsingEventPtr = (unsigned)(g_parsingEventPtr-script);
1221
    intptr_t oparsingEventPtr = (unsigned)(g_parsingEventPtr-script);
1221
    intptr_t oparsingActorPtr = (unsigned)(g_parsingActorPtr-script);
1222
    intptr_t oparsingActorPtr = (unsigned)(g_parsingActorPtr-script);
1222
    intptr_t *newscript;
1223
    intptr_t *newscript;
1223
    intptr_t i, j;
1224
    intptr_t i, j;
1224
    int32_t osize = g_scriptSize;
1225
    int32_t osize = g_scriptSize;
1225
    char *scriptptrs;
1226
    char *scriptptrs;
1226
    char *newbitptr;
1227
    char *newbitptr;
1227
1228
1228
    scriptptrs = (char *)Xcalloc(1, g_scriptSize * sizeof(uint8_t));
1229
    scriptptrs = (char *)Xcalloc(1, g_scriptSize * sizeof(uint8_t));
1229
1230
1230
    for (i=g_scriptSize-1; i>=0; i--)
1231
    for (i=g_scriptSize-1; i>=0; i--)
1231
    {
1232
    {
1232
        if (bitptr[i>>3]&(BITPTR_POINTER<<(i&7)))
1233
        if (bitptr[i>>3]&(BITPTR_POINTER<<(i&7)))
1233
        {
1234
        {
1234
            if (EDUKE32_PREDICT_FALSE((intptr_t)script[i] < (intptr_t)&script[0] || (intptr_t)script[i] >= (intptr_t)&script[g_scriptSize]))
1235
            if (EDUKE32_PREDICT_FALSE((intptr_t)script[i] < (intptr_t)&script[0] || (intptr_t)script[i] >= (intptr_t)&script[g_scriptSize]))
1235
            {
1236
            {
1236
                g_numCompilerErrors++;
1237
                g_numCompilerErrors++;
1237
                initprintf("Internal compiler error at %" PRIdPTR " (0x%" PRIxPTR ")\n",i,i);
1238
                initprintf("Internal compiler error at %" PRIdPTR " (0x%" PRIxPTR ")\n",i,i);
1238
            }
1239
            }
1239
1240
1240
            scriptptrs[i] = 1;
1241
            scriptptrs[i] = 1;
1241
            script[i] -= (intptr_t)&script[0];
1242
            script[i] -= (intptr_t)&script[0];
1242
        }
1243
        }
1243
        else scriptptrs[i] = 0;
1244
        else scriptptrs[i] = 0;
1244
    }
1245
    }
1245
1246
1246
    G_Util_PtrToIdx2(&g_tile[0].execPtr, MAXTILES, sizeof(tiledata_t), script, P2I_FWD_NON0);
1247
    G_Util_PtrToIdx2(&g_tile[0].execPtr, MAXTILES, sizeof(tiledata_t), script, P2I_FWD_NON0);
1247
    G_Util_PtrToIdx2(&g_tile[0].loadPtr, MAXTILES, sizeof(tiledata_t), script, P2I_FWD_NON0);
1248
    G_Util_PtrToIdx2(&g_tile[0].loadPtr, MAXTILES, sizeof(tiledata_t), script, P2I_FWD_NON0);
1248
    G_Util_PtrToIdx(apScriptGameEvent, MAXGAMEEVENTS, script, P2I_FWD_NON0);
1249
    G_Util_PtrToIdx(apScriptGameEvent, MAXGAMEEVENTS, script, P2I_FWD_NON0);
1249
1250
1250
    initprintf("Resizing code buffer to %d*%d bytes\n",newsize, (int32_t)sizeof(intptr_t));
1251
    initprintf("Resizing code buffer to %d*%d bytes\n",newsize, (int32_t)sizeof(intptr_t));
1251
1252
1252
    newscript = (intptr_t *)Xrealloc(script, newsize * sizeof(intptr_t));
1253
    newscript = (intptr_t *)Xrealloc(script, newsize * sizeof(intptr_t));
1253
    newbitptr = (char *)Xcalloc(1,(((newsize+7)>>3)+1) * sizeof(uint8_t));
1254
    newbitptr = (char *)Xcalloc(1,(((newsize+7)>>3)+1) * sizeof(uint8_t));
1254
1255
1255
    if (newsize >= osize)
1256
    if (newsize >= osize)
1256
    {
1257
    {
1257
        Bmemset(&newscript[0]+osize,0,(newsize-osize) * sizeof(uint8_t));
1258
        Bmemset(&newscript[0]+osize,0,(newsize-osize) * sizeof(uint8_t));
1258
        Bmemcpy(newbitptr,bitptr,sizeof(uint8_t) *((osize+7)>>3));
1259
        Bmemcpy(newbitptr,bitptr,sizeof(uint8_t) *((osize+7)>>3));
1259
    }
1260
    }
1260
    else
1261
    else
1261
        Bmemcpy(newbitptr,bitptr,sizeof(uint8_t) *((newsize+7)>>3));
1262
        Bmemcpy(newbitptr,bitptr,sizeof(uint8_t) *((newsize+7)>>3));
1262
1263
1263
    Bfree(bitptr);
1264
    Bfree(bitptr);
1264
    bitptr = newbitptr;
1265
    bitptr = newbitptr;
1265
    if (script != newscript)
1266
    if (script != newscript)
1266
    {
1267
    {
1267
        initprintf("Relocating compiled code from to 0x%" PRIxPTR " to 0x%" PRIxPTR "\n", (intptr_t)script, (intptr_t)newscript);
1268
        initprintf("Relocating compiled code from to 0x%" PRIxPTR " to 0x%" PRIxPTR "\n", (intptr_t)script, (intptr_t)newscript);
1268
        script = newscript;
1269
        script = newscript;
1269
    }
1270
    }
1270
1271
1271
    g_scriptSize = newsize;
1272
    g_scriptSize = newsize;
1272
    g_scriptPtr = (intptr_t *)(script+oscriptPtr);
1273
    g_scriptPtr = (intptr_t *)(script+oscriptPtr);
1273
1274
1274
    if (g_caseScriptPtr)
1275
    if (g_caseScriptPtr)
1275
        g_caseScriptPtr = (intptr_t *)(script+ocaseScriptPtr);
1276
        g_caseScriptPtr = (intptr_t *)(script+ocaseScriptPtr);
1276
1277
1277
    if (g_parsingEventPtr)
1278
    if (g_parsingEventPtr)
1278
        g_parsingEventPtr = (intptr_t *)(script+oparsingEventPtr);
1279
        g_parsingEventPtr = (intptr_t *)(script+oparsingEventPtr);
1279
1280
1280
    if (g_parsingActorPtr)
1281
    if (g_parsingActorPtr)
1281
        g_parsingActorPtr = (intptr_t *)(script+oparsingActorPtr);
1282
        g_parsingActorPtr = (intptr_t *)(script+oparsingActorPtr);
1282
1283
1283
    for (i=(((newsize>=osize)?osize:newsize))-1; i>=0; i--)
1284
    for (i=(((newsize>=osize)?osize:newsize))-1; i>=0; i--)
1284
        if (scriptptrs[i])
1285
        if (scriptptrs[i])
1285
        {
1286
        {
1286
            j = (intptr_t)script[i]+(intptr_t)&script[0];
1287
            j = (intptr_t)script[i]+(intptr_t)&script[0];
1287
            script[i] = j;
1288
            script[i] = j;
1288
        }
1289
        }
1289
1290
1290
    G_Util_PtrToIdx2(&g_tile[0].execPtr, MAXTILES, sizeof(tiledata_t), script, P2I_BACK_NON0);
1291
    G_Util_PtrToIdx2(&g_tile[0].execPtr, MAXTILES, sizeof(tiledata_t), script, P2I_BACK_NON0);
1291
    G_Util_PtrToIdx2(&g_tile[0].loadPtr, MAXTILES, sizeof(tiledata_t), script, P2I_BACK_NON0);
1292
    G_Util_PtrToIdx2(&g_tile[0].loadPtr, MAXTILES, sizeof(tiledata_t), script, P2I_BACK_NON0);
1292
    G_Util_PtrToIdx(apScriptGameEvent, MAXGAMEEVENTS, script, P2I_BACK_NON0);
1293
    G_Util_PtrToIdx(apScriptGameEvent, MAXGAMEEVENTS, script, P2I_BACK_NON0);
1293
1294
1294
    Bfree(scriptptrs);
1295
    Bfree(scriptptrs);
1295
    return 0;
1296
    return 0;
1296
}
1297
}
1297
1298
1298
static int32_t ispecial(const char c)
1299
static int32_t ispecial(const char c)
1299
{
1300
{
1300
    if (c == ' ' || c == 0x0d || c == '(' || c == ')' ||
1301
    if (c == ' ' || c == 0x0d || c == '(' || c == ')' ||
1301
            c == ',' || c == ';' || (c == 0x0a /*&& ++g_lineNumber*/))
1302
            c == ',' || c == ';' || (c == 0x0a /*&& ++g_lineNumber*/))
1302
        return 1;
1303
        return 1;
1303
1304
1304
    return 0;
1305
    return 0;
1305
}
1306
}
1306
1307
1307
#define C_NextLine() while (*textptr != 0x0a && *textptr != 0x0d && *textptr != 0) textptr++
1308
#define C_NextLine() while (*textptr != 0x0a && *textptr != 0x0d && *textptr != 0) textptr++
1308
1309
1309
static int32_t C_SkipComments(void)
1310
static int32_t C_SkipComments(void)
1310
{
1311
{
1311
    do
1312
    do
1312
    {
1313
    {
1313
        switch (*textptr)
1314
        switch (*textptr)
1314
        {
1315
        {
1315
        case '\n':
1316
        case '\n':
1316
            g_lineNumber++;
1317
            g_lineNumber++;
1317
        case ' ':
1318
        case ' ':
1318
        case '\t':
1319
        case '\t':
1319
        case '\r':
1320
        case '\r':
1320
        case 0x1a:
1321
        case 0x1a:
1321
            textptr++;
1322
            textptr++;
1322
            break;
1323
            break;
1323
        case '/':
1324
        case '/':
1324
            switch (textptr[1])
1325
            switch (textptr[1])
1325
            {
1326
            {
1326
            case '/': // C++ style comment
1327
            case '/': // C++ style comment
1327
                if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
1328
                if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
1328
                    initprintf("%s:%d: debug: got comment.\n",g_szScriptFileName,g_lineNumber);
1329
                    initprintf("%s:%d: debug: got comment.\n",g_szScriptFileName,g_lineNumber);
1329
                C_NextLine();
1330
                C_NextLine();
1330
                continue;
1331
                continue;
1331
            case '*': // beginning of a C style comment
1332
            case '*': // beginning of a C style comment
1332
                if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
1333
                if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
1333
                    initprintf("%s:%d: debug: got start of comment block.\n",g_szScriptFileName,g_lineNumber);
1334
                    initprintf("%s:%d: debug: got start of comment block.\n",g_szScriptFileName,g_lineNumber);
1334
                do
1335
                do
1335
                {
1336
                {
1336
                    if (*textptr == '\n')
1337
                    if (*textptr == '\n')
1337
                        g_lineNumber++;
1338
                        g_lineNumber++;
1338
                    textptr++;
1339
                    textptr++;
1339
                }
1340
                }
1340
                while (*textptr && (textptr[0] != '*' || textptr[1] != '/'));
1341
                while (*textptr && (textptr[0] != '*' || textptr[1] != '/'));
1341
1342
1342
                if (EDUKE32_PREDICT_FALSE(!*textptr))
1343
                if (EDUKE32_PREDICT_FALSE(!*textptr))
1343
                {
1344
                {
1344
                    if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug)
1345
                    if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug)
1345
                        initprintf("%s:%d: debug: EOF in comment!\n",g_szScriptFileName,g_lineNumber);
1346
                        initprintf("%s:%d: debug: EOF in comment!\n",g_szScriptFileName,g_lineNumber);
1346
                    C_ReportError(-1);
1347
                    C_ReportError(-1);
1347
                    initprintf("%s:%d: error: found `/*' with no `*/'.\n",g_szScriptFileName,g_lineNumber);
1348
                    initprintf("%s:%d: error: found `/*' with no `*/'.\n",g_szScriptFileName,g_lineNumber);
1348
                    g_parsingActorPtr = NULL; g_processingState = g_numBraces = 0;
1349
                    g_parsingActorPtr = NULL; g_processingState = g_numBraces = 0;
1349
                    g_numCompilerErrors++;
1350
                    g_numCompilerErrors++;
1350
                    continue;
1351
                    continue;
1351
                }
1352
                }
1352
1353
1353
                if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
1354
                if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
1354
                    initprintf("%s:%d: debug: got end of comment block.\n",g_szScriptFileName,g_lineNumber);
1355
                    initprintf("%s:%d: debug: got end of comment block.\n",g_szScriptFileName,g_lineNumber);
1355
1356
1356
                textptr+=2;
1357
                textptr+=2;
1357
                continue;
1358
                continue;
1358
            }
1359
            }
1359
            continue;
1360
            continue;
1360
1361
1361
        default:
1362
        default:
1362
            if (ispecial(*textptr))
1363
            if (ispecial(*textptr))
1363
            {
1364
            {
1364
                textptr++;
1365
                textptr++;
1365
                continue;
1366
                continue;
1366
            }
1367
            }
1367
        case 0: // EOF
1368
        case 0: // EOF
1368
            return ((g_scriptPtr-script) > (g_scriptSize-32)) ? C_SetScriptSize(g_scriptSize<<1) : 0;
1369
            return ((g_scriptPtr-script) > (g_scriptSize-32)) ? C_SetScriptSize(g_scriptSize<<1) : 0;
1369
        }
1370
        }
1370
    }
1371
    }
1371
    while (1);
1372
    while (1);
1372
}
1373
}
1373
1374
1374
#define GetDefID(szGameLabel) hash_find(&h_gamevars,szGameLabel)
1375
#define GetDefID(szGameLabel) hash_find(&h_gamevars,szGameLabel)
1375
#define GetADefID(szGameLabel) hash_find(&h_arrays,szGameLabel)
1376
#define GetADefID(szGameLabel) hash_find(&h_arrays,szGameLabel)
1376
1377
1377
static int32_t isaltok(const char c)
1378
static int32_t isaltok(const char c)
1378
{
1379
{
1379
    return (isalnum(c) || c == '{' || c == '}' || c == '/' || c == '\\' ||
1380
    return (isalnum(c) || c == '{' || c == '}' || c == '/' || c == '\\' ||
1380
            c == '*' || c == '-' || c == '_' || c == '.');
1381
            c == '*' || c == '-' || c == '_' || c == '.');
1381
}
1382
}
1382
1383
1383
static int32_t C_IsLabelChar(const char c, int32_t i)
1384
static int32_t C_IsLabelChar(const char c, int32_t i)
1384
{
1385
{
1385
    return (isalnum(c) || c=='_' || c=='*' || c=='?' ||
1386
    return (isalnum(c) || c=='_' || c=='*' || c=='?' ||
1386
            (i > 0 && (c=='+' || c=='-' || c=='.')));
1387
            (i > 0 && (c=='+' || c=='-' || c=='.')));
1387
}
1388
}
1388
1389
1389
static inline int32_t C_GetLabelNameID(const memberlabel_t *pLabel, hashtable_t *tH, const char *psz)
1390
static inline int32_t C_GetLabelNameID(const memberlabel_t *pLabel, hashtable_t *tH, const char *psz)
1390
{
1391
{
1391
    // find the label psz in the table pLabel.
1392
    // find the label psz in the table pLabel.
1392
    // returns the ID for the label, or -1
1393
    // returns the ID for the label, or -1
1393
1394
1394
    int32_t l = hash_findcase(tH,psz);
1395
    int32_t l = hash_findcase(tH,psz);
1395
    return (l >= 0) ? pLabel[l].lId : -1;
1396
    return (l >= 0) ? pLabel[l].lId : -1;
1396
}
1397
}
1397
1398
1398
static inline int32_t C_GetLabelNameOffset(hashtable_t *tH, const char *psz)
1399
static inline int32_t C_GetLabelNameOffset(hashtable_t *tH, const char *psz)
1399
{
1400
{
1400
    // find the label psz in the table pLabel.
1401
    // find the label psz in the table pLabel.
1401
    // returns the offset in the array for the label, or -1
1402
    // returns the offset in the array for the label, or -1
1402
1403
1403
    return hash_findcase(tH,psz);
1404
    return hash_findcase(tH,psz);
1404
}
1405
}
1405
1406
1406
static void C_GetNextLabelName(void)
1407
static void C_GetNextLabelName(void)
1407
{
1408
{
1408
    int32_t i = 0;
1409
    int32_t i = 0;
1409
1410
1410
    C_SkipComments();
1411
    C_SkipComments();
1411
1412
1412
//    while (ispecial(*textptr) == 0 && *textptr!='['&& *textptr!=']' && *textptr!='\t' && *textptr!='\n' && *textptr!='\r')
1413
//    while (ispecial(*textptr) == 0 && *textptr!='['&& *textptr!=']' && *textptr!='\t' && *textptr!='\n' && *textptr!='\r')
1413
    while (C_IsLabelChar(*textptr, i))
1414
    while (C_IsLabelChar(*textptr, i))
1414
        label[(g_numLabels<<6)+(i++)] = *(textptr++);
1415
        label[(g_numLabels<<6)+(i++)] = *(textptr++);
1415
    label[(g_numLabels<<6)+i] = 0;
1416
    label[(g_numLabels<<6)+i] = 0;
1416
1417
1417
    if (!(g_numCompilerErrors|g_numCompilerWarnings) && g_scriptDebug > 1)
1418
    if (!(g_numCompilerErrors|g_numCompilerWarnings) && g_scriptDebug > 1)
1418
        initprintf("%s:%d: debug: got label `%s'.\n",g_szScriptFileName,g_lineNumber,label+(g_numLabels<<6));
1419
        initprintf("%s:%d: debug: got label `%s'.\n",g_szScriptFileName,g_lineNumber,label+(g_numLabels<<6));
1419
}
1420
}
1420
1421
1421
static int32_t C_GetKeyword(void)
1422
static int32_t C_GetKeyword(void)
1422
{
1423
{
1423
    int32_t i;
1424
    int32_t i;
1424
    char *temptextptr;
1425
    char *temptextptr;
1425
1426
1426
    C_SkipComments();
1427
    C_SkipComments();
1427
1428
1428
    temptextptr = textptr;
1429
    temptextptr = textptr;
1429
1430
1430
    if (*temptextptr == 0) // EOF
1431
    if (*temptextptr == 0) // EOF
1431
        return -2;
1432
        return -2;
1432
1433
1433
    while (isaltok(*temptextptr) == 0)
1434
    while (isaltok(*temptextptr) == 0)
1434
    {
1435
    {
1435
        temptextptr++;
1436
        temptextptr++;
1436
        if (*temptextptr == 0)
1437
        if (*temptextptr == 0)
1437
            return 0;
1438
            return 0;
1438
    }
1439
    }
1439
1440
1440
    i = 0;
1441
    i = 0;
1441
    while (isaltok(*temptextptr))
1442
    while (isaltok(*temptextptr))
1442
&nb