wall.h 708 B

12345678910111213141516171819
  1. #ifndef WALL_H
  2. #define WALL_H
  3. #include "stdlib.h"
  4. #include "struct.h"
  5. #include "MonochromeLib.h"
  6. #include "math.h"
  7. //adds a wall to the linked list specified in the parameter "list"
  8. Wall *addWall(Wall *list, int d, int h, int id, int line);//returns a new pointer to the first element
  9. //removes every wall from "list" whose d member is smaller than the "d" passed as argument
  10. Wall *removeWall(Wall *list, int d); //returns a new pointer to the first element
  11. //show the ll "list"
  12. void show(Wall *list, Camera *cam);
  13. //updates the ll "list"
  14. void update(Wall *list);
  15. //simple collision test. Returns true if a Wall from the list collides with the player
  16. bool isColliding(Wall *list, int player_angle);
  17. #endif