- Fixed a few font related problems.

- Fixed: ASkyViewpoint::Destroy was missing the super call.
- Added SnowKate709's A_LookEx update.
- Moved M_DrawPlayerBackdrop into DCanvas as a virtual function. Since this
  directly accesses the frame buffer it must be overridable for renderers
  that work differently.


SVN r632 (trunk)
This commit is contained in:
Christoph Oelckers 2007-12-23 21:56:46 +00:00
commit 8a433d6f12
11 changed files with 544 additions and 116 deletions

View file

@ -149,7 +149,6 @@ static void M_StartMessage (const char *string, void(*routine)(int), bool input)
static void M_PlayerSetupTicker ();
static void M_PlayerSetupDrawer ();
static void M_RenderPlayerBackdrop ();
static void M_DrawPlayerBackdrop (int x, int y);
static void M_EditPlayerName (int choice);
static void M_ChangePlayerTeam (int choice);
static void M_PlayerNameChanged (FSaveGameNode *dummy);
@ -1677,8 +1676,8 @@ static void M_DrawClassMenu ()
{
FireScreen->Lock ();
M_RenderPlayerBackdrop ();
M_DrawPlayerBackdrop (x, y - 1);
FireScreen->Unlock ();
screen->DrawPlayerBackdrop (FireScreen, FireRemap, x, y - 1);
}
M_DrawFrame (x, y, 72*CleanXfac, 80*CleanYfac-1);
@ -2097,8 +2096,8 @@ static void M_PlayerSetupDrawer ()
{
FireScreen->Lock ();
M_RenderPlayerBackdrop ();
M_DrawPlayerBackdrop (x, y - 1);
FireScreen->Unlock ();
screen->DrawPlayerBackdrop (FireScreen, FireRemap, x, y - 1);
}
M_DrawFrame (x, y, 72*CleanXfac, 80*CleanYfac-1);
@ -2377,47 +2376,6 @@ static void M_RenderPlayerBackdrop ()
z2ang += z2add;
}
static void M_DrawPlayerBackdrop (int x, int y)
{
DCanvas *src = FireScreen;
DCanvas *dest = screen;
BYTE *destline, *srcline;
const int destwidth = src->GetWidth() * CleanXfac / 2;
const int destheight = src->GetHeight() * CleanYfac / 2;
const int desty = y;
const int destx = x;
const fixed_t fracxstep = FRACUNIT*2 / CleanXfac;
const fixed_t fracystep = FRACUNIT*2 / CleanYfac;
fixed_t fracx, fracy = 0;
if (fracxstep == FRACUNIT)
{
for (y = desty; y < desty + destheight; y++, fracy += fracystep)
{
srcline = src->GetBuffer() + (fracy >> FRACBITS) * src->GetPitch();
destline = dest->GetBuffer() + y * dest->GetPitch() + destx;
for (x = 0; x < destwidth; x++)
{
destline[x] = FireRemap[srcline[x]];
}
}
}
else
{
for (y = desty; y < desty + destheight; y++, fracy += fracystep)
{
srcline = src->GetBuffer() + (fracy >> FRACBITS) * src->GetPitch();
destline = dest->GetBuffer() + y * dest->GetPitch() + destx;
for (x = fracx = 0; x < destwidth; x++, fracx += fracxstep)
{
destline[x] = FireRemap[srcline[fracx >> FRACBITS]];
}
}
}
}
static void M_ChangeClass (int choice)
{
if (PlayerClasses.Size () == 1)