12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- #ifndef _definitions_
- #define _definitions_
- //MAIN LIBRARIES INCLUDES
- #include <cstdlib>
- #include <ctime>
- #include <fstream>
- #include <sstream>
- #include <algorithm>
- #include <iostream>
- #include <iomanip>
- #include <list>
- #include <vector>
- #include <cmath>
- #include <unistd.h>
- //#include <pthread.h> //for sounds
- #include <sys/stat.h> //for making directories
- #include <ncurses.h> //for graphics
- #include <mutex>
- //GAME BOX DIMENSIONS
- #define R 30 //rows (Y)
- #define C 60 //columns (X)
- //GAME DEFINES
- #define AVERAGE_DROP 2
- #define POWERUP_RATIO 2
- #define ROCKET_RATIO 3
- #define MAX_WEAPONCLASS 5
- #define MAX_WEAPONCLASSRKT 5
- #define MAX_LENGTH 20
- #define CMD_NUM 9
- #ifdef R
- #define MAX_WIDTH R
- #endif
- #ifdef C
- #define MAX_HEIGHT C
- #endif
- #define GLOBAL_DIR "/home/150/invaders/"
- #define RECORD_DIR "/.invaders/"
- #define RECORD_FILE "records.dat"
- #define RECORD_FILE_BOSSRUSH "records_bossrush.dat"
- #define CHEAT_CODE "pinkie"
- #define BOSS_FILE1 "spoletini"
- #define BOSS_FILE2 "palombo"
- #define BOSS_FILE3 "maderna"
- #define BOSS_FILE4 "maero"
- #define BOSS_FILE5 "big_alienboss"
- #define PLAYER_SPRITE '='
- #define ENEMY_SPRITE '#'
- #define BULLET_SPRITE '|'
- #define BOMB_SPRITE 'o'
- #define POWERUP1_SPRITE '+'
- #define POWERUP2_SPRITE '-'
- #define POWERUP3_SPRITE 'X'
- #define WALL_SPRITE '@'
- #define ROCKET_SPRITE '^'
- //THREAD DEFINES
- //#define THREADS_NUM 5
- //COLORS
- #define red "\033[31m"
- #define crimson "\033[1;31m"
- #define magenta "\033[35m"
- #define violet "\033[1;35m"
- #define green "\033[32m"
- #define lightgreen "\033[1;32m"
- #define blue "\033[34m"
- #define lightblue "\033[1;34m"
- #define none "\033[0m"
- #define yellow "\033[33m"
- #define orange "\033[1;33m"
- #define cyan "\033[36m"
- #define azure "\033[1;36m"
- #define grey "\e[1;30m"
- #define backred "\033[41m"
- #define backcyan "\033[46m"
- #define backgreen "\033[1;42m"
- extern int ENEMY_NUM;
- static int WALLS_NUM;
- extern std::mutex m_player;
- extern std::mutex m_enemies;
- extern std::mutex m_bombs;
- extern std::mutex m_bullets;
- extern std::mutex m_rockets;
- extern std::mutex m_pow;
- extern std::mutex m_boss;
- extern std::mutex m_walls;
- #endif
|