/* object-collision OBJID_PLAYER against OBJID_BOUNDARY, OBJID_OHARD, OBJID_OSOFT */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include "obj-player.h"
#include "obj-boundary.h"
#include "obj-ohard.h"
#include "obj-osoft.h"

int objcoll_PLAYER_obj1(void *, unsigned int, struct VG_Coll *);


int
objcoll_PLAYER_obj1(void *vgame, unsigned int instanceid, struct VG_Coll *collb)
{
  struct s_game *sgame = (struct s_game *)vgame;
  int retw = VG_COLL_RETURN_CONTINUE;

  if (sgame == NULL) { return retw; }
  (void)instanceid;

  if (collb->type == VG_COLL_TYPE_LEAVE) { return retw; }

  /* as PLAYER can move only in x- or y-direction, collb->side needs not to be checked */
  retw = VG_COLL_RETURN_STOP;

  return retw;
}
