mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-30 04:40:53 +00:00
Fixed: Compile error in MFC Object Viewer with sound sheet id as CSheetId
This commit is contained in:
parent
f4f7965550
commit
83ba94002b
5 changed files with 18 additions and 18 deletions
|
@ -159,7 +159,7 @@ END_MESSAGE_MAP()
|
|||
void CEditPSSound::OnBrowseSound()
|
||||
{
|
||||
// CPickSound::TNameVect names;
|
||||
vector<NLMISC::TStringId> names;
|
||||
vector<NLMISC::CSheetId> names;
|
||||
|
||||
|
||||
NLSOUND::UAudioMixer *audioMixer = CSoundSystem::getAudioMixer();
|
||||
|
@ -172,7 +172,7 @@ void CEditPSSound::OnBrowseSound()
|
|||
|
||||
if (ps.DoModal() == IDOK)
|
||||
{
|
||||
m_SoundName = NLMISC::CStringMapper::unmap(ps.getName()).c_str();
|
||||
m_SoundName = ps.getName().toString().c_str();
|
||||
_Sound->setSoundName(ps.getName());
|
||||
updateModifiedFlag();
|
||||
UpdateData(FALSE);
|
||||
|
@ -184,7 +184,7 @@ BOOL CEditPSSound::OnInitDialog()
|
|||
CDialog::OnInitDialog();
|
||||
|
||||
nlassert(_Sound);
|
||||
m_SoundName = NLMISC::CStringMapper::unmap(_Sound->getSoundName()).c_str();
|
||||
m_SoundName = _Sound->getSoundName().toString().c_str();
|
||||
|
||||
UpdateData(FALSE);
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
|
@ -195,7 +195,7 @@ void CEditPSSound::OnChangeSoundName()
|
|||
{
|
||||
nlassert(_Sound);
|
||||
UpdateData();
|
||||
_Sound->setSoundName( NLMISC::CStringMapper::map((LPCTSTR) m_SoundName) );
|
||||
_Sound->setSoundName(NLMISC::CSheetId((LPCTSTR)m_SoundName, "sound"));
|
||||
updateModifiedFlag();
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ void CEditPSSound::OnSpawn()
|
|||
// play the currently selected sound
|
||||
void CEditPSSound::OnPlaySound()
|
||||
{
|
||||
CSoundSystem::play(std::string((LPCTSTR) m_SoundName));
|
||||
CSoundSystem::play(std::string((LPCTSTR)m_SoundName));
|
||||
}
|
||||
|
||||
void CEditPSSound::OnMute()
|
||||
|
|
|
@ -74,7 +74,7 @@ BOOL CPickSound::OnInitDialog()
|
|||
|
||||
for (TNameVect::iterator it = _Names.begin(); it != _Names.end(); ++it)
|
||||
{
|
||||
m_NameList.AddString(NLMISC::CStringMapper::unmap(*it).c_str());
|
||||
m_NameList.AddString((*it).toString().c_str());
|
||||
}
|
||||
|
||||
_Timer = SetTimer (1, 100, NULL);
|
||||
|
@ -111,7 +111,7 @@ void CPickSound::OnSelchange()
|
|||
nlassert(m_NameList.GetTextLen(m_NameList.GetCurSel()) < 1024);
|
||||
|
||||
m_NameList.GetText(m_NameList.GetCurSel(), str);
|
||||
_CurrName = NLMISC::CStringMapper::map(str);
|
||||
_CurrName = NLMISC::CSheetId(str, "sound");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#endif // _MSC_VER > 1000
|
||||
// pick_sound.h : header file
|
||||
//
|
||||
#include "nel/misc/string_mapper.h"
|
||||
#include "nel/misc/sheet_id.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
|
@ -40,11 +40,11 @@ class CPickSound : public CDialog
|
|||
{
|
||||
// Construction
|
||||
public:
|
||||
typedef std::vector<NLMISC::TStringId> TNameVect;
|
||||
typedef std::vector<NLMISC::CSheetId> TNameVect;
|
||||
CPickSound(const TNameVect &names, CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
|
||||
const NLMISC::TStringId &getName(void) const { return _CurrName; }
|
||||
const NLMISC::CSheetId &getName(void) const { return _CurrName; }
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CPickSound)
|
||||
|
@ -63,7 +63,7 @@ public:
|
|||
// Implementation
|
||||
protected:
|
||||
TNameVect _Names;
|
||||
NLMISC::TStringId _CurrName;
|
||||
NLMISC::CSheetId _CurrName;
|
||||
|
||||
UINT_PTR _Timer;
|
||||
|
||||
|
|
|
@ -126,18 +126,18 @@ void CSoundAnimDlg::updateSounds()
|
|||
{
|
||||
if (_SelectedMarker != 0)
|
||||
{
|
||||
vector<NLMISC::TStringId> sounds;
|
||||
vector<NLMISC::CSheetId> sounds;
|
||||
|
||||
_SelectedMarker->getSounds(sounds);
|
||||
|
||||
CListBox* list = (CListBox*) GetDlgItem(IDC_SOUND_ANIM_LIST);
|
||||
list->ResetContent();
|
||||
|
||||
vector<NLMISC::TStringId>::iterator iter;
|
||||
vector<NLMISC::CSheetId>::iterator iter;
|
||||
|
||||
for (iter = sounds.begin(); iter != sounds.end(); iter++)
|
||||
{
|
||||
list->AddString(CStringMapper::unmap(*iter).c_str());
|
||||
list->AddString((*iter).toString().c_str());
|
||||
}
|
||||
|
||||
list->UpdateData();
|
||||
|
@ -151,7 +151,7 @@ void CSoundAnimDlg::OnAddSound()
|
|||
if (_SelectedMarker != 0)
|
||||
{
|
||||
// CPickSound::TNameVect names;
|
||||
vector<NLMISC::TStringId> names;
|
||||
vector<NLMISC::CSheetId> names;
|
||||
|
||||
|
||||
NLSOUND::UAudioMixer *audioMixer = CSoundSystem::getAudioMixer();
|
||||
|
@ -183,7 +183,7 @@ void CSoundAnimDlg::OnRemoveSound()
|
|||
if (list->GetText(list->GetCurSel(), s) != LB_ERR)
|
||||
{
|
||||
string name(s);
|
||||
_SelectedMarker->removeSound(CStringMapper::map(name));
|
||||
_SelectedMarker->removeSound(NLMISC::CSheetId(name, "sound"));
|
||||
updateSounds();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ void CSoundSystem::play(const string &soundName)
|
|||
{
|
||||
if (_AudioMixer)
|
||||
{
|
||||
NLSOUND::USource *src = _AudioMixer->createSource(CStringMapper::map(soundName), true);
|
||||
NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CSheetId(soundName, "sound"), true);
|
||||
if (src)
|
||||
{
|
||||
src->setLooping(false);
|
||||
|
@ -187,7 +187,7 @@ USource *CSoundSystem::create(const std::string &soundName)
|
|||
{
|
||||
if (_AudioMixer)
|
||||
{
|
||||
NLSOUND::USource *src = _AudioMixer->createSource(CStringMapper::map(soundName), false);
|
||||
NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CSheetId(soundName, "sound"), false);
|
||||
if (src)
|
||||
{
|
||||
src->setLooping(false);
|
||||
|
|
Loading…
Reference in a new issue