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.
This commit is contained in:
Cyd
2026-06-24 21:28:16 -05:00
commit 2b8ca921cb
66341 changed files with 7923174 additions and 0 deletions
@@ -0,0 +1,72 @@
// EffectEdit.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "EffectEdit.h"
#include "EffectEditDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEffectEditApp
BEGIN_MESSAGE_MAP(CEffectEditApp, CWinApp)
//{{AFX_MSG_MAP(CEffectEditApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CEffectEditApp construction
CEffectEditApp::CEffectEditApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CEffectEditApp object
CEffectEditApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CEffectEditApp initialization
BOOL CEffectEditApp::InitInstance()
{
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CEffectEditDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
@@ -0,0 +1,170 @@
# Microsoft Developer Studio Project File - Name="EffectEdit" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=EffectEdit - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "EffectEdit.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "EffectEdit.mak" CFG="EffectEdit - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "EffectEdit - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "EffectEdit - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "EffectEdit - Win32 Release"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../../rel.bin"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386
!ELSEIF "$(CFG)" == "EffectEdit - Win32 Debug"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../../dbg.bin"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "EffectEdit - Win32 Release"
# Name "EffectEdit - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\contents.cpp
# End Source File
# Begin Source File
SOURCE=.\effectdata.cpp
# End Source File
# Begin Source File
SOURCE=.\EffectEdit.cpp
# End Source File
# Begin Source File
SOURCE=.\EffectEdit.rc
# End Source File
# Begin Source File
SOURCE=.\EffectEditDlg.cpp
# End Source File
# Begin Source File
SOURCE=.\effectlist.cpp
# End Source File
# Begin Source File
SOURCE=.\masterlist.cpp
# End Source File
# Begin Source File
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"stdafx.h"
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\contents.hpp
# End Source File
# Begin Source File
SOURCE=.\effectdata.hpp
# End Source File
# Begin Source File
SOURCE=.\EffectEdit.h
# End Source File
# Begin Source File
SOURCE=.\EffectEditDlg.h
# End Source File
# Begin Source File
SOURCE=.\Resource.h
# End Source File
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\res\EffectEdit.ico
# End Source File
# Begin Source File
SOURCE=.\res\EffectEdit.rc2
# End Source File
# End Group
# Begin Source File
SOURCE=.\ReadMe.txt
# End Source File
# End Target
# End Project
@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "EffectEdit"=.\EffectEdit.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
@@ -0,0 +1,57 @@
// EffectEdit.h : main header file for the EFFECTEDIT application
//
#if !defined(AFX_EFFECTEDIT_H__E9B01104_1E1A_11D4_9155_00A0CC5275E1__INCLUDED_)
#define AFX_EFFECTEDIT_H__E9B01104_1E1A_11D4_9155_00A0CC5275E1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
// CEffectEditApp:
// See EffectEdit.cpp for the implementation of this class
//
class CEffectEditApp : public CWinApp
{
public:
CEffectEditApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CEffectEditApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CEffectEditApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
void AddEffectList (CTreeCtrl& EffectList);
void KillEffectList (CTreeCtrl &EffectList);
void AddMasterList (CListBox& MasterList);
void KillMasterList (CListBox& MasterList);
HTREEITEM InsertEffectFolder (CString& foldername,CTreeCtrl& EffectList);
HTREEITEM InsertEffectItem (CString& itemname,CTreeCtrl& EffectList,HTREEITEM root);
bool CheckEffectItem (CString& itemname,CTreeCtrl& EffectList,HTREEITEM root);
#include "effectdata.hpp"
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_EFFECTEDIT_H__E9B01104_1E1A_11D4_9155_00A0CC5275E1__INCLUDED_)
@@ -0,0 +1,310 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
"#ifdef _WIN32\r\n"
"LANGUAGE 9, 1\r\n"
"#pragma code_page(1252)\r\n"
"#endif //_WIN32\r\n"
"#include ""res\\EffectEdit.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
"#include ""afxres.rc"" // Standard components\r\n"
"#endif\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME ICON DISCARDABLE "res\\EffectEdit.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About EffectEdit"
FONT 8, "MS Sans Serif"
BEGIN
ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
LTEXT "EffectEdit Version 1.0",IDC_STATIC,40,10,119,8,
SS_NOPREFIX
LTEXT "Copyright (C) 2000",IDC_STATIC,40,25,119,8
DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP
END
IDD_EFFECTEDIT_DIALOG DIALOGEX 0, 0, 663, 419
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CLIENTEDGE | WS_EX_APPWINDOW
CAPTION "EffectEdit"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "Quit",IDOK,455,398,50,14
CONTROL "Tree1",IDC_EFFECTLIST,"SysTreeView32",TVS_HASBUTTONS |
TVS_HASLINES | TVS_LINESATROOT | TVS_SHOWSELALWAYS |
TVS_INFOTIP | WS_BORDER | WS_TABSTOP,7,7,162,405,
WS_EX_STATICEDGE
PUSHBUTTON "New Effect",IDC_ADD,186,398,50,14
LISTBOX IDC_MASTERLIST,170,7,176,139,LBS_SORT |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
LTEXT "Audio",IDC_STATIC,184,152,19,8
LTEXT "Video",IDC_STATIC,184,168,19,8
PUSHBUTTON ",,,",IDC_SOUNDSELECT,315,212,15,14
CONTROL "Lock",IDC_LOCKCHECK,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,335,402,32,10
LTEXT "Audio Name",IDC_AUDIO,208,152,131,12,SS_SUNKEN
LTEXT "Video name",IDC_VIDEO,208,168,131,12,SS_SUNKEN
LTEXT "Sound Name",IDC_SOUND,185,212,131,12,SS_SUNKEN
CONTROL "Starts Running",IDC_DATASTARTRUN,"Button",BS_AUTO3STATE |
WS_TABSTOP,234,191,63,10
GROUPBOX "Video",IDC_STATIC,180,302,132,91
GROUPBOX "Audio",IDC_STATIC,175,204,167,94
CONTROL "Fog",IDC_FOG,"Button",BS_AUTO3STATE | WS_TABSTOP,187,
311,28,10
CONTROL "Loop",IDC_LOOP,"Button",BS_AUTO3STATE | WS_TABSTOP,183,
236,32,10
LTEXT "Min Range",IDC_STATIC,183,252,36,8
LTEXT "Max Range",IDC_STATIC,183,268,38,8
EDITTEXT IDC_MINRANGEEDIT,227,250,40,14,ES_AUTOHSCROLL
CONTROL "Spin1",IDC_MINSPIN,"msctls_updown32",UDS_SETBUDDYINT |
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,265,250,
10,14
EDITTEXT IDC_MAXRANGEEDIT,227,266,40,14,ES_AUTOHSCROLL
CONTROL "Spin2",IDC_MAXSPIN,"msctls_updown32",UDS_SETBUDDYINT |
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,267,266,
10,14
CONTROL "Starts Running",IDC_AUDIOSTARTRUN,"Button",
BS_AUTO3STATE | WS_TABSTOP,183,284,63,10
LTEXT "X",IDC_STATIC,204,339,8,8
LTEXT "Y",IDC_STATIC,204,353,8,8
LTEXT "Z",IDC_STATIC,204,367,8,8
EDITTEXT IDC_TRANSX,213,334,54,14,ES_AUTOHSCROLL
CONTROL "Spin1",IDC_XSPIN,"msctls_updown32",UDS_SETBUDDYINT |
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,269,334,
10,14
EDITTEXT IDC_TRANSY,213,350,54,14,ES_AUTOHSCROLL
CONTROL "Spin2",IDC_YSPIN,"msctls_updown32",UDS_SETBUDDYINT |
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,269,351,
10,14
EDITTEXT IDC_TRANSZ,213,366,54,14,ES_AUTOHSCROLL
CONTROL "Spin3",IDC_ZSPIN,"msctls_updown32",UDS_SETBUDDYINT |
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,269,366,
10,14
GROUPBOX "Translation",IDC_STATIC,190,325,97,60
LTEXT "Grass",IDC_STATIC,385,16,19,8
LTEXT "Audio Name",IDC_CONT1,407,16,222,12,SS_SUNKEN
LTEXT "Water",IDC_STATIC,384,37,20,8
LTEXT "Audio Name",IDC_CONT2,407,37,222,12,SS_SUNKEN
LTEXT "Concrete",IDC_STATIC,374,57,30,8
LTEXT "Audio Name",IDC_CONT3,407,57,222,12,SS_SUNKEN
LTEXT "Grey Dirt",IDC_STATIC,376,80,28,8
LTEXT "Audio Name",IDC_CONT4,407,80,222,12,SS_SUNKEN
LTEXT "Brown Dirt",IDC_STATIC,370,100,34,8
LTEXT "Audio Name",IDC_CONT5,407,100,222,12,SS_SUNKEN
LTEXT "Rock",IDC_STATIC,386,122,18,8
LTEXT "Audio Name",IDC_CONT6,407,122,222,12,SS_SUNKEN
LTEXT "DarkConcrete",IDC_STATIC,359,142,45,8
LTEXT "Audio Name",IDC_CONT7,407,142,222,12,SS_SUNKEN
LTEXT "DarkGreyDirt",IDC_STATIC,362,162,42,8
LTEXT "Audio Name",IDC_CONT8,407,162,222,12,SS_SUNKEN
LTEXT "DarkBrownDirt",IDC_STATIC,357,182,47,8
LTEXT "Audio Name",IDC_CONT9,407,182,222,12,SS_SUNKEN
LTEXT "DarkRock",IDC_STATIC,370,202,34,8
LTEXT "Audio Name",IDC_CONT10,407,202,222,12,SS_SUNKEN
LTEXT "Blacktop",IDC_STATIC,375,220,29,8
LTEXT "Audio Name",IDC_CONT11,407,220,222,12,SS_SUNKEN
LTEXT "Snow",IDC_STATIC,385,240,19,8
LTEXT "Audio Name",IDC_CONT12,407,240,222,12,SS_SUNKEN
LTEXT "Wood",IDC_STATIC,384,260,20,8
LTEXT "Audio Name",IDC_CONT13,407,260,222,12,SS_SUNKEN
LTEXT "Lava",IDC_STATIC,387,279,17,8
LTEXT "Audio Name",IDC_CONT14,407,279,222,12,SS_SUNKEN
LTEXT "Glass",IDC_STATIC,386,300,18,8
LTEXT "Audio Name",IDC_CONT15,407,300,222,12,SS_SUNKEN
LTEXT "Steel",IDC_STATIC,387,322,17,8
LTEXT "Audio Name",IDC_CONT16,407,322,222,12,SS_SUNKEN
PUSHBUTTON ",,,",IDC_CONTSELECT1,633,14,15,14
PUSHBUTTON ",,,",IDC_CONTSELECT2,633,36,15,14
PUSHBUTTON ",,,",IDC_CONTSELECT3,633,57,15,14
PUSHBUTTON ",,,",IDC_CONTSELECT4,633,79,15,14
PUSHBUTTON ",,,",IDC_CONTSELECT5,633,98,15,14
PUSHBUTTON ",,,",IDC_CONTSELECT6,633,121,15,14
PUSHBUTTON ",,,",IDC_CONTSELECT7,633,141,15,14
PUSHBUTTON ",,,",IDC_CONTSELECT8,633,161,15,14
PUSHBUTTON ",,,",IDC_CONTSELECT9,633,180,15,14
PUSHBUTTON ",,,",IDC_CONTSELECT10,633,201,15,14
PUSHBUTTON ",,,",IDC_CONTSELECT11,633,219,15,14
PUSHBUTTON ",,,",IDC_CONTSELECT12,633,238,15,14
PUSHBUTTON ",,,",IDC_CONTSELECT13,633,259,15,14
PUSHBUTTON ",,,",IDC_CONTSELECT14,633,276,15,14
PUSHBUTTON ",,,",IDC_CONTSELECT15,633,300,15,14
PUSHBUTTON ",,,",IDC_CONTSELECT16,633,322,15,14
PUSHBUTTON "New Content",IDC_CONTENT,256,398,50,14
LTEXT "Us",IDC_STATIC,393,343,10,8
LTEXT "Audio Name",IDC_CONT17,408,343,222,12,SS_SUNKEN
LTEXT "Them",IDC_STATIC,384,364,19,8
LTEXT "Audio Name",IDC_CONT18,408,364,222,12,SS_SUNKEN
PUSHBUTTON ",,,",IDC_CONTSELECT17,633,341,15,14
PUSHBUTTON ",,,",IDC_CONTSELECT18,633,363,15,14
END
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "EffectEdit MFC Application\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "EffectEdit\0"
VALUE "LegalCopyright", "Copyright (C) 2000\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "EffectEdit.EXE\0"
VALUE "ProductName", "EffectEdit Application\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_ABOUTBOX, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 228
TOPMARGIN, 7
BOTTOMMARGIN, 48
END
IDD_EFFECTEDIT_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 654
TOPMARGIN, 7
BOTTOMMARGIN, 412
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_ABOUTBOX "&About EffectEdit..."
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif //_WIN32
#include "res\EffectEdit.rc2" // non-Microsoft Visual C++ edited resources
#include "afxres.rc" // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,108 @@
// EffectEditDlg.h : header file
//
#if !defined(AFX_EFFECTEDITDLG_H__E9B01106_1E1A_11D4_9155_00A0CC5275E1__INCLUDED_)
#define AFX_EFFECTEDITDLG_H__E9B01106_1E1A_11D4_9155_00A0CC5275E1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CEffectEditDlg dialog
class CEffectEditDlg : public CDialog
{
// Construction
public:
CEffectEditDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CEffectEditDlg)
enum { IDD = IDD_EFFECTEDIT_DIALOG };
CButton m_Loop;
CButton m_Fog;
CButton m_DataStartRunning;
CButton m_LockButton;
CListBox m_MasterList;
CTreeCtrl m_EffectList;
CString m_Audio;
CString m_Video;
CString m_Sound;
CString m_ContentEntry[18];
float m_MaxRange;
float m_MinRange;
float m_TransX;
float m_TransY;
float m_TransZ;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CEffectEditDlg)
public:
virtual BOOL DestroyWindow();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
bool m_Locked;
void ClearAudioDialog (void);
void ClearVideoDialog (void);
void ClearDialog (void);
void ClearEffectDialog (void);
void ClearContentDialog (void);
void HandleContentClick (int id);
void StripPathFolder (CString& path,CString& folder); // path is full at start
// Generated message map functions
//{{AFX_MSG(CEffectEditDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnSelchangedEffectlist(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnAdd();
afx_msg void OnSelchangeMasterlist();
afx_msg void OnClose();
afx_msg void OnLockcheck();
afx_msg void OnSoundselect();
afx_msg void OnDatastartrun();
afx_msg void OnSelchangingEffectlist(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnFog();
afx_msg void OnLoop();
afx_msg void OnUpdateMaxrangeedit();
afx_msg void OnUpdateMinrangeedit();
afx_msg void OnUpdateTransx();
afx_msg void OnUpdateTransy();
afx_msg void OnUpdateTransz();
afx_msg void OnContent();
afx_msg void OnContselect1();
afx_msg void OnContselect2();
afx_msg void OnContselect3();
afx_msg void OnContselect4();
afx_msg void OnContselect5();
afx_msg void OnContselect6();
afx_msg void OnContselect7();
afx_msg void OnContselect8();
afx_msg void OnContselect9();
afx_msg void OnContselect10();
afx_msg void OnContselect11();
afx_msg void OnContselect12();
afx_msg void OnContselect13();
afx_msg void OnContselect14();
afx_msg void OnContselect15();
afx_msg void OnContselect16();
afx_msg void OnContselect17();
afx_msg void OnContselect18();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_EFFECTEDITDLG_H__E9B01106_1E1A_11D4_9155_00A0CC5275E1__INCLUDED_)
@@ -0,0 +1,88 @@
========================================================================
MICROSOFT FOUNDATION CLASS LIBRARY : EffectEdit
========================================================================
AppWizard has created this EffectEdit application for you. This application
not only demonstrates the basics of using the Microsoft Foundation classes
but is also a starting point for writing your application.
This file contains a summary of what you will find in each of the files that
make up your EffectEdit application.
EffectEdit.dsp
This file (the project file) contains information at the project level and
is used to build a single project or subproject. Other users can share the
project (.dsp) file, but they should export the makefiles locally.
EffectEdit.h
This is the main header file for the application. It includes other
project specific headers (including Resource.h) and declares the
CEffectEditApp application class.
EffectEdit.cpp
This is the main application source file that contains the application
class CEffectEditApp.
EffectEdit.rc
This is a listing of all of the Microsoft Windows resources that the
program uses. It includes the icons, bitmaps, and cursors that are stored
in the RES subdirectory. This file can be directly edited in Microsoft
Visual C++.
EffectEdit.clw
This file contains information used by ClassWizard to edit existing
classes or add new classes. ClassWizard also uses this file to store
information needed to create and edit message maps and dialog data
maps and to create prototype member functions.
res\EffectEdit.ico
This is an icon file, which is used as the application's icon. This
icon is included by the main resource file EffectEdit.rc.
res\EffectEdit.rc2
This file contains resources that are not edited by Microsoft
Visual C++. You should place all resources not editable by
the resource editor in this file.
/////////////////////////////////////////////////////////////////////////////
AppWizard creates one dialog class:
EffectEditDlg.h, EffectEditDlg.cpp - the dialog
These files contain your CEffectEditDlg class. This class defines
the behavior of your application's main dialog. The dialog's
template is in EffectEdit.rc, which can be edited in Microsoft
Visual C++.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named EffectEdit.pch and a precompiled types file named StdAfx.obj.
Resource.h
This is the standard header file, which defines new resource IDs.
Microsoft Visual C++ reads and updates this file.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" to indicate parts of the source code you
should add to or customize.
If your application uses MFC in a shared DLL, and your application is
in a language other than the operating system's current language, you
will need to copy the corresponding localized resources MFC42XXX.DLL
from the Microsoft Visual C++ CD-ROM onto the system or system32 directory,
and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation.
For example, MFC42DEU.DLL contains resources translated to German.) If you
don't do this, some of the UI elements of your application will remain in the
language of the operating system.
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,8 @@
// stdafx.cpp : source file that includes just the standard includes
// EffectEdit.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
@@ -0,0 +1,26 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__E9B01108_1E1A_11D4_9155_00A0CC5275E1__INCLUDED_)
#define AFX_STDAFX_H__E9B01108_1E1A_11D4_9155_00A0CC5275E1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__E9B01108_1E1A_11D4_9155_00A0CC5275E1__INCLUDED_)
@@ -0,0 +1,135 @@
#include "stdafx.h"
#include "contents.hpp"
CString mattable[19] = {
"grass",
"water",
"concrete",
"greydirt",
"browndirt",
"rock",
"darkconcrete",
"darkgreydirt",
"darkbrowndirt",
"darkrock",
"blacktop",
"snow",
"wood",
"lava",
"glass",
"steel",
"us",
"them",
"blank"
};
CContentData::CContentData (CString& path)
{
m_Path = path;
m_Dirty = false;
}
CContentData::~CContentData (void)
{
}
void CContentData::ReadData (CString file)
{
m_File = file;
CString filename;
char *buf;
CString fred,effect,mat,str;
int index,find;
filename = m_Path;
filename += "\\";
filename += m_File;
buf = fred.GetBufferSetLength (10000);
GetPrivateProfileSection ("EffectList",buf,10000-1,(LPCTSTR) filename);
index = 0;
while (*buf)
{
str = buf;
buf += str.GetLength ()+1;
StripComment (str);
if (!str.IsEmpty ())
{
find = str.Find ('=');
ASSERT (find != -1);
str = str.Right (str.GetLength () - find-1);
find = str.Find (',');
ASSERT (find != -1);
effect = str.Left (find);
mat = str.Right (str.GetLength () - find-1);
index = FindMatIndex (mat);
ASSERT (index != -1);
effect.MakeLower ();
m_EffectName[index] = effect;
}
}
fred.ReleaseBuffer ();
}
int CContentData::FindMatIndex (CString& mat)
{
mat.MakeLower ();
int i;
for (i=0;i<18;i++)
{
if (mat == mattable[i])
return i;
}
return 18;
}
void CContentData::WriteData (void)
{
if (!m_Dirty)
return;
FILE *file;
CString filename;
filename = m_Path;
filename += "\\";
filename += m_File;
file = fopen ((LPCTSTR) filename,"w");
if (!file)
return;
fprintf (file,"[EffectList]\n");
int i;
for (i=0;i<32;i++)
{
if (mattable[i] == "blank")
continue;
fprintf (file,"Effect=%s,%s\n",m_EffectName[i],mattable[i]);
}
fclose (file);
}
void CContentData::InitialData (CString file)
{
m_File = file;
}
void CContentData::StripComment (CString& str)
{
int index;
str.TrimLeft ();
str.TrimRight ();
index = str.Find ("//");
if (index != -1)
{
str = str.Left (index);
}
}
@@ -0,0 +1,45 @@
#pragma once
#include "effectdata.hpp"
class CContentData : public CDataBase
{
private:
CString m_Path;
CString m_File;
bool m_Dirty;
CString m_EffectName[32];
void StripComment (CString& str);
public:
CContentData (CString& path);
~CContentData (void);
void ReadData (CString file);
void WriteData (void);
void InitialData (CString file);
int FindMatIndex (CString& mat);
const CString EffectName (int id) const
{
ASSERT (id >=0);
ASSERT (id < 32);
CString toret;
int index;
index = m_EffectName[id].Find ("content\\effects\\");
toret = m_EffectName[id].Right (m_EffectName[id].GetLength () - index - strlen ("content\\effects\\"));
return toret;
}
void EffectName (CString& name,int id)
{
ASSERT (id >=0);
ASSERT (id < 32);
m_Dirty = true;
name.MakeLower ();
m_EffectName[id] = name;
}
};
@@ -0,0 +1,592 @@
#include "stdafx.h"
#include "effectdata.hpp"
CEffectData::CEffectData (CString path)
{
Init ();
m_Path = path;
m_Dirty = false;
}
CEffectData::~CEffectData (void)
{
}
void CEffectData::Init (void)
{
m_VideoFileName.Empty ();
m_AudioFileName.Empty ();
m_DataFileName.Empty ();
m_Path.Empty ();
m_Class.Empty ();
m_StartRunning.Empty ();
m_Translation.Empty ();
m_RotationType.Empty ();
InitVideo ();
InitAudio ();
}
void CEffectData::InitVideo (void)
{
m_FX.Empty ();
m_VideoType.Empty ();
m_Fog.Empty ();
m_SimMode.Empty ();
m_SimExecute.Empty ();
m_VideoStatus.Empty ();
m_Locator.Empty ();
}
void CEffectData::InitAudio (void)
{
m_AudioType.Empty ();
m_Sample.Empty ();
m_Loop.Empty ();
m_MinRange.Empty ();
m_MaxRange.Empty ();
m_AudioStatus.Empty ();
m_AudioShouldExecute.Empty ();
m_AudioStartRunning.Empty ();
}
void CEffectData::InitialData (CString datafilename)
{
m_VideoFileName.Empty ();
m_AudioFileName.Empty ();
m_DataFileName = datafilename;
m_Class = "Adept::Effect";
m_StartRunning = "yes";
m_Translation = "0 0 0";
m_RotationType = "IntoMotionRotation";
InitialAudio ();
InitialVideo ();
}
void CEffectData::InitialVideo (void)
{
m_FX.Empty ();
m_VideoType = "gosFXComponent";
m_Fog = "no";
m_SimMode = "DynamicWorldSpace";
m_SimExecute = "1";
m_VideoStatus = "VideoStatus";
m_Locator = "Effect";
}
void CEffectData::InitialAudio (void)
{
m_AudioType = "AudioFXComponent";
m_Sample.Empty ();
m_Loop = "0";
m_MinRange = "0";
m_MaxRange = "0";
m_AudioStatus = "AudioStatus";
m_AudioShouldExecute = "1";
m_AudioStartRunning = "true";
}
void CEffectData::ReadData (CString datafilename)
{
ASSERT (datafilename != "");
m_DataFileName = datafilename;
CString filename;
char *buf;
filename = m_Path;
filename += "\\";
filename += m_DataFileName;
buf = m_VideoFileName.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("Renderers","VideoRenderer","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_VideoFileName.ReleaseBuffer ();
buf = m_AudioFileName.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("Renderers","AudioRenderer","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_AudioFileName.ReleaseBuffer ();
buf = m_Class.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("GameData","Class","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_Class.ReleaseBuffer ();
buf = m_StartRunning.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("GameData","StartsRunning","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_StartRunning.ReleaseBuffer ();
buf = m_RotationType.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("GameData","RotationType","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_RotationType.ReleaseBuffer ();
buf = m_Translation.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("GameData","translation","fred",buf,MAX_PATH-1,(LPCTSTR) filename);
m_Translation.ReleaseBuffer ();
ReadAudioData ();
ReadVideoData ();
}
void CEffectData::ReadAudioData (void)
{
CString filename;
char *buf;
if (m_AudioFileName.IsEmpty ())
{
m_AudioType.Empty ();
m_Sample.Empty ();
m_Loop.Empty ();
m_MinRange.Empty ();
m_MaxRange.Empty ();
m_AudioStatus.Empty ();
m_AudioShouldExecute.Empty ();
m_AudioStartRunning.Empty ();
return;
}
filename = m_Path;
filename += "\\";
filename += m_AudioFileName;
buf = m_AudioType.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("SoundEffect","Type","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_AudioType.ReleaseBuffer ();
buf = m_Sample.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("SoundEffect","Sample","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_Sample.ReleaseBuffer ();
buf = m_Loop.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("SoundEffect","Loop","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_Loop.ReleaseBuffer ();
buf = m_MinRange.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("SoundEffect","MinRange","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_MinRange.ReleaseBuffer ();
buf = m_MaxRange.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("SoundEffect","MaxRange","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_MaxRange.ReleaseBuffer ();
buf = m_AudioStatus.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("SoundEffect","Status","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_AudioStatus.ReleaseBuffer ();
buf = m_AudioShouldExecute.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("SoundEffect","RendererShouldExecute","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_AudioShouldExecute.ReleaseBuffer ();
buf = m_AudioStartRunning.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("SoundEffect","StartsRunning","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_AudioStartRunning.ReleaseBuffer ();
}
void CEffectData::ReadVideoData (void)
{
CString filename;
char *buf;
if (m_VideoFileName.IsEmpty ())
{
m_FX.Empty ();
m_VideoType.Empty ();
m_Fog.Empty ();
m_SimMode.Empty ();
m_SimExecute.Empty ();
m_VideoStatus.Empty ();
m_Locator.Empty ();
return;
}
filename = m_Path;
filename += "\\";
filename += m_VideoFileName;
buf = m_FX.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("Effect","gosFX","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_FX.ReleaseBuffer ();
buf = m_VideoType.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("Effect","Type","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_VideoType.ReleaseBuffer ();
buf = m_Fog.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("Effect","fog","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_Fog.ReleaseBuffer ();
buf = m_SimMode.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("Effect","SimulationMode","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_SimMode.ReleaseBuffer ();
buf = m_SimExecute.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("Effect","SimulationShouldExecute","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_SimExecute.ReleaseBuffer ();
buf = m_VideoStatus.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("Effect","Status","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_VideoStatus.ReleaseBuffer ();
buf = m_Locator.GetBufferSetLength (MAX_PATH);
GetPrivateProfileString ("Locator","Child","",buf,MAX_PATH-1,(LPCTSTR) filename);
m_Locator.ReleaseBuffer ();
}
void CEffectData::WriteData (void)
{
if (!m_Dirty)
return;
m_Dirty = false;
CString filename;
BOOL error;
DWORD errcode;
char *buf;
CString curdir;
buf = curdir.GetBufferSetLength (MAX_PATH);
GetCurrentDirectory (MAX_PATH-1,buf);
curdir.ReleaseBuffer ();
filename = curdir;
filename += "\\";
filename += m_Path;
filename += "\\";
filename += m_DataFileName;
if (!m_VideoFileName.IsEmpty ())
{
buf = m_VideoFileName.GetBufferSetLength (MAX_PATH);
error = WritePrivateProfileString ("Renderers","VideoRenderer",buf,(LPCTSTR) filename);
if (!error)
errcode = GetLastError ();
m_VideoFileName.ReleaseBuffer ();
}
if (!m_AudioFileName.IsEmpty ())
{
buf = m_AudioFileName.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("Renderers","AudioRenderer",buf,(LPCTSTR) filename);
m_AudioFileName.ReleaseBuffer ();
}
if (!m_Class.IsEmpty ())
{
buf = m_Class.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("GameData","Class",buf,(LPCTSTR) filename);
m_Class.ReleaseBuffer ();
}
if (!m_StartRunning.IsEmpty ())
{
buf = m_StartRunning.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("GameData","StartsRunning",buf,(LPCTSTR) filename);
m_StartRunning.ReleaseBuffer ();
}
if (!m_RotationType.IsEmpty ())
{
buf = m_RotationType.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("GameData","RotationType",buf,(LPCTSTR) filename);
m_RotationType.ReleaseBuffer ();
}
if (m_Translation != "fred")
{
buf = m_Translation.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("GameData","translation",buf,(LPCTSTR) filename);
m_Translation.ReleaseBuffer ();
}
WriteAudioData ();
WriteVideoData ();
}
void CEffectData::WriteAudioData (void)
{
CString filename;
char *buf;
if (m_AudioFileName.IsEmpty ())
{
return;
}
CString curdir;
buf = curdir.GetBufferSetLength (MAX_PATH);
GetCurrentDirectory (MAX_PATH-1,buf);
curdir.ReleaseBuffer ();
filename = curdir;
filename += "\\";
filename += m_Path;
filename += "\\";
filename += m_AudioFileName;
BOOL error;
DWORD errcode;
if (!m_AudioType.IsEmpty ())
{
buf = m_AudioType.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("SoundEffect","Type",buf,(LPCTSTR) filename);
m_AudioType.ReleaseBuffer ();
}
if (!m_Sample.IsEmpty ())
{
buf = m_Sample.GetBufferSetLength (MAX_PATH);
error = WritePrivateProfileString ("SoundEffect","Sample",buf,(LPCTSTR) filename);
if (!error)
errcode = GetLastError ();
m_Sample.ReleaseBuffer ();
}
if (!m_Loop.IsEmpty ())
{
buf = m_Loop.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("SoundEffect","Loop",buf,(LPCTSTR) filename);
m_Loop.ReleaseBuffer ();
}
if (!m_MinRange.IsEmpty ())
{
buf = m_MinRange.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("SoundEffect","MinRange",buf,(LPCTSTR) filename);
m_MinRange.ReleaseBuffer ();
}
if (!m_MaxRange.IsEmpty ())
{
buf = m_MaxRange.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("SoundEffect","MaxRange",buf,(LPCTSTR) filename);
m_MaxRange.ReleaseBuffer ();
}
if (!m_AudioStatus.IsEmpty ())
{
buf = m_AudioStatus.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("SoundEffect","Status",buf,(LPCTSTR) filename);
m_AudioStatus.ReleaseBuffer ();
}
if (!m_AudioShouldExecute.IsEmpty ())
{
buf = m_AudioShouldExecute.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("SoundEffect","RendererShouldExecute",buf,(LPCTSTR) filename);
m_AudioShouldExecute.ReleaseBuffer ();
}
if (!m_AudioStartRunning.IsEmpty ())
{
buf = m_AudioStartRunning.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("SoundEffect","StartsRunning",buf,(LPCTSTR) filename);
m_AudioStartRunning.ReleaseBuffer ();
}
}
void CEffectData::WriteVideoData (void)
{
CString filename;
char *buf;
if (m_VideoFileName.IsEmpty ())
{
return;
}
CString curdir;
buf = curdir.GetBufferSetLength (MAX_PATH);
GetCurrentDirectory (MAX_PATH-1,buf);
curdir.ReleaseBuffer ();
filename = curdir;
filename += "\\";
filename += m_Path;
filename += "\\";
filename += m_VideoFileName;
if (!m_FX.IsEmpty ())
{
buf = m_FX.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("Effect","gosFX",buf,(LPCTSTR) filename);
m_FX.ReleaseBuffer ();
}
if (!m_VideoType.IsEmpty ())
{
buf = m_VideoType.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("Effect","Type",buf,(LPCTSTR) filename);
m_VideoType.ReleaseBuffer ();
}
if (!m_Fog.IsEmpty ())
{
buf = m_Fog.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("Effect","fog",buf,(LPCTSTR) filename);
m_Fog.ReleaseBuffer ();
}
if (!m_SimMode.IsEmpty ())
{
buf = m_SimMode.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("Effect","SimulationMode",buf,(LPCTSTR) filename);
m_SimMode.ReleaseBuffer ();
}
if (!m_SimExecute.IsEmpty ())
{
buf = m_SimExecute.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("Effect","SimulationShouldExecute",buf,(LPCTSTR) filename);
m_SimExecute.ReleaseBuffer ();
}
if (!m_VideoStatus.IsEmpty ())
{
buf = m_VideoStatus.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("Effect","Status",buf,(LPCTSTR) filename);
m_VideoStatus.ReleaseBuffer ();
}
if (!m_Locator.IsEmpty ())
{
buf = m_Locator.GetBufferSetLength (MAX_PATH);
WritePrivateProfileString ("Locator","Child",buf,(LPCTSTR) filename);
m_Locator.ReleaseBuffer ();
}
}
void CEffectData::VideoFileName (const char *p1)
{
m_Dirty = true;
m_VideoFileName = p1;
}
void CEffectData::AudioFileName (const char *p1)
{
m_Dirty = true;
m_AudioFileName = p1;
}
void CEffectData::DataFileName (const char *p1)
{
m_Dirty = true;
m_DataFileName = p1;
}
void CEffectData::Path (const char *p1)
{
m_Dirty = true;
m_Path = p1;
}
void CEffectData::Class (const char *p1)
{
m_Dirty = true;
m_Class = p1;
}
void CEffectData::StartRunning (const char *p1)
{
m_Dirty = true;
m_StartRunning = p1;
}
void CEffectData::Translation (const char *p1)
{
m_Dirty = true;
m_Translation = p1;
}
void CEffectData::RotationType (const char *p1)
{
m_Dirty = true;
m_RotationType = p1;
}
// video data
void CEffectData::FX (const char *p1)
{
m_Dirty = true;
m_FX = p1;
}
void CEffectData::VideoType (const char *p1)
{
m_Dirty = true;
m_VideoType = p1;
}
void CEffectData::Fog (const char *p1)
{
m_Dirty = true;
m_Fog = p1;
}
void CEffectData::SimMode (const char *p1)
{
m_Dirty = true;
m_SimMode = p1;
}
void CEffectData::SimExecute (const char *p1)
{
m_Dirty = true;
m_SimExecute = p1;
}
void CEffectData::VideoStatus (const char *p1)
{
m_Dirty = true;
m_VideoStatus = p1;
}
void CEffectData::Locator (const char *p1)
{
m_Dirty = true;
m_Locator = p1;
}
// audio data
void CEffectData::AudioType (const char *p1)
{
m_Dirty = true;
m_AudioType = p1;
}
void CEffectData::Sample (const char *p1)
{
m_Dirty = true;
if (m_Sample.IsEmpty () && strcmp (p1,""))
{
InitialAudio ();
m_AudioFileName = m_DataFileName;
int index;
index = m_AudioFileName.ReverseFind ('.');
m_AudioFileName = m_AudioFileName.Left (index);
m_AudioFileName += ".audio";
}
m_Sample = p1;
}
void CEffectData::Loop (const char *p1)
{
m_Dirty = true;
m_Loop = p1;
}
void CEffectData::MinRange (const char *p1)
{
m_Dirty = true;
m_MinRange = p1;
}
void CEffectData::MaxRange (const char *p1)
{
m_Dirty = true;
m_MaxRange = p1;
}
void CEffectData::AudioStatus (const char *p1)
{
m_Dirty = true;
m_AudioStatus = p1;
}
void CEffectData::AudioShouldExecute (const char *p1)
{
m_Dirty = true;
m_AudioShouldExecute = p1;
}
void CEffectData::AudioStartRunning (const char *p1)
{
m_Dirty = true;
m_AudioStartRunning = p1;
}
@@ -0,0 +1,197 @@
#pragma once
class CDataBase
{
private:
int id;
public:
CDataBase (void) { }
virtual ~CDataBase (void) { }
};
class CEffectData : public CDataBase
{
private:
void ReadAudioData (void);
void ReadVideoData (void);
void WriteAudioData (void);
void WriteVideoData (void);
void InitAudio (void);
void InitVideo (void);
void InitialAudio (void);
void InitialVideo (void);
CString m_VideoFileName;
CString m_AudioFileName;
CString m_DataFileName;
CString m_Path;
CString m_Class;
CString m_StartRunning;
CString m_Translation;
CString m_RotationType;
// video data
CString m_FX;
CString m_VideoType;
CString m_Fog;
CString m_SimMode;
CString m_SimExecute;
CString m_VideoStatus;
CString m_Locator;
// audio data
CString m_AudioType;
CString m_Sample;
CString m_Loop;
CString m_MinRange;
CString m_MaxRange;
CString m_AudioStatus;
CString m_AudioShouldExecute;
CString m_AudioStartRunning;
public:
bool m_Dirty;
CEffectData (CString path);
~CEffectData (void);
void Init (void);
void InitialData (CString datafilename);
const CString VideoFileName (void) const
{
return m_VideoFileName;
}
const CString AudioFileName (void) const
{
return m_AudioFileName;
}
const CString DataFileName (void) const
{
return m_DataFileName;
}
const CString Path (void) const
{
return m_Path;
}
const CString Class (void) const
{
return m_Class;
}
const CString StartRunning (void) const
{
return m_StartRunning;
}
const CString Translation (void) const
{
return m_Translation;
}
const CString RotationType (void) const
{
return m_RotationType;
}
// video data
const CString FX (void) const
{
return m_FX;
}
const CString VideoType (void) const
{
return m_VideoType;
}
const CString Fog (void) const
{
return m_Fog;
}
const CString SimMode (void) const
{
return m_SimMode;
}
const CString SimExecute (void) const
{
return m_SimExecute;
}
const CString VideoStatus (void) const
{
return m_VideoStatus;
}
const CString Locator (void) const
{
return m_Locator;
}
// audio data
const CString AudioType (void) const
{
return m_AudioType;
}
const CString Sample (void) const
{
return m_Sample;
}
const CString Loop (void) const
{
return m_Loop;
}
const CString MinRange (void) const
{
return m_MinRange;
}
const CString MaxRange (void) const
{
return m_MaxRange;
}
const CString AudioStatus (void) const
{
return m_AudioStatus;
}
const CString AudioShouldExecute (void) const
{
return m_AudioShouldExecute;
}
const CString AudioStartRunning (void) const
{
return m_AudioStartRunning;
}
void VideoFileName (const char *p1);
void AudioFileName (const char *p1);
void DataFileName (const char *p1);
void Path (const char *p1);
void Class (const char *p1);
void StartRunning (const char *p1);
void Translation (const char *p1);
void RotationType (const char *p1);
// video data
void FX (const char *p1);
void VideoType (const char *p1);
void Fog (const char *p1);
void SimMode (const char *p1);
void SimExecute (const char *p1);
void VideoStatus (const char *p1);
void Locator (const char *p1);
// audio data
void AudioType (const char *p1);
void Sample (const char *p1);
void Loop (const char *p1);
void MinRange (const char *p1);
void MaxRange (const char *p1);
void AudioStatus (const char *p1);
void AudioShouldExecute (const char *p1);
void AudioStartRunning (const char *p1);
void ReadData (CString datafilename);
void WriteData (void);
};
@@ -0,0 +1,207 @@
#include "stdafx.h"
#include "effectdata.hpp"
#include "contents.hpp"
void AddEffectDirectory (CTreeCtrl& EffectList,WIN32_FIND_DATA* dirdata,HTREEITEM parent);
void AddEffectList (CTreeCtrl& EffectList)
{
WIN32_FIND_DATA data;
HANDLE findhandle;
CString name;
findhandle = FindFirstFile ("content\\effects\\*.*",&data);
if (findhandle != INVALID_HANDLE_VALUE)
{
do
{
if (data.cFileName[0] == '.')
continue;
if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
HTREEITEM tree;
tree = EffectList.InsertItem (data.cFileName);
EffectList.SetItemData (tree,(DWORD) 0);
AddEffectDirectory (EffectList,&data,tree);
EffectList.Expand (tree,TVE_EXPAND);
}
}
while (FindNextFile (findhandle,&data));
}
}
void AddEffectDirectory (CTreeCtrl& EffectList,WIN32_FIND_DATA* dirdata,HTREEITEM parent)
{
HANDLE findhandle;
WIN32_FIND_DATA data;
CString name,file,path;
CEffectData *effdata;
CContentData *contdata;
name = "content\\effects\\";
name += dirdata->cFileName;
path = name;
name += "\\*.data";
findhandle = FindFirstFile (name,&data);
if (findhandle != INVALID_HANDLE_VALUE)
{
do
{
HTREEITEM item;
item = EffectList.InsertItem (data.cFileName,parent);
file = path;
effdata = new CEffectData (path);
file += "\\";
file += data.cFileName;
effdata->ReadData (data.cFileName);
EffectList.SetItemData (item,(DWORD) effdata);
} while (FindNextFile (findhandle,&data) );
}
name = "content\\effects\\";
name += dirdata->cFileName;
path = name;
name += "\\*.contents";
findhandle = FindFirstFile (name,&data);
if (findhandle != INVALID_HANDLE_VALUE)
{
do
{
HTREEITEM item;
item = EffectList.InsertItem (data.cFileName,parent);
file = path;
contdata = new CContentData (path);
file += "\\";
file += data.cFileName;
contdata->ReadData (data.cFileName);
EffectList.SetItemData (item,(DWORD) contdata);
} while (FindNextFile (findhandle,&data) );
}
}
void KillEffectListHelper (CTreeCtrl &EffectList,HTREEITEM root)
{
CDataBase *data;
CEffectData *effdata;
CContentData *contdata;
HTREEITEM item;
item = EffectList.GetChildItem (root);
if (item == NULL)
return;
do
{
if (EffectList.ItemHasChildren (item))
{
KillEffectListHelper (EffectList,item);
}
data = (CDataBase *) EffectList.GetItemData (item);
effdata = dynamic_cast<CEffectData *> (data);
contdata = dynamic_cast<CContentData *> (data);
if (effdata)
effdata->WriteData ();
else if (contdata)
contdata->WriteData ();
delete data;
EffectList.SetItemData (item,0);
item = EffectList.GetNextSiblingItem (item);
}
while (item);
}
void KillEffectList (CTreeCtrl &EffectList)
{
HTREEITEM root;
CDataBase *data;
CEffectData *effdata;
CContentData *contdata;
root = EffectList.GetRootItem ();
if (root == NULL)
return;
do
{
if (EffectList.ItemHasChildren (root))
{
KillEffectListHelper (EffectList,root);
}
data = (CDataBase *) EffectList.GetItemData (root);
effdata = dynamic_cast<CEffectData *> (data);
contdata = dynamic_cast<CContentData *> (data);
if (effdata)
effdata->WriteData ();
else if (contdata)
contdata->WriteData ();
EffectList.SetItemData (root,0);
root = EffectList.GetNextSiblingItem (root);
}
while (root);
}
HTREEITEM InsertEffectFolder (CString& foldername,CTreeCtrl& EffectList)
{
HTREEITEM root;
foldername.MakeLower ();
root = EffectList.GetRootItem ();
if (root == NULL)
return NULL;
do
{
CString text;
text = EffectList.GetItemText (root);
text.MakeLower ();
if (text == foldername)
{
return root;
}
root = EffectList.GetNextSiblingItem (root);
}
while (root);
root = EffectList.InsertItem (foldername);
return root;
}
HTREEITEM InsertEffectItem (CString& itemname,CTreeCtrl& EffectList,HTREEITEM root)
{
HTREEITEM item;
item = EffectList.GetChildItem (root);
if (item != NULL)
{
do
{
if (EffectList.GetItemText (item) == itemname)
return item;
item = EffectList.GetNextSiblingItem (item);
}
while (item);
}
item = EffectList.InsertItem (itemname,root);
return item;
}
bool CheckEffectItem (CString& itemname,CTreeCtrl& EffectList,HTREEITEM root)
{
HTREEITEM item;
itemname.MakeLower ();
item = EffectList.GetChildItem (root);
if (item != NULL)
{
do
{
CString text;
text = EffectList.GetItemText (item);
text.MakeLower ();
if (text == itemname)
return true;
item = EffectList.GetNextSiblingItem (item);
}
while (item);
}
return false;
}
@@ -0,0 +1,49 @@
#include "stdafx.h"
void AddMasterList (CListBox& MasterList)
{
FILE *file;
int data,version,len,i;
file = fopen ("content\\effects\\mw.effects","rb");
if (!file)
{
MessageBox (NULL,"No mw.effects file found","Error",MB_OK);
return;
}
fread (&data,sizeof (int),1,file);
ASSERT (data == 'GFX#');
fread (&version,sizeof (int),1,file);
if (version < 21)
{
MessageBox (NULL,"Unable to handle old version of mw.effects","Error",MB_OK);
return;
}
fread (&len,sizeof (int),1,file); // read len
for (i=0;i<len;i++)
{
CString name;
size_t strlen;
char *buf;
fread (&strlen,sizeof (size_t),1,file);
if (strlen > 0)
{
buf = name.GetBufferSetLength (strlen+5);
fread (buf,strlen+1,1,file);
name.ReleaseBuffer ();
if (name != "")
MasterList.AddString (name);
}
}
fclose (file);
}
void KillMasterList (CListBox& MasterList)
{
}
Binary file not shown.
@@ -0,0 +1,13 @@
//
// EFFECTEDIT.RC2 - resources Microsoft Visual C++ does not edit directly
//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// Add manually edited resources here...
/////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,93 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by EffectEdit.rc
//
#define IDM_ABOUTBOX 0x0010
#define IDD_ABOUTBOX 100
#define IDS_ABOUTBOX 101
#define IDD_EFFECTEDIT_DIALOG 102
#define IDR_MAINFRAME 128
#define IDC_EFFECTLIST 1000
#define IDC_ADD 1001
#define IDC_MASTERLIST 1002
#define IDC_AUDIO 1003
#define IDC_VIDEO 1004
#define IDC_MISC1 1005
#define IDC_AUDIOLIST 1005
#define IDC_CONT1 1005
#define IDC_MISC2 1006
#define IDC_CONT2 1006
#define IDC_CONT3 1007
#define IDC_AUDIOSELECT 1008
#define IDC_CONT4 1008
#define IDC_VIDEOSELECT 1009
#define IDC_SOUNDSELECT 1009
#define IDC_MISC1SELECT 1010
#define IDC_MISC2SELECT 1011
#define IDC_LOCKCHECK 1011
#define IDC_SOUND 1012
#define IDC_DATASTARTRUN 1013
#define IDC_CHECK2 1014
#define IDC_CONT5 1014
#define IDC_CHECK3 1015
#define IDC_FOG 1015
#define IDC_CHECK4 1016
#define IDC_LOOP 1016
#define IDC_EDIT1 1017
#define IDC_MINRANGEEDIT 1017
#define IDC_EDIT2 1018
#define IDC_MAXRANGEEDIT 1018
#define IDC_AUDIOSHOULDEXE 1019
#define IDC_CONT6 1019
#define IDC_AUDIOSTARTRUN 1020
#define IDC_MINSPIN 1021
#define IDC_MAXRANGE 1022
#define IDC_MAXSPIN 1022
#define IDC_TRANSX 1023
#define IDC_XSPIN 1024
#define IDC_TRANSY 1025
#define IDC_YSPIN 1026
#define IDC_TRANSZ 1027
#define IDC_ZSPIN 1028
#define IDC_CONT7 1029
#define IDC_CONT8 1030
#define IDC_CONT9 1031
#define IDC_CONT10 1032
#define IDC_CONT11 1033
#define IDC_CONT12 1034
#define IDC_CONT13 1035
#define IDC_CONT14 1036
#define IDC_CONT15 1037
#define IDC_CONT16 1038
#define IDC_CONTENT 1039
#define IDC_CONTSELECT1 1040
#define IDC_CONTSELECT2 1041
#define IDC_CONTSELECT3 1042
#define IDC_CONTSELECT4 1043
#define IDC_CONTSELECT5 1044
#define IDC_CONTSELECT6 1045
#define IDC_CONTSELECT7 1046
#define IDC_CONTSELECT8 1047
#define IDC_CONTSELECT9 1048
#define IDC_CONTSELECT10 1049
#define IDC_CONTSELECT11 1050
#define IDC_CONTSELECT12 1051
#define IDC_CONTSELECT13 1052
#define IDC_CONTSELECT14 1053
#define IDC_CONTSELECT15 1054
#define IDC_CONTSELECT16 1055
#define IDC_CONT17 1056
#define IDC_CONT18 1057
#define IDC_CONTSELECT17 1072
#define IDC_CONTSELECT18 1073
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1040
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif