- 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.
- removed unneeded file dehackedactions.h


SVN r1162 (trunk)
This commit is contained in:
Christoph Oelckers 2008-08-12 09:57:59 +00:00
parent 765ccd0100
commit b1d36182c4
8 changed files with 70 additions and 184 deletions

View File

@ -1,3 +1,9 @@
August 12, 2008 (Changes by Graf Zahl)
- 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.
- removed unneeded file dehackedactions.h
August 11, 2008
- Ported asm_x86_64/tmap3.nas to AT&T syntax so it can be compiled with gas.
After finding out that gas does have directives to describe the .eh_frame

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,10 +534,14 @@ 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];
if (backtex != NULL)
{
int pwidth = backtex->GetWidth() << MAPBITS;
int pheight = backtex->GetHeight() << MAPBITS;
while(mapxstart > 0)
mapxstart -= pwidth;
@ -549,6 +553,7 @@ static void AM_ScrollParchment (fixed_t dmapx, fixed_t dmapy)
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,14 +1051,17 @@ 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();
FTexture *backtex = TexMan[mapback];
if (backtex != NULL)
{
int pwidth = backtex->GetWidth();
int pheight = backtex->GetHeight();
int x, y;
//blit the automap background to the screen.
@ -1078,7 +1069,8 @@ void AM_clearFB (const AMColor &color)
{
for (x = mapxstart >> MAPBITS; x < f_w; x += pwidth)
{
screen->DrawTexture (mapback, x, y, DTA_ClipBottom, f_h, DTA_TopOffset, 0, DTA_LeftOffset, 0, TAG_DONE);
screen->DrawTexture (backtex, x, y, DTA_ClipBottom, f_h, DTA_TopOffset, 0, DTA_LeftOffset, 0, TAG_DONE);
}
}
}
}

View File

@ -1,108 +0,0 @@
// This file is included by d_dehacked.cpp twice.
// The first time is to prototype these functions, and the second
// time is to define them in the CodePtrs list. The macros are
// defined appropriately to get the desired effect each time.
ACTOR(MonsterRail)
WEAPON(FireRailgun)
WEAPON(FireRailgunLeft)
WEAPON(FireRailgunRight)
WEAPON(RailWait)
WEAPON(Light0)
WEAPON(WeaponReady)
WEAPON(Lower)
WEAPON(Raise)
WEAPON(Punch)
WEAPON(ReFire)
WEAPON(FirePistol)
WEAPON(Light1)
WEAPON(FireShotgun)
WEAPON(Light2)
WEAPON(FireShotgun2)
WEAPON(CheckReload)
WEAPON(OpenShotgun2)
WEAPON(LoadShotgun2)
WEAPON(CloseShotgun2)
WEAPON(FireCGun)
WEAPON(GunFlash)
WEAPON(FireMissile)
WEAPON(Saw)
WEAPON(FirePlasma)
WEAPON(BFGsound)
WEAPON(FireBFG)
ACTOR(BFGSpray)
ACTOR(Explode)
ACTOR(Pain)
ACTOR(PlayerScream)
ACTOR(NoBlocking)
ACTOR(XScream)
ACTOR(Look)
ACTOR(Chase)
ACTOR(FaceTarget)
ACTOR(PosAttack)
ACTOR(Scream)
ACTOR(SPosAttack)
ACTOR(VileChase)
ACTOR(VileStart)
ACTOR(VileTarget)
ACTOR(VileAttack)
ACTOR(StartFire)
ACTOR(Fire)
ACTOR(FireCrackle)
ACTOR(Tracer)
ACTOR(SkelWhoosh)
ACTOR(SkelFist)
ACTOR(SkelMissile)
ACTOR(FatRaise)
ACTOR(FatAttack1)
ACTOR(FatAttack2)
ACTOR(FatAttack3)
ACTOR(BossDeath)
ACTOR(CPosAttack)
ACTOR(CPosRefire)
ACTOR(TroopAttack)
ACTOR(SargAttack)
ACTOR(HeadAttack)
ACTOR(BruisAttack)
ACTOR(SkullAttack)
ACTOR(Metal)
ACTOR(SpidRefire)
ACTOR(BabyMetal)
ACTOR(BspiAttack)
ACTOR(Hoof)
ACTOR(CyberAttack)
ACTOR(PainAttack)
ACTOR(PainDie)
ACTOR(KeenDie)
ACTOR(BrainPain)
ACTOR(BrainScream)
ACTOR(BrainDie)
ACTOR(BrainAwake)
ACTOR(BrainSpit)
ACTOR(SpawnSound)
ACTOR(SpawnFly)
ACTOR(BrainExplode)
ACTOR(Die)
ACTOR(Detonate)
ACTOR(Mushroom)
ACTOR(SetFloorClip)
ACTOR(UnSetFloorClip)
ACTOR(HideThing)
ACTOR(UnHideThing)
ACTOR(SetInvulnerable)
ACTOR(UnSetInvulnerable)
ACTOR(SetReflective)
ACTOR(UnSetReflective)
ACTOR(SetReflectiveInvulnerable)
ACTOR(UnSetReflectiveInvulnerable)
ACTOR(SetShootable)
ACTOR(UnSetShootable)
ACTOR(NoGravity)
ACTOR(Gravity)
ACTOR(LowGravity)
#undef WEAPON
#undef ACTOR

