From eb5d3cc749d096d77cbe52dbf768a3358d490916 Mon Sep 17 00:00:00 2001 From: Marc Chapman Date: Thu, 27 Jul 2017 00:03:53 +0100 Subject: [PATCH] sfx-legacy --- Engine/source/sfx/sfxDescription.cpp | 21 +++++++++++++++++++++ Engine/source/sfx/sfxPlayList.h | 2 +- Engine/source/sfx/sfxProfile.cpp | 21 +++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/Engine/source/sfx/sfxDescription.cpp b/Engine/source/sfx/sfxDescription.cpp index c3d9f54cf..1c82ba6a5 100644 --- a/Engine/source/sfx/sfxDescription.cpp +++ b/Engine/source/sfx/sfxDescription.cpp @@ -687,3 +687,24 @@ void SFXDescription::inspectPostApply() if( SFX ) SFX->notifyDescriptionChanged( this ); } +// This allows legacy AudioDescription datablocks to be recognized as an alias +// for SFXDescription. It is intended to ease the transition from older scripts +// especially those that still need to support pre-1.7 applications. +// (This maybe removed in future releases so treat as deprecated.) +class AudioDescription : public SFXDescription +{ + typedef SFXDescription Parent; +public: + DECLARE_CONOBJECT(AudioDescription); +}; + +IMPLEMENT_CO_DATABLOCK_V1(AudioDescription); + +ConsoleDocClass( AudioDescription, + "@brief Allows legacy AudioDescription datablocks to be treated as SFXDescription datablocks.\n\n" + + "@ingroup afxMisc\n" + "@ingroup AFX\n" + "@ingroup Datablocks\n" +); + diff --git a/Engine/source/sfx/sfxPlayList.h b/Engine/source/sfx/sfxPlayList.h index 0d9acf5c3..6bde33734 100644 --- a/Engine/source/sfx/sfxPlayList.h +++ b/Engine/source/sfx/sfxPlayList.h @@ -81,7 +81,7 @@ class SFXPlayList : public SFXTrack /// /// @note To have longer playlists, simply cascade playlists and use /// wait behaviors. - NUM_SLOTS = 16, + NUM_SLOTS = 12, // AFX (was 16) NUM_TRANSITION_MODE_BITS = 3, NUM_LOOP_MODE_BITS = 1, diff --git a/Engine/source/sfx/sfxProfile.cpp b/Engine/source/sfx/sfxProfile.cpp index ef5b9dd42..d9cc3d56f 100644 --- a/Engine/source/sfx/sfxProfile.cpp +++ b/Engine/source/sfx/sfxProfile.cpp @@ -470,3 +470,24 @@ void SFXProfile::onPerformSubstitutions() SFX->getEventSignal().notify( this, &SFXProfile::_onDeviceEvent ); } } +// This allows legacy AudioProfile datablocks to be recognized as an alias +// for SFXProfile. It is intended to ease the transition from older scripts +// especially those that still need to support pre-1.7 applications. +// (This maybe removed in future releases so treat as deprecated.) +class AudioProfile : public SFXProfile +{ + typedef SFXProfile Parent; +public: + DECLARE_CONOBJECT(AudioProfile); +}; + +IMPLEMENT_CO_DATABLOCK_V1(AudioProfile); + +ConsoleDocClass( AudioProfile, + "@brief Allows legacy AudioProfile datablocks to be treated as SFXProfile datablocks.\n\n" + + "@ingroup afxMisc\n" + "@ingroup AFX\n" + "@ingroup Datablocks\n" +); +