functions.hpp 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. #ifndef _functions_
  2. #define _functions_
  3. //#includes here
  4. #include "definitions.hpp"
  5. #include "box.hpp"
  6. #include "player.hpp"
  7. #include "bullet.hpp"
  8. #include "enemy.hpp"
  9. #include "wall.hpp"
  10. #include "boss.hpp"
  11. class record
  12. {
  13. public:
  14. int score;
  15. std::string nick;
  16. bool operator==(record& record2)
  17. {
  18. if(score==record2.score && nick==record2.nick)
  19. return true;
  20. else return false;
  21. }
  22. void print();
  23. void printwin(WINDOW*);
  24. void print(std::ofstream& record);
  25. };
  26. typedef std::list<bullet> b_list;
  27. typedef std::list<enemy> e_list;
  28. typedef std::vector<record> r_vec;
  29. typedef std::vector<wall> w_vec;
  30. void print_title();
  31. void print_catchphrase(std::string phrase);
  32. std::string choose_phrase();
  33. void print_info();
  34. void print_scores();
  35. int choose_level(int* commands);
  36. void setup_level(int level, double& shootr, int& refresh_t, boss& boss1, int& enemy_num, int* commands);
  37. void change_commands(int* commands);
  38. void load_enemies(e_list& enemies,int enemy_num);
  39. char playagain(WINDOW*);
  40. bool gameover(player&,b_list&);
  41. void reset(player&, e_list &, boss&, b_list& bullets, b_list& bombs, w_vec& walls, b_list &powerups,r_list&,char level,int& chflag);
  42. bool enemyalive(e_list &);
  43. void refreshrecords(int,WINDOW*);
  44. void write_score(WINDOW*,int);
  45. void write_bosshp(WINDOW*,int,int,std::string);
  46. void pause_game(int&);
  47. void Victory(std::string,int,char,int);
  48. void Defeat(int);
  49. int choose_level_bossrush(int* commands);
  50. void setup_level_bossrush(int level, double& shootr,int& refresh_t);
  51. void resetbosses(boss* Bosses,boss& boss1,player& player1);
  52. void Victory_bossrush(std::string,int,char,int);
  53. void refreshrecords_bossrush(int,WINDOW*);
  54. void print_scores_bossrush();
  55. void get_SpecialMode(int,int&,boss&,e_list&,b_list&,b_list&,b_list&,r_list&);
  56. bool get_KonamiCode(int);
  57. void get_cheat(char,player&,e_list&,double&);
  58. void activate_combo(boss&,e_list&,b_list&,b_list&,b_list&,r_list&);
  59. void drop_powerup(int x,int y,b_list& powerups);
  60. void interactions(player& player1,b_list& bullets,b_list& bombs,e_list& enemies,w_vec& walls,b_list& powerups,r_list& rockets,boss& boss1,int& score);
  61. void draw(player& player1,b_list& bullets,b_list& bombs,e_list& enemies,w_vec& walls,b_list& powerups,r_list& rockets,boss& boss1);
  62. void create_readme();
  63. void create_std_bosses();
  64. //void create_setsize();
  65. void create_folder(int);
  66. // FORK FUNCTIONS (unused)
  67. /*void music();
  68. void kill_music(int);*/
  69. /*//PTHREAD FUNCTIONS
  70. void *pmusic(void *arg);
  71. void *pshoot_sound(void* arg);
  72. void *penshoot_sound(void* arg);
  73. void *pwin_theme(void *arg);
  74. void *plose_theme(void* arg);
  75. void pkill_music(pthread_t);*/
  76. #endif