diff --git a/source/build/include/polymost.h b/source/build/include/polymost.h
index 66fe9522f..93ae9181a 100644
--- a/source/build/include/polymost.h
+++ b/source/build/include/polymost.h
@@ -146,9 +146,7 @@ static FORCE_INLINE int polymost_useindexedtextures(void)
static FORCE_INLINE int polymost_usetileshades(void)
{
- int const idx = polymost_useindexedtextures();
- int const shd = idx || (r_usetileshades && !(globalflags & GLOBAL_NO_GL_TILESHADES));
- return idx && shd ? TS_SHADETABLE : shd ? TS_TEXTURE : TS_NONE;
+ return r_useindexedcolortextures && r_usetileshades && !(globalflags & GLOBAL_NO_GL_TILESHADES);
}
static FORCE_INLINE float polymost_getanisotropy(int filtered = 0)
diff --git a/source/duke3d/src/cheats.cpp b/source/duke3d/src/cheats.cpp
index 9aa6058f2..cb3e18366 100644
--- a/source/duke3d/src/cheats.cpp
+++ b/source/duke3d/src/cheats.cpp
@@ -263,8 +263,6 @@ void G_DoCheats(void)
{
cheatNum = osdcmd_cheatsinfo_stat.cheatnum;
- if (!FURY && ud.player_skill == 4)
- {
switch (cheatNum)
{
case CHEAT_DEBUG:
@@ -279,7 +277,6 @@ void G_DoCheats(void)
osdcmd_cheatsinfo_stat.cheatnum = -1;
return;
}
- }
// JBF 20030914
osdcmd_cheatsinfo_stat.cheatnum = -1;
@@ -732,16 +729,8 @@ void G_DoCheats(void)
{
if (pPlayer->cheat_phase == -1)
{
- if (!FURY && ud.player_skill == 4)
- {
- P_DoQuote(QUOTE_CHEATS_DISABLED, pPlayer);
- pPlayer->cheat_phase = 0;
- }
- else
- {
pPlayer->cheat_phase = 1;
// P_DoQuote(QUOTE_25,pPlayer);
- }
g_cheatBufLen = 0;
KB_FlushKeyboardQueue();
}
diff --git a/source/duke3d/src/duke3d.h b/source/duke3d/src/duke3d.h
index 9f189ad0c..e57af10a9 100644
--- a/source/duke3d/src/duke3d.h
+++ b/source/duke3d/src/duke3d.h
@@ -69,7 +69,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define RECSYNCBUFSIZ 2520 //2520 is the (LCM of 1-8)*3
#define MOVEFIFOSIZ 2
-#define MAXVOLUMES 7
+#define MAXVOLUMES 16
#define MAXLEVELS 64
#define MAXGAMETYPES 16
#define MAX_ACTIVE_VIEWSCREENS 64
diff --git a/source/duke3d/src/gamedef.cpp b/source/duke3d/src/gamedef.cpp
index e1915e526..874ed7abd 100644
--- a/source/duke3d/src/gamedef.cpp
+++ b/source/duke3d/src/gamedef.cpp
@@ -350,6 +350,7 @@ static tokenmap_t const vm_keywords[] =
{ "ifvara", CON_IFVARA },
{ "ifvarae", CON_IFVARAE },
{ "ifvarand", CON_IFVARAND },
+ { "ifvarnand", CON_IFVARNAND },
{ "ifvarb", CON_IFVARB },
{ "ifvarbe", CON_IFVARBE },
{ "ifvarboth", CON_IFVARBOTH },
@@ -364,6 +365,7 @@ static tokenmap_t const vm_keywords[] =
{ "ifvarvara", CON_IFVARVARA },
{ "ifvarvarae", CON_IFVARVARAE },
{ "ifvarvarand", CON_IFVARVARAND },
+ { "ifvarvarnand", CON_IFVARVARNAND },
{ "ifvarvarb", CON_IFVARVARB },
{ "ifvarvarbe", CON_IFVARVARBE },
{ "ifvarvarboth", CON_IFVARVARBOTH },
@@ -604,6 +606,7 @@ static tokenmap_t const vm_keywords[] =
{ "ife", CON_IFVARVARE },
{ "ifn", CON_IFVARVARN },
{ "ifand", CON_IFVARVARAND },
+ { "ifnand", CON_IFVARVARNAND },
{ "ifor", CON_IFVARVAROR },
{ "ifxor", CON_IFVARVARXOR },
{ "ifeither", CON_IFVARVAREITHER },
@@ -665,6 +668,7 @@ static const vec2_t varvartable[] =
{ CON_IFVARVARA, CON_IFVARA },
{ CON_IFVARVARAE, CON_IFVARAE },
{ CON_IFVARVARAND, CON_IFVARAND },
+ { CON_IFVARVARNAND, CON_IFVARNAND },
{ CON_IFVARVARB, CON_IFVARB },
{ CON_IFVARVARBE, CON_IFVARBE },
{ CON_IFVARVARBOTH, CON_IFVARBOTH },
@@ -702,6 +706,7 @@ static const vec2_t globalvartable[] =
{ CON_IFVARA, CON_IFVARA_GLOBAL },
{ CON_IFVARAE, CON_IFVARAE_GLOBAL },
{ CON_IFVARAND, CON_IFVARAND_GLOBAL },
+ { CON_IFVARNAND, CON_IFVARNAND_GLOBAL },
{ CON_IFVARB, CON_IFVARB_GLOBAL },
{ CON_IFVARBE, CON_IFVARBE_GLOBAL },
{ CON_IFVARBOTH, CON_IFVARBOTH_GLOBAL },
@@ -738,6 +743,7 @@ static const vec2_t playervartable[] =
{ CON_IFVARA, CON_IFVARA_PLAYER },
{ CON_IFVARAE, CON_IFVARAE_PLAYER },
{ CON_IFVARAND, CON_IFVARAND_PLAYER },
+ { CON_IFVARNAND, CON_IFVARNAND_PLAYER },
{ CON_IFVARB, CON_IFVARB_PLAYER },
{ CON_IFVARBE, CON_IFVARBE_PLAYER },
{ CON_IFVARBOTH, CON_IFVARBOTH_PLAYER },
@@ -774,6 +780,7 @@ static const vec2_t actorvartable[] =
{ CON_IFVARA, CON_IFVARA_ACTOR },
{ CON_IFVARAE, CON_IFVARAE_ACTOR },
{ CON_IFVARAND, CON_IFVARAND_ACTOR },
+ { CON_IFVARNAND, CON_IFVARNAND_ACTOR },
{ CON_IFVARB, CON_IFVARB_ACTOR },
{ CON_IFVARBE, CON_IFVARBE_ACTOR },
{ CON_IFVARBOTH, CON_IFVARBOTH_ACTOR },
@@ -4505,6 +4512,7 @@ setvarvar:
case CON_IFVARVARA:
case CON_IFVARVARAE:
case CON_IFVARVARAND:
+ case CON_IFVARVARNAND:
case CON_IFVARVARB:
case CON_IFVARVARBE:
case CON_IFVARVARBOTH:
@@ -4579,6 +4587,7 @@ setvarvar:
case CON_IFVARA:
case CON_IFVARAE:
case CON_IFVARAND:
+ case CON_IFVARNAND:
case CON_IFVARB:
case CON_IFVARBE:
case CON_IFVARBOTH:
diff --git a/source/duke3d/src/gamedef.h b/source/duke3d/src/gamedef.h
index d604b922e..e5ccd77ee 100644
--- a/source/duke3d/src/gamedef.h
+++ b/source/duke3d/src/gamedef.h
@@ -857,6 +857,7 @@ enum IterationTypes_t
TRANSFORM(CON_IFVARA_GLOBAL) DELIMITER \
TRANSFORM(CON_IFVARAE_GLOBAL) DELIMITER \
TRANSFORM(CON_IFVARAND_GLOBAL) DELIMITER \
+ TRANSFORM(CON_IFVARNAND_GLOBAL) DELIMITER \
TRANSFORM(CON_IFVARB_GLOBAL) DELIMITER \
TRANSFORM(CON_IFVARBE_GLOBAL) DELIMITER \
TRANSFORM(CON_IFVARBOTH_GLOBAL) DELIMITER \
@@ -887,6 +888,7 @@ enum IterationTypes_t
TRANSFORM(CON_IFVARA_PLAYER) DELIMITER \
TRANSFORM(CON_IFVARAE_PLAYER) DELIMITER \
TRANSFORM(CON_IFVARAND_PLAYER) DELIMITER \
+ TRANSFORM(CON_IFVARNAND_PLAYER) DELIMITER \
TRANSFORM(CON_IFVARB_PLAYER) DELIMITER \
TRANSFORM(CON_IFVARBE_PLAYER) DELIMITER \
TRANSFORM(CON_IFVARBOTH_PLAYER) DELIMITER \
@@ -917,6 +919,7 @@ enum IterationTypes_t
TRANSFORM(CON_IFVARA_ACTOR) DELIMITER \
TRANSFORM(CON_IFVARAE_ACTOR) DELIMITER \
TRANSFORM(CON_IFVARAND_ACTOR) DELIMITER \
+ TRANSFORM(CON_IFVARNAND_ACTOR) DELIMITER \
TRANSFORM(CON_IFVARB_ACTOR) DELIMITER \
TRANSFORM(CON_IFVARBE_ACTOR) DELIMITER \
TRANSFORM(CON_IFVARBOTH_ACTOR) DELIMITER \
@@ -947,6 +950,7 @@ enum IterationTypes_t
TRANSFORM(CON_IFVARVARA) DELIMITER \
TRANSFORM(CON_IFVARVARAE) DELIMITER \
TRANSFORM(CON_IFVARVARAND) DELIMITER \
+ TRANSFORM(CON_IFVARVARNAND) DELIMITER \
TRANSFORM(CON_IFVARVARB) DELIMITER \
TRANSFORM(CON_IFVARVARBE) DELIMITER \
TRANSFORM(CON_IFVARVARBOTH) DELIMITER \
@@ -978,6 +982,7 @@ enum IterationTypes_t
TRANSFORM(CON_IFVARA) DELIMITER \
TRANSFORM(CON_IFVARAE) DELIMITER \
TRANSFORM(CON_IFVARAND) DELIMITER \
+ TRANSFORM(CON_IFVARNAND) DELIMITER \
TRANSFORM(CON_IFVARB) DELIMITER \
TRANSFORM(CON_IFVARBE) DELIMITER \
TRANSFORM(CON_IFVARBOTH) DELIMITER \
diff --git a/source/duke3d/src/gameexec.cpp b/source/duke3d/src/gameexec.cpp
index 08be757ba..66ed15c86 100644
--- a/source/duke3d/src/gameexec.cpp
+++ b/source/duke3d/src/gameexec.cpp
@@ -1513,6 +1513,11 @@ GAMEEXEC_STATIC void VM_Execute(int vm_execution_depth /*= false*/)
tw = aGameVars[*insptr++].global;
branch(tw & *insptr);
dispatch();
+ vInstruction(CON_IFVARNAND_GLOBAL):
+ insptr++;
+ tw = aGameVars[*insptr++].global;
+ branch(!(tw & *insptr));
+ dispatch();
vInstruction(CON_IFVAROR_GLOBAL):
insptr++;
tw = aGameVars[*insptr++].global;
@@ -1630,6 +1635,11 @@ GAMEEXEC_STATIC void VM_Execute(int vm_execution_depth /*= false*/)
tw = aGameVars[*insptr++].pValues[vm.spriteNum & (MAXSPRITES-1)];
branch(tw & *insptr);
dispatch();
+ vInstruction(CON_IFVARNAND_ACTOR):
+ insptr++;
+ tw = aGameVars[*insptr++].pValues[vm.spriteNum & (MAXSPRITES-1)];
+ branch(!(tw & *insptr));
+ dispatch();
vInstruction(CON_IFVAROR_ACTOR):
insptr++;
tw = aGameVars[*insptr++].pValues[vm.spriteNum & (MAXSPRITES-1)];
@@ -1747,6 +1757,11 @@ GAMEEXEC_STATIC void VM_Execute(int vm_execution_depth /*= false*/)
tw = aGameVars[*insptr++].pValues[vm.playerNum & (MAXPLAYERS-1)];
branch(tw & *insptr);
dispatch();
+ vInstruction(CON_IFVARNAND_PLAYER):
+ insptr++;
+ tw = aGameVars[*insptr++].pValues[vm.playerNum & (MAXPLAYERS-1)];
+ branch(!(tw & *insptr));
+ dispatch();
vInstruction(CON_IFVAROR_PLAYER):
insptr++;
tw = aGameVars[*insptr++].pValues[vm.playerNum & (MAXPLAYERS-1)];
@@ -1952,6 +1967,12 @@ GAMEEXEC_STATIC void VM_Execute(int vm_execution_depth /*= false*/)
branch(tw & *insptr);
dispatch();
+ vInstruction(CON_IFVARNAND):
+ insptr++;
+ tw = Gv_GetVar(*insptr++);
+ branch(!(tw & *insptr));
+ dispatch();
+
vInstruction(CON_IFVAROR):
insptr++;
tw = Gv_GetVar(*insptr++);
@@ -2230,6 +2251,14 @@ GAMEEXEC_STATIC void VM_Execute(int vm_execution_depth /*= false*/)
branch(tw);
dispatch();
+ vInstruction(CON_IFVARVARNAND):
+ insptr++;
+ tw = Gv_GetVar(*insptr++);
+ tw = !(tw & Gv_GetVar(*insptr++));
+ insptr--;
+ branch(tw);
+ dispatch();
+
vInstruction(CON_IFVARVAROR):
insptr++;
tw = Gv_GetVar(*insptr++);
diff --git a/source/duke3d/src/gamestructures.cpp b/source/duke3d/src/gamestructures.cpp
index 01157f594..2be7c0f93 100644
--- a/source/duke3d/src/gamestructures.cpp
+++ b/source/duke3d/src/gamestructures.cpp
@@ -121,7 +121,7 @@ void __fastcall VM_SetSector(int const sectNum, int const labelNum, int32_t newV
switch (labelNum)
{
case SECTOR_WALLPTR:
- setfirstwall(sectNum, newValue); break;
+ sector[sectNum].wallptr = newValue; break;
case SECTOR_CEILINGZVEL:
s.extra = newValue;