wall.h 784 B

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