mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 10:32:27 +00:00
- manual repeats in Blood.
This commit is contained in:
parent
2589e7030c
commit
adb3cb888e
5 changed files with 25 additions and 28 deletions
|
@ -307,8 +307,9 @@ static void ReadSpriteV7(FileReader& fr, spritetype& spr, int& secno)
|
|||
spr.pal = fr.ReadUInt8();
|
||||
spr.clipdist = fr.ReadUInt8();
|
||||
spr.blend = fr.ReadUInt8();
|
||||
spr.xrepeat = fr.ReadUInt8();
|
||||
spr.yrepeat = fr.ReadUInt8();
|
||||
x = fr.ReadUInt8();
|
||||
y = fr.ReadUInt8();
|
||||
spr.SetScale(x * REPEAT_SCALE, y * REPEAT_SCALE);
|
||||
spr.xoffset = fr.ReadInt8();
|
||||
spr.yoffset = fr.ReadInt8();
|
||||
secno = fr.ReadInt16();
|
||||
|
@ -335,8 +336,9 @@ static void ReadSpriteV6(FileReader& fr, spritetype& spr, int& secno)
|
|||
spr.shade = fr.ReadInt8();
|
||||
spr.pal = fr.ReadUInt8();
|
||||
spr.clipdist = fr.ReadUInt8();
|
||||
spr.xrepeat = fr.ReadUInt8();
|
||||
spr.yrepeat = fr.ReadUInt8();
|
||||
x = fr.ReadUInt8();
|
||||
y = fr.ReadUInt8();
|
||||
spr.SetScale(x * REPEAT_SCALE, y * REPEAT_SCALE);
|
||||
spr.xoffset = fr.ReadInt8();
|
||||
spr.yoffset = fr.ReadInt8();
|
||||
spr.picnum = fr.ReadInt16();
|
||||
|
@ -365,8 +367,9 @@ static void ReadSpriteV5(FileReader& fr, spritetype& spr, int& secno)
|
|||
spr.SetMapPos(x, y, z);
|
||||
spr.cstat = ESpriteFlags::FromInt(fr.ReadUInt16());
|
||||
spr.shade = fr.ReadInt8();
|
||||
spr.xrepeat = fr.ReadUInt8();
|
||||
spr.yrepeat = fr.ReadUInt8();
|
||||
x = fr.ReadUInt8();
|
||||
y = fr.ReadUInt8();
|
||||
spr.SetScale(x * REPEAT_SCALE, y * REPEAT_SCALE);
|
||||
spr.picnum = fr.ReadInt16();
|
||||
spr.intangle = fr.ReadInt16();
|
||||
spr.angle = mapangle(spr.intangle);
|
||||
|
|
|
@ -2746,8 +2746,7 @@ static DBloodActor* actDropAmmo(DBloodActor* actor, int nType)
|
|||
act2->spr.type = nType;
|
||||
act2->spr.picnum = pAmmo->picnum;
|
||||
act2->spr.shade = pAmmo->shade;
|
||||
act2->spr.xrepeat = pAmmo->xrepeat;
|
||||
act2->spr.yrepeat = pAmmo->yrepeat;
|
||||
act2->spr.SetScale(pAmmo->xrepeat * REPEAT_SCALE, pAmmo->yrepeat * REPEAT_SCALE);
|
||||
return act2;
|
||||
}
|
||||
return nullptr;
|
||||
|
@ -2763,8 +2762,7 @@ static DBloodActor* actDropWeapon(DBloodActor* actor, int nType)
|
|||
act2->spr.type = nType;
|
||||
act2->spr.picnum = pWeapon->picnum;
|
||||
act2->spr.shade = pWeapon->shade;
|
||||
act2->spr.xrepeat = pWeapon->xrepeat;
|
||||
act2->spr.yrepeat = pWeapon->yrepeat;
|
||||
act2->spr.SetScale(pWeapon->xrepeat * REPEAT_SCALE, pWeapon->yrepeat * REPEAT_SCALE);
|
||||
return act2;
|
||||
}
|
||||
return nullptr;
|
||||
|
@ -2780,8 +2778,7 @@ static DBloodActor* actDropItem(DBloodActor* actor, int nType)
|
|||
act2->spr.type = nType;
|
||||
act2->spr.picnum = pItem->picnum;
|
||||
act2->spr.shade = pItem->shade;
|
||||
act2->spr.xrepeat = pItem->xrepeat;
|
||||
act2->spr.yrepeat = pItem->yrepeat;
|
||||
act2->spr.SetScale(pItem->xrepeat * REPEAT_SCALE, pItem->yrepeat * REPEAT_SCALE);
|
||||
return act2;
|
||||
}
|
||||
return nullptr;
|
||||
|
@ -5454,7 +5451,7 @@ void actExplodeSprite(DBloodActor* actor)
|
|||
}
|
||||
actor->ZeroVelocity();
|
||||
actPostSprite(actor, kStatExplosion);
|
||||
actor->spr.xrepeat = actor->spr.yrepeat = explodeInfo[nType].repeat;
|
||||
actor->spr.SetScale(explodeInfo[nType].repeat * REPEAT_SCALE, explodeInfo[nType].repeat* REPEAT_SCALE);
|
||||
|
||||
actor->spr.flags &= ~3;
|
||||
actor->spr.type = nType;
|
||||
|
@ -6467,8 +6464,8 @@ DBloodActor* actFireMissile(DBloodActor* actor, double xyoff, double zoff, DVect
|
|||
spawned->spr.pal = 0;
|
||||
spawned->clipdist = pMissileInfo->fClipDist();
|
||||
spawned->spr.flags = 1;
|
||||
spawned->spr.xrepeat = pMissileInfo->xrepeat;
|
||||
spawned->spr.yrepeat = pMissileInfo->yrepeat;
|
||||
|
||||
spawned->spr.SetScale(pMissileInfo->xrepeat * REPEAT_SCALE, pMissileInfo->yrepeat * REPEAT_SCALE);
|
||||
spawned->spr.picnum = pMissileInfo->picnum;
|
||||
spawned->spr.angle = actor->spr.angle += mapangle(pMissileInfo->angleOfs);
|
||||
spawned->vel = dv * pMissileInfo->fVelocity();
|
||||
|
|
|
@ -1838,7 +1838,7 @@ bool doExplosion(DBloodActor* actor, int nType)
|
|||
actExplosion->SetOwner(actor);
|
||||
actExplosion->spr.shade = -127;
|
||||
|
||||
actExplosion->spr.yrepeat = actExplosion->spr.xrepeat = pExpl->repeat;
|
||||
actExplosion->spr.SetScale(pExpl->repeat * REPEAT_SCALE, pExpl->repeat * REPEAT_SCALE);
|
||||
|
||||
actExplosion->xspr.data1 = pExpl->ticks;
|
||||
actExplosion->xspr.data2 = pExpl->quakeEffect;
|
||||
|
|
|
@ -45,6 +45,9 @@ BEGIN_BLD_NS
|
|||
static DAngle gCameraAng;
|
||||
DAngle random_angles[16][3];
|
||||
|
||||
// to allow quick replacement later
|
||||
#define COPY_SCALE pNSprite->xrepeat = pTSprite->xrepeat; pNSprite->yrepeat = pTSprite->yrepeat;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
|
@ -194,8 +197,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
pNSprite->pos.Z = pTSprite->pos.Z;
|
||||
pNSprite->cstat |= CSTAT_SPRITE_TRANSLUCENT;
|
||||
pNSprite->shade = -128;
|
||||
pNSprite->xrepeat = pTSprite->xrepeat;
|
||||
pNSprite->yrepeat = pTSprite->yrepeat;
|
||||
COPY_SCALE;
|
||||
pNSprite->picnum = 2135;
|
||||
break;
|
||||
}
|
||||
|
@ -272,8 +274,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
if (i < 2)
|
||||
pNSprite->cstat |= CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_TRANS_FLIP;
|
||||
pNSprite->shade = ClipLow(pTSprite->shade - 16, -128);
|
||||
pNSprite->xrepeat = pTSprite->xrepeat;
|
||||
pNSprite->yrepeat = pTSprite->yrepeat;
|
||||
COPY_SCALE;
|
||||
pNSprite->picnum = pTSprite->picnum;
|
||||
}
|
||||
break;
|
||||
|
@ -307,8 +308,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
pNSprite->picnum = 754;
|
||||
pNSprite->cstat |= CSTAT_SPRITE_TRANSLUCENT;
|
||||
pNSprite->shade = 8;
|
||||
pNSprite->xrepeat = pTSprite->xrepeat;
|
||||
pNSprite->yrepeat = pTSprite->yrepeat;
|
||||
COPY_SCALE;
|
||||
break;
|
||||
}
|
||||
case kViewEffectSmokeLow:
|
||||
|
@ -326,8 +326,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
pNSprite->picnum = 754;
|
||||
pNSprite->cstat |= CSTAT_SPRITE_TRANSLUCENT;
|
||||
pNSprite->shade = 8;
|
||||
pNSprite->xrepeat = pTSprite->xrepeat;
|
||||
pNSprite->yrepeat = pTSprite->yrepeat;
|
||||
COPY_SCALE;
|
||||
break;
|
||||
}
|
||||
case kViewEffectTorchHigh:
|
||||
|
@ -407,8 +406,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
pNSprite->pal = 2;
|
||||
pNSprite->cstat |= CSTAT_SPRITE_TRANSLUCENT;
|
||||
pNSprite->pos.Z = pTSprite->pos.Z;
|
||||
pNSprite->xrepeat = pTSprite->xrepeat;
|
||||
pNSprite->yrepeat = pTSprite->yrepeat;
|
||||
COPY_SCALE;
|
||||
pNSprite->picnum = 2427;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -485,8 +485,7 @@ void dbLoadMap(const char* pPath, DVector3& pos, short* pAngle, sectortype** cur
|
|||
pSprite->extra = LittleShort(load.extra);
|
||||
pSprite->pal = load.pal;
|
||||
pSprite->clipdist = load.clipdist;
|
||||
pSprite->xrepeat = load.xrepeat;
|
||||
pSprite->yrepeat = load.yrepeat;
|
||||
pSprite->SetScale(load.xrepeat * REPEAT_SCALE, load.yrepeat * REPEAT_SCALE);
|
||||
pSprite->xoffset = load.xoffset;
|
||||
pSprite->yoffset = load.yoffset;
|
||||
pSprite->detail = load.detail;
|
||||
|
|
Loading…
Reference in a new issue