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
4ede0cc6
There was a problem fetching the pipeline summary.
Commit
4ede0cc6
authored
8 years ago
by
Montjoie Henri
Browse files
Options
Downloads
Patches
Plain Diff
renommage de variables
parent
287df95a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
resources/Maps.xml
+1
-1
1 addition, 1 deletion
resources/Maps.xml
src/affichage.c
+27
-27
27 additions, 27 deletions
src/affichage.c
with
28 additions
and
28 deletions
resources/Maps.xml
+
1
−
1
View file @
4ede0cc6
...
...
@@ -110,7 +110,7 @@
<Line>
PPPRRRRPPP
</Line>
<Line>
PPPPRRPPPP
</Line>
<Line>
PPPPPFPPPP
</Line>
<Line>
PPPFFFFPPP/Line>
<Line>
PPPFFFFPPP
<
/Line>
<Line>
FFFFFFFFFF
</Line>
<Line>
FFFFFFFFFF
</Line>
</Map>
...
...
This diff is collapsed.
Click to expand it.
src/affichage.c
+
27
−
27
View file @
4ede0cc6
...
...
@@ -658,16 +658,13 @@ int affichage_carte()
SDL_Rect
Position_Guerrier_select
;
SDL_Surface
*
texte
=
NULL
;
SDL_Surface
*
texte2
=
NULL
;
SDL_Surface
*
texte3
=
NULL
;
SDL_Surface
*
texte4
=
NULL
;
SDL_Surface
*
previsualisation
[
5
]
=
{
NULL
};
SDL_Surface
*
textes
[
NB_JOUEURS
*
NB_PERSO
]
=
{
NULL
};
SDL_Rect
pos_bouton
;
SDL_Surface
*
nom_joueur
=
NULL
;
SDL_Surface
*
bouton1
=
NULL
;
SDL_Surface
*
bouton2
=
NULL
;
SDL_Rect
pos_texte
;
SDL_Rect
pos_
texte2
;
SDL_Rect
pos_
texte3
;
SDL_Rect
pos_
texte4
;
SDL_Rect
pos_
nom_joueur
;
SDL_Rect
pos_
bouton1
;
SDL_Rect
pos_
bouton2
;
TTF_Font
*
police
=
NULL
;
TTF_Font
*
vieille_police
=
NULL
;
SDL_Color
couleurNoire
=
{
0
,
0
,
0
};
...
...
@@ -679,19 +676,19 @@ int affichage_carte()
police
=
TTF_OpenFont
(
"../resources/fonts/arial.ttf"
,
27
);
texte
=
TTF_RenderText_Shaded
(
vieille_police
,
"Joueur actuel :"
,
couleurBlanche
,
couleurNoire
);
texte2
=
TTF_RenderText_Shaded
(
vieille_police
,
nom_1
,
couleurBlanche
,
couleurNoire
);
texte3
=
TTF_RenderText_Shaded
(
vieille_police
,
"Perso suivant"
,
couleurDoree
,
couleurBleue
);
texte4
=
TTF_RenderText_Shaded
(
vieille_police
,
"Joueur suivant"
,
couleurDoree
,
couleurBleue
);
nom_joueur
=
TTF_RenderText_Shaded
(
vieille_police
,
nom_1
,
couleurBlanche
,
couleurNoire
);
bouton1
=
TTF_RenderText_Shaded
(
vieille_police
,
"Perso suivant"
,
couleurDoree
,
couleurBleue
);
bouton2
=
TTF_RenderText_Shaded
(
vieille_police
,
"Joueur suivant"
,
couleurDoree
,
couleurBleue
);
pos_texte
.
x
=
ecran
->
w
-
(
LARGEUR_BORDURE
+
texte
->
w
)
/
2
;
pos_texte
.
y
=
20
;
pos_
texte2
.
x
=
ecran
->
w
-
(
LARGEUR_BORDURE
+
texte2
->
w
)
/
2
;
pos_
texte2
.
y
=
pos_texte
.
y
+
(
3
*
texte
->
h
)
/
2
;
pos_
texte4
.
x
=
ecran
->
w
-
(
LARGEUR_BORDURE
+
texte4
->
w
)
/
2
;
pos_
texte4
.
y
=
ecran
->
h
-
texte4
->
h
-
40
;
pos_
texte3
.
x
=
ecran
->
w
-
(
LARGEUR_BORDURE
+
texte3
->
w
)
/
2
;
pos_
texte3
.
y
=
pos_texte4
.
y
-
(
2
*
texte4
->
h
);
pos_
nom_joueur
.
x
=
ecran
->
w
-
(
LARGEUR_BORDURE
+
nom_joueur
->
w
)
/
2
;
pos_
nom_joueur
.
y
=
pos_texte
.
y
+
(
3
*
texte
->
h
)
/
2
;
pos_
bouton2
.
x
=
ecran
->
w
-
(
LARGEUR_BORDURE
+
bouton2
->
w
)
/
2
;
pos_
bouton2
.
y
=
ecran
->
h
-
bouton2
->
h
-
40
;
pos_
bouton1
.
x
=
ecran
->
w
-
(
LARGEUR_BORDURE
+
bouton1
->
w
)
/
2
;
pos_
bouton1
.
y
=
pos_bouton2
.
y
-
(
2
*
bouton2
->
h
);
for
(
i
=
0
;
i
<
LARGEUR_CARTE
;
i
++
)
{
...
...
@@ -766,9 +763,15 @@ int affichage_carte()
etat
=
FERMER
;
break
;
case
SDL_MOUSEBUTTONDOWN
:
//deplacement_personnage(event.button.x,event.button.y);
//nextJoueur();
if
(
event
.
button
.
y
>
pos_bouton1
.
y
&&
event
.
button
.
y
<
pos_bouton1
.
y
+
bouton1
->
h
){
//nextPerso();
}
if
(
event
.
button
.
y
>
pos_bouton2
.
y
&&
event
.
button
.
y
<
pos_bouton2
.
y
+
bouton2
->
h
){
//nextJoueur();
}
if
(
event
.
button
.
x
<
LARGEUR_CARTE
*
LARGEUR_CASE
){
//deplacement_personnage(event.button.x,event.button.y);
}
break
;
case
SDL_MOUSEMOTION
:
if
(
event
.
motion
.
x
<
LARGEUR_CARTE
*
LARGEUR_CASE
&&
event
.
motion
.
y
<
HAUTEUR_CARTE
*
HAUTEUR_CASE
)
...
...
@@ -779,9 +782,6 @@ int affichage_carte()
case
SDL_KEYDOWN
:
/* Si c'est un vnement de type "touche presse" */
switch
(
event
.
key
.
keysym
.
sym
)
{
case
SDLK_n
:
//persosuivant();
break
;
case
SDLK_ESCAPE
:
afficher_menu
();
break
;
...
...
@@ -824,9 +824,9 @@ int affichage_carte()
SDL_BlitSurface
(
Case_brillante
,
NULL
,
ecran
,
&
Position_Case_brillante
);
SDL_BlitSurface
(
texte
,
NULL
,
ecran
,
&
pos_texte
);
SDL_BlitSurface
(
texte2
,
NULL
,
ecran
,
&
pos_
texte2
);
SDL_BlitSurface
(
texte3
,
NULL
,
ecran
,
&
pos_
texte3
);
SDL_BlitSurface
(
texte4
,
NULL
,
ecran
,
&
pos_
texte4
);
SDL_BlitSurface
(
nom_joueur
,
NULL
,
ecran
,
&
pos_
nom_joueur
);
SDL_BlitSurface
(
bouton1
,
NULL
,
ecran
,
&
pos_
bouton1
);
SDL_BlitSurface
(
bouton2
,
NULL
,
ecran
,
&
pos_
bouton2
);
SDL_Flip
(
ecran
);
}
...
...
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