mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-23 09:21:35 +00:00
- did some simple picnum replacements in Blood.
This commit is contained in:
parent
330cb9eacb
commit
36c07aaca5
4 changed files with 19 additions and 15 deletions
|
@ -2744,7 +2744,7 @@ static DBloodActor* actDropAmmo(DBloodActor* actor, int nType)
|
|||
auto act2 = actSpawnFloor(actor);
|
||||
const AMMOITEMDATA* pAmmo = &gAmmoItemData[nType - kItemAmmoBase];
|
||||
act2->spr.type = nType;
|
||||
act2->spr.picnum = pAmmo->picnum;
|
||||
act2->spr.setspritetexture(pAmmo->textureID());
|
||||
act2->spr.shade = pAmmo->shade;
|
||||
act2->spr.scale = DVector2(pAmmo->xrepeat * REPEAT_SCALE, pAmmo->yrepeat * REPEAT_SCALE);
|
||||
return act2;
|
||||
|
@ -2760,7 +2760,7 @@ static DBloodActor* actDropWeapon(DBloodActor* actor, int nType)
|
|||
auto act2 = actSpawnFloor(actor);
|
||||
const WEAPONITEMDATA* pWeapon = &gWeaponItemData[nType - kItemWeaponBase];
|
||||
act2->spr.type = nType;
|
||||
act2->spr.picnum = pWeapon->picnum;
|
||||
act2->spr.setspritetexture(pWeapon->textureID());
|
||||
act2->spr.shade = pWeapon->shade;
|
||||
act2->spr.scale = DVector2(pWeapon->xrepeat * REPEAT_SCALE, pWeapon->yrepeat * REPEAT_SCALE);
|
||||
return act2;
|
||||
|
@ -2776,7 +2776,7 @@ static DBloodActor* actDropItem(DBloodActor* actor, int nType)
|
|||
auto act2 = actSpawnFloor(actor);
|
||||
const ITEMDATA* pItem = &gItemData[nType - kItemBase];
|
||||
act2->spr.type = nType;
|
||||
act2->spr.picnum = pItem->picnum;
|
||||
act2->spr.setspritetexture(pItem->textureID());
|
||||
act2->spr.shade = pItem->shade;
|
||||
act2->spr.scale = DVector2(pItem->xrepeat * REPEAT_SCALE, pItem->yrepeat * REPEAT_SCALE);
|
||||
return act2;
|
||||
|
@ -6246,7 +6246,7 @@ DBloodActor* actSpawnThing(sectortype* pSector, const DVector3& pos, int nThingT
|
|||
actor->spr.flags = pThingInfo->flags;
|
||||
if (actor->spr.flags & 2) actor->spr.flags |= 4;
|
||||
actor->spr.cstat |= pThingInfo->cstat;
|
||||
actor->spr.picnum = pThingInfo->picnum;
|
||||
actor->spr.setspritetexture(pThingInfo->textureID());
|
||||
actor->spr.shade = pThingInfo->shade;
|
||||
actor->spr.pal = pThingInfo->pal;
|
||||
if (pThingInfo->xrepeat) actor->spr.scale.X = (pThingInfo->xrepeat * REPEAT_SCALE);
|
||||
|
@ -6463,7 +6463,7 @@ DBloodActor* actFireMissile(DBloodActor* actor, double xyoff, double zoff, DVect
|
|||
spawned->spr.flags = 1;
|
||||
|
||||
spawned->spr.scale = DVector2(pMissileInfo->xrepeat * REPEAT_SCALE, pMissileInfo->yrepeat * REPEAT_SCALE);
|
||||
spawned->spr.picnum = pMissileInfo->picnum;
|
||||
spawned->spr.setspritetexture(pMissileInfo->textureID());
|
||||
spawned->spr.Angles.Yaw = actor->spr.Angles.Yaw + mapangle(pMissileInfo->angleOfs);
|
||||
spawned->vel = dv.Unit() * pMissileInfo->fVelocity();
|
||||
spawned->SetOwner(actor);
|
||||
|
|
|
@ -73,20 +73,21 @@ struct THINGINFO
|
|||
int32_t elastic;
|
||||
int32_t dmgResist;
|
||||
ESpriteFlags cstat;
|
||||
int16_t picnum;
|
||||
int16_t picno;
|
||||
int8_t shade;
|
||||
uint8_t pal;
|
||||
uint8_t xrepeat;
|
||||
uint8_t yrepeat;
|
||||
int dmgControl[kDamageMax]; // damage
|
||||
|
||||
FTextureID textureID() const { return tileGetTextureID(picno); }
|
||||
double fClipdist() const { return clipdist * 0.25; }
|
||||
};
|
||||
|
||||
struct AMMOITEMDATA
|
||||
{
|
||||
int16_t cstat;
|
||||
int16_t picnum;
|
||||
int16_t picno;
|
||||
int8_t shade;
|
||||
uint8_t pal;
|
||||
uint8_t xrepeat;
|
||||
|
@ -94,12 +95,13 @@ struct AMMOITEMDATA
|
|||
int16_t count;
|
||||
uint8_t type;
|
||||
uint8_t weaponType;
|
||||
FTextureID textureID() const { return tileGetTextureID(picno); }
|
||||
};
|
||||
|
||||
struct WEAPONITEMDATA
|
||||
{
|
||||
int16_t cstat;
|
||||
int16_t picnum;
|
||||
int16_t picno;
|
||||
int8_t shade;
|
||||
uint8_t pal;
|
||||
uint8_t xrepeat;
|
||||
|
@ -107,22 +109,24 @@ struct WEAPONITEMDATA
|
|||
int16_t type;
|
||||
int16_t ammoType;
|
||||
int16_t count;
|
||||
FTextureID textureID() const { return tileGetTextureID(picno); }
|
||||
};
|
||||
|
||||
struct ITEMDATA
|
||||
{
|
||||
int16_t cstat;
|
||||
int16_t picnum;
|
||||
int16_t picno;
|
||||
int8_t shade;
|
||||
uint8_t pal;
|
||||
uint8_t xrepeat;
|
||||
uint8_t yrepeat;
|
||||
int16_t packSlot;
|
||||
FTextureID textureID() const { return tileGetTextureID(picno); }
|
||||
};
|
||||
|
||||
struct MissileType
|
||||
{
|
||||
int16_t picnum;
|
||||
int16_t picno;
|
||||
int velocity;
|
||||
int angleOfs;
|
||||
uint8_t xrepeat;
|
||||
|
@ -138,6 +142,7 @@ struct MissileType
|
|||
{
|
||||
return FixedToFloat(velocity);
|
||||
}
|
||||
FTextureID textureID() const { return tileGetTextureID(picno); }
|
||||
};
|
||||
|
||||
struct EXPLOSION
|
||||
|
|
|
@ -331,7 +331,7 @@ static void ThrowThing(DBloodActor* actor, bool impact)
|
|||
DBloodActor* spawned = nullptr;
|
||||
if ((spawned = actFireThing(actor, 0., 0., (dv.Z / 32768.) - zThrow, curWeapon, dist * (2048. / 64800))) == nullptr) return;
|
||||
|
||||
if (pThinkInfo->picnum < 0 && spawned->spr.type != kModernThingThrowableRock) spawned->spr.picnum = 0;
|
||||
if (pThinkInfo->picno < 0 && spawned->spr.type != kModernThingThrowableRock) spawned->spr.picnum = 0;
|
||||
|
||||
spawned->SetOwner(actor);
|
||||
|
||||
|
|
|
@ -270,13 +270,12 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
if (pSector2) pSector = pSector2;
|
||||
pNSprite->sectp = pSector;
|
||||
pNSprite->ownerActor = pTSprite->ownerActor;
|
||||
pNSprite->picnum = pTSprite->picnum;
|
||||
pNSprite->setspritetexture(pTSprite->spritetexture());
|
||||
pNSprite->cstat |= CSTAT_SPRITE_TRANSLUCENT;
|
||||
if (i < 2)
|
||||
pNSprite->cstat |= CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_TRANS_FLIP;
|
||||
pNSprite->shade = ClipLow(pTSprite->shade - 16, -128);
|
||||
pNSprite->scale = pTSprite->scale;
|
||||
pNSprite->picnum = pTSprite->picnum;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -388,7 +387,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
pNSprite->cstat |= CSTAT_SPRITE_TRANSLUCENT;
|
||||
pNSprite->scale.X = pTSprite->scale.X;
|
||||
pNSprite->scale.Y = pTSprite->scale.Y * 0.25;
|
||||
pNSprite->picnum = pTSprite->picnum;
|
||||
pNSprite->setspritetexture(pTSprite->spritetexture());
|
||||
if (!VanillaMode() && (pTSprite->type == kThingDroppedLifeLeech)) // fix shadow for thrown lifeleech
|
||||
pNSprite->picnum = 800;
|
||||
pNSprite->pal = 5;
|
||||
|
@ -550,7 +549,7 @@ void viewProcessSprites(tspriteArray& tsprites, const DVector3& cPos, DAngle cA,
|
|||
pTSprite->scale = DVector2(0, 0);
|
||||
continue;
|
||||
}
|
||||
// skip picnum 0 on face sprites. picnum 0 is a simple wall texture in Blood,
|
||||
// skip tile 0 on face sprites. tile 0 is a simple wall texture in Blood,
|
||||
// but there are maps that use 0 on some operator sprites that may show up in portals as a result.
|
||||
// Since the wall texture is perfectly fine for wall and floor sprites, these will be allowed to pass.
|
||||
if (legacyTileNum(nTex) == 0 && (pTSprite->cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == CSTAT_SPRITE_ALIGNMENT_FACING)
|
||||
|
|
Loading…
Reference in a new issue