mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
- did some refactoring on FPathTraverse to allow inheriting from that class with different collection functions.
This will be needed to implement an efficient portal checker that doesn't run through the entire blockmap to find the portals.
This commit is contained in:
parent
0f871a1d21
commit
a9db998700
2 changed files with 11 additions and 5 deletions
|
@ -1398,7 +1398,7 @@ intercept_t *FPathTraverse::Next()
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
FPathTraverse::FPathTraverse (fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags)
|
||||
void FPathTraverse::init (fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags)
|
||||
{
|
||||
fixed_t xt1, xt2;
|
||||
fixed_t yt1, yt2;
|
||||
|
|
|
@ -325,6 +325,7 @@ public:
|
|||
|
||||
class FPathTraverse
|
||||
{
|
||||
protected:
|
||||
static TArray<intercept_t> intercepts;
|
||||
|
||||
divline_t trace;
|
||||
|
@ -332,14 +333,19 @@ class FPathTraverse
|
|||
unsigned int intercept_count;
|
||||
unsigned int count;
|
||||
|
||||
void AddLineIntercepts(int bx, int by);
|
||||
void AddThingIntercepts(int bx, int by, FBlockThingsIterator &it, bool compatible);
|
||||
virtual void AddLineIntercepts(int bx, int by);
|
||||
virtual void AddThingIntercepts(int bx, int by, FBlockThingsIterator &it, bool compatible);
|
||||
void init(fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags);
|
||||
FPathTraverse() {}
|
||||
public:
|
||||
|
||||
intercept_t *Next();
|
||||
|
||||
FPathTraverse(fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags);
|
||||
~FPathTraverse();
|
||||
FPathTraverse(fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags)
|
||||
{
|
||||
init(x1, y1, x2, y2, flags);
|
||||
}
|
||||
virtual ~FPathTraverse();
|
||||
const divline_t &Trace() const { return trace; }
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue