mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 17:01:03 +00:00
- redid clipinsidebox* functions.
* Completely rewritten to be less obtuse. * Consolidated the two variants. * Renamed to be clearer about what they do.
This commit is contained in:
parent
b9d0c9d6ba
commit
3a9f9988f4
8 changed files with 67 additions and 121 deletions
|
@ -268,6 +268,16 @@ void setWallSectors();
|
|||
void GetWallSpritePosition(const spritetypebase* spr, const DVector2& pos, DVector2* out, bool render = false);
|
||||
void GetFlatSpritePosition(DCoreActor* spr, const DVector2& pos, DVector2* out, bool render = false);
|
||||
void GetFlatSpritePosition(const tspritetype* spr, const DVector2& pos, DVector2* out, double* outz, bool render = false);
|
||||
|
||||
enum class EClose
|
||||
{
|
||||
Outside,
|
||||
InFront,
|
||||
Behind
|
||||
};
|
||||
EClose IsCloseToLine(const DVector2& vect, const DVector2& start, const DVector2& end, double walldist);
|
||||
EClose IsCloseToWall(const DVector2& vect, walltype* wal, double walldist);
|
||||
|
||||
void checkRotatedWalls();
|
||||
bool sectorsConnected(int sect1, int sect2);
|
||||
void dragpoint(walltype* wal, int newx, int newy);
|
||||
|
@ -288,11 +298,6 @@ inline double getflorzofslopeptrf(const sectortype* sec, double dax, double day)
|
|||
{
|
||||
return getflorzofslopeptr(sec, dax * worldtoint, day * worldtoint) * zinttoworld;
|
||||
}
|
||||
[[deprecated]]
|
||||
inline void getzsofslopeptrf(const sectortype* sec, double dax, double day, double* ceilz, double* florz)
|
||||
{
|
||||
getzsofslopeptr(sec, dax, day, ceilz, florz);
|
||||
}
|
||||
|
||||
|
||||
enum EFindNextSector
|
||||
|
@ -314,19 +319,6 @@ sectortype* nextsectorneighborzptr(sectortype* sectp, int startz, int flags);
|
|||
|
||||
|
||||
|
||||
// y is negated so that the orientation is the same as in GZDoom, in order to use its utilities.
|
||||
// The render code should NOT use Build coordinates for anything!
|
||||
|
||||
inline double RenderX(int x)
|
||||
{
|
||||
return x * (1 / 16.);
|
||||
}
|
||||
|
||||
inline double RenderY(int y)
|
||||
{
|
||||
return y * (1 / -16.);
|
||||
}
|
||||
|
||||
inline double WallStartX(int wallnum)
|
||||
{
|
||||
return wall[wallnum].pos.X;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue