mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-06 13:01:03 +00:00
22e8678903
* the temporary checking arrays are now static * the array that gets the returned values only starts allocating memory when the third touched sector group is found. The most common cases (no touched portal and one touched portal) can be handled without accessing the heap. - did some streamlining of AActor::LinkToSector: * there's only now version of this function that can handle everything * moved the FIXMAPTHINGPOS stuff into a separate function. * removed LinkToWorldForMapThing and put all special handling this function did into P_PointInSectorBuggy.
34 lines
1 KiB
C++
34 lines
1 KiB
C++
#ifndef __P_BLOCKMAP_H
|
|
#define __P_BLOCKMAP_H
|
|
|
|
#include "doomtype.h"
|
|
|
|
class AActor;
|
|
|
|
// [RH] Like msecnode_t, but for the blockmap
|
|
struct FBlockNode
|
|
{
|
|
AActor *Me; // actor this node references
|
|
int BlockIndex; // index into blocklinks for the block this node is in
|
|
int Group; // portal group this link belongs to (can be different than the actor's own group
|
|
FBlockNode **PrevActor; // previous actor in this block
|
|
FBlockNode *NextActor; // next actor in this block
|
|
FBlockNode **PrevBlock; // previous block this actor is in
|
|
FBlockNode *NextBlock; // next block this actor is in
|
|
|
|
static FBlockNode *Create (AActor *who, int x, int y, int group = -1);
|
|
void Release ();
|
|
|
|
static FBlockNode *FreeBlocks;
|
|
};
|
|
|
|
extern int* blockmaplump; // offsets in blockmap are from here
|
|
|
|
extern int* blockmap;
|
|
extern int bmapwidth;
|
|
extern int bmapheight; // in mapblocks
|
|
extern fixed_t bmaporgx;
|
|
extern fixed_t bmaporgy; // origin of block map
|
|
extern FBlockNode** blocklinks; // for thing chains
|
|
|
|
#endif
|