Esempio n. 1
0
void InitMapInfo()
{
	guard(InitMapInfo);
	for (int Lump = W_IterateNS(-1, WADNS_Global); Lump >= 0;
		Lump = W_IterateNS(Lump, WADNS_Global))
	{
		if (W_LumpName(Lump) == NAME_mapinfo)
		{
			ParseMapInfo(new VScriptParser(*W_LumpName(Lump),
				W_CreateLumpReaderNum(Lump)));
		}
	}
	//	Set up default map info returned for maps that have not defined in
	// MAPINFO
	DefaultMap.Name = "Unnamed";
	DefaultMap.Sky1Texture = GTextureManager.CheckNumForName("sky1",
		TEXTYPE_Wall, true, true);
	DefaultMap.Sky2Texture = DefaultMap.Sky1Texture;
	DefaultMap.FadeTable = NAME_colormap;
	DefaultMap.HorizWallShade = -8;
	DefaultMap.VertWallShade = 8;
	unguard;
}
Esempio n. 2
0
/*
 * This routine tests for a string-replacement for the patch. If one is
 * found, it's used instead of the original graphic. 
 *
 * If the patch is not in an IWAD, it won't be replaced!
 */
void WI_DrawPatch(int x, int y, int lump)
{
	char    def[80], *string;
	const char *name = W_LumpName(lump);

	// "{fontb; r=0.5; g=1; b=0; x=2; y=-2}This is good!"

	strcpy(def, "Patch Replacement|");
	strcat(def, name);

	if(!cfg.usePatchReplacement || !W_IsFromIWAD(lump) ||
	   !Def_Get(DD_DEF_VALUE, def, &string))
	{
		// Replacement string not found, draw the patch.
		GL_DrawPatch(x, y, lump);
		return;
	}

	WI_DrawParamText(x, y, string, hu_font_b, 1, 0, 0, false, false);
}