Lately I’ve been thinking it would be really useful to have a pointer that handles collisions in 2d games. I'm still a beginner in programming so I don't know how to make one.
This is what it looks like now.

Code:
//collision.h
#ifndef collision_h
#define collision_h

#define STOP (1<<0)
#define BOUNCE (1<<1)
#define CUSTOME (1<<2)

typedef struct COLLISION
{
	long flags;
} COLLISION;

#endif



This is how I want it to look like when someone wants to use it.
Code:
COLLISION* test =
{
	Flags = STOP | BOUNCE | CUSTOM;
	Panel 1 = ?;
	Panel 2 = ?;
	Function  = action();
}



BOUNCE makes the panel bounce when it collides with another panel.
STOP makes the panel stop when it collides with another panel.
CUSTOM makes the panel do what the function attached to it says to do when it collides with another panel.

So can anyone help me make this work, because I have know idea where to go from here.
When its finished and working I’ll put it in the download section.


If "Pro" is the opposite of "Con", then is progress the opposite of congress?