Path: blob/master/RSDKv5/RSDK/Scene/Legacy/v4/CollisionLegacyv4.hpp
1188 views
1namespace Legacy2{34namespace v45{67enum CollisionSides {8CSIDE_FLOOR = 0,9CSIDE_LWALL = 1,10CSIDE_RWALL = 2,11CSIDE_ROOF = 3,12CSIDE_LENTITY = 4, // Added in Origins Plus13CSIDE_RENTITY = 5, // Added in Origins Plus14};1516enum CollisionModes {17CMODE_FLOOR = 0,18CMODE_LWALL = 1,19CMODE_ROOF = 2,20CMODE_RWALL = 3,21};2223enum CollisionSolidity {24SOLID_ALL = 0,25SOLID_TOP = 1,26SOLID_LRB = 2,27SOLID_NONE = 3,28SOLID_TOP_NOGRIP = 4,29};3031enum ObjectCollisionTypes {32C_TOUCH = 0,33C_SOLID = 1,34C_SOLID2 = 2,35C_PLATFORM = 3,36};3738enum ObjectCollisionFlags {39C_BOX = 0x10000,40};4142struct CollisionSensor {43int32 xpos;44int32 ypos;45int32 angle;46bool32 collided;47};4849extern int32 collisionLeft;50extern int32 collisionTop;51extern int32 collisionRight;52extern int32 collisionBottom;5354extern int32 collisionTolerance;5556extern CollisionSensor sensors[7];5758#if !RETRO_USE_ORIGINAL_CODE59int32 AddDebugHitbox(uint8 type, Entity *entity, int32 left, int32 top, int32 right, int32 bottom);60#endif6162Hitbox *GetHitbox(Entity *entity);6364void FindFloorPosition(Entity *player, CollisionSensor *sensor, int32 startYPos);65void FindLWallPosition(Entity *player, CollisionSensor *sensor, int32 startXPos);66void FindRoofPosition(Entity *player, CollisionSensor *sensor, int32 startYPos);67void FindRWallPosition(Entity *player, CollisionSensor *sensor, int32 startXPos);6869void FloorCollision(Entity *player, CollisionSensor *sensor);70void LWallCollision(Entity *player, CollisionSensor *sensor);71void RoofCollision(Entity *player, CollisionSensor *sensor);72void RWallCollision(Entity *player, CollisionSensor *sensor);7374void SetPathGripSensors(Entity *player);75void ProcessPathGrip(Entity *player);76void ProcessAirCollision(Entity *player);7778void ProcessTileCollisions(Entity *player);7980void TouchCollision(Entity *thisEntity, int32 thisLeft, int32 thisTop, int32 thisRight, int32 thisBottom, Entity *otherEntity, int32 otherLeft,81int32 otherTop, int32 otherRight, int32 otherBottom);82void BoxCollision(Entity *thisEntity, int32 thisLeft, int32 thisTop, int32 thisRight, int32 thisBottom, Entity *otherEntity, int32 otherLeft,83int32 otherTop, int32 otherRight, int32 otherBottom); // Standard84void BoxCollision2(Entity *thisEntity, int32 thisLeft, int32 thisTop, int32 thisRight, int32 thisBottom, Entity *otherEntity, int32 otherLeft,85int32 otherTop, int32 otherRight, int32 otherBottom); // Updated (?)86void PlatformCollision(Entity *thisEntity, int32 thisLeft, int32 thisTop, int32 thisRight, int32 thisBottom, Entity *otherEntity, int32 otherLeft,87int32 otherTop, int32 otherRight, int32 otherBottom);8889void ObjectFloorCollision(int32 xOffset, int32 yOffset, int32 cPath);90void ObjectLWallCollision(int32 xOffset, int32 yOffset, int32 cPath);91void ObjectRoofCollision(int32 xOffset, int32 yOffset, int32 cPath);92void ObjectRWallCollision(int32 xOffset, int32 yOffset, int32 cPath);9394void ObjectFloorGrip(int32 xOffset, int32 yOffset, int32 cPath);95void ObjectLWallGrip(int32 xOffset, int32 yOffset, int32 cPath);96void ObjectRoofGrip(int32 xOffset, int32 yOffset, int32 cPath);97void ObjectRWallGrip(int32 xOffset, int32 yOffset, int32 cPath);98void ObjectLEntityGrip(int32 xOffset, int32 yOffset, int32 cPath); // Added in Origins Plus99void ObjectREntityGrip(int32 xOffset, int32 yOffset, int32 cPath); // Added in Origins Plus100101} // namespace v4102103} // namespace Legacy104105