- Fixed: The sky scrolling calculations caused an integer multiplication overflow.
- Fixed: Voodoo dolls should not start ENTER scripts. - Fixed: ActorDamage must not parse the enclosing parentheses as part of the expression. That will produce an error if a flag set or clear command immediately follows. - Fixed: P_DamageMobj ignored MF2_NODMGTHRUST if the damaging object had no owner. - Added a 'font' parameter to A_Print. - Changed A_CustomMeleeAttack to take one damage parameter only. Since expressions can be used this value is not used as a factor for a random value but as a direct damage value instead. - Fixed: AActor::SetState must check whether a called action function resulted in the actor's destruction. A_Jump constructs to a 0-length terminating state will hang if this isn't checked. SVN r329 (trunk)
This commit is contained in:
parent
b951721c1b
commit
782b8a3b92
12 changed files with 93 additions and 79 deletions
|
|
@ -164,6 +164,39 @@ static TArray<TranslationMap> TranslationLookup;
|
|||
|
||||
// CODE --------------------------------------------------------------------
|
||||
|
||||
FFont * V_GetFont(const char *name)
|
||||
{
|
||||
FFont *font = FFont::FindFont (name);
|
||||
if (font == NULL)
|
||||
{
|
||||
int lump = Wads.CheckNumForName (name);
|
||||
if (lump != -1)
|
||||
{
|
||||
char head[3];
|
||||
{
|
||||
FWadLump lumpy = Wads.OpenLumpNum (lump);
|
||||
lumpy.Read (head, 3);
|
||||
}
|
||||
if (head[0] == 'F' && head[1] == 'O' && head[2] == 'N')
|
||||
{
|
||||
font = new FSingleLumpFont (name, lump);
|
||||
}
|
||||
}
|
||||
if (font == NULL)
|
||||
{
|
||||
int picnum = TexMan.CheckForTexture (name, FTexture::TEX_Any);
|
||||
if (picnum <= 0)
|
||||
{
|
||||
picnum = TexMan.AddPatch (name);
|
||||
}
|
||||
if (picnum > 0)
|
||||
{
|
||||
font = new FSingleLumpFont (name, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return font;
|
||||
}
|
||||
//==========================================================================
|
||||
//
|
||||
// SerializeFFontPtr
|
||||
|
|
@ -181,39 +214,11 @@ FArchive &SerializeFFontPtr (FArchive &arc, FFont* &font)
|
|||
char *name = NULL;
|
||||
|
||||
arc << name;
|
||||
font = FFont::FindFont (name);
|
||||
font = V_GetFont(name);
|
||||
if (font == NULL)
|
||||
{
|
||||
int lump = Wads.CheckNumForName (name);
|
||||
if (lump != -1)
|
||||
{
|
||||
char head[3];
|
||||
{
|
||||
FWadLump lumpy = Wads.OpenLumpNum (lump);
|
||||
lumpy.Read (head, 3);
|
||||
}
|
||||
if (head[0] == 'F' && head[1] == 'O' && head[2] == 'N')
|
||||
{
|
||||
font = new FSingleLumpFont (name, lump);
|
||||
}
|
||||
}
|
||||
if (font == NULL)
|
||||
{
|
||||
int picnum = TexMan.CheckForTexture (name, FTexture::TEX_Any);
|
||||
if (picnum <= 0)
|
||||
{
|
||||
picnum = TexMan.AddPatch (name);
|
||||
}
|
||||
if (picnum > 0)
|
||||
{
|
||||
font = new FSingleLumpFont (name, -1);
|
||||
}
|
||||
}
|
||||
if (font == NULL)
|
||||
{
|
||||
Printf ("Could not load font %s\n", name);
|
||||
font = SmallFont;
|
||||
}
|
||||
Printf ("Could not load font %s\n", name);
|
||||
font = SmallFont;
|
||||
}
|
||||
delete[] name;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue