diff options
author | Filippos Karapetis | 2009-12-19 16:19:53 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-12-19 16:19:53 +0000 |
commit | 0c1b646c7feb649ad8c0f77a5129d5ad1b3d84b1 (patch) | |
tree | cd6259241b5be6ee9e3bcc785a673e8a5c2a35bb /engines/sci/resource.h | |
parent | b32748d81050f66b343b4e028207c2472de49d01 (diff) | |
download | scummvm-rg350-0c1b646c7feb649ad8c0f77a5129d5ad1b3d84b1.tar.gz scummvm-rg350-0c1b646c7feb649ad8c0f77a5129d5ad1b3d84b1.tar.bz2 scummvm-rg350-0c1b646c7feb649ad8c0f77a5129d5ad1b3d84b1.zip |
- Started wrapping the current sound code around appropriate defines
- Introduced a new resource type, SoundResource, used in the new music code
svn-id: r46421
Diffstat (limited to 'engines/sci/resource.h')
-rw-r--r-- | engines/sci/resource.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/engines/sci/resource.h b/engines/sci/resource.h index 4478bebf31..f25f187c74 100644 --- a/engines/sci/resource.h +++ b/engines/sci/resource.h @@ -427,6 +427,49 @@ protected: void detectSciVersion(); }; +#ifndef USE_OLD_MUSIC_FUNCTIONS + +class SoundResource { +public: + enum kTrackType { + kTrackAdlib = 0, + kTrackGameBlaster = 9, + kTrackMT32 = 12, + kTrackSpeaker = 18, + kTrackTandy = 19 + }; + + struct tagChannel { + byte number; + byte poly; + uint16 unk; + uint16 size; + byte *ptr; + long time; + byte prev; + }; + + struct tagTrack { + kTrackType type; + byte nDigital; + byte nChannels; + tagChannel *aChannels; + uint sz; + }; +public: + SoundResource(uint32 resNumber, ResourceManager *resMan); + ~SoundResource(); + tagTrack *getTrackByNumber(uint16 number); + tagTrack *getTrackByType(kTrackType type); + +private: + byte nTracks; + tagTrack *aTracks; + Resource *_innerResource; + ResourceManager *_resMan; +}; +#endif + } // End of namespace Sci #endif // SCI_SCICORE_RESOURCE_H |