aboutsummaryrefslogtreecommitdiff
path: root/engines/prince/mhwanh.cpp
diff options
context:
space:
mode:
authorKamil Zbróg2013-10-13 22:36:21 +0100
committerKamil Zbróg2013-10-13 22:36:21 +0100
commit30ad6df5fccbfcd1097d498e8dc01965e4e5cb2f (patch)
tree6cbc397f621ff5744ddf8fb8502c6bcc43d02d11 /engines/prince/mhwanh.cpp
parent71f8ce0894117a9b5431c7066ad1352203d89c4a (diff)
downloadscummvm-rg350-30ad6df5fccbfcd1097d498e8dc01965e4e5cb2f.tar.gz
scummvm-rg350-30ad6df5fccbfcd1097d498e8dc01965e4e5cb2f.tar.bz2
scummvm-rg350-30ad6df5fccbfcd1097d498e8dc01965e4e5cb2f.zip
PRINCE: code convention cleanup
Diffstat (limited to 'engines/prince/mhwanh.cpp')
-rw-r--r--engines/prince/mhwanh.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/engines/prince/mhwanh.cpp b/engines/prince/mhwanh.cpp
index 5ad39313a0..0847220a70 100644
--- a/engines/prince/mhwanh.cpp
+++ b/engines/prince/mhwanh.cpp
@@ -28,19 +28,16 @@
namespace Prince {
-MhwanhDecoder::MhwanhDecoder() : _surface(0), _palette(0), _paletteColorCount(0)
-{
+MhwanhDecoder::MhwanhDecoder()
+ : _surface(0), _palette(0), _paletteColorCount(0) {
}
-MhwanhDecoder::~MhwanhDecoder()
-{
+MhwanhDecoder::~MhwanhDecoder() {
destroy();
}
-void MhwanhDecoder::destroy()
-{
- if (_surface)
- {
+void MhwanhDecoder::destroy() {
+ if (_surface) {
_surface->free();
_surface = 0;
}
@@ -49,8 +46,7 @@ void MhwanhDecoder::destroy()
_paletteColorCount = 0;
}
-bool MhwanhDecoder::loadStream(Common::SeekableReadStream &stream)
-{
+bool MhwanhDecoder::loadStream(Common::SeekableReadStream &stream) {
_paletteColorCount = 256;
stream.seek(0);
stream.skip(0x20);
@@ -64,8 +60,7 @@ bool MhwanhDecoder::loadStream(Common::SeekableReadStream &stream)
_surface = new Graphics::Surface();
_surface->create(640, 480, Graphics::PixelFormat::createFormatCLUT8());
- for (int h = 0; h < 480; ++h)
- {
+ for (int h = 0; h < 480; ++h) {
stream.read(_surface->getBasePtr(0, h - 1), 640);
}