mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-18 22:51:39 +00:00
- Fixed: The sector translators must clear unused bits because they might
render a sector's special inoperable. SVN r844 (trunk)
This commit is contained in:
parent
969cc1f6f9
commit
a6e9accedb
8 changed files with 17 additions and 11 deletions
|
@ -1,4 +1,6 @@
|
||||||
March 23, 2008 (Changes by Graf Zahl)
|
March 23, 2008 (Changes by Graf Zahl)
|
||||||
|
- Fixed: The sector translators must clear unused bits because they might
|
||||||
|
render a sector's special inoperable.
|
||||||
- Expanded the args for MAPINFO special actions to 32 bit integers as in
|
- Expanded the args for MAPINFO special actions to 32 bit integers as in
|
||||||
the rest of the game.
|
the rest of the game.
|
||||||
- Fixed: The specialaction list was not copied properly when transferred
|
- Fixed: The specialaction list was not copied properly when transferred
|
||||||
|
|
|
@ -330,13 +330,6 @@ int P_TranslateSectorSpecial (int special)
|
||||||
{
|
{
|
||||||
int mask = 0;
|
int mask = 0;
|
||||||
|
|
||||||
// Allow any supported sector special by or-ing 0x8000 to it in Doom format maps
|
|
||||||
// That's for those who like to mess around with existing maps. ;)
|
|
||||||
if (special & 0x8000)
|
|
||||||
{
|
|
||||||
return special & 0x7fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(unsigned i = 0; i < SectorMasks.Size(); i++)
|
for(unsigned i = 0; i < SectorMasks.Size(); i++)
|
||||||
{
|
{
|
||||||
int newmask = special & SectorMasks[i].mask;
|
int newmask = special & SectorMasks[i].mask;
|
||||||
|
@ -345,6 +338,7 @@ int P_TranslateSectorSpecial (int special)
|
||||||
special &= ~newmask;
|
special &= ~newmask;
|
||||||
if (SectorMasks[i].op == 1) newmask <<= SectorMasks[i].shift;
|
if (SectorMasks[i].op == 1) newmask <<= SectorMasks[i].shift;
|
||||||
else if (SectorMasks[i].op == -1) newmask >>= SectorMasks[i].shift;
|
else if (SectorMasks[i].op == -1) newmask >>= SectorMasks[i].shift;
|
||||||
|
else if (SectorMasks[i].op == 0 && SectorMasks[i].shift ==1) newmask = 0;
|
||||||
mask |= newmask;
|
mask |= newmask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,14 +161,14 @@ struct XlatParseContext
|
||||||
{
|
{
|
||||||
"include", "define", "enum",
|
"include", "define", "enum",
|
||||||
"arg5", "arg4", "arg3", "arg2", "flags", "lineid", "tag",
|
"arg5", "arg4", "arg3", "arg2", "flags", "lineid", "tag",
|
||||||
"sector", "bitmask", "nobitmask"
|
"sector", "bitmask", "nobitmask", "clear"
|
||||||
|
|
||||||
};
|
};
|
||||||
static const short types[] =
|
static const short types[] =
|
||||||
{
|
{
|
||||||
INCLUDE, DEFINE, ENUM,
|
INCLUDE, DEFINE, ENUM,
|
||||||
ARG5, ARG4, ARG3, ARG2, FLAGS, TAG, TAG,
|
ARG5, ARG4, ARG3, ARG2, FLAGS, TAG, TAG,
|
||||||
SECTOR, BITMASK, NOBITMASK
|
SECTOR, BITMASK, NOBITMASK, CLEAR
|
||||||
};
|
};
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
@ -32,5 +32,6 @@
|
||||||
#define SEMICOLON 32
|
#define SEMICOLON 32
|
||||||
#define NOBITMASK 33
|
#define NOBITMASK 33
|
||||||
#define BITMASK 34
|
#define BITMASK 34
|
||||||
#define LSHASSIGN 35
|
#define CLEAR 35
|
||||||
#define RSHASSIGN 36
|
#define LSHASSIGN 36
|
||||||
|
#define RSHASSIGN 37
|
||||||
|
|
|
@ -488,6 +488,12 @@ sector_bitmask ::= SECTOR BITMASK exp(mask) SEMICOLON.
|
||||||
SectorMasks.Push(sm);
|
SectorMasks.Push(sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sector_bitmask ::= SECTOR BITMASK exp(mask) CLEAR SEMICOLON.
|
||||||
|
{
|
||||||
|
FSectorMask sm = { mask, 0, 1};
|
||||||
|
SectorMasks.Push(sm);
|
||||||
|
}
|
||||||
|
|
||||||
sector_op(A) ::= LSHASSIGN. { A = 1; }
|
sector_op(A) ::= LSHASSIGN. { A = 1; }
|
||||||
sector_op(A) ::= RSHASSIGN. { A = -1; }
|
sector_op(A) ::= RSHASSIGN. { A = -1; }
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
include "xlat/base.txt"
|
include "xlat/base.txt"
|
||||||
|
|
||||||
|
|
||||||
|
sector bitmask 0xf000 clear;
|
||||||
sector bitmask 0xfe0 <<= 3;
|
sector bitmask 0xfe0 <<= 3;
|
||||||
|
|
||||||
sector 1 = dLight_Flicker;
|
sector 1 = dLight_Flicker;
|
||||||
|
|
|
@ -10,6 +10,7 @@ include "xlat/base.txt"
|
||||||
106 = WALK, Stairs_BuildUpDoom (tag, F_SLOW, 16)
|
106 = WALK, Stairs_BuildUpDoom (tag, F_SLOW, 16)
|
||||||
107 = USE, Stairs_BuildUpDoom (tag, F_SLOW, 16)
|
107 = USE, Stairs_BuildUpDoom (tag, F_SLOW, 16)
|
||||||
|
|
||||||
|
sector bitmask 0xf000 clear;
|
||||||
sector bitmask 0xfc0 <<= 3;
|
sector bitmask 0xfc0 <<= 3;
|
||||||
|
|
||||||
sector 1 = dLight_Flicker;
|
sector 1 = dLight_Flicker;
|
||||||
|
|
|
@ -324,6 +324,7 @@ RetailOnly = 121
|
||||||
233 = USE|REP, ACS_ExecuteWithResult (0, 233, tag)
|
233 = USE|REP, ACS_ExecuteWithResult (0, 233, tag)
|
||||||
234 = USE|REP, ACS_ExecuteWithResult (0, 234, tag)
|
234 = USE|REP, ACS_ExecuteWithResult (0, 234, tag)
|
||||||
|
|
||||||
|
sector bitmask 0xf000 clear;
|
||||||
sector bitmask 0xfe0 <<= 3;
|
sector bitmask 0xfe0 <<= 3;
|
||||||
|
|
||||||
sector 1 = dLight_Flicker;
|
sector 1 = dLight_Flicker;
|
||||||
|
|
Loading…
Reference in a new issue