aboutsummaryrefslogtreecommitdiff
path: root/kyra
diff options
context:
space:
mode:
authorMax Horn2005-05-08 21:49:52 +0000
committerMax Horn2005-05-08 21:49:52 +0000
commitcca744f69a9eb079a314c8f39af1faa4e7b1e5a6 (patch)
tree1eb00deac3941d844ce98abc10eb4339955ef61d /kyra
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 'kyra')
-rw-r--r--kyra/cpsimage.cpp8
-rw-r--r--kyra/font.cpp2
-rw-r--r--kyra/kyra.cpp2
-rw-r--r--kyra/resource.cpp2
-rw-r--r--kyra/resource.h2
-rw-r--r--kyra/script.cpp4
6 files changed, 10 insertions, 10 deletions
diff --git a/kyra/cpsimage.cpp b/kyra/cpsimage.cpp
index e19476fa07..135f5ad27a 100644
--- a/kyra/cpsimage.cpp
+++ b/kyra/cpsimage.cpp
@@ -61,7 +61,7 @@ CPSImage::CPSImage(uint8* buffer, uint32 size) {
_cpsHeader._pal = bufferstream.readUint32LE();
// lets check a bit
- if(_cpsHeader._pal == 0x3000000) {
+ if (_cpsHeader._pal == 0x3000000) {
// if this was a compressed palette you should have strange graphics
uint8* palbuffer = new uint8[768];
@@ -79,9 +79,9 @@ CPSImage::CPSImage(uint8* buffer, uint32 size) {
uint8* imagebuffer = &buffer[bufferstream.pos()];
assert(imagebuffer);
- if(_cpsHeader._format == 4) {
+ if (_cpsHeader._format == 4) {
Compression::decode80(imagebuffer, _image);
- } else if(_cpsHeader._format == 3) {
+ } else if (_cpsHeader._format == 3) {
Compression::decode3(imagebuffer, _image, _cpsHeader._imagesize);
} else {
error("unknown CPS format %d", _cpsHeader._format);
@@ -89,7 +89,7 @@ CPSImage::CPSImage(uint8* buffer, uint32 size) {
int16 width = getWidthFromCPSRes(_cpsHeader._imagesize);
- if(width == -1) {
+ if (width == -1) {
warning("unknown CPS width(imagesize: %d)", _cpsHeader._imagesize);
delete [] buffer;
return;
diff --git a/kyra/font.cpp b/kyra/font.cpp
index 48b2ee1ff2..999c9a4b0f 100644
--- a/kyra/font.cpp
+++ b/kyra/font.cpp
@@ -55,7 +55,7 @@ Font::Font(uint8* buffer, uint32 size) {
_fontHeader._height = bufferstream.readByte();
// tests for the magic values
- if(_fontHeader._magic1 != FontHeader_Magic1 || _fontHeader._magic2 != FontHeader_Magic2 ||
+ if (_fontHeader._magic1 != FontHeader_Magic1 || _fontHeader._magic2 != FontHeader_Magic2 ||
_fontHeader._magic3 != FontHeader_Magic3) {
error("magic vars in the fontheader are corrupt\n"
"_magic1 = 0x%x, _magic2 = 0x%x, _magic3 = 0x%x",
diff --git a/kyra/kyra.cpp b/kyra/kyra.cpp
index 2aed994d55..595d820e54 100644
--- a/kyra/kyra.cpp
+++ b/kyra/kyra.cpp
@@ -235,7 +235,7 @@ int KyraEngine::go() {
_midiDriver->playTrack(3);
}
- while(true) {
+ while (true) {
OSystem::Event event;
//if (_debugger->isAttached())
// _debugger->onFrame();
diff --git a/kyra/resource.cpp b/kyra/resource.cpp
index da0c2bbed2..f661b979ed 100644
--- a/kyra/resource.cpp
+++ b/kyra/resource.cpp
@@ -212,7 +212,7 @@ PAKFile::PAKFile(/*const Common::String &path, */const Common::String& file) {
// saves the name
chunk->_name = reinterpret_cast<const char*>(_buffer + pos);
pos += strlen(chunk->_name) + 1;
- if(!(*chunk->_name))
+ if (!(*chunk->_name))
break;
endoffset = READ_LE_UINT32(_buffer + pos);
diff --git a/kyra/resource.h b/kyra/resource.h
index 514198fafb..67275e1dbc 100644
--- a/kyra/resource.h
+++ b/kyra/resource.h
@@ -122,7 +122,7 @@ public:
// only for testing :)
uint8 getColor(uint16 x, uint16 y) { return _image[y * _width + x]; }
- uint8& operator[](uint16 index) { if(index > _width * _height) return _image[0]; return _image[index]; }
+ uint8& operator[](uint16 index) { if (index > _width * _height) return _image[0]; return _image[index]; }
protected:
diff --git a/kyra/script.cpp b/kyra/script.cpp
index 755ca58925..9176f4a4f4 100644
--- a/kyra/script.cpp
+++ b/kyra/script.cpp
@@ -504,12 +504,12 @@ uint32 VMContext::contScript(void) {
uint32 scriptStateAtStart = _scriptState;
// runs the script
- while(true) {
+ while (true) {
if ((uint32)_instructionPos > _chunks[kData]._size) {
debug("_instructionPos( = %d) > _chunks[kData]._size( = %d)", _instructionPos, _chunks[kData]._size);
_error = true;
break;
- } else if(_instructionPos >= _nextScriptPos) {
+ } else if (_instructionPos >= _nextScriptPos) {
_scriptState = kScriptStopped;
break;
}