- Fixed: Red blood particles used too dark colors.

- Fixed: The smoothlighting code in side_t::GetLightLevel relied on 
  the global 'linedef' variable for automatic fake contrast although
  this issue had already been fixed for the original code here.
- Replaced static string buffers with FString in FONTDEFS parser.

SVN r1194 (trunk)
This commit is contained in:
Christoph Oelckers 2008-09-04 14:09:32 +00:00
parent b2bbdb9e4c
commit 49565ccb84
6 changed files with 54 additions and 25 deletions

View file

@ -1,3 +1,10 @@
September 4, 2008 (Changes by Graf Zahl)
- Fixed: Red blood particles used too dark colors.
- Fixed: The smoothlighting code in side_t::GetLightLevel relied on
the global 'linedef' variable for automatic fake contrast although
this issue had already been fixed for the original code here.
- Replaced static string buffers with FString in FONTDEFS parser.
September 1, 2008 (Changes by Graf Zahl) September 1, 2008 (Changes by Graf Zahl)
- Added an 'allcheats' CVAR. This will enable all cheats from all - Added an 'allcheats' CVAR. This will enable all cheats from all
supported games in any game being played. supported games in any game being played.

View file

@ -98,7 +98,8 @@ gameinfo_t HexenGameInfo =
24*FRACUNIT, 24*FRACUNIT,
"xlat/heretic.txt", // not really correct but this was used before. "xlat/heretic.txt", // not really correct but this was used before.
{ "mapinfo/hexen.txt", NULL }, { "mapinfo/hexen.txt", NULL },
MAKERGB(100,0,0), MAKERGB(104,0,0),
MAKERGB(255,0,0),
}; };
gameinfo_t HexenDKGameInfo = gameinfo_t HexenDKGameInfo =
@ -129,7 +130,8 @@ gameinfo_t HexenDKGameInfo =
24*FRACUNIT, 24*FRACUNIT,
"xlat/heretic.txt", // not really correct but this was used before. "xlat/heretic.txt", // not really correct but this was used before.
{ "mapinfo/hexen.txt", NULL }, { "mapinfo/hexen.txt", NULL },
MAKERGB(100,0,0), MAKERGB(104,0,0),
MAKERGB(255,0,0),
}; };
gameinfo_t HereticGameInfo = gameinfo_t HereticGameInfo =
@ -160,7 +162,8 @@ gameinfo_t HereticGameInfo =
24*FRACUNIT, 24*FRACUNIT,
"xlat/heretic.txt", "xlat/heretic.txt",
{ "mapinfo/heretic.txt", NULL }, { "mapinfo/heretic.txt", NULL },
MAKERGB(100,0,0), MAKERGB(104,0,0),
MAKERGB(255,0,0),
}; };
gameinfo_t HereticSWGameInfo = gameinfo_t HereticSWGameInfo =
@ -191,7 +194,8 @@ gameinfo_t HereticSWGameInfo =
24*FRACUNIT, 24*FRACUNIT,
"xlat/heretic.txt", "xlat/heretic.txt",
{ "mapinfo/heretic.txt", NULL }, { "mapinfo/heretic.txt", NULL },
MAKERGB(100,0,0), MAKERGB(104,0,0),
MAKERGB(255,0,0),
}; };
gameinfo_t SharewareGameInfo = gameinfo_t SharewareGameInfo =
@ -222,7 +226,8 @@ gameinfo_t SharewareGameInfo =
24*FRACUNIT, 24*FRACUNIT,
"xlat/doom.txt", "xlat/doom.txt",
{ "mapinfo/doomcommon.txt", "mapinfo/doom1.txt" }, { "mapinfo/doomcommon.txt", "mapinfo/doom1.txt" },
MAKERGB(100,0,0), MAKERGB(104,0,0),
MAKERGB(255,0,0),
}; };
gameinfo_t RegisteredGameInfo = gameinfo_t RegisteredGameInfo =
@ -253,7 +258,8 @@ gameinfo_t RegisteredGameInfo =
24*FRACUNIT, 24*FRACUNIT,
"xlat/doom.txt", "xlat/doom.txt",
{ "mapinfo/doomcommon.txt", "mapinfo/doom1.txt" }, { "mapinfo/doomcommon.txt", "mapinfo/doom1.txt" },
MAKERGB(100,0,0), MAKERGB(104,0,0),
MAKERGB(255,0,0),
}; };
gameinfo_t ChexGameInfo = gameinfo_t ChexGameInfo =
@ -269,7 +275,7 @@ gameinfo_t ChexGameInfo =
"misc/chat2", "misc/chat2",
"D_VICTOR", "D_VICTOR",
"FLOOR4_8", "FLOOR4_8",
"CREDIT", "HELP2",
"VICTORY2", "VICTORY2",
"ENDPIC", "ENDPIC",
{ { "HELP1", "CREDIT" } }, { { "HELP1", "CREDIT" } },
@ -284,6 +290,7 @@ gameinfo_t ChexGameInfo =
24*FRACUNIT, 24*FRACUNIT,
"xlat/doom.txt", "xlat/doom.txt",
{ "mapinfo/chex.txt", NULL }, { "mapinfo/chex.txt", NULL },
MAKERGB(63,125,57),
MAKERGB(95,175,87), MAKERGB(95,175,87),
}; };
@ -315,7 +322,8 @@ gameinfo_t RetailGameInfo =
24*FRACUNIT, 24*FRACUNIT,
"xlat/doom.txt", "xlat/doom.txt",
{ "mapinfo/doomcommon.txt", "mapinfo/doom1.txt" }, { "mapinfo/doomcommon.txt", "mapinfo/doom1.txt" },
MAKERGB(100,0,0), MAKERGB(104,0,0),
MAKERGB(255,0,0),
}; };
gameinfo_t CommercialGameInfo = gameinfo_t CommercialGameInfo =
@ -346,7 +354,8 @@ gameinfo_t CommercialGameInfo =
24*FRACUNIT, 24*FRACUNIT,
"xlat/doom.txt", "xlat/doom.txt",
{ "mapinfo/doomcommon.txt", "mapinfo/doom2.txt" }, { "mapinfo/doomcommon.txt", "mapinfo/doom2.txt" },
MAKERGB(100,0,0), MAKERGB(104,0,0),
MAKERGB(255,0,0),
}; };
gameinfo_t PlutoniaGameInfo = gameinfo_t PlutoniaGameInfo =
@ -377,7 +386,8 @@ gameinfo_t PlutoniaGameInfo =
24*FRACUNIT, 24*FRACUNIT,
"xlat/doom.txt", "xlat/doom.txt",
{ "mapinfo/doomcommon.txt", "mapinfo/plutonia.txt" }, { "mapinfo/doomcommon.txt", "mapinfo/plutonia.txt" },
MAKERGB(100,0,0), MAKERGB(104,0,0),
MAKERGB(255,0,0),
}; };
gameinfo_t TNTGameInfo = gameinfo_t TNTGameInfo =
@ -408,7 +418,8 @@ gameinfo_t TNTGameInfo =
24*FRACUNIT, 24*FRACUNIT,
"xlat/doom.txt", "xlat/doom.txt",
{ "mapinfo/doomcommon.txt", "mapinfo/tnt.txt" }, { "mapinfo/doomcommon.txt", "mapinfo/tnt.txt" },
MAKERGB(100,0,0), MAKERGB(104,0,0),
MAKERGB(255,0,0),
}; };
gameinfo_t StrifeGameInfo = gameinfo_t StrifeGameInfo =
@ -439,7 +450,8 @@ gameinfo_t StrifeGameInfo =
16*FRACUNIT, 16*FRACUNIT,
"xlat/strife.txt", "xlat/strife.txt",
{ "mapinfo/strife.txt", NULL }, { "mapinfo/strife.txt", NULL },
MAKERGB(100,0,0), MAKERGB(104,0,0),
MAKERGB(255,0,0),
}; };
gameinfo_t StrifeTeaserGameInfo = gameinfo_t StrifeTeaserGameInfo =
@ -470,7 +482,8 @@ gameinfo_t StrifeTeaserGameInfo =
16*FRACUNIT, 16*FRACUNIT,
"xlat/strife.txt", "xlat/strife.txt",
{ "mapinfo/strife.txt", NULL }, { "mapinfo/strife.txt", NULL },
MAKERGB(100,0,0), MAKERGB(104,0,0),
MAKERGB(255,0,0),
}; };
gameinfo_t StrifeTeaser2GameInfo = gameinfo_t StrifeTeaser2GameInfo =
@ -501,5 +514,6 @@ gameinfo_t StrifeTeaser2GameInfo =
16*FRACUNIT, 16*FRACUNIT,
"xlat/strife.txt", "xlat/strife.txt",
{ "mapinfo/strife.txt", NULL }, { "mapinfo/strife.txt", NULL },
MAKERGB(100,0,0), MAKERGB(104,0,0),
MAKERGB(255,0,0),
}; };

