mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Fixes crash in 2d map drawing where sector[-1] was accessed; added commands a2xy and ah2xyz to m32script, coded 2d preview of swinging and sliding doors; added "samprate" setting to configuration, useful if the default one gives jittering/echoey audio
git-svn-id: https://svn.eduke32.com/eduke32@1697 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b2988abb54
commit
917b924a0d
14 changed files with 671 additions and 336 deletions
|
@ -88,6 +88,10 @@ extern void ExtEditWallData(int16_t wallnum);
|
||||||
extern void ExtEditSpriteData(int16_t spritenum);
|
extern void ExtEditSpriteData(int16_t spritenum);
|
||||||
extern const char *ExtGetSectorType(int32_t lotag);
|
extern const char *ExtGetSectorType(int32_t lotag);
|
||||||
|
|
||||||
|
extern void showsectordata(int16_t sectnum, int16_t small);
|
||||||
|
extern void showwalldata(int16_t wallnum, int16_t small);
|
||||||
|
extern void showspritedata(int16_t spritenum, int16_t small);
|
||||||
|
|
||||||
extern int32_t circlewall;
|
extern int32_t circlewall;
|
||||||
|
|
||||||
int32_t loadsetup(const char *fn); // from config.c
|
int32_t loadsetup(const char *fn); // from config.c
|
||||||
|
|
|
@ -208,9 +208,6 @@ int32_t fillsector(int16_t sectnum, char fillcolor);
|
||||||
int16_t whitelinescan(int16_t dalinehighlight);
|
int16_t whitelinescan(int16_t dalinehighlight);
|
||||||
void printcoords16(int32_t posxe, int32_t posye, int16_t ange);
|
void printcoords16(int32_t posxe, int32_t posye, int16_t ange);
|
||||||
void copysector(int16_t soursector, int16_t destsector, int16_t deststartwall, char copystat);
|
void copysector(int16_t soursector, int16_t destsector, int16_t deststartwall, char copystat);
|
||||||
void showsectordata(int16_t sectnum);
|
|
||||||
void showwalldata(int16_t wallnum);
|
|
||||||
void showspritedata(int16_t spritenum);
|
|
||||||
int32_t drawtilescreen(int32_t pictopleft, int32_t picbox);
|
int32_t drawtilescreen(int32_t pictopleft, int32_t picbox);
|
||||||
void overheadeditor(void);
|
void overheadeditor(void);
|
||||||
static int32_t getlinehighlight(int32_t xplc, int32_t yplc, int32_t line);
|
static int32_t getlinehighlight(int32_t xplc, int32_t yplc, int32_t line);
|
||||||
|
@ -6119,18 +6116,16 @@ void copysector(int16_t soursector, int16_t destsector, int16_t deststartwall, c
|
||||||
Bsprintf(snotbuf, fmt, ## __VA_ARGS__); \
|
Bsprintf(snotbuf, fmt, ## __VA_ARGS__); \
|
||||||
printext16(8+col*200, ydim/*-(row*96)*/-STATUS2DSIZ+Yofs, color, -1, snotbuf, 0);
|
printext16(8+col*200, ydim/*-(row*96)*/-STATUS2DSIZ+Yofs, color, -1, snotbuf, 0);
|
||||||
|
|
||||||
void showsectordata(int16_t sectnum)
|
void showsectordata(int16_t sectnum, int16_t small)
|
||||||
{
|
{
|
||||||
sectortype *sec;
|
sectortype *sec;
|
||||||
char snotbuf[80];
|
char snotbuf[80];
|
||||||
int32_t col=0; //,row = 0;
|
int32_t col=0; //,row = 0;
|
||||||
int32_t mode = (sectnum & 16384);
|
int32_t color = small ? whitecol : editorcolors[11];
|
||||||
int32_t color = mode?whitecol:editorcolors[11];
|
|
||||||
|
|
||||||
sectnum &= ~16384;
|
|
||||||
sec = §or[sectnum];
|
sec = §or[sectnum];
|
||||||
|
|
||||||
if (mode)
|
if (small)
|
||||||
{
|
{
|
||||||
_printmessage16("^10Sector %d %s ^O(F7 to edit)", sectnum, ExtGetSectorCaption(sectnum));
|
_printmessage16("^10Sector %d %s ^O(F7 to edit)", sectnum, ExtGetSectorCaption(sectnum));
|
||||||
return;
|
return;
|
||||||
|
@ -6169,19 +6164,17 @@ void showsectordata(int16_t sectnum)
|
||||||
DOPRINT(96, "Palookup number: %d", sec->floorpal);
|
DOPRINT(96, "Palookup number: %d", sec->floorpal);
|
||||||
}
|
}
|
||||||
|
|
||||||
void showwalldata(int16_t wallnum)
|
void showwalldata(int16_t wallnum, int16_t small)
|
||||||
{
|
{
|
||||||
walltype *wal;
|
walltype *wal;
|
||||||
int32_t sec;
|
int32_t sec;
|
||||||
char snotbuf[80];
|
char snotbuf[80];
|
||||||
int32_t col=0; //, row = 0;
|
int32_t col=0; //, row = 0;
|
||||||
int32_t mode = (wallnum & 16384);
|
int32_t color = small ? whitecol : editorcolors[11];
|
||||||
int32_t color = mode?whitecol:editorcolors[11];
|
|
||||||
|
|
||||||
wallnum &= ~16384;
|
|
||||||
wal = &wall[wallnum];
|
wal = &wall[wallnum];
|
||||||
|
|
||||||
if (mode)
|
if (small)
|
||||||
{
|
{
|
||||||
_printmessage16("^10Wall %d %s ^O(F8 to edit)", wallnum, ExtGetWallCaption(wallnum));
|
_printmessage16("^10Wall %d %s ^O(F8 to edit)", wallnum, ExtGetWallCaption(wallnum));
|
||||||
return;
|
return;
|
||||||
|
@ -6209,30 +6202,28 @@ void showwalldata(int16_t wallnum)
|
||||||
|
|
||||||
col++;
|
col++;
|
||||||
|
|
||||||
DOPRINT(48-(mode?16:0), "nextsector: %d", wal->nextsector);
|
DOPRINT(48-(small?16:0), "nextsector: %d", wal->nextsector);
|
||||||
DOPRINT(56-(mode?16:0), "nextwall: %d", wal->nextwall);
|
DOPRINT(56-(small?16:0), "nextwall: %d", wal->nextwall);
|
||||||
|
|
||||||
DOPRINT(72-(mode?16:0), "Extra: %d", wal->extra);
|
DOPRINT(72-(small?16:0), "Extra: %d", wal->extra);
|
||||||
|
|
||||||
// TX 20050102 I'm not sure what unit dist<<4 is supposed to be, but dist itself is correct in terms of game coordinates as one would expect
|
// TX 20050102 I'm not sure what unit dist<<4 is supposed to be, but dist itself is correct in terms of game coordinates as one would expect
|
||||||
DOPRINT(96-(mode?16:0), "Wall length: %d", wallength(wallnum));
|
DOPRINT(96-(small?16:0), "Wall length: %d", wallength(wallnum));
|
||||||
|
|
||||||
sec = sectorofwall(wallnum);
|
sec = sectorofwall(wallnum);
|
||||||
DOPRINT(104-(mode?16:0), "Pixel height: %d", (sector[sec].floorz-sector[sec].ceilingz)>>8);
|
DOPRINT(104-(small?16:0), "Pixel height: %d", (sector[sec].floorz-sector[sec].ceilingz)>>8);
|
||||||
}
|
}
|
||||||
|
|
||||||
void showspritedata(int16_t spritenum)
|
void showspritedata(int16_t spritenum, int16_t small)
|
||||||
{
|
{
|
||||||
spritetype *spr;
|
spritetype *spr;
|
||||||
char snotbuf[80];
|
char snotbuf[80];
|
||||||
int32_t col=0; //, row = 0;
|
int32_t col=0; //, row = 0;
|
||||||
int32_t mode = (spritenum & 16384);
|
int32_t color = small ? whitecol : editorcolors[11];
|
||||||
int32_t color = mode?whitecol:editorcolors[11];
|
|
||||||
|
|
||||||
spritenum &= ~16384;
|
|
||||||
spr = &sprite[spritenum];
|
spr = &sprite[spritenum];
|
||||||
|
|
||||||
if (mode)
|
if (small)
|
||||||
{
|
{
|
||||||
_printmessage16("^10Sprite %d %s ^O(F8 to edit)",spritenum, ExtGetSpriteCaption(spritenum));
|
_printmessage16("^10Sprite %d %s ^O(F8 to edit)",spritenum, ExtGetSpriteCaption(spritenum));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -67,7 +67,7 @@ extern double msens;
|
||||||
extern int32_t editorgridextent, grid, autogrid;
|
extern int32_t editorgridextent, grid, autogrid;
|
||||||
static int32_t default_grid=3;
|
static int32_t default_grid=3;
|
||||||
extern int32_t graphicsmode;
|
extern int32_t graphicsmode;
|
||||||
extern int32_t AmbienceToggle;
|
extern int32_t AmbienceToggle, MixRate;
|
||||||
extern int32_t ParentalLock;
|
extern int32_t ParentalLock;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -133,7 +133,7 @@ int32_t loadsetup(const char *fn)
|
||||||
if (readconfig(fp, "ydim2d", val, VL) > 0) ydim2d = Batoi(val);
|
if (readconfig(fp, "ydim2d", val, VL) > 0) ydim2d = Batoi(val);
|
||||||
if (readconfig(fp, "xdim3d", val, VL) > 0) xdimgame = Batoi(val);
|
if (readconfig(fp, "xdim3d", val, VL) > 0) xdimgame = Batoi(val);
|
||||||
if (readconfig(fp, "ydim3d", val, VL) > 0) ydimgame = Batoi(val);
|
if (readconfig(fp, "ydim3d", val, VL) > 0) ydimgame = Batoi(val);
|
||||||
if (readconfig(fp, "samplerate", val, VL) > 0) option[7] = (Batoi(val) & 0x0f) << 4;
|
// if (readconfig(fp, "samplerate", val, VL) > 0) option[7] = (Batoi(val) & 0x0f) << 4;
|
||||||
if (readconfig(fp, "music", val, VL) > 0) { if (Batoi(val) != 0) option[2] = 1; else option[2] = 0; }
|
if (readconfig(fp, "music", val, VL) > 0) { if (Batoi(val) != 0) option[2] = 1; else option[2] = 0; }
|
||||||
if (readconfig(fp, "mouse", val, VL) > 0) { if (Batoi(val) != 0) option[3] = 1; else option[3] = 0; }
|
if (readconfig(fp, "mouse", val, VL) > 0) { if (Batoi(val) != 0) option[3] = 1; else option[3] = 0; }
|
||||||
if (readconfig(fp, "bpp", val, VL) > 0) bppgame = Batoi(val);
|
if (readconfig(fp, "bpp", val, VL) > 0) bppgame = Batoi(val);
|
||||||
|
@ -241,6 +241,7 @@ int32_t loadsetup(const char *fn)
|
||||||
if (readconfig(fp, "graphicsmode", val, VL) > 0)
|
if (readconfig(fp, "graphicsmode", val, VL) > 0)
|
||||||
graphicsmode = min(max(Batoi(val),0),2);
|
graphicsmode = min(max(Batoi(val),0),2);
|
||||||
|
|
||||||
|
if (readconfig(fp, "samplerate", val, VL) > 0) MixRate = min(max(8000, Batoi(val)), 48000);
|
||||||
if (readconfig(fp, "ambiencetoggle", val, VL) > 0) AmbienceToggle = Batoi(val);
|
if (readconfig(fp, "ambiencetoggle", val, VL) > 0) AmbienceToggle = Batoi(val);
|
||||||
if (readconfig(fp, "parlock", val, VL) > 0) ParentalLock = Batoi(val);
|
if (readconfig(fp, "parlock", val, VL) > 0) ParentalLock = Batoi(val);
|
||||||
|
|
||||||
|
@ -422,7 +423,10 @@ int32_t writesetup(const char *fn)
|
||||||
"showambiencesounds = %d\n"
|
"showambiencesounds = %d\n"
|
||||||
"\n"
|
"\n"
|
||||||
"; 2D mode display type (0:classic, 1:textured, 2:textured/animated)\n"
|
"; 2D mode display type (0:classic, 1:textured, 2:textured/animated)\n"
|
||||||
"graphicsmode = %d\n\n"
|
"graphicsmode = %d\n"
|
||||||
|
"\n"
|
||||||
|
"; Sample rate in Hz\n"
|
||||||
|
"samplerate = %d\n"
|
||||||
"; Ambient sounds in 3D mode (0:off, 1:on)\n"
|
"; Ambient sounds in 3D mode (0:off, 1:on)\n"
|
||||||
"ambiencetoggle = %d\n"
|
"ambiencetoggle = %d\n"
|
||||||
"parlock = %d\n"
|
"parlock = %d\n"
|
||||||
|
@ -503,8 +507,8 @@ int32_t writesetup(const char *fn)
|
||||||
#endif
|
#endif
|
||||||
option[3], msens, unrealedlook, pk_uedaccel, quickmapcycling,
|
option[3], msens, unrealedlook, pk_uedaccel, quickmapcycling,
|
||||||
revertCTRL,scrollamount,pk_turnaccel,pk_turndecel,autosave,
|
revertCTRL,scrollamount,pk_turnaccel,pk_turndecel,autosave,
|
||||||
showheightindicators,showambiencesounds,graphicsmode,AmbienceToggle,ParentalLock,
|
showheightindicators,showambiencesounds,graphicsmode,
|
||||||
!!m32_osd_tryscript,
|
MixRate,AmbienceToggle,ParentalLock, !!m32_osd_tryscript,
|
||||||
#if 1
|
#if 1
|
||||||
keys[0], keys[1], keys[2], keys[3], keys[4], keys[5],
|
keys[0], keys[1], keys[2], keys[3], keys[4], keys[5],
|
||||||
keys[6], keys[7], keys[8], keys[9], keys[10], keys[11],
|
keys[6], keys[7], keys[8], keys[9], keys[10], keys[11],
|
||||||
|
|
|
@ -11086,7 +11086,7 @@ void draw2dscreen(int32_t posxe, int32_t posye, int16_t ange, int32_t zoome, int
|
||||||
if (i == linehighlight || ((linehighlight >= 0) && (i == wall[linehighlight].nextwall)))
|
if (i == linehighlight || ((linehighlight >= 0) && (i == wall[linehighlight].nextwall)))
|
||||||
if (totalclock & 16) col -= (2<<2);
|
if (totalclock & 16) col -= (2<<2);
|
||||||
}
|
}
|
||||||
else if (showfirstwall && (sector[searchsector].wallptr == i || sector[searchsector].wallptr == wall[i].nextwall))
|
else if (showfirstwall && searchsector>=0 && (sector[searchsector].wallptr == i || sector[searchsector].wallptr == wall[i].nextwall))
|
||||||
{
|
{
|
||||||
col = 14;
|
col = 14;
|
||||||
if (i == linehighlight) if (totalclock & 16) col -= (2<<2);
|
if (i == linehighlight) if (totalclock & 16) col -= (2<<2);
|
||||||
|
|
|
@ -6,10 +6,13 @@
|
||||||
5. 3D mode tile selector refrence
|
5. 3D mode tile selector refrence
|
||||||
6. Sector effector reference
|
6. Sector effector reference
|
||||||
7. Sector tag reference
|
7. Sector tag reference
|
||||||
|
8. Long SE reference
|
||||||
|
9. Colors
|
||||||
^P
|
^P
|
||||||
The purpose of mouse in 2D mode is pointing, selecting, moving object in a map.
|
The purpose of mouse in 2D mode is pointing, selecting and
|
||||||
|
moving objects in a map.
|
||||||
|
|
||||||
Every time mouse is pointing at one of these:
|
^3Every time mouse is pointing at one of these:
|
||||||
1. Nothing
|
1. Nothing
|
||||||
2. Sector
|
2. Sector
|
||||||
3. Sector and wall
|
3. Sector and wall
|
||||||
|
@ -20,115 +23,112 @@ Every time mouse is pointing at one of these:
|
||||||
Some commands work differently depending on the currently selected object.
|
Some commands work differently depending on the currently selected object.
|
||||||
Press ALT to work with a wall or sprite instead of any adjacent sectors.
|
Press ALT to work with a wall or sprite instead of any adjacent sectors.
|
||||||
|
|
||||||
^14RSHIFT^O select vertex/sprites
|
^14RSHIFT^O Select vertex/sprites
|
||||||
^14RALT^O select sectors
|
^14RALT^O Select sectors
|
||||||
^14WHEEL^O zoom
|
^14WHEEL^O Zoom
|
||||||
^14WHEEL+ALT^O move camera and zoom
|
^14WHEEL+ALT^O Move camera and zoom
|
||||||
^14LEFT BUTTON^O drag sectors/vertex/sprites
|
^14LEFT BUTTON^O Drag sectors/vertex/sprites
|
||||||
^14RIGHT BUTTON^O move camera
|
^14RIGHT BUTTON^O Move camera
|
||||||
^14RIGHT MIDDLE^O move camera
|
^14RIGHT MIDDLE^O Move camera
|
||||||
^P
|
^P
|
||||||
LSHIFT show coordinates
|
LSHIFT Show coordinates
|
||||||
F1 show help
|
F1 Show help
|
||||||
F9 show the Sector Tags help
|
F9 Show the Sector Tags help
|
||||||
M set extra of sector
|
M Set extra of sector
|
||||||
M+ALT set extra of wall/sprite
|
M+ALT Set extra of wall/sprite
|
||||||
/ Reset panning, size and flags to defaults
|
/ Reset panning, size and flags to defaults
|
||||||
/+SHIFT make square - set xrepeat to yrepeat
|
/+SHIFT Make square - set xrepeat to yrepeat
|
||||||
|
|
||||||
KP_4 scaling sprite horizontally
|
KP_4 Scaling sprite horizontally
|
||||||
KP_6 scaling sprite horizontally
|
KP_6 Scaling sprite horizontally
|
||||||
KP_2 scaling sprite vertically
|
KP_2 Scaling sprite vertically
|
||||||
KP_8 scaling sprite vertically
|
KP_8 Scaling sprite vertically
|
||||||
+KP_5 speed up
|
+KP_5 Speed up
|
||||||
|
|
||||||
R cycle sprite alignment
|
R Cycle sprite alignment
|
||||||
' S set sprite size
|
' S Set sprite size
|
||||||
' F function menu
|
' F Function menu
|
||||||
F7+ALT search sector lotag
|
F7+ALT Search sector lotag
|
||||||
F8+ALT search wall/sprite lotag
|
F8+ALT Search wall/sprite lotag
|
||||||
[ search backward
|
[ Search backward
|
||||||
] search forward
|
] Search forward
|
||||||
G cycle grid size
|
G Cycle grid size
|
||||||
G+SHIFT cycle grid size backward
|
G+SHIFT Cycle grid size backward
|
||||||
' L set sprite/wall coordinates
|
' L Set sprite/wall coordinates
|
||||||
' 3 cycle modes of showing object's name
|
' 3 Cycle modes of showing object's name
|
||||||
' 7 swap lotag and hitag of wall/sprite
|
' 7 Swap lotag and hitag of wall/sprite
|
||||||
' J goto X,Y
|
' J Goto X,Y
|
||||||
|
|
||||||
X flip selected sectors in x
|
X Flip selected sectors in x
|
||||||
Y flip selected sectors in y
|
Y Flip selected sectors in y
|
||||||
X+ALT mirror selected sectors in x
|
X+ALT Mirror selected sectors in x
|
||||||
Y+ALT mirror selected sectors in y
|
Y+ALT Mirror selected sectors in y
|
||||||
|
|
||||||
F12 screenshot
|
F12 Screenshot
|
||||||
F12+SHIFT inverted screenshot
|
F12+SHIFT Inverted screenshot
|
||||||
|
|
||||||
B toggle blocking
|
B Toggle blocking
|
||||||
B+SHIFT toggle one-sided blocking for a wall
|
B+SHIFT Toggle one-sided blocking for a wall
|
||||||
F+ALT set the first wall of a sector
|
F+ALT Set the first wall of a sector
|
||||||
O ornament sprite flat onto wall
|
O Ornament sprite flat onto wall
|
||||||
|
|
||||||
, rotate sprite/selected sectors
|
, Rotate sprite/selected sectors
|
||||||
. rotate sprite/selected sectors
|
. Rotate sprite/selected sectors
|
||||||
< slowly rotate sprite/selected sectors
|
< Slowly rotate sprite/selected sectors
|
||||||
> slowly rotate sprite/selected sectors
|
> Slowly rotate sprite/selected sectors
|
||||||
|
|
||||||
SCROLL LOCK set starting position
|
SCROLL LOCK Set starting position
|
||||||
F5 show item count
|
F5 Show item count
|
||||||
F6 show actor count
|
F6 Show actor count
|
||||||
F6 show Sector Effector help when pointed at sprite
|
F6 Show Sector Effector help when pointed at sprite
|
||||||
F7 edit sector data
|
F7 Edit sector data
|
||||||
F8 edit wall/sprite data
|
F8 Edit wall/sprite data
|
||||||
|
|
||||||
T set sector lotag
|
T Set sector lotag
|
||||||
T+ALT set wall/sprite lotag
|
T+ALT Set wall/sprite lotag
|
||||||
T+CTRL toggle show tags
|
T+CTRL Toggle show tags
|
||||||
|
|
||||||
H set sector hitag
|
H Set sector hitag
|
||||||
H+ALT set wall/sprite hitag
|
H+ALT Set wall/sprite hitag
|
||||||
H+CTRL toggle hitscan sensitivity
|
H+CTRL Toggle hitscan sensitivity
|
||||||
H+CTRL+SHIFT toggle hitscan sensitivity
|
|
||||||
|
|
||||||
P set sector palette
|
P Set sector palette
|
||||||
E set sprite status list
|
E Set sprite status list
|
||||||
TAB show sector data
|
TAB Show sector data
|
||||||
TAB+CTRL show wall/sprite data
|
TAB+SHIFT Show wall/sprite data
|
||||||
TAB+ALT show wall/sprite data (The Windows cool switch may trigger when used.)
|
TAB+CTRL Show wall/sprite data
|
||||||
|
|
||||||
LCTRL+RSHIFT select all walls of the current sector
|
LCTRL+RSHIFT Select all walls of the current sector
|
||||||
(point at a wall and, holding CTRL, press SHIFT)
|
(point at a wall and, holding CTRL, press SHIFT)
|
||||||
|
|
||||||
A zoom in
|
A Zoom in
|
||||||
Z zoom out
|
Z Zoom out
|
||||||
L toggle grid lock
|
L Toggle grid lock
|
||||||
J join sectors
|
J Join sectors
|
||||||
S insert sprite
|
S Insert sprite (see samples/tiles.cfg for customization)
|
||||||
pressing a key from 1 to 0 on the upper row before pressing S will make the
|
S+ALT Make inner sector
|
||||||
inserted sprite's picnum be 1 to 10, respectively
|
C Duplicate sectors/sprites
|
||||||
S+ALT make inner sector
|
C Start circle attached to a wall
|
||||||
C duplicate sectors/sprites
|
KP_+ Increase amount of walls in circle
|
||||||
C start circle attached to a wall
|
KP_- Decrease amount of walls in circle
|
||||||
KP_+ increase amount of walls in circle
|
SPACE Start/end drawing of sector, end drawing of circle
|
||||||
KP_- decrease amount of walls in circle
|
LENTER Check all pointers for the current sector
|
||||||
SPACE start/end drawing of sector, end drawing of circle
|
LSHIFT+LCTRL+LENTER Check ALL pointers (manual attempt to recover map)
|
||||||
LENTER check all pointers for the current sector
|
BACKSPACE Remove the last wall during drawing sector
|
||||||
LSHIFT+LCTRL+LENTER check ALL pointers (manual attempt to recover map)
|
DEL Delete sprite
|
||||||
BACKSPACE remove the last wall during drawing sector
|
DEL+CTRL Delete sector
|
||||||
DEL delete sprite
|
INS Duplicate sectors/sprites
|
||||||
DEL+CTRL delete sector
|
INS Start circle attached to a wall
|
||||||
INS duplicate sectors/sprites
|
INS Add vertex to wall
|
||||||
INS start circle attached to a wall
|
RENTER Switch to 3D mode
|
||||||
INS add vertex to wall
|
ESC Menu
|
||||||
RENETER switch to 3D mode
|
|
||||||
ESC menu
|
|
||||||
|
|
||||||
' A toggle autosave (every 3 minutes)
|
' A Toggle autosave (every 3 minutes)
|
||||||
' N toggle clipping
|
' N Toggle clipping
|
||||||
S+CTRL save map
|
S+CTRL Save map
|
||||||
L+CTRL load map
|
L+CTRL Load map
|
||||||
^P
|
^P
|
||||||
The mouse pointer always points at one of these objects:
|
^3The mouse pointer always points at one of these objects:
|
||||||
1. wall
|
1. wall
|
||||||
2. ceiling of sector
|
2. ceiling of sector
|
||||||
3. floor of sector
|
3. floor of sector
|
||||||
|
@ -136,203 +136,203 @@ The mouse pointer always points at one of these objects:
|
||||||
5. masked wall (non-transparent or semi-transparent wall between sectors)
|
5. masked wall (non-transparent or semi-transparent wall between sectors)
|
||||||
|
|
||||||
It's important to understand this concept.
|
It's important to understand this concept.
|
||||||
Some commands work differently depending on the "current object",the object
|
Some commands work differently depending on the "current object",
|
||||||
the mouse points at.
|
the object the mouse points at.
|
||||||
Some commands only manipulate the "current object", but other commands
|
Some commands only manipulate the "current object", but other commands
|
||||||
manipulate the sprites and sectors which are "selected" in 2D mode.
|
manipulate the sprites and sectors which are "selected" in 2D mode.
|
||||||
Other commands work globally.
|
Other commands work globally.
|
||||||
|
|
||||||
Mouse buttons:
|
^3Mouse buttons:
|
||||||
^14LEFT^O lock the current object. The current object won't
|
^14LEFT^O Lock the current object. The current object won't
|
||||||
change as long as the button is pressed.
|
change as long as the button is pressed.
|
||||||
^14LEFT+MIDDLE^O toggle mouselook
|
^14LEFT+MIDDLE^O Toggle mouselook
|
||||||
^14WHEEL^O change shade/visibility
|
^14WHEEL^O Change shade/visibility
|
||||||
^14LEFT+WHEEL^O change tile
|
^14LEFT+WHEEL^O Change tile
|
||||||
^14RIGHT+WHEEL^O move object up/down
|
^14RIGHT+WHEEL^O Move object up/down
|
||||||
|
|
||||||
Additionally, there is now UnrealEd-style mouse navigation in 3D mode (toggle
|
Additionally, there is UnrealEd-style mouse navigation in 3D mode
|
||||||
it with ^14F5^O), with the following bindings:
|
(toggle it with ^14F5^O) with the following bindings:
|
||||||
^14RIGHT^O mouselook
|
^14RIGHT^O mouselook
|
||||||
^14LEFT^O x: turning, y: move forward/back
|
^14LEFT^O x: turning, y: move forward/back
|
||||||
^14LEFT+RIGHT^O x: strafe left/right, y: move up/down
|
^14LEFT+RIGHT^O x: strafe left/right, y: move up/down
|
||||||
^14MIDDLE^O y: move in viewing direction
|
^14MIDDLE^O y: move in viewing direction
|
||||||
The console variable 'pk_uedaccel' changes the speed of navigation
|
The console variable 'pk_uedaccel' changes the speed
|
||||||
exponentially (valid values are 0-5).
|
of navigation exponentially (valid values are 0-5).
|
||||||
|
|
||||||
^14LEFT+ALT^O move object up/down
|
^14LEFT+ALT^O Move object up/down
|
||||||
^14LEFT+SHIFT^O pan ceiling/floor/wall
|
^14LEFT+SHIFT^O Pan ceiling/floor/wall
|
||||||
^14LEFT+SHIFT^O move sprite in horizontal plane
|
^14LEFT+SHIFT^O Move sprite in horizontal plane
|
||||||
^14LEFT+CTRL^O scale wall texture or size of sprite
|
^14LEFT+CTRL^O Scale wall texture or size of sprite
|
||||||
^14LEFT+CTRL^O change slope of sector
|
^14LEFT+CTRL^O Change slope of sector
|
||||||
^P
|
^P
|
||||||
UP move forward
|
UP Move forward
|
||||||
DOWN move backward
|
DOWN Move backward
|
||||||
LEFT+RCTRL move left
|
LEFT+RCTRL Move left
|
||||||
RIGHT+RCTRL move right
|
RIGHT+RCTRL Move right
|
||||||
A move up
|
A Move up
|
||||||
Z move down
|
Z Move down
|
||||||
F4+ALT toggle showing the first wall
|
F4+ALT Toggle showing the first wall
|
||||||
+LSHIFT speed up movements
|
+LSHIFT Speed up movements
|
||||||
|
|
||||||
LEFT turn left
|
LEFT Turn left
|
||||||
RIGHT turn right
|
RIGHT Turn right
|
||||||
A+CTRL look down
|
A+CTRL Look down
|
||||||
Z+CTRL lood up
|
Z+CTRL Look up
|
||||||
|
|
||||||
' V set sector visibility
|
' V Set sector visibility
|
||||||
; V set sector visibility on all selected sectors
|
; V Set sector visibility on all selected sectors
|
||||||
V choose tile
|
V Choose tile
|
||||||
3 toggle "sector over sector".
|
3 Toggle "sector over sector".
|
||||||
F3 toggle mouselook
|
F3 Toggle mouselook
|
||||||
' BACKSPACE clear all flags for wall/sprite
|
' BACKSPACE Clear all flags for wall/sprite
|
||||||
' P paste palette to all selected sectors
|
' P Paste palette to all selected sectors
|
||||||
; P paste palette to all selected sectors & sprites
|
; P Paste palette to all selected sectors & sprites
|
||||||
DEL delete sprite
|
DEL Delete sprite
|
||||||
F6 toggle automatic Sector Effector help
|
F6 Toggle automatic Sector Effector help
|
||||||
F7 toggle automatic sector tag help
|
F7 Toggle automatic sector tag help
|
||||||
|
|
||||||
, rotate sprite
|
, Rotate sprite
|
||||||
. rotate sprite
|
. Rotate sprite
|
||||||
< slowly rotate sprite
|
< Slowly rotate sprite
|
||||||
> slowly rotate sprite
|
> Slowly rotate sprite
|
||||||
. search & fix panning of the wall to the right
|
. Search & fix panning of the wall to the right
|
||||||
|
|
||||||
' L change the coordinates of the current object
|
' L Change the coordinates of the current object
|
||||||
CAPS LOCK cycle zmode
|
CAPS LOCK Cycle zmode
|
||||||
' Z cycle zmode
|
' Z Cycle zmode
|
||||||
' M set the extra of the current object
|
' M Set the extra of the current object
|
||||||
1 toggle one-sided flag of sprite/wall
|
1 Toggle one-sided flag of sprite/wall
|
||||||
2 toggle bottom wall swapping
|
2 Toggle bottom wall swapping
|
||||||
O set top or bottom orientation of wall
|
O Set top or bottom orientation of wall
|
||||||
O ornament sprite flat onto wall
|
O Ornament sprite flat onto wall
|
||||||
M toggle masked wall
|
M Toggle masked wall
|
||||||
H toggle hitscan sensitivity
|
H Toggle hitscan sensitivity
|
||||||
H+SHIFT toggle one side hitscan sensitivity for the wall
|
H+SHIFT Toggle one side hitscan sensitivity for the wall
|
||||||
' H set hitag of the current object
|
' H Set hitag of the current object
|
||||||
|
|
||||||
KP_MINUS darkens shade of individual sector/wall/sprite or selected sectors
|
KP_MINUS Darkens shade of individual sector/wall/sprite or selected sectors
|
||||||
KP_MINUS+ALT decreases visibility of sector or selected sectors
|
KP_MINUS+ALT Decreases visibility of sector or selected sectors
|
||||||
KP_MINUS+ALT+SHIFT slowly decreases visibility of sector or selected sectors
|
KP_MINUS+ALT+SHIFT Slowly decreases visibility of sector or selected sectors
|
||||||
KP_MINUS+ALT+CTRL decreases global visibility
|
KP_MINUS+ALT+CTRL Decreases global visibility
|
||||||
KP_PLUS lightens shade individual sector/wall/sprite or selected sectors
|
KP_PLUS Lightens shade individual sector/wall/sprite or selected sectors
|
||||||
KP_PLUS+ALT increases visibility of sector or selected sectors
|
KP_PLUS+ALT Increases visibility of sector or selected sectors
|
||||||
KP_PLUS+ALT+SHIFT slowly increases visibility of sector or selected sectors
|
KP_PLUS+ALT+SHIFT Slowly increases visibility of sector or selected sectors
|
||||||
KP_PLUS+ALT+CTRL increases global visibility
|
KP_PLUS+ALT+CTRL Increases global visibility
|
||||||
Note: ALT,CTRL, SHIFT are modifiers so they work with mouse too.
|
^3Note: ALT, CTRL, SHIFT are modifiers so they work with mouse too.
|
||||||
|
|
||||||
PLUS/MINUS cycle tile
|
+/- Cycle tile
|
||||||
E toggle sector texture expansion
|
E Toggle sector texture expansion
|
||||||
R toggle sector texture relativity alignment
|
R Toggle sector texture relativity alignment
|
||||||
R cycle sprite aligment between: wall aligned, floor aligned, view aligned
|
R Cycle sprite aligment between: wall aligned, floor aligned, view aligned
|
||||||
' R toggle framerate
|
'R Toggle framerate
|
||||||
F flip the current object
|
F Flip the current object
|
||||||
F+ALT set the first wall of sector
|
F+ALT Set the first wall of sector
|
||||||
|
|
||||||
PAGE UP move selected sprites or sectors up
|
PAGE UP Move selected sprites or sectors up
|
||||||
PAGE DN move selected sprites or sectors down
|
PAGE DN Move selected sprites or sectors down
|
||||||
PAGE UP+CTRL move selected sprites to ceiling
|
PAGE UP+CTRL Move selected sprites to ceiling
|
||||||
PAGE DN+CTRL move selected sprites to floor
|
PAGE DN+CTRL Move selected sprites to floor
|
||||||
+CTRL speed up movement
|
+CTRL Speed up movement
|
||||||
+END slow down movement
|
+END Slow down movement
|
||||||
+HOME slow down movement even more
|
+HOME Slow down movement even more
|
||||||
Note: CTRL, HOME, END are modifiers, so they work with the mouse too.
|
^3Note: CTRL, HOME, END are modifiers, so they work with the mouse too.
|
||||||
|
|
||||||
' D cycle skill level
|
' D Cycle skill level
|
||||||
' X toggle sprite shade preview
|
' X Toggle sprite shade preview
|
||||||
' W toggle sprite display
|
' W Toggle sprite display
|
||||||
' Y toggle purple background
|
' Y Toggle purple background
|
||||||
' C copy shade from the clipboard to all objects in the map which are the same
|
' C Copy shade from the clipboard to all objects in the map which are the same
|
||||||
tile as the tile of the object in the clipboard. It works separately for
|
tile as the tile of the object in the clipboard. It works separately for
|
||||||
sectors/walls/sprites depending on the current object.
|
sectors/walls/sprites depending on the current object.
|
||||||
' T set lotag
|
' T Set lotag
|
||||||
' H set hitag
|
' H Set hitag
|
||||||
' S set shade
|
' S Set shade
|
||||||
F2 toggle clipboard preview
|
F2 Toggle clipboard preview
|
||||||
TAB copy to the clipboard
|
TAB Copy to the clipboard
|
||||||
F1 toggle help
|
F1 Toggle help
|
||||||
G set picnum
|
G Set picnum
|
||||||
B toggle blocking
|
B Toggle blocking
|
||||||
B+SHIFT toggle one side blocking for the wall
|
B+SHIFT Toggle one side blocking for the wall
|
||||||
T cycles translucence for sprites/masked walls
|
T Cycles translucence for sprites/masked walls
|
||||||
|
|
||||||
LENTER+CTRL+SHIFT autoshade wall
|
LENTER+CTRL+SHIFT Autoshade wall
|
||||||
' LENTER paste picnum only
|
' LENTER Paste picnum only
|
||||||
LENTER+SHIFT paste shade and palette onto the current object
|
LENTER+SHIFT Paste shade and palette onto the current object
|
||||||
LENTER+CTRL paste picnum, shading, and palette onto the current object
|
LENTER+CTRL Paste picnum, shading, and palette onto the current object
|
||||||
LENTER paste all properties onto the current object
|
LENTER Paste all properties onto the current object
|
||||||
|
|
||||||
' A toggle autosave. The interval is configurable in the .cfg.
|
' A Toggle autosave. The interval is configurable in the .cfg.
|
||||||
(by default: every 3 minutes)
|
(by default: every 3 minutes)
|
||||||
|
|
||||||
' N toggle clipping for the camera
|
' N Toggle clipping for the camera
|
||||||
N+CTRL toggle clipping for sprites
|
N+CTRL Toggle clipping for sprites
|
||||||
|
|
||||||
S+CTRL save map
|
S+CTRL Save map
|
||||||
L+CTRL load map
|
L+CTRL Load map
|
||||||
|
|
||||||
ESC quit
|
ESC Quit
|
||||||
F11 brightness
|
F11 Brightness
|
||||||
F12 screenshot
|
F12 Screenshot
|
||||||
F12+SHIFT inverted screenshot
|
F12+SHIFT Inverted screenshot
|
||||||
F9 reload and activate maphacks
|
F9 Reload and activate maphacks
|
||||||
F10 disable maphacks
|
F10 Disable maphacks
|
||||||
|
|
||||||
C toggle center sprite (cstat 128)
|
C Toggle center sprite (cstat 128)
|
||||||
ALT+C replace all tiles in the map with the clipboard
|
ALT+C Replace all tiles in the map with the clipboard
|
||||||
|
|
||||||
[ increases slope quickly
|
[ Increases slope quickly
|
||||||
[+RSHIFT increases slope with medium speed
|
[+RSHIFT Increases slope with medium speed
|
||||||
[+LSHIFT increases slope slowly
|
[+LSHIFT Increases slope slowly
|
||||||
[+ALT align slope to the floor of an adjoining sector
|
[+ALT Align slope to the floor of an adjoining sector
|
||||||
] decreases slope quickly
|
] Decreases slope quickly
|
||||||
]+RSHIFT decreases slope with medium speed
|
]+RSHIFT Decreases slope with medium speed
|
||||||
]+LSHIFT decreases slope slowly
|
]+LSHIFT Decreases slope slowly
|
||||||
]+ALT align slope to the ceiling of an adjoining sector
|
]+ALT Align slope to the ceiling of an adjoining sector
|
||||||
|
|
||||||
KP_4 pan floor/ceiling horizontally
|
KP_4 Pan floor/ceiling horizontally
|
||||||
KP_6 pan floor/ceiling horizontally
|
KP_6 Pan floor/ceiling horizontally
|
||||||
KP_2 pan floor/ceiling vertically
|
KP_2 Pan floor/ceiling vertically
|
||||||
KP_8 pan floor/ceiling vertically
|
KP_8 Pan floor/ceiling vertically
|
||||||
KP_4 scale wall/sprite horizontally
|
KP_4 Scale wall/sprite horizontally
|
||||||
KP_6 scale wall/sprite horizontally
|
KP_6 Scale wall/sprite horizontally
|
||||||
KP_2 scale wall/sprite vertically
|
KP_2 Scale wall/sprite vertically
|
||||||
KP_8 scale wall/sprite vertically
|
KP_8 Scale wall/sprite vertically
|
||||||
+SHIFT force panning (for walls)
|
+SHIFT Force panning (for walls)
|
||||||
+KP_5 increase speed
|
+KP_5 Increase speed
|
||||||
|
|
||||||
/ Reset panning, size and flags to defaults
|
/ Reset panning, size and flags to defaults
|
||||||
/+SHIFT make square - set xrepeat to yrepeat
|
/+SHIFT Make square - set xrepeat to yrepeat
|
||||||
|
|
||||||
P enable/disable parallax
|
P Enable/disable parallax
|
||||||
P+CTRL change parallax type (only in 8-bit classic renderer)
|
P+CTRL Change parallax type (only in 8-bit classic renderer)
|
||||||
P+ALT change palette of sector/wall/sprite
|
P+ALT Change palette of sector/wall/sprite
|
||||||
D+ALT adjust clipping distance of the sprite
|
D+ALT Adjust clipping distance of the sprite
|
||||||
T translucence for sprites/masked walls
|
T Translucence for sprites/masked walls
|
||||||
S insert sprite
|
S Insert sprite
|
||||||
KP_ENTER switch to 2D mode
|
KP_ENTER Switch to 2D mode
|
||||||
^P
|
^P
|
||||||
After pressing V in 3D mode, the editor enters tile browsing.
|
After pressing V in 3D mode, the editor enters tile browsing.
|
||||||
|
|
||||||
Keys:
|
^3Keys:
|
||||||
KP_/ zoom in
|
KP_/ Zoom in
|
||||||
KP_* zoom out
|
KP_* Zoom out
|
||||||
UP/DOWN/LEFT/RIGHT/PAGE UP/PAGE DOWN movements
|
UP/DOWN/LEFT/RIGHT/PAGE UP/PAGE DOWN movements
|
||||||
G go to specified tile
|
G Go to specified tile
|
||||||
U go to start of user defined art (3584)
|
U Go to start of user defined art (3584)
|
||||||
A go to start of Atomic edition's art (4096)
|
A Go to start of Atomic edition's art (4096)
|
||||||
E go to start of extended art (6144, 9216)
|
E Go to start of extended art (6144, 9216)
|
||||||
|
|
||||||
V select from all tiles
|
V Select from all tiles
|
||||||
T select from pre-defined tileset (tiles.cfg)
|
T Select from pre-defined tileset (tiles.cfg)
|
||||||
Z tile zoom
|
Z Tile zoom
|
||||||
ESC cancel
|
ESC Cancel
|
||||||
ENTER accept
|
ENTER Accept
|
||||||
|
|
||||||
Mouse:
|
^3Mouse:
|
||||||
LEFT select
|
LEFT select
|
||||||
CTRL+WHEEL zoom
|
CTRL+WHEEL zoom
|
||||||
WHEEL scroll
|
WHEEL scroll
|
||||||
RIGHT smooth scrolling
|
RIGHT smooth scrolling
|
||||||
^P
|
^P
|
||||||
0 : Rotating Sector
|
0 : Rotating Sector
|
||||||
1 : Pivot Sprite for SE 0
|
1 : Pivot Sprite for SE 0
|
||||||
|
@ -391,3 +391,170 @@ RIGHT smooth scrolling
|
||||||
32767 : Secret Room
|
32767 : Secret Room
|
||||||
65534 : End Of Level with Message
|
65534 : End Of Level with Message
|
||||||
65535 : End Of Level
|
65535 : End Of Level
|
||||||
|
^P
|
||||||
|
^3SE 0/1: ROTATED SECTOR
|
||||||
|
SE1: pivot
|
||||||
|
Ang: up--clockwise, down--counterclockwise
|
||||||
|
SE0: a sector to rotate
|
||||||
|
Hi = SE1 Hi
|
||||||
|
|
||||||
|
^3SE 2: EARTHQUAKE
|
||||||
|
In quake sector, modeled as after the quake, insert additionally:
|
||||||
|
MASTERSWITCH
|
||||||
|
Lo=X
|
||||||
|
In other sector:
|
||||||
|
TOUCHPLATE
|
||||||
|
Lo=X
|
||||||
|
Anywhere:
|
||||||
|
SE33: scraps
|
||||||
|
Hi=X
|
||||||
|
|
||||||
|
^3SE 3: RANDOM LIGHTS AFTER SHOT OUT
|
||||||
|
Light is wall:
|
||||||
|
2-way, blockable?
|
||||||
|
Lo=X
|
||||||
|
Light is ceiling:
|
||||||
|
sector Hi=X
|
||||||
|
SE 3 in affected sector:
|
||||||
|
Hi=X
|
||||||
|
Shades:
|
||||||
|
sectors/walls: when off
|
||||||
|
SE: when on
|
||||||
|
|
||||||
|
^3SE 4: RANDOM LIGHTS
|
||||||
|
Hi: random blink num. ^0(research!)
|
||||||
|
Shades:
|
||||||
|
sectors/walls: when off
|
||||||
|
SE: when on
|
||||||
|
|
||||||
|
^3SE 5: ?
|
||||||
|
|
||||||
|
^3SE 6/14: SUBWAY
|
||||||
|
subway sectors:
|
||||||
|
Hi=unique per train
|
||||||
|
SE 6: SUBWAY FRONT CAR
|
||||||
|
Ang: direction of first movement
|
||||||
|
SE 14: SUBWAY PULLED CARS
|
||||||
|
Locators:
|
||||||
|
starting with Lo=0, ascending
|
||||||
|
Hi=1: train stops here
|
||||||
|
|
||||||
|
^3SE 7: TRANSPORT
|
||||||
|
Hi=X link
|
||||||
|
|
||||||
|
^3SE 8: UP OPEN DOOR LIGHTS (with ST 20)
|
||||||
|
SE 8 also in door sector
|
||||||
|
Hi=X links with other SE8 sprites
|
||||||
|
Shades:
|
||||||
|
sectors/walls: when closed
|
||||||
|
SE: when open
|
||||||
|
Walls:
|
||||||
|
Hi=1 means exclude this wall from changing shade
|
||||||
|
|
||||||
|
^3SE 9: DOWN OPEN DOOR LIGHTS (with ST 21)
|
||||||
|
analogous SE 8
|
||||||
|
|
||||||
|
^3SE 10: ?
|
||||||
|
|
||||||
|
^3SE 11: ROTATE SECTOR DOOR
|
||||||
|
Ang: up--clockwise, down--counterclockwise
|
||||||
|
Hi: link doors to be opened simulataneously
|
||||||
|
ST=23
|
||||||
|
|
||||||
|
^3SE 12: LIGHT SWITCH (preview with 'X)
|
||||||
|
Hi=X
|
||||||
|
Shades:
|
||||||
|
sectors/walls: when off
|
||||||
|
SE: when on
|
||||||
|
[switch]:
|
||||||
|
Lo=X
|
||||||
|
|
||||||
|
^3SEENINE: C-9 BARREL
|
||||||
|
Hi=X
|
||||||
|
Lo=delay ^0(>0? game ticks?)
|
||||||
|
In all sectors with SEENINEs:
|
||||||
|
MASTERSWITCH Lo=X
|
||||||
|
[switch]:
|
||||||
|
Lo=X
|
||||||
|
|
||||||
|
^3SE 13: C-9 EXPLOSIVE/BLASTABLE WALL
|
||||||
|
CRACKs/SEENINEs: Hi=X
|
||||||
|
SE 13: Hi=X
|
||||||
|
other SEENINEs:
|
||||||
|
Hi=X
|
||||||
|
Lo=delay
|
||||||
|
|
||||||
|
^3SE 15: SLIDING DOOR (ST=25)
|
||||||
|
Ang: opposite of direction of first movement
|
||||||
|
GPSPEED:
|
||||||
|
2*Lo: how far (BUILD units)
|
||||||
|
|
||||||
|
^3SE 17: ELEVATOR TRANSPORT
|
||||||
|
Shade: darker on SE of starting sector
|
||||||
|
Sectors:
|
||||||
|
ST=15
|
||||||
|
Top floor sector Hi=1
|
||||||
|
|
||||||
|
^3SE 18: INCREMENTAL SECTOR RISE/FALL
|
||||||
|
Hi: units moved per activation (min: 1024?)
|
||||||
|
Ang:
|
||||||
|
up--floor affected
|
||||||
|
down--ceiling affected
|
||||||
|
Pal:
|
||||||
|
0: start at floor/ceiling height
|
||||||
|
not 0: start at SE height
|
||||||
|
[switch] & ACTIVATOR ^0(in same sector as SE?):
|
||||||
|
Lo=X
|
||||||
|
|
||||||
|
^3SE 19: SHOT TOUCHPLATE CIELING DOWN
|
||||||
|
|
||||||
|
^3SE 20: BRIDGE/STRETCH SECTOR (ST 27)
|
||||||
|
Ang: direction
|
||||||
|
ACTIVATOR
|
||||||
|
Hi = SE Hi = [switch] Lo
|
||||||
|
GPSPEED
|
||||||
|
Lo: how far (BUILD units)
|
||||||
|
|
||||||
|
^3SE 21: DROP FLOOR (ST 28)
|
||||||
|
Ang:
|
||||||
|
up: drop ceiling
|
||||||
|
down: drop floor
|
||||||
|
z: end z ^0(())
|
||||||
|
Sector:
|
||||||
|
z: start z ^0(())
|
||||||
|
GPSPEED
|
||||||
|
Lo: rate ^0(units?)
|
||||||
|
ACTIVATOR
|
||||||
|
Lo = [switch] Lo
|
||||||
|
|
||||||
|
^3SE 24: CONVEYOR BELT
|
||||||
|
Ang: direction
|
||||||
|
GPSPEED:
|
||||||
|
Lo=speed
|
||||||
|
|
||||||
|
^3SE 25: ENGINE PISTON (CRUSHER)
|
||||||
|
z: starting z
|
||||||
|
Sector:
|
||||||
|
piston travels between ceiling z and floor z
|
||||||
|
|
||||||
|
^3SE 27: CAMERA FOR PLAYBACK
|
||||||
|
Hi: radius (BUILD units?)
|
||||||
|
|
||||||
|
^3SE 28: LIGHTNING
|
||||||
|
Hi = tile #4890 Hi
|
||||||
|
|
||||||
|
^3^0SE 29: WAVES
|
||||||
|
^0 (...)
|
||||||
|
^0 Hi: start height (min. height?)
|
||||||
|
^0 GPSPEED Lo: start height (?) (phase?)
|
||||||
|
|
||||||
|
^0 Based on MAP EDITING FAQ v1.3 BY JONAH BISHOP and code research
|
||||||
|
^P
|
||||||
|
Foreground colors:
|
||||||
|
^0,15 0 ^1,0 1 ^2 2 ^3 3 ^4 4 ^5 5 ^6 6 ^7 7
|
||||||
|
^8 8 ^9 9 ^10 10^11 11^12 12^13 13^14 14^15 15
|
||||||
|
|
||||||
|
Background colors:
|
||||||
|
^15,0 0 ^0,1 1 ^0,2 2 ^0,3 3 ^0,4 4 ^0,5 5 ^0,6 6 ^0,7 7
|
||||||
|
^0,8 8 ^0,9 9 ^0,10 10^0,11 11^0,12 12^0,13 13^0,14 14^0,15 15
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,9 @@ define MAXSPECULARFACTOR 1000
|
||||||
define SPOWERSTEPS 100
|
define SPOWERSTEPS 100
|
||||||
define SFACTORSTEPS 100
|
define SFACTORSTEPS 100
|
||||||
|
|
||||||
|
// settings for various drawing enhancements
|
||||||
|
define PREVIEW_DRAW_COLOR 11
|
||||||
|
|
||||||
////////// END USER SETTINGS //////////
|
////////// END USER SETTINGS //////////
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,7 +76,11 @@ definequote 25 WALL[%d].NEXTSECTOR=%d out of range: numsectors=%d!!!
|
||||||
define PRSCALE 1000
|
define PRSCALE 1000
|
||||||
define MAXSPECULAR 100000
|
define MAXSPECULAR 100000
|
||||||
|
|
||||||
gamearray ar 128
|
define TMPARLEN 128
|
||||||
|
gamearray ar TMPARLEN
|
||||||
|
gamearray xx TMPARLEN
|
||||||
|
gamearray yy TMPARLEN
|
||||||
|
|
||||||
gamearray parm 8
|
gamearray parm 8
|
||||||
|
|
||||||
// prints out maphack light definitions based on SE lights in map
|
// prints out maphack light definitions based on SE lights in map
|
||||||
|
@ -369,6 +376,12 @@ defstate fiddlewithlights
|
||||||
}
|
}
|
||||||
ends
|
ends
|
||||||
|
|
||||||
|
onevent EVENT_PREKEYS3D
|
||||||
|
// state testkeyavail
|
||||||
|
state fiddlewithlights
|
||||||
|
endevent
|
||||||
|
|
||||||
|
|
||||||
// rotate highlighted sprites around selected (closest to mouse) sprite
|
// rotate highlighted sprites around selected (closest to mouse) sprite
|
||||||
// global parameter: dang
|
// global parameter: dang
|
||||||
defstate rotselspr
|
defstate rotselspr
|
||||||
|
@ -408,10 +421,6 @@ onevent EVENT_PREKEYS2D
|
||||||
}
|
}
|
||||||
endevent
|
endevent
|
||||||
|
|
||||||
onevent EVENT_PREKEYS3D
|
|
||||||
// state testkeyavail
|
|
||||||
state fiddlewithlights
|
|
||||||
endevent
|
|
||||||
|
|
||||||
defstate setas
|
defstate setas
|
||||||
set j dayx
|
set j dayx
|
||||||
|
@ -424,15 +433,14 @@ onevent EVENT_ENTER3DMODE
|
||||||
state setas
|
state setas
|
||||||
endevent
|
endevent
|
||||||
|
|
||||||
|
|
||||||
defstate cmp_by_lotag // comparator subroutine for sorting
|
defstate cmp_by_lotag // comparator subroutine for sorting
|
||||||
set RETURN sprite[SV2].lotag
|
set RETURN sprite[SV2].lotag
|
||||||
sub RETURN sprite[SV1].lotag
|
sub RETURN sprite[SV1].lotag
|
||||||
ends
|
ends
|
||||||
|
|
||||||
onevent EVENT_DRAW2DSCREEN
|
defstate connectlocators
|
||||||
ifl cursectnum 0 return
|
// connect LOCATORS in a sector with lines
|
||||||
|
|
||||||
// connect LOCATORS in a sector by lines
|
|
||||||
getarraysize ar tmp
|
getarraysize ar tmp
|
||||||
set j 0
|
set j 0
|
||||||
for i spritesofsector cursectnum
|
for i spritesofsector cursectnum
|
||||||
|
@ -455,7 +463,9 @@ onevent EVENT_DRAW2DSCREEN
|
||||||
set k i, add k 1, set k ar[k]
|
set k i, add k 1, set k ar[k]
|
||||||
drawline16b sprite[j].x sprite[j].y sprite[k].x sprite[k].y drawcol
|
drawline16b sprite[j].x sprite[j].y sprite[k].x sprite[k].y drawcol
|
||||||
}
|
}
|
||||||
|
ends
|
||||||
|
|
||||||
|
defstate draw_prlightprojections
|
||||||
////////// polymer light 2d projections //////////
|
////////// polymer light 2d projections //////////
|
||||||
var c d h r x2 y2 oldpat
|
var c d h r x2 y2 oldpat
|
||||||
|
|
||||||
|
@ -523,8 +533,104 @@ onevent EVENT_DRAW2DSCREEN
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set drawlinepat oldpat
|
set drawlinepat oldpat
|
||||||
|
ends
|
||||||
|
|
||||||
|
defstate previewdoors2d
|
||||||
|
// preview swinging and sliding doors in 2d mode
|
||||||
|
var valid sect lo
|
||||||
|
var i j w numw ang trange dx dy
|
||||||
|
|
||||||
|
set valid 0
|
||||||
|
set sect searchsector
|
||||||
|
|
||||||
|
ifge sect 0
|
||||||
|
{
|
||||||
|
set lo sector[sect].lotag
|
||||||
|
ife lo 23 set valid 1
|
||||||
|
else ife lo 25 set valid 1
|
||||||
|
}
|
||||||
|
|
||||||
|
ife valid 1
|
||||||
|
{
|
||||||
|
set valid 0
|
||||||
|
for i spritesofsector sect
|
||||||
|
ifactor SECTOREFFECTOR
|
||||||
|
{
|
||||||
|
ife .lotag 11 ife lo 23 set valid 1 // swinging door
|
||||||
|
ife .lotag 15 ife lo 25 set valid 1 // slide door
|
||||||
|
ife valid 1 { set j i, break }
|
||||||
|
}
|
||||||
|
|
||||||
|
ife valid 1
|
||||||
|
seti j
|
||||||
|
else return
|
||||||
|
|
||||||
|
ife .lotag 15
|
||||||
|
{
|
||||||
|
set trange 256
|
||||||
|
for i spritesofsector sect
|
||||||
|
ifactor GPSPEED { set trange .lotag, break }
|
||||||
|
mul trange 2 // now equals distance of sliding door to travel
|
||||||
|
}
|
||||||
|
|
||||||
|
set i 0
|
||||||
|
for w loopofwall sector[sect].wallptr
|
||||||
|
{
|
||||||
|
ifge i TMPARLEN break
|
||||||
|
set xx[i] wall[w].x
|
||||||
|
set yy[i] wall[w].y
|
||||||
|
add i 1
|
||||||
|
}
|
||||||
|
ifl i TMPARLEN
|
||||||
|
{
|
||||||
|
set xx[i] xx[0]
|
||||||
|
set yy[i] yy[0]
|
||||||
|
add i 1
|
||||||
|
}
|
||||||
|
set numw i
|
||||||
|
|
||||||
|
ife .lotag 11
|
||||||
|
{
|
||||||
|
ifg .ang 1024 set ang -512 else set ang 512
|
||||||
|
for i range numw
|
||||||
|
rotatepoint .x .y xx[i] yy[i] ang xx[i] yy[i]
|
||||||
|
}
|
||||||
|
else // if .lotag 15
|
||||||
|
{
|
||||||
|
set ang .ang, add ang 1024
|
||||||
|
a2xy ang dx dy
|
||||||
|
mulscale dx trange dx 14
|
||||||
|
mulscale dy trange dy 14
|
||||||
|
|
||||||
|
for i range numw
|
||||||
|
{
|
||||||
|
add xx[i] dx
|
||||||
|
add yy[i] dy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set drawlinepat 0x33333333
|
||||||
|
sub numw 1
|
||||||
|
for i range numw
|
||||||
|
{
|
||||||
|
set j i, add j 1
|
||||||
|
drawline16b xx[i] yy[i] xx[j] yy[j] PREVIEW_DRAW_COLOR
|
||||||
|
}
|
||||||
|
set drawlinepat 0xffffffff
|
||||||
|
}
|
||||||
|
ends
|
||||||
|
|
||||||
|
onevent EVENT_DRAW2DSCREEN
|
||||||
|
ifge cursectnum 0
|
||||||
|
{
|
||||||
|
state connectlocators
|
||||||
|
state draw_prlightprojections
|
||||||
|
}
|
||||||
|
|
||||||
|
state previewdoors2d
|
||||||
endevent
|
endevent
|
||||||
|
|
||||||
|
|
||||||
// LOCATORS auto-incrementer
|
// LOCATORS auto-incrementer
|
||||||
onevent EVENT_INSERTSPRITE2D
|
onevent EVENT_INSERTSPRITE2D
|
||||||
set k I
|
set k I
|
||||||
|
@ -703,6 +809,7 @@ onevent EVENT_ANALYZESPRITES
|
||||||
state tduplin
|
state tduplin
|
||||||
endevent
|
endevent
|
||||||
|
|
||||||
|
|
||||||
onevent EVENT_KEYS3D
|
onevent EVENT_KEYS3D
|
||||||
var l m
|
var l m
|
||||||
|
|
||||||
|
|
|
@ -6684,13 +6684,26 @@ static void Keys2d(void)
|
||||||
|
|
||||||
if (keystatus[KEYSC_TAB]) //TAB
|
if (keystatus[KEYSC_TAB]) //TAB
|
||||||
{
|
{
|
||||||
if (cursectornum >= 0)
|
if (eitherSHIFT || eitherCTRL)
|
||||||
|
{
|
||||||
|
if (pointhighlight >= 16384)
|
||||||
|
{
|
||||||
|
drawgradient();
|
||||||
|
showspritedata(pointhighlight&16383, 0);
|
||||||
|
}
|
||||||
|
else if (linehighlight >= 0 && ((bstatus&1) || sectorofwall(linehighlight)==cursectornum))
|
||||||
|
{
|
||||||
|
drawgradient();
|
||||||
|
showwalldata(linehighlight, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (cursectornum >= 0)
|
||||||
{
|
{
|
||||||
drawgradient();
|
drawgradient();
|
||||||
showsectordata((int16_t)i);
|
showsectordata(cursectornum, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!(keystatus[KEYSC_F5]|keystatus[KEYSC_F6]|keystatus[KEYSC_F7]|keystatus[KEYSC_F8]))
|
else if (!(keystatus[KEYSC_F5]|keystatus[KEYSC_F6]|keystatus[KEYSC_F7]|keystatus[KEYSC_F8]) && !eitherSHIFT)
|
||||||
{
|
{
|
||||||
static int32_t counter = 0;
|
static int32_t counter = 0;
|
||||||
static int32_t omx = 0, omy = 0;
|
static int32_t omx = 0, omy = 0;
|
||||||
|
@ -6721,15 +6734,15 @@ static void Keys2d(void)
|
||||||
if (pointhighlight >= 16384)
|
if (pointhighlight >= 16384)
|
||||||
{
|
{
|
||||||
i = pointhighlight-16384;
|
i = pointhighlight-16384;
|
||||||
showspritedata((int16_t)i+16384);
|
showspritedata(i, 1);
|
||||||
|
|
||||||
if (sprite[i].picnum==SECTOREFFECTOR)
|
if (sprite[i].picnum==SECTOREFFECTOR)
|
||||||
_printmessage16("^10%s", SectorEffectorText(i));
|
_printmessage16("^10%s", SectorEffectorText(i));
|
||||||
}
|
}
|
||||||
else if (linehighlight >= 0 && ((bstatus&1) || sectorofwall(linehighlight)==cursectornum))
|
else if (linehighlight >= 0 && ((bstatus&1) || sectorofwall(linehighlight)==cursectornum))
|
||||||
showwalldata((int16_t)linehighlight+16384);
|
showwalldata(linehighlight, 1);
|
||||||
else if (cursectornum >= 0)
|
else if (cursectornum >= 0)
|
||||||
showsectordata((int16_t)cursectornum+16384);
|
showsectordata(cursectornum, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (totalclock < lastpm16time + 120*2)
|
if (totalclock < lastpm16time + 120*2)
|
||||||
|
@ -6845,7 +6858,7 @@ static void Keys2d(void)
|
||||||
Bsprintf(tempbuf,"Sector %d Extra: ",i);
|
Bsprintf(tempbuf,"Sector %d Extra: ",i);
|
||||||
sector[i].extra = getnumber16(tempbuf,sector[i].extra,BTAG_MAX,1);
|
sector[i].extra = getnumber16(tempbuf,sector[i].extra,BTAG_MAX,1);
|
||||||
// clearmidstatbar16();
|
// clearmidstatbar16();
|
||||||
// showsectordata((int16_t)i);
|
// showsectordata(i, 0);
|
||||||
// break;
|
// break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9864,7 +9877,7 @@ static void EditSectorData(int16_t sectnum)
|
||||||
|
|
||||||
disptext[dispwidth] = 0;
|
disptext[dispwidth] = 0;
|
||||||
|
|
||||||
showsectordata(sectnum);
|
showsectordata(sectnum, 0);
|
||||||
|
|
||||||
begindrawing();
|
begindrawing();
|
||||||
while (keystatus[KEYSC_ESC] == 0)
|
while (keystatus[KEYSC_ESC] == 0)
|
||||||
|
@ -10096,7 +10109,7 @@ static void EditWallData(int16_t wallnum)
|
||||||
|
|
||||||
disptext[dispwidth] = 0;
|
disptext[dispwidth] = 0;
|
||||||
|
|
||||||
showwalldata(wallnum);
|
showwalldata(wallnum, 0);
|
||||||
begindrawing();
|
begindrawing();
|
||||||
while (keystatus[KEYSC_ESC] == 0)
|
while (keystatus[KEYSC_ESC] == 0)
|
||||||
{
|
{
|
||||||
|
@ -10201,7 +10214,7 @@ static void EditWallData(int16_t wallnum)
|
||||||
if (editval)
|
if (editval)
|
||||||
{
|
{
|
||||||
editval = 0;
|
editval = 0;
|
||||||
//showwalldata(wallnum);
|
//showwalldata(wallnum, 0);
|
||||||
//// printmessage16("");
|
//// printmessage16("");
|
||||||
}
|
}
|
||||||
//enddrawing();
|
//enddrawing();
|
||||||
|
@ -10227,7 +10240,7 @@ static void EditSpriteData(int16_t spritenum)
|
||||||
disptext[dispwidth] = 0;
|
disptext[dispwidth] = 0;
|
||||||
// clearmidstatbar16();
|
// clearmidstatbar16();
|
||||||
|
|
||||||
showspritedata(spritenum);
|
showspritedata(spritenum, 0);
|
||||||
|
|
||||||
while (keystatus[KEYSC_ESC] == 0)
|
while (keystatus[KEYSC_ESC] == 0)
|
||||||
{
|
{
|
||||||
|
@ -10633,7 +10646,7 @@ static void GenericSpriteSearch()
|
||||||
for (k=0; k<80; k++) disptext[k] = 0;
|
for (k=0; k<80; k++) disptext[k] = 0;
|
||||||
|
|
||||||
// disptext[dispwidth[col]] = 0;
|
// disptext[dispwidth[col]] = 0;
|
||||||
// showspritedata(spritenum);
|
// showspritedata(spritenum, 0);
|
||||||
wallsprite = 2;
|
wallsprite = 2;
|
||||||
|
|
||||||
while (keystatus[KEYSC_ESC] == 0)
|
while (keystatus[KEYSC_ESC] == 0)
|
||||||
|
|
|
@ -11,10 +11,10 @@ INC=include
|
||||||
include ../../$(EROOT)/Makefile.shared
|
include ../../$(EROOT)/Makefile.shared
|
||||||
|
|
||||||
ifneq (0,$(RELEASE))
|
ifneq (0,$(RELEASE))
|
||||||
# Debugging disabled
|
# Debugging disabled
|
||||||
debug=-fomit-frame-pointer -funswitch-loops -O$(OPTLEVEL)
|
debug=-fomit-frame-pointer -funswitch-loops -O$(OPTLEVEL)
|
||||||
else
|
else
|
||||||
# Debugging enabled
|
# Debugging enabled
|
||||||
debug=-ggdb -O0 -DDEBUGGINGAIDS
|
debug=-ggdb -O0 -DDEBUGGINGAIDS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ ifneq (0,$(DEBUGANYWAY))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
|
CFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
|
||||||
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2 \
|
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2 \
|
||||||
-fjump-tables -fno-stack-protector
|
$(F_JUMP_TABLES) $(F_NO_STACK_PROTECTOR)
|
||||||
|
|
||||||
CPPFLAGS=-I$(INC) -I$(SRC)
|
CPPFLAGS=-I$(INC) -I$(SRC)
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ $(OBJECTS): $(OBJ)/%.o: $(SRC)/%.c $(INC)/enet/*.h
|
||||||
-mkdir -p $(OBJ)
|
-mkdir -p $(OBJ)
|
||||||
$(COMPILE_STATUS)
|
$(COMPILE_STATUS)
|
||||||
if $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
if $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||||
|
|
||||||
ifeq ($(PRETTY_OUTPUT),1)
|
ifeq ($(PRETTY_OUTPUT),1)
|
||||||
.SILENT:
|
.SILENT:
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -7,13 +7,15 @@ RELEASE?=1
|
||||||
OPTLEVEL?=2
|
OPTLEVEL?=2
|
||||||
SRC=src
|
SRC=src
|
||||||
|
|
||||||
|
DXROOT ?= c:/sdks/directx/dx8
|
||||||
|
|
||||||
include ../../$(EROOT)/Makefile.shared
|
include ../../$(EROOT)/Makefile.shared
|
||||||
|
|
||||||
ifneq (0,$(RELEASE))
|
ifneq (0,$(RELEASE))
|
||||||
# Debugging disabled
|
# Debugging disabled
|
||||||
debug=-fomit-frame-pointer -funswitch-loops -O$(OPTLEVEL)
|
debug=-fomit-frame-pointer -funswitch-loops -O$(OPTLEVEL)
|
||||||
else
|
else
|
||||||
# Debugging enabled
|
# Debugging enabled
|
||||||
debug=-ggdb -O0 -DDEBUGGINGAIDS
|
debug=-ggdb -O0 -DDEBUGGINGAIDS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -22,8 +24,8 @@ ifneq (0,$(DEBUGANYWAY))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
|
CFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
|
||||||
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2 \
|
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2 \
|
||||||
-fjump-tables -fno-stack-protector
|
$(F_JUMP_TABLES) $(F_NO_STACK_PROTECTOR)
|
||||||
|
|
||||||
CPPFLAGS=-Iinclude -Isrc -DHAVE_VORBIS
|
CPPFLAGS=-Iinclude -Isrc -DHAVE_VORBIS
|
||||||
|
|
||||||
|
@ -37,7 +39,7 @@ OBJECTS=$(OBJ)/drivers.o \
|
||||||
$(OBJ)/driver_nosound.o
|
$(OBJ)/driver_nosound.o
|
||||||
|
|
||||||
ifeq ($(PLATFORM),WINDOWS)
|
ifeq ($(PLATFORM),WINDOWS)
|
||||||
CPPFLAGS+= -Ithird-party/mingw32/include
|
CPPFLAGS+= -I$(DXROOT)/include -Ithird-party/mingw32/include
|
||||||
OBJECTS+= $(OBJ)/driver_directsound.o
|
OBJECTS+= $(OBJ)/driver_directsound.o
|
||||||
OBJNAME=libjfaudiolib_win32.a
|
OBJNAME=libjfaudiolib_win32.a
|
||||||
OBJ=obj_win
|
OBJ=obj_win
|
||||||
|
@ -55,7 +57,7 @@ $(OBJECTS): $(OBJ)/%.o: $(SRC)/%.c
|
||||||
-mkdir -p $(OBJ)
|
-mkdir -p $(OBJ)
|
||||||
$(COMPILE_STATUS)
|
$(COMPILE_STATUS)
|
||||||
if $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
if $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||||
|
|
||||||
ifeq ($(PRETTY_OUTPUT),1)
|
ifeq ($(PRETTY_OUTPUT),1)
|
||||||
.SILENT:
|
.SILENT:
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -246,6 +246,8 @@ const char *keyw[] =
|
||||||
"ldist",
|
"ldist",
|
||||||
"getangle",
|
"getangle",
|
||||||
"getincangle",
|
"getincangle",
|
||||||
|
"a2xy",
|
||||||
|
"ah2xyz",
|
||||||
|
|
||||||
"sort",
|
"sort",
|
||||||
"for", // *
|
"for", // *
|
||||||
|
@ -1720,18 +1722,17 @@ static int32_t C_ParseCommand(void)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
cs.currentStateOfs = (g_scriptPtr-script);
|
||||||
|
|
||||||
j = hash_find(&h_states, tlabel);
|
j = hash_find(&h_states, tlabel);
|
||||||
if (j>=0) // only redefining
|
if (j>=0) // only redefining
|
||||||
{
|
{
|
||||||
cs.currentStateIdx = j;
|
cs.currentStateIdx = j;
|
||||||
cs.currentStateOfs = (g_scriptPtr-script);
|
|
||||||
|
|
||||||
Bsprintf(g_szCurrentBlockName, "%s", statesinfo[j].name);
|
|
||||||
}
|
}
|
||||||
else // new state definition
|
else // new state definition
|
||||||
{
|
{
|
||||||
cs.currentStateIdx = j = g_stateCount;
|
cs.currentStateIdx = j = g_stateCount;
|
||||||
cs.currentStateOfs = (g_scriptPtr-script);
|
|
||||||
|
|
||||||
if (g_stateCount >= statesinfo_allocsize)
|
if (g_stateCount >= statesinfo_allocsize)
|
||||||
{
|
{
|
||||||
|
@ -1745,12 +1746,13 @@ static int32_t C_ParseCommand(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Bmemcpy(statesinfo[j].name, tlabel, MAXLABELLEN);
|
Bstrcpy(statesinfo[j].name, tlabel);
|
||||||
statesinfo[j].numlocals = 0;
|
|
||||||
Bsprintf(g_szCurrentBlockName, "%s", tlabel);
|
|
||||||
hash_add(&h_states, tlabel, j, 0);
|
hash_add(&h_states, tlabel, j, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
statesinfo[j].numlocals = 0;
|
||||||
|
Bsprintf(g_szCurrentBlockName, "%s", statesinfo[j].name);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1953,6 +1955,7 @@ static int32_t C_ParseCommand(void)
|
||||||
aEventNumLocals[j] = 0;
|
aEventNumLocals[j] = 0;
|
||||||
cs.parsingEventOfs = g_scriptPtr-script;
|
cs.parsingEventOfs = g_scriptPtr-script;
|
||||||
//Bsprintf(g_szBuf,"Adding Event for %d at %lX",j, g_parsingEventPtr); AddLog(g_szBuf);
|
//Bsprintf(g_szBuf,"Adding Event for %d at %lX",j, g_parsingEventPtr); AddLog(g_szBuf);
|
||||||
|
|
||||||
if (j<0 || j >= MAXEVENTS)
|
if (j<0 || j >= MAXEVENTS)
|
||||||
{
|
{
|
||||||
initprintf("%s:%d: error: invalid event ID.\n",g_szScriptFileName,g_lineNumber);
|
initprintf("%s:%d: error: invalid event ID.\n",g_szScriptFileName,g_lineNumber);
|
||||||
|
@ -2523,6 +2526,8 @@ repeatcase:
|
||||||
uint16_t *numlocals = (cs.currentStateIdx >= 0) ?
|
uint16_t *numlocals = (cs.currentStateIdx >= 0) ?
|
||||||
&statesinfo[cs.currentStateIdx].numlocals : &aEventNumLocals[cs.currentEvent];
|
&statesinfo[cs.currentStateIdx].numlocals : &aEventNumLocals[cs.currentEvent];
|
||||||
|
|
||||||
|
//OSD_Printf("s%d,e%d: array `%s', numlocals of `%s' is %d.\n", cs.currentStateIdx, cs.currentEvent,
|
||||||
|
// tlabel, g_szCurrentBlockName, (int32_t)*numlocals);
|
||||||
if (((int32_t)(*numlocals))+asize > M32_MAX_LOCALS)
|
if (((int32_t)(*numlocals))+asize > M32_MAX_LOCALS)
|
||||||
C_CUSTOMERROR("too much local storage required (max: %d gamevar equivalents).", M32_MAX_LOCALS);
|
C_CUSTOMERROR("too much local storage required (max: %d gamevar equivalents).", M32_MAX_LOCALS);
|
||||||
else
|
else
|
||||||
|
@ -2810,6 +2815,16 @@ repeatcase:
|
||||||
C_GetManyVars(2);
|
C_GetManyVars(2);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
case CON_A2XY:
|
||||||
|
C_GetNextVar();
|
||||||
|
C_GetManyVarsType(GV_WRITABLE, 2);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case CON_AH2XYZ:
|
||||||
|
C_GetManyVars(2);
|
||||||
|
C_GetManyVarsType(GV_WRITABLE, 3);
|
||||||
|
return 0;
|
||||||
|
|
||||||
case CON_FOR: // special-purpose iteration
|
case CON_FOR: // special-purpose iteration
|
||||||
{
|
{
|
||||||
ofstype offset;
|
ofstype offset;
|
||||||
|
|
|
@ -332,6 +332,8 @@ enum ScriptKeywords_t
|
||||||
CON_LDIST,
|
CON_LDIST,
|
||||||
CON_GETANGLE,
|
CON_GETANGLE,
|
||||||
CON_GETINCANGLE,
|
CON_GETINCANGLE,
|
||||||
|
CON_A2XY,
|
||||||
|
CON_AH2XYZ,
|
||||||
|
|
||||||
CON_SORT,
|
CON_SORT,
|
||||||
CON_FOR,
|
CON_FOR,
|
||||||
|
|
|
@ -248,6 +248,7 @@ static int32_t X_DoSort(const int32_t *lv, const int32_t *rv)
|
||||||
return g_iReturnVar;
|
return g_iReturnVar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// in interactive execution, allow the current sprite index to be the aimed-at sprite (in 3d mode)
|
||||||
#define X_ERROR_INVALIDCI() \
|
#define X_ERROR_INVALIDCI() \
|
||||||
if ((vm.g_i < 0 || vm.g_i>=MAXSPRITES) && \
|
if ((vm.g_i < 0 || vm.g_i>=MAXSPRITES) && \
|
||||||
(vm.g_st!=0 || searchstat!=3 || (vm.g_i=searchwall, vm.g_sp=&sprite[vm.g_i], 0))) \
|
(vm.g_st!=0 || searchstat!=3 || (vm.g_i=searchwall, vm.g_sp=&sprite[vm.g_i], 0))) \
|
||||||
|
@ -973,6 +974,40 @@ skip_check:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case CON_A2XY:
|
||||||
|
case CON_AH2XYZ:
|
||||||
|
insptr++;
|
||||||
|
{
|
||||||
|
int32_t ang=Gv_GetVarX(*insptr++), horiz=(tw==CON_A2XY)?100:Gv_GetVarX(*insptr++);
|
||||||
|
int32_t xvar=*insptr++, yvar=*insptr++;
|
||||||
|
|
||||||
|
int32_t x = sintable[(ang+512)&2047];
|
||||||
|
int32_t y = sintable[ang&2047];
|
||||||
|
|
||||||
|
if (tw==CON_AH2XYZ)
|
||||||
|
{
|
||||||
|
int32_t zvar=*insptr++, z=0;
|
||||||
|
|
||||||
|
horiz -= 100;
|
||||||
|
if (horiz)
|
||||||
|
{
|
||||||
|
int32_t veclen = ksqrt(200*200 + horiz*horiz);
|
||||||
|
int32_t dacos = divscale14(200, veclen);
|
||||||
|
|
||||||
|
x = mulscale14(x, dacos);
|
||||||
|
y = mulscale14(y, dacos);
|
||||||
|
z = divscale14(horiz, veclen);
|
||||||
|
}
|
||||||
|
|
||||||
|
Gv_SetVarX(zvar, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
Gv_SetVarX(xvar, x);
|
||||||
|
Gv_SetVarX(yvar, y);
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
case CON_MULSCALE:
|
case CON_MULSCALE:
|
||||||
insptr++;
|
insptr++;
|
||||||
{
|
{
|
||||||
|
@ -2736,11 +2771,12 @@ dodefault:
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// ifaimingsprite and -wall also work in 2d mode, but you must "and" with 16383 yourself
|
||||||
case CON_IFAIMINGSPRITE:
|
case CON_IFAIMINGSPRITE:
|
||||||
VM_DoConditional(AIMING_AT_SPRITE);
|
VM_DoConditional(AIMING_AT_SPRITE || pointhighlight>=16384);
|
||||||
continue;
|
continue;
|
||||||
case CON_IFAIMINGWALL:
|
case CON_IFAIMINGWALL:
|
||||||
VM_DoConditional(AIMING_AT_WALL_OR_MASK);
|
VM_DoConditional(AIMING_AT_WALL_OR_MASK || linehighlight>=0);
|
||||||
continue;
|
continue;
|
||||||
case CON_IFAIMINGSECTOR:
|
case CON_IFAIMINGSECTOR:
|
||||||
VM_DoConditional(AIMING_AT_CEILING_OR_FLOOR);
|
VM_DoConditional(AIMING_AT_CEILING_OR_FLOOR);
|
||||||
|
|
|
@ -143,9 +143,6 @@ extern intptr_t frameplace;
|
||||||
|
|
||||||
static int32_t acurpalette=0;
|
static int32_t acurpalette=0;
|
||||||
|
|
||||||
extern void showsectordata(int16_t sectnum);
|
|
||||||
extern void showwalldata(int16_t wallnum);
|
|
||||||
extern void showspritedata(int16_t spritenum);
|
|
||||||
extern int32_t checksectorpointer(int16_t i, int16_t sectnum);
|
extern int32_t checksectorpointer(int16_t i, int16_t sectnum);
|
||||||
|
|
||||||
extern double msens;
|
extern double msens;
|
||||||
|
|
|
@ -51,6 +51,7 @@ static char SM32_havesound = 0;
|
||||||
|
|
||||||
char SoundToggle = 1;
|
char SoundToggle = 1;
|
||||||
int32_t NumVoices = 32;
|
int32_t NumVoices = 32;
|
||||||
|
int32_t MixRate = 44100;
|
||||||
|
|
||||||
int32_t backflag,g_numEnvSoundsPlaying;
|
int32_t backflag,g_numEnvSoundsPlaying;
|
||||||
|
|
||||||
|
@ -75,12 +76,8 @@ int32_t S_SoundStartup(void)
|
||||||
void *initdata = 0;
|
void *initdata = 0;
|
||||||
|
|
||||||
// TODO: read config
|
// TODO: read config
|
||||||
int32_t FXVolume=220, /*NumVoices=32,*/ NumChannels=2, NumBits=16, MixRate, ReverseStereo=0;
|
int32_t FXVolume=220, /*NumVoices=32,*/ NumChannels=2, NumBits=16, ReverseStereo=0;
|
||||||
#if defined(_WIN32)
|
|
||||||
MixRate = 44100;
|
|
||||||
#else
|
|
||||||
MixRate = 44100;
|
|
||||||
#endif
|
|
||||||
fxdevicetype = ASS_AutoDetect;
|
fxdevicetype = ASS_AutoDetect;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
Loading…
Reference in a new issue