ref: 66cf5dd1d216b71899831fe8cbb676057c5757f7
parent: af19c6755955d7d397454cd2fd988270ee2f0561
author: James Haley <haleyjd@hotmail.com>
date: Tue Mar 1 19:51:07 EST 2011
Fixed automap background color, size of plrkilledmsg buffer, a bug which caused the scanner to never be depleted from the inventory, and emulation of seemingly inconsequential undefined behavior in P_XYMovement via use of negative numspechit is currently addressed by changing the branch condition to > 0. Subversion-branch: /branches/strife-branch Subversion-revision: 2286
--- a/src/strife/am_map.c
+++ b/src/strife/am_map.c
@@ -54,12 +54,12 @@
// Automap colors
-#define BACKGROUND 0
-#define WALLCOLORS 5 // villsa [STRIFE]
-#define WALLRANGE 16
-#define TSWALLCOLORS 16
-#define FDWALLCOLORS 122 // villsa [STRIFE]
-#define CDWALLCOLORS 116
+#define BACKGROUND 240 // haleyjd [STRIFE]
+#define WALLCOLORS 5 // villsa [STRIFE]
+#define WALLRANGE 16
+#define TSWALLCOLORS 16
+#define FDWALLCOLORS 122 // villsa [STRIFE]
+#define CDWALLCOLORS 116
#define CTWALLCOLORS 19 // villsa [STRIFE]
#define SPWALLCOLORS 243 // villsa [STRIFE]
#define THINGCOLORS 233 // villsa [STRIFE]
@@ -1382,7 +1382,7 @@
// villsa [STRIFE] not used
/*if(grid)
- AM_drawGrid(GRIDCOLORS);*/
+ AM_drawGrid(GRIDCOLORS);*/
AM_drawWalls();
AM_drawPlayers();
@@ -1389,7 +1389,7 @@
// villsa [STRIFE] draw things when map powerup is enabled
if(cheating == 2 || plr->powers[pw_allmap] > 1)
- AM_drawThings();
+ AM_drawThings();
// villsa [STRIFE] not used
//AM_drawCrosshair(XHAIRCOLORS);
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -1279,7 +1279,8 @@
}
/*
// STRIFE-FIXME: This was actually displayed on a special textmode
- // screen with ANSI color codes...
+ // screen with ANSI color codes... would require use of textlib to
+ // emulate properly...
else
{
puts(DEH_String("Conversation ON"));
--- a/src/strife/p_dialog.c
+++ b/src/strife/p_dialog.c
@@ -733,7 +733,7 @@
// mobjtypes and to implement missing logic.
switch(sprnum)
{
- case SPR_HELT: // STRIFE-TODO: verify - I believe this is related to a cheat
+ case SPR_HELT: // This is given only by the "DONNYTRUMP" cheat (aka Midas)
P_GiveInventoryItem(player, SPR_HELT, MT_TOKEN_TOUGHNESS);
P_GiveInventoryItem(player, SPR_GUNT, MT_TOKEN_ACCURACY);
--- a/src/strife/p_inter.c
+++ b/src/strife/p_inter.c
@@ -748,7 +748,7 @@
}
// villsa [STRIFE]
-static char plrkilledmsg[76];
+static char plrkilledmsg[80];
//
// KillMobj
--- a/src/strife/p_mobj.c
+++ b/src/strife/p_mobj.c
@@ -200,10 +200,15 @@
else if (mo->flags & MF_MISSILE)
{
// haley 20110203: [STRIFE]
- // This modification allows missiles to activate shoot specials
+ // This modification allows missiles to activate shoot specials.
+ // *** BUG: In vanilla Strife the second condition is simply
+ // if(numspechit). However, numspechit can be negative, and
+ // when it is, this accesses spechit[-2]. This always causes the
+ // DOS exe to read from NULL, and the 'special' value there (in
+ // DOS 6.22 at least) is 0x70, which does nothing.
if(blockingline && blockingline->special)
P_ShootSpecialLine(mo, blockingline);
- if(numspechit)
+ if(numspechit > 0)
P_ShootSpecialLine(mo, spechit[numspechit-1]);
// explode a missile
--- a/src/strife/p_user.c
+++ b/src/strife/p_user.c
@@ -884,19 +884,15 @@
{
case SPR_ARM1: // 136
return P_GiveArmor(player, 2);
- break;
case SPR_ARM2: // 137
return P_GiveArmor(player, 1);
- break;
case SPR_SHD1: // 186
return P_GivePower(player, pw_invisibility);
- break;
case SPR_MASK: // 187
return P_GivePower(player, pw_ironfeet);
- break;
case SPR_PMUP: // 191
if(!player->powers[pw_allmap])
@@ -905,27 +901,22 @@
return false;
}
player->powers[pw_allmap] = PMUPTICS;
- break;
+ return true; // haleyjd 20110228: repaired
case SPR_STMP: // 180
return P_GiveBody(player, 10);
- break;
case SPR_MDKT: // 181
return P_GiveBody(player, 25);
- break;
case SPR_FULL: // 130
return P_GiveBody(player, 200);
- break;
case SPR_BEAC: // 135
return P_SpawnTeleportBeacon(player);
- break;
case SPR_TARG: // 108
return P_GivePower(player, pw_targeter);
- break;
}
return false;
--- a/src/strife/r_things.c
+++ b/src/strife/r_things.c
@@ -772,7 +772,7 @@
vis->patch = lump;
if (viewplayer->powers[pw_invisibility] > 4*32
- || viewplayer->powers[pw_invisibility] & 8)
+ || (viewplayer->powers[pw_invisibility] & 8))
{
// shadow draw
vis->colormap = spritelights[MAXLIGHTSCALE-1];