[Scummvm-cvs-logs] SF.net SVN: scummvm: [28629] scummvm/trunk/engines/agi
buddha_ at users.sourceforge.net
buddha_ at users.sourceforge.net
Wed Aug 15 20:37:52 CEST 2007
Revision: 28629
http://scummvm.svn.sourceforge.net/scummvm/?rev=28629&view=rev
Author: buddha_
Date: 2007-08-15 11:37:52 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
Moved AgiSound definition around and also changed it from a struct to a class.
Modified Paths:
--------------
scummvm/trunk/engines/agi/agi.cpp
scummvm/trunk/engines/agi/sound.h
Modified: scummvm/trunk/engines/agi/agi.cpp
===================================================================
--- scummvm/trunk/engines/agi/agi.cpp 2007-08-15 16:46:37 UTC (rev 28628)
+++ scummvm/trunk/engines/agi/agi.cpp 2007-08-15 18:37:52 UTC (rev 28629)
@@ -370,7 +370,7 @@
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));
Modified: scummvm/trunk/engines/agi/sound.h
===================================================================
--- scummvm/trunk/engines/agi/sound.h 2007-08-15 16:46:37 UTC (rev 28628)
+++ scummvm/trunk/engines/agi/sound.h 2007-08-15 18:37:52 UTC (rev 28629)
@@ -47,30 +47,6 @@
#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 @@
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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list