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