Add rayman2 source files

This commit is contained in:
2024-09-18 02:33:44 +08:00
parent bcc093f8ed
commit fb036c54fd
14339 changed files with 2596224 additions and 0 deletions

View File

@@ -0,0 +1,144 @@
# Microsoft Developer Studio Project File - Name="OPD" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=OPD - Win32 Debug Glide with Editors
!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 "OPD.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 "OPD.mak" CFG="OPD - Win32 Debug Glide with Editors"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "OPD - Win32 Debug Glide with Editors" (based on\
"Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""$/CPA/TempGrp/OPD", PDGAAAAA"
# PROP Scc_LocalPath "."
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug Glide with Editors"
# PROP BASE Intermediate_Dir "Debug Glide with Editors"
# PROP BASE Target_Dir ""
# PROP Use_MFC 2
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "x:\CPA\EXE\main\EDT_Data\OBJECTS"
# PROP Intermediate_Dir "Tmp\OPDDFEvd"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /Z7 /Od /I "X:\CPA\Public" /I "inc" /I "res" /D "CPA_WANTS_IMPORT" /D "ACTIVE_EDITOR" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CPA_VISUAL" /D "CPA_DEBUG" /D "_WINDLL" /D "_AFXDLL" /D "USE_ALTIMAPS" /YX /FD /c
# SUBTRACT CPP /Fr
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x40c /d "_DEBUG"
# ADD RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /def:"src\PO_DLL.def" /out:"X:\CPA\EXE\Main\EDT_Data\OBJECTS\OPDDFEvd.dll" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
# Begin Target
# Name "OPD - Win32 Debug Glide with Editors"
# Begin Group "Source Files"
# PROP Default_Filter "cpp"
# Begin Source File
SOURCE=.\src\dllcom.cpp
# End Source File
# Begin Source File
SOURCE=.\src\EditorPO.cpp
# End Source File
# Begin Source File
SOURCE=.\src\PO_DLL.def
# End Source File
# Begin Source File
SOURCE=.\src\PO_Inter.cpp
# End Source File
# Begin Source File
SOURCE=.\src\podialog.cpp
# End Source File
# Begin Source File
SOURCE=.\src\StdAfx.cpp
# End Source File
# End Group
# Begin Group "Include Files"
# PROP Default_Filter "hpp,h"
# Begin Source File
SOURCE=..\..\Public\OPD\EditorPO.hpp
# End Source File
# Begin Source File
SOURCE=..\..\Public\OPD\PO_Inter.hpp
# End Source File
# Begin Source File
SOURCE=.\inc\podialog.h
# End Source File
# Begin Source File
SOURCE=.\inc\StdAfx.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\res\bitmap1.bmp
# End Source File
# Begin Source File
SOURCE=.\res\opd_dlgb.ico
# End Source File
# Begin Source File
SOURCE=.\res\PO_DLL.rc
# End Source File
# Begin Source File
SOURCE=.\res\PO_res.h
# End Source File
# End Group
# Begin Group "others"
# PROP Default_Filter ""
# End Group
# Begin Group "libs debug"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Exe\Main\MaiDFEvd.lib
# End Source File
# Begin Source File
SOURCE=..\..\Exe\Main\EDT_Data\Objects\OGDDFEvd.lib
# End Source File
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,196 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="OPD"
ProjectGUID="{469AD862-A0C7-47A3-BF91-E1555CB4DC5B}"
SccProjectName="&quot;$/CPA/TempGrp/OPD&quot;, PDGAAAAA"
SccAuxPath=""
SccLocalPath="."
SccProvider="MSSCCI:NXN alienbrain"
Keyword="MFCProj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug Glide with Editors|Win32"
OutputDirectory="x:\CPA\EXE\main\EDT_Data\OBJECTS"
IntermediateDirectory=".\Tmp\OPDDFEvd"
ConfigurationType="2"
UseOfMFC="2"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="X:\CPA\Public,inc,res"
PreprocessorDefinitions="CPA_WANTS_IMPORT;ACTIVE_EDITOR;WIN32;_DEBUG;_WINDOWS;CPA_VISUAL;CPA_DEBUG;USE_ALTIMAPS"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Tmp\OPDDFEvd/OPD.pch"
AssemblerListingLocation=".\Tmp\OPDDFEvd/"
ObjectFile=".\Tmp\OPDDFEvd/"
ProgramDataBaseFileName=".\Tmp\OPDDFEvd/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="1"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="maidfevd.lib ogddfevd.lib"
OutputFile="X:\CPA\EXE\Main\EDT_Data\OBJECTS\OPDDFEvd.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="X:\cpa\exe\main\edt_data\objects;X:\cpa\exe\main\edt_data;X:\cpa\exe\main;X:\cpa\libd"
IgnoreDefaultLibraryNames=""
ModuleDefinitionFile=".\src\PO_DLL.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="x:\CPA\EXE\main\EDT_Data\OBJECTS/OPDDFEvd.pdb"
SubSystem="2"
ImportLibrary="x:\CPA\EXE\main\EDT_Data\OBJECTS/OPDDFEvd.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName="x:\CPA\EXE\main\EDT_Data\OBJECTS/OPD.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1036"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp">
<File
RelativePath="src\dllcom.cpp">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="src\EditorPO.cpp">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="src\PO_DLL.def">
</File>
<File
RelativePath="src\PO_Inter.cpp">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="src\podialog.cpp">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="src\StdAfx.cpp">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Include Files"
Filter="hpp,h">
<File
RelativePath="..\..\Public\OPD\EditorPO.hpp">
</File>
<File
RelativePath="..\..\Public\OPD\PO_Inter.hpp">
</File>
<File
RelativePath="inc\podialog.h">
</File>
<File
RelativePath="inc\StdAfx.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="">
<File
RelativePath="res\bitmap1.bmp">
</File>
<File
RelativePath="res\opd_dlgb.ico">
</File>
<File
RelativePath="res\PO_DLL.rc">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
AdditionalIncludeDirectories="res"/>
</FileConfiguration>
</File>
<File
RelativePath="res\PO_res.h">
</File>
</Filter>
<Filter
Name="others"
Filter="">
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

Binary file not shown.

View File

@@ -0,0 +1,18 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#ifndef __STDAAFX_H__
#define __STDAAFX_H__
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows 95 Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#endif //__STDAAFX_H__

View File

