Files
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

114 lines
2.3 KiB
C++

// DlgAddTextures.cpp : implementation file
//
#include "stdafx.h"
#include "Megatron.h"
#include "DlgAddTextures.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDlgAddTextures dialog
CDlgAddTextures::CDlgAddTextures(CWnd* pParent /*=NULL*/)
: CDialog(CDlgAddTextures::IDD, pParent)
{
//{{AFX_DATA_INIT(CDlgAddTextures)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CDlgAddTextures::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDlgAddTextures)
DDX_Control(pDX, IDC_LIST, m_wndList);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDlgAddTextures, CDialog)
//{{AFX_MSG_MAP(CDlgAddTextures)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDlgAddTextures message handlers
void CDlgAddTextures::OnOK()
{
if (m_pList)
{
int count = m_wndList.GetSelCount();
int *items = new int[count];
m_wndList.GetSelItems(count,items);
for (int x=0;x<count;x++)
{
CString str;
m_wndList.GetText(items[x],str);
m_pList->AddTail(str);
}
delete items;
}
CDialog::OnOK();
}
BOOL CDlgAddTextures::OnInitDialog()
{
CDialog::OnInitDialog();
CFileFind find;
int icount = 0;
for (bool bmore = find.FindFile("content\\textures\\*.png");bmore;)
{
bmore = find.FindNextFile();
CString str = find.GetFileTitle();
if (m_pList)
{
str.MakeLower();
POSITION pos = m_pList->Find(str);
if (pos)
{
m_pList->RemoveAt(pos);
}
else
{
m_wndList.AddString(str);
}
}
icount++;
}
find.Close();
for (bmore = find.FindFile("content\\textures\\*.tga");bmore;)
{
bmore = find.FindNextFile();
CString str = find.GetFileTitle();
if (m_pList)
{
str.MakeLower();
POSITION pos = m_pList->Find(str);
if (pos)
{
m_pList->RemoveAt(pos);
}
else
{
m_wndList.AddString(str);
}
}
icount++;
}
find.Close();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}