Files
Client/GameTools/WORLDCREATOR/PageDuengunSound.cpp
LGram16 dd97ddec92 Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code:
- Client: Game client source (moved to Client/Client/)
- Server: Game server source
- GameTools: Development tools
- CryptoSource: Encryption utilities
- database: Database scripts
- Script: Game scripts
- rylCoder_16.02.2008_src: Legacy coder tools
- GMFont, Game: Additional resources

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 20:17:20 +09:00

153 lines
4.4 KiB
C++
Raw Blame History

// PageDuengunSound.cpp : implementation file
//
#include "stdafx.h"
#include "worldcreator.h"
#include "PageDuengunSound.h"
#include "MainFrm.h"
#include "WorldCreatorView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPageDuengunSound property page
IMPLEMENT_DYNCREATE(CPageDuengunSound, CPropertyPage)
CPageDuengunSound::CPageDuengunSound() : CPropertyPage(CPageDuengunSound::IDD)
{
//{{AFX_DATA_INIT(CPageDuengunSound)
m_bToggle = FALSE;
//}}AFX_DATA_INIT
}
CPageDuengunSound::~CPageDuengunSound()
{
}
void CPageDuengunSound::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPageDuengunSound)
DDX_Control(pDX, IDC_LIST1, m_ctrlSoundList);
DDX_Check(pDX, IDC_CHECK1, m_bToggle);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPageDuengunSound, CPropertyPage)
//{{AFX_MSG_MAP(CPageDuengunSound)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
ON_BN_CLICKED(IDC_CHECK1, OnToggle)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPageDuengunSound message handlers
/*
void CPageDuengunSound::OnOK()
{
// TODO: Add extra validation here
CPropertyPage::OnOK();
}
*/
// 98 : Duengun Sound
/*void CPageDuengunSound::OnInputsound()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
if(m_BInput) {
CMainFrame *mf=(CMainFrame*)AfxGetApp()->m_pMainWnd;
CWorldCreatorView *av=(CWorldCreatorView *)mf->GetActiveView();
av->ChangeMouseInterface(98);
}
else
{
CMainFrame *mf=(CMainFrame*)AfxGetApp()->m_pMainWnd;
CWorldCreatorView *av=(CWorldCreatorView *)mf->GetActiveView();
av->ChangeMouseInterface(-1);
}
}
*/
BOOL CPageDuengunSound::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// TODO: Add extra initialization here
DWORD dwStyle;
dwStyle = m_ctrlSoundList.SendMessage(LVM_GETEXTENDEDLISTVIEWSTYLE, 0 ,0);
dwStyle |= LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES ;
m_ctrlSoundList.SendMessage( LVM_SETEXTENDEDLISTVIEWSTYLE, 0,dwStyle );
m_ctrlSoundList.InsertColumn(0,"<EFBFBD>ͼ<EFBFBD> Leaf",LVCFMT_LEFT,70);
m_ctrlSoundList.InsertColumn(1,"Sound Name", LVCFMT_LEFT,70);
m_ctrlSoundList.InsertColumn(2,"Sound Min Range", LVCFMT_LEFT,70);
m_ctrlSoundList.InsertColumn(3,"Sound Max Range", LVCFMT_LEFT,70);
m_ctrlSoundList.InsertColumn(4,"Delay Time",LVCFMT_LEFT,70);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CPageDuengunSound::OnButton1()
{
// TODO: Add your control notification handler code here
if((CSceneManager::m_RBspSceneManager.m_pCurrentBspScene != NULL) &&
(CSceneManager::m_RBspSceneManager.m_pCurrentBspScene->m_iRBspLeafIndex != -1))
{
/*CDlgDuenEffect EditDialog;
CMainFrame *mf=(CMainFrame*)AfxGetApp()->m_pMainWnd;
CWorldCreatorView *av=(CWorldCreatorView *)mf->GetActiveView();
D3DXMATRIX matView;
av->m_SceneManager->GetDevice()->GetTransform(D3DTS_VIEW,&matView);
D3DXMatrixInverse(&matView,NULL,&matView);
vector3 vecPos = vector3(matView._41,matView._42,matView._43);
EditDialog.m_strPosition.Format("X : %f Y : %f Z : %f",vecPos.x,vecPos.y,vecPos.z);
EditDialog.m_iLeafIndex = CSceneManager::m_RBspSceneManager.m_pCurrentBspScene->m_iRBspLeafIndex;
EditDialog.DoModal();
RBspScene *pScene = CSceneManager::m_RBspSceneManager.m_pCurrentBspScene;
int iLeaf = CSceneManager::m_RBspSceneManager.m_pCurrentBspScene->m_iRBspLeafIndex;
D3DXVECTOR3 vecEffect = D3DXVECTOR3(vecPos.x,vecPos.y,vecPos.z);
pScene->m_pLeafExs[iLeaf].InputEventEffect((EditDialog.m_strEffectName.LockBuffer()),vecEffect,EditDialog.m_fDelay);
// Insert Item
LV_ITEM item;
item.iItem = m_ctrlEffectList.GetItemCount();
item.mask = LVIF_TEXT;
item.iSubItem = 0;
CString Tmp;
Tmp.Format("%d",iLeaf);
item.pszText = Tmp.LockBuffer();
m_ctrlEffectList.InsertItem(&item);
m_ctrlEffectList.SetItemText(item.iItem,1,EditDialog.m_strEffectName);
Tmp.Format("%f",EditDialog.m_fDelay);
m_ctrlEffectList.SetItemText(item.iItem,2,Tmp);*/
}
else
{
MessageBox("Bsp <20><><EFBFBD>ΰ<EFBFBD> <20>ƴϰų<CFB0> Leaf <20><><EFBFBD><20>߸<EFBFBD><DFB8>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
}
}
void CPageDuengunSound::OnToggle()
{
// TODO: Add your control notification handler code here
m_bToggle = (m_bToggle == TRUE) ? FALSE : TRUE;
CSceneManager::m_RBspSceneManager.m_pCurrentBspScene->m_bVisSoundBox = (m_bToggle == TRUE) ? true : false;
UpdateData(FALSE);
}