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
42af171a
There was a problem fetching the pipeline summary.
Commit
42af171a
authored
8 years ago
by
Montjoie Henri
Browse files
Options
Downloads
Plain Diff
merge
parents
cf1dd5ae
cb930cc0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
resources/Skins/logo.bmp
+0
-0
0 additions, 0 deletions
resources/Skins/logo.bmp
src/classe.c
+4
-0
4 additions, 0 deletions
src/classe.c
src/classe.h
+2
-0
2 additions, 0 deletions
src/classe.h
src/controleur.c
+23
-8
23 additions, 8 deletions
src/controleur.c
src/structures.h
+1
-1
1 addition, 1 deletion
src/structures.h
with
30 additions
and
9 deletions
resources/Skins/logo.bmp
+
0
−
0
View replaced file @
cf1dd5ae
View file @
42af171a
993 KiB
|
W:
|
H:
993 KiB
|
W:
|
H:
2-up
Swipe
Onion skin
This diff is collapsed.
Click to expand it.
src/classe.c
+
4
−
0
View file @
42af171a
...
...
@@ -86,5 +86,9 @@ char * getNomClasse(Classe * c){
return
c
->
nom
;
}
char
*
getNomAttaques
(
Classe
*
c
,
int
i
){
return
c
->
attaques
[
i
].
nom
;
}
This diff is collapsed.
Click to expand it.
src/classe.h
+
2
−
0
View file @
42af171a
...
...
@@ -26,4 +26,6 @@ int getManaMax(Classe * c);
int
getPDMax
(
Classe
*
c
);
char
*
getNomAttaques
(
Classe
*
c
,
int
i
);
#endif // CLASSE_H_INCLUDED
This diff is collapsed.
Click to expand it.
src/controleur.c
+
23
−
8
View file @
42af171a
...
...
@@ -770,22 +770,33 @@ int obtenirPDMaxPersonnage(int numero){
*
* \return un tableau de chaine de charactères (char**).
*/
/*char ** obtenirNomsAttaquesPersonnage(int numero){
char
**
obtenirNomsAttaquesPersonnage
(
int
numero
){
//allocation en memoire du tableau de resultats.
int
i
;
Joueur
*
actuel
=
getCurrentJoueur
(
getListJoueur
(
partieGlobale
));
char
**
tabNomsAttPerso
=
malloc
(
NB_ATTAQUES_MAX
*
sizeof
(
char
*
));
for
(
i
=
0
;
i
<
NB_ATTAQUES_MAX
;
i
++
){
tabNomsAttPerso
[
i
]
=
malloc
(
TAILLE_NOMS
*
sizeof
(
char
));
}
//Recherche du nom des attaques du Personnage
if
((
numero
>
0
)
&&
(
numero
<=
3
)){
for(i=0;i<NB_ATTAQUES_MAX;i++){
strncpy(tabNomsAttPerso[i],packGlobal.Classes_Package->attaques->nom, TAILLE_NOMS);
}
setOnFirstJoueur
(
getListJoueur
(
partieGlobale
));
for
(
i
=
0
;
i
<
NB_ATTAQUES_MAX
;
i
++
){
strncpy
(
tabNomsAttPerso
[
i
],
getNomAttaques
(
getClasse
(
getPersonnage
(
getCurrentJoueur
(
getListJoueur
(
partieGlobale
)),
numero
-
1
)),
i
),
TAILLE_NOMS
);
}
setOnJoueur
(
getListJoueur
(
partieGlobale
),
actuel
);
}
else if ((numero>3)&&(numero>6)){
strncpy(tabNomsAttPerso[i],packGlobal.Classes_Package->attaques->nom, TAILLE_NOMS);
else
if
((
numero
>
3
)
&&
(
numero
<=
6
)){
setOnFirstJoueur
(
getListJoueur
(
partieGlobale
));
nextJoueur
(
getListJoueur
(
partieGlobale
));
for
(
i
=
0
;
i
<
NB_ATTAQUES_MAX
;
i
++
){
strncpy
(
tabNomsAttPerso
[
i
],
getNomAttaques
(
getClasse
(
getPersonnage
(
getCurrentJoueur
(
getListJoueur
(
partieGlobale
)),
numero
-
4
)),
i
),
TAILLE_NOMS
);
}
setOnJoueur
(
getListJoueur
(
partieGlobale
),
actuel
);
}
return
tabNomsAttPerso
;
}
*/
}
/*!
* \fn void debutDuTour()
...
...
@@ -828,7 +839,7 @@ char * joueurVictorieux(){
// Je met ici mes tests réalisés dans le main pour éviter de les réécrire si jamais il y a un problème.
// Si vous voulez tester aussi, à recopier dans le main avant l'appel à initJeu().
void
testControlleurConsole
(){
int
i
,
j
,
n
,
x
,
y
;
int
i
,
j
,
n
,
k
,
x
,
y
;
EtatsJeu
state
=
SAISIE_JOUEURS
;
extern
Partie
*
partieGlobale
;
extern
Game_Package
packGlobal
;
...
...
@@ -884,6 +895,10 @@ void testControlleurConsole(){
printf
(
"%d
\n
"
,
obtenirManaMaxPersonnage
(
n
));
printf
(
"%d
\n
"
,
obtenirPDPersonnage
(
n
));
printf
(
"%d
\n
"
,
obtenirPDMaxPersonnage
(
n
));
char
**
tabNomAtt
=
obtenirNomsAttaquesPersonnage
(
n
);
for
(
k
=
0
;
k
<
NB_ATTAQUES_MAX
;
k
++
){
printf
(
"%s
\n
"
,
tabNomAtt
[
k
]);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/structures.h
+
1
−
1
View file @
42af171a
...
...
@@ -135,7 +135,7 @@ typedef struct Attaque{
*/
typedef
struct
Classe
{
char
nom
[
25
];
/*!< Nom de la classe de taille TAILLE_NOMS*/
Attaque
attaques
[
5
];
/*!< Les attaques disponibles pour la classe*/
Attaque
attaques
[
NB_ATTAQUES_MAX
];
/*!< 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*/
...
...
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