mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- fixed compilation (again.)
This commit is contained in:
parent
73683b3ebe
commit
207298aeb4
6 changed files with 30 additions and 30 deletions
|
@ -250,21 +250,3 @@ enum gameaction_t : int
|
|||
ga_fullconsole,
|
||||
};
|
||||
extern gameaction_t gameaction;
|
||||
|
||||
inline void spriteSetSlope(int spritenum, int heinum)
|
||||
{
|
||||
auto spr = &sprite[spritenum];
|
||||
int cstat = spr->cstat & CSTAT_SPRITE_ALIGNMENT_MASK;
|
||||
if (spr->cstat & CSTAT_SPRITE_ALIGNMENT_FLOOR)
|
||||
{
|
||||
spr->xoffset = heinum & 255;
|
||||
spr->yoffset = (heinum >> 8) & 255;
|
||||
spr->cstat = (spr->cstat & ~CSTAT_SPRITE_ALIGNMENT_MASK) | (heinum != 0 ? CSTAT_SPRITE_ALIGNMENT_SLOPE : CSTAT_SPRITE_ALIGNMENT_FLOOR);
|
||||
}
|
||||
}
|
||||
|
||||
inline int spriteGetSlope(int spritenum)
|
||||
{
|
||||
auto spr = &sprite[spritenum];
|
||||
return ((spr->cstat & CSTAT_SPRITE_ALIGNMENT_MASK) != CSTAT_SPRITE_ALIGNMENT_SLOPE)? 0 : uint8_t(spr->xoffset) + (uint8_t(spr->yoffset) << 8);
|
||||
}
|
||||
|
|
|
@ -123,3 +123,21 @@ inline void copyfloorpal(spritetype* spr, const sectortype* sect)
|
|||
{
|
||||
if (!lookups.noFloorPal(sect->floorpal)) spr->pal = sect->floorpal;
|
||||
}
|
||||
|
||||
inline void spriteSetSlope(int spritenum, int heinum)
|
||||
{
|
||||
auto spr = &sprite[spritenum];
|
||||
int cstat = spr->cstat & CSTAT_SPRITE_ALIGNMENT_MASK;
|
||||
if (spr->cstat & CSTAT_SPRITE_ALIGNMENT_FLOOR)
|
||||
{
|
||||
spr->xoffset = heinum & 255;
|
||||
spr->yoffset = (heinum >> 8) & 255;
|
||||
spr->cstat = (spr->cstat & ~CSTAT_SPRITE_ALIGNMENT_MASK) | (heinum != 0 ? CSTAT_SPRITE_ALIGNMENT_SLOPE : CSTAT_SPRITE_ALIGNMENT_FLOOR);
|
||||
}
|
||||
}
|
||||
|
||||
inline int spriteGetSlope(int spritenum)
|
||||
{
|
||||
auto spr = &sprite[spritenum];
|
||||
return ((spr->cstat & CSTAT_SPRITE_ALIGNMENT_MASK) != CSTAT_SPRITE_ALIGNMENT_SLOPE) ? 0 : uint8_t(spr->xoffset) + (uint8_t(spr->yoffset) << 8);
|
||||
}
|
||||
|
|
|
@ -914,7 +914,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
|
|||
if (!pPlayer) return nDamage;
|
||||
if (powerupCheck(pPlayer, kPwUpShadowCloak)) pPlayer->pwUpTime[kPwUpShadowCloak] = 0;
|
||||
if (readyForCrit(pSource, pSprite)) {
|
||||
nDamage += aiDamageSprite(pSprite, pXSprite, pSource->index, nDmgType, nDamage * (10 - gGameOptions.nDifficulty));
|
||||
nDamage += aiDamageSprite(actor, source, nDmgType, nDamage * (10 - gGameOptions.nDifficulty));
|
||||
if (pXSprite->health > 0) {
|
||||
int fullHp = (pXSprite->sysData2 > 0) ? ClipRange(pXSprite->sysData2 << 4, 1, 65535) : getDudeInfo(pSprite->type)->startHealth << 4;
|
||||
if (((100 * pXSprite->health) / fullHp) <= 75) {
|
||||
|
@ -931,9 +931,9 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
|
|||
|
||||
if (pSprite->type == kDudeModernCustomBurning) {
|
||||
|
||||
if (Chance(0x2000) && gDudeExtra[pSprite->extra].time < (int)gFrameClock) {
|
||||
if (Chance(0x2000) && gDudeExtra[pSprite->extra].time < PlayClock) {
|
||||
playGenDudeSound(pSprite, kGenDudeSndBurning);
|
||||
gDudeExtra[pSprite->extra].time = (int)gFrameClock + 360;
|
||||
gDudeExtra[pSprite->extra].time = PlayClock + 360;
|
||||
}
|
||||
|
||||
if (pXSprite->burnTime == 0) pXSprite->burnTime = 2400;
|
||||
|
@ -953,7 +953,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
|
|||
GENDUDEEXTRA* pExtra = genDudeExtra(pSprite);
|
||||
if (nDmgType == DAMAGE_TYPE_1) {
|
||||
|
||||
if (pXSprite->health > pDudeInfo->fleeHealth) return nDamage;
|
||||
if (pXSprite->health > (uint32_t)pDudeInfo->fleeHealth) return nDamage;
|
||||
else if (pXSprite->txID <= 0 || getNextIncarnation(pXSprite) == NULL) {
|
||||
removeDudeStuff(pSprite);
|
||||
|
||||
|
@ -979,7 +979,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
|
|||
|
||||
aiGenDudeNewState(pSprite, &genDudeBurnGoto);
|
||||
actHealDude(pXSprite, dudeInfo[55].startHealth, dudeInfo[55].startHealth);
|
||||
gDudeExtra[pSprite->extra].time = (int)gFrameClock + 360;
|
||||
gDudeExtra[pSprite->extra].time = PlayClock + 360;
|
||||
evKill(nSprite, 3, kCallbackFXFlameLick);
|
||||
|
||||
}
|
||||
|
|
|
@ -1206,7 +1206,7 @@ void debrisBubble(int nSprite) {
|
|||
|
||||
int top, bottom;
|
||||
GetSpriteExtents(pSprite, &top, &bottom);
|
||||
for (int i = 0; i < 1 + Random(5); i++) {
|
||||
for (unsigned i = 0; i < 1 + Random(5); i++) {
|
||||
|
||||
int nDist = (pSprite->xrepeat * (tileWidth(pSprite->picnum) >> 1)) >> 2;
|
||||
int nAngle = Random(2048);
|
||||
|
|
|
@ -394,4 +394,3 @@ int sectorInMotion(int nSector);
|
|||
////////////////////////////////////////////////////////////////////////////////////
|
||||
END_BLD_NS
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1893,6 +1893,7 @@ int playerDamageSprite(DBloodActor* source, PLAYER *pPlayer, DAMAGE_TYPE nDamage
|
|||
|
||||
spritetype *pSprite = pPlayer->pSprite;
|
||||
XSPRITE *pXSprite = pPlayer->pXSprite;
|
||||
auto pActor = &bloodActors[pSprite->index];
|
||||
int nXSprite = pSprite->extra;
|
||||
int nXSector = sector[pSprite->sectnum].extra;
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -2022,9 +2023,9 @@ int playerDamageSprite(DBloodActor* source, PLAYER *pPlayer, DAMAGE_TYPE nDamage
|
|||
// allow drop items and keys in multiplayer
|
||||
if (gModernMap && gGameOptions.nGameType != 0 && pPlayer->pXSprite->health <= 0) {
|
||||
|
||||
spritetype* pItem = NULL;
|
||||
if (pPlayer->pXSprite->dropMsg && (pItem = actDropItem(pPlayer->pSprite, pPlayer->pXSprite->dropMsg)) != NULL)
|
||||
evPost(pItem->index, OBJ_SPRITE, 500, kCallbackRemove);
|
||||
DBloodActor* pItem = nullptr;
|
||||
if (pPlayer->pXSprite->dropMsg && (pItem = actDropItem(pActor, pPlayer->pXSprite->dropMsg)) != NULL)
|
||||
evPost(pItem, 500, kCallbackRemove);
|
||||
|
||||
if (pPlayer->pXSprite->key) {
|
||||
|
||||
|
@ -2034,8 +2035,8 @@ int playerDamageSprite(DBloodActor* source, PLAYER *pPlayer, DAMAGE_TYPE nDamage
|
|||
break;
|
||||
}
|
||||
|
||||
if (i == 0 && (pItem = actDropKey(pPlayer->pSprite, (pPlayer->pXSprite->key + kItemKeyBase) - 1)) != NULL)
|
||||
evPost(pItem->index, OBJ_SPRITE, 500, kCallbackRemove);
|
||||
if (i == 0 && (pItem = actDropKey(pActor, (pPlayer->pXSprite->key + kItemKeyBase) - 1)) != NULL)
|
||||
evPost(pItem, 500, kCallbackRemove);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue