aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Menshakov2010-03-18 23:30:29 +0000
committerVladimir Menshakov2010-03-18 23:30:29 +0000
commit412e63123e14e4bb838c9b1b8f7596ca53201f9f (patch)
tree4fa82f24f5da01fb726ecedb95f0150291f90a56
parente245de962ac30fa1a6676a6fbf5e27f61c8c595c (diff)
downloadscummvm-rg350-412e63123e14e4bb838c9b1b8f7596ca53201f9f.tar.gz
scummvm-rg350-412e63123e14e4bb838c9b1b8f7596ca53201f9f.tar.bz2
scummvm-rg350-412e63123e14e4bb838c9b1b8f7596ca53201f9f.zip
code convention fixes mentioned by Max Horn
svn-id: r48296
-rw-r--r--engines/teenagent/inventory.cpp2
-rw-r--r--engines/teenagent/music.cpp2
-rw-r--r--engines/teenagent/pack.cpp18
-rw-r--r--engines/teenagent/pack.h12
-rw-r--r--engines/teenagent/resources.cpp2
-rw-r--r--engines/teenagent/teenagent.cpp2
6 files changed, 19 insertions, 19 deletions
diff --git a/engines/teenagent/inventory.cpp b/engines/teenagent/inventory.cpp
index 538bd2b7c1..f97bbf8b5d 100644
--- a/engines/teenagent/inventory.cpp
+++ b/engines/teenagent/inventory.cpp
@@ -44,7 +44,7 @@ void Inventory::init(TeenAgentEngine *engine) {
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];
diff --git a/engines/teenagent/music.cpp b/engines/teenagent/music.cpp
index ba63a7043b..5f554bf287 100644
--- a/engines/teenagent/music.cpp
+++ b/engines/teenagent/music.cpp
@@ -62,7 +62,7 @@ bool MusicPlayer::load(int id) {
// 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) {
diff --git a/engines/teenagent/pack.cpp b/engines/teenagent/pack.cpp
index 0e35e64d26..0b12c821a5 100644
--- a/engines/teenagent/pack.cpp
+++ b/engines/teenagent/pack.cpp
@@ -44,10 +44,10 @@ bool FilePack::open(const Common::String &filename) {
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 @@ bool FilePack::open(const Common::String &filename) {
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 @@ uint32 FilePack::read(uint32 id, byte *dst, uint32 size) const {
}
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 @@ bool MemoryPack::open(const Common::String &filename) {
return true;
}
-uint32 MemoryPack::get_size(uint32 id) const {
+uint32 MemoryPack::getSize(uint32 id) const {
--id;
return id < chunks.size()? chunks[id].size: 0;
}
diff --git a/engines/teenagent/pack.h b/engines/teenagent/pack.h
index 876e049901..221f6e9c90 100644
--- a/engines/teenagent/pack.h
+++ b/engines/teenagent/pack.h
@@ -33,15 +33,15 @@ namespace TeenAgent {
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 @@ public:
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 @@ public:
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;
};
diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp
index be0d1a70c2..6fc1f4b5dc 100644
--- a/engines/teenagent/resources.cpp
+++ b/engines/teenagent/resources.cpp
@@ -101,7 +101,7 @@ bool Resources::loadArchives(const ADGameDescription *gd) {
}
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;
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp
index 3867517b96..d59c533890 100644
--- a/engines/teenagent/teenagent.cpp
+++ b/engines/teenagent/teenagent.cpp
@@ -293,7 +293,7 @@ bool TeenAgentEngine::showLogo() {
}
_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) {
{