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
e3f06975
There was a problem fetching the pipeline summary.
Commit
e3f06975
authored
8 years ago
by
Montjoie Henri
Browse files
Options
Downloads
Patches
Plain Diff
moins d'emploi de constantes directement dans le code
parent
33b82365
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/affichage.c
+17
-23
17 additions, 23 deletions
src/affichage.c
src/affichage.h
+1
-1
1 addition, 1 deletion
src/affichage.h
src/attaques.c
+1
-1
1 addition, 1 deletion
src/attaques.c
src/main.c
+0
-1
0 additions, 1 deletion
src/main.c
with
19 additions
and
26 deletions
src/affichage.c
+
17
−
23
View file @
e3f06975
...
...
@@ -58,7 +58,6 @@ int main_affichage()
break
;
default:
break
;
}
}
TTF_Quit
();
...
...
@@ -227,8 +226,8 @@ int saisie_noms_joueurs()
*/
int
affichage_ecran_accueil
()
{
ajouterUnJoueur
(
nom_
joueur
1
,
&
etat
);
ajouterUnJoueur
(
nom_
joueur
2
,
&
etat
);
ajouterUnJoueur
(
nom_1
,
&
etat
);
ajouterUnJoueur
(
nom_2
,
&
etat
);
etat
=
LANCEMENT
;
SDL_Surface
*
ecran
=
SDL_SetVideoMode
(
LARGEUR_CARTE
*
(
LARGEUR_CASE
+
1
),
HAUTEUR_CARTE
*
(
HAUTEUR_CASE
+
2
),
32
,
SDL_HWSURFACE
|
SDL_DOUBLEBUF
);
SDL_WM_SetCaption
(
"Elder Internal Ignition"
,
NULL
);
...
...
@@ -347,32 +346,25 @@ int affichage_menu_configuration()
police
=
TTF_OpenFont
(
"../resources/fonts/arial.ttf"
,
26
);
char
src
[
50
],
dest
[
50
];
char
buffer
[
3
];
for
(
i
=
0
;
i
<
3
;
i
++
)
char
buffer
[
2
];
for
(
i
=
0
;
i
<
NB_PERSO
;
i
++
)
{
strcpy
(
dest
,
"personnage "
);
strcpy
(
src
,
itoa
(
i
+
1
,
buffer
,
10
));
textes
[
i
]
=
TTF_RenderText_Shaded
(
police
,
strcat
(
dest
,
src
),
couleurBlanche
,
couleurNoire
);
}
for
(
i
=
3
;
i
<
6
;
i
++
)
{
strcpy
(
dest
,
"personnage "
);
strcpy
(
src
,
itoa
(
i
-
2
,
buffer
,
10
));
textes
[
i
]
=
TTF_RenderText_Shaded
(
police
,
strcat
(
dest
,
src
),
couleurBlanche
,
couleurNoire
);
}
for
(
i
=
0
;
i
<
3
;
i
++
)
{
posTextes
[
i
].
x
=
ecran
->
w
/
4
-
textes
[
i
]
->
w
/
2
;
posTextes
[
i
].
y
=
(
i
+
1
)
*
ecran
->
h
/
6
;
SDL_BlitSurface
(
textes
[
i
],
NULL
,
ecran
,
&
(
posTextes
[
i
]));
}
for
(
i
=
3
;
i
<
6
;
i
++
)
for
(
i
=
NB_PERSO
;
i
<
NB_JOUEURS
*
NB_PERSO
;
i
++
)
{
strcpy
(
dest
,
"personnage "
);
strcpy
(
src
,
itoa
(
i
-
NB_PERSO
+
1
,
buffer
,
10
));
textes
[
i
]
=
TTF_RenderText_Shaded
(
police
,
strcat
(
dest
,
src
),
couleurBlanche
,
couleurNoire
);
posTextes
[
i
].
x
=
(
3
*
ecran
->
w
)
/
4
-
textes
[
i
]
->
w
/
2
;
posTextes
[
i
].
y
=
posTextes
[
i
-
3
].
y
;
posTextes
[
i
].
y
=
posTextes
[
i
-
NB_PERSO
].
y
;
SDL_BlitSurface
(
textes
[
i
],
NULL
,
ecran
,
&
posTextes
[
i
]);
}
SDL_Flip
(
ecran
);
char
**
path_images
=
obtenirSkinsClasses
();
int
numClassePerso
[
3
][
2
]
=
{{
-
1
,
-
1
},{
-
1
,
-
1
},{
-
1
,
-
1
}};
...
...
@@ -416,6 +408,7 @@ int affichage_menu_configuration()
position_carte
[
i
].
y
=
(
ecran
->
h
)
-
(
previsualisation
[
i
]
->
h
+
100
);
position_carte
[
i
].
x
=
(
ecran
->
w
-
previsualisation
[
i
]
->
w
)
/
2
+
(
10
+
previsualisation
[
i
]
->
w
)
*
(
i
-
2
);
}
SDL_Flip
(
ecran
);
c
=-
1
;
/*le numro de la carte choisie*/
while
(
etat
==
CONFIGURATION
)
...
...
@@ -425,6 +418,7 @@ int affichage_menu_configuration()
{
case
SDL_QUIT
:
etat
=
FERMER
;
return
0
;
break
;
case
SDL_MOUSEBUTTONDOWN
:
for
(
i
=
0
;
i
<
5
;
i
++
)
...
...
@@ -432,14 +426,14 @@ int affichage_menu_configuration()
if
(
event
.
button
.
x
>
position_carte
[
i
].
x
&&
event
.
button
.
x
<
position_carte
[
i
].
x
+
previsualisation
[
0
]
->
w
&&
event
.
button
.
y
>
position_carte
[
i
].
y
&&
event
.
button
.
y
<
position_carte
[
i
].
y
+
previsualisation
[
0
]
->
h
)
{
c
=
i
;
selectionnerCarte
(
obtenirNomsCartes
()[
c
]);
//
selectionnerCarte(obtenirNomsCartes()[c]);
}
}
if
(
event
.
button
.
x
>
posTextes
[
0
].
x
&&
event
.
button
.
x
<
posTextes
[
0
].
x
+
textes
[
0
]
->
w
)
j
=
1
;
if
(
event
.
button
.
x
>
posTextes
[
3
].
x
&&
event
.
button
.
x
<
posTextes
[
3
].
x
+
textes
[
3
]
->
w
)
if
(
event
.
button
.
x
>
posTextes
[
NB_PERSO
].
x
&&
event
.
button
.
x
<
posTextes
[
NB_PERSO
].
x
+
textes
[
NB_PERSO
]
->
w
)
j
=
2
;
for
(
i
=
0
;
i
<
3
;
i
++
)
for
(
i
=
0
;
i
<
NB_PERSO
;
i
++
)
{
if
(
event
.
button
.
y
>
posTextes
[
i
].
y
&&
event
.
button
.
y
<
posTextes
[
i
].
y
+
textes
[
i
]
->
h
)
p
=
i
+
1
;
...
...
@@ -457,12 +451,12 @@ int affichage_menu_configuration()
default:
break
;
}
for
(
i
=
0
;
i
<
6
;
i
++
)
for
(
i
=
0
;
i
<
NB_JOUEURS
*
NB_PERSO
;
i
++
)
{
SDL_BlitSurface
(
textes
[
i
],
NULL
,
ecran
,
&
(
posTextes
[
i
]));
}
for
(
i
=
0
;
i
<
3
;
i
++
){
for
(
k
=
0
;
k
<
2
;
k
++
){
for
(
i
=
0
;
i
<
NB_PERSO
;
i
++
){
for
(
k
=
0
;
k
<
NB_JOUEURS
;
k
++
){
positions_images
[
i
][
k
].
y
=
posTextes
[
i
].
y
+
textes
[
i
]
->
h
;
positions_images
[
i
][
k
].
x
=
posTextes
[
NB_PERSO
*
k
].
x
+
(
textes
[
NB_PERSO
*
k
]
->
w
-
images_classes
[
0
]
->
w
)
/
2
;
images_persos
[
i
][
k
]
=
images_classes
[
numClassePerso
[
i
][
k
]];
...
...
This diff is collapsed.
Click to expand it.
src/affichage.h
+
1
−
1
View file @
e3f06975
...
...
@@ -12,7 +12,7 @@
#define LARGEUR_CASE 53
#define HAUTEUR_CASE 71
#define NB_PERSO 3
#define NB_JOUEURS
3
#define NB_JOUEURS
2
#define HAUTEUR_BOUTON 20
#define LARGEUR_BOUTON 115
...
...
This diff is collapsed.
Click to expand it.
src/attaques.c
+
1
−
1
View file @
e3f06975
...
...
@@ -17,7 +17,7 @@ int attaquer(Personnage *attaquant, Attaque *attaque_select, Personnage *cible)
int
i
=
0
;
for
(
i
=
0
;
i
<
5
;
i
++
)
{
ajouter_effet
(
attaquant
,
attaque_select
->
effets
[
i
],
cible
);
//
ajouter_effet(attaquant, attaque_select->effets[i], cible);
}
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
src/main.c
+
0
−
1
View file @
e3f06975
...
...
@@ -92,6 +92,5 @@ int main(void)
initJeu
();
main_affichage
();
return
0
;
}
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