Merge branch 'master' into qzdoom-merge

This commit is contained in:
Rachael Alexanderson 2017-07-19 17:32:41 -04:00
commit 77617a2757
8 changed files with 20 additions and 8 deletions

View file

@ -219,7 +219,8 @@ enum ECheatCommand
CHT_BUDDHA, CHT_BUDDHA,
CHT_NOCLIP2, CHT_NOCLIP2,
CHT_BUDDHA2, CHT_BUDDHA2,
CHT_GOD2 CHT_GOD2,
CHT_MASSACRE2
}; };
void StartChunk (int id, uint8_t **stream); void StartChunk (int id, uint8_t **stream);

View file

@ -133,14 +133,14 @@ void F2DDrawer::AddTexture(FTexture *img, DrawParms &parms)
if (parms.style.Flags & STYLEF_ColorIsFixed) if (parms.style.Flags & STYLEF_ColorIsFixed)
{ {
color = parms.fillcolor; color = parms.fillcolor;
std::swap(color.r, color.b);
} }
else else
{ {
color = PalEntry(light, light, light); color = PalEntry(light, light, light);
} }
color.a = (uint8_t)(parms.Alpha * 255); color.a = (uint8_t)(parms.Alpha * 255);
color = PalEntry((color.a * parms.color.a) / 255, (color.r * parms.color.r) / 255, (color.g * parms.color.g) / 255, (color.b * parms.color.b) / 255); // red and blue channels are swapped to use value as vertex color
color = PalEntry((color.a * parms.color.a) / 255, (color.b * parms.color.b) / 255, (color.g * parms.color.g) / 255, (color.r * parms.color.r) / 255);
// scissor test doesn't use the current viewport for the coordinates, so use real screen coordinates // scissor test doesn't use the current viewport for the coordinates, so use real screen coordinates
dg.mScissor[0] = GLRenderer->ScreenToWindowX(parms.lclip); dg.mScissor[0] = GLRenderer->ScreenToWindowX(parms.lclip);

View file

@ -321,8 +321,9 @@ void cht_DoCheat (player_t *player, int cheat)
break; break;
case CHT_MASSACRE: case CHT_MASSACRE:
case CHT_MASSACRE2:
{ {
int killcount = P_Massacre (); int killcount = P_Massacre (cheat == CHT_MASSACRE2);
// killough 3/22/98: make more intelligent about plural // killough 3/22/98: make more intelligent about plural
// Ty 03/27/98 - string(s) *not* externalized // Ty 03/27/98 - string(s) *not* externalized
mysnprintf (msgbuild, countof(msgbuild), "%d Monster%s Killed", killcount, killcount==1 ? "" : "s"); mysnprintf (msgbuild, countof(msgbuild), "%d Monster%s Killed", killcount, killcount==1 ? "" : "s");

View file

@ -3595,7 +3595,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BossDeath)
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
int P_Massacre () int P_Massacre (bool baddies)
{ {
// jff 02/01/98 'em' cheat - kill all monsters // jff 02/01/98 'em' cheat - kill all monsters
// partially taken from Chi's .46 port // partially taken from Chi's .46 port
@ -3609,7 +3609,7 @@ int P_Massacre ()
while ( (actor = iterator.Next ()) ) while ( (actor = iterator.Next ()) )
{ {
if (!(actor->flags2 & MF2_DORMANT) && (actor->flags3 & MF3_ISMONSTER)) if (!(actor->flags2 & MF2_DORMANT) && (actor->flags3 & MF3_ISMONSTER) && (!baddies || !(actor->flags & MF_FRIENDLY)))
{ {
killcount += actor->Massacre(); killcount += actor->Massacre();
} }

View file

@ -68,7 +68,7 @@ void A_FaceTarget(AActor *actor);
void A_Face(AActor *self, AActor *other, DAngle max_turn = 0., DAngle max_pitch = 270., DAngle ang_offset = 0., DAngle pitch_offset = 0., int flags = 0, double z_add = 0); void A_Face(AActor *self, AActor *other, DAngle max_turn = 0., DAngle max_pitch = 270., DAngle ang_offset = 0., DAngle pitch_offset = 0., int flags = 0, double z_add = 0);
bool CheckBossDeath (AActor *); bool CheckBossDeath (AActor *);
int P_Massacre (); int P_Massacre (bool baddies = false);
bool P_CheckMissileRange (AActor *actor); bool P_CheckMissileRange (AActor *actor);
#define SKULLSPEED (20.) #define SKULLSPEED (20.)

View file

@ -1979,6 +1979,15 @@ CCMD (kill)
Net_WriteByte (DEM_GENERICCHEAT); Net_WriteByte (DEM_GENERICCHEAT);
Net_WriteByte (CHT_MASSACRE); Net_WriteByte (CHT_MASSACRE);
} }
else if (!stricmp (argv[1], "baddies"))
{
// Kill all the unfriendly monsters
if (CheckCheatmode ())
return;
Net_WriteByte (DEM_GENERICCHEAT);
Net_WriteByte (CHT_MASSACRE2);
}
else else
{ {
Net_WriteByte (DEM_KILLCLASSCHEAT); Net_WriteByte (DEM_KILLCLASSCHEAT);

View file

@ -381,6 +381,7 @@ FFont::FFont (const char *name, const char *nametemplate, int first, int count,
Next = FirstFont; Next = FirstFont;
FirstFont = this; FirstFont = this;
Cursor = '_'; Cursor = '_';
ActiveColors = 0;
maxyoffs = 0; maxyoffs = 0;

View file

@ -55,7 +55,7 @@ const char *GetVersionString();
#define RC_FILEVERSION 3,1,9999,0 #define RC_FILEVERSION 3,1,9999,0
#define RC_PRODUCTVERSION 3,1,9999,0 #define RC_PRODUCTVERSION 3,1,9999,0
#define RC_PRODUCTVERSION2 VERSIONSTR #define RC_PRODUCTVERSION2 VERSIONSTR
// These are for content versioning. The current state is '2.4'. // These are for content versioning. The current state is '3.2'.
#define VER_MAJOR 3 #define VER_MAJOR 3
#define VER_MINOR 2 #define VER_MINOR 2
#define VER_REVISION 0 #define VER_REVISION 0