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="OIT" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=OIT - 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 "Oit.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 "Oit.mak" CFG="OIT - Win32 Debug Glide with Editors"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "OIT - Win32 Debug Glide with Editors" (based on\
"Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""$/CPA/TempGrp/OIT", TCGAAAAA"
# 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\OitDFEvd"
# 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" /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" /FR /YX /FD /c
# 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" /out:"X:\CPA\EXE\Main\EDT_Data\Objects/OitDFEvd.dll" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
# Begin Target
# Name "OIT - 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\edit_cla.cpp
# End Source File
# Begin Source File
SOURCE=.\src\edit_ipo.cpp
# End Source File
# Begin Source File
SOURCE=.\src\ipo_dlgs.cpp
# ADD CPP /I "..\res"
# End Source File
# Begin Source File
SOURCE=.\src\ipo_intf.cpp
# End Source File
# Begin Source File
SOURCE=.\src\ipo_test.def
# 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=.\inc\edit_cla.hpp
# End Source File
# Begin Source File
SOURCE=..\..\Public\Oit\edit_ipo.hpp
# End Source File
# Begin Source File
SOURCE=.\inc\ipo_dlgs.h
# End Source File
# Begin Source File
SOURCE=.\inc\ipo_intf.hpp
# End Source File
# Begin Source File
SOURCE=.\src\StdAfx.h
# End Source File
# 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
# Begin Group "Resource Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\Res\ipo_dlgb.ico
# End Source File
# Begin Source File
SOURCE=.\res\ipo_res.h
# End Source File
# Begin Source File
SOURCE=.\res\ipo_res.rc
# End Source File
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,210 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="OIT"
ProjectGUID="{ADF98EC6-74D5-4F99-8C36-B89BF84F5853}"
SccProjectName="&quot;$/CPA/TempGrp/OIT&quot;, TCGAAAAA"
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\OitDFEvd"
ConfigurationType="2"
UseOfMFC="2"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="X:\CPA\Public,inc"
PreprocessorDefinitions="CPA_WANTS_IMPORT;ACTIVE_EDITOR;WIN32;_DEBUG;_WINDOWS;CPA_VISUAL;CPA_DEBUG;USE_ALTIMAPS"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Tmp\OitDFEvd/OIT.pch"
AssemblerListingLocation=".\Tmp\OitDFEvd/"
ObjectFile=".\Tmp\OitDFEvd/"
ProgramDataBaseFileName=".\Tmp\OitDFEvd/"
BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="1"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="maidfevd.lib"
OutputFile="X:\CPA\EXE\Main\EDT_Data\Objects/OitDFEvd.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="X:\cpa\exe\main\edt_data;X:\cpa\exe\main;X:\cpa\libd"
IgnoreDefaultLibraryNames=""
ModuleDefinitionFile=".\src\ipo_test.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="x:\CPA\EXE\Main\EDT_Data\Objects/OitDFEvd.pdb"
SubSystem="2"
ImportLibrary="x:\CPA\EXE\Main\EDT_Data\Objects/OitDFEvd.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName="x:\CPA\EXE\Main\EDT_Data\Objects/OIT.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=""
BrowseInformation="1"/>
</FileConfiguration>
</File>
<File
RelativePath="src\edit_cla.cpp">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BrowseInformation="1"/>
</FileConfiguration>
</File>
<File
RelativePath="src\edit_ipo.cpp">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BrowseInformation="1"/>
</FileConfiguration>
</File>
<File
RelativePath="src\ipo_dlgs.cpp">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\res"
PreprocessorDefinitions=""
BrowseInformation="1"/>
</FileConfiguration>
</File>
<File
RelativePath="src\ipo_intf.cpp">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BrowseInformation="1"/>
</FileConfiguration>
</File>
<File
RelativePath="src\ipo_test.def">
</File>
<File
RelativePath="src\StdAfx.cpp">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BrowseInformation="1"/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Include Files"
Filter="hpp,h">
<File
RelativePath="inc\edit_cla.hpp">
</File>
<File
RelativePath="..\..\Public\Oit\edit_ipo.hpp">
</File>
<File
RelativePath="inc\ipo_dlgs.h">
</File>
<File
RelativePath="inc\ipo_intf.hpp">
</File>
<File
RelativePath="src\StdAfx.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="">
<File
RelativePath="Res\ipo_dlgb.ico">
</File>
<File
RelativePath="res\ipo_res.h">
</File>
<File
RelativePath="res\ipo_res.rc">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
AdditionalIncludeDirectories="res"/>
</FileConfiguration>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

