mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- avoid using widthBits and heightBits outside of engine code.
This commit is contained in:
parent
f24786af71
commit
51115e75df
1 changed files with 24 additions and 24 deletions
|
@ -284,10 +284,10 @@ void DoSectorPanning(void)
|
|||
int py = (pSector->floorypanning << 8) + pXSector->floorYPanFrac;
|
||||
if (pSector->floorstat & 64)
|
||||
angle -= 512;
|
||||
int xBits = (widthBits(nTile))-((pSector->floorstat&8)!=0);
|
||||
px += mulscale30(speed<<2, Cos(angle))>>xBits;
|
||||
int yBits = (heightBits(nTile))-((pSector->floorstat&8)!=0);
|
||||
py -= mulscale30(speed<<2, Sin(angle))>>yBits;
|
||||
int xBits = tileWidth(nTile) >> int((pSector->floorstat & 8) != 0);
|
||||
px += mulscale30(speed << 2, Cos(angle)) / xBits;
|
||||
int yBits = tileHeight(nTile) >> int((pSector->floorstat & 8) != 0);
|
||||
py -= mulscale30(speed << 2, Sin(angle)) / yBits;
|
||||
pSector->floorxpanning = px >> 8;
|
||||
pSector->floorypanning = py >> 8;
|
||||
pXSector->floorXPanFrac = px & 255;
|
||||
|
@ -300,10 +300,10 @@ void DoSectorPanning(void)
|
|||
int py = (pSector->ceilingypanning << 8) + pXSector->ceilYPanFrac;
|
||||
if (pSector->ceilingstat & 64)
|
||||
angle -= 512;
|
||||
int xBits = (widthBits(nTile))-((pSector->ceilingstat&8)!=0);
|
||||
px += mulscale30(speed<<2, Cos(angle))>>xBits;
|
||||
int yBits = (heightBits(nTile))-((pSector->ceilingstat&8)!=0);
|
||||
py -= mulscale30(speed<<2, Sin(angle))>>yBits;
|
||||
int xBits = tileWidth(nTile) >> int((pSector->floorstat & 8) != 0);
|
||||
px += mulscale30(speed << 2, Cos(angle)) / xBits;
|
||||
int yBits = tileHeight(nTile) >> int((pSector->floorstat & 8) != 0);
|
||||
py -= mulscale30(speed << 2, Sin(angle)) / yBits;
|
||||
pSector->ceilingxpanning = px >> 8;
|
||||
pSector->ceilingypanning = py >> 8;
|
||||
pXSector->ceilXPanFrac = px & 255;
|
||||
|
@ -329,8 +329,8 @@ void DoSectorPanning(void)
|
|||
int nTile = wall[nWall].picnum;
|
||||
int px = (wall[nWall].xpanning<<8)+pXWall->xpanFrac;
|
||||
int py = (wall[nWall].ypanning<<8)+pXWall->ypanFrac;
|
||||
px += (psx << 2) >> widthBits(nTile);
|
||||
py += (psy << 2) >> heightBits(nTile);
|
||||
px += (psx << 2) / tileWidth(nTile);
|
||||
py += (psy << 2) / tileHeight(nTile);
|
||||
wall[nWall].xpanning = px>>8;
|
||||
wall[nWall].ypanning = py>>8;
|
||||
pXWall->xpanFrac = px&255;
|
||||
|
|
Loading…
Reference in a new issue