functions.hpp 2.7 KB

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