summaryrefslogtreecommitdiff
path: root/blits.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 /blits.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 'blits.c')
-rw-r--r--blits.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/blits.c b/blits.c
index 59956c4..40e20f4 100644
--- a/blits.c
+++ b/blits.c
@@ -75,9 +75,9 @@ static void blit_character_affinities(SURFACES *surfaces, POSITIONS *positions,
for (int i = 0; i < countof(affinities); ++i) {
for (enum element_t elmt = 0; elmt < ELEMENT_COUNT; ++elmt) {
if (chr->affinities[elmt] == affinities[i]) {
- SDL_BlitSurface (surfaces->Pactive,NULL,surfaces->Pecran,&positions->Vpositionactivedesactive[i * ELEMENT_COUNT + elmt]);
+ SDL_BlitSurface(surfaces->Pactive, NULL, surfaces->screen, &positions->activedesactive[i * ELEMENT_COUNT + elmt]);
} else {
- SDL_BlitSurface (surfaces->Pdesactive,NULL,surfaces->Pecran,&positions->Vpositionactivedesactive[i * ELEMENT_COUNT + elmt]);
+ SDL_BlitSurface(surfaces->Pdesactive, NULL, surfaces->screen, &positions->activedesactive[i * ELEMENT_COUNT + elmt]);
}
}
}
@@ -92,7 +92,7 @@ void Fblitterpvcible (SURFACES *surfaces,POSITIONS *positions, const struct char
sprintf (chaine,"%d/%d", chr->hp, chr->max_hp);
surf = TTF_RenderText_Blended(rpg_g.font, chaine, couleur);
- SDL_BlitSurface(surf, NULL, surfaces->screen, &positions->Vpositionpvcible);
+ SDL_BlitSurface(surf, NULL, surfaces->screen, &positions->pvcible);
SDL_FreeSurface(surf);
}
@@ -106,7 +106,7 @@ void Fblitterpmcible (SURFACES *surfaces,POSITIONS *positions, const struct char
sprintf (chaine,"%d/%d", chr->mp, chr->max_mp);
surf = TTF_RenderText_Blended(rpg_g.font, chaine, couleur);
- SDL_BlitSurface(surf, NULL, surfaces->screen, &positions->Vpositionpmcible);
+ SDL_BlitSurface(surf, NULL, surfaces->screen, &positions->pmcible);
SDL_FreeSurface(surf);
}
@@ -118,7 +118,7 @@ static void display_target_infos(SURFACES *surfaces, POSITIONS *positions, struc
SDL_Rect pos_name;;
/* display the information frame */
- SDL_BlitSurface(surfaces->Pcadrecible, NULL, surfaces->Pecran, &positions->Vpositioncadrecible);
+ SDL_BlitSurface(surfaces->Pcadrecible, NULL, surfaces->screen, &positions->cadrecible);
if (target->is_chr) {
/* display the name of the character */
@@ -134,8 +134,8 @@ static void display_target_infos(SURFACES *surfaces, POSITIONS *positions, struc
surf_name = TTF_RenderText_Blended(rpg_g.font, target->team->name, color);
}
- pos_name.x = positions->Vpositioncadrecible.x + surfaces->Pcadrecible->w / 2 - surf_name->w / 2;
- pos_name.y = positions->Vpositioncadrecible.y + 10;
+ pos_name.x = positions->cadrecible.x + surfaces->Pcadrecible->w / 2 - surf_name->w / 2;
+ pos_name.y = positions->cadrecible.y + 10;
SDL_BlitSurface(surf_name, NULL, surfaces->Pecran, &pos_name);
@@ -149,7 +149,7 @@ void update_selected_target(SURFACES *surfaces, POSITIONS *positions, struct tar
if (target == NULL) {
/* clear the target informations frame */
- SDL_BlitSurface(surfaces->Pfondjeu, &positions->Vpositioncadrecible, surfaces->Pecran, &positions->Vpositioncadrecible);
+ SDL_BlitSurface(surfaces->background, &positions->cadrecible, surfaces->screen, &positions->cadrecible);
} else {
/* display the new cursor */
if (target->is_chr) {
@@ -186,12 +186,12 @@ void update_list_entries(SURFACES *surfaces, POSITIONS *positions, const struct
int off;
if (selected == -1) {
- SDL_BlitSurface(surfaces->Pfondjeu, &positions->Vpositioncadreactions, surfaces->Pecran, &positions->Vpositioncadreactions);
+ SDL_BlitSurface(surfaces->Pfondjeu, &positions->cadreactions, surfaces->Pecran, &positions->cadreactions);
SDL_Flip(surfaces->Pecran);
return;
}
- SDL_BlitSurface(surfaces->Pcadreactions, NULL, surfaces->Pecran, &positions->Vpositioncadreactions);
+ SDL_BlitSurface(surfaces->Pcadreactions, NULL, surfaces->Pecran, &positions->cadreactions);
off = selected / 3 * 3;
/* display at most three actions */
@@ -200,13 +200,13 @@ void update_list_entries(SURFACES *surfaces, POSITIONS *positions, const struct
char buffer[256];
if (off + i >= cnt) {
- SDL_BlitSurface(surfaces->Pactiondesactivee, NULL, surfaces->Pecran, &positions->Vpositionactionselectionnee[i]);
+ SDL_BlitSurface(surfaces->Pactiondesactivee, NULL, surfaces->Pecran, &positions->actionselectionnee[i]);
continue;
}
/* if the current entry is the selected one */
if (selected == off + i) {
- SDL_BlitSurface(surfaces->Pactionselectionnee, NULL, surfaces->Pecran, &positions->Vpositionactionselectionnee[i]);
+ SDL_BlitSurface(surfaces->Pactionselectionnee, NULL, surfaces->Pecran, &positions->actionselectionnee[i]);
}
if (entries[off + i].children_cnt) {
@@ -218,7 +218,7 @@ void update_list_entries(SURFACES *surfaces, POSITIONS *positions, const struct
surf = TTF_RenderText_Blended(rpg_g.font, string, color);
- SDL_BlitSurface(surf, NULL, surfaces->Pecran, &positions->Vpositionnomactions[i]);
+ SDL_BlitSurface(surf, NULL, surfaces->Pecran, &positions->nomactions[i]);
SDL_FreeSurface(surf);
}
@@ -238,10 +238,10 @@ void display_incr(SURFACES *surfaces, POSITIONS *positions, struct character_t *
blit_character(surfaces, target);
SDL_BlitSurface(surf, NULL, surfaces->Pecran, &target->pos_curs);
- positions->Vpositiondegats.x = target->pos_curs.x;
- positions->Vpositiondegats.y = target->pos_curs.y;
- positions->Vpositiondegats.w = surf->w;
- positions->Vpositiondegats.h = surf->h;
+ positions->degats.x = target->pos_curs.x;
+ positions->degats.y = target->pos_curs.y;
+ positions->degats.w = surf->w;
+ positions->degats.h = surf->h;
SDL_FreeSurface(surf);
}