Add rayman2 source files
This commit is contained in:
92
Rayman_X/cpa/tempgrp/TFa/inc/FAinterf.hpp
Normal file
92
Rayman_X/cpa/tempgrp/TFa/inc/FAinterf.hpp
Normal file
@@ -0,0 +1,92 @@
|
||||
//**************************************
|
||||
// This is the base class of your DLL interface
|
||||
// All methods of CPA_ToolDLLBase are
|
||||
// present in that class.
|
||||
//**************************************
|
||||
|
||||
#ifndef __TFamilyINTERF_HPP__
|
||||
#define __TFamilyINTERF_HPP__
|
||||
|
||||
#include "ITF.h"
|
||||
#include "TFA.h"
|
||||
|
||||
// if you want only one instance of your DLL
|
||||
// activate the next line
|
||||
#define DLL_ONLY_ONE_INSTANCE
|
||||
|
||||
//----------------------------------------------------------
|
||||
// CONSTANTS
|
||||
//----------------------------------------------------------
|
||||
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Tool DLL interface class
|
||||
//----------------------------------------------------------
|
||||
class TFamily_Interface : public CPA_ToolDLLBase
|
||||
{
|
||||
private:
|
||||
long m_lNbUnloadedFamilies;
|
||||
BOOL m_bCompleteLoad;
|
||||
public:
|
||||
BOOL m_bLevelLoad;
|
||||
public:
|
||||
TFamily_Interface(void);
|
||||
//~TFamily_Interface(void);
|
||||
|
||||
|
||||
//====================================================================================
|
||||
//========================= COMMON DLL FUNCTIONS OVERLOAD ============================
|
||||
//====================================================================================
|
||||
|
||||
|
||||
// ACP MEssages Functions overload
|
||||
void fn_vConstruct (void);
|
||||
void fn_vJustAfterRegistered (void);
|
||||
void fn_vLevelChanges (void);
|
||||
|
||||
// Windows MEssages Functions overload
|
||||
|
||||
// to update lists of reachable objects
|
||||
|
||||
// for changes
|
||||
|
||||
// editor Modifs
|
||||
|
||||
// insert
|
||||
|
||||
// moves
|
||||
|
||||
//Menus
|
||||
BOOL fn_bDefineSubMenu (EDT_SubMenu *_p_oEDTSubMenu);
|
||||
void _OnSubMenuCommand (EDT_SubMenu *_p_oEDTSubMenu,UINT uiMsgID);
|
||||
|
||||
//Reachable Objects
|
||||
BOOL fn_bLoadBaseObject (CPA_BaseObject *p_oObject);
|
||||
// Current Editor
|
||||
|
||||
//====================================================================================
|
||||
//=========================== TOOL DLL FUNCTIONS OVERLOAD ============================
|
||||
//====================================================================================
|
||||
|
||||
|
||||
// To communicate with that editor
|
||||
long OnQueryAction (CPA_EditorBase *p_oSender, WPARAM, LPARAM);
|
||||
long OnQueryInfos (CPA_EditorBase *p_oSender, WPARAM, LPARAM);
|
||||
//====================================================================================
|
||||
//=========================== FAMILY TOOL DLL SPECIFIC FUNCTIONS =====================
|
||||
//====================================================================================
|
||||
|
||||
protected:
|
||||
void mfn_vLoadAllFamilies(); // find all families and call for each the mfn_p_oLoadAFamily function
|
||||
long mfn_lGetChannel(tdstChannelInfoSearch *_p_stChannelInfo);
|
||||
void mfn_vLoadPreferences();
|
||||
void mfn_vSavePreferences();
|
||||
void mfn_vCreateUnloadedFamilies();
|
||||
void mfn_vCreateLoadedFamilies();
|
||||
void mfn_vLoadFamilies();
|
||||
|
||||
};
|
||||
|
||||
extern tdstDLLIdentity g_stTFamilyIdentity;
|
||||
|
||||
#endif // __TFamilyINTERF_HPP__
|
18
Rayman_X/cpa/tempgrp/TFa/inc/StdAfx.h
Normal file
18
Rayman_X/cpa/tempgrp/TFa/inc/StdAfx.h
Normal 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__
|
||||
|
101
Rayman_X/cpa/tempgrp/TFa/inc/TFA.rc
Normal file
101
Rayman_X/cpa/tempgrp/TFa/inc/TFA.rc
Normal file
@@ -0,0 +1,101 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "TFA_Res.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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_DLG_LOAD DIALOG DISCARDABLE 0, 0, 142, 222
|
||||
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
|
||||
CAPTION "Load Families"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Load",IDOK,7,201,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,85,201,50,14
|
||||
LISTBOX IDC_LB_FAMILIES,7,23,126,169,LBS_SORT |
|
||||
LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
LTEXT "List of not loaded families",IDC_TEXT,7,7,128,8
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_DLG_LOAD, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 135
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 215
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"TFA_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
|
||||
|
||||
#endif // French (France) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
19
Rayman_X/cpa/tempgrp/TFa/inc/TFA_Res.h
Normal file
19
Rayman_X/cpa/tempgrp/TFa/inc/TFA_Res.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by TFA.rc
|
||||
//
|
||||
#define IDD_DLG_LOAD 101
|
||||
#define IDC_LB_FAMILIES 1000
|
||||
#define IDC_TEXT 1001
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_3D_CONTROLS 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 102
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1002
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
67
Rayman_X/cpa/tempgrp/TFa/inc/dlgload.hpp
Normal file
67
Rayman_X/cpa/tempgrp/TFa/inc/dlgload.hpp
Normal file
@@ -0,0 +1,67 @@
|
||||
#if !defined(AFX_DLGLOAD_HPP__C0AF82E3_C60F_11D0_B17D_0060973673C5__INCLUDED_)
|
||||
#define AFX_DLGLOAD_HPP__C0AF82E3_C60F_11D0_B17D_0060973673C5__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
// dlgload.hpp : header file
|
||||
#include "TFA_Res.h"
|
||||
//
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgLoad dialog
|
||||
|
||||
class CDlgLoad : public CDialog
|
||||
{
|
||||
//CPA2 Stegaru Cristian 98-06
|
||||
private:
|
||||
CPA_EditorBase *m_pActorDLL;
|
||||
//End CPA2 Stegaru Cristian 98-06
|
||||
|
||||
public:
|
||||
CPA_List<CPA_BaseObject> m_oListOfLoadedFamilies;
|
||||
CPA_BaseObjectList *m_p_oListOfFamilies;
|
||||
|
||||
// Construction
|
||||
public:
|
||||
CDlgLoad(CWnd* pParent = NULL); // standard constructor
|
||||
//CPA2 Stegaru Cristian 98-06
|
||||
void mfn_vSetActorDLL (CPA_EditorBase *pActorDLL) { m_pActorDLL = pActorDLL;}
|
||||
//End CPA2 Stegaru Cristian 98-06
|
||||
|
||||
void fn_vSetFamilyList (CPA_BaseObjectList *_p_oListOfFamilies) { m_p_oListOfFamilies = _p_oListOfFamilies; }
|
||||
CPA_List<CPA_BaseObject> *fn_p_oGetListOfSelectedFamilies(void) { return &m_oListOfLoadedFamilies; }
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CDlgLoad)
|
||||
enum { IDD = IDD_DLG_LOAD };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CDlgLoad)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDlgLoad)
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
virtual void OnOK();
|
||||
afx_msg void OnSelchangeLbFamilies();
|
||||
afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
|
||||
afx_msg void OnDestroy();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_DLGLOAD_HPP__C0AF82E3_C60F_11D0_B17D_0060973673C5__INCLUDED_)
|
188
Rayman_X/cpa/tempgrp/TFa/make/TFA.DSP
Normal file
188
Rayman_X/cpa/tempgrp/TFa/make/TFA.DSP
Normal file
@@ -0,0 +1,188 @@
|
||||
# Microsoft Developer Studio Project File - Name="TFA" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=TFA - Win32 Debug 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 "Tfa.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 "Tfa.mak" CFG="TFA - Win32 Debug with Editors"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "TFA - Win32 Debug with Editors" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "TFA - Win32 Debug Glide with Editors" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""$/CPA/TempGrp/TFA/make", TQCAAAAA"
|
||||
# PROP Scc_LocalPath "."
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "TFA - Win32 Debug with Editors"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug with Editors"
|
||||
# PROP BASE Intermediate_Dir "Debug with Editors"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 2
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "x:\CPA\EXE\GAM\EDT_Data\Tools"
|
||||
# PROP Intermediate_Dir "Tmp\TFAP5Evd"
|
||||
# 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 /MDd /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" /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 /o"Tmp\TFAP5Evd\TFA.bsc"
|
||||
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 X:\CPA\Exe\GAM\GAMP5Evd.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"X:\CPA\EXE\GAM\EDT_Data\Tools\TFAP5Evd.dll" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "TFA - Win32 Debug Glide with Editors"
|
||||
|
||||
# PROP BASE Use_MFC 2
|
||||
# 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\Tools"
|
||||
# PROP Intermediate_Dir "Tmp\TFADFEvd"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "X:\CPA\Public" /D "CPA_WANTS_IMPORT" /D "ACTIVE_EDITOR" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CPA_VISUAL" /D "CPA_DEBUG" /D "_WINDLL" /D "_AFXDLL" /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" /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" /d "_AFXDLL"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo /o"tmp\TFADFEvd\tfa.bsc"
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 X:\CPA\Exe\GAM\GAMP5Evd.lib /nologo /subsystem:windows /dll /pdb:"x:\CPA\EXE\GAMEDT_Data\Tools\TFAP5Evd.pdb" /debug /machine:I386 /out:"X:\CPA\EXE\GAM\EDT_Data\Tools\TFAP5Evd.dll" /pdbtype:sept
|
||||
# SUBTRACT BASE LINK32 /pdb:none
|
||||
# ADD LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"X:\CPA\EXE\main\EDT_Data\TOOLS\TFADFEvd.dll" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "TFA - Win32 Debug with Editors"
|
||||
# Name "TFA - Win32 Debug Glide with Editors"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "*.c *.cpp"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\CPACHANL.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\CPAFAMIL.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\DlgLoad.cpp
|
||||
# ADD CPP /I "D:\Cpa\TempGrp\TFa\inc"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\dllcom.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\FAinterf.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\Family.def
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\StdAfx.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "*.h *.hpp"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\public\TFA\CPAChanl.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Public\TFA\CPAFamil.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\dlgload.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\FAinterf.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\StdAfx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Public\TFA.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Public\TFA\TFAQuery.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resources"
|
||||
|
||||
# PROP Default_Filter "*.res *.ico *.rc *.bmp"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\TFA.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\inc\TFA_Res.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "others"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# End Group
|
||||
# Begin Group "libs debug"
|
||||
|
||||
# PROP Default_Filter "*.lib"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Exe\Main\MaiDFEvd.lib
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Tfa.mak
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
342
Rayman_X/cpa/tempgrp/TFa/make/TFA.vcproj
Normal file
342
Rayman_X/cpa/tempgrp/TFa/make/TFA.vcproj
Normal file
@@ -0,0 +1,342 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="TFA"
|
||||
ProjectGUID="{17F5299F-27F8-48D7-B808-DC9658B2D182}"
|
||||
SccProjectName=""$/CPA/TempGrp/TFA/make", TQCAAAAA"
|
||||
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\Tools"
|
||||
IntermediateDirectory=".\Tmp\TFADFEvd"
|
||||
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"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\Tmp\TFADFEvd/TFA.pch"
|
||||
AssemblerListingLocation=".\Tmp\TFADFEvd/"
|
||||
ObjectFile=".\Tmp\TFADFEvd/"
|
||||
ProgramDataBaseFileName=".\Tmp\TFADFEvd/"
|
||||
BrowseInformation="1"
|
||||
BrowseInformationFile=".\Tmp\TFADFEvd/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="1"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="maidfevd.lib"
|
||||
OutputFile="X:\CPA\EXE\main\EDT_Data\TOOLS\TFADFEvd.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="X:\cpa\exe\main"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
ModuleDefinitionFile="..\src\Family.def"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="x:\CPA\EXE\main\EDT_Data\Tools/TFADFEvd.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="x:\CPA\EXE\main\EDT_Data\Tools/TFADFEvd.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName="x:\CPA\EXE\main\EDT_Data\Tools/TFA.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>
|
||||
<Configuration
|
||||
Name="Debug with Editors|Win32"
|
||||
OutputDirectory="x:\CPA\EXE\GAM\EDT_Data\Tools"
|
||||
IntermediateDirectory=".\Tmp\TFAP5Evd"
|
||||
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"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\Tmp\TFAP5Evd/TFA.pch"
|
||||
AssemblerListingLocation=".\Tmp\TFAP5Evd/"
|
||||
ObjectFile=".\Tmp\TFAP5Evd/"
|
||||
ProgramDataBaseFileName=".\Tmp\TFAP5Evd/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="1"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="GAMP5Evd.lib maidfevd.lib"
|
||||
OutputFile="X:\CPA\EXE\main\dll\TFAP5Evd.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="X:\cpa\exe\main;X:\CPA\LIBD"
|
||||
ModuleDefinitionFile="..\src\Family.def"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="x:\CPA\EXE\GAM\EDT_Data\Tools/TFAP5Evd.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="x:\CPA\EXE\GAM\EDT_Data\Tools/TFAP5Evd.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName="x:\CPA\EXE\GAM\EDT_Data\Tools/TFA.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="*.c *.cpp">
|
||||
<File
|
||||
RelativePath="..\src\CPACHANL.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\CPAFAMIL.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\DlgLoad.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="D:\Cpa\TempGrp\TFa\inc"
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="D:\Cpa\TempGrp\TFa\inc"
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\dllcom.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\FAinterf.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\Family.def">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\StdAfx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="*.h *.hpp">
|
||||
<File
|
||||
RelativePath="..\..\..\public\TFA\CPAChanl.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\Public\TFA\CPAFamil.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\dlgload.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\FAinterf.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\StdAfx.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\Public\TFA.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\Public\TFA\TFAQuery.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resources"
|
||||
Filter="*.res *.ico *.rc *.bmp">
|
||||
<File
|
||||
RelativePath="..\inc\TFA.rc">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
AdditionalIncludeDirectories="\cpa\tempgrp\TFa\inc"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
AdditionalIncludeDirectories="\cpa\tempgrp\TFa\inc"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\inc\TFA_Res.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="others"
|
||||
Filter="">
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="Tfa.mak">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
BIN
Rayman_X/cpa/tempgrp/TFa/make/Tmp/TFADFEvd/TFA.res
Normal file
BIN
Rayman_X/cpa/tempgrp/TFa/make/Tmp/TFADFEvd/TFA.res
Normal file
Binary file not shown.
5
Rayman_X/cpa/tempgrp/TFa/make/mssccprj.scc
Normal file
5
Rayman_X/cpa/tempgrp/TFa/make/mssccprj.scc
Normal file
@@ -0,0 +1,5 @@
|
||||
SCC = This is a source code control file
|
||||
|
||||
[TFA.vcproj]
|
||||
SCC_Aux_Path = "P4SCC#srvperforce-ma:1666##raymandata##Editor"
|
||||
SCC_Project_Name = Perforce Project
|
58
Rayman_X/cpa/tempgrp/TFa/src/CPACHANL.cpp
Normal file
58
Rayman_X/cpa/tempgrp/TFa/src/CPACHANL.cpp
Normal file
@@ -0,0 +1,58 @@
|
||||
/*=============================================================================
|
||||
*
|
||||
* Filename: CPAChanl.cpp
|
||||
* Version: 1.0
|
||||
* Date: 03/11/97
|
||||
* Author: Marc Trabucato
|
||||
*
|
||||
* Description: implementation of CPA_Channel class (decendant of CPA_SaveObject)
|
||||
* that contains description of a channel
|
||||
*
|
||||
*===========================================================================*/
|
||||
|
||||
#ifdef ACTIVE_EDITOR
|
||||
|
||||
#include "stdafx.h"
|
||||
// ALX
|
||||
#include "ACP_Base.h"
|
||||
#include "TFA.h"
|
||||
#include "x:\cpa\main\inc\_editid.h"
|
||||
|
||||
/*=============================================================================
|
||||
* class CPA_Channel
|
||||
=============================================================================*/
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : constructor (call CPA_SaveObject constructor)
|
||||
*---------------------------------------------------------------------------*/
|
||||
CPA_Channel::CPA_Channel(CPA_EditorBase *_p_oEditor, CPA_Family *_p_oOwnerFamily, char *_szChannelName, long _lChannelNumber)
|
||||
:CPA_SaveObject(_p_oEditor, C_szChannelTypeName, E_ss_NoSave, _p_oOwnerFamily, TRUE, NULL, NULL)
|
||||
{
|
||||
// Section init & File Section Init
|
||||
char szReferencedSectionName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
strcat( szReferencedSectionName, _p_oOwnerFamily -> fn_p_szGetName() );
|
||||
strcat( szReferencedSectionName, "-" );
|
||||
strcat( szReferencedSectionName, _szChannelName );
|
||||
|
||||
SetReferencedSectionName( szReferencedSectionName );
|
||||
SetSectionData( NULL );
|
||||
// Name
|
||||
if( fn_eRename( _szChannelName ? _szChannelName : "" ) != E_mc_None )
|
||||
SetDefaultValidName();
|
||||
|
||||
// init data
|
||||
m_lChannelNumber = _lChannelNumber;
|
||||
}
|
||||
|
||||
/* -----------------03/11/97 10:27-------------------
|
||||
*
|
||||
* --------------------------------------------------*/
|
||||
CString CPA_Channel::fn_csComputeReferencedSectionName(const CString csNewName)
|
||||
{
|
||||
CString csSectionName;
|
||||
|
||||
csSectionName = GetOwner() -> GetName() + "-" + csNewName;
|
||||
return csSectionName;
|
||||
}
|
||||
|
||||
#endif /* ACTIVE_EDITOR */
|
497
Rayman_X/cpa/tempgrp/TFa/src/CPAFAMIL.cpp
Normal file
497
Rayman_X/cpa/tempgrp/TFa/src/CPAFAMIL.cpp
Normal file
@@ -0,0 +1,497 @@
|
||||
/*=============================================================================
|
||||
*
|
||||
* Filename: CPAFamil.cpp
|
||||
* Version: 1.0
|
||||
* Date: 30/12/96
|
||||
* Author: Marc Trabucato & Vincent Lhullier
|
||||
*
|
||||
* Description: implementation of CPA_Family class
|
||||
* that contains description of a family (name, anims, actions )
|
||||
*
|
||||
*===========================================================================*/
|
||||
|
||||
#ifdef ACTIVE_EDITOR
|
||||
|
||||
#include "stdafx.h"
|
||||
// ALX
|
||||
#include "ACP_Base.h"
|
||||
#include "TAC.h"
|
||||
#include "OZO.h"
|
||||
#include "DPT.h"
|
||||
// End ALX
|
||||
#include "TFA.h"
|
||||
#include "x:\cpa\main\inc\_editid.h"
|
||||
#include "FAInterf.hpp"
|
||||
|
||||
#define M_Char(string) (char*)(LPCTSTR)(string)
|
||||
#define M_FileExists(szFileName) ( ! _access( szFileName, 0 ) )
|
||||
|
||||
//
|
||||
static CPA_EditorBase *gs_p_oAnimationDLL;
|
||||
static CPA_EditorBase *gs_p_oMecaDLL;
|
||||
static CPA_EditorBase *gs_p_oTGMDLL;
|
||||
static CPA_EditorBase *gs_p_oActionDLL;
|
||||
static CPA_EditorBase *gs_p_oActorDLL;
|
||||
static CPA_EditorBase *gs_p_oObjectTableDLL;
|
||||
static CPA_EditorBase *gs_p_oZDxDLL;
|
||||
|
||||
/*=============================================================================
|
||||
* class CPA_Family
|
||||
=============================================================================*/
|
||||
void del(tdxHandleToFamilyList h)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
DeclareTemplateStatic(tdxHandleToFamilyList);
|
||||
|
||||
void CPA_Family::Init()
|
||||
{
|
||||
// register section for SCRIPT analysis
|
||||
// SCR_fn_v_RdL0_RegisterCallback( "A3dChannelNames", CPA_Family::fn_CallBackChannelsSection, SCR_CRC_c_RdL0_ForSection );
|
||||
CPA_EdMot<tdxHandleToFamilyList>::Init(NULL,NULL,del);
|
||||
}
|
||||
|
||||
void CPA_Family::InitStatic(CPA_MainWorld *_p_oMainWorld)
|
||||
{
|
||||
gs_p_oAnimationDLL = _p_oMainWorld -> GetToolDLLWithName(C_szDLLAnimationName);
|
||||
gs_p_oMecaDLL = _p_oMainWorld -> GetToolDLLWithName(C_szDLLMecaName);
|
||||
gs_p_oTGMDLL = _p_oMainWorld -> GetToolDLLWithName(C_szDLLMaterialName);
|
||||
gs_p_oActionDLL = _p_oMainWorld -> GetToolDLLWithName(C_szDLLActionName);
|
||||
gs_p_oActorDLL = _p_oMainWorld -> GetObjectDLLWithName(C_szDLLActorName);
|
||||
gs_p_oObjectTableDLL = _p_oMainWorld -> GetToolDLLWithName(C_szDLLObjectTableName);
|
||||
gs_p_oZDxDLL = _p_oMainWorld -> GetObjectDLLWithName(C_szDLLZDxName);
|
||||
}
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : constructor (call CPA_ReachableObject constructor)
|
||||
*---------------------------------------------------------------------------*/
|
||||
CPA_Family::CPA_Family(CPA_EditorBase *_p_oEditor, tdxHandleToFamilyList _hEngineFamily, char *_szFamilyName /*=NULL*/)
|
||||
:CPA_SaveObject(_p_oEditor, C_szFamilyTypeName, E_ss_Responsible, NULL, FALSE, fn_szGetFamiliesDataPath(), CPA_Family::mfn_vCallBackSave),
|
||||
CPA_EdMot<tdxHandleToFamilyList>(_hEngineFamily)
|
||||
{
|
||||
// Section init & File Section Init
|
||||
char szFileName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
char szCompleteFileName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
char szReferencedSectionName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
strcpy( szFileName, _szFamilyName );
|
||||
strcat( szFileName, "\\" );
|
||||
strcat( szFileName, _szFamilyName );
|
||||
strcat( szFileName, ".bdv" );
|
||||
|
||||
SCR_fn_v_RdL0_ComputeSectionName( szReferencedSectionName, szFileName, "SetBoundingVolume", NULL);
|
||||
SetReferencedSectionName( szReferencedSectionName );
|
||||
SetSectionData( this );
|
||||
// Shaitan Correction {
|
||||
// get complete file name (including datapath)
|
||||
strcpy(szCompleteFileName, fn_szGetFamiliesDataPath());
|
||||
strcat(szCompleteFileName, "\\");
|
||||
strcat(szCompleteFileName, szFileName);
|
||||
// check existence
|
||||
if( ! M_FileExists( szCompleteFileName ) )
|
||||
//End Shaitan Correction }
|
||||
SetExistingSection( FALSE );
|
||||
else
|
||||
SetExistingSection( SCR_fn_c_RdL0_IsSectionExists( (char*)(LPCTSTR)GetCompleteSectionName() ) );
|
||||
// Name
|
||||
if( fn_eRename( _szFamilyName ? _szFamilyName : "" ) != E_mc_None )
|
||||
SetDefaultValidName();
|
||||
// fn_vUpdateSectionName();
|
||||
|
||||
// reset content of all list
|
||||
m_oListOfActions . RemoveAll () ;
|
||||
// Shaitan => state list in the level
|
||||
m_oListOfUsedActions . RemoveAll () ;
|
||||
// End Shaitan => state list in the level
|
||||
m_oListOfAnimations . RemoveAll () ;
|
||||
m_oListOfObjectTables.RemoveAll ();
|
||||
// Shaitan => module list in the level
|
||||
m_oListOfUsedPOs . RemoveAll () ;
|
||||
m_oListOfUsedObjectTables . RemoveAll () ;
|
||||
// End Shaitan => module list in the level
|
||||
//
|
||||
m_oListOfStates . SetEngineAnchor ( GetStruct() ? & GetStruct() -> hForStateArray : NULL ) ;
|
||||
m_p_oInitialAction = NULL;
|
||||
m_p_oZDxBoundingVolume = NULL;
|
||||
//
|
||||
m_bIsABaseFamily = FALSE;
|
||||
// Shaitan => optimisation lists in the level
|
||||
m_bMustUpdateStateList = FALSE;
|
||||
m_bMustUpdatePOList = FALSE;
|
||||
// End Shaitan => optimisation list in the level
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : destructor
|
||||
*---------------------------------------------------------------------------*/
|
||||
CPA_Family::~CPA_Family()
|
||||
{
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : set engine struct
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CPA_Family::SetStruct( tdxHandleToFamilyList _hFamily)
|
||||
{
|
||||
CPA_EdMot<tdxHandleToFamilyList>::SetStruct( _hFamily );
|
||||
|
||||
m_oListOfStates . SetEngineAnchor ( GetStruct() ? & GetStruct() -> hForStateArray : NULL ) ;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : load family
|
||||
// ----------------------------------------------------------------------------
|
||||
void CPA_Family::mfn_vLoad(void)
|
||||
{
|
||||
if( ! fn_bIsAvailable() )
|
||||
{
|
||||
char *szFamilyName = fn_p_szGetName();
|
||||
char szName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
CPA_Interface *p_oInterface = GetMainWorld() -> GetInterface();
|
||||
BOOL bPreviousLoadingWorld = p_oInterface -> fn_bIsLoadingWorld();
|
||||
|
||||
tdObjectType otFamily = fn_otFindOrAddFamilyTypeOfFamilyTypeName( szFamilyName );
|
||||
tdxHandleToFamilyList hFamily = fn_hFindOrAddFAmily(otFamily);
|
||||
|
||||
fn_vUpdateData( hFamily );
|
||||
SetStruct( hFamily );
|
||||
|
||||
p_oInterface -> SetLoadingWorld( TRUE );
|
||||
|
||||
// update mechanics & GameMaterial (when load new Family)
|
||||
if( ! ((TFamily_Interface*)GetEditor()) -> m_bLevelLoad )
|
||||
{
|
||||
// Load animations
|
||||
if (gs_p_oAnimationDLL != NULL)
|
||||
gs_p_oAnimationDLL->OnQueryAction(GetEditor() , C_cLoadAllAnimsAction, (LPARAM) this);
|
||||
|
||||
// send message to TME
|
||||
if (gs_p_oMecaDLL != NULL)
|
||||
gs_p_oMecaDLL->OnQueryAction(GetEditor() , Cw_TME_Query_updateAfterLoading, (LPARAM) 0);
|
||||
|
||||
// send Textures to 3D Card
|
||||
GLI_vEndofGeometricLoad();
|
||||
|
||||
// send message to TGM (GameMaterial Tool)
|
||||
if( gs_p_oTGMDLL )
|
||||
gs_p_oTGMDLL -> OnQueryAction( (CPA_DLLBase*)this, (WPARAM)C_cCreateNewGameMaterial, 0);
|
||||
}
|
||||
|
||||
// Load Actions
|
||||
if (gs_p_oActionDLL != NULL)
|
||||
gs_p_oActionDLL->OnQueryAction(GetEditor() , C_uiLoadAllActions, (LPARAM) this);
|
||||
|
||||
// Load all the lists of names of the family
|
||||
if (gs_p_oActorDLL != NULL)
|
||||
gs_p_oActorDLL->OnQueryAction(GetEditor() , C_uiActor_LoadNamesList , (LPARAM) this);
|
||||
|
||||
// Update All ZAList
|
||||
if (gs_p_oActionDLL != NULL)
|
||||
gs_p_oActionDLL->OnQueryAction(GetEditor() , C_uiUpdateZAList, (LPARAM) this);
|
||||
|
||||
// Load all table object of the family
|
||||
if (gs_p_oObjectTableDLL != NULL)
|
||||
gs_p_oObjectTableDLL->OnQueryAction(GetEditor() , C_uiLoadFamilyObjectTables, (LPARAM) this);
|
||||
|
||||
// get Bounding volume
|
||||
if( GetStruct() )
|
||||
{
|
||||
ACP_tdxHandleOfObject hBdVl = fn_vGetGeometricSphereOfFamily( GetStruct() );
|
||||
SCR_tdst_Link_Table *p_LinkTable = GLI_p_stGetLinkTableOfGeometric();
|
||||
SCR_tdst_Link_Value *p_LinkValue = hBdVl ? SCR_fnp_st_Link_SearchValue(p_LinkTable,(unsigned long)hBdVl) : NULL;
|
||||
char *szLinkName = p_LinkValue ? SCR_M_p_sz_Link_GetKey( p_LinkValue ) : NULL;
|
||||
|
||||
if( hBdVl && gs_p_oZDxDLL && szLinkName )
|
||||
{
|
||||
tdstCreateZoneMess stZoneMess;
|
||||
|
||||
SCR_fn_v_RdL0_SplitSectionName( szLinkName , NULL, NULL, szName );
|
||||
stZoneMess . csTypeName = C_szBoundingVolumeName;
|
||||
stZoneMess . hEngineZone = hBdVl;
|
||||
stZoneMess . csName = szName;
|
||||
stZoneMess . pOwner = this;
|
||||
stZoneMess . szDataPath = GetDataPath();
|
||||
stZoneMess . csReferenceSectionName = szLinkName + strlen( stZoneMess . szDataPath ) + 1;
|
||||
|
||||
m_p_oZDxBoundingVolume = (CPA_BaseObject*)gs_p_oZDxDLL -> OnQueryAction( GetEditor(), C_uiQueryCreateZDxObject, (LPARAM) & stZoneMess );
|
||||
}
|
||||
}
|
||||
// load Channels Names
|
||||
mfn_vFillChannelNamesList();
|
||||
// ACZ file
|
||||
mfn_vInitACZFile();
|
||||
p_oInterface -> SetLoadingWorld( bPreviousLoadingWorld );
|
||||
}
|
||||
SetAvailable( TRUE );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : return animation of given name
|
||||
// ----------------------------------------------------------------------------
|
||||
CPA_Animation* CPA_Family::mfn_p_oGetAnimation( CString _csAnimName )
|
||||
{
|
||||
CPA_Animation *p_oResult = NULL;
|
||||
POSITION stPos = m_oListOfAnimations . GetHeadPosition();
|
||||
while( stPos )
|
||||
{
|
||||
CPA_Animation *p_oAnimation = m_oListOfAnimations . GetNext ( stPos ) ;
|
||||
if( ! _csAnimName . CompareNoCase( p_oAnimation -> GetName() ) )
|
||||
{
|
||||
p_oResult = p_oAnimation;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return p_oResult;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : return action of given name
|
||||
// ----------------------------------------------------------------------------
|
||||
CPA_Action* CPA_Family::mfn_p_oGetAction( CString _csActionName )
|
||||
{
|
||||
CPA_Action *p_oResult = NULL;
|
||||
POSITION stPos = m_oListOfActions . GetHeadPosition();
|
||||
while( stPos )
|
||||
{
|
||||
CPA_Action *p_oAction = m_oListOfActions . GetNext ( stPos ) ;
|
||||
if( ! p_oAction -> GetName() . CompareNoCase( _csActionName ) )
|
||||
{
|
||||
p_oResult = p_oAction;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return p_oResult;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : return state of given name
|
||||
// ----------------------------------------------------------------------------
|
||||
CPA_State* CPA_Family::mfn_p_oGetState( CString _csStateName )
|
||||
{
|
||||
CPA_State *p_oResult = NULL;
|
||||
POSITION stPos = m_oListOfStates . GetHeadPosition();
|
||||
while( stPos )
|
||||
{
|
||||
CPA_State *p_oState = m_oListOfStates . GetNext ( stPos ) ;
|
||||
if( ! p_oState -> GetName() . CompareNoCase ( _csStateName ) )
|
||||
{
|
||||
p_oResult = p_oState;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return p_oResult;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Description : return objecttable of given name
|
||||
// ----------------------------------------------------------------------------
|
||||
EditorObjectTable* CPA_Family::mfn_p_oGetObjectTable( CString _csObjectTableName )
|
||||
{
|
||||
EditorObjectTable *p_oResult = NULL;
|
||||
POSITION stPos = m_oListOfObjectTables . GetHeadPosition();
|
||||
while( stPos )
|
||||
{
|
||||
EditorObjectTable *p_oObjectTable = m_oListOfObjectTables . GetNext ( stPos ) ;
|
||||
if( ! p_oObjectTable -> GetName() . CompareNoCase( _csObjectTableName ) )
|
||||
{
|
||||
p_oResult = p_oObjectTable;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return p_oResult;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : save Bounding Volume on SCRIPT File .bdv
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CPA_Family::mfn_vCallBackSave( SCR_tdst_File_Description *_p_stFile, char *_p_szSectionName,
|
||||
void *_p_vData, SCR_tde_Ntfy_Action _eAction)
|
||||
{
|
||||
CPA_Family *p_oFamily = (CPA_Family*)_p_vData;
|
||||
char szActionName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
char szSectionName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
|
||||
switch ( _eAction )
|
||||
{
|
||||
case SCR_EA_Ntfy_AddSection:
|
||||
case SCR_EA_Ntfy_RebuildSection:
|
||||
if( p_oFamily -> m_p_oZDxBoundingVolume != NULL )
|
||||
{
|
||||
SCR_fn_v_RdL0_SplitSectionName( _p_szSectionName, NULL, szActionName, NULL );
|
||||
// compute Section name
|
||||
SCR_fn_v_RdL0_ComputeSectionName(szSectionName, NULL, szActionName, NULL );
|
||||
// save begin section
|
||||
SCR_M_SvL0_SaveBeginSection( _p_stFile, szSectionName, SCR_CC_C_Cfg_EOL );
|
||||
// save entry
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, "BoundingVolume", SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_RdL0_ComputeSectionName( szSectionName, "*" , "Geometric", p_oFamily -> m_p_oZDxBoundingVolume -> fn_p_szGetName() );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Normal, 1, szSectionName );
|
||||
// End Section
|
||||
SCR_M_SvL0_SaveEndSection( _p_stFile, SCR_CC_C_Cfg_EOL ) ;
|
||||
SCR_M_SvL0_SaveBlankLine( _p_stFile ) ;
|
||||
// update existing section
|
||||
p_oFamily -> fn_vSectionSaved();
|
||||
}
|
||||
break;
|
||||
case SCR_EA_Ntfy_DeleteSection:
|
||||
p_oFamily -> fn_vSectionDeleted();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : load callback for "BaseFamily" section in .ACE file
|
||||
*---------------------------------------------------------------------------*/
|
||||
SCR_tde_Anl_ReturnValue CPA_Family::mfn_CallbackLoadBaseFamilySection
|
||||
( SCR_tdst_File_Description *_p_stFile, char *_p_szName, char *_ap_szParams[], SCR_tde_Anl_Action _eAction )
|
||||
{
|
||||
CPA_Family * p_oFamily;
|
||||
SCR_M_RdL0_GetContextLong(0, 0, CPA_Family*, p_oFamily);
|
||||
|
||||
switch (_eAction)
|
||||
{
|
||||
case SCR_EA_Anl_BeginSection: if (_p_szName && stricmp (_p_szName , "TRUE" ) == 0) p_oFamily -> m_bIsABaseFamily = TRUE;
|
||||
else
|
||||
if (_p_szName && stricmp (_p_szName , "FALSE") == 0) p_oFamily -> m_bIsABaseFamily = FALSE;
|
||||
else ASSERT (0);
|
||||
break;
|
||||
}
|
||||
|
||||
return SCR_ERV_Anl_NormalReturn;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description :
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CPA_Family::mfn_vFillChannelNamesList(void)
|
||||
{
|
||||
unsigned int uiPos;
|
||||
unsigned int uiChannelNumber;
|
||||
SCR_tdst_Link_Value *p_stValue;
|
||||
char szEntry[SCR_CV_ui_Cfg_MaxLenName];
|
||||
char *p_cChannel;
|
||||
char *p_cCurrentFamilyName = fn_p_szGetName();
|
||||
|
||||
m_oListOfChannelsName . RemoveAll();
|
||||
|
||||
uiPos = 0;
|
||||
uiChannelNumber = 0;
|
||||
SCR_M_DyAr_GetNextElement( SCR_tdst_Link_Value, uiPos, p_stValue, SCR_M_st_Link_GetDynamicArray( & CHL_g_stLinkTable ) );
|
||||
while ( p_stValue )
|
||||
{
|
||||
if( SCR_M_e_Link_GetState( p_stValue ) == SCR_ELS_Link_Initialized)
|
||||
{
|
||||
strcpy( szEntry, SCR_M_p_sz_Link_GetKey( p_stValue ) );
|
||||
p_cChannel = strchr( szEntry, '-' );
|
||||
if ( p_cChannel )
|
||||
{
|
||||
*p_cChannel = 0;
|
||||
p_cChannel++;
|
||||
if( ! strcmpi( szEntry, p_cCurrentFamilyName ) )
|
||||
{
|
||||
CPA_Channel *p_oChannel = new CPA_Channel( GetEditor(), this, p_cChannel, SCR_M_ul_Link_GetValue( p_stValue ) );
|
||||
m_oListOfChannelsName . AddTail( CString( p_cChannel ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
uiPos++;
|
||||
SCR_M_DyAr_GetNextElement( SCR_tdst_Link_Value, uiPos, p_stValue, SCR_M_st_Link_GetDynamicArray( & CHL_g_stLinkTable ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description :
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CPA_Family::mfn_vInitACZFile()
|
||||
{
|
||||
BOOL bACZFileExists = FALSE;
|
||||
BOOL bZASectionExists = FALSE;
|
||||
BOOL bZAListSectionExists = FALSE;
|
||||
char szFileName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
char szZASectionName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
char szZAListSectionName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
|
||||
if (gs_p_oActionDLL != NULL)
|
||||
{
|
||||
CPA_BaseObjectList *p_oList = NULL;
|
||||
Position lPos;
|
||||
// search ZA
|
||||
p_oList = gs_p_oActionDLL -> GetBaseObjectList( C_szZATypeName );
|
||||
lPos = p_oList -> GetHeadPosition();
|
||||
while( lPos )
|
||||
{
|
||||
if( p_oList -> GetNext( lPos ) -> GetOwner() -> GetOwner() == (CPA_BaseObject*)this )
|
||||
{
|
||||
bZASectionExists = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// search ZAList
|
||||
p_oList = gs_p_oActionDLL -> GetBaseObjectList( C_szZAListTypeName );
|
||||
lPos = p_oList -> GetHeadPosition();
|
||||
while( lPos )
|
||||
{
|
||||
if( p_oList -> GetNext( lPos ) -> GetOwner() -> GetOwner() == (CPA_BaseObject*)this )
|
||||
{
|
||||
bZAListSectionExists = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
bACZFileExists = ( bZASectionExists || bZASectionExists );
|
||||
}
|
||||
//
|
||||
sprintf( szFileName, "%s\\%s\\%s.acz", fn_szGetFamiliesDataPath(), fn_p_szGetName(), fn_p_szGetName() );
|
||||
SCR_fn_v_RdL0_ComputeSectionName( szZASectionName, szFileName, "ActivationZone", NULL);
|
||||
SCR_fn_v_RdL0_ComputeSectionName( szZAListSectionName, szFileName, "ArrayOfZoneSet", NULL);
|
||||
//
|
||||
|
||||
if( bACZFileExists || M_FileExists( szFileName ) )
|
||||
{
|
||||
// ZA section
|
||||
if( ! bZASectionExists && ! SCR_fn_c_RdL0_IsSectionExists( szZASectionName ) )
|
||||
{
|
||||
// add section
|
||||
SCR_fn_v_SvL1_RegisterNotify( szZASectionName, mfn_vCallBackSaveEmptySection, this, SCR_EA_Ntfy_AddSection );
|
||||
}
|
||||
// ZAList section
|
||||
if( ! bZAListSectionExists && ! SCR_fn_c_RdL0_IsSectionExists( szZAListSectionName ) )
|
||||
{
|
||||
// add section
|
||||
SCR_fn_v_SvL1_RegisterNotify( szZAListSectionName, mfn_vCallBackSaveEmptySection, this, SCR_EA_Ntfy_AddSection );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// add ZA section
|
||||
SCR_fn_v_SvL1_RegisterNotify( szZASectionName, mfn_vCallBackSaveEmptySection, this, SCR_EA_Ntfy_AddSection );
|
||||
// add ZAList section
|
||||
SCR_fn_v_SvL1_RegisterNotify( szZAListSectionName, mfn_vCallBackSaveEmptySection, this, SCR_EA_Ntfy_AddSection );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : create empty section
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CPA_Family::mfn_vCallBackSaveEmptySection( SCR_tdst_File_Description *_p_stFile, char *_p_szSectionName,
|
||||
void *_p_vData, SCR_tde_Ntfy_Action _eAction )
|
||||
{
|
||||
CPA_Family *p_oFamily = (CPA_Family*)_p_vData;
|
||||
char szSection[SCR_CV_ui_Cfg_MaxLenName];
|
||||
char szAction[SCR_CV_ui_Cfg_MaxLenName];
|
||||
char szId[SCR_CV_ui_Cfg_MaxLenName];
|
||||
unsigned int uiLastIndent = SCR_g_ui_SvL0_IndentationLevel;
|
||||
|
||||
SCR_g_ui_SvL0_IndentationLevel = 0;
|
||||
if( _eAction == SCR_EA_Ntfy_AddSection )
|
||||
{
|
||||
SCR_fn_v_RdL0_SplitSectionName( _p_szSectionName, NULL, szAction, szId);
|
||||
SCR_fn_v_RdL0_ComputeSectionName( szSection, NULL, szAction, szId);
|
||||
SCR_M_SvL0_SaveBeginSection(_p_stFile, szSection, SCR_CC_C_Cfg_EOL );
|
||||
SCR_M_SvL0_SaveEndSection(_p_stFile, SCR_CC_C_Cfg_EOL );
|
||||
SCR_M_SvL0_SaveBlankLine( _p_stFile );
|
||||
}
|
||||
SCR_g_ui_SvL0_IndentationLevel = uiLastIndent;
|
||||
}
|
||||
|
||||
#endif //ACTIVE_EDITOR
|
210
Rayman_X/cpa/tempgrp/TFa/src/CPATstPt.cpp
Normal file
210
Rayman_X/cpa/tempgrp/TFa/src/CPATstPt.cpp
Normal file
@@ -0,0 +1,210 @@
|
||||
/*=============================================================================
|
||||
*
|
||||
* Filename: CPATstPt.cpp
|
||||
* Version: 2.0 (VSS5)
|
||||
* Date: 28/07/97
|
||||
* Author: Marc Trabucato
|
||||
*
|
||||
* Description: implementation of CPA_TestPoint class
|
||||
*
|
||||
*===========================================================================*/
|
||||
|
||||
#ifdef ACTIVE_EDITOR
|
||||
|
||||
#include "stdafx.h"
|
||||
// ALX
|
||||
#include "ACP_Base.h"
|
||||
#include "TFA.h"
|
||||
#include "DPT.h"
|
||||
|
||||
#include "x:\cpa\main\inc\_EditID.h"
|
||||
|
||||
/*=============================================================================
|
||||
* class CPA_TestPointNode:
|
||||
=============================================================================*/
|
||||
|
||||
DeclareTemplateStatic(tdxHandleToTestPointNode);
|
||||
|
||||
void delnode(tdxHandleToTestPointNode h)
|
||||
{}
|
||||
|
||||
void CPA_TestPointNode::Init()
|
||||
{
|
||||
CPA_EdMot<tdxHandleToTestPointNode>::Init(fn_hCreateTestPointNode,NULL,delnode);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : constructor
|
||||
*---------------------------------------------------------------------------*/
|
||||
CPA_TestPointNode::CPA_TestPointNode( CPA_TestPointsList *_p_oList, tdxHandleToTestPointNode _hTestPointNode /*=NULL*/ )
|
||||
:CPA_EdMot<tdxHandleToTestPointNode>(_hTestPointNode)
|
||||
{
|
||||
ASSERT( _p_oList );
|
||||
|
||||
SetOwnerList( _p_oList );
|
||||
SetZdxObject( NULL );
|
||||
// add point on editor list
|
||||
if( _hTestPointNode == NULL )
|
||||
SetStruct( fn_hCreateTestPointNode() );
|
||||
// and on engine list only if created point
|
||||
_p_oList -> m_oListOfTestPoints . AddTail( this, ( _hTestPointNode == NULL ) );
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : destructor
|
||||
*---------------------------------------------------------------------------*/
|
||||
CPA_TestPointNode::~CPA_TestPointNode(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/*=============================================================================
|
||||
* class CPA_TestPointsList:
|
||||
=============================================================================*/
|
||||
|
||||
DeclareTemplateStatic(tdxHandleToTestPointsList);
|
||||
|
||||
void dellist(tdxHandleToTestPointsList h)
|
||||
{}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description :
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CPA_TestPointsList::Init()
|
||||
{
|
||||
CPA_EdMot<tdxHandleToTestPointsList>::Init(fn_hCreateTestPointsList,NULL,dellist);
|
||||
}
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : constructor
|
||||
*---------------------------------------------------------------------------*/
|
||||
CPA_TestPointsList::CPA_TestPointsList(CPA_EditorBase *_p_oDLL, CPA_BaseObject *_p_oOwnerFamily, tdxHandleToTestPointsList _hTestPointsList /*=NULL*/,
|
||||
CString _csListName /*=""*/)
|
||||
:CPA_SaveObject(_p_oDLL, C_szTestPointsListTypeName, E_ss_Responsible, _p_oOwnerFamily, FALSE, fn_szGetFamiliesDataPath(), CPA_TestPointsList::fn_vCallBackSave),
|
||||
CPA_EdMot<tdxHandleToTestPointsList>(_hTestPointsList)
|
||||
{
|
||||
|
||||
// Section init & File Section Init
|
||||
char *p_szFamilyName = _p_oOwnerFamily -> fn_p_szGetName();
|
||||
char szFileName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
char szReferencedSectionName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
|
||||
sprintf( szFileName, "%s\\%s.tpe", p_szFamilyName, p_szFamilyName );
|
||||
|
||||
SCR_fn_v_RdL0_ComputeSectionName( szReferencedSectionName, szFileName, "TestPointsList", NULL);
|
||||
SetReferencedSectionName( szReferencedSectionName );
|
||||
SetSectionData( this );
|
||||
|
||||
SetExistingSection( _hTestPointsList != NULL );
|
||||
|
||||
// data
|
||||
if( _hTestPointsList == NULL )
|
||||
SetStruct( fn_hCreateTestPointsList() );
|
||||
|
||||
// Name
|
||||
if( fn_eRename( _csListName ) != E_mc_None )
|
||||
SetDefaultValidName();
|
||||
fn_vUpdateSectionName();
|
||||
// data
|
||||
m_oListOfTestPoints . SetEngineAnchor( GetStruct() ? & GetStruct() -> hForTestPointArray : NULL );
|
||||
|
||||
if( _hTestPointsList == NULL )
|
||||
{
|
||||
fn_vNotifySave();
|
||||
}
|
||||
else
|
||||
{
|
||||
// fill TPList List
|
||||
CPA_TestPointNode *p_oNode;
|
||||
tdxHandleToTestPointNode hNode;
|
||||
int iIndex = 0;
|
||||
|
||||
LST2_M_StaticForEachElementOf( & GetStruct() -> hForTestPointArray, hNode, iIndex)
|
||||
{
|
||||
p_oNode = new CPA_TestPointNode( this, hNode );
|
||||
}
|
||||
// construct ZdxObject
|
||||
CPA_EditorBase *p_oZDxEditor = GetMainWorld() -> GetObjectDLLWithName( C_szDLLZDxName );
|
||||
if( p_oZDxEditor )
|
||||
p_oZDxEditor -> OnQueryAction( GetEditor(), C_uiQueryCreateZDxTestPoints, (long)this );
|
||||
}
|
||||
((CPA_Family *) _p_oOwnerFamily) -> mfn_vAddTestPointsList( this );
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : destructor
|
||||
*---------------------------------------------------------------------------*/
|
||||
CPA_TestPointsList::~CPA_TestPointsList(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : save TestPointsList
|
||||
*---------------------------------------------------------------------------*/
|
||||
void CPA_TestPointsList::fn_vCallBackSave( SCR_tdst_File_Description *_p_stFile, char *_p_szSectionName, void *_p_vData, SCR_tde_Ntfy_Action _eAction)
|
||||
{
|
||||
// ANNECY AV CLEAN_MEC {
|
||||
/*
|
||||
CPA_TestPointsList *p_oList = (CPA_TestPointsList*)_p_vData;
|
||||
CPA_TestPointNode *p_oNode = NULL;
|
||||
char szActionName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
char szIdName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
char szSectionName[SCR_CV_ui_Cfg_MaxLenName];
|
||||
POSITION xPos;
|
||||
MTH3D_tdstVector stPosition;
|
||||
|
||||
switch ( _eAction )
|
||||
{
|
||||
case SCR_EA_Ntfy_AddSection:
|
||||
case SCR_EA_Ntfy_RebuildSection:
|
||||
// construct section name
|
||||
SCR_fn_v_RdL0_SplitSectionName( _p_szSectionName, NULL, szActionName, szIdName );
|
||||
SCR_fn_v_RdL0_ComputeSectionName( szSectionName, NULL, szActionName, szIdName );
|
||||
// save begin section
|
||||
SCR_M_SvL0_SaveBeginSection( _p_stFile, szSectionName, SCR_CC_C_Cfg_EOL );
|
||||
// entries
|
||||
xPos = p_oList -> m_oListOfTestPoints . GetHeadPosition();
|
||||
while ( xPos )
|
||||
{
|
||||
p_oNode = p_oList -> m_oListOfTestPoints . GetNext( xPos );
|
||||
p_oNode -> mfn_vGetPosition( & stPosition );
|
||||
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, "AddTestPoint", SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP(_p_stFile, SCR_EF_SvL0_Scanf, 1, "%.6f,%.6f,%.6f,%s"
|
||||
,MTH3D_M_xGetXofVector( &stPosition )
|
||||
,MTH3D_M_xGetYofVector( &stPosition )
|
||||
,MTH3D_M_xGetZofVector( &stPosition )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
,(char*)(LPCTSTR)p_oList -> GetKindOfPointName( p_oNode -> mfn_eGetKindOfPoint() ) );
|
||||
}
|
||||
// End Section
|
||||
SCR_M_SvL0_SaveEndSection( _p_stFile, SCR_CC_C_Cfg_EOL ) ;
|
||||
SCR_M_SvL0_SaveBlankLine( _p_stFile ) ;
|
||||
// update Section name
|
||||
p_oList -> fn_vSectionSaved();
|
||||
break;
|
||||
case SCR_EA_Ntfy_DeleteSection:
|
||||
p_oList -> fn_vSectionDeleted();
|
||||
break;
|
||||
}
|
||||
*/
|
||||
// END ANNECY AV }
|
||||
}
|
||||
|
||||
#endif // ACTIVE_EDITOR
|
194
Rayman_X/cpa/tempgrp/TFa/src/DlgLoad.cpp
Normal file
194
Rayman_X/cpa/tempgrp/TFa/src/DlgLoad.cpp
Normal file
@@ -0,0 +1,194 @@
|
||||
// DlgLoad.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <AFXTEMPL.h>
|
||||
#include "ACP_Base.h"
|
||||
#include "incITF.h"
|
||||
#include "dlgload.hpp"
|
||||
|
||||
#include "..\Main\Inc\_EditID.h"
|
||||
#include "TUT.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
#define M_LB() ( (CListBox*) GetDlgItem(IDC_LB_FAMILIES) )
|
||||
#define M_BTLoad() ( (CButton*) GetDlgItem(IDOK) )
|
||||
|
||||
#define C_iBorderSize 15
|
||||
|
||||
#define M_GetClientRect( pWnd, poRect ) \
|
||||
(pWnd) -> GetWindowRect( poRect ); \
|
||||
ScreenToClient( poRect );
|
||||
|
||||
#define M_GetClientRectId( Id, poRect ) M_GetClientRect( GetDlgItem( Id ), poRect )
|
||||
|
||||
#define M_SetClientRect( pWnd, poRect ) (pWnd) -> MoveWindow( poRect )
|
||||
#define M_SetClientRectId( Id, poRect ) M_SetClientRect( GetDlgItem( Id ), poRect )
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgLoad dialog
|
||||
|
||||
|
||||
CDlgLoad::CDlgLoad(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CDlgLoad::IDD, pParent)
|
||||
{
|
||||
//CPA2 Stegaru Cristian 98-06
|
||||
m_pActorDLL = NULL;
|
||||
//End CPA2 Stegaru Cristian 98-06
|
||||
//{{AFX_DATA_INIT(CDlgLoad)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
|
||||
void CDlgLoad::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CDlgLoad)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CDlgLoad, CDialog)
|
||||
//{{AFX_MSG_MAP(CDlgLoad)
|
||||
ON_WM_SIZE()
|
||||
ON_LBN_SELCHANGE(IDC_LB_FAMILIES, OnSelchangeLbFamilies)
|
||||
ON_WM_GETMINMAXINFO()
|
||||
ON_WM_DESTROY()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDlgLoad message handlers
|
||||
|
||||
BOOL CDlgLoad::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
CListBox *pLB = M_LB();
|
||||
|
||||
pLB -> ResetContent();
|
||||
M_BTLoad() -> EnableWindow( FALSE );
|
||||
// fill ListBox
|
||||
Position xPos = m_p_oListOfFamilies -> GetHeadPosition();
|
||||
while( xPos )
|
||||
{
|
||||
CPA_BaseObject *p_oFamily = m_p_oListOfFamilies -> GetNext( xPos );
|
||||
if( ! p_oFamily -> fn_bIsAvailable() )
|
||||
{
|
||||
int iIndex = pLB -> AddString( p_oFamily -> GetName() );
|
||||
if( iIndex != LB_ERR )
|
||||
pLB -> SetItemData( iIndex, (DWORD) p_oFamily );
|
||||
}
|
||||
}
|
||||
pLB -> SetCurSel( -1 );
|
||||
|
||||
// register control for TUT module
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vRegisterControlID( IDC_LB_FAMILIES , "TFA_LOAD_LIST", TUT_e_ListBox );
|
||||
TUT_M_vRegisterControlID( IDOK , "TFA_LOAD_OK", TUT_e_Button );
|
||||
TUT_M_vRegisterControlID( IDCANCEL , "TFA_LOAD_CANCEL",TUT_e_Button );
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
void CDlgLoad::OnSize(UINT nType, int cx, int cy)
|
||||
{
|
||||
CDialog::OnSize(nType, cx, cy);
|
||||
|
||||
if( GetDlgItem( IDOK) )
|
||||
{
|
||||
CRect oRectDlg, oRectLoad, oRectCancel, oRectLB, oRectText;
|
||||
CSize oSize;
|
||||
|
||||
// get positions
|
||||
M_GetClientRect( this, &oRectDlg );
|
||||
M_GetClientRectId( IDOK, &oRectLoad );
|
||||
M_GetClientRectId( IDCANCEL, &oRectCancel );
|
||||
M_GetClientRectId( IDC_TEXT, &oRectText );
|
||||
M_GetClientRectId( IDC_LB_FAMILIES, &oRectLB );
|
||||
|
||||
// place BT Cancel
|
||||
oSize = oRectCancel . Size();
|
||||
oRectCancel . bottom = oRectDlg . bottom - C_iBorderSize;
|
||||
oRectCancel . top = oRectCancel . bottom - oSize . cy;
|
||||
// place BT OK
|
||||
oSize = oRectCancel . Size();
|
||||
oRectLoad . bottom = oRectCancel . bottom;
|
||||
oRectLoad . top = oRectCancel . top;
|
||||
oRectLoad . right = oRectDlg . right - C_iBorderSize;
|
||||
oRectLoad . left = oRectLoad . right - oSize . cx;
|
||||
// place LB
|
||||
oRectLB . right = oRectLoad . right;
|
||||
oRectLB . bottom = oRectCancel . top - C_iBorderSize;
|
||||
// place Text
|
||||
oRectText . right = oRectLoad . right;
|
||||
|
||||
// set positions
|
||||
M_SetClientRectId( IDOK, &oRectLoad );
|
||||
M_SetClientRectId( IDCANCEL, &oRectCancel );
|
||||
M_SetClientRectId( IDC_TEXT, &oRectText );
|
||||
M_SetClientRectId( IDC_LB_FAMILIES, &oRectLB );
|
||||
}
|
||||
}
|
||||
|
||||
void CDlgLoad::OnOK()
|
||||
{
|
||||
CListBox *pLB = M_LB();
|
||||
int iNbSelected = pLB -> GetSelCount();
|
||||
|
||||
m_oListOfLoadedFamilies . RemoveAll();
|
||||
|
||||
if( iNbSelected )
|
||||
{
|
||||
int *ai_SelIdx = (int*) malloc( iNbSelected * sizeof(int) );
|
||||
pLB -> GetSelItems( iNbSelected, ai_SelIdx );
|
||||
for( int Idx = 0; Idx < iNbSelected ; Idx++ )
|
||||
{
|
||||
//CPA2 Stegaru Cristian 98-06
|
||||
//m_oListOfLoadedFamilies . AddTail( (CPA_BaseObject*)pLB -> GetItemData( ai_SelIdx[Idx] ) );
|
||||
CPA_BaseObject *pObject = (CPA_BaseObject*)pLB -> GetItemData( ai_SelIdx[Idx] );
|
||||
m_oListOfLoadedFamilies . AddTail (pObject);
|
||||
if (m_pActorDLL != NULL)
|
||||
m_pActorDLL->OnQueryAction(NULL, C_uiActor_LoadFamilyModels, (LPARAM)pObject);
|
||||
//End CPA2 Stegaru Cristian 98-06
|
||||
}
|
||||
free( ai_SelIdx );
|
||||
}
|
||||
CDialog::OnOK();
|
||||
}
|
||||
|
||||
void CDlgLoad::OnSelchangeLbFamilies()
|
||||
{
|
||||
CListBox *pLB = M_LB();
|
||||
int iNbSelected = pLB -> GetSelCount();
|
||||
|
||||
M_BTLoad() -> EnableWindow( (BOOL)iNbSelected );
|
||||
}
|
||||
|
||||
void CDlgLoad::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
|
||||
{
|
||||
// limit min size
|
||||
lpMMI -> ptMinTrackSize . x = 200;
|
||||
lpMMI -> ptMinTrackSize . y = 300;
|
||||
|
||||
CDialog::OnGetMinMaxInfo(lpMMI);
|
||||
}
|
||||
|
||||
void CDlgLoad::OnDestroy()
|
||||
{
|
||||
// unregister control for TUT module
|
||||
TUT_M_vGetTutDll();
|
||||
TUT_M_vUnregisterControlID( IDC_LB_FAMILIES );
|
||||
TUT_M_vUnregisterControlID( IDOK );
|
||||
TUT_M_vUnregisterControlID( IDCANCEL );
|
||||
|
||||
CDialog::OnDestroy();
|
||||
}
|
560
Rayman_X/cpa/tempgrp/TFa/src/FAinterf.cpp
Normal file
560
Rayman_X/cpa/tempgrp/TFa/src/FAinterf.cpp
Normal file
@@ -0,0 +1,560 @@
|
||||
//#################################################################################
|
||||
//
|
||||
// BASE CLASS OF YOUR DLL interface
|
||||
//
|
||||
//#################################################################################
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ACP_Base.h"
|
||||
|
||||
#include "DPT.h"
|
||||
|
||||
#include "TAC.h"
|
||||
#include "TAN.h"
|
||||
#include "TFA.h"
|
||||
|
||||
#include "ITF.h"
|
||||
|
||||
#include "FAinterf.hpp"
|
||||
#include "DlgLoad.hpp"
|
||||
#include "x:\cpa\main\inc\_editid.h"
|
||||
|
||||
// infos
|
||||
static CString g_csTFAName = "Family";
|
||||
static CString g_csTFAAuthor = "Marc Trabucato";
|
||||
static CString g_csTFAVersion = "V 6.0.1 30/03/98";
|
||||
static CString g_csTFAFrenchHelpFile = "";
|
||||
static CString g_csTFAEnglishHelpFile = "";
|
||||
|
||||
/*=============================================================================
|
||||
* constants
|
||||
=============================================================================*/
|
||||
#define C_uiTFAPopupLoad 10
|
||||
#define C_uiTFAPopupPreLoad 11
|
||||
|
||||
/*=============================================================================
|
||||
* macros
|
||||
=============================================================================*/
|
||||
#define M_TFAStatusBar(szText) M_GetMainWnd()->UpdateStatus(szText, C_STATUSPANE_INFOS, C_STATUS_WARNING)
|
||||
#define M_TFAMessage(szText) M_GetMainWnd()->UpdateStatus(szText, C_STATUSPANE_INFOS, C_STATUS_NORMAL)
|
||||
|
||||
/*=============================================================================
|
||||
* the DLL global definition
|
||||
=============================================================================*/
|
||||
tdstDLLIdentity g_stTFamilyIdentity;
|
||||
|
||||
static CPA_EditorBase *gs_p_oActionDLL;
|
||||
static CPA_EditorBase *gs_p_oAnimationDLL;
|
||||
|
||||
/*=============================================================================
|
||||
*
|
||||
* TFamily_Interface implementation
|
||||
*
|
||||
=============================================================================*/
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Constructor
|
||||
*---------------------------------------------------------------------------*/
|
||||
TFamily_Interface::TFamily_Interface(void)
|
||||
{
|
||||
// ************************** private internal
|
||||
m_p_stDLLIdentity = &g_stTFamilyIdentity;
|
||||
|
||||
// Does your DLL can output in main game view ?
|
||||
m_stBaseDLLDefinition.bCanOutputIn3DView = FALSE;
|
||||
|
||||
// Does your DLL can be refresh by engine ?
|
||||
m_stBaseDLLDefinition.bCanBeRefreshedByEngine = FALSE;
|
||||
|
||||
// Editor Info
|
||||
SetEditorInfo(g_csTFAName, g_csTFAAuthor, g_csTFAVersion, g_csTFAFrenchHelpFile, g_csTFAEnglishHelpFile);
|
||||
//
|
||||
m_lNbUnloadedFamilies = 0;
|
||||
m_bLevelLoad = FALSE;
|
||||
m_bCompleteLoad = FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* ACP MEssages Functions overload
|
||||
******************************************************************************/
|
||||
|
||||
void TFamily_Interface::fn_vJustAfterRegistered(void)
|
||||
{
|
||||
CString a_csType[] = { C_szFamilyTypeName, C_szChannelTypeName};
|
||||
fn_vRegisterObjectsType ( a_csType , 2 ) ;
|
||||
|
||||
CPA_Family::Init();
|
||||
|
||||
// register section for SCRIPT analysis
|
||||
SCR_fn_v_RdL0_RegisterCallback( "BaseFamily", CPA_Family::mfn_CallbackLoadBaseFamilySection, SCR_CRC_c_RdL0_ForSection );
|
||||
// load preferences on .ini
|
||||
mfn_vLoadPreferences();
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Construct
|
||||
*---------------------------------------------------------------------------*/
|
||||
void TFamily_Interface::fn_vConstruct(void)
|
||||
{
|
||||
CPA_Family::InitStatic( GetMainWorld() );
|
||||
gs_p_oActionDLL = GetMainWorld()->GetToolDLLWithName( C_szDLLActionName );
|
||||
gs_p_oAnimationDLL = GetMainWorld()->GetToolDLLWithName( C_szDLLAnimationName );
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* load editor families once
|
||||
*---------------------------------------------------------------------------*/
|
||||
void TFamily_Interface::fn_vLevelChanges(void)
|
||||
{
|
||||
m_bLevelLoad = TRUE;
|
||||
|
||||
// create objects for loaded families
|
||||
mfn_vCreateLoadedFamilies();
|
||||
// create objects for unloaded families if needed
|
||||
if( m_bCompleteLoad )
|
||||
mfn_vCreateUnloadedFamilies();
|
||||
|
||||
m_bLevelLoad = FALSE;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* load given object
|
||||
*---------------------------------------------------------------------------*/
|
||||
BOOL TFamily_Interface::fn_bLoadBaseObject(CPA_BaseObject *p_oObject)
|
||||
{
|
||||
if( ! p_oObject -> fn_bIsAvailable() )
|
||||
{
|
||||
CPA_Family *p_oFamily = (CPA_Family*)p_oObject;
|
||||
p_oFamily -> mfn_vLoad();
|
||||
if( p_oFamily -> fn_bIsAvailable() )
|
||||
{
|
||||
m_lNbUnloadedFamilies--;
|
||||
if (gs_p_oActionDLL!= NULL)
|
||||
gs_p_oActionDLL -> OnQueryAction(this , C_uiUpdateFamiliesList, (LPARAM) 0);
|
||||
|
||||
// update actor editor
|
||||
CPA_EditorBase *pActorDLL = GetMainWorld()->GetObjectDLLWithName(C_szDLLActorName);
|
||||
if (pActorDLL)
|
||||
{
|
||||
pActorDLL->OnQueryAction(NULL, C_uiActor_LoadFamilyModels, (LPARAM)p_oFamily);
|
||||
pActorDLL->OnQueryAction (this, C_uiActor_UpdateTreeView, (LPARAM)0);
|
||||
}
|
||||
}
|
||||
if( ! m_bLevelLoad )
|
||||
{
|
||||
// update mechanics
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* tool dll functions overload
|
||||
******************************************************************************/
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* OnQueryAction
|
||||
*---------------------------------------------------------------------------*/
|
||||
long TFamily_Interface::OnQueryAction(CPA_EditorBase *p_oSender, WPARAM _wParam, LPARAM _lParam)
|
||||
{
|
||||
char *szFamilyName;
|
||||
CPA_Family *p_oFamily = NULL;
|
||||
|
||||
switch( _wParam )
|
||||
{
|
||||
case C_uiSaveFamilies:
|
||||
ASSERT(0);
|
||||
break;
|
||||
case C_uiLoadAFamily:
|
||||
szFamilyName = (char*)_lParam;
|
||||
p_oFamily = (CPA_Family*)GetBaseObject( CString(szFamilyName), C_szFamilyTypeName );
|
||||
if( p_oFamily )
|
||||
{
|
||||
// load family
|
||||
fn_bLoadBaseObject( p_oFamily );
|
||||
}
|
||||
return (long)p_oFamily;
|
||||
break;
|
||||
case C_uiGetUnLoadedFamiliesList:
|
||||
ASSERT(0);
|
||||
break;
|
||||
case C_uiSetCompleteLoadModeTFA:
|
||||
m_bCompleteLoad = (BOOL) _lParam;
|
||||
mfn_vSavePreferences();
|
||||
break;
|
||||
case C_uiUpdateFamilies:
|
||||
mfn_vCreateUnloadedFamilies();
|
||||
break;
|
||||
case C_uiGetChannel:
|
||||
return mfn_lGetChannel( (tdstChannelInfoSearch*)_lParam );
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* OnQueryInfo
|
||||
*---------------------------------------------------------------------------*/
|
||||
long TFamily_Interface::OnQueryInfos(CPA_EditorBase *p_oSender, WPARAM _wParam, LPARAM _lParam)
|
||||
{
|
||||
switch( _wParam )
|
||||
{
|
||||
case C_uiGetCompleteLoadModeTFA:
|
||||
return (long)m_bCompleteLoad;
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*=============================================================================
|
||||
* Menus methods
|
||||
=============================================================================*/
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : Add entry in editor menu
|
||||
*---------------------------------------------------------------------------*/
|
||||
BOOL TFamily_Interface::fn_bDefineSubMenu(EDT_SubMenu *_p_oEDTSubMenu)
|
||||
{
|
||||
//ANNECY Shaitan NewInterface 24/03/98 {
|
||||
if (_p_oEDTSubMenu->GetSubMenuType() == C_SubMenuLoad)
|
||||
//ENDANNECY Shaitan NewInterface }
|
||||
{
|
||||
_p_oEDTSubMenu->AddAnEntry(this, "Load Some Families", C_uiTFAPopupLoad, FALSE, m_lNbUnloadedFamilies > 0 );
|
||||
_p_oEDTSubMenu->AddAnEntry(this, "PreLoad All Families", C_uiTFAPopupPreLoad );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : Manage choice of Action entry in editor menu
|
||||
*---------------------------------------------------------------------------*/
|
||||
void TFamily_Interface::_OnSubMenuCommand(EDT_SubMenu *_p_oEDTSubMenu,UINT uiMsgID)
|
||||
{
|
||||
//ANNECY Shaitan NewInterface 24/03/98 {
|
||||
if( _p_oEDTSubMenu->GetSubMenuType() == C_SubMenuLoad )
|
||||
//ENDANNECY Shaitan NewInterface }
|
||||
{
|
||||
switch( uiMsgID )
|
||||
{
|
||||
case C_uiTFAPopupLoad:
|
||||
mfn_vLoadFamilies();
|
||||
break;
|
||||
case C_uiTFAPopupPreLoad:
|
||||
mfn_vCreateUnloadedFamilies();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : Open Unloaded families DialogList and load selected families
|
||||
*---------------------------------------------------------------------------*/
|
||||
void TFamily_Interface::mfn_vLoadFamilies(void)
|
||||
{
|
||||
HINSTANCE hOldInst = AfxGetResourceHandle();
|
||||
AfxSetResourceHandle( m_p_stDLLIdentity->hModule );
|
||||
|
||||
CDlgLoad *pDlg = new CDlgLoad();
|
||||
|
||||
//CPA2 Stegaru Cristian 98-06
|
||||
CPA_EditorBase *pActorDLL = GetMainWorld()->GetObjectDLLWithName(C_szDLLActorName);
|
||||
if (pDlg)
|
||||
pDlg->mfn_vSetActorDLL (pActorDLL);
|
||||
//End CPA2 Stegaru Cristian 98-06
|
||||
|
||||
pDlg -> fn_vSetFamilyList( GetBaseObjectList( C_szFamilyTypeName ) );
|
||||
|
||||
if( pDlg -> DoModal() == IDOK )
|
||||
{
|
||||
CPA_List<CPA_BaseObject> *p_oListOfSelectedFamilies = pDlg -> fn_p_oGetListOfSelectedFamilies();
|
||||
|
||||
POSITION xPos = p_oListOfSelectedFamilies -> GetHeadPosition();
|
||||
while( xPos )
|
||||
{
|
||||
// load family
|
||||
CPA_BaseObject *p_oFamily = (CPA_Family*)p_oListOfSelectedFamilies -> GetNext( xPos );
|
||||
if( p_oFamily )
|
||||
{
|
||||
// load family
|
||||
fn_bLoadBaseObject( p_oFamily );
|
||||
}
|
||||
}
|
||||
if( p_oListOfSelectedFamilies -> GetCount() )
|
||||
{
|
||||
CPA_DLLBase *p_oActionDLL = GetMainWorld()->GetToolDLLWithName( C_szDLLActionName );
|
||||
if (p_oActionDLL != NULL)
|
||||
p_oActionDLL->OnQueryAction(this , C_uiUpdateFamiliesList, (LPARAM) 0);
|
||||
|
||||
//CPA2 Stegaru Cristian 98-06
|
||||
if (pActorDLL)
|
||||
pActorDLL->OnQueryAction (this, C_uiActor_UpdateTreeView, (LPARAM)0);
|
||||
//End CPA2 Stegaru Cristian 98-06
|
||||
}
|
||||
}
|
||||
delete pDlg;
|
||||
|
||||
AfxSetResourceHandle( hOldInst );
|
||||
}
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Description : search index channel with given datas
|
||||
*---------------------------------------------------------------------------*/
|
||||
long TFamily_Interface::mfn_lGetChannel(tdstChannelInfoSearch *_p_stChannelInfo)
|
||||
{
|
||||
/*
|
||||
// search on given family
|
||||
if( _p_stChannelInfo -> p_oFamily )
|
||||
{
|
||||
POSITION xPos = _p_stChannelInfo -> p_oFamily -> m_oListOfChannelsName . GetHeadPosition();
|
||||
long lIndex = 0;
|
||||
while ( xPos )
|
||||
{
|
||||
CString csChannelName = _p_stChannelInfo -> p_oFamily -> m_oListOfChannelsName . GetNext( xPos );
|
||||
if( ! csChannelName . CompareNoCase( _p_stChannelInfo -> szChannel ) )
|
||||
{
|
||||
// find channel
|
||||
_p_stChannelInfo -> lIndexOfChannel = lIndex;
|
||||
return 1;
|
||||
}
|
||||
lIndex++;
|
||||
}
|
||||
}
|
||||
// search channel on all families
|
||||
long lFounded = 0;
|
||||
_p_stChannelInfo -> p_oFamily = NULL;
|
||||
CPA_BaseObjectList *p_oListOfFamilies = GetBaseObjectList( C_szFamilyTypeName );
|
||||
Position xPosFA = p_oListOfFamilies -> GetHeadPosition();
|
||||
while ( xPosFA )
|
||||
{
|
||||
CPA_Family *p_oFamily = (CPA_Family*)p_oListOfFamilies -> GetNext( xPosFA );
|
||||
// search channel on current family
|
||||
POSITION xPos = p_oFamily -> m_oListOfChannelsName . GetHeadPosition();
|
||||
long lIndex = 0;
|
||||
while ( xPos )
|
||||
{
|
||||
CString csChannelName = p_oFamily -> m_oListOfChannelsName . GetNext( xPos );
|
||||
if( ! csChannelName . CompareNoCase( _p_stChannelInfo -> szChannel ) )
|
||||
{
|
||||
// find channel, update '_p_stChannelInfo'
|
||||
_p_stChannelInfo -> p_oFamily = p_oFamily;
|
||||
_p_stChannelInfo -> lIndexOfChannel = lIndex;
|
||||
lFounded++;
|
||||
if( lFounded == 2 )
|
||||
{
|
||||
// too many channel founded, error
|
||||
_p_stChannelInfo -> p_oFamily = NULL;
|
||||
_p_stChannelInfo -> lIndexOfChannel = 0;
|
||||
return lFounded;
|
||||
}
|
||||
}
|
||||
lIndex++;
|
||||
}
|
||||
}
|
||||
return lFounded;
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
CPA_List<CPA_BaseObject> oList;
|
||||
long lNbFound;
|
||||
|
||||
if( _p_stChannelInfo -> p_oFamily )
|
||||
{
|
||||
// search on given family
|
||||
lNbFound = fn_lFindObjects( &oList, _p_stChannelInfo -> szChannel, C_szChannelTypeName, _p_stChannelInfo -> p_oFamily );
|
||||
if( lNbFound == 1 )
|
||||
{
|
||||
_p_stChannelInfo -> p_oChannel = (CPA_Channel*)oList . GetHead();
|
||||
_p_stChannelInfo -> lIndexOfChannel = (long)_p_stChannelInfo -> p_oChannel -> GetData();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// search on all families
|
||||
lNbFound = fn_lFindObjects( &oList, _p_stChannelInfo -> szChannel, C_szChannelTypeName );
|
||||
if( lNbFound == 1 )
|
||||
{
|
||||
_p_stChannelInfo -> p_oChannel = (CPA_Channel*)oList . GetHead();
|
||||
_p_stChannelInfo -> p_oFamily = (CPA_Family*)_p_stChannelInfo -> p_oChannel -> GetOwner();
|
||||
_p_stChannelInfo -> lIndexOfChannel = (long)_p_stChannelInfo -> p_oChannel -> GetData();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
// no channel found or too much channels ofund
|
||||
_p_stChannelInfo -> p_oChannel = NULL;
|
||||
_p_stChannelInfo -> p_oFamily = NULL;
|
||||
_p_stChannelInfo -> lIndexOfChannel = 0;
|
||||
return lNbFound;
|
||||
}
|
||||
|
||||
/* -----------------02/10/97 17:42-------------------
|
||||
* create editor objects for loaded families
|
||||
* --------------------------------------------------*/
|
||||
void TFamily_Interface::mfn_vCreateLoadedFamilies()
|
||||
{
|
||||
tdObjectType otType = 0;
|
||||
char* szFamilyName = fn_szFindFamilyTypeNameOfFamilyType( otType++ );
|
||||
char szMessage[255];
|
||||
char* szBeginFamily;
|
||||
CPA_Family *p_oFamily;
|
||||
CPA_List<CPA_Family> oListOfFamilies;
|
||||
POSITION xPos;
|
||||
BOOL bPreviousLoadingWorld = GetInterface() -> fn_bIsLoadingWorld();
|
||||
|
||||
// no prefix
|
||||
GetInterface() -> SetLoadingWorld( TRUE );
|
||||
strcpy( szMessage, "PreLoad All Families" );
|
||||
g_oBaseFrame.mfnv_UpdateTitle(szMessage);
|
||||
// M_TFAMessage( szMessage );
|
||||
|
||||
while ( szFamilyName )
|
||||
{
|
||||
// create editor object
|
||||
p_oFamily = new CPA_Family( this, NULL, szFamilyName );
|
||||
oListOfFamilies . AddTail( p_oFamily );
|
||||
// get next family name
|
||||
szFamilyName = fn_szFindFamilyTypeNameOfFamilyType( otType++ );
|
||||
}
|
||||
// update StatusBar
|
||||
// strcat( szMessage, " >>> 100% Completed" );
|
||||
// M_TFAMessage( szMessage );
|
||||
|
||||
// load all animations
|
||||
if( gs_p_oAnimationDLL )
|
||||
gs_p_oAnimationDLL -> OnQueryAction( this, C_cLoadAllAnimations, 0 );
|
||||
|
||||
// load families
|
||||
strcpy( szMessage, "Load Family : " );
|
||||
szBeginFamily = szMessage + strlen( szMessage );
|
||||
|
||||
xPos = oListOfFamilies . GetHeadPosition();
|
||||
while( xPos )
|
||||
{
|
||||
p_oFamily = oListOfFamilies . GetNext( xPos );
|
||||
|
||||
// update StatusBar
|
||||
strcpy( szBeginFamily, p_oFamily -> fn_p_szGetName() );
|
||||
g_oBaseFrame.mfnv_UpdateTitle(szMessage);
|
||||
// M_TFAMessage( szMessage );
|
||||
// link with engine object
|
||||
p_oFamily -> mfn_vLoad();
|
||||
p_oFamily -> mfn_vSetOnLevel( TRUE );
|
||||
// update StatusBar
|
||||
// strcat( szMessage, " >>> 100% Completed" );
|
||||
// M_TFAMessage( szMessage );
|
||||
}
|
||||
oListOfFamilies . RemoveAll();
|
||||
// restore prefix use
|
||||
GetInterface() -> SetLoadingWorld( bPreviousLoadingWorld );
|
||||
// M_TFAMessage( "" );
|
||||
}
|
||||
|
||||
/* -----------------02/10/97 17:58-------------------
|
||||
* create editor objects for unloaded families
|
||||
* --------------------------------------------------*/
|
||||
void TFamily_Interface::mfn_vCreateUnloadedFamilies()
|
||||
{
|
||||
WIN32_FIND_DATA stWFD; // structure for searching file
|
||||
HANDLE hFD; // handle for searching file
|
||||
char szSearchName[MAX_PATH]; // name of searched file (including relative path to family dir)
|
||||
CPA_Family *p_oFamily; // created family
|
||||
char szMessage[255];
|
||||
char* szBeginFamily;
|
||||
BOOL bPreviousLoadingWorld = GetInterface() -> fn_bIsLoadingWorld();
|
||||
|
||||
strcpy( szMessage, "Load Family : " );
|
||||
szBeginFamily = szMessage + strlen( szMessage );
|
||||
|
||||
// no prefix
|
||||
GetInterface() -> SetLoadingWorld( TRUE );
|
||||
|
||||
// initialize searching loop (search all file in family directory)
|
||||
strcpy( szSearchName, fn_szGetFamiliesDataPath() );
|
||||
strcat( szSearchName, "\\*");
|
||||
hFD = FindFirstFile( szSearchName, &stWFD );
|
||||
|
||||
m_lNbUnloadedFamilies = 0;
|
||||
|
||||
// stop load if no file found or if an error occurs
|
||||
if ( hFD == INVALID_HANDLE_VALUE )
|
||||
return;
|
||||
|
||||
do
|
||||
{
|
||||
if ((stWFD.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && (stWFD.cFileName[0] != '.') )
|
||||
{
|
||||
// current founded file is a directory and isn't current('.') or parent ('..') dir
|
||||
// it correspond to a family which name is the same as the directory name
|
||||
|
||||
// existing family ???
|
||||
p_oFamily = (CPA_Family*)GetBaseObject( CString(stWFD.cFileName), C_szFamilyTypeName );
|
||||
if( p_oFamily == NULL )
|
||||
{
|
||||
// new family
|
||||
// update StatusBar
|
||||
strcpy( szBeginFamily, stWFD.cFileName );
|
||||
M_TFAMessage( szMessage );
|
||||
p_oFamily = new CPA_Family( this, NULL, stWFD.cFileName );
|
||||
// family not loaded and not on current level
|
||||
p_oFamily -> mfn_vSetOnLevel( FALSE );
|
||||
m_lNbUnloadedFamilies++;
|
||||
// update StatusBar
|
||||
strcat( szMessage, " >>> 100% Completed" );
|
||||
M_TFAMessage( szMessage );
|
||||
}
|
||||
else if( ! p_oFamily -> fn_bIsAvailable() )
|
||||
{
|
||||
m_lNbUnloadedFamilies++;
|
||||
}
|
||||
}
|
||||
} while (FindNextFile( hFD, &stWFD) );
|
||||
|
||||
// clear StatusBar
|
||||
M_TFAMessage( "" );
|
||||
// close FindData handle
|
||||
FindClose(hFD);
|
||||
// restore prefix use
|
||||
GetInterface() -> SetLoadingWorld( bPreviousLoadingWorld );
|
||||
//
|
||||
if( gs_p_oActionDLL )
|
||||
gs_p_oActionDLL -> OnQueryAction( this, C_uiUpdateFamiliesList, 0 );
|
||||
}
|
||||
|
||||
/* -----------------02/10/97 18:16-------------------
|
||||
* save preferneces on .ini
|
||||
* --------------------------------------------------*/
|
||||
void TFamily_Interface::mfn_vSavePreferences()
|
||||
{
|
||||
CString csFileName;
|
||||
CString csDimension;
|
||||
|
||||
csFileName = M_GetMainApp()->m_csEditorDataPath + "Tools\\Family\\Family.ini";
|
||||
char *p_szFileName = (char*)(LPCSTR)csFileName;
|
||||
|
||||
// CompleteLoad mode
|
||||
WritePrivateProfileString( "Preference", "Complete Load", m_bCompleteLoad ? "YES" : "NO" , p_szFileName );
|
||||
|
||||
// write on file
|
||||
WritePrivateProfileString( NULL, NULL, NULL , p_szFileName );
|
||||
}
|
||||
|
||||
/* -----------------02/10/97 18:16-------------------
|
||||
* load preferneces on .ini
|
||||
* --------------------------------------------------*/
|
||||
void TFamily_Interface::mfn_vLoadPreferences()
|
||||
{
|
||||
CString csFileName;
|
||||
char szText[256];
|
||||
|
||||
csFileName = M_GetMainApp()->m_csEditorDataPath + "Tools\\Family\\Family.ini";
|
||||
char *p_szFileName = (char*)(LPCSTR)csFileName;
|
||||
|
||||
// CompleteLoad mode
|
||||
GetPrivateProfileString ("Preference", "Complete Load", "YES", szText, 256, p_szFileName);
|
||||
m_bCompleteLoad = !strcmpi( szText, "YES" );
|
||||
}
|
10
Rayman_X/cpa/tempgrp/TFa/src/Family.def
Normal file
10
Rayman_X/cpa/tempgrp/TFa/src/Family.def
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
|
||||
LIBRARY
|
||||
EXPORTS
|
||||
fn_p_szGetCPAVersion
|
||||
fn_p_stGetDLLIdentity
|
||||
fn_p_oGetDLL
|
||||
fn_vInitDll
|
||||
SECTIONS
|
||||
.data READ WRITE
|
6
Rayman_X/cpa/tempgrp/TFa/src/StdAfx.cpp
Normal file
6
Rayman_X/cpa/tempgrp/TFa/src/StdAfx.cpp
Normal 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"
|
||||
|
118
Rayman_X/cpa/tempgrp/TFa/src/dllcom.cpp
Normal file
118
Rayman_X/cpa/tempgrp/TFa/src/dllcom.cpp
Normal file
@@ -0,0 +1,118 @@
|
||||
//
|
||||
// Common functions for Object DLL capabilities
|
||||
// C. Beaudet
|
||||
//
|
||||
|
||||
//MFC
|
||||
#include "stdafx.h"
|
||||
#include "afxdllx.h"
|
||||
//Interface
|
||||
#include "ACP_Base.h"
|
||||
// ALX
|
||||
#include "TAC.h"
|
||||
// End ALX
|
||||
#include "ITF.h"
|
||||
//local
|
||||
#include "FAinterf.hpp"
|
||||
#include "X:\Cpa\Main\Inc\_EditID.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Global vars
|
||||
static char *gs_p_szCPAVersion = C_szCPAVersion;
|
||||
static AFX_EXTENSION_MODULE NEAR extensionDLL = { NULL, NULL };
|
||||
|
||||
#ifdef DLL_ONLY_ONE_INSTANCE
|
||||
static TFamily_Interface *gs_p_oTFamilyInterface = 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_stTFamilyIdentity . eType = TOOL_DLL;
|
||||
g_stTFamilyIdentity . csName = C_szDLLFamilyName;
|
||||
g_stTFamilyIdentity . hModule = NULL;
|
||||
g_stTFamilyIdentity . p_oListOfInstances = &g_oListOfInstances;
|
||||
return &g_stTFamilyIdentity;
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// DLL int 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_oTFamilyInterface == NULL)
|
||||
{
|
||||
gs_p_oTFamilyInterface = new TFamily_Interface();
|
||||
ASSERT(gs_p_oTFamilyInterface != NULL);
|
||||
}
|
||||
return gs_p_oTFamilyInterface;
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#else //DLL_ONLY_ONE_INSTANCE
|
||||
|
||||
switch(lKey)
|
||||
{
|
||||
case 0: // the game world
|
||||
return new TFamily_Interface();
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif //DLL_ONLY_ONE_INSTANCE
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// functions that are present in this type of DLL only :
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
#undef DLL_ONLY_ONE_INSTANCE
|
Reference in New Issue
Block a user