From 04b6af91765ddf9d1c5c5ec6f9722795bf2e4f27 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 13 Jun 2012 09:40:11 +0200 Subject: SWORD25: Janitorial: Apply coding conventions --- engines/sword25/gfx/image/art.cpp | 28 ++++++++++------------------ engines/sword25/gfx/image/art.h | 2 +- 2 files changed, 11 insertions(+), 19 deletions(-) (limited to 'engines/sword25/gfx') diff --git a/engines/sword25/gfx/image/art.cpp b/engines/sword25/gfx/image/art.cpp index 3944a207c8..9c4b9fe8bd 100644 --- a/engines/sword25/gfx/image/art.cpp +++ b/engines/sword25/gfx/image/art.cpp @@ -2367,38 +2367,30 @@ ArtSVPRenderAAIter *art_svp_render_aa_iter(const ArtSVP *svp, return iter; } -#define ADD_STEP(xpos, xdelta) \ +#define ADD_STEP(xpos, xdelta) \ /* stereotype code fragment for adding a step */ \ - if (n_steps == 0 || steps[n_steps - 1].x < xpos) \ - { \ + if (n_steps == 0 || steps[n_steps - 1].x < xpos) { \ sx = n_steps; \ steps[sx].x = xpos; \ steps[sx].delta = xdelta; \ n_steps++; \ - } \ - else \ - { \ - for (sx = n_steps; sx > 0; sx--) \ - { \ - if (steps[sx - 1].x == xpos) \ - { \ + } else { \ + for (sx = n_steps; sx > 0; sx--) { \ + if (steps[sx - 1].x == xpos) { \ steps[sx - 1].delta += xdelta; \ sx = n_steps; \ break; \ - } \ - else if (steps[sx - 1].x < xpos) \ - { \ + } else if (steps[sx - 1].x < xpos) { \ break; \ - } \ - } \ - if (sx < n_steps) \ - { \ + } \ + } \ + if (sx < n_steps) { \ memmove (&steps[sx + 1], &steps[sx], \ (n_steps - sx) * sizeof(steps[0])); \ steps[sx].x = xpos; \ steps[sx].delta = xdelta; \ n_steps++; \ - } \ + } \ } void art_svp_render_aa_iter_step(ArtSVPRenderAAIter *iter, int *p_start, diff --git a/engines/sword25/gfx/image/art.h b/engines/sword25/gfx/image/art.h index 8c9c97bc57..40bcb55aa7 100644 --- a/engines/sword25/gfx/image/art.h +++ b/engines/sword25/gfx/image/art.h @@ -50,7 +50,7 @@ namespace Sword25 { be variables. They can also be pstruct->el lvalues. */ #define art_expand(p, type, max) \ do { \ - if(max) {\ + if (max) {\ type *tmp = art_renew(p, type, max <<= 1); \ if (!tmp) error("Cannot reallocate memory for art data"); \ p = tmp; \ -- cgit v1.2.3