diff options
| author | Kari Salminen | 2007-08-15 18:37:52 +0000 | 
|---|---|---|
| committer | Kari Salminen | 2007-08-15 18:37:52 +0000 | 
| commit | b99153050a8bb909c6d20b01cb6b5e8ba3224483 (patch) | |
| tree | 80db0f300ffd3c843f92b4f5ba574e318143ded6 | |
| parent | ec3f37956dd19325875c18abddd4f55f7fc5d3a1 (diff) | |
| download | scummvm-rg350-b99153050a8bb909c6d20b01cb6b5e8ba3224483.tar.gz scummvm-rg350-b99153050a8bb909c6d20b01cb6b5e8ba3224483.tar.bz2 scummvm-rg350-b99153050a8bb909c6d20b01cb6b5e8ba3224483.zip  | |
Moved AgiSound definition around and also changed it from a struct to a class.
svn-id: r28629
| -rw-r--r-- | engines/agi/agi.cpp | 2 | ||||
| -rw-r--r-- | engines/agi/sound.h | 40 | 
2 files changed, 17 insertions, 25 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index 1c1c53dee7..ee3e2f36e0 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -370,7 +370,7 @@ int AgiEngine::agiInit() {  		memset(&_game.views[i], 0, sizeof(struct AgiView));  		memset(&_game.pictures[i], 0, sizeof(struct AgiPicture));  		memset(&_game.logics[i], 0, sizeof(struct AgiLogic)); -		memset(&_game.sounds[i], 0, sizeof(struct AgiSound)); +		memset(&_game.sounds[i], 0, sizeof(class AgiSound));  		memset(&_game.dirView[i], 0, sizeof(struct AgiDir));  		memset(&_game.dirPic[i], 0, sizeof(struct AgiDir));  		memset(&_game.dirLogic[i], 0, sizeof(struct AgiDir)); diff --git a/engines/agi/sound.h b/engines/agi/sound.h index 2b5c045969..ccc63d2fdc 100644 --- a/engines/agi/sound.h +++ b/engines/agi/sound.h @@ -47,30 +47,6 @@ namespace Agi {  #define ENV_RELEASE	7500		/**< envelope release rate */  #define NUM_CHANNELS    7		/**< number of sound channels */ -/** - * AGI sound resource structure. - */ -struct AgiSound { -	uint32 flen;		/**< size of raw data */ -	uint8 *rdata;		/**< raw sound data */ -	uint16 type;		/**< sound resource type */ - -	void play() { -		_isPlaying = true; -	} -	 -	void stop() { -		_isPlaying = false; -	} -	 -	bool isPlaying() { -		return _isPlaying; -	} - -private: -	bool _isPlaying; ///< Is the sound playing? -}; -  struct IIgsEnvelopeSegment {  	uint8 bp;  	uint16 inc; ///< 8b.8b fixed point, big endian? @@ -223,6 +199,22 @@ struct ChannelInfo {  	uint32 env;  }; +/** + * AGI sound resource structure. + */ +class AgiSound { +public: +	uint32 flen;		/**< size of raw data */ +	uint8 *rdata;		/**< raw sound data */ +	uint16 type;		/**< sound resource type */ + +	virtual void play()      { _isPlaying = true; } +	virtual void stop()      { _isPlaying = false; } +	virtual bool isPlaying() { return _isPlaying; } +protected: +	bool _isPlaying; ///< Is the sound playing? +}; +  /** Apple IIGS AGI instrument set information. */  struct instrumentSetInfo {  	uint byteCount;          ///< Length of the whole instrument set in bytes  | 
