Delete leftover code

This commit is contained in:
asasas9500 2021-02-07 01:20:50 -03:00
parent b1db1a191a
commit 12ebf162ad
3 changed files with 0 additions and 46 deletions

View file

@ -75,15 +75,6 @@ int CollideStaticObjects(COLL_INFO* coll, int x, int y, int z, short roomNumber,
int yMax = mesh->y + sInfo->collisionBox.Y2; int yMax = mesh->y + sInfo->collisionBox.Y2;
short yRot = mesh->yRot; short yRot = mesh->yRot;
std::array<float, 4> box{sInfo->collisionBox.X1, sInfo->collisionBox.Z1, sInfo->collisionBox.X2, sInfo->collisionBox.Z2};
RotateBoundingBox(box, mesh->yRot);
xMin = box[0];
zMin = box[1];
xMax = box[2];
zMax = box[3];
if (yRot == ANGLE(180)) if (yRot == ANGLE(180))
{ {
xMin = mesh->x - sInfo->collisionBox.X2; xMin = mesh->x - sInfo->collisionBox.X2;
@ -2419,30 +2410,6 @@ Vector2 GetDiagonalIntersect(int xPos, int zPos, int splitType, int radius, shor
return vect; return vect;
} }
void RotateBoundingBox(std::array<float, 4>& box, short angle)
{
float s = sin(TO_RAD(angle));
float c = cos(TO_RAD(angle));
std::array<float, 4> x, z;
x[0] = box[0] * c;
z[0] = -box[0] * s;
x[1] = box[1] * s;
z[1] = box[1] * c;
x[2] = box[2] * c;
z[2] = -box[2] * s;
x[3] = box[3] * s;
z[3] = box[3] * c;
auto xPair = std::minmax_element(begin(x), end(x));
auto zPair = std::minmax_element(begin(z), end(z));
box[0] = *xPair.first;
box[1] = *zPair.first;
box[2] = *xPair.second;
box[3] = *zPair.second;
}
Vector2 GetOrthogonalIntersect(int xPos, int zPos, int radius, short yRot) Vector2 GetOrthogonalIntersect(int xPos, int zPos, int radius, short yRot)
{ {
Vector2 vect; Vector2 vect;

View file

@ -131,7 +131,6 @@ void LaraBaddieCollision(ITEM_INFO* item, COLL_INFO* coll);
bool SnapToQuadrant(short& angle, int interval); bool SnapToQuadrant(short& angle, int interval);
int GetQuadrant(short angle); int GetQuadrant(short angle);
bool SnapToDiagonal(short& angle, int interval); bool SnapToDiagonal(short& angle, int interval);
void RotateBoundingBox(std::array<float, 4>& box, short angle);
// New function for rotating item along XZ slopes. // New function for rotating item along XZ slopes.
// (int radiusDivide) is for radiusZ, else the MaxZ is too high and cause rotation problem ! // (int radiusDivide) is for radiusZ, else the MaxZ is too high and cause rotation problem !
// Dont need to set a value in radiusDivide if you dont need it (radiusDivide is set to 1 by default). // Dont need to set a value in radiusDivide if you dont need it (radiusDivide is set to 1 by default).

View file

@ -45,18 +45,6 @@ enum HEADINGS
WEST WEST
}; };
enum OCTANTS
{
O_NORTH,
O_NORTHEAST,
O_EAST,
O_SOUTHEAST,
O_SOUTH,
O_SOUTHWEST,
O_WEST,
O_NORTHWEST
};
enum COMMAND_TYPES enum COMMAND_TYPES
{ {
COMMAND_NULL = 0, COMMAND_NULL = 0,