mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 19:20:38 +00:00
Mapster32: in linking tag determination, handle 'on' switch picnums (+1).
git-svn-id: https://svn.eduke32.com/eduke32@4465 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b82b5dc6b7
commit
78df6ab4b1
1 changed files with 49 additions and 7 deletions
|
@ -981,6 +981,36 @@ int32_t taglab_gettag(const char *label)
|
||||||
static uint64_t taglab_nolink_SEs = (1ull<<10)|(1ull<<27)|(1ull<<28)|(1ull<<29)|
|
static uint64_t taglab_nolink_SEs = (1ull<<10)|(1ull<<27)|(1ull<<28)|(1ull<<29)|
|
||||||
(1ull<<31)|(1ull<<32)|(1ull<<49)|(1ull<<50);
|
(1ull<<31)|(1ull<<32)|(1ull<<49)|(1ull<<50);
|
||||||
|
|
||||||
|
//// Case lists of switch picnums. Pretty much CODEDUP from sector.c.
|
||||||
|
|
||||||
|
// List of switches that function like dip (combination lock) switches.
|
||||||
|
#define DIPSWITCH_LIKE_CASES \
|
||||||
|
DIPSWITCH: \
|
||||||
|
case TECHSWITCH: \
|
||||||
|
case ALIENSWITCH
|
||||||
|
|
||||||
|
// List of access switches.
|
||||||
|
#define ACCESS_SWITCH_CASES \
|
||||||
|
ACCESSSWITCH: \
|
||||||
|
case ACCESSSWITCH2
|
||||||
|
|
||||||
|
// List of switches that don't fit the two preceding categories, and are not
|
||||||
|
// the MULTISWITCH. 13 cases.
|
||||||
|
#define REST_SWITCH_CASES \
|
||||||
|
DIPSWITCH2: \
|
||||||
|
case DIPSWITCH3: \
|
||||||
|
case FRANKENSTINESWITCH: \
|
||||||
|
case HANDSWITCH: \
|
||||||
|
case LIGHTSWITCH2: \
|
||||||
|
case LIGHTSWITCH: \
|
||||||
|
case LOCKSWITCH1: \
|
||||||
|
case POWERSWITCH1: \
|
||||||
|
case POWERSWITCH2: \
|
||||||
|
case PULLSWITCH: \
|
||||||
|
case SLOTDOOR: \
|
||||||
|
case SPACEDOORSWITCH: \
|
||||||
|
case SPACELIGHTSWITCH
|
||||||
|
|
||||||
// Whether the individual tags have linking semantics. Based on
|
// Whether the individual tags have linking semantics. Based on
|
||||||
// http://infosuite.duke4.net/index.php?page=references_special_textures
|
// http://infosuite.duke4.net/index.php?page=references_special_textures
|
||||||
// The return value is an OR of the following:
|
// The return value is an OR of the following:
|
||||||
|
@ -1016,11 +1046,11 @@ int32_t taglab_linktags(int32_t spritep, int32_t num)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// various lotag-linkers
|
// various lotag-linkers
|
||||||
|
// NOTE: switch picnums are handled together with walls below.
|
||||||
case ACTIVATOR: case TOUCHPLATE: case ACTIVATORLOCKED: case MASTERSWITCH:
|
case ACTIVATOR: case TOUCHPLATE: case ACTIVATORLOCKED: case MASTERSWITCH:
|
||||||
case RESPAWN: // ---
|
case RESPAWN: // ---
|
||||||
case ACCESSSWITCH: case ACCESSSWITCH2:
|
|
||||||
case MULTISWITCH: // *
|
case MULTISWITCH: // *
|
||||||
case DIPSWITCH: case TECHSWITCH: case ALIENSWITCH: case TARGET: case DUCK:
|
case TARGET: case DUCK:
|
||||||
case REACTOR:
|
case REACTOR:
|
||||||
case CAMERA1:
|
case CAMERA1:
|
||||||
link = 1;
|
link = 1;
|
||||||
|
@ -1041,6 +1071,7 @@ int32_t taglab_linktags(int32_t spritep, int32_t num)
|
||||||
else // walls
|
else // walls
|
||||||
{
|
{
|
||||||
#ifdef YAX_ENABLE
|
#ifdef YAX_ENABLE
|
||||||
|
// XXX: only for non-VX map versions.
|
||||||
if (yax_getnextwall(num, YAX_CEILING) < 0)
|
if (yax_getnextwall(num, YAX_CEILING) < 0)
|
||||||
#endif
|
#endif
|
||||||
switch (picnum)
|
switch (picnum)
|
||||||
|
@ -1061,11 +1092,9 @@ int32_t taglab_linktags(int32_t spritep, int32_t num)
|
||||||
// try a few that work both as sprites and as walls
|
// try a few that work both as sprites and as walls
|
||||||
switch (picnum)
|
switch (picnum)
|
||||||
{
|
{
|
||||||
case ACCESSSWITCH: case SLOTDOOR: case LIGHTSWITCH: case SPACEDOORSWITCH:
|
case ACCESS_SWITCH_CASES:
|
||||||
case SPACELIGHTSWITCH: case FRANKENSTINESWITCH: case MULTISWITCH:
|
case DIPSWITCH_LIKE_CASES:
|
||||||
case DIPSWITCH: case DIPSWITCH2: case TECHSWITCH: case DIPSWITCH3:
|
case REST_SWITCH_CASES:
|
||||||
case ACCESSSWITCH2: case LIGHTSWITCH2: case POWERSWITCH1: case LOCKSWITCH1:
|
|
||||||
case POWERSWITCH2: case HANDSWITCH: case PULLSWITCH: case ALIENSWITCH: // ---
|
|
||||||
case DOORTILE5: case DOORTILE6: case DOORTILE1: case DOORTILE2: case DOORTILE3:
|
case DOORTILE5: case DOORTILE6: case DOORTILE1: case DOORTILE2: case DOORTILE3:
|
||||||
case DOORTILE4: case DOORTILE7: case DOORTILE8: case DOORTILE9: case DOORTILE10:
|
case DOORTILE4: case DOORTILE7: case DOORTILE8: case DOORTILE9: case DOORTILE10:
|
||||||
case DOORTILE22: case DOORTILE18: case DOORTILE19: case DOORTILE20:
|
case DOORTILE22: case DOORTILE18: case DOORTILE19: case DOORTILE20:
|
||||||
|
@ -1074,6 +1103,19 @@ int32_t taglab_linktags(int32_t spritep, int32_t num)
|
||||||
link = 1;
|
link = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// handle 'on' positions of non-access switches
|
||||||
|
switch (picnum - 1)
|
||||||
|
{
|
||||||
|
case DIPSWITCH_LIKE_CASES:
|
||||||
|
case REST_SWITCH_CASES:
|
||||||
|
link = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// handle all positions of the multiswitch
|
||||||
|
if (picnum >= MULTISWITCH && picnum <= MULTISWITCH+3)
|
||||||
|
link = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_iReturnVar = link;
|
g_iReturnVar = link;
|
||||||
|
|
Loading…
Reference in a new issue