3#ifndef GAME_COLLISION_H
4#define GAME_COLLISION_H
51 void MovePoint(
vec2 *pInoutPos,
vec2 *pInoutVel,
float Elasticity,
int *pBounces)
const;
57 void SetDCollisionAt(
float x,
float y,
int Type,
int Flags,
int Number);
75 int GetTile(
int x,
int y)
const;
77 int Entity(
int x,
int y,
int Layer)
const;
97 int IsTune(
int Index)
const;
98 void GetSpeedup(
int Index,
vec2 *pDir,
int *pForce,
int *pMaxSpeed)
const;
103 int IsSolid(
int x,
int y)
const;
104 bool IsThrough(
int x,
int y,
int OffsetX,
int OffsetY,
vec2 Pos0,
vec2 Pos1)
const;
113 int IsMover(
int x,
int y,
int *pFlags)
const;
Definition: collision.h:34
const CSpeedupTile * SpeedupLayer() const
Definition: collision.h:120
int IsTeleportHook(int Index) const
Definition: collision.cpp:712
bool TileExists(int Index) const
Definition: collision.cpp:843
CLayers * m_pLayers
Definition: collision.h:151
int GetTileFlags(int Index) const
Definition: collision.cpp:985
int IntersectNoLaser(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision) const
Definition: collision.cpp:1156
std::map< int, std::vector< vec2 > > m_TeleIns
Definition: collision.h:165
std::map< int, std::vector< vec2 > > m_TeleOuts
Definition: collision.h:167
int GetSwitchDelay(int Index) const
Definition: collision.cpp:778
int GetFIndex(int x, int y) const
Definition: collision.cpp:1036
int GetTile(int x, int y) const
Definition: collision.cpp:315
~CCollision()
Definition: collision.cpp:45
CTuneTile * m_pTune
Definition: collision.h:161
int IsMover(int x, int y, int *pFlags) const
Definition: collision.cpp:789
std::vector< int > GetMapIndices(vec2 PrevPos, vec2 Pos, unsigned MaxIndices=0) const
Definition: collision.cpp:919
vec2 GetPos(int Index) const
Definition: collision.cpp:961
void Init(CLayers *pLayers)
Definition: collision.cpp:50
const CTuneTile * TuneLayer() const
Definition: collision.h:123
int GetFTileFlags(int Index) const
Definition: collision.cpp:992
int GetWidth() const
Definition: collision.h:46
int GetDTileIndex(int Index) const
Definition: collision.cpp:1101
int GetDTileFlags(int Index) const
Definition: collision.cpp:1117
int IsWallJump(int Index) const
Definition: collision.cpp:631
void GetSpeedup(int Index, vec2 *pDir, int *pForce, int *pMaxSpeed) const
Definition: collision.cpp:745
int IsSpeedup(int Index) const
Definition: collision.cpp:723
int GetIndex(int x, int y) const
Definition: collision.cpp:999
bool IsCheckEvilTeleport(int Index) const
Definition: collision.cpp:680
CTeleTile * m_pTele
Definition: collision.h:157
int GetTileIndex(int Index) const
Definition: collision.cpp:971
const std::vector< vec2 > & TeleCheckOuts(int Number)
Definition: collision.h:147
int GetFTileIndex(int Index) const
Definition: collision.cpp:978
int IntersectAir(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision) const
Definition: collision.cpp:1216
std::map< int, std::vector< vec2 > > m_TeleOthers
Definition: collision.h:171
int IsSolid(int x, int y) const
Definition: collision.cpp:599
CSpeedupTile * m_pSpeedup
Definition: collision.h:158
CSwitchTile * m_pSwitch
Definition: collision.h:160
bool IsThrough(int x, int y, int OffsetX, int OffsetY, vec2 Pos0, vec2 Pos1) const
Definition: collision.cpp:605
size_t TeleAllSize(int Number)
Definition: collision.cpp:1300
void Unload()
Definition: collision.cpp:151
int IsTeleCheckpoint(int Index) const
Definition: collision.cpp:687
int IsNoLaser(int x, int y) const
Definition: collision.cpp:639
int m_Width
Definition: collision.h:153
CDoorTile * m_pDoor
Definition: collision.h:162
const CTile * GameLayer() const
Definition: collision.h:118
int GetPureMapIndex(vec2 Pos) const
Definition: collision.h:79
int IsFTimeCheckpoint(int Index) const
Definition: collision.cpp:1258
int IntersectLineTeleWeapon(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision, int *pTeleNr=nullptr) const
Definition: collision.cpp:421
CTile * m_pFront
Definition: collision.h:159
bool CheckPoint(vec2 Pos) const
Definition: collision.h:44
int GetMapIndex(vec2 Pos) const
Definition: collision.cpp:907
int GetMoveRestrictions(CALLBACK_SWITCHACTIVE pfnSwitchActive, void *pUser, vec2 Pos, float Distance=18.0f, int OverrideCenterTileIndex=-1) const
Definition: collision.cpp:266
void FillAntibot(CAntibotMapData *pMapData) const
Definition: collision.cpp:174
int m_HighestSwitchNumber
Definition: collision.h:125
vec2 CpSpeed(int index, int Flags=0) const
Definition: collision.cpp:803
bool IsCheckTeleport(int Index) const
Definition: collision.cpp:673
int GetHeight() const
Definition: collision.h:47
const std::vector< vec2 > & TeleOthers(int Number)
Definition: collision.h:148
int GetMoveRestrictions(vec2 Pos, float Distance=18.0f) const
Definition: collision.h:70
void MoveBox(vec2 *pInoutPos, vec2 *pInoutVel, vec2 Size, vec2 Elasticity, bool *pGrounded=nullptr) const
Definition: collision.cpp:522
int IntersectLineTeleHook(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision, int *pTeleNr=nullptr) const
Definition: collision.cpp:361
void SetDCollisionAt(float x, float y, int Type, int Flags, int Number)
Definition: collision.cpp:1089
bool CheckPoint(float x, float y) const
Definition: collision.h:43
bool IsHookBlocker(int x, int y, vec2 Pos0, vec2 Pos1) const
Definition: collision.cpp:616
int IntersectNoLaserNW(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision) const
Definition: collision.cpp:1187
int IsFNoLaser(int x, int y) const
Definition: collision.cpp:644
int GetDTileNumber(int Index) const
Definition: collision.cpp:1108
int GetPureMapIndex(float x, float y) const
Definition: collision.cpp:836
bool TileExistsNext(int Index) const
Definition: collision.cpp:865
int IntersectLine(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision) const
Definition: collision.cpp:330
int IsTune(int Index) const
Definition: collision.cpp:734
CTile * m_pTiles
Definition: collision.h:156
CCollision()
Definition: collision.cpp:39
int GetSwitchNumber(int Index) const
Definition: collision.cpp:767
const CTeleTile * TeleLayer() const
Definition: collision.h:119
void SetCollisionAt(float x, float y, int Index)
Definition: collision.cpp:1081
int IsEvilTeleport(int Index) const
Definition: collision.cpp:660
const std::vector< vec2 > & TeleOuts(int Number)
Definition: collision.h:146
int GetSwitchType(int Index) const
Definition: collision.cpp:756
int GetCollisionAt(float x, float y) const
Definition: collision.h:45
int IsTeleportWeapon(int Index) const
Definition: collision.cpp:701
const CTile * FrontLayer() const
Definition: collision.h:121
void MovePoint(vec2 *pInoutPos, vec2 *pInoutVel, float Elasticity, int *pBounces) const
Definition: collision.cpp:470
int IsTimeCheckpoint(int Index) const
Definition: collision.cpp:1247
int GetFTile(int x, int y) const
Definition: collision.cpp:1043
int m_Height
Definition: collision.h:154
vec2 TeleAllGet(int Number, size_t Offset)
Definition: collision.cpp:1269
std::map< int, std::vector< vec2 > > m_TeleCheckOuts
Definition: collision.h:169
const std::vector< vec2 > & TeleIns(int Number)
Definition: collision.h:145
const CSwitchTile * SwitchLayer() const
Definition: collision.h:122
const CLayers * Layers() const
Definition: collision.h:117
bool TestBox(vec2 Pos, vec2 Size) const
Definition: collision.cpp:508
int GetFCollisionAt(float x, float y) const
Definition: collision.h:61
int IsTeleport(int Index) const
Definition: collision.cpp:649
int Entity(int x, int y, int Layer) const
Definition: collision.cpp:1055
Definition: mapitems.h:557
Definition: mapitems.h:539
Definition: mapitems.h:548
Definition: mapitems.h:532
Definition: mapitems.h:236
Definition: mapitems.h:565
T x
Definition: vmath.h:19
T y
Definition: vmath.h:23
@ CANTMOVE_LEFT
Definition: collision.h:22
@ CANTMOVE_UP
Definition: collision.h:24
@ CANTMOVE_DOWN
Definition: collision.h:25
@ CANTMOVE_RIGHT
Definition: collision.h:23
vec2 ClampVel(int MoveRestriction, vec2 Vel)
Definition: collision.cpp:18
void ThroughOffset(vec2 Pos0, vec2 Pos1, int *pOffsetX, int *pOffsetY)
Definition: collision.cpp:1124
bool(* CALLBACK_SWITCHACTIVE)(int Number, void *pUser)
Definition: collision.h:30
constexpr int round_to_int(float f)
Definition: math.h:14
Definition: antibot_data.h:17