2009-09-12 23:03:15 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
|
|
|
Copyright (C) 1996, 2003 - 3D Realms Entertainment
|
|
|
|
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
|
|
|
|
Copyright (C) 2004, 2007 - EDuke32 developers
|
|
|
|
|
|
|
|
This file is part of EDuke32
|
|
|
|
|
|
|
|
EDuke32 is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License version 2
|
|
|
|
as published by the Free Software Foundation.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#ifndef _m32def_h_
|
|
|
|
#define _m32def_h_
|
|
|
|
|
2010-08-11 22:37:45 +00:00
|
|
|
// the parsing routines aren't good at error recovery yet...
|
|
|
|
#define ABORTERRCNT 1
|
2009-09-12 23:03:15 +00:00
|
|
|
|
2010-08-11 22:37:45 +00:00
|
|
|
// these two are for m32def.c
|
2010-05-22 23:41:18 +00:00
|
|
|
#define C_CUSTOMERROR(Text, ...) do { \
|
|
|
|
C_ReportError(-1); \
|
|
|
|
initprintf("%s:%d: error: " Text "\n", g_szScriptFileName, g_lineNumber, ## __VA_ARGS__); \
|
2010-08-12 13:38:37 +00:00
|
|
|
C_PrintErrorPosition(); \
|
2010-05-22 23:41:18 +00:00
|
|
|
g_numCompilerErrors++; \
|
|
|
|
} while (0)
|
|
|
|
#define C_CUSTOMWARNING(Text, ...) do { \
|
|
|
|
C_ReportError(-1); \
|
|
|
|
initprintf("%s:%d: warning: " Text "\n", g_szScriptFileName, g_lineNumber, ## __VA_ARGS__); \
|
2010-08-12 13:38:37 +00:00
|
|
|
C_PrintErrorPosition(); \
|
2010-05-22 23:41:18 +00:00
|
|
|
g_numCompilerWarnings++; \
|
|
|
|
} while (0)
|
2009-09-12 23:03:15 +00:00
|
|
|
|
2010-08-12 13:38:37 +00:00
|
|
|
extern void C_PrintErrorPosition();
|
|
|
|
extern void C_ReportError(int32_t iError);
|
|
|
|
|
2009-09-12 23:03:15 +00:00
|
|
|
extern char g_szScriptFileName[BMAX_PATH];
|
2010-08-11 22:37:45 +00:00
|
|
|
extern int32_t g_totalLines, g_lineNumber;
|
|
|
|
extern int32_t g_numCompilerErrors, g_numCompilerWarnings;
|
2009-09-12 23:03:15 +00:00
|
|
|
|
2009-09-14 22:11:37 +00:00
|
|
|
extern int32_t g_didDefineSomething;
|
|
|
|
|
2009-09-12 23:03:15 +00:00
|
|
|
extern instype *g_scriptPtr;
|
|
|
|
|
|
|
|
void C_Compile(const char *filenameortext, int32_t isfilename);
|
|
|
|
void C_CompilationInfo(void);
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2010-08-11 22:37:45 +00:00
|
|
|
int32_t ofs; // offset into script[]
|
2009-09-12 23:03:15 +00:00
|
|
|
int32_t codesize;
|
2010-08-11 22:37:45 +00:00
|
|
|
uint16_t numlocals; // number of local int32_t vars to allocate
|
2009-09-12 23:03:15 +00:00
|
|
|
char name[MAXLABELLEN];
|
|
|
|
} statesinfo_t;
|
|
|
|
|
|
|
|
extern statesinfo_t *statesinfo;
|
|
|
|
extern int32_t g_stateCount;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2011-02-21 23:08:21 +00:00
|
|
|
const char *name;
|
2009-09-12 23:03:15 +00:00
|
|
|
int16_t lId;
|
|
|
|
int16_t flags; // 1: read-only
|
|
|
|
int32_t min, max;
|
|
|
|
} memberlabel_t;
|
|
|
|
|
|
|
|
extern const memberlabel_t SectorLabels[];
|
|
|
|
extern const memberlabel_t WallLabels[];
|
|
|
|
extern const memberlabel_t SpriteLabels[];
|
2011-05-07 18:23:34 +00:00
|
|
|
extern const memberlabel_t LightLabels[];
|
2009-09-12 23:03:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2011-02-21 23:08:21 +00:00
|
|
|
const char* token;
|
|
|
|
int32_t val;
|
2009-09-12 23:03:15 +00:00
|
|
|
} tokenmap_t;
|
|
|
|
|
|
|
|
extern const tokenmap_t iter_tokens[];
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int32_t g_i;
|
|
|
|
// VM state: either ==0 (top-level), >=1 and < MAXEVENTS+1 (event),
|
|
|
|
// or >= MAXEVENTS+1 and < MAXEVENTS+1+g_stateCount (state)
|
|
|
|
int32_t g_st;
|
|
|
|
spritetype *g_sp;
|
2009-10-11 15:52:16 +00:00
|
|
|
uint32_t flags; //g_errorFlag, g_returnFlag;
|
2010-09-30 23:05:40 +00:00
|
|
|
uint32_t updatehighlight;
|
* New m32script commands:
- sethighlightsector <sectnum> <on?>
- updatehighlightsector
- collectsectors <<array_to_collect_sectnums>> <initial_sector> <<num_collected_sectors>> <sector_filtering_state>
The latter does a breadth-first search starting from an initial sector and collects nextsectors only when the filtering state, given a sectnum as RETURN input, writes a nonzero value into RETURN. As a usage example, a.m32 includes the state 'collect_teleporting_sectors', that collects all sectors containing an SE7 and highlights them afterwards. This way, it should be possible to retrofit old maps with TROR by distributing small scripts that do most of the work (right now, joining has to be done by hand, though).
* corruption checker: for the 'nextwall inconsistent with nextsector' corruption, suggest an alternative fix by searching fitting nextwalls and changing the nextwall of the corrupt wall (as opposed to the nextsector). It will display with a leading '?' in the listing, and can be demanded by suffixing 'corruptcheck tryfix' with it. For example,
corruptcheck tryfix 9-21 ?
would fix some corruptions in Billy Boy's cranium.map without introducing drawing errors.
* fix demo playback (tueidj figured this out)
git-svn-id: https://svn.eduke32.com/eduke32@1927 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-03 22:51:28 +00:00
|
|
|
uint32_t updatehighlightsector;
|
2009-09-12 23:03:15 +00:00
|
|
|
} vmstate_t;
|
|
|
|
|
2009-10-11 15:52:16 +00:00
|
|
|
#define VMFLAG_RETURN 1
|
|
|
|
#define VMFLAG_BREAK 2
|
|
|
|
#define VMFLAG_ERROR 4
|
|
|
|
|
2009-09-12 23:03:15 +00:00
|
|
|
extern vmstate_t vm;
|
|
|
|
extern vmstate_t vm_default;
|
|
|
|
|
|
|
|
|
|
|
|
extern int32_t g_errorLineNum;
|
2010-08-12 13:38:37 +00:00
|
|
|
extern int32_t g_tw;
|
2009-09-12 23:03:15 +00:00
|
|
|
extern const char *keyw[];
|
|
|
|
|
|
|
|
enum SystemString_t {
|
|
|
|
STR_MAPFILENAME,
|
|
|
|
STR_VERSION,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum ScriptError_t
|
|
|
|
{
|
|
|
|
ERROR_CLOSEBRACKET,
|
|
|
|
ERROR_EVENTONLY,
|
2010-05-22 23:41:18 +00:00
|
|
|
// ERROR_EXCEEDSMAXTILES,
|
2009-09-12 23:03:15 +00:00
|
|
|
ERROR_EXPECTEDKEYWORD,
|
|
|
|
ERROR_FOUNDWITHIN,
|
|
|
|
ERROR_ISAKEYWORD,
|
|
|
|
ERROR_NOENDSWITCH,
|
|
|
|
ERROR_NOTAGAMEDEF,
|
|
|
|
ERROR_NOTAGAMEVAR,
|
|
|
|
ERROR_NOTAGAMEARRAY,
|
|
|
|
ERROR_GAMEARRAYBNC,
|
|
|
|
ERROR_GAMEARRAYBNO,
|
|
|
|
ERROR_INVALIDARRAYWRITE,
|
|
|
|
ERROR_EXPECTEDSIMPLEVAR,
|
|
|
|
ERROR_OPENBRACKET,
|
|
|
|
ERROR_PARAMUNDEFINED,
|
|
|
|
ERROR_SYMBOLNOTRECOGNIZED,
|
|
|
|
ERROR_SYNTAXERROR,
|
|
|
|
ERROR_VARREADONLY,
|
2009-09-17 22:08:37 +00:00
|
|
|
ERROR_ARRAYREADONLY,
|
2009-09-12 23:03:15 +00:00
|
|
|
ERROR_VARTYPEMISMATCH,
|
|
|
|
ERROR_LABELINUSE,
|
|
|
|
// WARNING_BADGAMEVAR,
|
|
|
|
WARNING_DUPLICATECASE,
|
|
|
|
WARNING_DUPLICATEDEFINITION,
|
|
|
|
WARNING_LABELSONLY,
|
|
|
|
WARNING_NAMEMATCHESVAR,
|
2010-05-22 23:41:18 +00:00
|
|
|
// WARNING_CONSTANTBITSIZE,
|
2009-10-25 23:25:38 +00:00
|
|
|
WARNING_OUTSIDEDRAWSPRITE,
|
2009-09-12 23:03:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
enum SectorLabel_t
|
|
|
|
{
|
|
|
|
SECTOR_WALLPTR,
|
|
|
|
SECTOR_WALLNUM,
|
|
|
|
SECTOR_CEILINGZ,
|
|
|
|
SECTOR_FLOORZ,
|
|
|
|
SECTOR_CEILINGSTAT,
|
|
|
|
SECTOR_FLOORSTAT,
|
|
|
|
SECTOR_CEILINGPICNUM,
|
|
|
|
SECTOR_CEILINGSLOPE,
|
|
|
|
SECTOR_CEILINGSHADE,
|
|
|
|
SECTOR_CEILINGPAL,
|
|
|
|
SECTOR_CEILINGXPANNING,
|
|
|
|
SECTOR_CEILINGYPANNING,
|
|
|
|
SECTOR_FLOORPICNUM,
|
|
|
|
SECTOR_FLOORSLOPE,
|
|
|
|
SECTOR_FLOORSHADE,
|
|
|
|
SECTOR_FLOORPAL,
|
|
|
|
SECTOR_FLOORXPANNING,
|
|
|
|
SECTOR_FLOORYPANNING,
|
|
|
|
SECTOR_VISIBILITY,
|
|
|
|
SECTOR_ALIGNTO,
|
|
|
|
SECTOR_LOTAG,
|
|
|
|
SECTOR_HITAG,
|
|
|
|
SECTOR_EXTRA,
|
|
|
|
SECTOR_END
|
|
|
|
};
|
|
|
|
|
|
|
|
enum WallLabel_t
|
|
|
|
{
|
|
|
|
WALL_X,
|
|
|
|
WALL_Y,
|
|
|
|
WALL_POINT2,
|
|
|
|
WALL_NEXTWALL,
|
|
|
|
WALL_NEXTSECTOR,
|
|
|
|
WALL_CSTAT,
|
|
|
|
WALL_PICNUM,
|
|
|
|
WALL_OVERPICNUM,
|
|
|
|
WALL_SHADE,
|
|
|
|
WALL_PAL,
|
|
|
|
WALL_XREPEAT,
|
|
|
|
WALL_YREPEAT,
|
|
|
|
WALL_XPANNING,
|
|
|
|
WALL_YPANNING,
|
|
|
|
WALL_LOTAG,
|
|
|
|
WALL_HITAG,
|
|
|
|
WALL_EXTRA,
|
|
|
|
WALL_END
|
|
|
|
};
|
|
|
|
|
|
|
|
enum SpriteLabel_t
|
|
|
|
{
|
2011-05-07 18:23:34 +00:00
|
|
|
SPRITE_X, // 0
|
2009-09-12 23:03:15 +00:00
|
|
|
SPRITE_Y,
|
|
|
|
SPRITE_Z,
|
|
|
|
SPRITE_CSTAT,
|
|
|
|
SPRITE_PICNUM,
|
2011-05-07 18:23:34 +00:00
|
|
|
SPRITE_SHADE, // 5
|
2009-09-12 23:03:15 +00:00
|
|
|
SPRITE_PAL,
|
|
|
|
SPRITE_CLIPDIST,
|
|
|
|
SPRITE_DETAIL,
|
|
|
|
SPRITE_XREPEAT,
|
2011-05-07 18:23:34 +00:00
|
|
|
SPRITE_YREPEAT, // 10
|
2009-09-12 23:03:15 +00:00
|
|
|
SPRITE_XOFFSET,
|
|
|
|
SPRITE_YOFFSET,
|
|
|
|
SPRITE_SECTNUM,
|
|
|
|
SPRITE_STATNUM,
|
2011-05-07 18:23:34 +00:00
|
|
|
SPRITE_ANG, // 15
|
2009-09-12 23:03:15 +00:00
|
|
|
SPRITE_OWNER,
|
|
|
|
SPRITE_XVEL,
|
|
|
|
SPRITE_YVEL,
|
|
|
|
SPRITE_ZVEL,
|
2011-05-07 18:23:34 +00:00
|
|
|
SPRITE_LOTAG, // 20
|
2009-09-12 23:03:15 +00:00
|
|
|
SPRITE_HITAG,
|
|
|
|
SPRITE_EXTRA,
|
2011-05-07 18:23:34 +00:00
|
|
|
|
|
|
|
LIGHT_X, // must be first here
|
|
|
|
LIGHT_Y,
|
|
|
|
LIGHT_Z, // 25
|
|
|
|
LIGHT_HORIZ,
|
|
|
|
LIGHT_RANGE,
|
|
|
|
LIGHT_ANGLE,
|
|
|
|
LIGHT_FADERADIUS,
|
|
|
|
LIGHT_RADIUS, // 30
|
|
|
|
LIGHT_SECTOR,
|
|
|
|
LIGHT_R,
|
|
|
|
LIGHT_G,
|
|
|
|
LIGHT_B,
|
|
|
|
LIGHT_PRIORITY, // 35
|
|
|
|
LIGHT_TILENUM,
|
|
|
|
LIGHT_MINSHADE,
|
|
|
|
LIGHT_MAXSHADE,
|
|
|
|
LIGHT_ACTIVE,
|
|
|
|
|
2009-09-12 23:03:15 +00:00
|
|
|
SPRITE_END
|
|
|
|
};
|
|
|
|
|
|
|
|
enum IterationTypes_t
|
|
|
|
{
|
|
|
|
ITER_ALLSPRITES,
|
|
|
|
ITER_ALLSECTORS,
|
|
|
|
ITER_ALLWALLS,
|
2011-05-07 18:23:34 +00:00
|
|
|
ITER_ACTIVELIGHTS,
|
2009-09-12 23:03:15 +00:00
|
|
|
ITER_SELSPRITES,
|
|
|
|
ITER_SELSECTORS,
|
|
|
|
ITER_SELWALLS,
|
|
|
|
ITER_DRAWNSPRITES,
|
2010-08-11 22:37:45 +00:00
|
|
|
// ---
|
2009-09-12 23:03:15 +00:00
|
|
|
ITER_SPRITESOFSECTOR,
|
|
|
|
ITER_WALLSOFSECTOR,
|
2009-09-18 21:44:46 +00:00
|
|
|
ITER_LOOPOFWALL,
|
2009-09-12 23:03:15 +00:00
|
|
|
ITER_RANGE,
|
|
|
|
ITER_END
|
|
|
|
};
|
|
|
|
|
|
|
|
enum ScriptKeywords_t
|
|
|
|
{
|
|
|
|
// basic commands
|
|
|
|
CON_NULLOP,
|
|
|
|
CON_DEFINE,
|
|
|
|
CON_INCLUDE,
|
|
|
|
CON_DEFSTATE,
|
|
|
|
CON_ENDS,
|
|
|
|
CON_STATE,
|
|
|
|
CON_ONEVENT,
|
|
|
|
CON_ENDEVENT,
|
|
|
|
CON_GAMEVAR,
|
|
|
|
|
|
|
|
// control flow (except if*)
|
|
|
|
CON_ELSE,
|
|
|
|
CON_RETURN,
|
|
|
|
CON_BREAK,
|
|
|
|
CON_SWITCH,
|
|
|
|
CON_CASE,
|
|
|
|
CON_DEFAULT,
|
|
|
|
CON_ENDSWITCH,
|
|
|
|
CON_GETCURRADDRESS,
|
|
|
|
CON_JUMP,
|
|
|
|
CON_LEFTBRACE,
|
|
|
|
CON_RIGHTBRACE,
|
|
|
|
|
2010-10-31 19:54:03 +00:00
|
|
|
#if 0
|
2009-09-12 23:03:15 +00:00
|
|
|
// more basic commands
|
|
|
|
CON_SETSECTOR,
|
|
|
|
CON_GETSECTOR,
|
|
|
|
CON_SETWALL,
|
|
|
|
CON_GETWALL,
|
|
|
|
CON_SETSPRITE, //+
|
|
|
|
CON_GETSPRITE, //+
|
|
|
|
CON_GETTSPR,
|
|
|
|
CON_SETTSPR,
|
2010-10-31 19:54:03 +00:00
|
|
|
#endif
|
2009-09-12 23:03:15 +00:00
|
|
|
|
|
|
|
// arrays
|
|
|
|
CON_GAMEARRAY,
|
|
|
|
CON_SETARRAY,
|
|
|
|
CON_GETARRAYSIZE,
|
|
|
|
CON_RESIZEARRAY,
|
|
|
|
CON_COPY,
|
|
|
|
/// CON_WRITEARRAYTOFILE,
|
|
|
|
/// CON_READARRAYFROMFILE,
|
|
|
|
|
|
|
|
// var ops
|
|
|
|
CON_RANDVAR,
|
|
|
|
CON_DISPLAYRANDVAR,
|
|
|
|
CON_SETVAR,
|
|
|
|
CON_ADDVAR,
|
|
|
|
CON_SUBVAR,
|
|
|
|
CON_MULVAR,
|
|
|
|
CON_DIVVAR,
|
|
|
|
CON_MODVAR,
|
|
|
|
CON_ANDVAR,
|
|
|
|
CON_ORVAR,
|
|
|
|
CON_XORVAR,
|
|
|
|
CON_SHIFTVARL,
|
|
|
|
CON_SHIFTVARR,
|
|
|
|
// varvar ops
|
|
|
|
CON_RANDVARVAR,
|
|
|
|
CON_DISPLAYRANDVARVAR,
|
|
|
|
CON_SETVARVAR,
|
|
|
|
CON_ADDVARVAR,
|
|
|
|
CON_SUBVARVAR,
|
|
|
|
CON_MULVARVAR,
|
|
|
|
CON_DIVVARVAR,
|
|
|
|
CON_MODVARVAR,
|
|
|
|
CON_ANDVARVAR,
|
|
|
|
CON_ORVARVAR,
|
|
|
|
CON_XORVARVAR,
|
2010-09-30 23:05:40 +00:00
|
|
|
CON_SHIFTVARVARL,
|
|
|
|
CON_SHIFTVARVARR,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_SIN,
|
|
|
|
CON_COS,
|
|
|
|
|
|
|
|
// random
|
|
|
|
CON_DISPLAYRAND,
|
|
|
|
|
|
|
|
// other math
|
2010-05-18 05:14:17 +00:00
|
|
|
CON_ITOF,
|
|
|
|
CON_FTOI,
|
2009-10-03 13:20:31 +00:00
|
|
|
CON_CLAMP,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_INV,
|
|
|
|
CON_SQRT,
|
|
|
|
CON_MULSCALE,
|
2010-08-03 22:21:13 +00:00
|
|
|
CON_DIVSCALE,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_DIST,
|
|
|
|
CON_LDIST,
|
2010-09-27 21:52:04 +00:00
|
|
|
CON_CALCHYPOTENUSE,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_GETANGLE,
|
|
|
|
CON_GETINCANGLE,
|
2010-08-17 20:00:44 +00:00
|
|
|
CON_A2XY,
|
|
|
|
CON_AH2XYZ,
|
2009-09-12 23:03:15 +00:00
|
|
|
|
* New m32script commands:
- sethighlightsector <sectnum> <on?>
- updatehighlightsector
- collectsectors <<array_to_collect_sectnums>> <initial_sector> <<num_collected_sectors>> <sector_filtering_state>
The latter does a breadth-first search starting from an initial sector and collects nextsectors only when the filtering state, given a sectnum as RETURN input, writes a nonzero value into RETURN. As a usage example, a.m32 includes the state 'collect_teleporting_sectors', that collects all sectors containing an SE7 and highlights them afterwards. This way, it should be possible to retrofit old maps with TROR by distributing small scripts that do most of the work (right now, joining has to be done by hand, though).
* corruption checker: for the 'nextwall inconsistent with nextsector' corruption, suggest an alternative fix by searching fitting nextwalls and changing the nextwall of the corrupt wall (as opposed to the nextsector). It will display with a leading '?' in the listing, and can be demanded by suffixing 'corruptcheck tryfix' with it. For example,
corruptcheck tryfix 9-21 ?
would fix some corruptions in Billy Boy's cranium.map without introducing drawing errors.
* fix demo playback (tueidj figured this out)
git-svn-id: https://svn.eduke32.com/eduke32@1927 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-03 22:51:28 +00:00
|
|
|
CON_COLLECTSECTORS,
|
2009-09-17 22:08:37 +00:00
|
|
|
CON_SORT,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_FOR,
|
|
|
|
|
|
|
|
// if & while var
|
|
|
|
CON_IFVARL,
|
|
|
|
CON_IFVARLE,
|
|
|
|
CON_IFVARG,
|
|
|
|
CON_IFVARGE,
|
|
|
|
CON_IFVARE,
|
|
|
|
CON_IFVARN,
|
|
|
|
CON_IFVARAND,
|
|
|
|
CON_IFVAROR,
|
|
|
|
CON_IFVARXOR,
|
|
|
|
CON_IFVAREITHER,
|
|
|
|
CON_IFVARBOTH,
|
|
|
|
CON_WHILEVARN,
|
|
|
|
CON_WHILEVARL,
|
|
|
|
|
|
|
|
// if & while varvar
|
|
|
|
CON_IFVARVARL,
|
|
|
|
CON_IFVARVARLE,
|
|
|
|
CON_IFVARVARG,
|
|
|
|
CON_IFVARVARGE,
|
|
|
|
CON_IFVARVARE,
|
|
|
|
CON_IFVARVARN,
|
|
|
|
CON_IFVARVARAND,
|
|
|
|
CON_IFVARVAROR,
|
|
|
|
CON_IFVARVARXOR,
|
|
|
|
CON_IFVARVAREITHER,
|
|
|
|
CON_IFVARVARBOTH,
|
|
|
|
CON_WHILEVARVARN,
|
|
|
|
CON_WHILEVARVARL,
|
|
|
|
|
|
|
|
// other if*
|
2009-09-17 22:08:37 +00:00
|
|
|
CON_IFHITKEY,
|
|
|
|
CON_IFHOLDKEY,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_IFRND,
|
|
|
|
|
|
|
|
// if* using current sprite
|
|
|
|
CON_IFANGDIFFL,
|
|
|
|
CON_IFSPRITEPAL,
|
2010-09-30 23:05:40 +00:00
|
|
|
CON_IFHIGHLIGHTED,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_IFACTOR,
|
2009-11-01 20:30:09 +00:00
|
|
|
CON_IFSOUND,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_IFPDISTL,
|
|
|
|
CON_IFPDISTG,
|
|
|
|
/// CON_IFGAPZL,
|
|
|
|
/// CON_IFFLOORDISTL,
|
|
|
|
/// CON_IFCEILINGDISTL,
|
|
|
|
|
|
|
|
CON_IFINSIDE,
|
|
|
|
|
2009-09-16 22:33:10 +00:00
|
|
|
CON_IFEITHERALT,
|
|
|
|
CON_IFEITHERCTRL,
|
|
|
|
CON_IFEITHERSHIFT,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_IFAWAYFROMWALL,
|
|
|
|
CON_IFCANSEE,
|
|
|
|
CON_IFONWATER,
|
|
|
|
CON_IFINWATER,
|
|
|
|
CON_IFOUTSIDE,
|
|
|
|
/// CON_IFHITSPACE,
|
|
|
|
/// CON_IFINSPACE,
|
|
|
|
/// CON_IFINOUTERSPACE,
|
|
|
|
/// CON_IFCANSEETARGET,
|
2009-11-01 20:30:09 +00:00
|
|
|
CON_IFNOSOUNDS,
|
2010-09-30 23:05:40 +00:00
|
|
|
CON_IFIN3DMODE,
|
2010-08-16 13:56:49 +00:00
|
|
|
CON_IFAIMINGSPRITE,
|
|
|
|
CON_IFAIMINGWALL,
|
|
|
|
CON_IFAIMINGSECTOR,
|
2009-09-12 23:03:15 +00:00
|
|
|
|
|
|
|
// BUILD functions
|
2009-10-03 13:20:31 +00:00
|
|
|
CON_RESETKEY,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_INSERTSPRITE,
|
|
|
|
CON_DUPSPRITE,
|
2009-10-25 23:25:38 +00:00
|
|
|
CON_TDUPSPRITE,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_DELETESPRITE,
|
|
|
|
CON_LASTWALL,
|
2009-09-17 22:08:37 +00:00
|
|
|
CON_UPDATECURSECTNUM,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_UPDATESECTOR,
|
|
|
|
CON_UPDATESECTORZ,
|
|
|
|
CON_GETZRANGE,
|
2010-09-27 21:52:04 +00:00
|
|
|
CON_CLIPMOVE,
|
|
|
|
CON_LINEINTERSECT,
|
|
|
|
CON_RAYINTERSECT,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_HITSCAN,
|
|
|
|
CON_CANSEE,
|
|
|
|
CON_CANSEESPR,
|
|
|
|
CON_NEARTAG,
|
|
|
|
CON_ROTATEPOINT,
|
|
|
|
CON_DRAGPOINT,
|
|
|
|
CON_GETCEILZOFSLOPE,
|
|
|
|
CON_GETFLORZOFSLOPE,
|
2009-09-18 21:44:46 +00:00
|
|
|
CON_ALIGNCEILSLOPE,
|
|
|
|
CON_ALIGNFLORSLOPE,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_BSETSPRITE, // was CON_SETSPRITE
|
2009-09-17 22:08:37 +00:00
|
|
|
CON_SETFIRSTWALL,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_CHANGESPRITESTAT,
|
|
|
|
CON_CHANGESPRITESECT,
|
|
|
|
CON_HEADSPRITESTAT,
|
|
|
|
CON_PREVSPRITESTAT,
|
|
|
|
CON_NEXTSPRITESTAT,
|
|
|
|
CON_HEADSPRITESECT,
|
|
|
|
CON_PREVSPRITESECT,
|
|
|
|
CON_NEXTSPRITESECT,
|
|
|
|
CON_SECTOROFWALL,
|
2010-01-04 14:38:29 +00:00
|
|
|
CON_FIXREPEATS,
|
2010-08-03 22:21:13 +00:00
|
|
|
CON_GETCLOSESTCOL,
|
2009-09-12 23:03:15 +00:00
|
|
|
|
|
|
|
// stuff
|
2010-09-30 23:05:40 +00:00
|
|
|
CON_UPDATEHIGHLIGHT,
|
* New m32script commands:
- sethighlightsector <sectnum> <on?>
- updatehighlightsector
- collectsectors <<array_to_collect_sectnums>> <initial_sector> <<num_collected_sectors>> <sector_filtering_state>
The latter does a breadth-first search starting from an initial sector and collects nextsectors only when the filtering state, given a sectnum as RETURN input, writes a nonzero value into RETURN. As a usage example, a.m32 includes the state 'collect_teleporting_sectors', that collects all sectors containing an SE7 and highlights them afterwards. This way, it should be possible to retrofit old maps with TROR by distributing small scripts that do most of the work (right now, joining has to be done by hand, though).
* corruption checker: for the 'nextwall inconsistent with nextsector' corruption, suggest an alternative fix by searching fitting nextwalls and changing the nextwall of the corrupt wall (as opposed to the nextsector). It will display with a leading '?' in the listing, and can be demanded by suffixing 'corruptcheck tryfix' with it. For example,
corruptcheck tryfix 9-21 ?
would fix some corruptions in Billy Boy's cranium.map without introducing drawing errors.
* fix demo playback (tueidj figured this out)
git-svn-id: https://svn.eduke32.com/eduke32@1927 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-03 22:51:28 +00:00
|
|
|
CON_UPDATEHIGHLIGHTSECTOR,
|
2010-09-30 23:05:40 +00:00
|
|
|
CON_SETHIGHLIGHT,
|
* New m32script commands:
- sethighlightsector <sectnum> <on?>
- updatehighlightsector
- collectsectors <<array_to_collect_sectnums>> <initial_sector> <<num_collected_sectors>> <sector_filtering_state>
The latter does a breadth-first search starting from an initial sector and collects nextsectors only when the filtering state, given a sectnum as RETURN input, writes a nonzero value into RETURN. As a usage example, a.m32 includes the state 'collect_teleporting_sectors', that collects all sectors containing an SE7 and highlights them afterwards. This way, it should be possible to retrofit old maps with TROR by distributing small scripts that do most of the work (right now, joining has to be done by hand, though).
* corruption checker: for the 'nextwall inconsistent with nextsector' corruption, suggest an alternative fix by searching fitting nextwalls and changing the nextwall of the corrupt wall (as opposed to the nextsector). It will display with a leading '?' in the listing, and can be demanded by suffixing 'corruptcheck tryfix' with it. For example,
corruptcheck tryfix 9-21 ?
would fix some corruptions in Billy Boy's cranium.map without introducing drawing errors.
* fix demo playback (tueidj figured this out)
git-svn-id: https://svn.eduke32.com/eduke32@1927 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-03 22:51:28 +00:00
|
|
|
CON_SETHIGHLIGHTSECTOR,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_ADDLOGVAR,
|
|
|
|
CON_ADDLOG,
|
|
|
|
CON_DEBUG,
|
|
|
|
|
|
|
|
// strings
|
|
|
|
CON_DEFINEQUOTE,
|
|
|
|
CON_REDEFINEQUOTE,
|
2009-10-03 13:20:31 +00:00
|
|
|
CON_PRINT,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_QUOTE,
|
|
|
|
CON_ERRORINS,
|
|
|
|
CON_PRINTMESSAGE16,
|
|
|
|
CON_PRINTMESSAGE256,
|
|
|
|
CON_PRINTEXT256,
|
2009-09-16 22:33:10 +00:00
|
|
|
CON_PRINTEXT16,
|
2011-03-07 16:30:06 +00:00
|
|
|
CON_DRAWLABEL,
|
2009-09-16 22:33:10 +00:00
|
|
|
CON_GETNUMBER16,
|
|
|
|
CON_GETNUMBER256,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_QSPRINTF,
|
|
|
|
CON_QSTRCAT,
|
|
|
|
CON_QSTRCPY,
|
|
|
|
CON_QSTRLEN,
|
|
|
|
// CON_QGETSYSSTR,
|
|
|
|
CON_QSTRNCAT,
|
|
|
|
CON_QSUBSTR,
|
|
|
|
|
|
|
|
// findnear*
|
|
|
|
CON_FINDNEARSPRITE,
|
|
|
|
CON_FINDNEARSPRITEVAR,
|
|
|
|
CON_FINDNEARSPRITE3D,
|
|
|
|
CON_FINDNEARSPRITE3DVAR,
|
|
|
|
CON_FINDNEARSPRITEZ,
|
|
|
|
CON_FINDNEARSPRITEZVAR,
|
|
|
|
|
|
|
|
CON_GETTICKS,
|
|
|
|
CON_GETTIMEDATE,
|
|
|
|
CON_SETASPECT,
|
|
|
|
|
|
|
|
// vvv stuff using current sprite
|
|
|
|
CON_SETI,
|
|
|
|
CON_SIZEAT,
|
|
|
|
CON_CSTAT,
|
|
|
|
CON_CSTATOR,
|
|
|
|
CON_CLIPDIST,
|
|
|
|
CON_SPRITEPAL,
|
|
|
|
CON_CACTOR,
|
|
|
|
CON_SPGETLOTAG,
|
|
|
|
CON_SPGETHITAG,
|
|
|
|
CON_SECTGETLOTAG,
|
|
|
|
CON_SECTGETHITAG,
|
|
|
|
CON_GETTEXTUREFLOOR,
|
|
|
|
CON_GETTEXTURECEILING,
|
|
|
|
/// CON_KILLIT,
|
|
|
|
|
|
|
|
// left to define later/undecided
|
|
|
|
|
|
|
|
// sound
|
2009-11-01 20:30:09 +00:00
|
|
|
CON_SOUNDVAR,
|
|
|
|
CON_SOUNDONCEVAR,
|
|
|
|
CON_STOPALLSOUNDS,
|
|
|
|
CON_STOPSOUNDVAR,
|
|
|
|
CON_GLOBALSOUNDVAR,
|
|
|
|
CON_GETSOUNDFLAGS,
|
2009-09-12 23:03:15 +00:00
|
|
|
/// CON_SOUND,
|
|
|
|
/// CON_SOUNDONCE,
|
|
|
|
/// CON_STOPSOUND,
|
|
|
|
/// CON_GLOBALSOUND,
|
|
|
|
|
|
|
|
// drawing
|
|
|
|
/// CON_MYOS,
|
|
|
|
/// CON_MYOSPAL,
|
|
|
|
/// CON_MYOSX,
|
|
|
|
/// CON_MYOSPALX,
|
|
|
|
/// CON_MINITEXT,
|
|
|
|
/// CON_GAMETEXT,
|
|
|
|
/// CON_DIGITALNUMBER,
|
|
|
|
/// CON_SHOWVIEW,
|
|
|
|
/// CON_GAMETEXTZ,
|
|
|
|
/// CON_DIGITALNUMBERZ,
|
2009-09-16 22:33:10 +00:00
|
|
|
CON_DRAWLINE16,
|
|
|
|
CON_DRAWLINE16B,
|
2010-11-27 22:12:24 +00:00
|
|
|
CON_DRAWLINE16Z,
|
2009-09-16 22:33:10 +00:00
|
|
|
CON_DRAWCIRCLE16,
|
|
|
|
CON_DRAWCIRCLE16B,
|
2010-11-27 22:12:24 +00:00
|
|
|
CON_DRAWCIRCLE16Z,
|
2009-09-12 23:03:15 +00:00
|
|
|
CON_ROTATESPRITE16,
|
|
|
|
CON_ROTATESPRITE,
|
|
|
|
CON_SETGAMEPALETTE,
|
|
|
|
|
|
|
|
/// CON_TIME,
|
|
|
|
/// CON_GETANGLETOTARGET,
|
|
|
|
/// CON_ANGOFF,
|
|
|
|
/// CON_ANGOFFVAR,
|
|
|
|
/// CON_PRECACHE,
|
|
|
|
/// CON_SAVEGAMEVAR,
|
|
|
|
/// CON_READGAMEVAR,
|
|
|
|
/// CON_SETDEFNAME,
|
|
|
|
/// CON_SETCFGNAME,
|
|
|
|
|
|
|
|
CON_END
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|