aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorVicent Marti2008-05-21 17:44:38 +0000
committerVicent Marti2008-05-21 17:44:38 +0000
commit0707968a376e90f4719fa7f2f935e252e936a9f8 (patch)
tree73ad3785b60bd23b411e0a35994e9182a2ad4075 /graphics
parent0ea6707dc4ab5858bd048afa75ef6e3fd48f8628 (diff)
downloadscummvm-rg350-0707968a376e90f4719fa7f2f935e252e936a9f8.tar.gz
scummvm-rg350-0707968a376e90f4719fa7f2f935e252e936a9f8.tar.bz2
scummvm-rg350-0707968a376e90f4719fa7f2f935e252e936a9f8.zip
Code formatting guidelines
svn-id: r32207
Diffstat (limited to 'graphics')
-rw-r--r--graphics/VectorRenderer.cpp2
-rw-r--r--graphics/VectorRenderer.h25
2 files changed, 12 insertions, 15 deletions
diff --git a/graphics/VectorRenderer.cpp b/graphics/VectorRenderer.cpp
index 9dc2fa6ce6..e2b187a58c 100644
--- a/graphics/VectorRenderer.cpp
+++ b/graphics/VectorRenderer.cpp
@@ -210,7 +210,6 @@ drawLine(int x1, int y1, int x2, int y2) {
if (dy == 0) { // horizontal lines
// these can be filled really fast with a single memset.
- // TODO: Platform specific ASM in set_to, would make this thing fly
colorFill(ptr, ptr + dx + 1, (PixelType)_fgColor);
} else if (dx == 0) { // vertical lines
@@ -605,7 +604,6 @@ drawRoundedSquareShadow(int x1, int y1, int r, int w, int h, int blur) {
int f, ddF_x, ddF_y;
int x, y, px, py;
int pitch = Base::surfacePitch();
- int sw = 0, sp = 0, hp = h * pitch;
int alpha = 102;
x1 += blur;
diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h
index 4609d51739..a4ef4b81b1 100644
--- a/graphics/VectorRenderer.h
+++ b/graphics/VectorRenderer.h
@@ -499,19 +499,18 @@ protected:
virtual inline void colorFill(PixelType *first, PixelType *last, PixelType color) {
register PixelType *ptr = first;
register int count = (last - first);
- {
- register int n = (count + 7) / 8;
- switch (count % 8) {
- case 0: do { *ptr++ = color;
- case 7: *ptr++ = color;
- case 6: *ptr++ = color;
- case 5: *ptr++ = color;
- case 4: *ptr++ = color;
- case 3: *ptr++ = color;
- case 2: *ptr++ = color;
- case 1: *ptr++ = color;
- } while (--n > 0);
- }
+ register int n = (count + 7) >> 3;
+ switch (count % 8) {
+ case 0: do {
+ *ptr++ = color;
+ case 7: *ptr++ = color;
+ case 6: *ptr++ = color;
+ case 5: *ptr++ = color;
+ case 4: *ptr++ = color;
+ case 3: *ptr++ = color;
+ case 2: *ptr++ = color;
+ case 1: *ptr++ = color;
+ } while (--n > 0);
}
}