One of my first programming projects. I tried to learn C and use curses...it is quite embarrassing looking back at it now :D
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <world.h>
|
|
struct Entity * collisionDetect(int objYpos, int objXpos){
|
|
int i;
|
|
for(i=1; i<MAX_ENTITIES; i++){
|
|
if(allEntities[i].isAlive){
|
|
if(objYpos==allEntities[i].curYpos && objXpos==allEntities[i].curXpos){
|
|
return &allEntities[i];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|