#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include "main.h"

void objcoll(void);

extern int objcoll_PLAYER_obj1(void *, unsigned int, struct VG_Coll *);
extern int objcoll_PLAYER_obj2(void *, unsigned int, struct VG_Coll *);
extern int objcoll_BOMB_obj1(void *, unsigned int, struct VG_Coll *);
extern int objcoll_BOMB_obj2(void *, unsigned int, struct VG_Coll *);
extern int objcoll_GD_DYN_obj1(void *, unsigned int, struct VG_Coll *);
extern int objcoll_GD_DYN_obj2(void *, unsigned int, struct VG_Coll *);
extern int objcoll_PLAYER_EXIT(void *, unsigned int, struct VG_Coll *);
extern int objcoll_PLAYER_HUNTER(void *, unsigned int, struct VG_Coll *);
extern int objcoll_GD_PORTAL_obj1(void *, unsigned int, struct VG_Coll *);


/* add object-collision functions */
void objcoll(void)
{
  vg4->object->collision_add(OBJID_PLAYER, OBJID_BOUNDARY, objcoll_PLAYER_obj1);
  vg4->object->collision_add(OBJID_PLAYER, OBJID_OHARD, objcoll_PLAYER_obj1);
  vg4->object->collision_add(OBJID_PLAYER, OBJID_OSOFT, objcoll_PLAYER_obj1);
  vg4->object->collision_add(OBJID_PLAYER, OBJID_GD_HEART, objcoll_PLAYER_obj2);
  vg4->object->collision_add(OBJID_PLAYER, OBJID_GD_KEY, objcoll_PLAYER_obj2);
  vg4->object->collision_add(OBJID_PLAYER, OBJID_GD_PILL, objcoll_PLAYER_obj2);
  vg4->object->collision_add(OBJID_PLAYER, OBJID_GD_KEYHOLE, objcoll_PLAYER_obj2);
  vg4->object->collision_add(OBJID_PLAYER, OBJID_GD_BOMBS, objcoll_PLAYER_obj2);
  vg4->object->collision_add(OBJID_PLAYER, OBJID_GD_GOLD, objcoll_PLAYER_obj2);
  vg4->object->collision_add(OBJID_BOMB, OBJID_PLAYER, objcoll_BOMB_obj1);
  vg4->object->collision_add(OBJID_BOMB, OBJID_HUNTER, objcoll_BOMB_obj1);
  vg4->object->collision_add(OBJID_BOMB, OBJID_OHARD, objcoll_BOMB_obj2);
  vg4->object->collision_add(OBJID_BOMB, OBJID_OSOFT, objcoll_BOMB_obj2);
  vg4->object->collision_add(OBJID_GD_DYN, OBJID_PLAYER, objcoll_GD_DYN_obj1);
  vg4->object->collision_add(OBJID_GD_DYN, OBJID_HUNTER, objcoll_GD_DYN_obj1);
  vg4->object->collision_add(OBJID_GD_DYN, OBJID_OHARD, objcoll_GD_DYN_obj2);
  vg4->object->collision_add(OBJID_GD_DYN, OBJID_OSOFT, objcoll_GD_DYN_obj2);
  vg4->object->collision_add(OBJID_PLAYER, OBJID_EXIT, objcoll_PLAYER_EXIT);
  vg4->object->collision_add(OBJID_PLAYER, OBJID_HUNTER, objcoll_PLAYER_HUNTER);
  vg4->object->collision_add(OBJID_GD_PORTAL, OBJID_PLAYER, objcoll_GD_PORTAL_obj1);
  vg4->object->collision_add(OBJID_GD_PORTAL, OBJID_HUNTER, objcoll_GD_PORTAL_obj1);
}