View File

@ -123,8 +123,6 @@ void PClass::StaticFreeData (PClass *type)
}
type->FreeStateList ();
if (type->bRuntimeClass)
{
if (type->ActorInfo != NULL)
{
if (type->ActorInfo->OwnedStates != NULL)
@ -145,7 +143,7 @@ void PClass::StaticFreeData (PClass *type)
delete type->ActorInfo;
type->ActorInfo = NULL;
}
if (type->bRuntimeClass != 2)
if (type->bRuntimeClass)
{
delete type;
}
@ -154,11 +152,6 @@ void PClass::StaticFreeData (PClass *type)
type->Symbols.ReleaseSymbols();
}
}
else
{
type->Symbols.ReleaseSymbols();
}
}
void ClassReg::RegisterClass ()
{
@ -315,8 +308,6 @@ void PClass::InitializeActorInfo ()
memset (Defaults, 0, Size);
}
bRuntimeClass = 2; // Class is internal but actor data external
FActorInfo *info = ActorInfo = new FActorInfo;
info->Class = this;
info->GameFilter = GAME_Any;
@ -398,7 +389,7 @@ const PClass *PClass::NativeClass() const
{
const PClass *cls = this;
while (cls && cls->bRuntimeClass == 1)
while (cls && cls->bRuntimeClass)
cls = cls->ParentClass;
return cls;

View File

@ -103,7 +103,7 @@ struct PClass
PClass *HashNext;
FMetaTable Meta;
BYTE *Defaults;
BYTE bRuntimeClass; // class was defined at run-time, not compile-time
bool bRuntimeClass; // class was defined at run-time, not compile-time
unsigned short ClassIndex;
PSymbolTable Symbols;

View File

@ -70,13 +70,15 @@ private:
//==========================================================================
//
//
// This texture type will only be used for the AUTOPAGE lump if no other
// format matches.
//
//==========================================================================
FTexture *AutomapTexture_TryCreate(FileReader &data, int lumpnum)
{
if (data.GetLength() < 320) return NULL;
if (!Wads.CheckLumpName(lumpnum, "AUTOPAGE")) return NULL;
return new FAutomapTexture(lumpnum);
}
@ -89,6 +91,9 @@ FTexture *AutomapTexture_TryCreate(FileReader &data, int lumpnum)
FAutomapTexture::FAutomapTexture (int lumpnum)
: Pixels(NULL), LumpNum(lumpnum)
{
Wads.GetLumpName (Name, lumpnum);
Name[8] = 0;
Width = 320;
Height = WORD(Wads.LumpLength(lumpnum) / 320);
CalcBitSize ();

View File

@ -87,7 +87,7 @@ FTexture * FTexture::CreateTexture (int lumpnum, int usetype)
{ RawPageTexture_TryCreate, TEX_MiscPatch },
{ FlatTexture_TryCreate, TEX_Flat },
{ PatchTexture_TryCreate, TEX_Any },
{ AutomapTexture_TryCreate, TEX_Autopage },
{ AutomapTexture_TryCreate, TEX_MiscPatch },
};
if (lumpnum == -1) return NULL;