aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2012-06-13 09:40:11 +0200
committerStrangerke2012-06-13 09:40:11 +0200
commit04b6af91765ddf9d1c5c5ec6f9722795bf2e4f27 (patch)
treee6bba9670ba487e913552f9371fb45321b5de8b6
parent51466ecfbb8158792931c27ff00c3bf937adfd40 (diff)
downloadscummvm-rg350-04b6af91765ddf9d1c5c5ec6f9722795bf2e4f27.tar.gz
scummvm-rg350-04b6af91765ddf9d1c5c5ec6f9722795bf2e4f27.tar.bz2
scummvm-rg350-04b6af91765ddf9d1c5c5ec6f9722795bf2e4f27.zip
SWORD25: Janitorial: Apply coding conventions
-rw-r--r--engines/sword25/gfx/image/art.cpp28
-rw-r--r--engines/sword25/gfx/image/art.h2
2 files changed, 11 insertions, 19 deletions
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; \