home *** CD-ROM | disk | FTP | other *** search
/ Game Audio Programming / GameAudioProgramming.iso / Game_Audio / audio_sdk / src / AudioScript / Theme.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-06-21  |  1.4 KB  |  56 lines

  1. /***********************************************************\
  2. Copyright (C) James Boer, 2002. 
  3. All rights reserved worldwide.
  4.  
  5. This software is provided "as is" without express or implied
  6. warranties. You may freely copy and compile this source into
  7. applications you distribute provided that the copyright text
  8. below is included in the resulting source code, for example:
  9. "Portions Copyright (C) James Boer, 2002"
  10. \***********************************************************/
  11. #ifndef __THEME_H
  12. #define __THEME_H
  13.  
  14. #include "Audio.h"
  15.  
  16. namespace Audio
  17. {
  18. class Theme;
  19.  
  20. typedef std::vector<ISegment*> ISegmentVector;
  21. typedef std::map<ISegment*, ISegmentVector*> SegmentTransitionMap;
  22. typedef std::map<Theme*, ISegmentVector*> ThemeTransitionMap;
  23.  
  24.  
  25. class Theme
  26. {
  27. public:
  28.     Theme();
  29.     ~Theme();
  30.  
  31.     bool IsInterlude()                {  return m_bInterlude;  }
  32.     void SetInterlude(bool bVal)    {  m_bInterlude = bVal;  }
  33.  
  34.     bool CreateNode(ISegment* pSegment);
  35.     bool CreateNode(Theme* pTheme);
  36.     bool CreateTransition(ISegment* pFrom, ISegment* pTo);
  37.     bool CreateTransition(Theme* pFrom, ISegment* pTo);
  38.  
  39.     void StartTheme()                {  m_bFirstTransition = true;  }
  40.     bool GetTransition(Theme* pTheme, ISegment* pFrom, ISegment*& pTo);
  41.  
  42. private:
  43.     void Clear();
  44.  
  45.     ISegment*                m_pDefaultSegment;
  46.     SegmentTransitionMap    m_SegmentMap;
  47.     ThemeTransitionMap        m_ThemeMap;
  48.  
  49.     bool                    m_bInterlude;
  50.  
  51.     bool                    m_bFirstTransition;
  52. };
  53.  
  54. }; // namespace Audio
  55.  
  56. #endif // __THEME_H