View file

@ -120,6 +120,7 @@ typedef struct
const char *translator; const char *translator;
const char *mapinfo[2]; const char *mapinfo[2];
DWORD defaultbloodcolor; DWORD defaultbloodcolor;
DWORD defaultbloodparticlecolor;
} gameinfo_t; } gameinfo_t;
extern gameinfo_t gameinfo; extern gameinfo_t gameinfo;

View file

@ -101,7 +101,7 @@ void P_InitEffects ()
color++; color++;
} }
int kind = gameinfo.defaultbloodcolor; int kind = gameinfo.defaultbloodparticlecolor;
blood1 = ColorMatcher.Pick(RPART(kind), GPART(kind), BPART(kind)); blood1 = ColorMatcher.Pick(RPART(kind), GPART(kind), BPART(kind));
blood2 = ColorMatcher.Pick(RPART(kind)/3, GPART(kind)/3, BPART(kind)/3); blood2 = ColorMatcher.Pick(RPART(kind)/3, GPART(kind)/3, BPART(kind)/3);
} }

View file

@ -1435,12 +1435,13 @@ int side_t::GetLightLevel (bool foggy, int baselight) const
{ {
if (!(Flags & WALLF_NOFAKECONTRAST)) if (!(Flags & WALLF_NOFAKECONTRAST))
{ {
if((level.flags & LEVEL_SMOOTHLIGHTING) || (Flags & WALLF_SMOOTHLIGHTING) || r_smoothlighting) if (((level.flags & LEVEL_SMOOTHLIGHTING) || (Flags & WALLF_SMOOTHLIGHTING) || r_smoothlighting) &&
lines[linenum].dx != 0)
{ {
baselight += int // OMG LEE KILLOUGH LIVES! :/ baselight += int // OMG LEE KILLOUGH LIVES! :/
( (
(float(level.WallHorizLight) (float(level.WallHorizLight)
+abs(atan(float(linedef->dy)/float(linedef->dx))/float(1.57079)) +abs(atan(float(lines[linenum].dy)/float(lines[linenum].dx))/float(1.57079))
*float(level.WallVertLight - level.WallHorizLight)) *float(level.WallVertLight - level.WallHorizLight))
); );
} }

View file

@ -1499,7 +1499,8 @@ FSpecialFont::FSpecialFont (const char *name, int first, int count, int *lumplis
double *luminosity; double *luminosity;
int maxyoffs; int maxyoffs;
int TotalColors; int TotalColors;
FTexture *pic;
Name=copystring(name); Name=copystring(name);
Chars = new CharData[count]; Chars = new CharData[count];
charlumps = new int[count]; charlumps = new int[count];
@ -1520,8 +1521,15 @@ FSpecialFont::FSpecialFont (const char *name, int first, int count, int *lumplis
if (lump >= 0) if (lump >= 0)
{ {
Wads.GetLumpName(buffer, lump); Wads.GetLumpName(buffer, lump);
buffer[8]=0; if (buffer[0] != 0)
FTexture *pic = TexMan[buffer]; {
buffer[8]=0;
pic = TexMan[buffer];
}
else
{
pic = NULL;
}
if (pic != NULL) if (pic != NULL)
{ {
int height = pic->GetScaledHeight(); int height = pic->GetScaledHeight();
@ -1623,7 +1631,7 @@ void V_InitCustomFonts()
FScanner sc; FScanner sc;
int lumplist[256]; int lumplist[256];
bool notranslate[256]; bool notranslate[256];
char namebuffer[16], templatebuf[16]; FString namebuffer, templatebuf;
int i; int i;
int llump,lastlump=0; int llump,lastlump=0;
int format; int format;
@ -1638,8 +1646,7 @@ void V_InitCustomFonts()
{ {
memset (lumplist, -1, sizeof(lumplist)); memset (lumplist, -1, sizeof(lumplist));
memset (notranslate, 0, sizeof(notranslate)); memset (notranslate, 0, sizeof(notranslate));
strncpy (namebuffer, sc.String, 15); namebuffer = sc.String;
namebuffer[15] = 0;
format = 0; format = 0;
start = 33; start = 33;
first = 33; first = 33;
@ -1653,8 +1660,7 @@ void V_InitCustomFonts()
{ {
if (format == 2) goto wrong; if (format == 2) goto wrong;
sc.MustGetString(); sc.MustGetString();
strncpy (templatebuf, sc.String, 16); templatebuf = sc.String;
templatebuf[15] = 0;
format = 1; format = 1;
} }
else if (sc.Compare ("BASE")) else if (sc.Compare ("BASE"))