aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2010-10-10 21:26:18 +0000
committerJohannes Schickel2010-10-10 21:26:18 +0000
commit85f770599fe6eb7df8efe105d70538e261b835b6 (patch)
treecf89f844debd96ee770ed0fab642f0c79a2e187b
parent0c6c03bfd6ed0d85564c5b074f38095c2b796245 (diff)
downloadscummvm-rg350-85f770599fe6eb7df8efe105d70538e261b835b6.tar.gz
scummvm-rg350-85f770599fe6eb7df8efe105d70538e261b835b6.tar.bz2
scummvm-rg350-85f770599fe6eb7df8efe105d70538e261b835b6.zip
TOON: Coding guideline corrections.
svn-id: r53132
-rw-r--r--engines/toon/audio.cpp2
-rw-r--r--engines/toon/toon.cpp133
-rw-r--r--engines/toon/toon.h2
3 files changed, 70 insertions, 67 deletions
diff --git a/engines/toon/audio.cpp b/engines/toon/audio.cpp
index a0633c7f86..ed22186a49 100644
--- a/engines/toon/audio.cpp
+++ b/engines/toon/audio.cpp
@@ -426,7 +426,7 @@ AudioStreamPackage::AudioStreamPackage(ToonEngine *vm) : _vm(vm) {
}
AudioStreamPackage::~AudioStreamPackage() {
- delete [] _indexBuffer;
+ delete[] _indexBuffer;
}
bool AudioStreamPackage::loadAudioPackage(Common::String indexFile, Common::String streamFile) {
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index cfbb6bfe6f..53008b42d4 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -2980,71 +2980,74 @@ void ToonEngine::restorePalette() {
flushPalette();
}
-const char* ToonEngine::getSpecialConversationMusic(int32 conversationId) {
- const char* specialMusic[] = { "BR091013", "BR091013",
- 0, 0,
- "NET1214", "NET1214",
- 0, 0,
- "CAR1365B", "CAR1365B",
- 0, 0,
- 0, 0,
- "CAR14431", "CAR14431",
- 0, 0,
- "SCD16520", "SCD16520",
- "SCD16520", "SCD16520",
- "SCD16522", "SCD16522",
- 0, 0,
- "KPM8719", "KPM8719",
- 0, 0,
- "CAR1368B", "CAR1368B",
- 0, 0,
- 0, 0,
- "KPM6337", "KPM6337",
- "CAR20471", "CAR20471",
- "CAR136_1", "KPM87_57",
- 0, 0,
- "CAR13648", "CAR13648",
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- "SCD16526", "SCD16526",
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0 };
+const char *ToonEngine::getSpecialConversationMusic(int32 conversationId) {
+ static const char * const specialMusic[] = {
+ "BR091013", "BR091013",
+ 0, 0,
+ "NET1214", "NET1214",
+ 0, 0,
+ "CAR1365B", "CAR1365B",
+ 0, 0,
+ 0, 0,
+ "CAR14431", "CAR14431",
+ 0, 0,
+ "SCD16520", "SCD16520",
+ "SCD16520", "SCD16520",
+ "SCD16522", "SCD16522",
+ 0, 0,
+ "KPM8719", "KPM8719",
+ 0, 0,
+ "CAR1368B", "CAR1368B",
+ 0, 0,
+ 0, 0,
+ "KPM6337", "KPM6337",
+ "CAR20471", "CAR20471",
+ "CAR136_1", "KPM87_57",
+ 0, 0,
+ "CAR13648", "CAR13648",
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ "SCD16526", "SCD16526",
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0
+ };
+
return specialMusic[randRange(0, 1) + conversationId * 2];
}
diff --git a/engines/toon/toon.h b/engines/toon/toon.h
index 5b051bb7da..937f75913c 100644
--- a/engines/toon/toon.h
+++ b/engines/toon/toon.h
@@ -183,7 +183,7 @@ public:
virtual void viewInventoryItem(Common::String str, int32 lineId, int32 itemDest);
virtual void storePalette();
virtual void restorePalette();
- virtual const char* getSpecialConversationMusic(int32 locationId);
+ virtual const char *getSpecialConversationMusic(int32 locationId);
virtual void playRoomMusic();
Resources *resources() {