-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.h
103 lines (90 loc) · 2.48 KB
/
header.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#ifndef HEADER_H_INCLUDED
#define HEADER_H_INCLUDED
/**********************************
* Denis Christopher *
* *
* POKEFIGHT *
* 2017-2018 *
* *
* OPEN SOURCE *
**********************************/
/// Désolé, le code est un peu en bordel. J'ai baclé la fin, pour me concentrer sur la création d'une bibliothèque.
/// Le programme fonctionne, mais n'est pas surement pas optimisé.
/// Vous pouvez reprendre mon code, l'améliorer, ...
/** INCLUDES **/
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <time.h>
#include <ctype.h>
#include <conioplus.h>
/** CONSTANTES **/
#define VERSION "2.2.0.1"
#define PLAYER_NAME 11
#define NB_POKEMON 8
#define NB_POKEBALL 1
#define COL 1
#define LIN 1
#define LNBAR 25
/** STRUCTURES **/
struct health
{
float current_health;
float max_health;
};
struct experience
{
int current_experience;
int max_experience;
};
struct attack
{
char *name;
int damage;
int use;
float success;
};
struct pokemon
{
char *name;
int level;
struct health hp;
struct experience exp;
struct attack atk1;
struct attack atk2;
struct attack atk3;
struct attack atk4;
};
struct pokedex
{
int id;
char *name;
int captured;
};
struct pokeball
{
int id;
char *name;
int quantity;
float success1;
float success2;
float success3;
};
struct player
{
char pseudo[PLAYER_NAME];
float money;
int potion;
};
/** FONCTIONS **/
extern void display_loading(int lin, int col);
extern void loading_bar(int lnbar, int lin, int col);
extern int ennemy_finder(struct pokemon pokemon_list[], int lnbar, int lin, int col);
extern void display_interface(char *title);
extern int display_fight_interface(struct pokemon my_pokemon[], int my_id, struct pokemon pokemon_list[], int id, char *title);
extern void health_bar(struct pokemon pokemon_list[], int pokemon_id, int lin, int col, int lnbar);
extern void experience_bar(struct pokemon pokemon_list[], int pokemon_id, int lin, int col, int lnbar);
extern void pokemon_stats(struct pokemon [], int pokemon_id, int lin, int col);
extern void pokedex(struct pokedex pokedex1[], int lin, int col);
extern int update_level(int *current_experience, int *max_experience, int *level);
#endif // HEADER_H_INCLUDED