Files
Client/GameTools/WORLDCREATOR/DlgDuengunTrigger.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

187 lines
4.5 KiB
C++
Raw Permalink Blame History

// DlgDuengunTrigger.cpp : implementation file
//
#include "stdafx.h"
#include "worldcreator.h"
#include "SceneManager.h"
#include "DlgDuengunTrigger.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDlgDuengunTrigger dialog
CDlgDuengunTrigger::CDlgDuengunTrigger(CWnd* pParent /*=NULL*/)
: CDialog(CDlgDuengunTrigger::IDD, pParent)
{
//{{AFX_DATA_INIT(CDlgDuengunTrigger)
m_strEditDuengunName = _T("");
m_bViewLeafBox = TRUE;
m_fScale = 0.0f;
//}}AFX_DATA_INIT
m_pTriggerSheet = NULL;
m_pParent = NULL;
}
void CDlgDuengunTrigger::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDlgDuengunTrigger)
DDX_Text(pDX, IDC_EDITNAME, m_strEditDuengunName);
DDX_Check(pDX, IDC_LEAFBOX, m_bViewLeafBox);
DDX_Text(pDX, IDC_BSPSCALE, m_fScale);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDlgDuengunTrigger, CDialog)
//{{AFX_MSG_MAP(CDlgDuengunTrigger)
ON_BN_CLICKED(IDC_SAVE, OnSave)
ON_BN_CLICKED(IDC_INITBUTTON, OnInitbutton)
ON_WM_DESTROY()
ON_WM_CLOSE()
ON_BN_CLICKED(IDC_BSPIN, OnBspin)
ON_BN_CLICKED(IDC_BSPOUT, OnBspout)
ON_BN_CLICKED(IDC_LEAFBOX, OnLeafbox)
ON_BN_CLICKED(IDC_BSPSCALEIN, OnBspscalein)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDlgDuengunTrigger message handlers
void CDlgDuengunTrigger::OnSave()
{
// TODO: Add your control notification handler code here
RBspScene *pScene = CSceneManager::m_RBspSceneManager.SearchBspScene(m_strEditDuengunName.LockBuffer());
if(pScene != NULL)
{
char *strBseName = m_strEditDuengunName.LockBuffer();
char *pChr = strrchr(strBseName,'.');
*pChr = '.'; pChr++;
*pChr = 'b'; pChr++;
*pChr = 's'; pChr++;
*pChr = 'e';
pScene->SaveBseFile(strBseName);
MessageBox("Bse File Save Success");
}
}
void CDlgDuengunTrigger::OnInitbutton()
{
// TODO: Add your control notification handler code here
}
BOOL CDlgDuengunTrigger::OnInitDialog()
{
m_pTriggerSheet = new CSheetDuengunTrigger("<EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ʈ<><C6AE><EFBFBD><EFBFBD>");
m_pTriggerSheet->EnableStackedTabs(FALSE);
m_pTriggerSheet->Create(this,WS_CHILD | WS_VISIBLE );
m_pTriggerSheet->ModifyStyleEx(0,WS_EX_CONTROLPARENT);
m_pTriggerSheet->ModifyStyle(0,WS_TABSTOP);
m_pTriggerSheet->MoveWindow( 8, 70, 512, 268 );
CTabCtrl * pTabCtrl = m_pTriggerSheet->GetTabControl();
pTabCtrl->SetWindowPos( NULL, 0,0,505,258, SWP_NOZORDER | SWP_NOMOVE );
// TODO: Add extra initialization here
CDialog::OnInitDialog();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CDlgDuengunTrigger::OnDestroy()
{
CDialog::OnDestroy();
if(m_pTriggerSheet != NULL)
{
delete m_pTriggerSheet;
m_pTriggerSheet = NULL;
}
// TODO: Add your message handler code here
}
BOOL CDlgDuengunTrigger::Create(CWnd* pParentWnd)
{
// TODO: Add your specialized code here and/or call the base class
m_pParent = pParentWnd;
return CDialog::Create(IDD, pParentWnd);
}
void CDlgDuengunTrigger::SetBspFile(char *strBse)
{
m_strEditDuengunName.Format("%s",strBse);
RBspScene *pScene = CSceneManager::m_RBspSceneManager.SearchBspScene(m_strEditDuengunName.LockBuffer());
if(pScene != NULL)
{
m_fScale = pScene->m_vecScale.x;
}
UpdateData(FALSE);
m_pTriggerSheet->SetActivePage(0);
// cycle through all page to activate(create) each page
}
void CDlgDuengunTrigger::OnClose()
{
// TODO: Add your message handler code here and/or call default
if(m_pParent != NULL)
m_pParent->SendMessage( WM_CHILD_CLOSE, (WPARAM)this );
CDialog::OnClose();
}
void CDlgDuengunTrigger::OnBspin()
{
// TODO: Add your control notification handler code here
CSceneManager::m_RBspSceneManager.SelectBspScene(m_strEditDuengunName.LockBuffer());
}
void CDlgDuengunTrigger::OnBspout()
{
// TODO: Add your control notification handler code here
CSceneManager::m_RBspSceneManager.BspSceneOut();
}
void CDlgDuengunTrigger::OnLeafbox()
{
// TODO: Add your control notification handler code here
m_bViewLeafBox = (m_bViewLeafBox == TRUE) ? FALSE : TRUE;
UpdateData(FALSE);
CSceneManager::m_RBspSceneManager.ToggleViewLeafBox();
}
void CDlgDuengunTrigger::OnBspscalein()
{
// TODO: Add your control notification handler code here
/* UpdateData(TRUE);
RBspScene *pScene = CSceneManager::m_RBspSceneManager.SearchBspScene(m_strEditDuengunName.LockBuffer());
if(pScene != NULL)
{
pScene->SetBspScaleLoaded(m_fScale,m_fScale,m_fScale);
}*/
}