DDraceNetwork Docs
|
#include <collision.h>
Public Member Functions | |
CCollision () | |
~CCollision () | |
void | Init (CLayers *pLayers) |
void | Unload () |
void | FillAntibot (CAntibotMapData *pMapData) const |
bool | CheckPoint (float x, float y) const |
bool | CheckPoint (vec2 Pos) const |
int | GetCollisionAt (float x, float y) const |
int | GetWidth () const |
int | GetHeight () const |
int | IntersectLine (vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision) const |
int | IntersectLineTeleWeapon (vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision, int *pTeleNr=nullptr) const |
int | IntersectLineTeleHook (vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision, int *pTeleNr=nullptr) const |
void | MovePoint (vec2 *pInoutPos, vec2 *pInoutVel, float Elasticity, int *pBounces) const |
void | MoveBox (vec2 *pInoutPos, vec2 *pInoutVel, vec2 Size, vec2 Elasticity, bool *pGrounded=nullptr) const |
bool | TestBox (vec2 Pos, vec2 Size) const |
void | SetCollisionAt (float x, float y, int Index) |
void | SetDCollisionAt (float x, float y, int Type, int Flags, int Number) |
int | GetDTileIndex (int Index) const |
int | GetDTileFlags (int Index) const |
int | GetDTileNumber (int Index) const |
int | GetFCollisionAt (float x, float y) const |
int | IntersectNoLaser (vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision) const |
int | IntersectNoLaserNW (vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision) const |
int | IntersectAir (vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision) const |
int | GetIndex (int x, int y) const |
int | GetIndex (vec2 PrevPos, vec2 Pos) const |
int | GetFIndex (int x, int y) const |
int | GetMoveRestrictions (CALLBACK_SWITCHACTIVE pfnSwitchActive, void *pUser, vec2 Pos, float Distance=18.0f, int OverrideCenterTileIndex=-1) const |
int | GetMoveRestrictions (vec2 Pos, float Distance=18.0f) const |
int | GetTile (int x, int y) const |
int | GetFTile (int x, int y) const |
int | Entity (int x, int y, int Layer) const |
int | GetPureMapIndex (float x, float y) const |
int | GetPureMapIndex (vec2 Pos) const |
std::vector< int > | GetMapIndices (vec2 PrevPos, vec2 Pos, unsigned MaxIndices=0) const |
int | GetMapIndex (vec2 Pos) const |
bool | TileExists (int Index) const |
bool | TileExistsNext (int Index) const |
vec2 | GetPos (int Index) const |
int | GetTileIndex (int Index) const |
int | GetFTileIndex (int Index) const |
int | GetTileFlags (int Index) const |
int | GetFTileFlags (int Index) const |
int | IsTeleport (int Index) const |
int | IsEvilTeleport (int Index) const |
bool | IsCheckTeleport (int Index) const |
bool | IsCheckEvilTeleport (int Index) const |
int | IsTeleportWeapon (int Index) const |
int | IsTeleportHook (int Index) const |
int | IsTeleCheckpoint (int Index) const |
int | IsSpeedup (int Index) const |
int | IsTune (int Index) const |
void | GetSpeedup (int Index, vec2 *pDir, int *pForce, int *pMaxSpeed) const |
int | GetSwitchType (int Index) const |
int | GetSwitchNumber (int Index) const |
int | GetSwitchDelay (int Index) const |
int | IsSolid (int x, int y) const |
bool | IsThrough (int x, int y, int OffsetX, int OffsetY, vec2 Pos0, vec2 Pos1) const |
bool | IsHookBlocker (int x, int y, vec2 Pos0, vec2 Pos1) const |
int | IsWallJump (int Index) const |
int | IsNoLaser (int x, int y) const |
int | IsFNoLaser (int x, int y) const |
int | IsTimeCheckpoint (int Index) const |
int | IsFTimeCheckpoint (int Index) const |
int | IsMover (int x, int y, int *pFlags) const |
vec2 | CpSpeed (int index, int Flags=0) const |
const CLayers * | Layers () const |
const CTile * | GameLayer () const |
const CTeleTile * | TeleLayer () const |
const CSpeedupTile * | SpeedupLayer () const |
const CTile * | FrontLayer () const |
const CSwitchTile * | SwitchLayer () const |
const CTuneTile * | TuneLayer () const |
vec2 | TeleAllGet (int Number, size_t Offset) |
size_t | TeleAllSize (int Number) |
const std::vector< vec2 > & | TeleIns (int Number) |
const std::vector< vec2 > & | TeleOuts (int Number) |
const std::vector< vec2 > & | TeleCheckOuts (int Number) |
const std::vector< vec2 > & | TeleOthers (int Number) |
Public Attributes | |
int | m_HighestSwitchNumber |
Private Attributes | |
CLayers * | m_pLayers |
int | m_Width |
int | m_Height |
CTile * | m_pTiles |
CTeleTile * | m_pTele |
CSpeedupTile * | m_pSpeedup |
CTile * | m_pFront |
CSwitchTile * | m_pSwitch |
CTuneTile * | m_pTune |
CDoorTile * | m_pDoor |
std::map< int, std::vector< vec2 > > | m_TeleIns |
std::map< int, std::vector< vec2 > > | m_TeleOuts |
std::map< int, std::vector< vec2 > > | m_TeleCheckOuts |
std::map< int, std::vector< vec2 > > | m_TeleOthers |
CCollision::CCollision | ( | ) |
CCollision::~CCollision | ( | ) |
|
inline |
|
inline |
vec2 CCollision::CpSpeed | ( | int | index, |
int | Flags = 0 |
||
) | const |
int CCollision::Entity | ( | int | x, |
int | y, | ||
int | Layer | ||
) | const |
void CCollision::FillAntibot | ( | CAntibotMapData * | pMapData | ) | const |
|
inline |
|
inline |
|
inline |
int CCollision::GetDTileFlags | ( | int | Index | ) | const |
int CCollision::GetDTileIndex | ( | int | Index | ) | const |
int CCollision::GetDTileNumber | ( | int | Index | ) | const |
|
inline |
int CCollision::GetFIndex | ( | int | x, |
int | y | ||
) | const |
int CCollision::GetFTile | ( | int | x, |
int | y | ||
) | const |
int CCollision::GetFTileFlags | ( | int | Index | ) | const |
int CCollision::GetFTileIndex | ( | int | Index | ) | const |
|
inline |
int CCollision::GetIndex | ( | int | x, |
int | y | ||
) | const |
int CCollision::GetMapIndex | ( | vec2 | Pos | ) | const |
std::vector< int > CCollision::GetMapIndices | ( | vec2 | PrevPos, |
vec2 | Pos, | ||
unsigned | MaxIndices = 0 |
||
) | const |
int CCollision::GetMoveRestrictions | ( | CALLBACK_SWITCHACTIVE | pfnSwitchActive, |
void * | pUser, | ||
vec2 | Pos, | ||
float | Distance = 18.0f , |
||
int | OverrideCenterTileIndex = -1 |
||
) | const |
|
inline |
vec2 CCollision::GetPos | ( | int | Index | ) | const |
int CCollision::GetPureMapIndex | ( | float | x, |
float | y | ||
) | const |
|
inline |
void CCollision::GetSpeedup | ( | int | Index, |
vec2 * | pDir, | ||
int * | pForce, | ||
int * | pMaxSpeed | ||
) | const |
int CCollision::GetSwitchDelay | ( | int | Index | ) | const |
int CCollision::GetSwitchNumber | ( | int | Index | ) | const |
int CCollision::GetSwitchType | ( | int | Index | ) | const |
int CCollision::GetTile | ( | int | x, |
int | y | ||
) | const |
int CCollision::GetTileFlags | ( | int | Index | ) | const |
int CCollision::GetTileIndex | ( | int | Index | ) | const |
|
inline |
void CCollision::Init | ( | CLayers * | pLayers | ) |
int CCollision::IntersectAir | ( | vec2 | Pos0, |
vec2 | Pos1, | ||
vec2 * | pOutCollision, | ||
vec2 * | pOutBeforeCollision | ||
) | const |
int CCollision::IntersectLine | ( | vec2 | Pos0, |
vec2 | Pos1, | ||
vec2 * | pOutCollision, | ||
vec2 * | pOutBeforeCollision | ||
) | const |
int CCollision::IntersectLineTeleHook | ( | vec2 | Pos0, |
vec2 | Pos1, | ||
vec2 * | pOutCollision, | ||
vec2 * | pOutBeforeCollision, | ||
int * | pTeleNr = nullptr |
||
) | const |
int CCollision::IntersectLineTeleWeapon | ( | vec2 | Pos0, |
vec2 | Pos1, | ||
vec2 * | pOutCollision, | ||
vec2 * | pOutBeforeCollision, | ||
int * | pTeleNr = nullptr |
||
) | const |
int CCollision::IntersectNoLaser | ( | vec2 | Pos0, |
vec2 | Pos1, | ||
vec2 * | pOutCollision, | ||
vec2 * | pOutBeforeCollision | ||
) | const |
int CCollision::IntersectNoLaserNW | ( | vec2 | Pos0, |
vec2 | Pos1, | ||
vec2 * | pOutCollision, | ||
vec2 * | pOutBeforeCollision | ||
) | const |
bool CCollision::IsCheckEvilTeleport | ( | int | Index | ) | const |
bool CCollision::IsCheckTeleport | ( | int | Index | ) | const |
int CCollision::IsEvilTeleport | ( | int | Index | ) | const |
int CCollision::IsFNoLaser | ( | int | x, |
int | y | ||
) | const |
int CCollision::IsFTimeCheckpoint | ( | int | Index | ) | const |
int CCollision::IsMover | ( | int | x, |
int | y, | ||
int * | pFlags | ||
) | const |
int CCollision::IsNoLaser | ( | int | x, |
int | y | ||
) | const |
int CCollision::IsSolid | ( | int | x, |
int | y | ||
) | const |
int CCollision::IsSpeedup | ( | int | Index | ) | const |
int CCollision::IsTeleCheckpoint | ( | int | Index | ) | const |
int CCollision::IsTeleport | ( | int | Index | ) | const |
int CCollision::IsTeleportHook | ( | int | Index | ) | const |
int CCollision::IsTeleportWeapon | ( | int | Index | ) | const |
int CCollision::IsTimeCheckpoint | ( | int | Index | ) | const |
int CCollision::IsTune | ( | int | Index | ) | const |
int CCollision::IsWallJump | ( | int | Index | ) | const |
|
inline |
void CCollision::MoveBox | ( | vec2 * | pInoutPos, |
vec2 * | pInoutVel, | ||
vec2 | Size, | ||
vec2 | Elasticity, | ||
bool * | pGrounded = nullptr |
||
) | const |
void CCollision::MovePoint | ( | vec2 * | pInoutPos, |
vec2 * | pInoutVel, | ||
float | Elasticity, | ||
int * | pBounces | ||
) | const |
void CCollision::SetCollisionAt | ( | float | x, |
float | y, | ||
int | Index | ||
) |
void CCollision::SetDCollisionAt | ( | float | x, |
float | y, | ||
int | Type, | ||
int | Flags, | ||
int | Number | ||
) |
|
inline |
|
inline |
vec2 CCollision::TeleAllGet | ( | int | Number, |
size_t | Offset | ||
) |
Index all teleporter types (in, out and checkpoints) as one consecutive list.
Number | is the teleporter number (one less than what is shown in game) |
Offset | picks the n'th occurence of that teleporter in the map |
size_t CCollision::TeleAllSize | ( | int | Number | ) |
Number | is the teleporter number (one less than what is shown in game) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool CCollision::TileExists | ( | int | Index | ) | const |
bool CCollision::TileExistsNext | ( | int | Index | ) | const |
|
inline |
void CCollision::Unload | ( | ) |
|
private |
int CCollision::m_HighestSwitchNumber |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |