Subversion Repositories eduke32

Rev

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

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