From eaca55ee50172ce98e0a53629251602884dcb918 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 4 Oct 2009 17:54:08 +0000 Subject: Some fixes to comply with our coding guidelines. svn-id: r44624 --- engines/kyra/animator_lok.h | 2 +- engines/kyra/gui.h | 6 +++--- engines/kyra/gui_v2.h | 1 - engines/kyra/kyra_hof.h | 32 +++++++++++++++--------------- engines/kyra/kyra_mr.h | 1 + engines/kyra/kyra_v1.h | 48 ++++++++++++++++++++++----------------------- engines/kyra/kyra_v2.h | 2 +- engines/kyra/lol.h | 4 ++-- engines/kyra/resource.h | 4 ++-- engines/kyra/screen.h | 24 +++++++++++------------ engines/kyra/script.h | 4 ++-- engines/kyra/sound_intern.h | 6 +++--- engines/kyra/wsamovie.h | 1 - 13 files changed, 67 insertions(+), 68 deletions(-) (limited to 'engines') diff --git a/engines/kyra/animator_lok.h b/engines/kyra/animator_lok.h index 618a210082..3abc9c3b5e 100644 --- a/engines/kyra/animator_lok.h +++ b/engines/kyra/animator_lok.h @@ -123,8 +123,8 @@ protected: int _brandonAnimSeqSizeWidth; int _brandonAnimSeqSizeHeight; - }; + } // end of namespace Kyra #endif diff --git a/engines/kyra/gui.h b/engines/kyra/gui.h index 95df656977..9867daa4ec 100644 --- a/engines/kyra/gui.h +++ b/engines/kyra/gui.h @@ -44,9 +44,9 @@ struct Button { typedef Common::SharedPtr Callback; Button() : nextButton(0), index(0), keyCode(0), keyCode2(0), data0Val1(0), data1Val1(0), data2Val1(0), flags(0), - data0ShapePtr(0), data1ShapePtr(0), data2ShapePtr(0), data0Callback(), data1Callback(), data2Callback(), - dimTableIndex(0), x(0), y(0), width(0), height(0), data0Val2(0), data0Val3(0), data1Val2(0), data1Val3(0), - data2Val2(0), data2Val3(0), flags2(0), mouseWheel(0), buttonCallback(), arg(0) {} + data0ShapePtr(0), data1ShapePtr(0), data2ShapePtr(0), data0Callback(), data1Callback(), data2Callback(), + dimTableIndex(0), x(0), y(0), width(0), height(0), data0Val2(0), data0Val3(0), data1Val2(0), data1Val3(0), + data2Val2(0), data2Val3(0), flags2(0), mouseWheel(0), buttonCallback(), arg(0) {} Button *nextButton; uint16 index; diff --git a/engines/kyra/gui_v2.h b/engines/kyra/gui_v2.h index 9af4572e4d..f6406f7c1f 100644 --- a/engines/kyra/gui_v2.h +++ b/engines/kyra/gui_v2.h @@ -229,7 +229,6 @@ protected: bool choiceDialog(int name, bool type); int choiceYes(Button *caller); int choiceNo(Button *caller); - }; } // end of namespace Kyra diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h index 6edcd364bc..02710a9f84 100644 --- a/engines/kyra/kyra_hof.h +++ b/engines/kyra/kyra_hof.h @@ -38,7 +38,7 @@ namespace Kyra { -enum kSequences { +enum Sequences { kSequenceVirgin = 0, kSequenceWestwood, kSequenceTitle, @@ -60,7 +60,7 @@ enum kSequences { kSequenceArraySize }; -enum kNestedSequences { +enum NestedSequences { kSequenceFiggle = 0, kSequenceOver1, kSequenceOver2, @@ -78,7 +78,7 @@ enum kNestedSequences { kSequenceHand4 }; -enum kSequencesDemo { +enum SequencesDemo { kSequenceDemoVirgin = 0, kSequenceDemoWestwood, kSequenceDemoTitle, @@ -89,7 +89,7 @@ enum kSequencesDemo { kSequenceDemoFisher }; -enum kNestedSequencesDemo { +enum NestedSequencesDemo { kSequenceDemoWharf2 = 0, kSequenceDemoDinob2, kSequenceDemoWater, @@ -98,7 +98,7 @@ enum kNestedSequencesDemo { }; #ifdef ENABLE_LOL -enum kSequencesLolDemo { +enum SequencesLolDemo { kSequenceLolDemoScene1 = 0, kSequenceLolDemoText1, kSequenceLolDemoScene2, @@ -272,7 +272,7 @@ protected: void seq_loadNestedSequence(int wsaNum, int seqNum); void seq_nestedSequenceFrame(int command, int wsaNum); void seq_animatedSubFrame(int srcPage, int dstPage, int delaytime, - int steps, int x, int y, int w, int h, int openClose, int directionFlags); + int steps, int x, int y, int w, int h, int openClose, int directionFlags); bool seq_processNextSubFrame(int wsaNum); void seq_resetActiveWSA(int wsaNum); void seq_unloadWSA(int wsaNum); @@ -287,7 +287,7 @@ protected: char *seq_preprocessString(const char *str, int width); void seq_printCreditsString(uint16 strIndex, int x, int y, const uint8 *colorMap, uint8 textcolor); void seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, int textColor, int x, int y, int width, - WSAMovie_v2 * wsa, int firstframe, int lastframe, int wsaXpos, int wsaYpos); + WSAMovie_v2 * wsa, int firstframe, int lastframe, int wsaXpos, int wsaYpos); void seq_finaleActorScreen(); void seq_displayScrollText(uint8 *data, const ScreenDim *d, int tempPage1, int tempPage2, int speed, int step, Screen::FontId fid1, Screen::FontId fid2, const uint8 *shapeData = 0, const char *const *specialData = 0); void seq_scrollPage(int bottom, int top); @@ -841,16 +841,16 @@ protected: ActiveWSA *_activeWSA; ActiveText *_activeText; - const char *const *_sequencePakList; + const char * const *_sequencePakList; int _sequencePakListSize; - const char *const *_ingamePakList; + const char * const *_ingamePakList; int _ingamePakListSize; - const char *const *_musicFileListIntro; + const char * const *_musicFileListIntro; int _musicFileListIntroSize; - const char *const *_musicFileListFinale; + const char * const *_musicFileListFinale; int _musicFileListFinaleSize; - const char *const *_musicFileListIngame; + const char * const *_musicFileListIngame; int _musicFileListIngameSize; const uint8 *_cdaTrackTableIntro; int _cdaTrackTableIntroSize; @@ -858,17 +858,17 @@ protected: int _cdaTrackTableIngameSize; const uint8 *_cdaTrackTableFinale; int _cdaTrackTableFinaleSize; - const char *const *_sequenceSoundList; + const char * const *_sequenceSoundList; int _sequenceSoundListSize; - const char *const *_ingameSoundList; + const char * const *_ingameSoundList; int _ingameSoundListSize; const uint16 *_ingameSoundIndex; int _ingameSoundIndexSize; - const char *const *_sequenceStrings; + const char * const *_sequenceStrings; int _sequenceStringsSize; const uint16 *_ingameTalkObjIndex; int _ingameTalkObjIndexSize; - const char *const *_ingameTimJpStr; + const char * const *_ingameTimJpStr; int _ingameTimJpStrSize; const HofSeqData *_sequences; const ItemAnimData_v2 *_itemAnimData; diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h index 2204f78b82..6a31935178 100644 --- a/engines/kyra/kyra_mr.h +++ b/engines/kyra/kyra_mr.h @@ -50,6 +50,7 @@ public: KyraEngine_MR(OSystem *system, const GameFlags &flags); ~KyraEngine_MR(); + // Regarding pausing of the engine: // Idle animation time, item animations and album animations should be taken // care of, but since those would just produce minor glitches it's not that // important. diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h index 2116243b54..65cba8c5d8 100644 --- a/engines/kyra/kyra_v1.h +++ b/engines/kyra/kyra_v1.h @@ -54,13 +54,13 @@ struct GameFlags { Common::Platform platform; - bool isDemo : 1; - bool useAltShapeHeader : 1; // alternative shape header (uses 2 bytes more, those are unused though) - bool isTalkie : 1; - bool useHiResOverlay : 1; - bool use16ColorMode : 1; - bool useDigSound : 1; - bool useInstallerPackage : 1; + bool isDemo : 1; + bool useAltShapeHeader : 1; // alternative shape header (uses 2 bytes more, those are unused though) + bool isTalkie : 1; + bool useHiResOverlay : 1; + bool use16ColorMode : 1; + bool useDigSound : 1; + bool useInstallerPackage : 1; byte gameID; }; @@ -82,21 +82,21 @@ struct AudioDataStruct { // TODO: this is just the start of makeing the debug output of the kyra engine a bit more useable // in the future we maybe merge some flags and/or create new ones -enum kDebugLevels { - kDebugLevelScriptFuncs = 1 << 0, // prints debug output of o#_* functions - kDebugLevelScript = 1 << 1, // prints debug output of "EMCInterpreter" functions - kDebugLevelSprites = 1 << 2, // prints debug output of "Sprites" functions - kDebugLevelScreen = 1 << 3, // prints debug output of "Screen" functions - kDebugLevelSound = 1 << 4, // prints debug output of "Sound" functions - kDebugLevelAnimator = 1 << 5, // prints debug output of "ScreenAnimator" functions - kDebugLevelMain = 1 << 6, // prints debug output of common "KyraEngine(_v#)" functions && "TextDisplayer" functions - kDebugLevelGUI = 1 << 7, // prints debug output of "KyraEngine*" gui functions - kDebugLevelSequence = 1 << 8, // prints debug output of "SeqPlayer" functions - kDebugLevelMovie = 1 << 9, // prints debug output of movie specific funtions - kDebugLevelTimer = 1 << 10 // prints debug output of "TimerManager" functions +enum DebugLevels { + kDebugLevelScriptFuncs = 1 << 0, ///< debug level for o#_* functions + kDebugLevelScript = 1 << 1, ///< debug level for "EMCInterpreter" functions + kDebugLevelSprites = 1 << 2, ///< debug level for "Sprites" functions + kDebugLevelScreen = 1 << 3, ///< debug level for "Screen" functions + kDebugLevelSound = 1 << 4, ///< debug level for "Sound" functions + kDebugLevelAnimator = 1 << 5, ///< debug level for "ScreenAnimator" functions + kDebugLevelMain = 1 << 6, ///< debug level for common "KyraEngine(_v#)" functions && "TextDisplayer" functions + kDebugLevelGUI = 1 << 7, ///< debug level for "KyraEngine*" gui functions + kDebugLevelSequence = 1 << 8, ///< debug level for "SeqPlayer" functions + kDebugLevelMovie = 1 << 9, ///< debug level for movie specific funtions + kDebugLevelTimer = 1 << 10 ///< debug level for "TimerManager" functions }; -enum kMusicDataID { +enum MusicDataID { kMusicIntro = 0, kMusicIngame, kMusicFinale @@ -118,7 +118,7 @@ class KyraEngine_v1 : public Engine { friend class Debugger; friend class ::KyraMetaEngine; friend class GUI; -friend class SoundMidiPC; // For _eventMan +friend class SoundMidiPC; // For _eventMan public: KyraEngine_v1(OSystem *system, const GameFlags &flags); virtual ~KyraEngine_v1(); @@ -282,7 +282,7 @@ protected: virtual void removeHandItem() = 0; // game flags - uint8 _flagsTable[100]; // TODO: check this value + uint8 _flagsTable[100]; // TODO: check this value // sound Audio::SoundHandle _speechHandle; @@ -335,8 +335,8 @@ protected: byte gameID; uint32 flags; - bool originalSave; // savegame from original interpreter - bool oldHeader; // old scummvm save header + bool originalSave; // savegame from original interpreter + bool oldHeader; // old scummvm save header Graphics::Surface *thumbnail; }; diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index 893e7a3fd8..50c24c80b9 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -182,7 +182,7 @@ protected: uint16 _sceneExit1, _sceneExit2, _sceneExit3, _sceneExit4; int _sceneEnterX1, _sceneEnterY1, _sceneEnterX2, _sceneEnterY2, - _sceneEnterX3, _sceneEnterY3, _sceneEnterX4, _sceneEnterY4; + _sceneEnterX3, _sceneEnterY3, _sceneEnterX4, _sceneEnterY4; int _specialExitCount; uint16 _specialExitTable[25]; bool checkSpecialSceneExit(int num, int x, int y); diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index 26eb74bb89..d0c4d4f3c2 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -867,8 +867,8 @@ private: uint8 *_levelLangFile; int _lastUsedStringBuffer; - char _stringBuffer[5][512]; // TODO: The original used a size of 512, it looks a bit large. - // Maybe we can someday reduce the size. + char _stringBuffer[5][512]; // TODO: The original used a size of 512, it looks a bit large. + // Maybe we can someday reduce the size. char *getLangString(uint16 id); uint8 *getTableEntry(uint8 *buffer, uint16 id); void decodeSjis(const char *src, char *dst); diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index 1c46eb22cd..4a9a8a10e9 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -99,7 +99,7 @@ protected: KyraEngine_v1 *_vm; }; -enum kKyraResources { +enum KyraResources { kLoadAll = -1, k1ForestSeq, @@ -402,7 +402,7 @@ private: const char *getFilename(const char *name); Common::SeekableReadStream *getFile(const char *name); - enum kResTypes { + enum ResTypes { kLanguageList, kStringList, kRoomList, diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h index 04049fdd5f..a5acdb6758 100644 --- a/engines/kyra/screen.h +++ b/engines/kyra/screen.h @@ -241,29 +241,29 @@ public: /** * Fill the given indexes with the given component value. * - * @param firstCol the first color, which should be overwritten. - * @param numCols number of colors, which schould be overwritten. - * @param value color component value, which should be stored. + * @param firstCol the first color, which should be overwritten. + * @param numCols number of colors, which schould be overwritten. + * @param value color component value, which should be stored. */ void fill(int firstCol, int numCols, uint8 value); /** * Copy data from another palette. * - * @param source palette to copy data from. - * @param firstCol the first color of the source which should be copied. - * @param numCols number of colors, which should be copied. -1 all remaining colors. - * @param dstStart the first color, which should be ovewritten. If -1 firstCol will be used as start. + * @param source palette to copy data from. + * @param firstCol the first color of the source which should be copied. + * @param numCols number of colors, which should be copied. -1 all remaining colors. + * @param dstStart the first color, which should be ovewritten. If -1 firstCol will be used as start. */ void copy(const Palette &source, int firstCol = 0, int numCols = -1, int dstStart = -1); /** * Copy data from a raw VGA palette. * - * @param source source buffer - * @param firstCol the first color of the source which should be copied. - * @param numCols number of colors, which should be copied. - * @param dstStart the first color, which should be ovewritten. If -1 firstCol will be used as start. + * @param source source buffer + * @param firstCol the first color of the source which should be copied. + * @param numCols number of colors, which should be copied. + * @param dstStart the first color, which should be ovewritten. If -1 firstCol will be used as start. */ void copy(const uint8 *source, int firstCol, int numCols, int dstStart = -1); @@ -351,7 +351,7 @@ public: void clearCurPage(); void copyWsaRect(int x, int y, int w, int h, int dimState, int plotFunc, const uint8 *src, - int unk1, const uint8 *unkPtr1, const uint8 *unkPtr2); + int unk1, const uint8 *unkPtr1, const uint8 *unkPtr2); // page 0 functions void copyToPage0(int y, int h, uint8 page, uint8 *seqBuf); diff --git a/engines/kyra/script.h b/engines/kyra/script.h index 862cfb7d97..bfe188d22a 100644 --- a/engines/kyra/script.h +++ b/engines/kyra/script.h @@ -58,8 +58,8 @@ struct EMCState { int16 retValue; uint16 bp; uint16 sp; - int16 regs[30]; // VM registers - int16 stack[kStackSize]; // VM stack + int16 regs[30]; // VM registers + int16 stack[kStackSize]; // VM stack }; #define stackPos(x) (script->stack[script->sp+x]) diff --git a/engines/kyra/sound_intern.h b/engines/kyra/sound_intern.h index b84b1c4bf5..70c6b66dd4 100644 --- a/engines/kyra/sound_intern.h +++ b/engines/kyra/sound_intern.h @@ -132,11 +132,11 @@ public: uint32 getBaseTempo(void); //Channel allocation functions - MidiChannel *allocateChannel() { return 0; } - MidiChannel *getPercussionChannel() { return 0; } + MidiChannel *allocateChannel() { return 0; } + MidiChannel *getPercussionChannel() { return 0; } static float calculatePhaseStep(int8 semiTone, int8 semiToneRootkey, - uint32 sampleRate, uint32 outputRate, int32 pitchWheel); + uint32 sampleRate, uint32 outputRate, int32 pitchWheel); private: bool loadInstruments(); diff --git a/engines/kyra/wsamovie.h b/engines/kyra/wsamovie.h index 957ee386ef..ac104de443 100644 --- a/engines/kyra/wsamovie.h +++ b/engines/kyra/wsamovie.h @@ -26,7 +26,6 @@ #ifndef KYRA_WSAMOVIE_H #define KYRA_WSAMOVIE_H - namespace Audio { class AppendableAudioStream; class SoundHandle; -- cgit v1.2.3