wall.h 950 B

1234567891011121314151617181920
  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, Game_Data *data, int nb_lines, Line_Transition line_transition);
  12. // updates the ll "list"
  13. void updateWalls(Wall *list, unsigned int delta_time);
  14. // Tests if the players hits a wall by its sides and not only by being crushed under it.
  15. bool isCollidingSide(Wall *list, int player_angle, int nb_lines);
  16. // simple collision test. Returns true if a Wall from the list collides with the player
  17. bool isColliding(Wall *list, int player_angle, int nb_lines);
  18. #endif