mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-19 16:18:45 +00:00
Moved AgiSound definition around and also changed it from a struct to a class.
svn-id: r28629
This commit is contained in:
parent
ec3f37956d
commit
b99153050a
@ -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));
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user