aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorMax Horn2009-09-30 16:16:53 +0000
committerMax Horn2009-09-30 16:16:53 +0000
commit8ba75fc522f16844524dd4d6f88c3851e2402969 (patch)
treedf25c20389e3e706d508f37914dedc73c6479f00 /graphics
parent25dde91c7c6c7da52636e3daa34bd9eee5d9dcb9 (diff)
downloadscummvm-rg350-8ba75fc522f16844524dd4d6f88c3851e2402969.tar.gz
scummvm-rg350-8ba75fc522f16844524dd4d6f88c3851e2402969.tar.bz2
scummvm-rg350-8ba75fc522f16844524dd4d6f88c3851e2402969.zip
Fix code formatting (esp. 'if(' -> 'if (' etc., but also indention and other things)
svn-id: r44495
Diffstat (limited to 'graphics')
-rw-r--r--graphics/VectorRenderer.cpp72
-rw-r--r--graphics/VectorRendererSpec.cpp6
-rw-r--r--graphics/video/coktelvideo/indeo3.cpp14
3 files changed, 46 insertions, 46 deletions
diff --git a/graphics/VectorRenderer.cpp b/graphics/VectorRenderer.cpp
index 2616664841..46e1e975d5 100644
--- a/graphics/VectorRenderer.cpp
+++ b/graphics/VectorRenderer.cpp
@@ -84,26 +84,26 @@ void VectorRenderer::stepGetPositions(const DrawStep &step, const Common::Rect &
if (!step.autoWidth) {
in_w = step.w == -1 ? area.height() : step.w;
- switch(step.xAlign) {
- case Graphics::DrawStep::kVectorAlignManual:
- if (step.x >= 0) in_x = area.left + step.x;
- else in_x = area.left + area.width() + step.x; // value relative to the opposite corner.
- break;
-
- case Graphics::DrawStep::kVectorAlignCenter:
- in_x = area.left + (area.width() / 2) - (in_w / 2);
- break;
-
- case Graphics::DrawStep::kVectorAlignLeft:
- in_x = area.left;
- break;
-
- case Graphics::DrawStep::kVectorAlignRight:
- in_x = area.left + area.width() - in_w;
- break;
-
- default:
- error("Vertical alignment in horizontal data.");
+ switch (step.xAlign) {
+ case Graphics::DrawStep::kVectorAlignManual:
+ if (step.x >= 0) in_x = area.left + step.x;
+ else in_x = area.left + area.width() + step.x; // value relative to the opposite corner.
+ break;
+
+ case Graphics::DrawStep::kVectorAlignCenter:
+ in_x = area.left + (area.width() / 2) - (in_w / 2);
+ break;
+
+ case Graphics::DrawStep::kVectorAlignLeft:
+ in_x = area.left;
+ break;
+
+ case Graphics::DrawStep::kVectorAlignRight:
+ in_x = area.left + area.width() - in_w;
+ break;
+
+ default:
+ error("Vertical alignment in horizontal data.");
}
} else {
in_x = area.left;
@@ -113,26 +113,26 @@ void VectorRenderer::stepGetPositions(const DrawStep &step, const Common::Rect &
if (!step.autoHeight) {
in_h = step.h == -1 ? area.width() : step.h;
- switch(step.yAlign) {
- case Graphics::DrawStep::kVectorAlignManual:
- if (step.y >= 0) in_y = area.top + step.y;
- else in_y = area.top + area.height() + step.y; // relative
- break;
+ switch (step.yAlign) {
+ case Graphics::DrawStep::kVectorAlignManual:
+ if (step.y >= 0) in_y = area.top + step.y;
+ else in_y = area.top + area.height() + step.y; // relative
+ break;
- case Graphics::DrawStep::kVectorAlignCenter:
- in_y = area.top + (area.height() / 2) - (in_h / 2);
- break;
+ case Graphics::DrawStep::kVectorAlignCenter:
+ in_y = area.top + (area.height() / 2) - (in_h / 2);
+ break;
- case Graphics::DrawStep::kVectorAlignTop:
- in_y = area.top;
- break;
+ case Graphics::DrawStep::kVectorAlignTop:
+ in_y = area.top;
+ break;
- case Graphics::DrawStep::kVectorAlignBottom:
- in_y = area.top + area.height() - in_h;
- break;
+ case Graphics::DrawStep::kVectorAlignBottom:
+ in_y = area.top + area.height() - in_h;
+ break;
- default:
- error("Horizontal alignment in vertical data.");
+ default:
+ error("Horizontal alignment in vertical data.");
}
} else {
in_y = area.top;
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index a575ee8b94..bb52874230 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -700,7 +700,7 @@ drawTriangle(int x, int y, int w, int h, TriangleOrientation orient) {
int newW = w / 2;
if (newW % 2) newW++;
- switch(orient) {
+ switch (orient) {
case kTriangleUp:
case kTriangleDown:
drawTriangleFast(x + (newW / 2), y + (h / 2) - (newW / 2), newW, (orient == kTriangleDown), color, Base::_fillMode);
@@ -1028,7 +1028,7 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color
int dysub = ddy - (dx * 2);
int error_term = ddy - dx;
- switch(fill_m) {
+ switch (fill_m) {
case kFillDisabled:
while (dx--) {
__TRIANGLE_MAINX();
@@ -1060,7 +1060,7 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color
int dxsub = ddx - (dy * 2);
int error_term = ddx - dy;
- switch(fill_m) {
+ switch (fill_m) {
case kFillDisabled:
while (dy--) {
__TRIANGLE_MAINY();
diff --git a/graphics/video/coktelvideo/indeo3.cpp b/graphics/video/coktelvideo/indeo3.cpp
index 581f59b1b1..983705ab9c 100644
--- a/graphics/video/coktelvideo/indeo3.cpp
+++ b/graphics/video/coktelvideo/indeo3.cpp
@@ -96,7 +96,7 @@ void Indeo3::setDither(DitherAlgorithm dither) {
_dither = dither;
- switch(dither) {
+ switch (dither) {
case kDitherSierraLight:
_ditherSL = new Graphics::SierraLight(_width, _palLUT);
break;
@@ -538,7 +538,7 @@ void Indeo3::decodeChunk(byte *cur, byte *ref, int width, int height,
correction_lp[0] = correction_lp[1] = correction + (lv << 8);
}
- switch(k) {
+ switch (k) {
case 1:
case 0: /********** CASE 0 **********/
for ( ; blks_height > 0; blks_height -= 4) {
@@ -548,7 +548,7 @@ void Indeo3::decodeChunk(byte *cur, byte *ref, int width, int height,
cur_lp = ((uint32 *)cur_frm_pos) + width_tbl[lp2];
ref_lp = ((uint32 *)ref_frm_pos) + width_tbl[lp2];
- switch(correction_type_sp[0][k]) {
+ switch (correction_type_sp[0][k]) {
case 0:
*cur_lp = FROM_LE_32(((FROM_LE_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
lp2++;
@@ -651,7 +651,7 @@ void Indeo3::decodeChunk(byte *cur, byte *ref, int width, int height,
cur_lp = ((uint32 *)cur_frm_pos) + width_tbl[lp2 * 2];
ref_lp = ((uint32 *)cur_frm_pos) + width_tbl[(lp2 * 2) - 1];
- switch(correction_type_sp[lp2 & 0x01][k]) {
+ switch (correction_type_sp[lp2 & 0x01][k]) {
case 0:
cur_lp[width_tbl[1]] = FROM_LE_32(((FROM_LE_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
if (lp2 > 0 || flag1 == 0 || strip->ypos != 0)
@@ -780,7 +780,7 @@ void Indeo3::decodeChunk(byte *cur, byte *ref, int width, int height,
#endif
}
- switch(correction_type_sp[lp2 & 0x01][k]) {
+ switch (correction_type_sp[lp2 & 0x01][k]) {
case 0:
cur_lp[width_tbl[1]] = FROM_LE_32(((FROM_LE_32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][k]) << 1);
cur_lp[width_tbl[1]+1] = FROM_LE_32(((FROM_LE_32(lv2) >> 1) + correctionhighorder_lp[lp2 & 0x01][k]) << 1);
@@ -935,7 +935,7 @@ void Indeo3::decodeChunk(byte *cur, byte *ref, int width, int height,
cur_lp = ((uint32 *)cur_frm_pos) + width_tbl[lp2 * 2];
ref_lp = ((uint32 *)ref_frm_pos) + width_tbl[lp2 * 2];
- switch(correction_type_sp[lp2 & 0x01][k]) {
+ switch (correction_type_sp[lp2 & 0x01][k]) {
case 0:
lv1 = correctionloworder_lp[lp2 & 0x01][k];
lv2 = correctionhighorder_lp[lp2 & 0x01][k];
@@ -1038,7 +1038,7 @@ void Indeo3::decodeChunk(byte *cur, byte *ref, int width, int height,
cur_lp = ((uint32 *)cur_frm_pos) + width_tbl[lp2 * 2];
ref_lp = ((uint32 *)ref_frm_pos) + width_tbl[lp2 * 2];
- switch(correction_type_sp[lp2 & 0x01][k]) {
+ switch (correction_type_sp[lp2 & 0x01][k]) {
case 0:
cur_lp[0] = FROM_LE_32(((FROM_LE_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
cur_lp[width_tbl[1]] = FROM_LE_32(((FROM_LE_32(ref_lp[width_tbl[1]]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);