From: <sag...@us...> - 2013-04-08 23:39:23
|
Revision: 1783 http://sourceforge.net/p/modplug/code/1783 Author: saga-games Date: 2013-04-08 23:39:14 +0000 (Mon, 08 Apr 2013) Log Message: ----------- [Ref] Lots of small changes to remove some useless #includes Modified Paths: -------------- trunk/OpenMPT/common/AudioCriticalSection.h trunk/OpenMPT/common/FlagSet.h trunk/OpenMPT/mptrack/AbstractVstEditor.cpp trunk/OpenMPT/mptrack/AbstractVstEditor.h trunk/OpenMPT/mptrack/CleanupSong.cpp trunk/OpenMPT/mptrack/CleanupSong.h trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/CommandSet.h trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/mptrack/Ctrl_smp.h trunk/OpenMPT/mptrack/DefaultVstEditor.cpp trunk/OpenMPT/mptrack/DefaultVstEditor.h trunk/OpenMPT/mptrack/EffectInfo.cpp trunk/OpenMPT/mptrack/InputHandler.h trunk/OpenMPT/mptrack/MIDIMacroDialog.cpp trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mainbar.h trunk/OpenMPT/mptrack/Mainfrm.h trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/MoveFXSlotDialog.cpp trunk/OpenMPT/mptrack/MoveFXSlotDialog.h trunk/OpenMPT/mptrack/Mptrack.h trunk/OpenMPT/mptrack/SampleEditorDialogs.h trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.cpp trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.h trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/mptrack/UpdateCheck.cpp trunk/OpenMPT/mptrack/UpdateCheck.h trunk/OpenMPT/mptrack/VSTEditor.cpp trunk/OpenMPT/mptrack/VSTEditor.h trunk/OpenMPT/mptrack/View_ins.cpp trunk/OpenMPT/mptrack/mod2midi.cpp trunk/OpenMPT/soundlib/Dlsbank.cpp trunk/OpenMPT/soundlib/Fastmix.cpp trunk/OpenMPT/soundlib/ModChannel.h trunk/OpenMPT/soundlib/ModInstrument.h trunk/OpenMPT/soundlib/ModSequence.h trunk/OpenMPT/soundlib/PlaybackEventer.h trunk/OpenMPT/soundlib/SampleFormats.cpp trunk/OpenMPT/soundlib/SampleIO.h trunk/OpenMPT/soundlib/Snd_defs.h trunk/OpenMPT/soundlib/Sndfile.h trunk/OpenMPT/soundlib/modsmp_ctrl.cpp trunk/OpenMPT/soundlib/modsmp_ctrl.h trunk/OpenMPT/soundlib/pattern.h trunk/OpenMPT/soundlib/patternContainer.h Modified: trunk/OpenMPT/common/AudioCriticalSection.h =================================================================== --- trunk/OpenMPT/common/AudioCriticalSection.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/common/AudioCriticalSection.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -9,6 +9,9 @@ #pragma once +#define WIN32_LEAN_AND_MEAN +#define VC_EXTRALEAN +#define NOMINMAX #include <windows.h> extern CRITICAL_SECTION g_csAudio; Modified: trunk/OpenMPT/common/FlagSet.h =================================================================== --- trunk/OpenMPT/common/FlagSet.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/common/FlagSet.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -8,6 +8,8 @@ */ +#pragma once + #include <string> template <typename enum_t, typename store_t = enum_t> Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -9,11 +9,11 @@ #include "stdafx.h" -#include "mptrack.h" -#include "moddoc.h" -#include "mainfrm.h" -#include "sndfile.h" -#include "vstplug.h" +#include "Mptrack.h" +#include "Moddoc.h" +#include "Mainfrm.h" +#include "../soundlib/Sndfile.h" +#include "Vstplug.h" #include "dlg_misc.h" #include "AbstractVstEditor.h" #include "../common/StringFixer.h" Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.h =================================================================== --- trunk/OpenMPT/mptrack/AbstractVstEditor.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/AbstractVstEditor.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -12,6 +12,11 @@ #ifndef NO_VST +#include <vector> +#include "../soundlib/Snd_defs.h" + +class CVstPlugin; + class CAbstractVstEditor: public CDialog { Modified: trunk/OpenMPT/mptrack/CleanupSong.cpp =================================================================== --- trunk/OpenMPT/mptrack/CleanupSong.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/CleanupSong.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -18,7 +18,7 @@ // Default checkbox state bool CModCleanupDlg::m_bCheckBoxes[CU_MAX_CLEANUP_OPTIONS] = { - true, false, true, // patterns + true, false, true, // patterns false, false, // orders true, false, false, true, // samples true, false, // instruments @@ -45,7 +45,7 @@ }; // Options that are mutually exclusive to each other -ENUM_CLEANUP_OPTIONS const CModCleanupDlg::m_nMutuallyExclusive[CU_MAX_CLEANUP_OPTIONS] = +CModCleanupDlg::ENUM_CLEANUP_OPTIONS const CModCleanupDlg::m_nMutuallyExclusive[CModCleanupDlg::CU_MAX_CLEANUP_OPTIONS] = { // patterns CU_REMOVE_PATTERNS, CU_CLEANUP_PATTERNS, CU_REMOVE_PATTERNS, Modified: trunk/OpenMPT/mptrack/CleanupSong.h =================================================================== --- trunk/OpenMPT/mptrack/CleanupSong.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/CleanupSong.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -10,38 +10,38 @@ #pragma once -enum ENUM_CLEANUP_OPTIONS -{ - // patterns - CU_CLEANUP_PATTERNS = 0, - CU_REMOVE_PATTERNS, - CU_REARRANGE_PATTERNS, - // orders - CU_MERGE_SEQUENCES, - CU_REMOVE_ORDERS, - // samples - CU_CLEANUP_SAMPLES, - CU_REMOVE_SAMPLES, - CU_REARRANGE_SAMPLES, - CU_OPTIMIZE_SAMPLES, - // instruments - CU_CLEANUP_INSTRUMENTS, - CU_REMOVE_INSTRUMENTS, - // plugins - CU_CLEANUP_PLUGINS, - CU_REMOVE_PLUGINS, - // misc - CU_RESET_VARIABLES, - - CU_NONE, - CU_MAX_CLEANUP_OPTIONS = CU_NONE -}; - //================================== class CModCleanupDlg: public CDialog //================================== { private: + enum ENUM_CLEANUP_OPTIONS + { + // patterns + CU_CLEANUP_PATTERNS = 0, + CU_REMOVE_PATTERNS, + CU_REARRANGE_PATTERNS, + // orders + CU_MERGE_SEQUENCES, + CU_REMOVE_ORDERS, + // samples + CU_CLEANUP_SAMPLES, + CU_REMOVE_SAMPLES, + CU_REARRANGE_SAMPLES, + CU_OPTIMIZE_SAMPLES, + // instruments + CU_CLEANUP_INSTRUMENTS, + CU_REMOVE_INSTRUMENTS, + // plugins + CU_CLEANUP_PLUGINS, + CU_REMOVE_PLUGINS, + // misc + CU_RESET_VARIABLES, + + CU_NONE, + CU_MAX_CLEANUP_OPTIONS = CU_NONE + }; + CModDoc &modDoc; static bool m_bCheckBoxes[CU_MAX_CLEANUP_OPTIONS]; // Checkbox state static const WORD m_nCleanupIDtoDlgID[CU_MAX_CLEANUP_OPTIONS]; // Checkbox -> Control ID LUT Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -9,9 +9,10 @@ #include "stdafx.h" -#include "commandset.h" +#include "CommandSet.h" #include "resource.h" #include "Mptrack.h" // For MsgBox +#include "../soundlib/mod_specifications.h" #include "../common/Reporting.h" #include <stdio.h> #include <stdlib.h> Modified: trunk/OpenMPT/mptrack/CommandSet.h =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/CommandSet.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -10,8 +10,8 @@ #pragma once #include "afxtempl.h" -#include "../soundlib/mod_specifications.h" #include <string> +struct CModSpecifications; //#define VK_ALT 0x12 Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -3077,8 +3077,8 @@ // Return currently selected part of the sample. // The whole sample size will be returned if no part of the sample is selected. // However, point.bSelected indicates whether a sample selection exists or not. -SampleSelectionPoints CCtrlSamples::GetSelectionPoints() -//------------------------------------------------------ +CCtrlSamples::SampleSelectionPoints CCtrlSamples::GetSelectionPoints() +//-------------------------------------------------------------------- { SampleSelectionPoints points; SAMPLEVIEWSTATE viewstate; Modified: trunk/OpenMPT/mptrack/Ctrl_smp.h =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/Ctrl_smp.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -11,18 +11,20 @@ #pragma once -struct SampleSelectionPoints -{ - UINT nStart; - UINT nEnd; - bool selectionActive; // does sample selection exist or not? -}; +#include "../soundlib/SampleIO.h" //======================================= class CCtrlSamples: public CModControlDlg //======================================= { protected: + struct SampleSelectionPoints + { + SmpLength nStart; + SmpLength nEnd; + bool selectionActive; // does sample selection exist or not? + }; + CModControlBar m_ToolBar1, m_ToolBar2; CEdit m_EditSample, m_EditName, m_EditFileName, m_EditFineTune; CEdit m_EditLoopStart, m_EditLoopEnd, m_EditSustainStart, m_EditSustainEnd; Modified: trunk/OpenMPT/mptrack/DefaultVstEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/DefaultVstEditor.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/DefaultVstEditor.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -9,9 +9,9 @@ #include "stdafx.h" -//#include "vstplug.h" -#include "moddoc.h" #include "DefaultVstEditor.h" +#include "../soundlib/Sndfile.h" +#include "Vstplug.h" #ifndef NO_VST Modified: trunk/OpenMPT/mptrack/DefaultVstEditor.h =================================================================== --- trunk/OpenMPT/mptrack/DefaultVstEditor.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/DefaultVstEditor.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -10,11 +10,6 @@ #pragma once -#include "mptrack.h" -#include "MainFrm.h" -#include "VstPlug.h" -#include "abstractvsteditor.h" - enum { PARAM_RESOLUTION = 1000, @@ -23,6 +18,9 @@ #ifndef NO_VST +#include "mptrack.h" +#include "AbstractVstEditor.h" + //=================== class ParamControlSet //=================== @@ -57,7 +55,7 @@ { protected: - vector<ParamControlSet *> controls; + std::vector<ParamControlSet *> controls; CScrollBar paramScroller; PlugParamIndex paramOffset; Modified: trunk/OpenMPT/mptrack/EffectInfo.cpp =================================================================== --- trunk/OpenMPT/mptrack/EffectInfo.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/EffectInfo.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -10,8 +10,8 @@ #include "stdafx.h" #include "EffectInfo.h" -#include "mptrack.h" -#include "..\soundlib\modcommand.h" +#include "Mptrack.h" // for szHexChar +#include "../soundlib/Sndfile.h" #include "../soundlib/Tables.h" /////////////////////////////////////////////////////////////////////////// Modified: trunk/OpenMPT/mptrack/InputHandler.h =================================================================== --- trunk/OpenMPT/mptrack/InputHandler.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/InputHandler.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -10,6 +10,8 @@ #pragma once +#include "CommandSet.h" + //not sure why I shoved message IDs here anymore. Might want to move em. -rewbs enum { @@ -38,7 +40,6 @@ HC_MIDI = 0x8000, }; - class CInputHandler { Modified: trunk/OpenMPT/mptrack/MIDIMacroDialog.cpp =================================================================== --- trunk/OpenMPT/mptrack/MIDIMacroDialog.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/MIDIMacroDialog.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -228,14 +228,14 @@ void CMidiMacroSetup::OnSetAsDefault() //------------------------------------ { - theApp.SetDefaultMidiMacro(&m_MidiCfg); + theApp.SetDefaultMidiMacro(m_MidiCfg); } void CMidiMacroSetup::OnResetCfg() //-------------------------------- { - theApp.GetDefaultMidiMacro(&m_MidiCfg); + theApp.GetDefaultMidiMacro(m_MidiCfg); m_CbnZxxPreset.SetCurSel(0); OnSFxChanged(); } Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -574,8 +574,8 @@ HWND hWnd = ::GetFocus(); if(hWnd != NULL) { - TCHAR activeWindowClassName[512]; - GetClassName(hWnd, activeWindowClassName, 6); + TCHAR activeWindowClassName[6]; + GetClassName(hWnd, activeWindowClassName, CountOf(activeWindowClassName)); textboxHasFocus = _tcsicmp(activeWindowClassName, _T("Edit")) == 0; if(textboxHasFocus) { Modified: trunk/OpenMPT/mptrack/Mainbar.h =================================================================== --- trunk/OpenMPT/mptrack/Mainbar.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/Mainbar.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -39,6 +39,7 @@ class CSoundFile; class CModDoc; class CModTree; +class CMainFrame; //=============================== class CToolBarEx: public CToolBar Modified: trunk/OpenMPT/mptrack/Mainfrm.h =================================================================== --- trunk/OpenMPT/mptrack/Mainfrm.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/Mainfrm.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -10,13 +10,12 @@ #pragma once -#include "sndfile.h" -#include "CommandSet.h" -#include "inputhandler.h" -#include "mptrack.h" +#include "Mptrack.h" +#include "InputHandler.h" #include "../common/AudioCriticalSection.h" #include "../common/mutex.h" -#include "soundlib/snddev.h" +#include "../soundlib/snddev.h" +#include "../soundlib/Sndfile.h" class CInputHandler; class CModDoc; @@ -263,8 +262,8 @@ #include "mainbar.h" #include "TrackerSettings.h" +struct MODPLUGDIB; - //======================================================== class CMainFrame: public CMDIFrameWnd, public ISoundSource //======================================================== @@ -284,7 +283,7 @@ // static CBrush *pbrushBlack, *pbrushWhite; static HPEN penBlack, penDarkGray, penLightGray, penWhite, penHalfDarkGray, penSample, penEnvelope, penEnvelopeHighlight, penSeparator, penScratch, penGray00, penGray33, penGray40, penGray55, penGray80, penGray99, penGraycc, penGrayff; static HCURSOR curDragging, curNoDrop, curArrow, curNoDrop2, curVSplit; - static LPMODPLUGDIB bmpPatterns, bmpNotes, bmpVUMeters, bmpVisNode, bmpVisPcNode; + static MODPLUGDIB *bmpPatterns, *bmpNotes, *bmpVUMeters, *bmpVisNode, *bmpVisPcNode; static HPEN gpenVuMeter[NUM_VUMETER_PENS * 2]; // General tab VU meters public: Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -177,7 +177,7 @@ m_SndFile.m_SongFlags.set(SONG_ITPROJECT); } - theApp.GetDefaultMidiMacro(&m_SndFile.m_MidiCfg); + theApp.GetDefaultMidiMacro(m_SndFile.m_MidiCfg); if (m_SndFile.m_nType & (MOD_TYPE_XM | MOD_TYPE_IT | MOD_TYPE_MPT)) { m_SndFile.m_SongFlags.set(SONG_LINEARSLIDES); Modified: trunk/OpenMPT/mptrack/MoveFXSlotDialog.cpp =================================================================== --- trunk/OpenMPT/mptrack/MoveFXSlotDialog.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/MoveFXSlotDialog.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -48,8 +48,9 @@ CDialog::OnOK(); } -void CMoveFXSlotDialog::SetupMove(PLUGINDEX currentSlot, vector<PLUGINDEX> &emptySlots, PLUGINDEX defaultIndex) -//------------------------------------------------------------------------------------------------------------- + +void CMoveFXSlotDialog::SetupMove(PLUGINDEX currentSlot, std::vector<PLUGINDEX> &emptySlots, PLUGINDEX defaultIndex) +//------------------------------------------------------------------------------------------------------------------ { m_nDefaultSlot = defaultIndex; m_csPrompt.Format("Move plugin in slot %d to the following empty slot:", currentSlot + 1); @@ -57,6 +58,7 @@ m_EmptySlots = emptySlots; } + BOOL CMoveFXSlotDialog::OnInitDialog() //------------------------------------ { Modified: trunk/OpenMPT/mptrack/MoveFXSlotDialog.h =================================================================== --- trunk/OpenMPT/mptrack/MoveFXSlotDialog.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/MoveFXSlotDialog.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -20,7 +20,7 @@ public: CMoveFXSlotDialog(CWnd* pParent = NULL); // standard constructor virtual ~CMoveFXSlotDialog(); - void SetupMove(PLUGINDEX currentSlot, vector<PLUGINDEX> &emptySlots, PLUGINDEX defaultIndex); + void SetupMove(PLUGINDEX currentSlot, std::vector<PLUGINDEX> &emptySlots, PLUGINDEX defaultIndex); PLUGINDEX m_nToSlot; @@ -31,7 +31,7 @@ protected: CString m_csPrompt, m_csTitle; CEdit m_EditPrompt; - vector<PLUGINDEX> m_EmptySlots; + std::vector<PLUGINDEX> m_EmptySlots; virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support CComboBox m_CbnEmptySlots; PLUGINDEX m_nDefaultSlot; Modified: trunk/OpenMPT/mptrack/Mptrack.h =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/Mptrack.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -11,10 +11,12 @@ #pragma once #include "resource.h" // main symbols -#include "../soundlib/Sndfile.h" #include "ACMConvert.h" #include <windows.h> #include "../common/Reporting.h" +#include "../soundlib/MIDIMacros.h" +#include "../soundlib/modcommand.h" +#include <vector> class CModDoc; class CVstPluginManager; @@ -94,7 +96,7 @@ public: static MEMORYSTATUS gMemStatus; - static vector<CDLSBank *> gpDLSBanks; + static std::vector<CDLSBank *> gpDLSBanks; #if (_MSC_VER < MSVC_VER_2010) virtual CDocument* OpenDocumentFile(LPCTSTR lpszFileName, BOOL bAddToMRU = TRUE) @@ -152,13 +154,13 @@ static FileDlgResult ShowOpenSaveFileDialog(const bool load, const std::string defaultExtension, const std::string defaultFilename, const std::string extFilter, const std::string workingDirectory = "", const bool allowMultiSelect = false, int *filterIndex = nullptr); int GetOpenDocumentCount() const; - vector<CModDoc *>GetOpenDocuments() const; + std::vector<CModDoc *>GetOpenDocuments() const; public: CDocTemplate *GetModDocTemplate() const { return m_pModTemplate; } CVstPluginManager *GetPluginManager() const { return m_pPluginManager; } - void GetDefaultMidiMacro(MIDIMacroConfig *pcfg) const { *pcfg = m_MidiCfg; } - void SetDefaultMidiMacro(const MIDIMacroConfig *pcfg) { m_MidiCfg = *pcfg; } + void GetDefaultMidiMacro(MIDIMacroConfig &cfg) const { cfg = m_MidiCfg; } + void SetDefaultMidiMacro(const MIDIMacroConfig &cfg) { m_MidiCfg = cfg; } BOOL CanEncodeLayer3() const { return acmConvert.IsLayer3Present(); } BOOL IsWaveExEnabled() const { return m_bExWaveSupport; } BOOL IsDebug() const { return m_bDebugMode; } @@ -182,12 +184,12 @@ // Splash Screen protected: - VOID StartSplashScreen(); - VOID StopSplashScreen(); + void StartSplashScreen(); + void StopSplashScreen(); // Localized strings public: - VOID ImportLocalizedStrings(); + void ImportLocalizedStrings(); BOOL GetLocalizedString(LPCSTR pszName, LPSTR pszStr, UINT cbSize); // Overrides @@ -324,6 +326,8 @@ void ErrorBox(UINT nStringID, CWnd*p=NULL); // Helper function declarations. +struct SNDMIXPLUGIN; +class CVstPlugin; void AddPluginNamesToCombobox(CComboBox& CBox, SNDMIXPLUGIN* plugarray, const bool librarynames = false); void AddPluginParameternamesToCombobox(CComboBox& CBox, SNDMIXPLUGIN& plugarray); void AddPluginParameternamesToCombobox(CComboBox& CBox, CVstPlugin& plug); Modified: trunk/OpenMPT/mptrack/SampleEditorDialogs.h =================================================================== --- trunk/OpenMPT/mptrack/SampleEditorDialogs.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/SampleEditorDialogs.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -11,6 +11,8 @@ #pragma once +#include "../soundlib/SampleIO.h" + ////////////////////////////////////////////////////////////////////////// // Sample amplification dialog Modified: trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.cpp =================================================================== --- trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -9,8 +9,9 @@ #include "stdafx.h" -#include "mptrack.h" +#include "resource.h" #include "ScaleEnvPointsDlg.h" +#include "ModInstrument.h" float CScaleEnvPointsDlg::m_fFactorX = 1.0f; float CScaleEnvPointsDlg::m_fFactorY = 1.0f; @@ -44,21 +45,21 @@ if(m_fFactorX > 0 && m_fFactorX != 1) { - for(UINT i = 0; i < m_pEnv->nNodes; i++) + for(uint32 i = 0; i < m_Env.nNodes; i++) { - m_pEnv->Ticks[i] = static_cast<WORD>(m_fFactorX * m_pEnv->Ticks[i]); + m_Env.Ticks[i] = static_cast<WORD>(m_fFactorX * m_Env.Ticks[i]); // Checking that the order of points is preserved. - if(i > 0 && m_pEnv->Ticks[i] <= m_pEnv->Ticks[i - 1]) - m_pEnv->Ticks[i] = m_pEnv->Ticks[i - 1] + 1; + if(i > 0 && m_Env.Ticks[i] <= m_Env.Ticks[i - 1]) + m_Env.Ticks[i] = m_Env.Ticks[i - 1] + 1; } } if(m_fFactorY != 1) { - for(UINT i = 0; i < m_pEnv->nNodes; i++) + for(uint32 i = 0; i < m_Env.nNodes; i++) { - m_pEnv->Values[i] = CLAMP(static_cast<BYTE>((m_fFactorY * ((int)m_pEnv->Values[i] - m_nCenter)) + m_nCenter), ENVELOPE_MIN, ENVELOPE_MAX); + m_Env.Values[i] = CLAMP(static_cast<BYTE>((m_fFactorY * ((int)m_Env.Values[i] - m_nCenter)) + m_nCenter), ENVELOPE_MIN, ENVELOPE_MAX); } } Modified: trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.h =================================================================== --- trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -10,20 +10,21 @@ #pragma once +struct InstrumentEnvelope; + //======================================= class CScaleEnvPointsDlg : public CDialog //======================================= { public: - CScaleEnvPointsDlg(CWnd* pParent, InstrumentEnvelope *pEnv, int nCenter) : CDialog(IDD_SCALE_ENV_POINTS, pParent) + CScaleEnvPointsDlg(CWnd* pParent, InstrumentEnvelope &env, int nCenter) : CDialog(IDD_SCALE_ENV_POINTS, pParent), m_Env(env) { - m_pEnv = pEnv; m_nCenter = nCenter; } private: - InstrumentEnvelope *m_pEnv; //To tell which envelope to process. + InstrumentEnvelope &m_Env; //To tell which envelope to process. static float m_fFactorX, m_fFactorY; int m_nCenter; Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -206,7 +206,7 @@ // Load default macro configuration MIDIMacroConfig macros; - theApp.GetDefaultMidiMacro(¯os); + theApp.GetDefaultMidiMacro(macros); for(int isfx = 0; isfx < 16; isfx++) { CHAR snam[8]; @@ -226,7 +226,7 @@ { macros.UpgradeMacros(); } - theApp.SetDefaultMidiMacro(¯os); + theApp.SetDefaultMidiMacro(macros); // Default directory location for(UINT i = 0; i < NUM_DIRS; i++) @@ -885,7 +885,7 @@ // Save default macro configuration MIDIMacroConfig macros; - theApp.GetDefaultMidiMacro(¯os); + theApp.GetDefaultMidiMacro(macros); for(int isfx = 0; isfx < 16; isfx++) { CHAR snam[8]; Modified: trunk/OpenMPT/mptrack/UpdateCheck.cpp =================================================================== --- trunk/OpenMPT/mptrack/UpdateCheck.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/UpdateCheck.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -13,6 +13,10 @@ #include "../common/version.h" #include "../common/misc_util.h" #include "Mptrack.h" +#include "TrackerSettings.h" +// Setup dialog stuff +#include "Mainfrm.h" +#include "Moptions.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/OpenMPT/mptrack/UpdateCheck.h =================================================================== --- trunk/OpenMPT/mptrack/UpdateCheck.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/UpdateCheck.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -13,10 +13,7 @@ #include <WinInet.h> #include <time.h> -// Setup dialog stuff -#include "Mainfrm.h" #include "resource.h" -#include "Moptions.h" #define DOWNLOAD_BUFFER_SIZE 256 Modified: trunk/OpenMPT/mptrack/VSTEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/VSTEditor.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/VSTEditor.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -9,7 +9,10 @@ #include "stdafx.h" -#include "vsteditor.h" +#include "resource.h" +#include "../soundlib/Sndfile.h" +#include "VstPlug.h" +#include "VSTEditor.h" #ifndef NO_VST Modified: trunk/OpenMPT/mptrack/VSTEditor.h =================================================================== --- trunk/OpenMPT/mptrack/VSTEditor.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/VSTEditor.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -10,9 +10,6 @@ #pragma once -#include "mptrack.h" -#include "MainFrm.h" -#include "VstPlug.h" #include "AbstractVstEditor.h" #ifndef NO_VST Modified: trunk/OpenMPT/mptrack/View_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_ins.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/View_ins.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -2239,14 +2239,14 @@ return; const CSoundFile &sndFile = pModDoc->GetrSoundFile(); - if(m_nInstrument >= 1 && - m_nInstrument <= sndFile.GetNumInstruments() && - sndFile.Instruments[m_nInstrument]) + if(m_nInstrument >= 1 + && m_nInstrument <= sndFile.GetNumInstruments() + && sndFile.Instruments[m_nInstrument]) { // "Center" y value of the envelope. For panning and pitch, this is 32, for volume and filter it is 0 (minimum). int nOffset = ((m_nEnv != ENV_VOLUME) && !GetEnvelopePtr()->dwFlags[ENV_FILTER]) ? 32 : 0; - CScaleEnvPointsDlg dlg(this, GetEnvelopePtr(), nOffset); + CScaleEnvPointsDlg dlg(this, *GetEnvelopePtr(), nOffset); if(dlg.DoModal() == IDOK) { SetInstrumentModified(); Modified: trunk/OpenMPT/mptrack/mod2midi.cpp =================================================================== --- trunk/OpenMPT/mptrack/mod2midi.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/mptrack/mod2midi.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -9,7 +9,8 @@ #include "stdafx.h" -#include "mptrack.h" +#include "Mptrack.h" +#include "../soundlib/Sndfile.h" #include "mod2midi.h" #include "Wav.h" Modified: trunk/OpenMPT/soundlib/Dlsbank.cpp =================================================================== --- trunk/OpenMPT/soundlib/Dlsbank.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/soundlib/Dlsbank.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -15,8 +15,8 @@ #include "dlsbank.h" #include "Wav.h" #include "../common/StringFixer.h" +#include "SampleIO.h" - //#define DLSBANK_LOG //#define DLSINSTR_LOG Modified: trunk/OpenMPT/soundlib/Fastmix.cpp =================================================================== --- trunk/OpenMPT/soundlib/Fastmix.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/soundlib/Fastmix.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -2265,6 +2265,8 @@ } +typedef struct ModChannel ModChannel_; + void MPPASMCALL X86_EndChannelOfs(ModChannel *pChannel, int *pBuffer, UINT nSamples) //---------------------------------------------------------------------------------- { @@ -2273,8 +2275,8 @@ mov esi, pChannel mov edi, pBuffer mov ecx, nSamples - mov eax, dword ptr [esi+ModChannel.nROfs] - mov edx, dword ptr [esi+ModChannel.nLOfs] + mov eax, dword ptr [esi+ModChannel_.nROfs] + mov edx, dword ptr [esi+ModChannel_.nLOfs] or ecx, ecx jz brkloop ofsloop: @@ -2302,8 +2304,8 @@ jnz ofsloop brkloop: mov esi, pChannel - mov dword ptr [esi+ModChannel.nROfs], eax - mov dword ptr [esi+ModChannel.nLOfs], edx + mov dword ptr [esi+ModChannel_.nROfs], eax + mov dword ptr [esi+ModChannel_.nLOfs], edx } #else // c implementation taken from libmodplug int rofs = pChannel->nROfs; Modified: trunk/OpenMPT/soundlib/ModChannel.h =================================================================== --- trunk/OpenMPT/soundlib/ModChannel.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/soundlib/ModChannel.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -10,11 +10,10 @@ #pragma once - #pragma warning(disable : 4324) //structure was padded due to __declspec(align()) // Mix Channel Struct -typedef struct __declspec(align(32)) ModChannel_ +struct __declspec(align(32)) ModChannel { // Envelope playback info struct EnvInfo @@ -169,12 +168,12 @@ float m_VibratoDepth; //<---- - ModChannel_() + ModChannel() { memset(this, 0, sizeof(*this)); } -} ModChannel; +}; // Default pattern channel settings Modified: trunk/OpenMPT/soundlib/ModInstrument.h =================================================================== --- trunk/OpenMPT/soundlib/ModInstrument.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/soundlib/ModInstrument.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -11,6 +11,8 @@ #pragma once #include "tuning.h" +#include "Snd_defs.h" +#include "../common/FlagSet.h" #include <set> // Instrument Envelopes Modified: trunk/OpenMPT/soundlib/ModSequence.h =================================================================== --- trunk/OpenMPT/soundlib/ModSequence.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/soundlib/ModSequence.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -11,10 +11,10 @@ #pragma once #include <vector> -#include "Loaders.h" class CSoundFile; class ModSequenceSet; +class FileReader; class ModSequence //=============== Modified: trunk/OpenMPT/soundlib/PlaybackEventer.h =================================================================== --- trunk/OpenMPT/soundlib/PlaybackEventer.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/soundlib/PlaybackEventer.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -10,8 +10,7 @@ #pragma once -#include "pattern.h" - +#include "Snd_defs.h" class CSoundFile; //==================== @@ -19,11 +18,11 @@ //==================== { public: - CPlaybackEventer(CSoundFile& sndf) : m_rSndFile(sndf) {} + CPlaybackEventer(CSoundFile &sndf) : m_rSndFile(sndf) {} void PatternTranstionChnSolo(const CHANNELINDEX chnIndex); void PatternTransitionChnUnmuteAll(); private: - CSoundFile& m_rSndFile; + CSoundFile &m_rSndFile; }; Modified: trunk/OpenMPT/soundlib/SampleFormats.cpp =================================================================== --- trunk/OpenMPT/soundlib/SampleFormats.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/soundlib/SampleFormats.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -13,7 +13,7 @@ #include "sndfile.h" #ifdef MODPLUG_TRACKER #include "../mptrack/Moddoc.h" -#include "../mptrack/Mainfrm.h" +#include "../mptrack/Mainfrm.h" // For ini settings #endif //MODPLUG_TRACKER #include "../common/AudioCriticalSection.h" #include "Wav.h" Modified: trunk/OpenMPT/soundlib/SampleIO.h =================================================================== --- trunk/OpenMPT/soundlib/SampleIO.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/soundlib/SampleIO.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -12,6 +12,7 @@ #pragma once +struct ModSample; class FileReader; // Sample import / export formats Modified: trunk/OpenMPT/soundlib/Snd_defs.h =================================================================== --- trunk/OpenMPT/soundlib/Snd_defs.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/soundlib/Snd_defs.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -203,9 +203,10 @@ // envelope types in instrument editor enum enmEnvelopeTypes { - ENV_VOLUME = 1, - ENV_PANNING = 2, - ENV_PITCH = 3, + ENV_VOLUME = 0, + ENV_PANNING, + ENV_PITCH, + NUM_ENVELOPES, }; // Filter Modes Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/soundlib/Sndfile.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -31,6 +31,7 @@ #include "modcommand.h" #include "plugins/PlugInterface.h" #include "RowVisitor.h" +#include "FileReader.h" #include "snd_rvb.h" #include "../sounddsp/AGC.h" @@ -323,7 +324,7 @@ DWORD m_dwLastSavedWithVersion; #ifdef MODPLUG_TRACKER - vector<PatternCuePoint> m_PatternCuePoints; // For WAV export (writing pattern positions to file) + std::vector<PatternCuePoint> m_PatternCuePoints; // For WAV export (writing pattern positions to file) #endif // MODPLUG_TRACKER // For handling backwards jumps and stuff to prevent infinite loops when counting the mod length or rendering to wav. @@ -618,8 +619,8 @@ bool IsSampleUsed(SAMPLEINDEX nSample) const; bool IsInstrumentUsed(INSTRUMENTINDEX nInstr) const; bool RemoveInstrumentSamples(INSTRUMENTINDEX nInstr); - SAMPLEINDEX DetectUnusedSamples(vector<bool> &sampleUsed) const; - SAMPLEINDEX RemoveSelectedSamples(const vector<bool> &keepSamples); + SAMPLEINDEX DetectUnusedSamples(std::vector<bool> &sampleUsed) const; + SAMPLEINDEX RemoveSelectedSamples(const std::vector<bool> &keepSamples); static void AdjustSampleLoop(ModSample &sample); // Samples file I/O Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.cpp =================================================================== --- trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2013-04-08 23:39:14 UTC (rev 1783) @@ -12,6 +12,7 @@ #include "modsmp_ctrl.h" #include "../common/AudioCriticalSection.h" #include "../common/Reporting.h" +#include "Sndfile.h" #define new DEBUG_NEW Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.h =================================================================== --- trunk/OpenMPT/soundlib/modsmp_ctrl.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/soundlib/modsmp_ctrl.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -10,8 +10,12 @@ #pragma once -#include "Sndfile.h" +class CSoundFile; +struct ModSample; +struct ModChannel; +#include "Snd_defs.h" + namespace ctrlSmp { @@ -40,11 +44,6 @@ // Propagate loop point changes to player bool UpdateLoopPoints(const ModSample &smp, CSoundFile &sndFile); -// Returns the number of bytes allocated(at least) for sample data. -// Note: Currently the return value is based on the sample length and the actual -// allocation may be more than what this function returns. -inline SmpLength GetSampleCapacity(ModSample &smp) {return smp.GetSampleSizeInBytes();} - // Resets samples. void ResetSamples(CSoundFile &sndFile, ResetFlag resetflag, SAMPLEINDEX minSample = SAMPLEINDEX_INVALID, SAMPLEINDEX maxSample = SAMPLEINDEX_INVALID); Modified: trunk/OpenMPT/soundlib/pattern.h =================================================================== --- trunk/OpenMPT/soundlib/pattern.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/soundlib/pattern.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -14,8 +14,6 @@ #include "modcommand.h" #include "Snd_defs.h" -using std::vector; - class CPatternContainer; class CSoundFile; class EffectWriter; Modified: trunk/OpenMPT/soundlib/patternContainer.h =================================================================== --- trunk/OpenMPT/soundlib/patternContainer.h 2013-04-08 18:36:53 UTC (rev 1782) +++ trunk/OpenMPT/soundlib/patternContainer.h 2013-04-08 23:39:14 UTC (rev 1783) @@ -11,7 +11,6 @@ #pragma once #include "pattern.h" -#include "Snd_defs.h" class CSoundFile; typedef CPattern MODPATTERN; @@ -22,7 +21,7 @@ { //BEGIN: TYPEDEFS public: - typedef vector<MODPATTERN> PATTERNVECTOR; + typedef std::vector<MODPATTERN> PATTERNVECTOR; //END: TYPEDEFS @@ -97,7 +96,7 @@ //BEGIN: DATA MEMBERS private: PATTERNVECTOR m_Patterns; - CSoundFile& m_rSndFile; + CSoundFile &m_rSndFile; //END: DATA MEMBERS }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |