mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-04 11:10:48 +00:00
* Updated to ZDoom r3468:
- Fixed: Trying to init FMOD with profiling enabled when the network socket was in use would fail. We now fallback to no profiling when this happens. - Fixed: Bots did not process KEYCONF weapons. As far as I know, this is only relevant for the owned-weapons display on the status bar. - Fixed: Deus Vult II uses fullscreen level name patches (which are mostly blank) for the intermission. This caused the net scoreboard to be drawn off the bottom of the screen. - Added A_ClearLastHeard action function. - Similar fix to the previous: The child TiMidity++ process quitting would not necessarily be detected, so S_ChangeMusic() would not restart one-shot songs that had finished if it was the MIDI device. - Fixed: S_ChangeMusic() would not necessarily restart non-looping songs that had finished playing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1321 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
28d6eca585
commit
51fa45e167
13 changed files with 117 additions and 16 deletions
|
@ -719,6 +719,41 @@ static int WI_DrawCharPatch (FFont *font, int charcode, int x, int y, EColorRang
|
|||
return x - width;
|
||||
}
|
||||
|
||||
//====================================================================
|
||||
//
|
||||
// CheckRealHeight
|
||||
//
|
||||
// Checks the posts in a texture and returns the lowest row (plus one)
|
||||
// of the texture that is actually used.
|
||||
//
|
||||
//====================================================================
|
||||
|
||||
int CheckRealHeight(FTexture *tex)
|
||||
{
|
||||
const FTexture::Span *span;
|
||||
int maxy = 0, miny = tex->GetHeight();
|
||||
|
||||
for (int i = 0; i < tex->GetWidth(); ++i)
|
||||
{
|
||||
tex->GetColumn(i, &span);
|
||||
while (span->Length != 0)
|
||||
{
|
||||
if (span->TopOffset < miny)
|
||||
{
|
||||
miny = span->TopOffset;
|
||||
}
|
||||
if (span->TopOffset + span->Length > maxy)
|
||||
{
|
||||
maxy = span->TopOffset + span->Length;
|
||||
}
|
||||
span++;
|
||||
}
|
||||
}
|
||||
// Scale maxy before returning it
|
||||
maxy = (maxy << 17) / tex->yScale;
|
||||
maxy = (maxy >> 1) + (maxy & 1);
|
||||
return maxy;
|
||||
}
|
||||
|
||||
//====================================================================
|
||||
//
|
||||
|
@ -735,7 +770,13 @@ int WI_DrawName(int y, FTexture *tex, const char *levelname)
|
|||
if (tex)
|
||||
{
|
||||
screen->DrawTexture(tex, (screen->GetWidth() - tex->GetScaledWidth()*CleanXfac) /2, y, DTA_CleanNoMove, true, TAG_DONE);
|
||||
return y + (tex->GetScaledHeight() + BigFont->GetHeight()/4) * CleanYfac;
|
||||
int h = tex->GetScaledHeight();
|
||||
if (h > 50)
|
||||
{ // Fix for Deus Vult II and similar wads that decide to make these hugely tall
|
||||
// patches with vast amounts of empty space at the bottom.
|
||||
h = CheckRealHeight(tex);
|
||||
}
|
||||
return y + (h + BigFont->GetHeight()/4) * CleanYfac;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue