summaryrefslogtreecommitdiff
path: root/rpg.c
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-01-11 01:55:32 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-01-11 01:55:32 +0100
commitd590bfdcdfa8799439cffa41fc74346e9923b6e7 (patch)
treee171fd414935877fd3ddd1f79204dac22368e32d /rpg.c
parentb37b127792e09cb7148200e0bccf294892e9a889 (diff)
renamed the rects inside the struct positions
it is redundant in thus inconvenient to repeat 'position' inside a structure named position. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'rpg.c')
-rw-r--r--rpg.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/rpg.c b/rpg.c
index 7d2df46..b725995 100644
--- a/rpg.c
+++ b/rpg.c
@@ -180,37 +180,37 @@ static void Finitialiserpositions (POSITIONS *positions, const SURFACES *surface
{
int y = 0, z = 0;
- positions->Vpositionmenupretre.x = surfaces->screen->w / 2 - surfaces->Ppretre->w / 2;
- positions->Vpositionmenupretre.y = surfaces->screen->h - 20 - surfaces->Ppretre->h;
- positions->Vpositionmenupaladin.x = positions->Vpositionmenupretre.x/2 - surfaces->Ppaladin->w/2;
- positions->Vpositionmenupaladin.y = surfaces->screen->h - 20 - surfaces->Ppaladin->h;
- positions->Vpositionmenuvoleur.x = surfaces->screen->w / 4 * 3 - surfaces->Pvoleur->w / 2;
- positions->Vpositionmenuvoleur.y = surfaces->screen->h - 20 - surfaces->Pvoleur->h;
- positions->Vpositiontextemenu.y = 362;
-
- positions->Vpositioncadrecible.y = 15;
- positions->Vpositioncadrecible.x = surfaces->screen->w / 2 - surfaces->Pcadrecible->w / 2;
- positions->Vpositioncadrecible.w = surfaces->Pcadrecible->w;
- positions->Vpositioncadrecible.h = surfaces->Pcadrecible->h;
-
- positions->Vpositioncadreactions.y = surfaces->screen->h - surfaces->Pcadreactions->h;
- positions->Vpositioncadreactions.x = surfaces->screen->w / 2 - surfaces->Pcadreactions->w / 2;
- positions->Vpositioncadreactions.w = surfaces->Pcadreactions->w;
- positions->Vpositioncadreactions.h = surfaces->Pcadreactions->h;
- positions->Vpositionpvcible.x = positions->Vpositioncadrecible.x + 104;
- positions->Vpositionpvcible.y = positions->Vpositioncadrecible.y + 170;
- positions->Vpositionpmcible.x = positions->Vpositioncadrecible.x + 269;
- positions->Vpositionpmcible.y = positions->Vpositioncadrecible.y + 170;
+ positions->menupretre.x = surfaces->screen->w / 2 - surfaces->Ppretre->w / 2;
+ positions->menupretre.y = surfaces->screen->h - 20 - surfaces->Ppretre->h;
+ positions->menupaladin.x = positions->menupretre.x/2 - surfaces->Ppaladin->w/2;
+ positions->menupaladin.y = surfaces->screen->h - 20 - surfaces->Ppaladin->h;
+ positions->menuvoleur.x = surfaces->screen->w / 4 * 3 - surfaces->Pvoleur->w / 2;
+ positions->menuvoleur.y = surfaces->screen->h - 20 - surfaces->Pvoleur->h;
+ positions->textemenu.y = 362;
+
+ positions->cadrecible.y = 15;
+ positions->cadrecible.x = surfaces->screen->w / 2 - surfaces->Pcadrecible->w / 2;
+ positions->cadrecible.w = surfaces->Pcadrecible->w;
+ positions->cadrecible.h = surfaces->Pcadrecible->h;
+
+ positions->cadreactions.y = surfaces->screen->h - surfaces->Pcadreactions->h;
+ positions->cadreactions.x = surfaces->screen->w / 2 - surfaces->Pcadreactions->w / 2;
+ positions->cadreactions.w = surfaces->Pcadreactions->w;
+ positions->cadreactions.h = surfaces->Pcadreactions->h;
+ positions->pvcible.x = positions->cadrecible.x + 104;
+ positions->pvcible.y = positions->cadrecible.y + 170;
+ positions->pmcible.x = positions->cadrecible.x + 269;
+ positions->pmcible.y = positions->cadrecible.y + 170;
for(int i = 0; i < 3; i++) {
- positions->Vpositionactionselectionnee[i].x = positions->Vpositioncadreactions.x + 5;
- positions->Vpositionactionselectionnee[i].y = positions->Vpositioncadreactions.y + 5 + 44 * i;
- positions->Vpositionnomactions[i].x = positions->Vpositioncadreactions.x + 15;
- positions->Vpositionnomactions[i].y = positions->Vpositioncadreactions.y + 12 + 44 * i;
+ positions->actionselectionnee[i].x = positions->cadreactions.x + 5;
+ positions->actionselectionnee[i].y = positions->cadreactions.y + 5 + 44 * i;
+ positions->nomactions[i].x = positions->cadreactions.x + 15;
+ positions->nomactions[i].y = positions->cadreactions.y + 12 + 44 * i;
}
for (int i = 0; i < 16; i++) {
- positions->Vpositionactivedesactive[i].x = positions->Vpositioncadrecible.x + 202 + 51 * y;
- positions->Vpositionactivedesactive[i].y = positions->Vpositioncadrecible.y + 86 + 19 * z;
+ positions->activedesactive[i].x = positions->cadrecible.x + 202 + 51 * y;
+ positions->activedesactive[i].y = positions->cadrecible.y + 86 + 19 * z;
if (y < 3) {
y++;
} else {