A simple 2d box collision checking function implemented in C++ and SDL