[Scummvm-cvs-logs] SF.net SVN: scummvm:[48296] scummvm/trunk/engines/teenagent

megath at users.sourceforge.net megath at users.sourceforge.net
Fri Mar 19 00:30:29 CET 2010


Revision: 48296
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48296&view=rev
Author:   megath
Date:     2010-03-18 23:30:29 +0000 (Thu, 18 Mar 2010)

Log Message:
-----------
code convention fixes mentioned by Max Horn

Modified Paths:
--------------
    scummvm/trunk/engines/teenagent/inventory.cpp
    scummvm/trunk/engines/teenagent/music.cpp
    scummvm/trunk/engines/teenagent/pack.cpp
    scummvm/trunk/engines/teenagent/pack.h
    scummvm/trunk/engines/teenagent/resources.cpp
    scummvm/trunk/engines/teenagent/teenagent.cpp

Modified: scummvm/trunk/engines/teenagent/inventory.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/inventory.cpp	2010-03-18 23:24:32 UTC (rev 48295)
+++ scummvm/trunk/engines/teenagent/inventory.cpp	2010-03-18 23:30:29 UTC (rev 48296)
@@ -44,7 +44,7 @@
 	debug(0, "loading inventory background...");
 	background.load(s, Surface::kTypeOns);
 
-	uint32 items_size = varia.get_size(4);
+	uint32 items_size = varia.getSize(4);
 	if (items_size == 0)
 		error("invalid inventory items size");
 	items = new byte[items_size];

Modified: scummvm/trunk/engines/teenagent/music.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/music.cpp	2010-03-18 23:24:32 UTC (rev 48295)
+++ scummvm/trunk/engines/teenagent/music.cpp	2010-03-18 23:30:29 UTC (rev 48296)
@@ -62,7 +62,7 @@
 		// Load the sample data
 		byte sampleResource = ((sample >> 4) & 0x0F) * 10 + (sample & 0x0F);
 		debug(0, "currSample = %d, sample = 0x%02x, resource: %d", currSample, sample, sampleResource);
-		uint32 sampleSize = res->sam_mmm.get_size(sampleResource);
+		uint32 sampleSize = res->sam_mmm.getSize(sampleResource);
 		Common::SeekableReadStream *in = res->sam_mmm.getStream(sampleResource);
 
 		if (in == 0) {

Modified: scummvm/trunk/engines/teenagent/pack.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/pack.cpp	2010-03-18 23:24:32 UTC (rev 48295)
+++ scummvm/trunk/engines/teenagent/pack.cpp	2010-03-18 23:30:29 UTC (rev 48296)
@@ -44,10 +44,10 @@
 	if (!file.open(filename))
 		return false;
 
-	_files_count = file.readUint32LE();
-	debug(0, "opened %s, found %u entries", filename.c_str(), _files_count);
-	offsets = new uint32[_files_count + 1];
-	for (uint32 i = 0; i <= _files_count; ++i) {
+	_fileCount = file.readUint32LE();
+	debug(0, "opened %s, found %u entries", filename.c_str(), _fileCount);
+	offsets = new uint32[_fileCount + 1];
+	for (uint32 i = 0; i <= _fileCount; ++i) {
 		offsets[i] = file.readUint32LE();
 		//debug(0, "%d: %06x", i, offsets[i]);
 	}
@@ -58,14 +58,14 @@
 	return true;
 }
 
-uint32 FilePack::get_size(uint32 id) const {
-	if (id < 1 || id > _files_count)
+uint32 FilePack::getSize(uint32 id) const {
+	if (id < 1 || id > _fileCount)
 		return 0;
 	return offsets[id] - offsets[id - 1];
 }
 
 uint32 FilePack::read(uint32 id, byte *dst, uint32 size) const {
-	if (id < 1 || id > _files_count)
+	if (id < 1 || id > _fileCount)
 		return 0;
 
 	file.seek(offsets[id - 1]);
@@ -76,7 +76,7 @@
 }
 
 Common::SeekableReadStream *FilePack::getStream(uint32 id) const {
-	if (id < 1 || id > _files_count)
+	if (id < 1 || id > _fileCount)
 		return 0;
 	//debug(0, "stream: %04x-%04x", offsets[id - 1], offsets[id]);
 	return new Common::SeekableSubReadStream(&file, offsets[id - 1], offsets[id], DisposeAfterUse::NO);
@@ -112,7 +112,7 @@
 	return true;
 }
 
-uint32 MemoryPack::get_size(uint32 id) const {
+uint32 MemoryPack::getSize(uint32 id) const {
 	--id;
 	return id < chunks.size()? chunks[id].size: 0;
 }

Modified: scummvm/trunk/engines/teenagent/pack.h
===================================================================
--- scummvm/trunk/engines/teenagent/pack.h	2010-03-18 23:24:32 UTC (rev 48295)
+++ scummvm/trunk/engines/teenagent/pack.h	2010-03-18 23:30:29 UTC (rev 48296)
@@ -33,15 +33,15 @@
 
 class Pack {
 protected:
-	uint32 _files_count;
+	uint32 _fileCount;
 public:
-	Pack(): _files_count(0) {}
+	Pack(): _fileCount(0) {}
 	virtual ~Pack() {};
 	virtual bool open(const Common::String &filename) = 0;
 	virtual void close() = 0;
 
-	virtual uint32 files_count() const { return _files_count; }
-	virtual uint32 get_size(uint32 id) const = 0;
+	virtual uint32 fileCount() const { return _fileCount; }
+	virtual uint32 getSize(uint32 id) const = 0;
 	virtual uint32 read(uint32 id, byte *dst, uint32 size) const = 0;
 	virtual Common::SeekableReadStream *getStream(uint32 id) const = 0;
 };
@@ -57,7 +57,7 @@
 	bool open(const Common::String &filename);
 	void close();
 
-	uint32 get_size(uint32 id) const;
+	uint32 getSize(uint32 id) const;
 	uint32 read(uint32 id, byte *dst, uint32 size) const;
 	Common::SeekableReadStream *getStream(uint32 id) const;
 };
@@ -82,7 +82,7 @@
 	bool open(const Common::String &filename);
 	void close();
 
-	uint32 get_size(uint32 id) const;
+	uint32 getSize(uint32 id) const;
 	uint32 read(uint32 id, byte *dst, uint32 size) const;
 	Common::SeekableReadStream *getStream(uint32 id) const;
 };

Modified: scummvm/trunk/engines/teenagent/resources.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/resources.cpp	2010-03-18 23:24:32 UTC (rev 48295)
+++ scummvm/trunk/engines/teenagent/resources.cpp	2010-03-18 23:30:29 UTC (rev 48296)
@@ -101,7 +101,7 @@
 }
 
 void Resources::loadOff(Graphics::Surface &surface, byte *palette, int id) {
-	uint32 size = off.get_size(id);
+	uint32 size = off.getSize(id);
 	if (size == 0) {
 		error("invalid background %d", id);
 		return;

Modified: scummvm/trunk/engines/teenagent/teenagent.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/teenagent.cpp	2010-03-18 23:24:32 UTC (rev 48295)
+++ scummvm/trunk/engines/teenagent/teenagent.cpp	2010-03-18 23:30:29 UTC (rev 48296)
@@ -293,7 +293,7 @@
 	}
 	_system->setPalette(palette, 0, 0x100);
 
-	uint n = logo.files_count();
+	uint n = logo.fileCount();
 	for(uint f = 0; f < 4; ++f)
 		for(uint i = 2; i <= n; ++i) {
 			{


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list