From 85f770599fe6eb7df8efe105d70538e261b835b6 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 10 Oct 2010 21:26:18 +0000 Subject: TOON: Coding guideline corrections. svn-id: r53132 --- engines/toon/audio.cpp | 2 +- engines/toon/toon.cpp | 133 +++++++++++++++++++++++++------------------------ engines/toon/toon.h | 2 +- 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() { -- cgit v1.2.3