functions.hpp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. void choose_level(double& shootr, int& refresh_t, boss &boss1, char& level, int& enemy_num,int* commands);
  36. void change_commands(int* commands);
  37. void load_enemies(e_list& enemies,int enemy_num);
  38. bool playagain(WINDOW*);
  39. bool gameover(player&,b_list&);
  40. void reset(player&, e_list &, boss&, b_list& bullets, b_list& bombs, w_vec& walls, b_list &powerups,r_list&,char level,int& chflag);
  41. bool enemyalive(e_list &);
  42. void refreshrecords(int,WINDOW*);
  43. void write_score(WINDOW*,int);
  44. void write_bosshp(WINDOW*,int,int,std::string);
  45. void pause_game(int&);
  46. void Victory(std::string,int,char,int);
  47. void Defeat(int);
  48. void choose_level_bossrush(double& shootr,int& refresh_t,char& level,int* commands);
  49. void resetbosses(boss* Bosses,boss& boss1,player& player1);
  50. void Victory_bossrush(std::string,int,char,int);
  51. void refreshrecords_bossrush(int,WINDOW*);
  52. void print_scores_bossrush();
  53. void get_SpecialMode(int,int&,boss&,e_list&,b_list&,b_list&,b_list&,r_list&);
  54. bool get_KonamiCode(int);
  55. void get_cheat(char,player&,e_list&,double&);
  56. void activate_combo(boss&,e_list&,b_list&,b_list&,b_list&,r_list&);
  57. void drop_powerup(int x,int y,b_list& powerups);
  58. 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);
  59. void draw(player& player1,b_list& bullets,b_list& bombs,e_list& enemies,w_vec& walls,b_list& powerups,r_list& rockets,boss& boss1);
  60. void create_readme();
  61. void create_std_bosses();
  62. //void create_setsize();
  63. void create_folder(int);
  64. // FORK FUNCTIONS (unused)
  65. /*void music();
  66. void kill_music(int);*/
  67. /*//PTHREAD FUNCTIONS
  68. void *pmusic(void *arg);
  69. void *pshoot_sound(void* arg);
  70. void *penshoot_sound(void* arg);
  71. void *pwin_theme(void *arg);
  72. void *plose_theme(void* arg);
  73. void pkill_music(pthread_t);*/
  74. #endif