MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / FindGridShift

Function FindGridShift

TombEngine/Game/collision/collide_room.cpp:79–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79int FindGridShift(int x, int z)
80{
81 if ((x / BLOCK(1)) == (z / BLOCK(1)))
82 return 0;
83
84 if ((z / BLOCK(1)) <= (x / BLOCK(1)))
85 {
86 return (-1 - (x & WALL_MASK));
87 }
88 else
89 {
90 return ((BLOCK(1) + 1) - (x & WALL_MASK));
91 }
92}
93
94// Test if the axis-aligned bounding box collides with geometry at all.
95bool TestItemRoomCollisionAABB(ItemInfo* item)

Callers 1

GetCollisionInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected