[Scummvm-cvs-logs] scummvm master -> ee6ac179ff6c3be516ce00339e10e63c5f4c4906

Strangerke Strangerke at scummvm.org
Wed Feb 19 00:17:16 CET 2014


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
cd3e48cace VOYEUR: Fix a null pointer assigned to 0
ee6ac179ff VOYEUR: Some more clean up in FILES


Commit: cd3e48cacedaa057bc3878e9e2c62f47b293b1b6
    https://github.com/scummvm/scummvm/commit/cd3e48cacedaa057bc3878e9e2c62f47b293b1b6
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-02-18T15:15:21-08:00

Commit Message:
VOYEUR: Fix a null pointer assigned to 0

Changed paths:
    engines/voyeur/files.cpp



diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp
index ecea231..7c6b8c9 100644
--- a/engines/voyeur/files.cpp
+++ b/engines/voyeur/files.cpp
@@ -1110,7 +1110,7 @@ PictureResource::PictureResource(BoltFilesState &state, const byte *src):
 			int mask = (nbytes + 0x3FFF) >> 14;
 			_imgData = NULL;
 
-			if (state._boltPageFrame != 0) {
+			if (state._boltPageFrame != NULL) {
 				_maskData = mask;
 				state.decompress(state._boltPageFrame, nbytes, state._curMemberPtr->_mode);
 				return;


Commit: ee6ac179ff6c3be516ce00339e10e63c5f4c4906
    https://github.com/scummvm/scummvm/commit/ee6ac179ff6c3be516ce00339e10e63c5f4c4906
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-02-18T15:15:22-08:00

Commit Message:
VOYEUR: Some more clean up in FILES

Changed paths:
    engines/voyeur/files.cpp
    engines/voyeur/files.h
    engines/voyeur/graphics.cpp



diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp
index 7c6b8c9..d701f5a 100644
--- a/engines/voyeur/files.cpp
+++ b/engines/voyeur/files.cpp
@@ -173,7 +173,7 @@ void BoltFilesState::nextBlock() {
 /*------------------------------------------------------------------------*/
 
 FilesManager::FilesManager() {
-	_decompressSize = DECOMPRESS_SIZE;
+
 }
 
 bool FilesManager::openBoltLib(const Common::String &filename, BoltFile *&boltFile) {
@@ -609,8 +609,6 @@ BoltGroup::BoltGroup(Common::SeekableReadStream *f): _file(f) {
 
 	_file->read(&buffer[0], BOLT_GROUP_SIZE);
 	_processed = buffer[0] != 0;
-	_callInitGro = buffer[1] != 0;
-	_termGroIndex = buffer[2];
 	_count = buffer[3] ? buffer[3] : 256;
 	_fileOffset = READ_LE_UINT32(&buffer[8]);
 }
@@ -658,9 +656,7 @@ BoltEntry::BoltEntry(Common::SeekableReadStream *f, uint16 id): _file(f), _id(id
 	byte buffer[16];
 	_file->read(&buffer[0], 16);
 	_mode = buffer[0];
-	_initMemRequired = buffer[1];
 	_initMethod = buffer[3];
-	_xorMask = buffer[4] & 0xff;
 	_size = READ_LE_UINT32(&buffer[4]) & 0xffffff;
 	_fileOffset = READ_LE_UINT32(&buffer[8]); 
 }
@@ -955,7 +951,6 @@ int DisplayResource::drawText(const Common::String &msg) {
 		} else {
 			fontChar._pick = fontInfo._picPick;
 			fontChar._onOff = fontInfo._picOnOff;
-			fontChar._depth = fontData._fontDepth;
 		}
 
 		// Loop to draw each character in turn
@@ -1029,7 +1024,7 @@ PictureResource::PictureResource(BoltFilesState &state, const byte *src):
 	_select = src[2];
 	_pick = src[3];
 	_onOff = src[4];
-	_depth = src[5];
+	// depth is in src[5], unused.
 
 	int xs = READ_LE_UINT16(&src[6]);
 	int ys = READ_LE_UINT16(&src[8]);
@@ -1131,7 +1126,6 @@ PictureResource::PictureResource(Graphics::Surface *surface) {
 	_select = 0;
 	_pick = 0;
 	_onOff = 0;
-	_depth = 0;
 	_maskData = 0;
 	_planeSize = 0;
 	
@@ -1145,7 +1139,6 @@ PictureResource::PictureResource() {
 	_select = 0;
 	_pick = 0;
 	_onOff = 0;
-	_depth = 0;
 	_maskData = 0;
 	_planeSize = 0;
 
@@ -1154,13 +1147,11 @@ PictureResource::PictureResource() {
 }
 
 PictureResource::PictureResource(int flags, int select, int pick, int onOff, 
-		int depth,  const Common::Rect &bounds, int maskData, byte *imgData,
-		int planeSize) {
+		const Common::Rect &bounds, int maskData, byte *imgData, int planeSize) {
 	_flags = flags;
 	_select = select;
 	_pick = pick;
 	_onOff = onOff;
-	_depth = depth;
 	_bounds = bounds;
 	_maskData = maskData;
 	_imgData = imgData;
@@ -1210,7 +1201,6 @@ ViewPortResource::ViewPortResource(BoltFilesState &state, const byte *src):
 	int ys = READ_LE_UINT16(src + 14);
 	_bounds = Common::Rect(xs, ys, xs + READ_LE_UINT16(src + 16), 
 		ys + READ_LE_UINT16(src + 18));
-	_field18 = READ_LE_UINT16(src + 0x18);
 
 	_currentPic = state._curLibPtr->getPictureResource(READ_LE_UINT32(src + 0x20));
 	_activePage = state._curLibPtr->getPictureResource(READ_LE_UINT32(src + 0x24));
@@ -1320,7 +1310,6 @@ void ViewPortResource::setupViewPort(PictureResource *page, Common::Rect *clipRe
 	}
 
 	_activePage = page;
-	_field18 = 0;
 	_clipRect = r;
 	_setupFn = setupFn;
 	_addFn = addFn;
diff --git a/engines/voyeur/files.h b/engines/voyeur/files.h
index 48656c5..9211373 100644
--- a/engines/voyeur/files.h
+++ b/engines/voyeur/files.h
@@ -102,7 +102,7 @@ private:
 
 public:
 	Common::File _file;
-public:
+
 	BoltFile(const Common::String &filename, BoltFilesState &state);
 	virtual ~BoltFile();
 
@@ -154,10 +154,8 @@ class BoltGroup {
 private:
 	Common::SeekableReadStream *_file;
 public:
-	byte _loaded;
+	bool _loaded;
 	bool _processed;
-	bool _callInitGro;
-	int _termGroIndex;
 	int _count;
 	int _fileOffset;
 	Common::Array<BoltEntry> _entries;
@@ -176,10 +174,8 @@ private:
 public:
 	uint16 _id;
 	byte _mode;
-	byte _initMemRequired;
 	byte _initMethod;
 	int _fileOffset;
-	byte _xorMask;
 	int _size;
 	byte *_data;
 
@@ -207,8 +203,6 @@ public:
 };
 
 class FilesManager {
-private:
-	int _decompressSize;
 public:
 	BoltFilesState _boltFilesState;
 	BoltFile *_curLibPtr;
@@ -295,7 +289,6 @@ public:
 	byte _select;
 	byte _pick;
 	byte _onOff;
-	byte _depth;
 	Common::Rect _bounds;
 	uint32 _maskData;
 	uint _planeSize;
@@ -311,7 +304,7 @@ public:
 	DisposeAfterUse::Flag _freeImgData;
 public:
 	PictureResource(BoltFilesState &state, const byte *src);
-	PictureResource(int flags, int select, int pick, int onOff, int depth, 
+	PictureResource(int flags, int select, int pick, int onOff, 
 		const Common::Rect &bounds, int maskData, byte *imgData, int planeSize);
 	PictureResource(Graphics::Surface *surface);
 	PictureResource();
diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp
index 1157e76..26a1efc 100644
--- a/engines/voyeur/graphics.cpp
+++ b/engines/voyeur/graphics.cpp
@@ -56,7 +56,7 @@ GraphicsManager::GraphicsManager(): _defaultDrawInfo(1, Common::Point(), 0), _dr
 	_vPort = NULL;
 	_fontPtr = NULL;
 	Common::fill(&_VGAColors[0], &_VGAColors[PALETTE_SIZE], 0);
-	_fontChar = new PictureResource(0, 0xff, 0xff, 0, 0, Common::Rect(), 0, NULL, 0);
+	_fontChar = new PictureResource(0, 0xff, 0xff, 0, Common::Rect(), 0, NULL, 0);
 }
 
 void GraphicsManager::sInitGraphics() {






More information about the Scummvm-git-logs mailing list