@@ -0,0 +1,48 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by ipo_res.rc
//
#define IDS_ITNAME 1
#define IDS_GEOMETRIC_SECTION_NAME 2
#define IDS_ELEMENT_SECTION_NAME 3
#define IDS_ELEMENT_IT_SECTION_NAME 3
#define IDS_ELEMENT_SUFIX_NAME 4
#define IDS_ELEMENT_IT_SUFIX_NAME 4
#define IDS_PHY_NAME 5
#define IDS_ELEMENT_ALTIMAP_SECTION_NAME 6
#define IDS_ELEMENT_ALTIMAP_SUFIX_NAME 7
#define IDD_DIALOG_POCLASS 101
#define IDD_DIALOG_POMODEL 102
#define IDD_DIALOG_POANDDELTARLI 103
#define IDI_IPO_DLGBAR_ICON 104
#define IDC_LIST_POCLASS 1000
#define IDC_LIST_POMODEL 1001
#define IDC_RADIO_ALLCLASSES 1002
#define IDC_RADIO_LOADEDMODELS 1003
#define IDC_RADIO_ALLMODELS 1004
#define IDC_RADIO_SELECTEDCLASS 1005
#define IDC_BUTTON_CREATEVIGNETTE 1006
#define IDC_CHECK_3DVIEW 1007
#define IDC_STATIC_POCLASS 1008
#define IDC_STATIC_POMODEL 1009
#define IDC_CREATE_I_TRIANGLE 1010
#define IDC_STATIC_3DVIEW 1011
#define IDC_BUTTON_EDITPO 1012
#define IDC_LIST_VERTEX 1013
#define IDC_EDIT_VALUE 1014
#define IDC_SPIN_VALUE 1015
#define IDC_STATIC_NOIPO 1016
#define IDC_BUTTON_APPLY 1017
#define IDC_MODELICON 1018
#define IDC_BUTTON_LOD 1037
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 105
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1019
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@@ -0,0 +1,179 @@
//Microsoft Developer Studio generated resource script.
//
#include "ipo_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_ITNAME "it"
IDS_GEOMETRIC_SECTION_NAME "it\\it.mod^Geometric:"
IDS_ELEMENT_IT_SECTION_NAME "it\\it.mod^ElementIndexedTriangles:"
IDS_ELEMENT_IT_SUFIX_NAME "ElementIT"
IDS_PHY_NAME "\\IT\\IT.phy^PHY:"
IDS_ELEMENT_ALTIMAP_SECTION_NAME "it\\it.mod^ElementAltimap:"
IDS_ELEMENT_ALTIMAP_SUFIX_NAME "ElementAltimap"
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_POANDDELTARLI DIALOG DISCARDABLE 0, 0, 102, 71
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Edit PO",IDC_BUTTON_EDITPO,43,50,45,14
CONTROL "",IDC_BUTTON_LOD,"Button",BS_OWNERDRAW | WS_TABSTOP,7,7,
26,55
LISTBOX IDC_LIST_VERTEX,43,7,52,21,LBS_NOINTEGRALHEIGHT |
LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP
EDITTEXT IDC_EDIT_VALUE,43,31,26,12,ES_AUTOHSCROLL
CONTROL "Spin1",IDC_SPIN_VALUE,"msctls_updown32",UDS_ARROWKEYS |
UDS_HORZ,69,30,16,12
LTEXT "Select an IPO in list above",IDC_STATIC_NOIPO,7,7,88,8
PUSHBUTTON "Apply",IDC_BUTTON_APPLY,79,28,15,14
END
IDD_DIALOG_POCLASS DIALOG DISCARDABLE 0, 0, 77, 301
STYLE DS_3DLOOK | WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
LISTBOX IDC_LIST_POCLASS,7,15,58,58,LBS_OWNERDRAWFIXED |
LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_TABSTOP
LISTBOX IDC_LIST_POMODEL,7,87,62,61,LBS_OWNERDRAWFIXED |
LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_TABSTOP
CONTROL "All Classes",IDC_RADIO_ALLCLASSES,"Button",
BS_AUTORADIOBUTTON | WS_GROUP,5,250,60,10
CONTROL "Selected Class",IDC_RADIO_SELECTEDCLASS,"Button",
BS_AUTORADIOBUTTON,5,260,60,10
CONTROL "All Models",IDC_RADIO_ALLMODELS,"Button",
BS_AUTORADIOBUTTON | WS_GROUP,5,274,60,10
CONTROL "Loaded Models",IDC_RADIO_LOADEDMODELS,"Button",
BS_AUTORADIOBUTTON,5,285,63,10
PUSHBUTTON "Create Vignette",IDC_BUTTON_CREATEVIGNETTE,7,217,60,12
CONTROL "Show 3D View",IDC_CHECK_3DVIEW,"Button",BS_AUTOCHECKBOX |
BS_PUSHLIKE | WS_TABSTOP,7,170,63,10
LTEXT "Classes",IDC_STATIC_POCLASS,7,4,63,8
LTEXT "Model",IDC_STATIC_POMODEL,7,76,20,8
CTEXT "To Display 3D view of selected model use above button\r\nBut if main device is in full screen mode, screen will become black. Use this option only if you are in windowed mode",
IDC_STATIC_3DVIEW,7,180,63,34,WS_BORDER
PUSHBUTTON "Indexed triangle",IDC_CREATE_I_TRIANGLE,7,153,63,11
PUSHBUTTON "Create Model Icon",IDC_MODELICON,7,232,60,12
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_DIALOG_POANDDELTARLI, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 95
TOPMARGIN, 7
BOTTOMMARGIN, 64
END
IDD_DIALOG_POCLASS, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 70
TOPMARGIN, 7
BOTTOMMARGIN, 294
END
END
#endif // APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"ipo_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
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_IPO_DLGBAR_ICON ICON DISCARDABLE "ipo_dlgb.ico"
#endif // French (France) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

Binary file not shown.

View File

@@ -0,0 +1,82 @@
/*
*=======================================================================================
* Name :edit_cla.hpp
*
* Author : Vincent lhullier Date :30/06/97
*
* Description : editor classe object
*=======================================================================================
* Modification -> Author : Date :
* Description :
*=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef __EDIT_CLA_HPP__
#define __EDIT_CLA_HPP__
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "ITF.h"
#include "incGAM.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef CPA_EXPORT
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else
#define CPA_EXPORT
#endif
#endif
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
Class editor object
=======================================================================================
*/
class EditorPOClass : public CPA_BaseObject
{
private:
CPA_BaseObjectList m_oPhysicalObjects;
public:
/* ==> constructor and destructor */
EditorPOClass(
char *_szName,
CPA_EditorBase *_pEditor,
CPA_BaseObject *_pOwner = NULL,
BOOL _bAvailable = FALSE
);
EditorPOClass(EditorPOClass &_r_oSource);
~EditorPOClass(void);
/* ==> return Data */
long GetDataType (void) { return 0; }
void * GetData (void) { return NULL; }
/* ==> loading PO object */
BOOL fn_bLoadEditorPO( void );
//CPA2 Stegaru Cristian 98-04
void mfn_vLoadITEditorPO (CString csITName);
//End CPA2 Stegaru Cristian 98-04
};
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#endif /* __EDIT_CLA_HPP__ */
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

View File

@@ -0,0 +1,225 @@
/*
*=======================================================================================
* Name :ipo_dlgs.h
*
* Author :VL Date :30/06/97
*
* Description :declaration of dialogs for IPO interface
*=======================================================================================
* Modification -> Author : Date :
* Description :
*=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#if !defined(AFX_IPO_DLGS_H__F1425899_F11B_11D0_8EE2_00609736731A__INCLUDED_)
#define AFX_IPO_DLGS_H__F1425899_F11B_11D0_8EE2_00609736731A__INCLUDED_
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "../res/ipo_res.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
class CPA_ObjectDLLBase;
class CPA_BaseObject;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CPhysicalObjectClassDialog form view
=======================================================================================
*/
#ifndef __AFXEXT_H__
#include <afxext.h>
#endif
//ANNECY Shaitan Correction (15/04/98) {
class IPOInterface;
//ENDANNECY Shaitan Correction }
class CPhysicalObjectClassDialog : public CFormView
{
public:
CPhysicalObjectClassDialog(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CPhysicalObjectClassDialog)
// Form Data
public:
//{{AFX_DATA(CPhysicalObjectClassDialog)
enum { IDD = IDD_DIALOG_POCLASS };
//}}AFX_DATA
// Attributes
public:
//ANNECY Shaitan Correction (15/04/98) {
IPOInterface *m_p_oEditor;
//ENDANNECY Shaitan Correction }
CFrameWnd *m_p_oFrameForDevice3D;
DEV_MultiDevice3D *m_p_oDevice3D;
CPA_Contact *m_p_oContact;
CPA_SuperObject *m_p_oRootSO;
CPA_World *m_p_oWorld;
GLI_tdxHandleToLight m_hLightUp;
GLI_tdxHandleToLight m_hLightDown;
//ANNECY Shaitan Correction (15/04/98) {
DEV_Device *m_p_oMainDevice;
/*
BOOL m_bMainDeviceWasSwapped;
BOOL m_b3DView;
*/
//ENDANNECY Shaitan Correction }
// Operations
public:
//ANNECY Shaitan Correction (15/04/98) {
void fn_vSetEditor( IPOInterface *_p_oEditor ) { m_p_oEditor = _p_oEditor; }
//ENDANNECY Shaitan Correction }
void fn_vInitDevice( void );
void fn_vInitClassList( void );
void fn_vRefreshModelList( CPA_BaseObject *p_oClass );
void fn_vRefreshModelList( void );
void fn_vSaveBitmap( char *szFileName, int iWidth, int iHeight, COLORREF *a_stPixel);
BOOL fn_bGetClassVignetteName( CPA_BaseObject *p_oClass, char *szVignetteName );
BOOL fn_bGetPOModelVignetteName( CPA_BaseObject *p_oPO, char *szVignetteName );
BOOL fn_bGetCurrentPOModelVignetteName( char *szVignetteName );
void fn_vOnClose( void );
void fn_vOnOpen( void );
//ANNECY Shaitan Correction (15/04/98) {
CFrameWnd * GetFrameForDevice3D (void) { return m_p_oFrameForDevice3D; }
DEV_MultiDevice3D * GetDevice3D (void) { return m_p_oDevice3D; }
//ENDANNECY Shaitan Correction }
//ROMTEAM WorldEditor (Cristian Stegaru 11/97)
void fn_vUpdateClassList ()
{
OnSelchangeListPoclass();
fn_vRefreshModelList ();
InvalidateRect (NULL);
}
//ENDROMTEAM WorldEditor (Cristian Stegaru)
// CPA2 ASilvescu 98-04-09
void DisplayModelIcon();
// End CPA2 ASilvescu 98-04-09
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPhysicalObjectClassDialog)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
//}}AFX_VIRTUAL
// Implementation
protected:
virtual ~CPhysicalObjectClassDialog();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
//{{AFX_MSG(CPhysicalObjectClassDialog)
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
afx_msg void OnDblclkListPoclass();
afx_msg void OnSelchangeListPoclass();
afx_msg void OnDblclkListPomodel();
afx_msg void OnSelchangeListPomodel();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnRadioAllclasses();
afx_msg void OnRadioLoadedmodels();
afx_msg void OnRadioAllmodels();
afx_msg void OnRadioSelectedclass();
afx_msg void OnButtonCreatevignette();
afx_msg void OnCheck3dview();
afx_msg void OnDestroy();
//ROMTEAM WorldEditor (Cristian Stegaru 11/97)
afx_msg void OnButtonIndexedTriangle ();
//ENDROMTEAM WorldEditor (Cristian Stegaru)
// CPA2 ASilvescu 98-04-09
afx_msg void OnCreateModelIcon();
// End CPA2 ASilvescu 98-04-09
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/*
=======================================================================================
CIPOEditionDialog form view
=======================================================================================
*/
class CIPOEditionDialog : public CFormView
{
protected:
CIPOEditionDialog(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CIPOEditionDialog)
// Form Data
public:
//{{AFX_DATA(CIPOEditionDialog)
enum { IDD = IDD_DIALOG_POANDDELTARLI };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Attributes
public:
CPA_ObjectDLLBase *m_p_oEditor;
EditorIPO *m_p_oIPO;
GEO_tdxHandleToVisualSet m_hVisualSet;
ACP_tdxIndex m_xNbLods;
ACP_tdxIndex m_xCurrentLod;
ACP_tdxIndex m_xSwapLod;
ACP_tdxHandleOfObject m_xCurrentGeom;
ACP_tdxIndex m_xNumberOfPoints;
// Operations
public:
void fn_vSetEditor( CPA_ObjectDLLBase *_p_oEditor ) { m_p_oEditor = _p_oEditor; }
void fn_vUpdateIPO( EditorIPO *_p_oIPO );
void m_fn_vShowCurrentLod( void );
ACP_tdxIndex m_fn_xGetClickedLodIndex( void );
void m_fn_vSwapLOD( ACP_tdxIndex _xLod, BOOL _bRestore, BOOL _bRedraw );
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CIPOEditionDialog)
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 ~CIPOEditionDialog();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
//{{AFX_MSG(CIPOEditionDialog)
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
afx_msg void OnButtonEditpo();
afx_msg void OnButtonLod();
afx_msg void OnDoubleclickedButtonLod();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnDestroy();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
#endif // !defined(AFX_IPO_DLGS_H__F1425899_F11B_11D0_8EE2_00609736731A__INCLUDED_)

View File

@@ -0,0 +1,204 @@
/*=========================================================================
*
* ipo_intf.hpp : IPO DLL Interface - definition
*
* Version 2.0
* Creation date 22/05/97 Author : Vincent Lhullier
* Revision date 26/06/97 Author : Shaitan
* 02/07/97 Author : Vincent Lhullier
*
* Shaitan
*=======================================================================*/
#ifndef __IPO_INTF_HPP__
#define __IPO_INTF_HPP__
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "incGAM.h"
#include "x:\cpa\main\inc\_editid.h"
#include "OIT/Edit_IPO.hpp"
#include "IPO_Dlgs.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*=======================================================================================
Query action definition
=======================================================================================*/
#define C_IPO_dwLoadPhysicalObjectClass 1
//ROMTEAM WorldEditor (Cristian Stegaru 11/97)
#define C_IPO_uiCreateITModel 2
class EditorPOClass;
//ENDROMTEAM WorldEditor (Cristian Stegaru)
//CPA2 Stegaru Cristian 98-04
static char szITObjectsExt[] = ".ito";
//End CPA2 Stegaru Cristian 98-04
/*===========================================================================
* Description: IPO DLL Interface
* Creation date: 22/05/97
* Author: Vincent Lhullier
*---------------------------------------------------------------------------
* Revision date: 18/08/97 Author: Shaitan
*=========================================================================*/
class IPOInterface : public CPA_ObjectDLLBase
{
private:
CSplitFrame *m_p_oLeftFrame;
CPA_DialogList *m_p_oDialogList;
CPhysicalObjectClassDialog *m_p_oPOClassDlg;
CIPOEditionDialog *m_p_oIPOEditDlg;
BOOL m_bAllClassCreated;
EditorIPO *m_p_oSelectedIPO;
CPA_BaseObject *m_p_oSelectedSuperObject;
//ROMTEAM WorldEditor (Cristian Stegaru 11/97)
EditorPOClass *m_pEPOInxTriangle;
//ENDROMTEAM WorldEditor (Cristian Stegaru)
//CPA2 Stegaru Cristian 98-04
CStringList m_lstOfInitialITObjects;
//End CPA2 Stegaru Cristian 98-04
//ANNECY Shaitan Correction (15/04/98) {
public:
BOOL m_b3DView;
BOOL m_bMainDeviceWasSwapped;
DEV_Device *m_p_oMainDevice;
//ENDANNECY Shaitan Correction }
// CPA2 ASilvescu 98-04-14
public:
CPA_SuperObject *m_pSelectedSPO;
GEO_tdxHandleToMatrix m_SPOMatrix;
GEO_tdxHandleToMatrix m_SPOGlobelMatrix;
// CPA2 ASilvescu 98-04-14
public:
IPOInterface (void);
//ANNECY Shaitan Correction (15/04/98) {
BOOL fn_bIs3DView (void) { return m_b3DView; }
void fn_vSet3DView (BOOL b3DView);
//ENDANNECY Shaitan Correction }
// ==> Inits
void fn_vJustAfterRegistered (void);
void fn_vConstruct (void);
// ==> Reinit world
void fn_vOnChangeRoot (void);
void fn_vOnChangeWorld (void);
void fn_vOnChangeDevice (void);
// ==> Editor <-> Engine
void fn_vBeforeEngine (void);
void fn_vBeforeEditor (void);
// ==> Current Editor
tdePermission fn_eAcceptNewEditor (CPA_EditorBase *pNewDLL) { return C_CloseBefore; }
BOOL fn_bCanActivateEditor (CPA_List<CPA_BaseObject> *pParam);
BOOL fn_bCanCloseEditor (void);
void fn_vOnActivateEditor (CPA_List<CPA_BaseObject> *pParam, BOOL bBackActivated=FALSE);
void fn_vOnCloseEditor (void);
/*===========================================================================
Dialog Bar - Mircea Dunka 31 Aug. 1998
=========================================================================*/
void fn_vDefineDlgBarBtnIcon (tde_DlgBarCategory wCategory, tds_DlgBarBtn *_pDlgBarBtn);
// ==> Menus
BOOL fn_bDefineSubMenu (EDT_SubMenu *p_oEDTSubMenu);
void _OnSubMenuCommand (EDT_SubMenu *p_oEDTSubMenu, UINT uiMsgID);
BOOL fn_bDefinePopupMenu (EDT_PopUpMenu *pPopup, CPA_List<CPA_SuperObject> *pSelection, BOOL bIsAlone);
void _OnPopUpMenuCommand (UINT m_IDCmdMsg);
// ==> Hierarchy Inits
void fn_vInitListsOfModels (void);
void fn_vInitListByType (CPA_World *pWorld);
BOOL fn_bCanHandleThisType (long lEngineType);
// ==> Hierarchy Build
CPA_SuperObject *GetNewEditorInstance (HIE_tdxHandleToSuperObject hEngineInstance);
void fn_vBuildNewEditorInstance (CPA_SuperObject *pEditorInstance, HIE_tdxHandleToSuperObject hEngineInstance);
void fn_vUpdateEditorInstance (CPA_SuperObject *pEditorInstance, HIE_tdxHandleToSuperObject pEngineInstance);
// ==> models & instances
tdeTypeSO GetTypeInstance (CString csTypeName, CString csModelName);
//ANNECY Shaitan EmptySectors 25/02/98
tdeSaveStatus GetStatusInstance (CString csTypeName, CString csModelName);
//ENDANNECY Shaitan EmptySectors
CPA_SuperObject *GetNewInstance (CString csTypeName, CString csModelName, CPA_SuperObject *pParent);
CPA_BaseObject *Duplicate (CPA_BaseObject *pObject, CPA_SuperObject *pNewSuperObject);
// ==> Editor Modifs
void fn_vOnModifDelete (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus);
void fn_vOnModifCopy (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus);
void fn_vOnModifInsert (CPA_SuperObject *pEdObj, CPA_SuperObject *pParent,tdstPosition *p_stPosition, tdeTypeModif eType, tdeStatus eStatus);
void fn_vOnModifMove (CPA_List<EDT_SavePos> *pListObjects, CPA_List<EDT_SaveGlobalPos> *pListConcerned, tdeTypeModif eType, tdeStatus eStatus);
void fn_vOnSelect (CPA_SuperObject *pEdObj, tdeTypeModif eType, tdeStatus eStatus);
// ==> for Dialog List
CPA_BaseObject *GetDialogSelection (CPA_DialogList *pDialog, CString csTypeName, tdeListDrawMode eDrawMode);
void GetListsForDialog (CPA_DialogList *pDialog);
void fn_vInitDefaultParameters (CPA_DialogList *pDialog);
BOOL fn_bOnSelChangeListObjects (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pSelectedObject, BOOL bUnselect);
// ==> Bounding volume
void fn_vComputeBoundingVolume (CPA_BaseObject *pObj);
ACP_tdxHandleOfObject fn_hGetBoundingVolume (CPA_BaseObject *pObj);
// ==> Load
long OnQueryAction (CPA_EditorBase *p_oSender, WPARAM wQuery, LPARAM lParam);
BOOL fn_bLoadBaseObject (CPA_BaseObject *p_oObject);
// ==> specific functions
void fn_vFindAllClasses (void);
BOOL fn_bGetIPOFromListOrSelection( CPA_List<CPA_BaseObject> *_p_oListObjects );
BOOL fn_bGetIPOFromObject ( CPA_BaseObject *_p_oObject );
//ROMTEAM WorldEditor (Nicu 10/11/97)
BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
BOOL _OnMouseMove (UINT nFlags, tdstMousePos * p_stPos, MTH3D_tdstVector * p_stObject);
BOOL _OnLButtonDown (UINT nFlags, tdstMousePos * p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo * p_stObject);
BOOL _OnRButtonDown (UINT nFlags, tdstMousePos * p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo * p_stObject);
BOOL _OnLButtonUp (UINT nFlags, tdstMousePos * p_stPos); // Called when the left button is released
BOOL _OnKeyDown (UINT _nChar , UINT , UINT);
BOOL _OnKeyUp (UINT _nChar , UINT , UINT);
//CPA2 Stegaru Cristian 98-04
EditorPOClass * mfn_pGetITClass () { return m_pEPOInxTriangle;}
virtual void fn_vAfterSaveAll (void);
CStringList & GetInitialITObjectsList () { return m_lstOfInitialITObjects;}
//End CPA2 Stegaru Cristian 98-04
private:
EditorPO* mfn_vCreateCloneGeomPO (EditorPO *po);
void mfn_vCreateITDirectory (void);
//ENDROMTEAM WorldEditor (Nicu)
//CPA2 Stegaru Cristian 98-04
void mfn_vLoadITObjects ();
void mfn_vSaveITObjects ();
CString mfn_csGetITObjectsFileName ();
void mfn_vLoadBaseITObject (CPA_BaseObject *pObject, CString csITObjectName);
//End CPA2 Stegaru Cristian 98-04
};
/*=======================================================================================
DLL identity structure
=======================================================================================*/
#undef extern
extern tdstDLLIdentity g_stIPOIdentity;
#endif //__IPO_INTF_HPP__

View File

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

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,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,118 @@
/*
*=======================================================================================
* Name : dllcom.cpp
* Author : C. Beaudet Date :20/05/97
* Description : Common functions for Object DLL capabilities
*=======================================================================================
* Modification -> Author : VL Date : 20/05/97
* Description : Common functions for Instanciated Physical Object DLL Test
*=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include "acp_base.h"
#include "afxdllx.h"
#include "ITF.h"
#include "IPO_intf.hpp"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
Globals
=======================================================================================
*/
static char *gs_p_szCPAVersion = C_szCPAVersion;
static AFX_EXTENSION_MODULE NEAR extensionDLL = { NULL, NULL };
static IPOInterface *gs_p_oIPOInterface = NULL;
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;
}
/*
----------------------------------------------------------------------------------------
Description : Get type of this DLL
Returns (tdstDLLIdentity )
----------------------------------------------------------------------------------------
*/
extern "C" tdstDLLIdentity __declspec(dllexport) *fn_p_stGetDLLIdentity(void)
{
g_stIPOIdentity.eType = OBJECT_DLL; //object DLL type
g_stIPOIdentity.csName = C_szDLLInstanciatedPhysicalObjectName; //object DLL name (unique name)
g_stIPOIdentity.hModule = NULL; //********************** private internal
g_stIPOIdentity.p_oListOfInstances = &g_oListOfInstances; //********************** private internal
return &g_stIPOIdentity;
}
/*
----------------------------------------------------------------------------------------
Description : Init DLL function
----------------------------------------------------------------------------------------
*/
extern "C" void WINAPI fn_vInitDll(void)
{
new CDynLinkLibrary(extensionDLL);
}
/*
----------------------------------------------------------------------------------------
Description : DLL main function
hInstance -> DLL instance
dwReason -> reason of DLL loading
lpReserved ->
Returns ( int )
----------------------------------------------------------------------------------------
*/
extern "C" int __stdcall DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
if (!AfxInitExtensionModule(extensionDLL, hInstance))
return 0;
}
return 1;
}
/*
----------------------------------------------------------------------------------------
Description : Get the DLL
lKey -> number of DLL
Returns (CPA_DLLBase )
----------------------------------------------------------------------------------------
*/
extern "C" CPA_DLLBase __declspec(dllexport) *fn_p_oGetDLL(long lKey)
{
switch(lKey)
{
case 0: // the game world
if (gs_p_oIPOInterface == NULL)
{
gs_p_oIPOInterface = new IPOInterface();
ASSERT(gs_p_oIPOInterface != NULL);
}
return gs_p_oIPOInterface;
break;
default:
return NULL;
}
}

View File

@@ -0,0 +1,161 @@
/*
*=======================================================================================
* Name :edit_cla.cpp
*
* Author : Vincent Lhullier Date :30/06/97
*
* Description : Editor classe object
*=======================================================================================
* Modification -> Author : Date :
* Description :
*=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include "acp_base.h"
#include "ITF.h"
#include "DPT.h"
#include "Edit_Cla.hpp"
#include "OPD.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
----------------------------------------------------------------------------------------
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
----------------------------------------------------------------------------------------
*/
EditorPOClass::EditorPOClass
(
char *_szName,
CPA_EditorBase *_pEditor,
CPA_BaseObject *_pOwner /*= NULL*/,
BOOL _bAvailable /*= FALSE*/
)
:CPA_BaseObject
(
_pEditor,
C_szPhysicalObjectClassTypeName,
_pOwner,
_bAvailable
)
{
// name
fn_eRename( _szName );
};
/*
----------------------------------------------------------------------------------------
Description : Destructor
----------------------------------------------------------------------------------------
*/
EditorPOClass::~EditorPOClass()
{
}
/*
----------------------------------------------------------------------------------------
Description : callback to analyse PO section
----------------------------------------------------------------------------------------
*/
SCR_tde_Anl_ReturnValue fn_eCallbackForPhySection(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType)
{
EditorPOClass *p_oClass;
SCR_M_RdL0_GetContextLong( 0, 0, EditorPOClass *, p_oClass );
switch (cType)
{
case SCR_EA_Anl_BeginSection:
{
CPA_ObjectDLLBase *p_oPODll;
char szFileName[ 255 ];
p_oPODll = p_oClass->GetMainWorld()->GetObjectDLLWithName( C_szDLLPhysicalObjectName );
strcpy( szFileName, SCR_M_RdL0_GetCompleteSectionNameR(0) );
p_oPODll->OnQueryAction( (CPA_EditorBase *) p_oClass, OPD_ActionCreateEmptyPO, (LPARAM) szFileName );
}
return SCR_ERV_Anl_TerminateCurrentSection;
}
return SCR_ERV_Anl_NormalReturn;
}
/*
----------------------------------------------------------------------------------------
Description : load editor po contained in class
----------------------------------------------------------------------------------------
*/
BOOL EditorPOClass::fn_bLoadEditorPO( void )
{
SCR_tdst_Anl_Callback *p_stCallBack;
SCR_tdpfn_Anl_Callback pfn_eOldCallBack;
char szFileName[ _MAX_PATH ];
BOOL bIsLoadingWorld;
p_stCallBack = SCR_fnp_st_RdL0_GetRegisterCallback( C_Section_POGeneral, SCR_CRC_c_RdL0_ForSection );
pfn_eOldCallBack = p_stCallBack->pfn_eCallback;
p_stCallBack->pfn_eCallback = fn_eCallbackForPhySection;
bIsLoadingWorld = GetEditor()->GetInterface()->fn_bIsLoadingWorld();
GetEditor()->GetInterface()->SetLoadingWorld( TRUE );
SCR_M_RdL0_SetContextLong( 2, 0, (long ) this );
sprintf( szFileName, "%s\\%s\\%s.phy", fn_szGetGraphicsClassesDataPath(), GetName(), GetName() );
SCR_fnp_st_RdL0_AnalyseSection( szFileName, SCR_CDF_uw_Anl_Normal);
GetEditor()->GetInterface()->SetLoadingWorld(bIsLoadingWorld);
SCR_fn_v_RdL0_DeleteOpenSection( szFileName, SCR_CDR_c_RdL0_Contains );
p_stCallBack->pfn_eCallback = pfn_eOldCallBack;
SetAvailable( TRUE );
return TRUE;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Method : mfn_vLoadITEditorPO
// Date : 98-04
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Description :
// Author : Stegaru Cristian - CPA2
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Modification :
// Date :
// By :
//////////////////////////////////////////////////////////////////////////////////////////////////////
void EditorPOClass::mfn_vLoadITEditorPO (CString csITName)
{
SCR_tdst_Anl_Callback *p_stCallBack;
SCR_tdpfn_Anl_Callback pfn_eOldCallBack;
char szSectionName[2 * _MAX_PATH ];
BOOL bIsLoadingWorld;
p_stCallBack = SCR_fnp_st_RdL0_GetRegisterCallback( C_Section_POGeneral, SCR_CRC_c_RdL0_ForSection );
pfn_eOldCallBack = p_stCallBack->pfn_eCallback;
p_stCallBack->pfn_eCallback = fn_eCallbackForPhySection;
bIsLoadingWorld = GetEditor()->GetInterface()->fn_bIsLoadingWorld();
GetEditor()->GetInterface()->SetLoadingWorld( TRUE );
SCR_M_RdL0_SetContextLong( 1, 0, (long ) this );
sprintf (szSectionName, "%s\\%s\\%s.phy^PHY:%s", fn_szGetLevelsDataPath (), fn_p_szGetLevelName () , fn_p_szGetLevelName (), csITName);
SCR_fnp_st_RdL0_AnalyseSection (szSectionName, SCR_CDF_uw_Anl_Normal);
GetEditor()->GetInterface()->SetLoadingWorld(bIsLoadingWorld);
SCR_fn_v_RdL0_DeleteOpenSection (szSectionName, SCR_CDR_c_RdL0_Contains);
p_stCallBack->pfn_eCallback = pfn_eOldCallBack;
SetAvailable( TRUE );
}

View File

@@ -0,0 +1,32 @@
//BEGIN FS 10/10/98
int LoadForPhyFile( LDT_tdst_Link *pLink )
{
LDT_tdeParseResult result=ParseResult_BeginSection;
char *szSectionName;
result=LDT_GetNextEntry();
while( result==ParseResult_BeginSection )
{
szSectionName=LDT_szGetEntryName();
switch (*(long*)(szSectionName))
{
case 'YHP': //"PHY" section
{
CPA_ObjectDLLBase *p_oPODll;
char szFileName[ 255 ];
int iLen;
p_oPODll = p_oClass->GetMainWorld()->GetObjectDLLWithName( C_szDLLPhysicalObjectName );
// strcpy( szFileName, SCR_M_RdL0_GetCompleteSectionNameR(0) );
iLen=LDT_ComputeSectionName(pLink,szFileName);
p_oPODll->OnQueryAction( (CPA_EditorBase *) p_oClass, OPD_ActionCreateEmptyPO, (LPARAM) szFileName+iLen );
break;
}
default:
LDT_SkipSection();
}//end switch
result=LDT_GetNextEntry();
}//end while
return 0;
}
//END FS 10/10/98

View File

@@ -0,0 +1,527 @@
/*=========================================================================
*
* edit_ipo.hpp : EditorIPO class - definition
*
* Version 3.0
* Creation date 09/04/97 Author : Vincent Lhullier
* Revision date 26/06/97 Author : Shaitan
* 03/07/97 Author : Vincent Lhullier
* 18/08/97 Author : Shaitan
*
* Shaitan
*=======================================================================*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include "acp_base.h"
#include "ITF.h"
#include "OIT/Edit_IPO.hpp"
#include "IPO_intf.hpp"
#include "DPT.h"
#include "ISI.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
DeclareTemplateStatic(IPO_tdxHandleToIPO);
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*===========================================================================
* Description: Static init (engine struct)
* Creation date:
* Author: Vincent Lhullier
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
void EditorIPO::StaticInit (void)
{
CPA_EdMot<IPO_tdxHandleToIPO>::Init
(
IPO_fn_hAllocInstanciatedPhysicalObject,
NULL,
IPO_fn_vFreeInstanciatedPhysicalObject
);
}
//#################################################################################
// Constructor / Destructor
//#################################################################################
/*===========================================================================
* Description: Constructor
* Creation date:
* Author: Vincent Lhullier
*---------------------------------------------------------------------------
* Revision date: 18/08/97 Author: Shaitan
*=========================================================================*/
EditorIPO::EditorIPO (CPA_ObjectDLLBase *p_oDLL,
IPO_tdxHandleToIPO hObj,
CString csName,
CString csFileName,
CString csSectionName,
BOOL bExistingSection,
unsigned long ulType
)
: CPA_SaveObject (p_oDLL, // owner editor
C_szInstanciatedPhysicalObjectTypeName, // type
E_ss_Responsible, // status
NULL, // owner
TRUE, // validity
fn_szGetLevelsDataPath(), // data path
EditorIPO::CallBackSaveIPO // call back for save
),
CPA_EdMot<IPO_tdxHandleToIPO> (hObj),
m_ulType(ulType)
{
PO_tdxHandleToPhysicalObject hPO;
CPA_ObjectDLLBase *p_oDLLPO;
char szSectionName[SCR_CV_ui_Cfg_MaxLenName];
char *szLevelsDataPath = fn_szGetLevelsDataPath();
// section object
SetSectionData(this);
// check if filename is complete filename
if (strnicmp( (char *)(LPCTSTR) csFileName, szLevelsDataPath, strlen(szLevelsDataPath) ) == 0)
csFileName = csFileName.Mid( strlen( szLevelsDataPath ) + 1 );
// section name
SCR_fn_v_RdL0_ComputeSectionName
(
szSectionName,
(char *)(LPCTSTR)csFileName,
(char *) (LPCTSTR) csSectionName,
" "
);
SetReferencedSectionName(szSectionName);
// section exists !
SetExistingSection( bExistingSection );
// build editor PO
p_oDLLPO = GetMainWorld()->GetObjectDLLWithName(C_szDLLPhysicalObjectName);
if (p_oDLLPO != NULL)
{
hPO = IPO_fn_hGetPhysicalObject( hObj );
m_p_oPhysicalObject = (EditorPO *) p_oDLLPO->OnQueryAction( NULL, OPD_ActionEncapsulateObject, (LPARAM) hPO );
}
// TEMP comment by jt
// build RLI section
// m_pSectionRLI = new CPA_SectionObject
// (
// GetRLISectionName(),
// fn_szGetLevelsDataPath(),
// EditorIPO::CallBackSaveRLI,
// this,
// fn_bCanSaveRLI()
// );
// name
if (fn_eRename(csName) != E_mc_None)
SetDefaultValidName();
fn_vUpdateSectionName();
};
/*===========================================================================
* Description: Copy-Constructor
* Creation date:
* Author: Vincent Lhullier
*---------------------------------------------------------------------------
* Revision date: 18/08/97 Author: Shaitan
*=========================================================================*/
EditorIPO::EditorIPO (EditorIPO &r_oSource)
: CPA_SaveObject(r_oSource),
CPA_EdMot<IPO_tdxHandleToIPO>()
{
PO_tdxHandleToPhysicalObject hPO;
CString csSectionName;
char szSectionName[SCR_CV_ui_Cfg_MaxLenName];
char szActionName[SCR_CV_ui_Cfg_MaxLenName];
char szFileName[SCR_CV_ui_Cfg_MaxLenName];
char szName[SCR_CV_ui_Cfg_MaxLenName];
// copy physical object
m_p_oPhysicalObject = r_oSource.m_p_oPhysicalObject;
m_ulType = r_oSource.m_ulType;
hPO = IPO_fn_hGetPhysicalObject((IPO_tdxHandleToInstanciatedPhysicalObject) r_oSource.GetEngineStruct());
IPO_fn_vSetPhysicalObject(GetStruct(), hPO);
// init radiosoty
IPO_fn_vSetRadiosity(GetStruct(), NULL);
// TEMP comment by jt
// m_pSectionRLI = new CPA_SectionObject
// (
// GetRLISectionName(),
// fn_szGetLevelsDataPath(),
// EditorIPO::CallBackSaveRLI,
// this,
// FALSE
// );
// section object
SetSectionData(this);
// section name
csSectionName = r_oSource.GetReferencedSectionName();
SCR_fn_v_RdL0_SplitSectionName((char*)(LPCTSTR) csSectionName, szFileName, szActionName, szName);
SCR_fn_v_RdL0_ComputeSectionName(szSectionName, szFileName, szActionName, " ");
SetReferencedSectionName(szSectionName);
// existence
SetExistingSection(FALSE);
// name
SetDefaultValidName();
fn_vUpdateSectionName();
// notify
fn_vNotifySave();
}
/*===========================================================================
* Description: Destructor
* Creation date:
* Author: Vincent Lhullier
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
EditorIPO::~EditorIPO()
{
if (M_GetMainApp()->m_bLeavingApplication == FALSE)
{
if (m_p_oPhysicalObject != NULL)
delete m_p_oPhysicalObject;
}
}
//#################################################################################
// RLI section
//#################################################################################
/*===========================================================================
* Description: Get section name for RLI
* Creation date: 26/06/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
CString EditorIPO::GetRLISectionName( void )
{
CString oSectionName;
CString oFileName, oRLIFileName;
CString oName, oRLIName;
char szSectionName[SCR_CV_ui_Cfg_MaxLenName];
char szFileName[SCR_CV_ui_Cfg_MaxLenName];
char szName[SCR_CV_ui_Cfg_MaxLenName];
char *p_cReplace;
// get name & file name
oSectionName = GetReferencedSectionName();
SCR_fn_v_RdL0_SplitSectionName((char*)(LPCSTR) oSectionName, szFileName, szSectionName, szName);
oFileName = szFileName;
oName = szName;
// build RLI name
oRLIFileName = oFileName.Left (oFileName.GetLength() - 4) + ".RLI";
//ANNECY Shaitan Correction 07/05/98 {
while ((p_cReplace = strstr(szName,"IPO")) !=NULL)
{
*p_cReplace = 'I';
p_cReplace++;
*p_cReplace = 'S';
p_cReplace++;
*p_cReplace = 'I';
}
oRLIName = szName;
//ENDANNECY Shaitan Correction }
// build section name
SCR_fn_v_RdL0_ComputeSectionName
(
szSectionName,
(char*)(LPCSTR)oRLIFileName,
"ISI",
(char*)(LPCSTR)oRLIName
);
oSectionName = szSectionName;
return oSectionName;
}
/*===========================================================================
* Description: Test if there is RLI section
* Creation date: 26/06/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
BOOL EditorIPO::fn_bCanSaveRLI (void)
{
return (IPO_fn_hGetRadiosity(GetStruct()) != NULL);
}
//#################################################################################
// Notifications
//#################################################################################
/*===========================================================================
* Description: notification to save IPO
* Creation date:
* Author: Vincent Lhullier
*---------------------------------------------------------------------------
* Revision date: 26/06/97 Author: Shaitan
*=========================================================================*/
void EditorIPO::fn_vNotifySave (void)
{
// check save status
if (!fn_bCanBeNotified())
return;
// main section
CPA_SaveObject::fn_vNotifySave();
// TEMP comment by jt
// RLI section
// if (fn_bCanSaveRLI())
// m_pSectionRLI->fn_vWriteSection();
}
/*===========================================================================
* Description: notification to delete IPO
* Creation date:
* Author: Vincent Lhullier
*---------------------------------------------------------------------------
* Revision date: 26/06/97 Author: Shaitan
*=========================================================================*/
void EditorIPO::fn_vNotifyUnSave (void)
{
// check save status
if (!fn_bCanBeNotified())
return;
// main section
CPA_SaveObject::fn_vNotifyUnSave();
// TEMP comment by jt
// RLI section
// if (fn_bCanSaveRLI())
// m_pSectionRLI->fn_vDeleteSection();
}
/*===========================================================================
* Description: restore IPO notification
* Creation date:
* Author: Vincent Lhullier
*---------------------------------------------------------------------------
* Revision date: 26/06/97 Author: Shaitan
*=========================================================================*/
void EditorIPO::fn_vNotifyRestore(void)
{
// check save status
if (!fn_bCanBeNotified())
return;
// main section
CPA_SaveObject::fn_vNotifyRestore();
// TEMP comment by jt
// RLI section
// if (fn_bCanSaveRLI())
// m_pSectionRLI->fn_vRestoreSection();
}
/*===========================================================================
* Description: notification to rename IPO
* Creation date:
* Author: Vincent Lhullier
*---------------------------------------------------------------------------
* Revision date: 26/06/97 Author: Shaitan
*=========================================================================*/
void EditorIPO::fn_vNotifyRename(void)
{
// check save status
if (!fn_bCanBeNotified())
return;
// main section
CPA_SaveObject::fn_vNotifyRename();
// TEMP comment by jt
// RLI section
// if (fn_bCanSaveRLI())
// m_pSectionRLI->fn_vRenameSection(GetRLISectionName());
}
/*===========================================================================
* Description: change sections names when IPO is renamed
* Creation date:
* Author: Vincent Lhullier
*---------------------------------------------------------------------------
* Revision date: 26/06/97 Author: Shaitan
*=========================================================================*/
void EditorIPO::fn_vUpdateSectionName (void)
{
// update main section
CPA_SaveObject::fn_vUpdateSectionName();
// update matrix section
// TEMP comment by jt
// m_pSectionRLI->SetReferencedSectionName(GetRLISectionName());
}
//#################################################################################
// Callbacks
//#################################################################################
/*===========================================================================
* Description: callback to save IPO
* Creation date:
* Author: Vincent Lhullier
*---------------------------------------------------------------------------
* Revision date: 26/06/97 Author: Shaitan
*=========================================================================*/
void EditorIPO::CallBackSaveIPO( SCR_tdst_File_Description *p_stFile, char *p_szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction)
{
EditorIPO *p_oIPO;
char szActionName[SCR_CV_ui_Cfg_MaxLenName];
char szName[SCR_CV_ui_Cfg_MaxLenName];
char szSection[SCR_CV_ui_Cfg_MaxLenName];
// get parameters
p_oIPO = (EditorIPO *) p_vData;
switch (eAction)
{
case SCR_EA_Ntfy_AddSection:
// add section => end of file
SCR_fn_v_SvL1_ToEndSection(p_stFile);
SCR_M_SvL0_SaveBlankLine (p_stFile);
case SCR_EA_Ntfy_RebuildSection:
// begin section
SCR_fn_v_RdL0_SplitSectionName( p_szSectionName, NULL, szActionName, szName);
SCR_fn_v_RdL0_ComputeSectionName( szSection, NULL, szActionName, szName);
SCR_M_SvL0_SaveBeginSection(p_stFile, szSection, SCR_CC_C_Cfg_EOL);
// PO Entry
SCR_M_SvL0_SaveEntry(p_stFile, "PO", SCR_CC_C_Cfg_NoChar);
SCR_fn_v_SvL0_SaveParameters_MP(p_stFile, SCR_EF_SvL0_Normal, 1,
(char *) (LPCTSTR) p_oIPO->GetPhysicalObject()->GetReferencedSectionName());
// RLI Entry
if (p_oIPO->fn_bCanSaveRLI())
{
SCR_M_SvL0_SaveEntry(p_stFile, "RLI", SCR_CC_C_Cfg_NoChar);
// TEMP jt
// SCR_fn_v_SvL0_SaveParameters_MP(p_stFile, SCR_EF_SvL0_Normal, 1,
// (char *) (LPCTSTR) p_oIPO->GetSectionRLI()->GetReferencedSectionName());
SCR_fn_v_SvL0_SaveParameters_MP(p_stFile, SCR_EF_SvL0_Normal, 1,
(char *) (LPCTSTR) p_oIPO->GetRLISectionName());
// end jt
}
// end section
SCR_M_SvL0_SaveEndSection(p_stFile, SCR_CC_C_Cfg_EOL);
// update instance
p_oIPO->fn_vSectionSaved();
break;
case SCR_EA_Ntfy_DeleteSection:
// update instance
p_oIPO->fn_vSectionDeleted();
break;
}
}
/*===========================================================================
* Description: callback to save IPO
* Creation date: 26/06/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*void EditorIPO::CallBackSaveRLI( SCR_tdst_File_Description *p_stFile, char *p_szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction)
{
ACP_tdxHandleToRadiosity hRLI;
CPA_SectionObject *pSectionRLI;
ISI_tdstColor *a_stVertexRLI;
ACP_tdxIndex xI, xNbVertex, xLod;
EditorIPO *p_oIPO;
char szActionName[SCR_CV_ui_Cfg_MaxLenName];
char szName[SCR_CV_ui_Cfg_MaxLenName];
char szSection[SCR_CV_ui_Cfg_MaxLenName];
// get parameters
p_oIPO = (EditorIPO *) p_vData;
pSectionRLI = p_oIPO->GetSectionRLI();
// no RLI => no section
if (!p_oIPO->fn_bCanSaveRLI())
return;
switch (eAction)
{
case SCR_EA_Ntfy_AddSection:
// add section => end of file
SCR_fn_v_SvL1_ToEndSection(p_stFile);
SCR_M_SvL0_SaveBlankLine (p_stFile);
case SCR_EA_Ntfy_RebuildSection:
// get section name
SCR_fn_v_RdL0_SplitSectionName( p_szSectionName, NULL, szActionName, szName);
SCR_fn_v_RdL0_ComputeSectionName( szSection, NULL, szActionName, szName);
// get engine RLI
hRLI = IPO_fn_hGetRadiosity((IPO_tdxHandleToInstanciatedPhysicalObject) p_oIPO->GetEngineStruct());
// save begin section
// save begin section
SCR_M_SvL0_SaveBeginSection(p_stFile, szSection, SCR_CC_C_Cfg_NoChar);
SCR_fn_v_SvL0_SaveParameters_MP(p_stFile, SCR_EF_SvL0_Scanf, 2,"%s,%d", "NBRLOD", ISI_fn_xGetNbLOD(hRLI));
// For all LOD.
for (xLod =0; xLod < ISI_fn_xGetNbLOD(hRLI); xLod++)
{
// get parameters
xNbVertex = ISI_fn_xGetNbVertexRLILOD(hRLI, xLod);
a_stVertexRLI = ISI_fn_dGetVertexRLILOD(hRLI, xLod);
// save entries
SCR_M_SvL0_SaveEntry(p_stFile, "AddLODRLI", SCR_CC_C_Cfg_NoChar);
SCR_fn_v_SvL0_SaveParameters_MP(p_stFile, SCR_EF_SvL0_Scanf, 3,
"%d,%d", xLod, xNbVertex);
// For all RLI of the LOD.
for (xI = 0; xI < xNbVertex; xI++)
{
SCR_M_SvL0_SaveEntry(p_stFile, "AddVertexRLILOD", SCR_CC_C_Cfg_NoChar);
SCR_fn_v_SvL0_SaveParameters_MP(
p_stFile,
SCR_EF_SvL0_Scanf,
5,
"%d,%d,%d,%d",
xI,
(int)a_stVertexRLI[xI].xRed,
(int)a_stVertexRLI[xI].xGreen,
(int)a_stVertexRLI[xI].xBlue);
}
}
// end section
SCR_M_SvL0_SaveEndSection(p_stFile, SCR_CC_C_Cfg_EOL);
// update instance
pSectionRLI->fn_vSectionSaved();
break;
case SCR_EA_Ntfy_DeleteSection:
// update instance
pSectionRLI->fn_vSectionDeleted();
break;
}
}
*/

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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