mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-22 17:01:08 +00:00
- got rid of some 'picnum's that don't reference spritetype.
This commit is contained in:
parent
5999cb8218
commit
de6b5fec7b
9 changed files with 9 additions and 22 deletions
|
@ -256,7 +256,7 @@ void FActorInfo::ResolveTextures(const char* clsname, DCoreActor* defaults)
|
|||
if (SpriteSet.Size() > 0)
|
||||
{
|
||||
if (defaults->spritesetindex < 0 || defaults->spritesetindex >= (int)SpriteSet.Size()) defaults->spritesetindex = 0;
|
||||
defaults->spr.setspritetexture(SpriteSet[defaults->spritesetindex]); // Unless picnum is specified it will be set to the given image of the sprite set.
|
||||
defaults->spr.setspritetexture(SpriteSet[defaults->spritesetindex]);
|
||||
}
|
||||
SpriteSetNames.Reset();
|
||||
}
|
||||
|
|
|
@ -1322,7 +1322,7 @@ tspritetype* renderAddTsprite(tspriteArray& tsprites, DCoreActor* actor)
|
|||
|
||||
tspr->pos = actor->spr.pos;
|
||||
tspr->cstat = actor->spr.cstat;
|
||||
tspr->picnum = actor->spr.picnum;
|
||||
tspr->setspritetexture(actor->spr.spritetexture());
|
||||
tspr->shade = actor->spr.shade;
|
||||
tspr->pal = actor->spr.pal;
|
||||
tspr->clipdist = 0;
|
||||
|
|
|
@ -50,17 +50,6 @@ inline static double getavel(int snum)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
inline static void hud_drawpal(double x, double y, int tilenum, int shade, int orientation, int p, DAngle angle)
|
||||
{
|
||||
hud_drawsprite(x, y, 65536, angle.Degrees(), tilenum, shade, p, orientation);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
inline static void hud_drawpal(double x, double y, const char* tilenum, int shade, int orientation, int p, DAngle angle)
|
||||
{
|
||||
hud_drawsprite(x, y, 1., angle.Degrees(), TexMan.CheckForTexture(tilenum, ETextureType::Any), shade, p, orientation);
|
||||
|
|
|
@ -463,13 +463,13 @@ class AltHud ui
|
|||
{
|
||||
double trans = weapon == currentstats.weaponselect? 0.85 : 0.4;
|
||||
|
||||
TextureID picnum = TexMan.CheckForTexture(currentstats.weaponicons[weapon]);
|
||||
TextureID texid = TexMan.CheckForTexture(currentstats.weaponicons[weapon]);
|
||||
|
||||
if (picnum.isValid())
|
||||
if (texid.isValid())
|
||||
{
|
||||
// don't draw tall sprites too small.
|
||||
int w, h;
|
||||
[w, h] = TexMan.GetSize(picnum);
|
||||
[w, h] = TexMan.GetSize(texid);
|
||||
int rh;
|
||||
if (w > h) rh = 8;
|
||||
else
|
||||
|
@ -477,7 +477,7 @@ class AltHud ui
|
|||
rh = 16;
|
||||
y -= 8;
|
||||
}
|
||||
DrawImageToBox(picnum, x-24, y, 20, rh, trans);
|
||||
DrawImageToBox(texid, x-24, y, 20, rh, trans);
|
||||
y-=10;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ class CoreActor native
|
|||
native sectortype sector; // cannot be read-only, some code calls clipmove directly on this.
|
||||
|
||||
native int16 cstat;
|
||||
//native int16 picnum; // access is disabled to allow later refactoring.
|
||||
native Vector3 pos;
|
||||
native Vector3 opos;
|
||||
native readonly int16 statnum;
|
||||
|
|
|
@ -83,7 +83,7 @@ class DukeScrap : DukeActor
|
|||
{
|
||||
if (self.spriteextra == Scrap1 && self.yint > 0)
|
||||
{
|
||||
tspr.setWeaponOrAmmoSprite(self.yint - 1); // needed so that we don't have to export 'picnum' to scripting.
|
||||
tspr.setWeaponOrAmmoSprite(self.yint - 1); // needed so that we don't have to export 'pic num' to scripting.
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -331,7 +331,7 @@ class DukeActor : CoreActor native
|
|||
native bool CheckAnyActorSoundPlaying();
|
||||
native void StopSound(Sound snd, int flags = 0);
|
||||
native DukeActor spawn(class<DukeActor> type);
|
||||
native DukeActor spawnsprite(int type); // for cases where the map has a picnum stored. Avoid when possible.
|
||||
native DukeActor spawnsprite(int type); // for cases where the map has a tilenum stored. Avoid when possible.
|
||||
native void lotsofglass(int count, walltype wal = null);
|
||||
native void lotsofcolourglass(int count, walltype wal = null);
|
||||
native void makeitfall();
|
||||
|
|
|
@ -27,7 +27,7 @@ class LevelCompatibility : LevelPostProcessor
|
|||
break;
|
||||
|
||||
case 'd7bf49213531cd2607e0459b950ac454': // RR E2L7.map
|
||||
// need to add a sprite with picnum 11 (RRJAILDOOR) lotag = 48, hitag = 32, sector = 534
|
||||
// need to add a sprite with texture (RRJAILDOOR) lotag = 48, hitag = 32, sector = 534
|
||||
// see premap_r.cpp, line 477.
|
||||
break;
|
||||
|
||||
|
|
|
@ -319,7 +319,6 @@ struct tspritetype native
|
|||
native double angle;
|
||||
native sectortype sector;
|
||||
native int16 cstat;
|
||||
//native int16 picnum;
|
||||
native int16 statnum;
|
||||
//native int16 ang;
|
||||
/* these are not needed for tsprites
|
||||
|
|
Loading…
Reference in a new issue