- deal with most of PLAYER::pSprite.

This commit is contained in:
Christoph Oelckers 2021-12-23 10:44:36 +01:00
parent f59af2cc2d
commit 648537a96b
4 changed files with 55 additions and 61 deletions

View file

@ -1243,9 +1243,9 @@ void nnExtProcessSuperSprites()
if (!pPlayer || !pPlayer->actor->hasX() || pPlayer->pXSprite->health <= 0) if (!pPlayer || !pPlayer->actor->hasX() || pPlayer->pXSprite->health <= 0)
continue; continue;
spritetype* pPlaySprite = pPlayer->pSprite; auto plActor = pPlayer->actor;
GetSpriteExtents(pPlaySprite, &ztop2, &zbot2); GetActorExtents(plActor, &ztop2, &zbot2);
if (cansee(x, y, z, pSightSect, pPlaySprite->pos.X, pPlaySprite->pos.Y, ztop2, pPlaySprite->sector())) if (cansee(x, y, z, pSightSect, plActor->spr.pos.X, plActor->spr.pos.Y, ztop2, plActor->spr.sector()))
{ {
if (pXSightSpr->Sight) if (pXSightSpr->Sight)
{ {
@ -8205,14 +8205,14 @@ DBloodActor* aiPatrolSearchTargets(DBloodActor* actor)
pPlayer = &gPlayer[i]; pPlayer = &gPlayer[i];
if (!pPlayer->actor->hasX()) continue; if (!pPlayer->actor->hasX()) continue;
spritetype* pSpr = pPlayer->pSprite; auto plActor = pPlayer->actor;
XSPRITE* pXSpr = &pPlayer->actor->x(); XSPRITE* pXSpr = &pPlayer->actor->x();
if (pXSpr->health <= 0) if (pXSpr->health <= 0)
continue; continue;
newtarget = nullptr; newtarget = nullptr;
seeChance = hearChance = 0x0000; seeChance = hearChance = 0x0000;
x = pSpr->pos.X, y = pSpr->pos.Y, z = pSpr->pos.Z, dx = x - actor->spr.pos.X, dy = y - actor->spr.pos.Y; nDist = approxDist(dx, dy); x = plActor->spr.pos.X, y = plActor->spr.pos.Y, z = plActor->spr.pos.Z, dx = x - actor->spr.pos.X, dy = y - actor->spr.pos.Y; nDist = approxDist(dx, dy);
seeDist = (stealth) ? pDudeInfo->seeDist / 3 : pDudeInfo->seeDist >> 1; seeDist = (stealth) ? pDudeInfo->seeDist / 3 : pDudeInfo->seeDist >> 1;
hearDist = pDudeInfo->hearDist; feelDist = hearDist >> 1; hearDist = pDudeInfo->hearDist; feelDist = hearDist >> 1;
@ -8223,7 +8223,7 @@ DBloodActor* aiPatrolSearchTargets(DBloodActor* actor)
{ {
eyeAboveZ = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2; eyeAboveZ = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
if (nDist < seeDist >> 3) GetActorExtents(pPlayer->actor, &z, &j); //use ztop of the target sprite if (nDist < seeDist >> 3) GetActorExtents(pPlayer->actor, &z, &j); //use ztop of the target sprite
if (!cansee(x, y, z, pSpr->sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z - eyeAboveZ, actor->spr.sector())) if (!cansee(x, y, z, plActor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z - eyeAboveZ, actor->spr.sector()))
continue; continue;
} }
else else
@ -8399,17 +8399,16 @@ DBloodActor* aiPatrolSearchTargets(DBloodActor* actor)
bool trgt = (both || !dude); // target must be in this region bool trgt = (both || !dude); // target must be in this region
bool crouch = (pSteal->flags & kModernTypeFlag8); // target must crouch bool crouch = (pSteal->flags & kModernTypeFlag8); // target must crouch
//bool floor = (pSteal->cstat & CSTAT_SPRITE_BLOCK); // target (or dude?) must touch floor of the sector //bool floor = (pSteal->cstat & CSTAT_SPRITE_BLOCK); // target (or dude?) must touch floor of the sector
if (trgt) if (trgt)
{ {
if (pXSteal->data1 > 0) if (pXSteal->data1 > 0)
{ {
if (approxDist(abs(pSteal->pos.X - pSpr->pos.X) >> 4, abs(pSteal->pos.Y - pSpr->pos.Y) >> 4) >= pXSteal->data1) if (approxDist(abs(pSteal->pos.X - plActor->spr.pos.X) >> 4, abs(pSteal->pos.Y - plActor->spr.pos.Y) >> 4) >= pXSteal->data1)
continue; continue;
} }
else if (pSpr->sector() != pSteal->sector()) else if (plActor->spr.sector() != pSteal->sector())
continue; continue;
if (crouch && pPlayer->posture == kPostureStand) if (crouch && pPlayer->posture == kPostureStand)
@ -8424,7 +8423,7 @@ DBloodActor* aiPatrolSearchTargets(DBloodActor* actor)
continue; continue;
} }
else if (pSpr->sector() != pSteal->sector()) else if (plActor->spr.sector() != pSteal->sector())
continue; continue;
} }

View file

@ -865,10 +865,10 @@ bool findDroppedLeech(PLAYER *a1, DBloodActor *a2)
bool PickupItem(PLAYER *pPlayer, DBloodActor* itemactor) bool PickupItem(PLAYER *pPlayer, DBloodActor* itemactor)
{ {
spritetype *pSprite = pPlayer->pSprite;
char buffer[80]; char buffer[80];
int pickupSnd = 775; int pickupSnd = 775;
int nType = itemactor->spr.type - kItemBase; int nType = itemactor->spr.type - kItemBase;
auto plActor = pPlayer->actor;
switch (itemactor->spr.type) { switch (itemactor->spr.type) {
case kItemShadowCloak: case kItemShadowCloak:
@ -1087,7 +1087,7 @@ bool PickupItem(PLAYER *pPlayer, DBloodActor* itemactor)
return 1; return 1;
} }
sfxPlay3DSound(pSprite->pos.X, pSprite->pos.Y, pSprite->pos.Z, pickupSnd, pSprite->sector()); sfxPlay3DSound(plActor->spr.pos.X, plActor->spr.pos.Y, plActor->spr.pos.Z, pickupSnd, plActor->spr.sector());
return 1; return 1;
} }
@ -1194,11 +1194,11 @@ void PickUp(PLAYER *pPlayer, DBloodActor* actor)
void CheckPickUp(PLAYER *pPlayer) void CheckPickUp(PLAYER *pPlayer)
{ {
spritetype *pSprite = pPlayer->pSprite; auto plActor = pPlayer->actor;
int x = pSprite->pos.X; int x = plActor->spr.pos.X;
int y = pSprite->pos.Y; int y = plActor->spr.pos.Y;
int z = pSprite->pos.Z; int z = plActor->spr.pos.Z;
auto pSector = pSprite->sector(); auto pSector = plActor->spr.sector();
BloodStatIterator it(kStatItem); BloodStatIterator it(kStatItem);
while (auto itemactor = it.Next()) while (auto itemactor = it.Next())
{ {
@ -1211,7 +1211,7 @@ void CheckPickUp(PLAYER *pPlayer)
if (dy > 48) if (dy > 48)
continue; continue;
int top, bottom; int top, bottom;
GetSpriteExtents(pSprite, &top, &bottom); GetActorExtents(plActor, &top, &bottom);
int vb = 0; int vb = 0;
if (itemactor->spr.pos.Z < top) if (itemactor->spr.pos.Z < top)
vb = (top-itemactor->spr.pos.Z)>>8; vb = (top-itemactor->spr.pos.Z)>>8;
@ -1231,13 +1231,13 @@ void CheckPickUp(PLAYER *pPlayer)
int ActionScan(PLAYER *pPlayer, HitInfo* out) int ActionScan(PLAYER *pPlayer, HitInfo* out)
{ {
auto plActor = pPlayer->actor;
*out = {}; *out = {};
spritetype *pSprite = pPlayer->pSprite; int x = bcos(plActor->spr.ang);
int x = bcos(pSprite->ang); int y = bsin(plActor->spr.ang);
int y = bsin(pSprite->ang);
int z = pPlayer->slope; int z = pPlayer->slope;
int hit = HitScan(pPlayer->actor, pPlayer->zView, x, y, z, 0x10000040, 128); int hit = HitScan(pPlayer->actor, pPlayer->zView, x, y, z, 0x10000040, 128);
int hitDist = approxDist(pSprite->pos.X-gHitInfo.hitpos.X, pSprite->pos.Y-gHitInfo.hitpos.Y)>>4; int hitDist = approxDist(plActor->spr.pos.X-gHitInfo.hitpos.X, plActor->spr.pos.Y-gHitInfo.hitpos.Y)>>4;
if (hitDist < 64) if (hitDist < 64)
{ {
switch (hit) switch (hit)
@ -1247,7 +1247,6 @@ int ActionScan(PLAYER *pPlayer, HitInfo* out)
auto hitactor = gHitInfo.actor(); auto hitactor = gHitInfo.actor();
if (!hitactor || !hitactor->hasX()) return -1; if (!hitactor || !hitactor->hasX()) return -1;
out->hitActor = hitactor; out->hitActor = hitactor;
spritetype* pSprite = &hitactor->s();
XSPRITE* pXSprite = &hitactor->x(); XSPRITE* pXSprite = &hitactor->x();
if (hitactor->spr.statnum == kStatThing) if (hitactor->spr.statnum == kStatThing)
{ {
@ -1304,8 +1303,8 @@ int ActionScan(PLAYER *pPlayer, HitInfo* out)
} }
} }
} }
out->hitSector = pSprite->sector(); out->hitSector = plActor->spr.sector();
if (pSprite->sector()->hasX() && pSprite->sector()->xs().Push) if (plActor->spr.sector()->hasX() && plActor->spr.sector()->xs().Push)
return 6; return 6;
return -1; return -1;
} }
@ -1329,11 +1328,11 @@ void UpdatePlayerSpriteAngle(PLAYER *pPlayer)
void doslopetilting(PLAYER* pPlayer, double const scaleAdjust = 1) void doslopetilting(PLAYER* pPlayer, double const scaleAdjust = 1)
{ {
auto* const pSprite = pPlayer->pSprite; auto plActor = pPlayer->actor;
auto* const pXSprite = pPlayer->pXSprite; auto* const pXSprite = pPlayer->pXSprite;
int const florhit = pPlayer->actor->hit.florhit.type; int const florhit = pPlayer->actor->hit.florhit.type;
bool const va = pXSprite->height < 16 && (florhit == kHitSector || florhit == 0) ? 1 : 0; bool const va = pXSprite->height < 16 && (florhit == kHitSector || florhit == 0) ? 1 : 0;
pPlayer->horizon.calcviewpitch(pSprite->pos.vec2, buildang(pSprite->ang), va, pSprite->sector()->floorstat & CSTAT_SECTOR_SLOPE, pSprite->sector(), scaleAdjust); pPlayer->horizon.calcviewpitch(plActor->spr.pos.vec2, buildang(plActor->spr.ang), va, plActor->spr.sector()->floorstat & CSTAT_SECTOR_SLOPE, plActor->spr.sector(), scaleAdjust);
} }
void ProcessInput(PLAYER *pPlayer) void ProcessInput(PLAYER *pPlayer)
@ -1350,7 +1349,6 @@ void ProcessInput(PLAYER *pPlayer)
pPlayer->angle.resetadjustment(); pPlayer->angle.resetadjustment();
DBloodActor* actor = pPlayer->actor; DBloodActor* actor = pPlayer->actor;
spritetype *pSprite = pPlayer->pSprite;
XSPRITE *pXSprite = pPlayer->pXSprite; XSPRITE *pXSprite = pPlayer->pXSprite;
POSTURE *pPosture = &pPlayer->pPosture[pPlayer->lifeMode][pPlayer->posture]; POSTURE *pPosture = &pPlayer->pPosture[pPlayer->lifeMode][pPlayer->posture];
InputPacket *pInput = &pPlayer->input; InputPacket *pInput = &pPlayer->input;
@ -1370,7 +1368,7 @@ void ProcessInput(PLAYER *pPlayer)
DBloodActor* fragger = pPlayer->fragger; DBloodActor* fragger = pPlayer->fragger;
if (fragger) if (fragger)
{ {
pPlayer->angle.addadjustment(getincanglebam(pPlayer->angle.ang, bvectangbam(fragger->spr.pos.X - pSprite->pos.X, fragger->spr.pos.Y - pSprite->pos.Y))); pPlayer->angle.addadjustment(getincanglebam(pPlayer->angle.ang, bvectangbam(fragger->spr.pos.X - actor->spr.pos.X, fragger->spr.pos.Y - actor->spr.pos.Y)));
} }
pPlayer->deathTime += 4; pPlayer->deathTime += 4;
if (!bSeqStat) if (!bSeqStat)
@ -1404,8 +1402,8 @@ void ProcessInput(PLAYER *pPlayer)
} }
if (pPlayer->posture == 1) if (pPlayer->posture == 1)
{ {
int x = Cos(pSprite->ang); int x = Cos(actor->spr.ang);
int y = Sin(pSprite->ang); int y = Sin(actor->spr.ang);
if (pInput->fvel) if (pInput->fvel)
{ {
int forward = pInput->fvel; int forward = pInput->fvel;
@ -1429,8 +1427,8 @@ void ProcessInput(PLAYER *pPlayer)
int speed = 0x10000; int speed = 0x10000;
if (pXSprite->height > 0) if (pXSprite->height > 0)
speed -= DivScale(pXSprite->height, 256, 16); speed -= DivScale(pXSprite->height, 256, 16);
int x = Cos(pSprite->ang); int x = Cos(actor->spr.ang);
int y = Sin(pSprite->ang); int y = Sin(actor->spr.ang);
if (pInput->fvel) if (pInput->fvel)
{ {
int forward = pInput->fvel; int forward = pInput->fvel;
@ -1654,25 +1652,24 @@ void ProcessInput(PLAYER *pPlayer)
void playerProcess(PLAYER *pPlayer) void playerProcess(PLAYER *pPlayer)
{ {
DBloodActor* actor = pPlayer->actor; DBloodActor* actor = pPlayer->actor;
spritetype *pSprite = pPlayer->pSprite;
XSPRITE *pXSprite = pPlayer->pXSprite; XSPRITE *pXSprite = pPlayer->pXSprite;
POSTURE* pPosture = &pPlayer->pPosture[pPlayer->lifeMode][pPlayer->posture]; POSTURE* pPosture = &pPlayer->pPosture[pPlayer->lifeMode][pPlayer->posture];
powerupProcess(pPlayer); powerupProcess(pPlayer);
int top, bottom; int top, bottom;
GetSpriteExtents(pSprite, &top, &bottom); GetActorExtents(actor, &top, &bottom);
int dzb = (bottom-pSprite->pos.Z)/4; int dzb = (bottom-actor->spr.pos.Z)/4;
int dzt = (pSprite->pos.Z-top)/4; int dzt = (actor->spr.pos.Z-top)/4;
int dw = pSprite->clipdist<<2; int dw = actor->spr.clipdist<<2;
if (!gNoClip) if (!gNoClip)
{ {
auto pSector = pSprite->sector(); auto pSector = actor->spr.sector();
if (pushmove(&pSprite->pos, &pSector, dw, dzt, dzb, CLIPMASK0) == -1) if (pushmove(&actor->spr.pos, &pSector, dw, dzt, dzb, CLIPMASK0) == -1)
actDamageSprite(actor, actor, kDamageFall, 500<<4); actDamageSprite(actor, actor, kDamageFall, 500<<4);
if (pSprite->sector() != pSector) if (actor->spr.sector() != pSector)
{ {
if (pSector == nullptr) if (pSector == nullptr)
{ {
pSector = pSprite->sector(); pSector = actor->spr.sector();
actDamageSprite(actor, actor, kDamageFall, 500<<4); actDamageSprite(actor, actor, kDamageFall, 500<<4);
} }
else else
@ -1744,10 +1741,10 @@ void playerProcess(PLAYER *pPlayer)
if (pPlayer->posture == 1) if (pPlayer->posture == 1)
{ {
pPlayer->isUnderwater = 1; pPlayer->isUnderwater = 1;
auto link = pSprite->sector()->lowerLink; auto link = actor->spr.sector()->lowerLink;
if (link && (link->spr.type == kMarkerLowGoo || link->spr.type == kMarkerLowWater)) if (link && (link->spr.type == kMarkerLowGoo || link->spr.type == kMarkerLowWater))
{ {
if (getceilzofslopeptr(pSprite->sector(), pSprite->pos.X, pSprite->pos.Y) > pPlayer->zView) if (getceilzofslopeptr(actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y) > pPlayer->zView)
pPlayer->isUnderwater = 0; pPlayer->isUnderwater = 0;
} }
} }
@ -1929,10 +1926,9 @@ int playerDamageSprite(DBloodActor* source, PLAYER *pPlayer, DAMAGE_TYPE nDamage
nDamage = playerDamageArmor(pPlayer, nDamageType, nDamage); nDamage = playerDamageArmor(pPlayer, nDamageType, nDamage);
pPlayer->painEffect = ClipHigh(pPlayer->painEffect+(nDamage>>3), 600); pPlayer->painEffect = ClipHigh(pPlayer->painEffect+(nDamage>>3), 600);
spritetype *pSprite = pPlayer->pSprite;
XSPRITE *pXSprite = pPlayer->pXSprite; XSPRITE *pXSprite = pPlayer->pXSprite;
DBloodActor* pActor = pPlayer->actor; DBloodActor* pActor = pPlayer->actor;
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type); DUDEINFO *pDudeInfo = getDudeInfo(pActor->spr.type);
int nDeathSeqID = -1; int nDeathSeqID = -1;
int nKneelingPlayer = -1; int nKneelingPlayer = -1;
bool va = playerSeqPlaying(pPlayer, 16); bool va = playerSeqPlaying(pPlayer, 16);
@ -1955,8 +1951,8 @@ int playerDamageSprite(DBloodActor* source, PLAYER *pPlayer, DAMAGE_TYPE nDamage
default: default:
{ {
int top, bottom; int top, bottom;
GetSpriteExtents(pSprite, &top, &bottom); GetActorExtents(pActor, &top, &bottom);
CGibPosition gibPos(pSprite->pos.X, pSprite->pos.Y, top); CGibPosition gibPos(pActor->spr.pos.X, pActor->spr.pos.Y, top);
CGibVelocity gibVel(pActor->xvel >> 1, pActor->yvel >> 1, -0xccccc); CGibVelocity gibVel(pActor->xvel >> 1, pActor->yvel >> 1, -0xccccc);
GibSprite(pActor, GIBTYPE_27, &gibPos, &gibVel); GibSprite(pActor, GIBTYPE_27, &gibPos, &gibVel);
GibSprite(pActor, GIBTYPE_7, NULL, NULL); GibSprite(pActor, GIBTYPE_7, NULL, NULL);
@ -2043,9 +2039,9 @@ int playerDamageSprite(DBloodActor* source, PLAYER *pPlayer, DAMAGE_TYPE nDamage
if (nDeathSeqID != 16) if (nDeathSeqID != 16)
{ {
powerupClear(pPlayer); powerupClear(pPlayer);
if (pSprite->sector()->hasX() && pSprite->sector()->xs().Exit) if (pActor->spr.sector()->hasX() && pActor->spr.sector()->xs().Exit)
trTriggerSector(pSprite->sector(), kCmdSectorExit); trTriggerSector(pActor->spr.sector(), kCmdSectorExit);
pSprite->flags |= 7; pActor->spr.flags |= 7;
for (int p = connecthead; p >= 0; p = connectpoint2[p]) for (int p = connecthead; p >= 0; p = connectpoint2[p])
{ {
if (gPlayer[p].fragger == pPlayer->actor && gPlayer[p].deathTime > 0) if (gPlayer[p].fragger == pPlayer->actor && gPlayer[p].deathTime > 0)
@ -2134,7 +2130,6 @@ void playerLandingSound(PLAYER *pPlayer)
604, 604,
603 603
}; };
spritetype *pSprite = pPlayer->pSprite;
SPRITEHIT* pHit = &pPlayer->actor->hit; SPRITEHIT* pHit = &pPlayer->actor->hit;
if (pHit->florhit.type != kHitNone) if (pHit->florhit.type != kHitNone)
{ {

View file

@ -75,7 +75,7 @@ void BloodSoundEngine::CalcPosVel(int type, const void* source, const float pt[3
{ {
FVector3 camera; FVector3 camera;
if (gMe && gMe->pSprite) camera = GetSoundPos(&gMe->actor->spr.pos); if (gMe && gMe->actor) camera = GetSoundPos(&gMe->actor->spr.pos);
else camera = { 0, 0, 0 }; // don't crash if there is no player. else camera = { 0, 0, 0 }; // don't crash if there is no player.
if (vel) vel->Zero(); if (vel) vel->Zero();
@ -111,7 +111,7 @@ void GameInterface::UpdateSounds()
{ {
SoundListener listener; SoundListener listener;
if (gMe->pSprite) if (gMe->actor)
{ {
listener.angle = -gMe->actor->spr.ang * float(BAngRadian); // Build uses a period of 2048. listener.angle = -gMe->actor->spr.ang * float(BAngRadian); // Build uses a period of 2048.
listener.velocity.Zero(); listener.velocity.Zero();

View file

@ -716,7 +716,7 @@ void viewDrawScreen(bool sceneonly)
UpdateStatusBar(); UpdateStatusBar();
int zn = ((gView->zWeapon-gView->zView-(12<<8))>>7)+220; int zn = ((gView->zWeapon-gView->zView-(12<<8))>>7)+220;
PLAYER *pPSprite = &gPlayer[gMe->actor->spr.type-kDudePlayer1]; PLAYER *pPSprite = &gPlayer[gMe->actor->spr.type-kDudePlayer1];
if (IsPlayerSprite(gMe->pSprite) && pPSprite->hand == 1) if (gMe->actor->IsPlayerActor() && pPSprite->hand == 1)
{ {
gChoke.animateChoke(160, zn, (int)gInterpolate); gChoke.animateChoke(160, zn, (int)gInterpolate);
} }
@ -760,7 +760,7 @@ bool GameInterface::DrawAutomapPlayer(int mx, int my, int x, int y, int z, int a
for (int i = connecthead; i >= 0; i = connectpoint2[i]) for (int i = connecthead; i >= 0; i = connectpoint2[i])
{ {
PLAYER* pPlayer = &gPlayer[i]; PLAYER* pPlayer = &gPlayer[i];
spritetype* pSprite = pPlayer->pSprite; auto actor = pPlayer->actor;
int xvect = -bsin(a) * z; int xvect = -bsin(a) * z;
int yvect = -bcos(a) * z; int yvect = -bcos(a) * z;
@ -773,20 +773,20 @@ bool GameInterface::DrawAutomapPlayer(int mx, int my, int x, int y, int z, int a
if (i == gView->nPlayer || gGameOptions.nGameType == 1) if (i == gView->nPlayer || gGameOptions.nGameType == 1)
{ {
int nTile = pSprite->picnum; int nTile = actor->spr.picnum;
int ceilZ, floorZ; int ceilZ, floorZ;
Collision ceilHit, floorHit; Collision ceilHit, floorHit;
GetZRange(gView->actor, &ceilZ, &ceilHit, &floorZ, &floorHit, (pSprite->clipdist << 2) + 16, CLIPMASK0, PARALLAXCLIP_CEILING | PARALLAXCLIP_FLOOR); GetZRange(gView->actor, &ceilZ, &ceilHit, &floorZ, &floorHit, (actor->spr.clipdist << 2) + 16, CLIPMASK0, PARALLAXCLIP_CEILING | PARALLAXCLIP_FLOOR);
int nTop, nBottom; int nTop, nBottom;
GetSpriteExtents(pSprite, &nTop, &nBottom); GetActorExtents(actor, &nTop, &nBottom);
int nScale = (pSprite->yrepeat + ((floorZ - nBottom) >> 8)) * z; int nScale = (actor->spr.yrepeat + ((floorZ - nBottom) >> 8)) * z;
nScale = ClipRange(nScale, 8000, 65536 << 1); nScale = ClipRange(nScale, 8000, 65536 << 1);
// Players on automap // Players on automap
double x = xdim / 2. + x1 / double(1 << 12); double x = xdim / 2. + x1 / double(1 << 12);
double y = ydim / 2. + y1 / double(1 << 12); double y = ydim / 2. + y1 / double(1 << 12);
// This very likely needs fixing later // This very likely needs fixing later
DrawTexture(twod, tileGetTexture(nTile, true), xx, yy, DTA_ClipLeft, windowxy1.X, DTA_ClipTop, windowxy1.Y, DTA_ScaleX, z/1536., DTA_ScaleY, z/1536., DTA_CenterOffset, true, DrawTexture(twod, tileGetTexture(nTile, true), xx, yy, DTA_ClipLeft, windowxy1.X, DTA_ClipTop, windowxy1.Y, DTA_ScaleX, z/1536., DTA_ScaleY, z/1536., DTA_CenterOffset, true,
DTA_ClipRight, windowxy2.X + 1, DTA_ClipBottom, windowxy2.Y + 1, DTA_Alpha, (pSprite->cstat & CSTAT_SPRITE_TRANSLUCENT ? 0.5 : 1.), TAG_DONE); DTA_ClipRight, windowxy2.X + 1, DTA_ClipBottom, windowxy2.Y + 1, DTA_Alpha, (actor->spr.cstat & CSTAT_SPRITE_TRANSLUCENT ? 0.5 : 1.), TAG_DONE);
} }
} }
return true; return true;