Files
firestorm/Gameleap/code/mw4/Tools/PixelWhipPro/EBFPanel.cpp
T
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

83 lines
2.0 KiB
C++

// EBFPanel.cpp : implementation file
//
#include "stdafx.h"
#include "pixelwhippro.h"
#include "EBFPanel.h"
#include <GosFx\EffectLibrary.hpp>
#include <MLR\MLRTexturePool.hpp>
extern CPixelWhipProApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CEBFPanel dialog
#include <GosFx\GosFx.hpp>
CEBFPanel::CEBFPanel(CWnd* pParent /*=NULL*/)
: CDynaPanel(CEBFPanel::IDD, pParent)
{
//{{AFX_DATA_INIT(CEBFPanel)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CEBFPanel::DoDataExchange(CDataExchange* pDX)
{
CDynaPanel::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CEBFPanel)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CEBFPanel, CDynaPanel)
//{{AFX_MSG_MAP(CEBFPanel)
ON_BN_CLICKED(IDC_BROWSE, OnBrowse)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CEBFPanel message handlers
void CEBFPanel::Set(void *dat)
{
ShapeSpec=(gosFX::DebrisCloud__Specification *)dat;
}
void CEBFPanel::OnBrowse()
{
CString doc_path=theApp.DocPath.Left(theApp.DocPath.ReverseFind('\\')),shape_path;
// if(doc_path.GetLength()==0) GetCurrentDirectory(doc_path);
SetCurrentDirectory(doc_path);
CFileDialog dlg1(TRUE,"ebf",NULL,OFN_NOCHANGEDIR,"EBF Geometry(*.ebf)|*.ebf||",this);
if(dlg1.DoModal()==IDOK)
{
shape_path=dlg1.GetPathName();
if(doc_path.GetLength()>shape_path.GetLength() ||
shape_path.Left(doc_path.GetLength()).CompareNoCase(doc_path)
)
{
MessageBox("Shape Path Error");
}
else
{
shape_path=shape_path.Mid(doc_path.GetLength()+1);
MString mstr;
mstr=(char *)(LPCSTR)shape_path;
gosFX::EffectLibrary::Instance->LoadDebrisArray(ShapeSpec,mstr);
ShapeSpec->m_shapeFile=shape_path;
MidLevelRenderer::MLRTexturePool::Instance->LoadImages();
}
theApp.StopEffects();
theApp.StartEffects();
}
}