mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- Removed S_MarkSoundChannels(), as it caused all non-actor sounds to
have their origins zeroed during collections. - WI_drawLF() now draws the level name at the top of the screen, always. SVN r1296 (trunk)
This commit is contained in:
parent
ed6168ea92
commit
cbe0c57911
6 changed files with 28 additions and 51 deletions
|
@ -1,4 +1,7 @@
|
|||
November 27, 2008
|
||||
- Removed S_MarkSoundChannels(), as it caused all non-actor sounds to
|
||||
have their origins zeroed during collections.
|
||||
- WI_drawLF() now draws the level name at the top of the screen, always.
|
||||
- Fixed: disabling lowerHealthCap didn't affect interpolateHealth.
|
||||
- The co-op summary screen now has a totals row at the bottom (if it fits).
|
||||
- Changed WI_drawPercent() when wi_percents is false so that the total
|
||||
|
|
|
@ -300,7 +300,6 @@ static void MarkRoot()
|
|||
DThinker::MarkRoots();
|
||||
FCanvasTextureInfo::Mark();
|
||||
Mark(DACSThinker::ActiveThinker);
|
||||
S_MarkSoundChannels();
|
||||
// Mark dead bodies.
|
||||
for (i = 0; i < BODYQUESIZE; ++i)
|
||||
{
|
||||
|
|
|
@ -161,7 +161,7 @@ static void HU_DoDrawScores (player_t *player, player_t *sortedplayers[MAXPLAYER
|
|||
unsigned int i;
|
||||
int maxwidth = 0;
|
||||
int numTeams = 0;
|
||||
int x ,y;
|
||||
int x, y;
|
||||
|
||||
if (deathmatch)
|
||||
{
|
||||
|
|
|
@ -664,6 +664,7 @@ static void CalcPosVel(int type, const AActor *actor, const sector_t *sector,
|
|||
break;
|
||||
|
||||
case SOURCE_Actor:
|
||||
assert(actor != NULL);
|
||||
if (actor != NULL)
|
||||
{
|
||||
x = actor->x;
|
||||
|
@ -673,6 +674,7 @@ static void CalcPosVel(int type, const AActor *actor, const sector_t *sector,
|
|||
break;
|
||||
|
||||
case SOURCE_Sector:
|
||||
assert(sector != NULL);
|
||||
if (chanflags & CHAN_AREA)
|
||||
{
|
||||
CalcSectorSoundOrg(sector, channum, &x, &z, &y);
|
||||
|
@ -686,6 +688,7 @@ static void CalcPosVel(int type, const AActor *actor, const sector_t *sector,
|
|||
break;
|
||||
|
||||
case SOURCE_Polyobj:
|
||||
assert(poly != NULL);
|
||||
CalcPolyobjSoundOrg(poly, &x, &z, &y);
|
||||
break;
|
||||
|
||||
|
@ -1436,27 +1439,6 @@ void S_StopSound (const FPolyObj *poly, int channel)
|
|||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// S_MarkSoundChannels
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void S_MarkSoundChannels()
|
||||
{
|
||||
for (FSoundChan *chan = Channels; chan != NULL; chan = chan->NextChan)
|
||||
{
|
||||
if (chan->SourceType == SOURCE_Actor)
|
||||
{
|
||||
GC::Mark(chan->Actor);
|
||||
}
|
||||
else
|
||||
{
|
||||
chan->Actor = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// S_StopAllChannels
|
||||
|
|
|
@ -277,7 +277,6 @@ bool S_CheckSingular (int sound_id);
|
|||
void S_StopSound (AActor *ent, int channel);
|
||||
void S_StopSound (const sector_t *sec, int channel);
|
||||
void S_StopSound (const FPolyObj *poly, int channel);
|
||||
void S_MarkSoundChannels();
|
||||
|
||||
// Stops an origin-less sound from playing from this channel.
|
||||
void S_StopSound (int channel);
|
||||
|
|
|
@ -701,7 +701,7 @@ static int WI_DrawCharPatch (int charcode, int x, int y, EColorRange translation
|
|||
//
|
||||
//====================================================================
|
||||
|
||||
int WI_DrawName(int y, const char *levelname, bool nomove=false)
|
||||
int WI_DrawName(int y, const char *levelname)
|
||||
{
|
||||
int i;
|
||||
size_t l;
|
||||
|
@ -709,28 +709,21 @@ int WI_DrawName(int y, const char *levelname, bool nomove=false)
|
|||
int h = 0;
|
||||
int lumph;
|
||||
|
||||
lumph = BigFont->GetHeight();
|
||||
lumph = BigFont->GetHeight() * CleanYfac;
|
||||
|
||||
p = levelname;
|
||||
l = strlen(p);
|
||||
if (!l) return 0;
|
||||
|
||||
FBrokenLines *lines = V_BreakLines(BigFont, 320, p);
|
||||
FBrokenLines *lines = V_BreakLines(BigFont, screen->GetWidth() / CleanXfac, p);
|
||||
|
||||
if (lines)
|
||||
{
|
||||
for (i = 0; lines[i].Width >= 0; i++)
|
||||
{
|
||||
if (!nomove)
|
||||
{
|
||||
screen->DrawText(BigFont, CR_UNTRANSLATED, 160 - lines[i].Width/2, y+h, lines[i].Text, DTA_Clean, true, TAG_DONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
screen->DrawText(BigFont, CR_UNTRANSLATED, (SCREENWIDTH - lines[i].Width * CleanXfac) / 2, (y+h) * CleanYfac,
|
||||
lines[i].Text, DTA_CleanNoMove, true, TAG_DONE);
|
||||
}
|
||||
h+=lumph;
|
||||
screen->DrawText(BigFont, CR_UNTRANSLATED, (SCREENWIDTH - lines[i].Width * CleanXfac) / 2, y + h,
|
||||
lines[i].Text, DTA_CleanNoMove, true, TAG_DONE);
|
||||
h += lumph;
|
||||
}
|
||||
V_FreeBrokenLines(lines);
|
||||
}
|
||||
|
@ -748,15 +741,16 @@ int WI_DrawName(int y, const char *levelname, bool nomove=false)
|
|||
//====================================================================
|
||||
void WI_drawLF ()
|
||||
{
|
||||
int y = WI_TITLEY;
|
||||
int y = WI_TITLEY * CleanYfac;
|
||||
int midx = screen->GetWidth() / 2;
|
||||
|
||||
FTexture *tex = wbs->LName0;
|
||||
|
||||
// draw <LevelName>
|
||||
if (tex)
|
||||
{
|
||||
screen->DrawTexture(tex, 160-tex->GetWidth()/2, y, DTA_Clean, true, TAG_DONE);
|
||||
y += tex->GetHeight() + BigFont->GetHeight()/4;
|
||||
screen->DrawTexture(tex, midx - tex->GetWidth()*CleanXfac/2, y, DTA_CleanNoMove, true, TAG_DONE);
|
||||
y += tex->GetHeight() + BigFont->GetHeight()*CleanYfac/4;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -770,13 +764,13 @@ void WI_drawLF ()
|
|||
// don't draw 'finished' if the level name is too high!
|
||||
if (gameinfo.gametype & GAME_DoomChex)
|
||||
{
|
||||
screen->DrawTexture(finished, 160 - finished->GetWidth()/2, y, DTA_Clean, true, TAG_DONE);
|
||||
screen->DrawTexture(finished, midx - finished->GetWidth()*CleanXfac/2, y, DTA_CleanNoMove, true, TAG_DONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
screen->DrawText(font, CR_WHITE,
|
||||
160 - font->StringWidth("finished")/2, y-4, "finished",
|
||||
DTA_Clean, true, TAG_DONE);
|
||||
midx - font->StringWidth("finished")/2, y - 4*CleanYfac, "finished",
|
||||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -792,33 +786,33 @@ void WI_drawLF ()
|
|||
//====================================================================
|
||||
void WI_drawEL ()
|
||||
{
|
||||
int y = WI_TITLEY;
|
||||
int y = WI_TITLEY * CleanYfac;
|
||||
FFont *font = gameinfo.gametype & GAME_Raven ? SmallFont : BigFont;
|
||||
|
||||
// draw "entering"
|
||||
// be careful with the added height so that it works for oversized 'entering' patches!
|
||||
if (gameinfo.gametype & GAME_DoomChex)
|
||||
{
|
||||
screen->DrawTexture(entering, (SCREENWIDTH - entering->GetWidth() * CleanXfac) / 2, y * CleanYfac, DTA_CleanNoMove, true, TAG_DONE);
|
||||
y += entering->GetHeight() + font->GetHeight()/4;
|
||||
screen->DrawTexture(entering, (SCREENWIDTH - entering->GetWidth() * CleanXfac) / 2, y, DTA_CleanNoMove, true, TAG_DONE);
|
||||
y += (entering->GetHeight() + font->GetHeight()/4) * CleanYfac;
|
||||
}
|
||||
else
|
||||
{
|
||||
screen->DrawText(font, CR_WHITE,
|
||||
(SCREENWIDTH - font->StringWidth("now entering:") * CleanXfac) / 2, y * CleanYfac,
|
||||
(SCREENWIDTH - font->StringWidth("now entering:") * CleanXfac) / 2, y,
|
||||
"now entering:", DTA_CleanNoMove, true, TAG_DONE);
|
||||
y += font->GetHeight()*5/4;
|
||||
y += font->GetHeight()*5*CleanYfac/4;
|
||||
}
|
||||
|
||||
// draw <LevelName>
|
||||
FTexture * tex = wbs->LName1;
|
||||
FTexture *tex = wbs->LName1;
|
||||
if (tex)
|
||||
{
|
||||
screen->DrawTexture(tex, (SCREENWIDTH - tex->GetWidth() * CleanXfac) / 2, y * CleanYfac, DTA_CleanNoMove, true, TAG_DONE);
|
||||
screen->DrawTexture(tex, (SCREENWIDTH - tex->GetWidth() * CleanXfac) / 2, y, DTA_CleanNoMove, true, TAG_DONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
WI_DrawName(y, lnametexts[1], true);
|
||||
WI_DrawName(y, lnametexts[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue