aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2005-05-08 21:49:52 +0000
committerMax Horn2005-05-08 21:49:52 +0000
commitcca744f69a9eb079a314c8f39af1faa4e7b1e5a6 (patch)
tree1eb00deac3941d844ce98abc10eb4339955ef61d /scumm
parent013e30eb389c40eb579cc8e3f05b8e8da80925ca (diff)
downloadscummvm-rg350-cca744f69a9eb079a314c8f39af1faa4e7b1e5a6.tar.gz
scummvm-rg350-cca744f69a9eb079a314c8f39af1faa4e7b1e5a6.tar.bz2
scummvm-rg350-cca744f69a9eb079a314c8f39af1faa4e7b1e5a6.zip
Comply to our coding conventions
svn-id: r17975
Diffstat (limited to 'scumm')
-rw-r--r--scumm/charset.cpp12
-rw-r--r--scumm/debugger.cpp4
-rw-r--r--scumm/help.cpp2
-rw-r--r--scumm/imuse_digi/dimuse_script.cpp2
-rw-r--r--scumm/imuse_internal.h8
-rw-r--r--scumm/resource_v7he.cpp6
-rw-r--r--scumm/script_v72he.cpp2
-rw-r--r--scumm/smush/smush_font.cpp2
-rw-r--r--scumm/smush/smush_player.cpp2
-rw-r--r--scumm/sprite_he.cpp2
-rw-r--r--scumm/string.cpp16
11 files changed, 29 insertions, 29 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp
index 9d14818394..e3c4c0b7bd 100644
--- a/scumm/charset.cpp
+++ b/scumm/charset.cpp
@@ -251,14 +251,14 @@ void CharsetRendererV3::setCurID(byte id) {
}
int CharsetRendererCommon::getFontHeight() {
- if(_vm->_useCJKMode)
+ if (_vm->_useCJKMode)
return MAX(_vm->_2byteHeight + 1, (int)_fontPtr[1]);
else
return _fontPtr[1];
}
int CharsetRendererV3::getFontHeight() {
- if(_vm->_useCJKMode)
+ if (_vm->_useCJKMode)
return MAX(_vm->_2byteHeight + 1, 8);
else
return 8;
@@ -289,7 +289,7 @@ int CharsetRenderer::getStringWidth(int arg, const byte *text) {
if (_vm->_heversion >= 72 && chr == code) {
chr = text[pos++];
if (chr == 84) { // Strings of speech offset/size
- while(chr != code)
+ while (chr != code)
chr = text[pos++];
continue;
}
@@ -303,7 +303,7 @@ int CharsetRenderer::getStringWidth(int arg, const byte *text) {
break;
if (chr == 254 || chr == 255) {
//process in LE
- if(chr == 254 && checkKSCode(text[pos], chr) && _vm->_useCJKMode) {
+ if (chr == 254 && checkKSCode(text[pos], chr) && _vm->_useCJKMode) {
goto loc_avoid_ks_fe;
}
chr = text[pos++];
@@ -354,7 +354,7 @@ void CharsetRenderer::addLinebreaks(int a, byte *str, int pos, int maxwidth) {
if (_vm->_heversion >= 72 && chr == code) {
chr = str[pos++];
if (chr == 84) { // Strings of speech offset/size
- while(chr != code)
+ while (chr != code)
chr = str[pos++];
continue;
}
@@ -370,7 +370,7 @@ void CharsetRenderer::addLinebreaks(int a, byte *str, int pos, int maxwidth) {
continue;
if (chr == 254 || chr == 255) {
//process in LE
- if(chr == 254 && checkKSCode(str[pos], chr) && _vm->_useCJKMode) {
+ if (chr == 254 && checkKSCode(str[pos], chr) && _vm->_useCJKMode) {
goto loc_avoid_ks_fe;
}
chr = str[pos++];
diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp
index 0b74138248..847fb9ad27 100644
--- a/scumm/debugger.cpp
+++ b/scumm/debugger.cpp
@@ -546,7 +546,7 @@ bool ScummDebugger::Cmd_Debug(int argc, const char **argv) {
if ((argc == 1) && (_vm->_debugFlags > 0)) {
for (int i = 0; i < numChannels; i++) {
- if(_vm->_debugFlags & debugChannels[i].flag)
+ if (_vm->_debugFlags & debugChannels[i].flag)
DebugPrintf("%s - %s\n", debugChannels[i].channel,
debugChannels[i].desc);
}
@@ -570,7 +570,7 @@ bool ScummDebugger::Cmd_Debug(int argc, const char **argv) {
// Identify flag
const char *realFlag = argv[1] + 1;
for (int i = 0; i < numChannels; i++) {
- if((scumm_stricmp(debugChannels[i].channel, realFlag)) == 0) {
+ if ((scumm_stricmp(debugChannels[i].channel, realFlag)) == 0) {
if (setFlag) {
_vm->_debugFlags |= debugChannels[i].flag;
DebugPrintf("Enable ");
diff --git a/scumm/help.cpp b/scumm/help.cpp
index a3c3e09faf..22df7ecdb8 100644
--- a/scumm/help.cpp
+++ b/scumm/help.cpp
@@ -60,7 +60,7 @@ int ScummHelp::numPages(byte gameId) {
}
}
-#define ADD_BIND(k,d) do { key[i] = k; dsc[i] = d; i++; } while(0)
+#define ADD_BIND(k,d) do { key[i] = k; dsc[i] = d; i++; } while (0)
#define ADD_TEXT(d) ADD_BIND("",d)
#define ADD_LINE ADD_BIND("","")
diff --git a/scumm/imuse_digi/dimuse_script.cpp b/scumm/imuse_digi/dimuse_script.cpp
index 8a2e77f283..315ac03c0c 100644
--- a/scumm/imuse_digi/dimuse_script.cpp
+++ b/scumm/imuse_digi/dimuse_script.cpp
@@ -371,7 +371,7 @@ int32 IMuseDigital::getCurMusicLipSyncHeight(int syncId) {
void IMuseDigital::stopAllSounds() {
debug(5, "IMuseDigital::stopAllSounds");
- for(;;) {
+ for (;;) {
bool foundNotRemoved = false;
for (int l = 0; l < MAX_DIGITAL_TRACKS + MAX_DIGITAL_FADETRACKS; l++) {
Track *track = _track[l];
diff --git a/scumm/imuse_internal.h b/scumm/imuse_internal.h
index a0e05db9fb..46369f5d42 100644
--- a/scumm/imuse_internal.h
+++ b/scumm/imuse_internal.h
@@ -71,17 +71,17 @@ class ScummEngine;
////////////////////////////////////////
inline int clamp(int val, int min, int max) {
- if(val < min)
+ if (val < min)
return min;
- if(val > max)
+ if (val > max)
return max;
return val;
}
inline int transpose_clamp(int a, int b, int c) {
- if(b > a)
+ if (b > a)
a += (b - a + 11) / 12 * 12;
- if(c < a)
+ if (c < a)
a -= (a - c + 11) / 12 * 12;
return a;
}
diff --git a/scumm/resource_v7he.cpp b/scumm/resource_v7he.cpp
index 9e0be4efa9..2002ef8b99 100644
--- a/scumm/resource_v7he.cpp
+++ b/scumm/resource_v7he.cpp
@@ -1368,7 +1368,7 @@ bool MacResExtractor::init(File in) {
// Length check
int sumlen = MBI_INFOHDR + data_size_pad + rsrc_size_pad;
- if(sumlen == filelen)
+ if (sumlen == filelen)
_resOffset = MBI_INFOHDR + data_size_pad;
}
@@ -1581,7 +1581,7 @@ void MacResExtractor::convertIcons(byte *data, int datasize, byte **cursor, int
palette = (byte *)malloc(ctSize * 4);
// Read just high byte of 16-bit color
- for(int c = 0; c < ctSize; c++) {
+ for (int c = 0; c < ctSize; c++) {
// We just use indices 0..ctSize, so ignore color ID
dis.readUint16BE(); // colorID[c]
@@ -1608,7 +1608,7 @@ void MacResExtractor::convertIcons(byte *data, int datasize, byte **cursor, int
// build a mask to make sure the pixels are properly shifted out
bitmask = 0;
- for(int m = 0; m < bpp; m++) {
+ for (int m = 0; m < bpp; m++) {
bitmask <<= 1;
bitmask |= 1;
}
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index de487d2ae8..9b3ce60bdc 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -2055,7 +2055,7 @@ void ScummEngine_v72he::copyArray(int array1, int a1_dim2start, int a1_dim2end,
for (; a1_dim2start <= a1_dim2end; ++a1_dim2start, ++a2_dim2start) {
int a2dim1 = a2_dim1start;
int a1dim1 = a1_dim1start;
- for(; a1dim1 <= a1_dim1end; ++a1dim1, ++a2dim1) {
+ for (; a1dim1 <= a1_dim1end; ++a1dim1, ++a2dim1) {
int val = readArray(array2, a2_dim2start, a2dim1);
writeArray(array1, a1_dim2start, a1dim1, val);
}
diff --git a/scumm/smush/smush_font.cpp b/scumm/smush/smush_font.cpp
index 914691f84a..683547f212 100644
--- a/scumm/smush/smush_font.cpp
+++ b/scumm/smush/smush_font.cpp
@@ -44,7 +44,7 @@ int SmushFont::getStringWidth(const char *str) {
int width = 0;
while (*str) {
- if(*str & 0x80 && _vm->_useCJKMode) {
+ if (*str & 0x80 && _vm->_useCJKMode) {
width += _vm->_2byteWidth + 1;
str += 2;
} else
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index de24c74693..bfce7499e9 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -1145,7 +1145,7 @@ void SmushPlayer::insanity(bool flag) {
void SmushPlayer::seekSan(const char *file, int32 pos, int32 contFrame) {
Common::StackLock lock(_mutex);
- if(_smixer)
+ if (_smixer)
_smixer->stop();
if (file) {
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp
index decc8afa96..d2d2e12713 100644
--- a/scumm/sprite_he.cpp
+++ b/scumm/sprite_he.cpp
@@ -203,7 +203,7 @@ int ScummEngine_v90he::findSpriteWithClassOf(int x_pos, int y_pos, int spriteGro
y += h / 2;
}
- if(isWizPixelNonTransparent(resId, resState, x, y, spi->curImgFlags))
+ if (isWizPixelNonTransparent(resId, resState, x, y, spi->curImgFlags))
return spi->id;
}
}
diff --git a/scumm/string.cpp b/scumm/string.cpp
index e847219ed4..e0b42a18c7 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -255,7 +255,7 @@ void ScummEngine::CHARSET_1() {
i = 0;
memset(value, 0, 32);
c = *buffer++;
- while(c != 44) {
+ while (c != 44) {
value[i] = c;
c = *buffer++;
i++;
@@ -266,7 +266,7 @@ void ScummEngine::CHARSET_1() {
i = 0;
memset(value, 0, 32);
c = *buffer++;
- while(c != code) {
+ while (c != code) {
value[i] = c;
c = *buffer++;
i++;
@@ -286,7 +286,7 @@ void ScummEngine::CHARSET_1() {
i = 0;
memset(value, 0, 32);
c = *buffer++;
- while(c != code) {
+ while (c != code) {
value[i] = c;
c = *buffer++;
i++;
@@ -307,7 +307,7 @@ void ScummEngine::CHARSET_1() {
}
} else if (c == 0xFE || c == 0xFF) {
// WORKAROUND to avoid korean code 0xfe treated as charset message code.
- if(c == 0xFE && checkKSCode(*(buffer + 1), c) && _useCJKMode) {
+ if (c == 0xFE && checkKSCode(*(buffer + 1), c) && _useCJKMode) {
goto loc_avoid_ks_fe;
}
c = *buffer++;
@@ -387,7 +387,7 @@ loc_avoid_ks_fe:
c = 0x20; //not in S-JIS
} else {
c += *buffer++ * 256; //LE
- if(_gameId == GID_CMI) { //HACK: This fixes korean text position in COMI (off by 6 pixel)
+ if (_gameId == GID_CMI) { //HACK: This fixes korean text position in COMI (off by 6 pixel)
cmi_pos_hack = true;
_charset->_top += 6;
}
@@ -407,7 +407,7 @@ loc_avoid_ks_fe:
} else
_charset->printChar(c);
}
- if(cmi_pos_hack) {
+ if (cmi_pos_hack) {
cmi_pos_hack = false;
_charset->_top -= 6;
}
@@ -554,7 +554,7 @@ void ScummEngine::drawString(int a, const byte *msg) {
c = 0x20; //not in S-JIS
} else {
c += buf[i++] * 256;
- if(_gameId == GID_CMI) {
+ if (_gameId == GID_CMI) {
cmi_pos_hack = true;
_charset->_top += 6;
}
@@ -563,7 +563,7 @@ void ScummEngine::drawString(int a, const byte *msg) {
_charset->printChar(c);
_charset->_blitAlso = false;
- if(cmi_pos_hack) {
+ if (cmi_pos_hack) {
cmi_pos_hack = false;
_charset->_top -= 6;
}