117 lines
1.9 KiB
C++
117 lines
1.9 KiB
C++
#include <raylib.h>
|
|
|
|
enum Jobs {
|
|
MAGE = 0,
|
|
ALCHIMIST = 1,
|
|
WARRIOR = 2,
|
|
ENGINEER = 3,
|
|
ARCHER = 4,
|
|
TAMER = 5
|
|
};
|
|
|
|
enum Elements {
|
|
FIRE = 0,
|
|
AIR = 1,
|
|
WATER = 2,
|
|
EARTH = 3,
|
|
EATHER = 4
|
|
};
|
|
|
|
enum Stats {
|
|
HEALTH,
|
|
SHIELD,
|
|
SPEED,
|
|
MANA,
|
|
ENERGY,
|
|
TAME,
|
|
XP
|
|
};
|
|
|
|
enum Button_types {
|
|
BUTTON_BASIC,
|
|
BUTTON_INACTIVE,
|
|
BUTTON_DANGER
|
|
};
|
|
|
|
enum Button_sizes {
|
|
BUTTON_SMALL,
|
|
BUTTON_MEDIUM,
|
|
BUTTON_BIG
|
|
};
|
|
|
|
//Combinaisons
|
|
constexpr const int UP = 0;
|
|
constexpr const int RIGHT = 1;
|
|
constexpr const int DOWN = 2;
|
|
constexpr const int LEFT = 3;
|
|
constexpr const int END_SPELL = 9;
|
|
|
|
|
|
|
|
struct Spell {
|
|
std::string name;
|
|
int damage;
|
|
int cost_health, cost_mana;
|
|
float precision;
|
|
bool zone;
|
|
std::vector<Elements> elements;
|
|
std::vector<int> combinaison;
|
|
};
|
|
|
|
struct Ennemy {
|
|
std::string name;
|
|
int xp;
|
|
float health, shield, speed, tame;
|
|
float max_health, max_shield, max_speed, max_tame;
|
|
float escape, menace; //Menace comlpexifies the escape, the higher the value is, the less menace it is
|
|
std::vector<Spell> spells; // A FAIRE : stocke l'index parmis tous les spells
|
|
};
|
|
|
|
struct Player {
|
|
std::string name;
|
|
Jobs job;
|
|
int xp;
|
|
float health, shield, speed, mana, energy;
|
|
float max_health, max_shield, max_speed, max_mana, max_energy;
|
|
float escape, menace;
|
|
std::vector<Spell> spell_book; // A FAIRE : stocke l'index parmis tous les spells
|
|
};
|
|
|
|
|
|
|
|
|
|
//Graphics
|
|
|
|
struct Text {
|
|
Font font;
|
|
std:: string text;
|
|
Vector2 position;
|
|
float fontSize, spacing;
|
|
Color tint;
|
|
};
|
|
|
|
struct Button {
|
|
Rectangle rectangle;
|
|
Color color;
|
|
Text text;
|
|
};
|
|
|
|
struct Bar {
|
|
Rectangle complete, progression;
|
|
float max;
|
|
float actual;
|
|
Text text;
|
|
Color color;
|
|
};
|
|
|
|
struct Ennemy_stats {
|
|
Rectangle card;
|
|
Text name, level;
|
|
Bar health, shield, speed, tame;
|
|
};
|
|
|
|
struct Player_stats {
|
|
Rectangle card;
|
|
Text name, level, job;
|
|
Bar health, shield, speed, mana, energy;
|
|
}; |