Update to ZDoom r1165:

- Fixed: The chat sound for Strife was misnamed in the gameinfo structure.
- fixed a few DECORATE bugs.
- Changed the action function declaration parser so that optional parameters
  can be given a default value. The 'optional' keyword is no longer needed
  and was removed, as well as 'evalnot'.
- Restructured the action function interface to remove the dependence on
  the global CallingState variable.
- Changed handling of AUTOPAGE texture so that it is properly inserted into
  the texture manager even if it is from Raven's IWADs.
- Removed code related to internal ActorInfo definitions from dobjtype.cpp.

git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@156 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
Christoph Oelckers 2008-08-12 23:22:08 +00:00
parent 078314ac80
commit cd15b90021
52 changed files with 1613 additions and 1600 deletions

View file

@ -337,7 +337,7 @@ static int markpointnum = 0; // next point to be assigned
static int followplayer = 1; // specifies whether to follow the player around
static FTexture *mapback; // the automap background
static FTextureID mapback; // the automap background
static fixed_t mapystart=0; // y-value for the start of the map bitmap...used in the parallax stuff.
static fixed_t mapxstart=0; //x-value for the bitmap.
@ -534,19 +534,24 @@ static void AM_ScrollParchment (fixed_t dmapx, fixed_t dmapy)
mapxstart -= MulScale12 (dmapx, scale_mtof);
mapystart -= MulScale12 (dmapy, scale_mtof);
if (mapback != NULL)
if (mapback.isValid())
{
int pwidth = mapback->GetWidth() << MAPBITS;
int pheight = mapback->GetHeight() << MAPBITS;
FTexture *backtex = TexMan[mapback];
while(mapxstart > 0)
mapxstart -= pwidth;
while(mapxstart <= -pwidth)
mapxstart += pwidth;
while(mapystart > 0)
mapystart -= pheight;
while(mapystart <= -pheight)
mapystart += pheight;
if (backtex != NULL)
{
int pwidth = backtex->GetWidth() << MAPBITS;
int pheight = backtex->GetHeight() << MAPBITS;
while(mapxstart > 0)
mapxstart -= pwidth;
while(mapxstart <= -pwidth)
mapxstart += pwidth;
while(mapystart > 0)
mapystart -= pheight;
while(mapystart <= -pheight)
mapystart += pheight;
}
}
}
@ -737,23 +742,7 @@ void AM_loadPics ()
marknums[i] = TexMan.CheckForTexture (namebuf, FTexture::TEX_MiscPatch);
}
if (mapback == NULL)
{
i = Wads.CheckNumForName ("AUTOPAGE");
if (i >= 0)
{
mapback = FTexture::CreateTexture(i, FTexture::TEX_Autopage);
}
}
}
void AM_unloadPics ()
{
if (mapback != NULL)
{
delete mapback;
mapback = NULL;
}
mapback = TexMan.CheckForTexture("AUTOPAGE", FTexture::TEX_MiscPatch);
}
bool AM_clearMarks ()
@ -788,7 +777,6 @@ void AM_LevelInit ()
//
void AM_Stop ()
{
AM_unloadPics ();
automapactive = false;
stopped = true;
BorderNeedRefresh = screen->GetPageCount ();
@ -1063,22 +1051,26 @@ void AM_Ticker ()
//
void AM_clearFB (const AMColor &color)
{
if (mapback == NULL || !am_drawmapback)
if (!mapback.isValid() || !am_drawmapback)
{
screen->Clear (0, 0, f_w, f_h, color.Index, color.RGB);
}
else
{
int pwidth = mapback->GetWidth();
int pheight = mapback->GetHeight();
int x, y;
//blit the automap background to the screen.
for (y = mapystart >> MAPBITS; y < f_h; y += pheight)
FTexture *backtex = TexMan[mapback];
if (backtex != NULL)
{
for (x = mapxstart >> MAPBITS; x < f_w; x += pwidth)
int pwidth = backtex->GetWidth();
int pheight = backtex->GetHeight();
int x, y;
//blit the automap background to the screen.
for (y = mapystart >> MAPBITS; y < f_h; y += pheight)
{
screen->DrawTexture (mapback, x, y, DTA_ClipBottom, f_h, DTA_TopOffset, 0, DTA_LeftOffset, 0, TAG_DONE);
for (x = mapxstart >> MAPBITS; x < f_w; x += pwidth)
{
screen->DrawTexture (backtex, x, y, DTA_ClipBottom, f_h, DTA_TopOffset, 0, DTA_LeftOffset, 0, TAG_DONE);
}
}
}
}