123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- #ifndef _functions_
- #define _functions_
- //#includes here
- #include "definitions.hpp"
- #include "box.hpp"
- #include "player.hpp"
- #include "bullet.hpp"
- #include "enemy.hpp"
- #include "wall.hpp"
- #include "boss.hpp"
- class record
- {
- public:
- int score;
- std::string nick;
- bool operator==(record& record2)
- {
- if(score==record2.score && nick==record2.nick)
- return true;
- else return false;
- }
-
-
- void print();
-
- void printwin(WINDOW*);
- void print(std::ofstream& record);
-
- };
- typedef std::list<bullet> b_list;
- typedef std::list<enemy> e_list;
- typedef std::vector<record> r_vec;
- typedef std::vector<wall> w_vec;
- void print_title();
- void print_catchphrase(std::string phrase);
- std::string choose_phrase();
- void print_info();
- void print_scores();
- void choose_level(double& shootr, int& refresh_t, boss &boss1, char& level, int& enemy_num,int* commands);
- void change_commands(int* commands);
- void load_enemies(e_list& enemies,int enemy_num);
- bool playagain(WINDOW*);
- bool gameover(player&,b_list&);
- void reset(player&, e_list &, boss&, b_list& bullets, b_list& bombs, w_vec& walls, b_list &powerups,r_list&,char level,int& chflag);
- bool enemyalive(e_list &);
- void refreshrecords(int,WINDOW*);
- void write_score(WINDOW*,int);
- void write_bosshp(WINDOW*,int,int,std::string);
- void pause_game(int&);
- void Victory(std::string,int,char,int);
- void Defeat(int);
- void choose_level_bossrush(double& shootr,int& refresh_t,char& level,int* commands);
- void resetbosses(boss* Bosses,boss& boss1,player& player1);
- void Victory_bossrush(std::string,int,char,int);
- void refreshrecords_bossrush(int,WINDOW*);
- void print_scores_bossrush();
- void get_SpecialMode(int,int&,boss&,e_list&,b_list&,b_list&,b_list&,r_list&);
- bool get_KonamiCode(int);
- void get_cheat(char,player&,e_list&,double&);
- void activate_combo(boss&,e_list&,b_list&,b_list&,b_list&,r_list&);
- void drop_powerup(int x,int y,b_list& powerups);
- 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);
- void draw(player& player1,b_list& bullets,b_list& bombs,e_list& enemies,w_vec& walls,b_list& powerups,r_list& rockets,boss& boss1);
- void create_readme();
- void create_std_bosses();
- //void create_setsize();
- void create_folder(int);
- // FORK FUNCTIONS (unused)
- /*void music();
- void kill_music(int);*/
- /*//PTHREAD FUNCTIONS
- void *pmusic(void *arg);
- void *pshoot_sound(void* arg);
- void *penshoot_sound(void* arg);
- void *pwin_theme(void *arg);
- void *plose_theme(void* arg);
- void pkill_music(pthread_t);*/
- #endif
|