Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lemeilleurjeudumonde
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tacticalrpg
lemeilleurjeudumonde
Commits
a9230520
Commit
a9230520
authored
9 years ago
by
ColinDrieu
Browse files
Options
Downloads
Patches
Plain Diff
Commentaire ajoutes sur le fichier structure.h
Commentaires ajoutes pour repondre a la syntaxe Doxygen
parent
b0d3f6bc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/structures.h
+78
-42
78 additions, 42 deletions
src/structures.h
with
78 additions
and
42 deletions
src/structures.h
+
78
−
42
View file @
a9230520
/* \file structures.h
* \brief Fichier contenant les principales structures.
*/
#ifndef STRUCTURES_H_INCLUDED
#define STRUCTURES_H_INCLUDED
/* \def TAILLE_MAX_CARTE */
#define TAILLE_MAX_CARTE 256
/* \def TAILLE_NOMS */
#define TAILLE_NOMS 16
/* definition des structures nécessaires */
...
...
@@ -16,74 +22,104 @@
/* Competence */
/* \enum boolean
* \brief Definition du type boolean.
* faux=0, vrai=1
*/
typedef
enum
{
faux
,
vrai
}
boolean
;
/* \struct Type_terrain structures.h
* \brief Definition de la structure Type_terrain
*/
typedef
struct
{
char
nom
[
TAILLE_NOMS
];
boolean
franchissable
;
boolean
franchissable_sorts
;
unsigned
short
int
PD_requis
;
char
nom
[
TAILLE_NOMS
];
/*<Nom du terrain. */
boolean
franchissable
;
/*<Le terrain est franchissable ou non par un personnage. */
boolean
franchissable_sorts
;
/*<Le terrain est franchissable ou non par un sort. */
unsigned
short
int
PD_requis
;
/*<Nombre de PD requis pour traverser le terrain. */
}
Type_terrain
;
/* \struct Case structures.h
* \brief Definition de la structure Case
*/
typedef
struct
Case
{
unsigned
short
int
coord_x
;
unsigned
short
int
coord_y
;
Type_terrain
*
terrain
;
boolean
occupee
;
unsigned
short
int
coord_x
;
/*<Abscisse de la case*/
unsigned
short
int
coord_y
;
/*<Ordonnee de la case*/
Type_terrain
*
terrain
;
/*<Le type de terrain de la case*/
boolean
occupee
;
/*<La case est occupee ou non par un personnage*/
}
Case
;
/* \typedef carte structures.h
* \brief Definition du type Carte
* La carte est un tableau de Case de taille TAILLE_MAX_CARTE.
*/
typedef
Case
carte
[
TAILLE_MAX_CARTE
];
/* \struct Case structures.h
* \brief Definition de la structure Attaque.
*/
typedef
struct
{
char
nom
[
TAILLE_NOMS
];
unsigned
short
int
degats_directs
;
unsigned
short
int
degats_permanents
;
unsigned
short
int
portee
;
Effet
effets
[];
char
nom
[
TAILLE_NOMS
];
/*<Nom de l'attaque de taille TAILLE_NOMS*/
unsigned
short
int
degats_directs
;
/*<Degats direct occasionnes*/
unsigned
short
int
degats_permanents
;
/*<Degats permanents occasionnes*/
unsigned
short
int
portee
;
/*<Portee en nombre de cases de l'attaque*/
Effet
effets
[];
/*<Tableau des effets appliques par l'attaque*/
}
Attaque
;
/* \struct Classee structures.h
* \brief Definition de la structure Classe.
*/
typedef
struct
{
char
nom
[
TAILLE_NOMS
];
Attaque
*
attaques
;
unsigned
short
int
points_deplacement_max
;
unsigned
short
int
PV_max
;
unsigned
short
int
mana_max
;
char
nom
[
TAILLE_NOMS
];
/*<Nom de la classe de taille TAILLE_NOMS*/
Attaque
*
attaques
;
/*<Les attaques disponibles pour la classe*/
unsigned
short
int
points_deplacement_max
;
/*<Les PD maximums accordés a la classe*/
unsigned
short
int
PV_max
;
/*<Les PV maximums accordés a la classe*/
unsigned
short
int
mana_max
;
/*<Le mana maximum accordé a la classe*/
}
Classe
;
/* \struct Personnage structures.h
* \brief Definition de la structure Personnage.
*/
typedef
struct
{
char
nom
[
TAILLE_NOMS
];
Classe
classe
;
unsigned
short
int
points_deplacement
;
unsigned
short
int
PV
;
unsigned
short
int
mana
;
Case
*
position
;
Effet
effets
[];
char
nom
[
TAILLE_NOMS
];
/*<Nom du personnage de taille TAILLE_NOMS*/
Classe
classe
;
/*<La classe dont depend le personnage */
unsigned
short
int
points_deplacement
;
/*<Les PD actuels du personnage*/
unsigned
short
int
PV
;
/*<Les PV actuels du personnage*/
unsigned
short
int
mana
;
/*<Le mana actuel du personnage*/
Case
*
position
;
/*<La case representant la position actuelle du personnage*/
Effet
effets
[];
/*<Un tableau d'effets representant les effets affectant le personnage*/
}
Personnage
;
/* \struct Personnage structures.h
* \brief Definition de la structure Personnage.
*/
typedef
struct
{
unsigned
int
nb_tours_restants
;
unsigned
int
valeur_degats_duree
;
unsigned
int
valeur_soin_duree
;
boolean
paralysie
;
unsigned
int
nb_tours_restants
;
/*<Le nombre de tours restants avant que l'effet ne s'estompe*/
unsigned
int
valeur_degats_duree
;
/*<Le nombre de degat de duree subit par tour*/
unsigned
int
valeur_soin_duree
;
/*<Le nombre PV regeneres par tour*/
boolean
paralysie
;
/*<L'effet provoque ou non une paralysie*/
}
Effet
;
/* \struct Competence structures.h
* \brief Definition de la structure Competences.
* Les competences sont representees sous forme d'arbre chaque
* parent ayant 2 enfants.
*/
typedef
struct
competence
{
unsigned
short
int
id
;
char
nom
[
TAILLE_NOMS
];
unsigned
short
int
etage
;
struct
competence
*
enfant_gauche
;
struct
competence
*
enfant_droit
;
struct
effet_competence
*
effet
;
boolean
connu
;
unsigned
short
int
id
;
/*<Un entier qui represente la competence*/
char
nom
[
TAILLE_NOMS
];
/*<Nom de la competence de taille TAILLE_NOMS*/
unsigned
short
int
etage
;
/*<Etage de la competence dans l'arbre*/
struct
competence
*
enfant_gauche
;
/*<Pointeur vers le premier enfant de la competence*/
struct
competence
*
enfant_droit
;
/*<Pointeur vers le deuxieme enfant de la competence*/
struct
effet_competence
*
effet
;
/*<Pointeur vers les effets de la competence*/
boolean
connu
;
/*<La competence est connue ou non*/
}
Competence
;
/* \struct effet_competence structures.h
* \brief Definition de la structure effet_competence
*/
typedef
struct
effet_competence
{
unsigned
short
int
id
;
char
nom
[
TAILLE_NOMS
];
unsigned
short
int
id
;
/*<Un entier qui represente la competence*/
char
nom
[
TAILLE_NOMS
];
/*<Nom de la competence de taille TAILLE_NOMS*/
/* effets à définir */
}
effet_competence
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment