Well my code compiles now. A new issue has risen though. My code now looks like this:
ball.cpp
ball.SetCallback((byte*)Paddle::EntityCollisionCallback, ENTITYCALLBACK_COLLISION);
paddle.cpp
void _stdcall Paddle::EntityCollisionCallback(TEntity source, TEntity destination, byte* position, byte* normal, byte* force, float speed)
{
int type = GetEntityType(source);
}
The method is declared static in the header of the Paddle class.
When I run it, it detects a collision, calls the callback method between 8 to 16 times (approximately) (10 runs) without updating or rendering in between, and then craps out on framework.Update(), giving me an AccessViolationException.
Any idea what's going on here?