@@ -0,0 +1,209 @@
/*
=======================================================================================
Name : podialog.h
Author : vincent lhullier Date :26/08/97
Description : header file for dialog boxes used by po editor
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef __PODIALOG_HPP__
#define __PODIALOG_HPP__
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef __AFXEXT_H__
#include <afxext.h>
#endif
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "ACP_base.h"
#include "GLI.h"
#include "PO_Res.h"
//#include "PRJ.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
class FRMBase;
class POInterface;
class EditorPO;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
=======================================================================================
CPOVseModif
=======================================================================================
=======================================================================================
*/
class CPOVseModif : public CPA_Modif
{
private:
EditorPO *m_p_oPO;
GEO_tdxHandleToVisualSet m_hVisualSet;
ACP_tdxIndex m_xNbModifs;
ACP_tdxIndex *m_d_xIndex;
MTH_tdxReal *m_d_xDiff;
public:
/* ==> creation */
CPOVseModif( EditorPO *_p_oPO, GEO_tdxHandleToVisualSet _hVSE, ACP_tdxIndex _xNbModifs );
~CPOVseModif(void);
/* ==> actions */
BOOL Do(void);
BOOL Undo(void);
/* ==> functions */
void m_fn_vSetDiff( ACP_tdxIndex _xLod, MTH_tdxReal _xDiff );
};
/*
=======================================================================================
=======================================================================================
CPODlgVse Formview class
=======================================================================================
=======================================================================================
*/
class CPODlgVse : public CFormView
{
protected:
POInterface *m_p_oParentDLL;
EditorPO *m_p_oPO;
GEO_tdxHandleToVisualSet m_hVisualSet;
PCS_tdxHandleToPhysicalCollSet m_hCollSet;
ACP_tdxIndex m_xNbLods;
MTH_tdxReal m_a_xTresholds[10];
ACP_tdxHandleOfObject m_a_xGeometrics[10];
ACP_tdxIndex m_xCurrentLod;
ACP_tdxIndex m_xSwapLod;
public:
CPODlgVse(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CPODlgVse)
void m_fn_vShowVisualSet( GEO_tdxHandleToVisualSet hVisualSet );
void m_fn_vInitVisualSetData( GEO_tdxHandleToVisualSet hVisualSet );
void m_fn_vShowCurrentLod( void );
void m_fn_vShowCollideSet( PCS_tdxHandleToPhysicalCollSet hCollSet );
void m_fn_vChangeTreshold( ACP_tdxIndex _xIndex, MTH_tdxReal _xValue);
ACP_tdxIndex m_fn_xGetClickedLodIndex( void );
void m_fn_vSwapLOD( ACP_tdxIndex _xLod, BOOL _bRestore, BOOL _bRedraw );
void fn_vUpdateInfo(EditorPO *_p_oPO);
void fn_vSetParentDLL(POInterface *_p_oParentDLL) { m_p_oParentDLL = _p_oParentDLL ; }
//{{AFX_DATA(CPODlgVse)
enum { IDD = IDD_DIALOG_PHYSICALOBJECT };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPODlgVse)
public:
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
//}}AFX_VIRTUAL
// Implementation
protected:
virtual ~CPODlgVse();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
//{{AFX_MSG(CPODlgVse)
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
afx_msg void OnDeltaposSpinCurrentlod(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnKillfocusEditCurrentlod();
afx_msg void OnDeltaposSpinFrom(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDeltaposSpinTo(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnKillfocusEditFrom();
afx_msg void OnKillfocusEditTo();
afx_msg void OnButtonApply();
afx_msg void OnButtonTreshold();
afx_msg void OnDoubleclickedButtonTreshold();
afx_msg void OnDestroy();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/*
=======================================================================================
=======================================================================================
CPODlgList Form view class
=======================================================================================
=======================================================================================
*/
class CPODlgList : public CFormView
{
private:
POInterface *m_p_oParentDLL;
HTREEITEM m_hWorldItem;
HTREEITEM m_hModelItem;
HTREEITEM m_hObjectTable;
HTREEITEM m_hWithoutActor;
public:
CPODlgList(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CPODlgList)
void fn_vSetParentDLL(POInterface *_p_oParentDLL) { m_p_oParentDLL = _p_oParentDLL; }
HTREEITEM fn_hSearchTreeChild( CTreeCtrl *_p_oTree, HTREEITEM _hParent, CString _cstrName );
HTREEITEM fn_hSearchTreeChild( CTreeCtrl *_p_oTree, HTREEITEM _hParent, DWORD _dwData );
HTREEITEM fn_hGetPOParentItem( CTreeCtrl *_p_oTree, EditorPO *_p_oPO );
void fn_vRefreshListContent( void );
void fn_vSetCurrentItem( EditorPO *_p_oPO, CPA_BaseObject *_p_oActor );
// Form Data
public:
//{{AFX_DATA(CPODlgList)
enum { IDD = IDD_DIALOGPOLIST };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPODlgList)
public:
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
//}}AFX_VIRTUAL
// Implementation
protected:
virtual ~CPODlgList();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
//{{AFX_MSG(CPODlgList)
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnSelchangedTreePos(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDestroy();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#endif __PODIALOG_H__
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

View File

@@ -0,0 +1,5 @@
SCC = This is a source code control file
[OPD.vcproj]
SCC_Aux_Path = "P4SCC#srvperforce-ma:1666##raymandata##Editor"
SCC_Project_Name = Perforce Project

View File

@@ -0,0 +1,175 @@
//Microsoft Developer Studio generated resource script.
//
#include "PO_res.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
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_SECTION_PATH "x"
IDS_GEOMETRIC_SECTION_NAME "it\\it.mod^Geometric:"
IDS_EPOFILENAME "\\IT\\IT.GEO"
IDS_MAINSECTION "MAIN"
IDS_BASE_PATH "X:\\CPA\\EXE\\MAIN\\"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// French (France) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_DIALOG_PHYSICALOBJECT DIALOGEX 0, 0, 125, 165
STYLE DS_3DLOOK | WS_CHILD
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
GROUPBOX "Visual Set",IDC_STATIC,4,7,115,151
LTEXT "Number of LODS",IDC_STATIC_NBLODS,40,25,70,8
EDITTEXT IDC_EDIT_NBLODS,70,40,40,14,ES_AUTOHSCROLL | ES_READONLY,
WS_EX_RIGHT
CONTROL "",IDC_BUTTON_TRESHOLD,"Button",BS_OWNERDRAW |
WS_TABSTOP,7,19,26,137
GROUPBOX "Current LOD",IDC_STATIC_CURRENTLOD,40,68,70,58
LTEXT "Index",IDC_STATIC_CURLOD,45,80,18,8
EDITTEXT IDC_EDIT_CURRENTLOD,65,78,25,12,ES_AUTOHSCROLL |
ES_READONLY
CONTROL "Spin1",IDC_SPIN_CURRENTLOD,"msctls_updown32",
UDS_ARROWKEYS | UDS_HORZ,90,78,16,12
LTEXT "From",IDC_STATIC_FROM,45,95,16,8
EDITTEXT IDC_EDIT_FROM,65,93,25,12,ES_AUTOHSCROLL
CONTROL "Spin1",IDC_SPIN_FROM,"msctls_updown32",UDS_ARROWKEYS |
UDS_HORZ,90,93,16,12
EDITTEXT IDC_EDIT_TO,65,108,25,12,ES_AUTOHSCROLL
CONTROL "Spin1",IDC_SPIN_TO,"msctls_updown32",UDS_ARROWKEYS |
UDS_HORZ,90,108,16,12
LTEXT "To",IDC_STATIC_TO,45,110,10,8
PUSHBUTTON "Apply",IDC_BUTTON_APPLY,49,135,50,14
END
IDD_DIALOGPOLIST DIALOG DISCARDABLE 0, 0, 125, 100
STYLE DS_3DLOOK | WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "Tree1",IDC_TREE_PO,"SysTreeView32",TVS_HASBUTTONS |
TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP |
TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,111,86
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_DIALOG_PHYSICALOBJECT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 118
TOPMARGIN, 7
BOTTOMMARGIN, 158
END
IDD_DIALOGPOLIST, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 118
TOPMARGIN, 7
BOTTOMMARGIN, 93
END
END
#endif // APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"PO_res.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_BITMAP_INFINI BITMAP DISCARDABLE "bitmap1.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_OPD_DLGBAR_ICON ICON DISCARDABLE "opd_dlgb.ico"
#endif // French (France) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,58 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by PO_DLL.rc
//
#define IDS_SECTION_PATH 1
#define IDS_GEOMETRIC_SECTION_NAME 2
#define IDS_EPOFILENAME 3
#define IDS_MAINSECTION 4
#define IDS_BASE_PATH 5
#define IDM_EXIT 101
#define IDM_EDIT 102
#define IDD_DLGCARACT 153
#define IDD_DIALOG_PHYSICALOBJECT 155
#define IDB_BITMAP_INFINI 156
#define IDD_DIALOGPOLIST 157
#define IDI_OPD_DLGBAR_ICON 158
#define IDC_STATIC_NBPOINTS 1018
#define IDC_STATIC_NBEDGES 1019
#define IDC_STATIC_NBINDEXEDTRIANGLE 1022
#define IDC_STATIC_NBFACEMAP 1023
#define IDC_STATIC_NBSPRITES 1024
#define IDC_STATIC_NBTMESHES 1025
#define IDC_STATIC_NBXLINES 1026
#define IDC_STATIC_NBXPOINTS 1027
#define IDC_STATIC_NBSPHERES 1028
#define IDC_STATIC_NBALIGNEDBOX 1029
#define IDC_ELEMENTS 1031
#define IDC_EDIT_NAME 1032
#define IDC_BT_GO 1033
#define IDC_EDIT_NBLODS 1036
#define IDC_BUTTON_TRESHOLD 1037
#define IDC_EDIT_CURRENTLOD 1038
#define IDC_SPIN_CURRENTLOD 1039
#define IDC_EDIT_FROM 1040
#define IDC_SPIN_FROM 1041
#define IDC_EDIT_TO 1042
#define IDC_SPIN_TO 1043
#define IDC_STATIC_CURRENTLOD 1044
#define IDC_STATIC_CURLOD 1045
#define IDC_STATIC_FROM 1046
#define IDC_STATIC_TO 1047
#define IDC_BUTTON_ADDLOD 1048
#define IDC_STATIC_GEOM 1049
#define IDC_COMBO_GEOMETRIC 1051
#define IDC_BUTTON_APPLY 1052
#define IDC_TREE_PO 1054
#define IDC_STATIC_NBLODS 1055
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 159
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1057
#define _APS_NEXT_SYMED_VALUE 103
#endif
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

@@ -0,0 +1,972 @@
/*
*=======================================================================================
* Name :EditorPO.cpp
*
* Author :Vincent Lhullier Date :09/04/97
*
* Description :implement member function of EditorPO object
*=======================================================================================
* Modification -> Author : Date :
* Description :
*=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include "acp_base.h"
#include "ITF.h"
#include "vig.h"
#include "DPT.h"
#include "incGLI.h"
#include "incOPD.h"
#include "OZO.h"
#include "x:\Cpa\Main\inc\_EditId.h"
//ROMTEAM WorldEditor (Cristian Stegaru 12/97)
#include "ogd.h"
#include "po\postruc.h"
#include "PO_res.h"
#include "x:\cpa\tempgrp\gliGLOU\MULTIDRV\inc\visus_st.h"
#include "DPT.h"
//ENDROMTEAM WorldEditor (Cristian Stegaru)
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
DeclareTemplateStatic(PO_tdxHandleToPhysicalObject);
/*
=======================================================================================
CALLBACK (not class functions)
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : callback to save Physical Collide Set
p_stFile -> file
p_szSectionName -> section name
p_vData -> pointeur on data
eAction -> notification action
----------------------------------------------------------------------------------------
*/
void CallBackSaveCollideSet( SCR_tdst_File_Description *p_stFile, char *p_szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction)
{
EditorPO *p_oPO = (EditorPO *) p_vData;
switch (eAction)
{
case SCR_EA_Ntfy_AddSection:
case SCR_EA_Ntfy_RebuildSection:
//p_oPO->fn_vSectionSaved();
p_oPO->fn_p_oGetPCSSection()->fn_vSectionSaved();
{
char cZone;
static char *szZoneName[] = {"ZDD", "ZDM", "ZDE", "ZDR" };
/*
* save beginning of section
*/
char szName[SCR_CV_ui_Cfg_MaxLenName];
char szActionName[SCR_CV_ui_Cfg_MaxLenName];
char szSectionName[SCR_CV_ui_Cfg_MaxLenName];
SCR_fn_v_RdL0_SplitSectionName(p_szSectionName, NULL, szActionName, szName); // Remove the
SCR_fn_v_RdL0_ComputeSectionName(szSectionName, NULL, szActionName, szName); // file name
SCR_M_SvL0_SaveBeginSection(p_stFile, szSectionName, SCR_CC_C_Cfg_EOL);
for (cZone = 0; cZone < 4; cZone ++)
{
CPA_SaveObject * pObjectToSave = NULL;
if (p_oPO->GetZone( cZone ))
{
pObjectToSave = (CPA_SaveObject *) p_oPO->GetZone( cZone );
if (pObjectToSave -> fn_bIsOfType (C_szPhysicalObjectTypeName))
pObjectToSave = (CPA_SaveObject *) ((EditorPO *) pObjectToSave) -> m_fnp_oGetGeometricWithDistance (0);
}
if (pObjectToSave)
{
SCR_M_SvL0_SaveEntry(p_stFile, szZoneName[ cZone ], SCR_CC_C_Cfg_NoChar);
SCR_fn_v_SvL0_SaveParameters_MP
(
p_stFile,
SCR_EF_SvL0_Normal,
1,
pObjectToSave->GetReferencedSectionName()
);
}
}
/*
* save end of section
*/
SCR_M_SvL0_SaveEndSection(p_stFile, SCR_CC_C_Cfg_EOL);
}
break;
case SCR_EA_Ntfy_DeleteSection:
//p_oPO->fn_vSectionDeleted();
p_oPO->fn_p_oGetPCSSection()->fn_vSectionDeleted();
break;
}
}
/*
----------------------------------------------------------------------------------------
Description : script callback function to save Vse Section
p_stFile -> file info
p_szSectionName -> section name
p_vData -> pointer on data ( a visual set object handle )
eAction -> notify action
----------------------------------------------------------------------------------------
*/
void CallBackSaveVisualSet( SCR_tdst_File_Description *p_stFile, char *p_szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction)
{
EditorPO *p_oPO = (EditorPO *) p_vData;
switch (eAction)
{
case SCR_EA_Ntfy_AddSection:
case SCR_EA_Ntfy_RebuildSection:
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
char *p_cCur, szString[20];
PO_tdxHandleToPhysicalObject hPO;
GEO_tdxHandleToVisualSet hVse;
ACP_tdxIndex xNbLods, xLod;
MTH_tdxReal xThreshold;
ACP_tdxHandleOfObject xGeom;
SCR_tdst_Link_Table *p_stGeomLinkTable;
SCR_tdst_Link_Value *p_stGeomLinkValue;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
hPO = p_oPO->GetStruct();
hVse = PO_fn_hGetVisualSet( hPO );
xNbLods = (ACP_tdxIndex) GLI_lGetVisualSetNumbertOfLOD( hVse );
/*
* write section name and number of lods
*/
p_cCur = strrchr( p_szSectionName, '^');
if (p_cCur == NULL)
p_cCur = p_szSectionName;
else
p_cCur++;
SCR_M_SvL0_SaveBeginSection(p_stFile, p_cCur, SCR_CC_C_Cfg_NoChar);
SCR_fn_v_SvL0_SaveParameters_MP( p_stFile, SCR_EF_SvL0_Scanf, 2, "%d", xNbLods );
/*
* save now each sub section that correspond to each LOD
*/
p_stGeomLinkTable = GLI_p_stGetLinkTableOfGeometric();
for (xLod = 0; xLod < xNbLods; xLod ++)
{
GLI_vGetVisualSetLOD( hVse, xLod, &xThreshold, &xGeom );
sprintf( szString, "LOD:%d", xLod + 1);
SCR_M_SvL0_SaveBeginSection(p_stFile, szString, SCR_CC_C_Cfg_EOL);
SCR_M_SvL0_SaveEntry( p_stFile, "LOD_Treshold", SCR_CC_C_Cfg_NoChar );
SCR_fn_v_SvL0_SaveParameters_MP( p_stFile, SCR_EF_SvL0_Scanf, 2, "%g", xThreshold );
p_stGeomLinkValue = SCR_fnp_st_Link_SearchValue( p_stGeomLinkTable, (unsigned long) xGeom );
if (p_stGeomLinkValue != NULL)
{
p_cCur = SCR_M_p_sz_Link_GetKey( p_stGeomLinkValue ) + SCR_M_ul_Link_GetAdditionalLong( p_stGeomLinkValue, 1 );
SCR_M_SvL0_SaveEntry( p_stFile, "FichierMod", SCR_CC_C_Cfg_NoChar );
SCR_fn_v_SvL0_SaveParameters_MP( p_stFile, SCR_EF_SvL0_Scanf, 2, "%s", p_cCur );
}
//ROMTEAM WorldEditor (Cristian Stegaru 12/97)
else if (p_oPO->IsCandidatePO ())
{
ASSERT (NULL != p_oPO->m_pOrigGeom);
p_cCur = (char*)(LPCSTR)p_oPO->m_pOrigGeom->GetReferencedSectionName ();
SCR_M_SvL0_SaveEntry( p_stFile, "FichierMod", SCR_CC_C_Cfg_NoChar );
SCR_fn_v_SvL0_SaveParameters_MP( p_stFile, SCR_EF_SvL0_Scanf, 2, "%s", p_cCur );
}
//ENDROMTEAM WorldEditor (Cristian Stegaru)
SCR_M_SvL0_SaveEndSection(p_stFile, SCR_CC_C_Cfg_EOL);
}
/*
* save end of section
*/
SCR_M_SvL0_SaveEndSection(p_stFile, SCR_CC_C_Cfg_EOL);
p_oPO->fn_p_oGetVSESection()->fn_vSectionSaved();
}
break;
case SCR_EA_Ntfy_DeleteSection:
p_oPO->fn_p_oGetPCSSection()->fn_vSectionDeleted();
break;
}
}
/*
----------------------------------------------------------------------------------------
Description : script callback function to save Po Section
p_stFile -> file info
p_szSectionName -> section name
p_vData -> pointer on data ( a visual set object handle )
eAction -> notify action
----------------------------------------------------------------------------------------
*/
void CallBackSavePhysicalObject( SCR_tdst_File_Description *p_stFile, char *p_szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction)
{
//ROMTEAM WorldEditor (Cristian Stegaru 16/01/98)
EditorPO *p_oPO = (EditorPO *) p_vData;
switch (eAction)
{
case SCR_EA_Ntfy_AddSection:
case SCR_EA_Ntfy_RebuildSection:
{
p_oPO->fn_vSectionSaved();
/*
* save beginning of section
*/
char szName[SCR_CV_ui_Cfg_MaxLenName];
char szActionName[SCR_CV_ui_Cfg_MaxLenName];
char szSectionName[SCR_CV_ui_Cfg_MaxLenName];
SCR_fn_v_RdL0_SplitSectionName(p_szSectionName, NULL, szActionName, szName); // Remove the
SCR_fn_v_RdL0_ComputeSectionName(szSectionName, NULL, szActionName, szName); // file name
SCR_M_SvL0_SaveBeginSection(p_stFile, szSectionName, SCR_CC_C_Cfg_EOL);
p_oPO->fn_vComputePCSSectionName( szSectionName );
CString csPCSSection, csOldPCSSection = szSectionName;
int iInx = csOldPCSSection.Find ('^');
ASSERT (-1 != iInx);
csPCSSection = csOldPCSSection.Left (iInx);
iInx = csOldPCSSection.ReverseFind ('^');
ASSERT (-1 != iInx);
csPCSSection += csOldPCSSection.Right (csOldPCSSection.GetLength () - iInx);
SCR_M_SvL0_SaveEntry(p_stFile, "CS", SCR_CC_C_Cfg_NoChar);
SCR_fn_v_SvL0_SaveParameters_MP
(
p_stFile,
SCR_EF_SvL0_Normal,
1,
csPCSSection
);
p_oPO->fn_vComputeVSESectionName( szSectionName );
SCR_M_SvL0_SaveEntry(p_stFile, "VS", SCR_CC_C_Cfg_NoChar);
SCR_fn_v_SvL0_SaveParameters_MP
(
p_stFile,
SCR_EF_SvL0_Normal,
1,
szSectionName
);
/*
* save end of section
*/
SCR_M_SvL0_SaveEndSection(p_stFile, SCR_CC_C_Cfg_EOL);
}
break;
case SCR_EA_Ntfy_DeleteSection:
break;
}
//ENDROMTEAM WorldEditor (Cristian Stegaru)
}
/*
=======================================================================================
Construction/destruction and initialization
=======================================================================================
*/
/*
----------------------------------------------------------------------------------------
Description : constructor
p_oDLL -> owner dll
p_oMainWorld -> main world that contain EditorPO object
hObj -> handle on engine structure
csName -> name of object
csFileName -> file name were object is stored
csSectionName -> section name for object
----------------------------------------------------------------------------------------
*/
EditorPO::EditorPO
(
CPA_EditorBase *p_oDLL,
PO_tdxHandleToPhysicalObject hObj,
CPA_BaseObject *p_oOwner,
CString csName,
CString csFileName,
CString csSectionName
)
:CPA_SaveObject
(
p_oDLL,
C_szPhysicalObjectTypeName,
E_ss_Responsible,
p_oOwner,
TRUE,
NULL,
CallBackSavePhysicalObject
)
,CPA_EdMot<PO_tdxHandleToPhysicalObject>(hObj)
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
char szSectionName[SCR_CV_ui_Cfg_MaxLenName];
char *szPath;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
//ROMTEAM WorldEditor (Nicu 07/11/97)
m_pGeom = NULL;
m_pOrigGeom = NULL;
m_iIdx = -2; // not a geometric object
m_bIsClone = FALSE;
//ENDROMTEAM WorldEditor (Nicu)
/*
* section object
*/
SetSectionData( this );
/*
* compute origin and get datapath corresponding to origin
*/
szPath = fn_szComputeOrigin( (char *) (LPCTSTR) csFileName, &m_cOrigin );
SetDataPath( szPath );
/*
* section name of PO object
*/
SCR_fn_v_RdL0_ComputeSectionName
(
szSectionName,
(char *)(LPCTSTR) fn_csConstructFileName(csFileName),
(char *)(LPCTSTR) csSectionName,
(char *)(LPCTSTR) csName
);
SetReferencedSectionName( szSectionName );
/*
* PCS Section
*/
/*
fn_vComputePCSSectionName( szSectionName );
m_p_oPCSSection = new CPA_SectionObject(szSectionName, szPath, CallBackSaveCollideSet, this, TRUE);
*/
/*
fn_vComputeVSESectionName( szSectionName );
m_p_oVSESection = new CPA_SectionObject(szSectionName, szPath, CallBackSaveVisualSet, this, TRUE);
*/
/*
* set object name
*/
if (fn_eRename(csName) != E_mc_None)
SetDefaultValidName();
fn_vUpdateSectionName();
if (hObj != NULL)
{
m_fn_vInitDataMembers();
//ROMTEAM WorldEditor (Nicu 06/12/97)
if(p_oOwner && p_oOwner->GetName() != "Geometric")
{
fn_vComputePCSSectionName( szSectionName );
if(!m_p_oPCSSection)
{
m_p_oPCSSection = new CPA_SectionObject(szSectionName, szPath, CallBackSaveCollideSet, this, FALSE);
ASSERT (m_p_oPCSSection);
m_p_oPCSSection->fn_vWriteSection ();
}
fn_vComputeVSESectionName( szSectionName );
if(!m_p_oVSESection)
{
m_p_oVSESection = new CPA_SectionObject(szSectionName, szPath, CallBackSaveVisualSet, this, FALSE);
ASSERT (m_p_oVSESection);
m_p_oVSESection->fn_vWriteSection ();
}
}
//ENDROMTEAM WorldEditor (Nicu)
// fbolefeysot - 06/08/98
// bidouille pour morphing premiere frame{
if(!m_p_oVSESection)
{
fn_vComputeVSESectionName( szSectionName );
m_p_oVSESection = new CPA_SectionObject(szSectionName, szPath, CallBackSaveVisualSet, this, FALSE);
ASSERT (m_p_oVSESection);
}
//END fbolefeysot}
}
else
{
SetAvailable( FALSE );
}
SetExistingSection( TRUE ); // A module can only be created during loading
m_fn_vSetIndexInObjectTable( C_uwNotInTable );
//ANNECY TQ 22/06/98{
this->fn_vSetEditorPOBoundingVolume(GEO_fn_hCreateGeometricSphere());
//ENDANNECY TQ}
};
/*
----------------------------------------------------------------------------------------
Description : Destructor
----------------------------------------------------------------------------------------
*/
EditorPO::~EditorPO()
{
/*
GEO_tdxHandleToVisualSet hVSE;
ACP_tdxIndex xNumberOfLod;
ACP_tdxIndex xIndexOfLod;
CPA_ObjectDLLBase *p_oGeoDLL;
if (GetDLL()->M_GetMultiDevice3D()->mbOnDestroy == FALSE)
{
hVSE = PO_fn_hGetVisualSet( GetStruct() );
xNumberOfLod = GLI_lGetVisualSetNumbertOfLOD( hVSE );
// Get Geometry3D DLL interface
p_oGeoDLL = GetMainWorld()->GetObjectDLLWithName(C_szDLLGeometryName);
// create a Geometric editor object for each Lod Definition
for (xIndexOfLod = 0; xIndexOfLod < xNumberOfLod; xIndexOfLod ++)
{
if (m_dp_oLodGeom[xIndexOfLod] != NULL)
p_oGeoDLL->OnQueryAction( p_oGeoDLL, C_uiDeleteGeometricObject, (LPARAM) m_dp_oLodGeom[xIndexOfLod] );
}
}
*/
free ( m_dp_oLodGeom );
}
/*
----------------------------------------------------------------------------------------
Description : dummy function
----------------------------------------------------------------------------------------
*/
void fn_vEmptyDeleteFunction(PO_tdxHandleToPhysicalObject h){}
/*
----------------------------------------------------------------------------------------
Description : Static Initialization
----------------------------------------------------------------------------------------
*/
void EditorPO::StaticInit()
{
CPA_EdMot<PO_tdxHandleToPhysicalObject>::Init(PO_fn_hAllocPhysicalObject,NULL,fn_vEmptyDeleteFunction);
}
/*
----------------------------------------------------------------------------------------
Description : init data member of editor object with engine object
----------------------------------------------------------------------------------------
*/
void EditorPO::m_fn_vInitDataMembers( BOOL _bSecondPass /* = FALSE */ )
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
PO_tdxHandleToPhysicalObject hObj;
GEO_tdxHandleToVisualSet hVSE;
PCS_tdxHandleToPhysicalCollSet hPCS;
ACP_tdxIndex xNumberOfLod;
ACP_tdxIndex xIndexOfLod;
MTH_tdxReal xThreshold;
CPA_ObjectDLLBase *p_oOGDDLL;
CPA_ObjectDLLBase *p_oOZODLL;
ACP_tdxHandleOfObject hGeoObj;
char cZone;
SCR_tdst_Link_Value *p_stValue;
char *p_szPath, *p_szEndPath;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
hObj = (PO_tdxHandleToPhysicalObject) GetStruct();
hVSE = PO_fn_hGetVisualSet( hObj );
xNumberOfLod = (ACP_tdxIndex) GLI_lGetVisualSetNumbertOfLOD( hVSE );
if (! _bSecondPass)
{
/*
* init visual set section object
*/
p_stValue = SCR_fnp_st_Link_SearchValue(VS_fn_p_stGetLinkTable(), (unsigned long) hVSE );
//ROMTEAM WorldEditor (Nicu 10/11/97)
if(p_stValue) {
//ENDROMTEAM WorldEditor (Nicu)
p_szEndPath = p_stValue->p_szKey + p_stValue->stInfos.ulLong1 - 1;
*p_szEndPath = 0;
p_szPath = fn_szComputeOrigin( p_stValue->p_szKey, NULL );
*p_szEndPath++ = '\\';
m_p_oVSESection = new CPA_SectionObject( p_szEndPath, p_szPath, CallBackSaveVisualSet, this, TRUE);
//ROMTEAM WorldEditor (Nicu 07/11/97)
}
else m_p_oVSESection = NULL;
//ENDROMTEAM WorldEditor (Nicu)
/* allocate memory to store an array of pointer to Geometric Object */
m_dp_oLodGeom = (Geometry3D **) malloc ( xNumberOfLod * sizeof( Geometry3D *) );
/* Get Geometry3D DLL interface */
p_oOGDDLL = GetMainWorld()->GetObjectDLLWithName(C_szDLLGeometryName);
/* create a Geometric editor object for each Lod Definition */
for (xIndexOfLod = 0; xIndexOfLod < xNumberOfLod; xIndexOfLod ++)
{
if (p_oOGDDLL == NULL)
m_dp_oLodGeom[xIndexOfLod] = NULL;
else
{
GLI_vGetVisualSetLOD( hVSE, xIndexOfLod, &xThreshold, &hGeoObj );
m_dp_oLodGeom[xIndexOfLod] = (Geometry3D *) p_oOGDDLL->OnQueryAction( GetEditor(), C_uiCreateGeometricObject, (LPARAM) hGeoObj );
}
}
/*
* Init PhysicalCollSet section object
*/
hPCS = PO_fn_hGetCollideSet( hObj );
//ROMTEAM WorldEditor (Nicu 10/11/97)
if(hPCS) {
//ENDROMTEAM WorldEditor (Nicu)
p_stValue = SCR_fnp_st_Link_SearchValue(CS_fn_p_stGetLinkTable(), (unsigned long) hPCS );
p_szEndPath = p_stValue->p_szKey + p_stValue->stInfos.ulLong1 - 1;
*p_szEndPath = 0;
p_szPath = fn_szComputeOrigin( p_stValue->p_szKey, NULL );
*p_szEndPath++ = '\\';
m_p_oPCSSection = new CPA_SectionObject(p_szEndPath, p_szPath, CallBackSaveCollideSet, this, TRUE);
//ROMTEAM WorldEditor (Nicu 10/11/97)
}
else m_p_oPCSSection = NULL;
//ENDROMTEAM WorldEditor (Nicu)
}
/* now create Zone editor object */
hPCS = PO_fn_hGetCollideSet( hObj );
p_oOZODLL = GetMainWorld()->GetObjectDLLWithName( C_szDLLZDxName );
for (cZone = 0; cZone < 4; cZone ++)
{
if ( (p_oOZODLL == NULL) || (hPCS == NULL) )
m_ap_oZone[ cZone ] = NULL;
else
{
hGeoObj = PCS_fn_hGetGeoObjOfPhysicalCollSet( cZone, hPCS );
if (hGeoObj == NULL)
m_ap_oZone[ cZone ] = NULL;
else
{
static char *szZoneName[] = {C_szZddName, C_szZdmName, C_szZdeName, C_szZdrName };
tdstCreateZoneMess stZoneMess;
char *p_szSectionName = GLI_p_cSearchValueInLinkTableOfGeometric((unsigned long) hGeoObj);
char szName[SCR_CV_ui_Cfg_MaxLenName];
SCR_fn_v_RdL0_SplitSectionName(p_szSectionName, NULL, NULL, szName);
stZoneMess . csTypeName = szZoneName[ cZone ];
stZoneMess . hEngineZone = hGeoObj;
stZoneMess . csName = szName;
stZoneMess . pOwner = GetOwner();
stZoneMess . szDataPath = GetDataPath();
stZoneMess . csReferenceSectionName = p_szSectionName + strlen( stZoneMess . szDataPath ) + 1;
m_ap_oZone[ cZone ] = (CPA_BaseObject *) p_oOZODLL->OnQueryAction( GetEditor(), C_uiQueryCreateZDxObject, (LPARAM) & stZoneMess );
// for ZdR, if zone was not found : create the collision object
if ((m_ap_oZone[cZone] == NULL) && (cZone == 3) && (GetOwner() == NULL))
m_ap_oZone[ cZone ] = (Geometry3D *)p_oOGDDLL->OnQueryAction( GetEditor(), C_uiCreateGeometricObject, (LPARAM) hGeoObj );
}
}
}
}
/*
----------------------------------------------------------------------------------------
Description : load engine PO associated with an empty Editor PO
return (BOOL) TRUE if engine object is correctly loaded
----------------------------------------------------------------------------------------
*/
BOOL EditorPO::m_fn_bLoadEnginePO( void )
{
CString csRefSection;
SCR_tdst_Cxt_Values *p_stResult;
PO_tdxHandleToPhysicalObject hObj;
CPA_ToolDLLBase *p_oMaterialDLL;
if (!fn_bIsAvailable() )
{
csRefSection = GetReferencedSectionName();
p_stResult = SCR_fnp_st_RdL0_AnalyseSection( (char *) (LPCTSTR) csRefSection, SCR_CDF_uw_Anl_Normal );
GLI_vEndofGeometricLoad();
p_oMaterialDLL = GetMainWorld()->GetToolDLLWithName( C_szDLLMaterialName );
if (p_oMaterialDLL != NULL)
p_oMaterialDLL->OnQueryAction( GetEditor(), C_cCreateNewGameMaterial, 0 );
hObj = (PO_tdxHandleToPhysicalObject) SCR_M_ul_RdL0_ExtractLongValue( p_stResult, 0 );
fn_vUpdateData(hObj);
//ROMTEAM WorldEditor (Nicu 20/01/98)
POInterface *p_oOPD = (POInterface *)GetMainWorld()->GetObjectDLLWithName( C_szDLLPhysicalObjectName );
Shape3D* pGO;
if (p_oOPD->mfn_bIsACandidateEPO (GetName()))
{
pGO = p_oOPD->mfn_pGetGeomObjFromEPOName (GetName());
GMT_tdxHandleToGameMaterial hMaterial;
GEO_vGetGameMaterialOfIndexedTriangles (*hObj->_hVisualSet->d_p_stLodDefinitions, 0, &hMaterial);
struct GEO_tdstVisualSet_ *hVS = hObj->_hVisualSet;
*hVS->d_p_stLodDefinitions = pGO->GetStruct();
GEO_vSetGameMaterialOfIndexedTriangles (pGO->GetStruct(), 0, hMaterial);
}
//ENDROMTEAM WorldEditor (Nicu)
SetStruct( hObj );
SetAvailable( TRUE );
m_fn_vInitDataMembers();
//ROMTEAM WorldEditor (Nicu 20/01/98)
if (p_oOPD->mfn_bIsACandidateEPO (GetName()))
{
SetZone(3, pGO, FALSE);
m_iIdx = p_oOPD->mfn_iGetEPOIdx (GetName());
mfn_vSetClone (TRUE);
SetExistingSection (TRUE);
fn_vNotifySave ();
p_oOPD->m_lstOfCandidateEPO.AddTail (this);
}
//ENDROMTEAM WorldEditor (Nicu)
return TRUE;
}
return FALSE;
}
/*
----------------------------------------------------------------------------------------
Description : compute origin of an editor PO object
return data path for file that contain the PO
----------------------------------------------------------------------------------------
*/
char *EditorPO::fn_szComputeOrigin( char *_szFileName, char *_cOrigin )
{
char *szPath;
szPath = fn_szGetFamiliesDataPath();
if (strnicmp( _szFileName, szPath, strlen( szPath ) ) == 0)
{
if (_cOrigin != NULL)
*_cOrigin = C_cFromFamilies;
}
else
{
szPath = fn_szGetLevelsDataPath();
if (strnicmp( _szFileName, szPath, strlen( szPath) ) == 0)
{
if (_cOrigin != NULL)
*_cOrigin = C_cFromLevels;
}
else
{
szPath = fn_szGetGraphicsClassesDataPath();
if (strnicmp( _szFileName, szPath, strlen( szPath) ) == 0)
{
if (_cOrigin != NULL)
*_cOrigin = C_cFromClasses;
}
else
{
// this is not a PO, actually can be a VSE : don't need to return origin.
szPath = fn_szGetGraphicsBanksDataPath();
}
}
}
return szPath;
}
/*
----------------------------------------------------------------------------------------
Description : return part of filename that correspond to short file name
----------------------------------------------------------------------------------------
*/
CString EditorPO::fn_csConstructFileName(CString csFileName)
{
csFileName = csFileName.Mid( strlen( GetDataPath() ) + 1 );
return csFileName;
}
/*
----------------------------------------------------------------------------------------
Description : return PCS section Name associated with the PO object
szPCSSectionName -> string were result string is copied
----------------------------------------------------------------------------------------
*/
void EditorPO::fn_vComputePCSSectionName( char *szPCSSectionName )
{
char szEndSectionName[ SCR_CV_ui_Cfg_MaxLenName ];
char *p_cCur;
strcpy( szPCSSectionName, (char *) (LPCTSTR) GetReferencedSectionName());
p_cCur = strchr( szPCSSectionName, '.');
strcpy( szEndSectionName, p_cCur + 12 );
strcpy( p_cCur, ".zoo^AllCollideSets^CS:CS_");
strcat( p_cCur, szEndSectionName );
}
/*
----------------------------------------------------------------------------------------
Description : return PCS section Name associated with the PO object
szPCSSectionName -> string were result string is copied
----------------------------------------------------------------------------------------
*/
void EditorPO::fn_vComputeVSESectionName( char *szVSESectionName )
{
char szEndSectionName[ SCR_CV_ui_Cfg_MaxLenName ];
char *p_cCur;
strcpy( szVSESectionName, (char *) (LPCTSTR) GetReferencedSectionName());
p_cCur = strchr( szVSESectionName, '.');
if (p_cCur)
{
strcpy( szEndSectionName, p_cCur + 12 );
strcpy( p_cCur, ".vse^VS:VSE_");
strcat( p_cCur, szEndSectionName );
}
else
{
p_cCur = strchr(szVSESectionName, '^');
strcpy(szEndSectionName, p_cCur + 8);
strcpy( p_cCur, "^VS:VSE_");
strcat( p_cCur, szEndSectionName );
}
}
/*
=======================================================================================
Notification
=======================================================================================
*/
//--------------------------------------------------------------------------------------
void EditorPO::fn_vNotifySave (void)
{
//ROMTEAM WorldEditor (Cristian Stegaru 12/97)
fn_vWriteSection ();
//ENDROMTEAM WorldEditor (Cristian Stegaru)
m_p_oPCSSection->fn_vWriteSection();
}
//--------------------------------------------------------------------------------------
void EditorPO::fn_vNotifyUnSave (void)
{
m_p_oPCSSection->fn_vDeleteSection();
}
//--------------------------------------------------------------------------------------
void EditorPO::fn_vNotifyRestore (void)
{
m_p_oPCSSection->fn_vRestoreSection();
}
//--------------------------------------------------------------------------------------
void EditorPO::fn_vNotifyRename (void)
{
char szSectionName[ SCR_CV_ui_Cfg_MaxLenName ];
fn_vComputePCSSectionName( szSectionName );
m_p_oPCSSection->fn_vRenameSection( szSectionName );
/*
fn_vComputeVSESectionName( szSectionName );
m_p_oVSESection->fn_vRenameSection( szSectionName );
*/
}
//--------------------------------------------------------------------------------------
void EditorPO::fn_vUpdateSectionName (void)
{
// update main section
CPA_SaveObject::fn_vUpdateSectionName();
// update PCS section
//fn_vNotifyRename();
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Method : mfn_csGetFullGeomSectionName
// Date : 98-03
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Description :
// Author : Stegaru Cristian - CPA2
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Modification :
// Date :
// By :
//////////////////////////////////////////////////////////////////////////////////////////////////////
CString EditorPO::mfn_csGetFullGeomSectionName ()
{
char *p_cCur;
PO_tdxHandleToPhysicalObject hPO;
GEO_tdxHandleToVisualSet hVse;
ACP_tdxIndex xNbLods, xLod;
MTH_tdxReal xThreshold;
ACP_tdxHandleOfObject xGeom;
SCR_tdst_Link_Table *p_stGeomLinkTable;
SCR_tdst_Link_Value *p_stGeomLinkValue;
CString csFullGeomSectionName;
CPA_ObjectDLLBase *p_oPODll = GetMainWorld()->GetObjectDLLWithName (C_szDLLPhysicalObjectName);
HINSTANCE hOldInst = AfxGetResourceHandle();
if (p_oPODll)
AfxSetResourceHandle (p_oPODll->GetDLLIdentity()->hModule);
hPO = GetStruct();
hVse = PO_fn_hGetVisualSet( hPO );
xNbLods = (ACP_tdxIndex) GLI_lGetVisualSetNumbertOfLOD( hVse );
ASSERT (1 == xNbLods);
xLod = 1;
p_stGeomLinkTable = GLI_p_stGetLinkTableOfGeometric();
GLI_vGetVisualSetLOD( hVse, xLod, &xThreshold, &xGeom );
p_stGeomLinkValue = SCR_fnp_st_Link_SearchValue( p_stGeomLinkTable, (unsigned long) xGeom );
if (p_stGeomLinkValue != NULL)
{
p_cCur = SCR_M_p_sz_Link_GetKey( p_stGeomLinkValue ) + SCR_M_ul_Link_GetAdditionalLong( p_stGeomLinkValue, 1 );
csFullGeomSectionName = p_cCur;
}
else
csFullGeomSectionName = mfn_csGetModSectionName ();
if (p_oPODll)
AfxSetResourceHandle(hOldInst);
return csFullGeomSectionName;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Method : mfn_csGetModSectionName
// Date : 98-03
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Description :
// Author : Stegaru Cristian - CPA2
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Modification :
// Date :
// By :
//////////////////////////////////////////////////////////////////////////////////////////////////////
CString EditorPO::mfn_csGetModSectionName ()
{
ASSERT (m_dp_oLodGeom);
Geometry3D *pG3d = m_dp_oLodGeom [0];
ASSERT (pG3d);
return pG3d->GetReferencedSectionName ();
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Method : mfn_iGetFacesNumber
// Date : 98-05
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Description :
// Author : Stegaru Cristian - CPA2
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Modification :
// Date :
// By :
//////////////////////////////////////////////////////////////////////////////////////////////////////
ACP_tdxIndex EditorPO::mfn_iGetFacesNumber ()
{
ACP_tdxIndex iFacesNumber = 0;
Geometry3D *p3D = m_fnp_oGetGeometricWithDistance (0);
if (p3D)
iFacesNumber = p3D->mfn_iGetFacesNumber ();
return iFacesNumber;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Method : mfn_3dvGetMinCoordinates
// Date : 98-05
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Description :
// Author : Stegaru Cristian - CPA2
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Modification :
// Date :
// By :
//////////////////////////////////////////////////////////////////////////////////////////////////////
MTH3D_tdstVector EditorPO::mfn_3dvGetMinCoordinates ()
{
MTH3D_tdstVector tdstMinCoordintes;
tdstMinCoordintes.xX = tdstMinCoordintes.xY = tdstMinCoordintes.xZ = 0;
Geometry3D *p3D = m_fnp_oGetGeometricWithDistance (0);
if (p3D)
tdstMinCoordintes = p3D->mfn_3dvGetMinCoordinates ();
return tdstMinCoordintes;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Method : mfn_3dvGetMaxCoordinates
// Date : 98-05
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Description :
// Author : Stegaru Cristian - CPA2
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Modification :
// Date :
// By :
//////////////////////////////////////////////////////////////////////////////////////////////////////
MTH3D_tdstVector EditorPO::mfn_3dvGetMaxCoordinates ()
{
MTH3D_tdstVector tdstMaxCoordintes;
tdstMaxCoordintes.xX = tdstMaxCoordintes.xY = tdstMaxCoordintes.xZ = 0;
Geometry3D *p3D = m_fnp_oGetGeometricWithDistance (0);
if (p3D)
tdstMaxCoordintes = p3D->mfn_3dvGetMaxCoordinates ();
return tdstMaxCoordintes;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Method : mfn_3dvGetSizes
// Date : 98-05
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Description :
// Author : Stegaru Cristian - CPA2
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Modification :
// Date :
// By :
//////////////////////////////////////////////////////////////////////////////////////////////////////
MTH3D_tdstVector EditorPO::mfn_3dvGetSizes () //dX, dY, dZ
{
MTH3D_tdstVector tdstSize;
tdstSize.xX = tdstSize.xY = tdstSize.xZ = 0;
Geometry3D *p3D = m_fnp_oGetGeometricWithDistance (0);
if (p3D)
tdstSize = p3D->mfn_3dvGetSizes ();
return tdstSize;
}

View File

@@ -0,0 +1,7 @@
EXPORTS
fn_p_szGetCPAVersion
fn_p_stGetDLLIdentity
fn_p_oGetDLL
fn_vInitDll
SECTIONS
.data READ WRITE

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
// stdafx.cpp : source file that includes just the standard includes
// ACPProject.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"

View File

@@ -0,0 +1,115 @@
//
// Common functions for Object DLL capabilities
// C. Beaudet
//
#include "stdafx.h"
#include "acp_base.h"
#include "afxdllx.h"
#include "incITF.h"
#include "vig.h"
#include "incOPD.h"
/*
*------------------------------------------------------------------------
* Global vars
*------------------------------------------------------------------------
*/
static char *gs_p_szCPAVersion = C_szCPAVersion;
static AFX_EXTENSION_MODULE NEAR extensionDLL = { NULL, NULL };
#ifdef DLL_ONLY_ONE_INSTANCE
static POInterface *gs_p_oPOInterface = NULL;
#endif
static CList<CPA_DLLBase*,CPA_DLLBase*> g_oListOfInstances; //private internal
//------------------------------------------------------------------------
// functions that are present in all DLL :
//------------------------------------------------------------------------
//========================================================================
// Get current CPA version
//========================================================================
extern "C" char __declspec(dllexport) *fn_p_szGetCPAVersion(void)
{
return gs_p_szCPAVersion;
}
//========================================================================
// Get type of this DLL
//========================================================================
extern "C" tdstDLLIdentity __declspec(dllexport) *fn_p_stGetDLLIdentity(void)
{
g_stPOIdentity.eType = OBJECT_DLL; //object DLL type
g_stPOIdentity.csName = C_szDLLPhysicalObjectName; //object DLL name (unique name)
g_stPOIdentity.hModule = NULL; //********************** private internal
g_stPOIdentity.p_oListOfInstances = &g_oListOfInstances; //********************** private internal
return &g_stPOIdentity;
}
//========================================================================
// DLL init function
//========================================================================
extern "C" void __declspec(dllexport) fn_vInitDll(void)
{
new CDynLinkLibrary(extensionDLL);
}
//========================================================================
// DLL entry point
//========================================================================
extern "C" int __stdcall DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
if (!AfxInitExtensionModule(extensionDLL, hInstance))
return 0;
}
return 1;
}
//========================================================================
// Get the DLL
//========================================================================
extern "C" CPA_DLLBase __declspec(dllexport) *fn_p_oGetDLL(long lKey)
{
#ifdef DLL_ONLY_ONE_INSTANCE
switch(lKey)
{
case 0: // the game world
if (gs_p_oPOInterface == NULL)
{
gs_p_oPOInterface = new POInterface();
ASSERT(gs_p_oPOInterface != NULL);
}
return gs_p_oPOInterface;
break;
default:
return NULL;
}
#else //DLL_ONLY_ONE_INSTANCE
switch(lKey)
{
case 0: // the game world
return new POInterface();
break;
default:
return NULL;
}
#endif //DLL_ONLY_ONE_INSTANCE
}
//------------------------------------------------------------------------
// functions that are present in this type of DLL only :
//------------------------------------------------------------------------
#undef DLL_ONLY_ONE_INSTANCE

File diff suppressed because it is too large Load Diff