Add rayman2 source files

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

View File

@@ -0,0 +1,154 @@
# Microsoft Developer Studio Project File - Name="TLS" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=TLS - Win32 Debug Glide with Editors
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "Tls.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 "Tls.mak" CFG="TLS - Win32 Debug Glide with Editors"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "TLS - Win32 Debug Glide with Editors" (based on\
"Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""$/CPA/TempGrp/Tls", VYJAAAAA"
# PROP Scc_LocalPath "."
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug Glide with Editors"
# PROP BASE Intermediate_Dir "Debug Glide with Editors"
# PROP BASE Target_Dir ""
# PROP Use_MFC 2
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "x:\CPA\EXE\main\EDT_Data\Tools"
# PROP Intermediate_Dir "Tmp\TLSDFEvd"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /Z7 /Od /I "X:\CPA\Public" /I "inc" /I "res" /D "CPA_WANTS_IMPORT" /D "ACTIVE_EDITOR" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CPA_VISUAL" /D "CPA_DEBUG" /D "_WINDLL" /D "_AFXDLL" /Fr /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x40c /d "_DEBUG"
# ADD RSC /l 0x40c /fo"Tmp\TSLDFEvd/TFA.res" /d "_DEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo /o"Tmp\TSLP5Evd\TSL.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 /nologo /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /def:"src\LipSyn.def" /out:"X:\CPA\EXE\main\EDT_Data\TOOLS\TLSDFEvd.dll" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
# Begin Target
# Name "TLS - Win32 Debug Glide with Editors"
# Begin Group "Source Files"
# PROP Default_Filter "cpp"
# Begin Source File
SOURCE=.\src\dllcom.cpp
# End Source File
# Begin Source File
SOURCE=.\src\LipSyn.def
# End Source File
# Begin Source File
SOURCE=.\src\LPSdLoad.cpp
# End Source File
# Begin Source File
SOURCE=.\src\LPSinter.cpp
# End Source File
# Begin Source File
SOURCE=.\src\LPSobj.cpp
# End Source File
# Begin Source File
SOURCE=.\src\StdAfx.cpp
# End Source File
# End Group
# Begin Group "Include Files"
# PROP Default_Filter "hpp,h"
# Begin Source File
SOURCE=..\..\public\TLS\LPSconst.hpp
# End Source File
# Begin Source File
SOURCE=.\inc\LPSdLoad.hpp
# End Source File
# Begin Source File
SOURCE=.\inc\LPSinter.hpp
# End Source File
# Begin Source File
SOURCE=.\inc\LPSobj.hpp
# End Source File
# Begin Source File
SOURCE=.\inc\StdAfx.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "rc,h"
# Begin Source File
SOURCE=.\res\LPSfam.ico
# End Source File
# Begin Source File
SOURCE=.\res\LPSlipb.ico
# End Source File
# Begin Source File
SOURCE=.\res\LPSlips.ico
# End Source File
# Begin Source File
SOURCE=.\res\LPSno.ico
# End Source File
# Begin Source File
SOURCE=.\res\LPSnob.ico
# End Source File
# Begin Source File
SOURCE=.\res\LPSres.h
# End Source File
# Begin Source File
SOURCE=.\res\LPSres.rc
# End Source File
# End Group
# Begin Group "Others"
# PROP Default_Filter ""
# End Group
# Begin Group "libs debug"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Exe\Main\MaiDFEvd.lib
# End Source File
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="TLS"
ProjectGUID="{7490D6DB-9591-40CE-B62D-3E0D31975E31}"
SccProjectName="&quot;$/CPA/TempGrp/Tls&quot;, VYJAAAAA"
SccLocalPath="."
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\TLSDFEvd"
ConfigurationType="2"
UseOfMFC="2"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="X:\CPA\Public,inc,res"
PreprocessorDefinitions="CPA_WANTS_IMPORT;ACTIVE_EDITOR;WIN32;_DEBUG;_WINDOWS;CPA_VISUAL;CPA_DEBUG"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Tmp\TLSDFEvd/Tls.pch"
AssemblerListingLocation=".\Tmp\TLSDFEvd/"
ObjectFile=".\Tmp\TLSDFEvd/"
ProgramDataBaseFileName=".\Tmp\TLSDFEvd/"
BrowseInformation="1"
BrowseInformationFile=".\Tmp\TLSDFEvd/"
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\TLSDFEvd.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="X:\cpa\exe\main"
IgnoreDefaultLibraryNames=""
ModuleDefinitionFile=".\src\LipSyn.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="x:\CPA\EXE\main\EDT_Data\Tools/TLSDFEvd.pdb"
SubSystem="2"
ImportLibrary="x:\CPA\EXE\main\EDT_Data\Tools/TLSDFEvd.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName="x:\CPA\EXE\main\EDT_Data\Tools/Tls.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1036"
ResourceOutputFileName="Tmp\TSLDFEvd/TFA.res"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp">
<File
RelativePath="src\dllcom.cpp">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BrowseInformation="1"/>
</FileConfiguration>
</File>
<File
RelativePath="src\LipSyn.def">
</File>
<File
RelativePath="src\LPSdLoad.cpp">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BrowseInformation="1"/>
</FileConfiguration>
</File>
<File
RelativePath="src\LPSinter.cpp">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BrowseInformation="1"/>
</FileConfiguration>
</File>
<File
RelativePath="src\LPSobj.cpp">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BrowseInformation="1"/>
</FileConfiguration>
</File>
<File
RelativePath="src\StdAfx.cpp">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BrowseInformation="1"/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Include Files"
Filter="hpp,h">
<File
RelativePath="..\..\public\TLS\LPSconst.hpp">
</File>
<File
RelativePath="inc\LPSdLoad.hpp">
</File>
<File
RelativePath="inc\LPSinter.hpp">
</File>
<File
RelativePath="inc\LPSobj.hpp">
</File>
<File
RelativePath="inc\StdAfx.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc,h">
<File
RelativePath="res\LPSfam.ico">
</File>
<File
RelativePath="res\LPSlipb.ico">
</File>
<File
RelativePath="res\LPSlips.ico">
</File>
<File
RelativePath="res\LPSno.ico">
</File>
<File
RelativePath="res\LPSnob.ico">
</File>
<File
RelativePath="res\LPSres.h">
</File>
<File
RelativePath="res\LPSres.rc">
<FileConfiguration
Name="Debug Glide with Editors|Win32">
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
AdditionalIncludeDirectories="res"/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Others"
Filter="">
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,75 @@
/*=========================================================================
*
* LPDdLoad.hpp : class LPS_DialogLoad
*
*
* Version 1.0
* Creation date 16/08/97
* Revision date
*
* Shaitan
*=======================================================================*/
#ifndef __LPS_D_LOAD_HPP__
#define __LPS_D_LOAD_HPP__
#include "LPSres.h"
class LipSync_Interface;
/*===========================================================================
* Description: Class LPS_DialogLoad
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class LPS_DialogLoad : public CDialog
{
protected:
LipSync_Interface *m_pOwnerEditor;
CPA_List<CPA_BaseObject> m_oObjectsToLoad;
HTREEITEM m_hFirstItem;
CImageList m_oIconList;
public:
CPA_BaseObjectList *m_p_oListOfFamilies;
// Construction
public:
LPS_DialogLoad (LipSync_Interface *pOwnerEditor, CWnd* pParent = NULL);
CPA_List<CPA_BaseObject> * GetObjectsToLoad (void) { return &m_oObjectsToLoad; }
HTREEITEM GetCorrespondingItem (CPA_BaseObject *pObject, HTREEITEM hElem = NULL);
// Dialog Data
//{{AFX_DATA(LPS_DialogLoad)
enum { IDD = LPS_IDD_DIALOGLIPS };
CTreeCtrl m_cTree;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(LPS_DialogLoad)
protected:
virtual void DoDataExchange(CDataExchange* pDX);
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(LPS_DialogLoad)
virtual BOOL OnInitDialog();
afx_msg void OnSelchangeTreeControl(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnRightClkTreeControl(NMHDR* pNMHDR, LRESULT* pResult);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif //__LPS_D_LOAD_HPP__

View File

@@ -0,0 +1,76 @@
/*=========================================================================
*
* LPSinter.hpp : LipSync DLL Interface - definition
*
*
* Version 1.0
* Creation date 16/08/97
* Revision date 18/08/97
*
* Shaitan
*=======================================================================*/
#ifndef __LPS_INTER_HPP__
#define __LPS_INTER_HPP__
#include "incITF.h"
// if you want only one instance of your DLL
// activate the next line
#define DLL_ONLY_ONE_INSTANCE
class LPS_DialogLoad;
/*===========================================================================
* Description: class LipSync_Interface
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: 18/08/97 Author: Shaitan
*=========================================================================*/
class LipSync_Interface : public CPA_ToolDLLBase
{
protected:
LPS_DialogLoad *m_pDialogLoad;
long m_lNbUnloaded;
public:
LipSync_Interface (void);
~LipSync_Interface (void);
//====================================================================================
//========================= COMMON DLL FUNCTIONS OVERLOAD ============================
//====================================================================================
// ACP Messages Functions overload
void fn_vConstruct (void);
void fn_vJustAfterRegistered (void);
void fn_vLevelChanges (void);
// 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);
//====================================================================================
//=========================== TOOL DLL FUNCTIONS OVERLOAD ============================
//====================================================================================
// To communicate with that editor
long OnQueryAction (CPA_EditorBase *p_oSender, WPARAM, LPARAM);
//====================================================================================
//=========================== LIPSYNC TOOL DLL SPECIFIC FUNCTIONS =====================
//====================================================================================
void fn_vLoadFamilyLipSynchros (CString csFamilyName);
};
extern tdstDLLIdentity g_stLipSyncIdentity;
#endif // __LPS_INTER_HPP__

View File

@@ -0,0 +1,84 @@
/*=========================================================================
*
* LPSobj.hpp : LipSync_Object class - definition
*
*
* Version 1.0
* Creation date 16/08/97
* Revision date 18/08/97
*
* Shaitan
*=======================================================================*/
#ifndef __LPS_OBJECT_HPP__
#define __LPS_OBJECT_HPP__
#include "ACP_Base.h"
#include "incITF.h"
#include "incGAM.h"
class LipSync_Interface;
/*===========================================================================
* Description: class LipSync_Object
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: 18/08/97 Author: Shaitan
*=========================================================================*/
class LipSync_Object : public CPA_SaveObject,
public CPA_EdMot<tdxHandleOfLipsSynchroTable>
{
protected:
CPA_BaseObject *m_pFamily;
public:
//==> Constructor
LipSync_Object (LipSync_Interface *pEditor,
tdxHandleOfLipsSynchroTable hLipSynchro,
CString csName,
CString csFamilyName,
CPA_BaseObject *pFamily);
//==> Destructor
~LipSync_Object (void);
//==> Members
CPA_BaseObject * GetFamily (void) { return m_pFamily; }
//==> Inits for scritps and engine struct
static void StaticInit();
//==> Base Object overlapped
long GetDataType (void) { return 0; }
void * GetData (void) { return (void *) GetStruct(); }
CString GetNameToDraw (void);
tdeMissingCriteria fn_eCheckUnicity (const CString csNewName)
{ return fn_eCheckUnicityWithOwner (csNewName); }
//==> Save Object overlapped
BOOL fn_bCanBeNotified (void) { return FALSE; }
void fn_vNotifySave (void) { };
void fn_vNotifyUnSave (void) { };
void fn_vNotifyRestore (void) { };
void fn_vNotifyRename (void) { };
void fn_vUpdateSectionName (void);
//==> Load
void fn_vLoadEngineStruct (void);
void fn_vFindEngineStruct (void);
protected:
//==> Engine Struct
void SetStruct (tdxHandleOfLipsSynchroTable hLipSynchro);
};
#endif //__LPS_OBJECT_HPP__

View File

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

View File

@@ -0,0 +1,5 @@
SCC = This is a Source Code Control file
[Tls.dsp]
SCC_Aux_Path = "\\srvprojets-ma\Rayman4_DS\Versions\Rayman4DS\Tools"
SCC_Project_Name = "$/CPA/tempgrp/Tls", WRSAAAAA

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,24 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by LPSres.rc
//
#define LPS_IDD_DIALOGLOAD 101
#define LPS_IDI_LIPSYNC 102
#define LPS_IDI_FAMILY 103
#define LPS_IDD_DIALOGLIPS 104
#define LPS_IDI_UNLOAD 104
#define LPS_IDI_LIPSYNCB 105
#define LPS_IDI_UNLOADB 106
#define LPS_IDC_LIPSTREE 1000
#define LPS_IDC_TREECONTROL 1002
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 105
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1003
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@@ -0,0 +1,113 @@
//Microsoft Developer Studio generated resource script.
//
#include "LPSres.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
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
LPS_IDD_DIALOGLIPS, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 150
TOPMARGIN, 7
BOTTOMMARGIN, 214
END
END
#endif // APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"LPSres.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
LPS_IDI_LIPSYNC ICON DISCARDABLE "LPSlips.ico"
LPS_IDI_FAMILY ICON DISCARDABLE "LPSfam.ico"
LPS_IDI_UNLOAD ICON DISCARDABLE "LPSno.ico"
LPS_IDI_LIPSYNCB ICON DISCARDABLE "LPSlipb.ico"
LPS_IDI_UNLOADB ICON DISCARDABLE "LPSnob.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
LPS_IDD_DIALOGLIPS DIALOG DISCARDABLE 0, 0, 157, 221
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,10,190,50,14
PUSHBUTTON "Cancel",IDCANCEL,95,190,50,14
CONTROL "Tree1",LPS_IDC_TREECONTROL,"SysTreeView32",
TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT |
TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,5,5,145,175
END
#endif // French (France) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,269 @@
/*=========================================================================
*
* LPSdLoad.cpp : Load dialog - Implementation file
*
*
* Version 1.0
* Creation date 16/08/97
* Revision date 18/08/97
*
* Shaitan
*=======================================================================*/
#include "stdafx.h"
#define HieFriend
#include "acp_base.h"
#include "LPSinter.hpp"
#include "LPSobj.hpp"
#include "LPSdLoad.hpp"
#include "TLS/LPSconst.hpp"
//#################################################################################
// LPS_DialogLoad dialog
//#################################################################################
/*----------------------------------------
----------------------------------------*/
LPS_DialogLoad::LPS_DialogLoad(LipSync_Interface *pOwnerEditor, CWnd* pParent /*=NULL*/)
: CDialog(LPS_DialogLoad::IDD, pParent)
{
// init editor
m_pOwnerEditor = pOwnerEditor;
// init icon list
m_oIconList.Create(16, 16, ILC_MASK, 0, 6);
m_oIconList.Add(LoadIcon(pOwnerEditor->GetDLLIdentity()->hModule, MAKEINTRESOURCE(LPS_IDI_FAMILY)));
m_oIconList.Add(LoadIcon(pOwnerEditor->GetDLLIdentity()->hModule, MAKEINTRESOURCE(LPS_IDI_UNLOAD)));
m_oIconList.Add(LoadIcon(pOwnerEditor->GetDLLIdentity()->hModule, MAKEINTRESOURCE(LPS_IDI_LIPSYNC)));
m_oIconList.Add(LoadIcon(pOwnerEditor->GetDLLIdentity()->hModule, MAKEINTRESOURCE(LPS_IDI_UNLOADB)));
m_oIconList.Add(LoadIcon(pOwnerEditor->GetDLLIdentity()->hModule, MAKEINTRESOURCE(LPS_IDI_LIPSYNCB)));
}
/*----------------------------------------
----------------------------------------*/
void LPS_DialogLoad::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(LPS_DialogLoad)
DDX_Control(pDX, LPS_IDC_TREECONTROL, m_cTree);
//}}AFX_DATA_MAP
}
/*----------------------------------------
----------------------------------------*/
BEGIN_MESSAGE_MAP(LPS_DialogLoad, CDialog)
//{{AFX_MSG_MAP(LPS_DialogLoad)
ON_NOTIFY(TVN_SELCHANGED, LPS_IDC_TREECONTROL, OnSelchangeTreeControl)
ON_NOTIFY(NM_RCLICK, LPS_IDC_TREECONTROL, OnRightClkTreeControl)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
//#################################################################################
// LPS_DialogLoad message handlers
//#################################################################################
/*----------------------------------------
----------------------------------------*/
BOOL LPS_DialogLoad::OnInitDialog()
{
CPA_BaseObjectList *pListObjects;
CPA_BaseObject *pObject;
LipSync_Object *pLipSync;
HTREEITEM hFamilyItem, hLipsItem;
Position Pos;
CString csName;
CDialog::OnInitDialog();
m_hFirstItem = NULL;
m_cTree.DeleteAllItems();
m_cTree.SetImageList(&m_oIconList, TVSIL_NORMAL);
// fill ListBox with invalid Lips Synchros
pListObjects = m_pOwnerEditor->GetInvalidObjectList(C_szLipSyncTypeName);
// only unloaded lips synchro must be dispayed
for (pObject = pListObjects->GetHeadElement(Pos); pObject;
pObject = pListObjects->GetNextElement(Pos))
{
pLipSync = (LipSync_Object *)pObject;
if (!pLipSync->fn_bIsAvailable())
{
// if necessary, create family item
hFamilyItem = GetCorrespondingItem(pLipSync->GetFamily());
if (!hFamilyItem)
{
hFamilyItem = m_cTree.InsertItem(pLipSync->GetFamily()->GetName(), 0, 0, TVI_ROOT, TVI_SORT);
m_cTree.SetItemData(hFamilyItem, (DWORD) pLipSync->GetFamily());
}
// add lip synchro item
hLipsItem = m_cTree.InsertItem(pLipSync->GetName(), 1, 1, hFamilyItem, TVI_SORT);
m_cTree.SetItemData(hLipsItem, (DWORD) pLipSync);
}
}
return TRUE;
}
/*----------------------------------------
----------------------------------------*/
void LPS_DialogLoad::OnSelchangeTreeControl (NMHDR* pNMHDR, LRESULT* pResult)
{
CPA_BaseObject *pObject;
HTREEITEM hCurItem;
POSITION pos;
LPNM_TREEVIEW pNMTreeView = (LPNM_TREEVIEW)pNMHDR;
if (pNMTreeView->action)
{
// get selected item
hCurItem = m_cTree.GetSelectedItem();
if (hCurItem != NULL)
{
// get corresponding object
pObject = (CPA_BaseObject *) m_cTree.GetItemData(hCurItem);
// Lip Synchro => update list
if (pObject->GetType() == C_szLipSyncTypeName)
{
pos = m_oObjectsToLoad.Find(pObject);
// if object is already in the list, remove it
if (pos != NULL)
{
m_oObjectsToLoad.RemoveAt(pos);
m_cTree.SetItemImage(hCurItem, 1, 1);
}
// else add it
else
{
m_oObjectsToLoad.AddTail(pObject);
m_cTree.SetItemImage(hCurItem, 2, 2);
}
// remove selection
m_cTree.SelectItem(NULL);
}
}
}
*pResult = 0;
}
/*----------------------------------------
----------------------------------------*/
void LPS_DialogLoad::OnRightClkTreeControl(NMHDR* pNMHDR, LRESULT* pResult)
{
LipSync_Object *pLipSync = NULL;
LipSync_Object *pFirstLips;
CPA_BaseObject *pObject;
HTREEITEM hCurItem;
POSITION pos;
POINT mousePos;
BOOL bAdd, bPrev;
// get selected item
GetCursorPos(&mousePos);
m_cTree.ScreenToClient(&mousePos);
hCurItem = m_cTree.HitTest(mousePos);
if (hCurItem != NULL)
{
pObject = (CPA_BaseObject *) m_cTree.GetItemData(hCurItem);
// Lip Synchro => update list
if (pObject->GetType() == C_szLipSyncTypeName)
pLipSync = (LipSync_Object *) pObject;
}
if (!pLipSync)
return;
// first click => get first selected object
if (!m_hFirstItem)
{
// register first item
m_hFirstItem = hCurItem;
m_cTree.SelectItem(m_hFirstItem);
// update icon & state
pFirstLips = (LipSync_Object *) m_cTree.GetItemData(m_hFirstItem);
if (m_oObjectsToLoad.Find(pFirstLips) != NULL)
m_cTree.SetItemImage(m_hFirstItem, 3, 3);
else
m_cTree.SetItemImage(m_hFirstItem, 4, 4);
}
// next click => get last selection and update
else
{
pFirstLips = (LipSync_Object *) m_cTree.GetItemData(m_hFirstItem);
if (pLipSync->GetFamily() == pFirstLips->GetFamily())
{
bAdd = (m_oObjectsToLoad.Find(pFirstLips) == NULL);
bPrev = (pLipSync->GetName() > pFirstLips->GetName());
// update all items
while (pLipSync)
{
// update list and icon
pos = m_oObjectsToLoad.Find(pLipSync);
if (bAdd && !pos)
{
m_oObjectsToLoad.AddTail(pLipSync);
m_cTree.SetItemImage(hCurItem, 2, 2);
}
else if (!bAdd && pos)
{
m_oObjectsToLoad.RemoveAt(pos);
m_cTree.SetItemImage(hCurItem, 1, 1);
}
// get previous item
if (pLipSync != pFirstLips)
{
if (bPrev)
hCurItem = m_cTree.GetPrevSiblingItem(hCurItem);
else
hCurItem = m_cTree.GetNextSiblingItem(hCurItem);
pLipSync = (LipSync_Object *) m_cTree.GetItemData(hCurItem);
}
else
pLipSync = NULL;
}
m_hFirstItem = NULL;
m_cTree.SelectItem(m_hFirstItem);
}
}
// *pResult = 0;
}
/*----------------------------------------
Get Item
----------------------------------------*/
HTREEITEM LPS_DialogLoad::GetCorrespondingItem (CPA_BaseObject *pObject, HTREEITEM hElem)
{
CPA_BaseObject *pData;
HTREEITEM hChild, hResult;
// test hElem name
if (hElem)
{
// get item data
pData = (CPA_BaseObject *) m_cTree.GetItemData(hElem);
// check item data
if (pData == pObject)
return hElem;
}
// test all childs
hChild = (hElem) ? m_cTree.GetChildItem(hElem) : m_cTree.GetRootItem();
while (hChild)
{
hResult = GetCorrespondingItem(pObject, hChild);
if (hResult)
return hResult;
hChild = m_cTree.GetNextSiblingItem(hChild);
}
return NULL;
}

View File

@@ -0,0 +1,355 @@
/*=========================================================================
*
* LPSinter.cpp : LipSync DLL Interface
*
*
* Version 1.0
* Creation date 16/08/97
* Revision date 18/08/97
*
* Shaitan
*=======================================================================*/
#include "stdafx.h"
#define HieFriend
#include "ACP_Base.h"
#include "DPT.h"
#include "incGAM.h"///LoadLSyn.h"
#include "LPSinter.hpp"
#include "LPSobj.hpp"
#include "LPSdLoad.hpp"
#include "TLS/LPSconst.hpp"
#include "x:\cpa\main\inc\_editid.h"
// infos
static CString g_csTLSName = "Lips Synchro";
static CString g_csTLSAuthor = "Chantal Oury";
static CString g_csTLSVersion = "V 1.0.0 (not updated)";
static CString g_csTLSHelpFile = "";
/*=============================================================================
the DLL global definition
=============================================================================*/
tdstDLLIdentity g_stLipSyncIdentity;
/*=============================================================================
defines
=============================================================================*/
#define C_uiPopupLoad 10
//#################################################################################
// Constructor / Destructor
//#################################################################################
/*===========================================================================
* Description: Constructor
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
LipSync_Interface::LipSync_Interface(void)
{
// ************************** private internal
m_p_stDLLIdentity = &g_stLipSyncIdentity;
// 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_csTLSName, g_csTLSAuthor, g_csTLSVersion, g_csTLSHelpFile);
}
/*===========================================================================
* Description: Destructor
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
LipSync_Interface::~LipSync_Interface (void)
{
}
//#################################################################################
// Inits
//#################################################################################
/*===========================================================================
* Description: Inits for Scripts
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
void LipSync_Interface::fn_vJustAfterRegistered (void)
{
// register type
CString a_csType[] = { C_szLipSyncTypeName };
fn_vRegisterObjectsType ( a_csType , 1 ) ;
// static init for scripts
LipSync_Object::StaticInit();
}
/*===========================================================================
* Description: Construct
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
void LipSync_Interface::fn_vConstruct(void)
{
// resources
HINSTANCE hOldInst = AfxGetResourceHandle();
AfxSetResourceHandle(m_p_stDLLIdentity->hModule);
// dialog for load
m_pDialogLoad = new LPS_DialogLoad(this);
// resources
AfxSetResourceHandle(hOldInst);
}
//#################################################################################
// Loads
//#################################################################################
/*===========================================================================
* Description: New level => build all Editor LipSyncs
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: 18/08/97 Author: Shaitan
*=========================================================================*/
void LipSync_Interface::fn_vLevelChanges (void)
{
WIN32_FIND_DATA stFindFileData;
HANDLE hFind;
char szSearchName[MAX_PATH];
// we want all family directories
strcpy(szSearchName, fn_szGetSyncLipsDataPath());
strcat(szSearchName, "\\*");
m_lNbUnloaded = 0;
// get first one
hFind = FindFirstFile(szSearchName, &stFindFileData);
if (hFind == INVALID_HANDLE_VALUE)
return;
M_GetMainWnd()->UpdateStatus("Loading Lips Synchros", C_STATUSPANE_INFOS, C_STATUS_NORMAL);
do
{
// load all LipSync files in family directory
if ((stFindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && (stFindFileData.cFileName[0] != '.'))
{
fn_vLoadFamilyLipSynchros(stFindFileData.cFileName);
}
}
while (FindNextFile(hFind, &stFindFileData));
// close FindData handle
FindClose(hFind);
M_GetMainWnd()->UpdateStatus("Load Lips Synchros >>> 100% Completed", C_STATUSPANE_INFOS, C_STATUS_NORMAL);
}
/*===========================================================================
* Description: Build all Editor LipSync in a family
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: 18/08/97 Author: Shaitan
*=========================================================================*/
void LipSync_Interface::fn_vLoadFamilyLipSynchros (CString csFamilyName)
{
WIN32_FIND_DATA stFindFileData;
LipSync_Object *pLipSynchro;
CPA_BaseObject *pFamily;
CPA_DLLBase *pFamilyDLL;
HANDLE hFind;
CString csText;
char szSearchName[MAX_PATH];
// get family
pFamilyDLL = GetMainWorld()->GetToolDLLWithName(C_szDLLFamilyName);
pFamily = pFamilyDLL->GetBaseObject(csFamilyName, C_szFamilyTypeName);
// no family => lips synchro cannot be loaded
if (!pFamily)
{
csText.Format("Family %s does not exist.\n Lips Synchros of this directory won't be loaded", csFamilyName);
MessageBox(NULL, (char*)(LPCSTR)csText, "Family not found", MB_OK | MB_ICONWARNING);
return;
}
// we want all lip synchro files
strcpy(szSearchName, fn_szGetSyncLipsDataPath());
strcat(szSearchName, "\\");
strcat(szSearchName, csFamilyName);
strcat(szSearchName, "\\*.SYN");
// get first one
hFind = FindFirstFile(szSearchName, &stFindFileData);
if (hFind == INVALID_HANDLE_VALUE)
return;
csText.Format("Loading Lips Synchros for Family : %s", csFamilyName);
M_GetMainWnd()->UpdateStatus((char *)(LPCSTR) csText, C_STATUSPANE_INFOS, C_STATUS_NORMAL);
do
{
// file name (short & complete)
pLipSynchro = new LipSync_Object(this, NULL, stFindFileData.cFileName, csFamilyName, pFamily);
m_lNbUnloaded++;
}
while (FindNextFile(hFind, &stFindFileData));
// close FindData handle
FindClose(hFind);
}
/*===========================================================================
* Description: Load given object
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
BOOL LipSync_Interface::fn_bLoadBaseObject (CPA_BaseObject *p_oObject)
{
LipSync_Object *pLipSync;
if (!p_oObject->fn_bIsAvailable())
{
// load LipSync
pLipSync = (LipSync_Object *) p_oObject;
pLipSync->fn_vLoadEngineStruct();
return TRUE;
}
return FALSE;
}
//#################################################################################
// Tool DLL functions Overload
//#################################################################################
/*===========================================================================
* Description: OnQueryAction => load one LipSync
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: 18/08/97 Author: Shaitan
*=========================================================================*/
long LipSync_Interface::OnQueryAction (CPA_EditorBase *p_oSender, WPARAM wParam, LPARAM lParam)
{
LipSync_Object *pLipSync;
tdstLipSyn_Info *pInfo;
switch (wParam)
{
case C_uiLoadLipSynchro:
// get corresponding LipSync
pInfo = (tdstLipSyn_Info *)lParam;
pLipSync = (LipSync_Object *) GetBaseObject(pInfo->csName, C_szLipSyncTypeName, pInfo->pFamily, E_rc_AllObjects);
// if necessary, load engine struct
if ((pLipSync)&&(!pLipSync->fn_bIsAvailable()))
{
fn_bLoadBaseObject(pLipSync);
m_lNbUnloaded--;
}
// give corresponding LipSync
return (long) pLipSync;
break;
}
return 0;
}
/*===========================================================================
* Description: Tools Menu => add entry for load
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
BOOL LipSync_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 Lips Synchros", C_uiPopupLoad, FALSE, m_lNbUnloaded > 0);
return TRUE;
}
return FALSE;
}
/*===========================================================================
* Description: Tools Menu => answer to load command
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
void LipSync_Interface::_OnSubMenuCommand (EDT_SubMenu *p_oEDTSubMenu, UINT uiMsgID)
{
CPA_List<CPA_BaseObject> *pObjectList;
CPA_BaseObject *pObject;
POSITION pos;
CString csText;
BOOL bRes;
long lNbLoaded = 0;
//ANNECY Shaitan NewInterface 24/03/98 {
if (p_oEDTSubMenu->GetSubMenuType() == C_SubMenuLoad)
//ENDANNECY Shaitan NewInterface }
{
switch (uiMsgID)
{
case C_uiPopupLoad:
if (m_pDialogLoad->DoModal() == IDOK)
{
// get list of objects to load
pObjectList = m_pDialogLoad->GetObjectsToLoad();
// load each object
for (pObject = pObjectList->GetHeadElement(pos); pObject;
pObject = pObjectList->GetNextElement(pos))
{
bRes = fn_bLoadBaseObject(pObject);
if (bRes)
lNbLoaded++;
}
m_lNbUnloaded -= lNbLoaded;
if (lNbLoaded)
{
csText.Format("%ld Lips Synchros loaded", lNbLoaded);
M_GetMainWnd()->UpdateStatus((char*)(LPCSTR)csText, C_STATUSPANE_INFOS, C_STATUS_NORMAL);
}
}
break;
}
}
}

View File

@@ -0,0 +1,257 @@
/*=========================================================================
*
* LPSobj.cpp : LipSync_Object class - implementation
*
*
* Version 1.0
* Creation date 16/08/97
* Revision date 18/08/97
*
* Shaitan
*=======================================================================*/
#include "stdafx.h"
#define HieFriend
#include "ACP_Base.h"
#include "DPT.h"
#include "incGAM.h"
#include "GAM/LipsSync.h"
#include "GAM/LoadLSyn.h"
#include "LPSobj.hpp"
#include "LPSinter.hpp"
#include "TLS/LPSconst.hpp"
#include "x:\cpa\main\inc\_editid.h"
/*=============================================================================
Engine struct
=============================================================================*/
DeclareTemplateStatic(tdxHandleOfLipsSynchroTable);
void del (tdxHandleOfLipsSynchroTable h)
{
}
/*===========================================================================
* Description: Static init (engine struct)
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
void LipSync_Object::StaticInit (void)
{
CPA_EdMot<tdxHandleOfLipsSynchroTable>::Init(NULL/*fn_xAllocateLipsSynchroTable*/, NULL, del);
}
/*===========================================================================
* Description: Constructor
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: 18/08/97 Author: Shaitan
*=========================================================================*/
LipSync_Object::LipSync_Object (LipSync_Interface *pEditor,
tdxHandleOfLipsSynchroTable hLipSynchro,
CString csName,
CString csFamilyName,
CPA_BaseObject *pFamily
)
: CPA_SaveObject (pEditor, // owner editor
C_szLipSyncTypeName, // type
E_ss_NoSave, // status
pFamily, // owner
(hLipSynchro != NULL), // validity
fn_szGetSyncLipsDataPath(), // data path
NULL // callback for save
),
CPA_EdMot<tdxHandleOfLipsSynchroTable> (hLipSynchro)
{
CString csFileName;
char szSectionName[SCR_CV_ui_Cfg_MaxLenName];
// get referenced section name
csFileName += csFamilyName + "\\" + csName;
SCR_fn_v_RdL0_ComputeSectionName(szSectionName, (char *)(LPCSTR)csFileName, C_SectionA3dLSData, "");
// set parameters
SetReferencedSectionName(szSectionName);
SetSectionData (this);
SetExistingSection (TRUE);
// init family
m_pFamily = pFamily;
// Name
if (fn_eRename(csName) != E_mc_None)
SetDefaultValidName();
fn_vUpdateSectionName();
// only loaded lipsynchro are valid
if (hLipSynchro == NULL)
fn_bUnValidate();
}
/*===========================================================================
* Description: Destructor
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
LipSync_Object::~LipSync_Object (void)
{
}
/*===========================================================================
* Description: Engine struct
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
void LipSync_Object::SetStruct (tdxHandleOfLipsSynchroTable hLipSynchro)
{
// update data
fn_vUpdateData(hLipSynchro);
// set struct
CPA_EdMot<tdxHandleOfLipsSynchroTable>::SetStruct(hLipSynchro);
}
/*===========================================================================
* Description: Section Name
* => FamilyName / Name.SYN ^ C_SectionA3dLSData
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: 18/08/97 Author: Shaitan
*=========================================================================*/
void LipSync_Object::fn_vUpdateSectionName (void)
{
CString csSectionName, csFileName;
char szSectionName[SCR_CV_ui_Cfg_MaxLenName];
int iPos;
// get old section name
csSectionName = GetReferencedSectionName();
// build new section name
iPos = csSectionName.ReverseFind('\\');
csFileName = csSectionName.Left(iPos+1) + GetName();
SCR_fn_v_RdL0_ComputeSectionName(szSectionName, (char *)(LPCSTR)csFileName, C_SectionA3dLSData, "");
csSectionName = szSectionName;
// set new section name
SetReferencedSectionName(csSectionName);
}
/*===========================================================================
* Description: Name To Draw
* => Family Name + Name
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
CString LipSync_Object::GetNameToDraw (void)
{
CString csName;
csName = m_pFamily->GetName() + " " + GetName();
return csName;
}
/*===========================================================================
* Description: Load engine struct
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: 18/08/97 Author: Shaitan
*=========================================================================*/
void LipSync_Object::fn_vLoadEngineStruct (void)
{
tdxHandleOfLipsSynchroTable hLipSynchro;
SCR_tdst_Cxt_Values *p_stValues;
CPA_DLLBase *pFamilyDLL;
CString csSectionName, csText;
if (!fn_bIsAvailable())
{
// get section name
csSectionName = GetCompleteSectionName();
// get family parameter
if (!m_pFamily->fn_bIsAvailable())
{
// get family to load
pFamilyDLL = GetMainWorld()->GetToolDLLWithName(C_szDLLFamilyName);
csText.Format("Loading family %s", m_pFamily->GetName());
M_GetMainWnd()->UpdateStatus((char*)(LPCSTR)csText, C_STATUSPANE_INFOS, C_STATUS_NORMAL);
// load family
pFamilyDLL->fn_bLoadBaseObject(m_pFamily);
csText.Format("Family %s loaded", m_pFamily->GetName());
M_GetMainWnd()->UpdateStatus((char*)(LPCSTR)csText, C_STATUSPANE_INFOS, C_STATUS_NORMAL);
}
SCR_M_RdL0_SetContextLong(C_GrandChildContext,1,(long)m_pFamily->GetData());
// if section was already loaded, get value from LinkTable
p_stValues = SCR_fnp_st_RdL0_AnalyseSection((char*)(LPCTSTR) csSectionName, SCR_CDF_uw_Anl_Normal);
hLipSynchro = (tdxHandleOfLipsSynchroTable) (p_stValues->a_ulValues[0]);
// update editor struct
SetStruct(hLipSynchro);
// update validity
SetAvailable(TRUE);
fn_bValidate();
}
}
/*===========================================================================
* Description: Find engine struct
* Creation date: 16/08/97
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: 18/08/97 Author: Shaitan
*=========================================================================*/
void LipSync_Object::fn_vFindEngineStruct (void)
{
tdxHandleOfLipsSynchroTable hLipSynchro;
SCR_tdst_Link_Value *pLinkValue;
SCR_tdst_Sect_Open *pSectOpen;
CString csSectionName;
if (!fn_bIsAvailable())
{
// get section name
csSectionName = GetCompleteSectionName();
// if section was already loaded, get value from LinkTable
pSectOpen = SCR_fnp_st_RdL0_GetOpenSection((char*)(LPCSTR) csSectionName, 0);
if (pSectOpen)
{
// search link table for engine struct
pLinkValue = SCR_fnp_st_Link_SearchKey(&g_st3DOSLinkTable.stLipsSynchroList, (char *)(LPCSTR) csSectionName);
if ((pLinkValue)&&(SCR_M_e_Link_GetState(pLinkValue) == SCR_ELS_Link_Initialized))
{
hLipSynchro = (tdxHandleOfLipsSynchroTable) SCR_M_ul_Link_GetValue(pLinkValue);
// update editor struct
SetStruct(hLipSynchro);
// update validity
SetAvailable(TRUE);
fn_bValidate();
}
}
}
}

View File

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

View File

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

View File

@@ -0,0 +1,123 @@
/*=========================================================================
*
* dllcom.cpp : DLL definition
*
*
* Version 1.0
* Creation date 18/08/97 Author : C. Beaudet
* Revision date 18/08/97 Author : Shaitan
*
* Shaitan
*=======================================================================*/
//MFC
#include "stdafx.h"
#include "afxdllx.h"
//Interface
#include "ACP_Base.h"
#include "ITF.h"
//local
#include "LPSinter.hpp"
#include "TLS/LPSconst.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 LipSync_Interface *gs_p_oLipSyncInterface = 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_stLipSyncIdentity . eType = TOOL_DLL;
g_stLipSyncIdentity . csName = C_szLipSyncDLLName;
g_stLipSyncIdentity . hModule = NULL;
g_stLipSyncIdentity . p_oListOfInstances = &g_oListOfInstances;
return &g_stLipSyncIdentity;
}
//========================================================================
// 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_oLipSyncInterface == NULL)
{
gs_p_oLipSyncInterface = new LipSync_Interface();
ASSERT(gs_p_oLipSyncInterface != NULL);
}
return gs_p_oLipSyncInterface;
break;
default:
return NULL;
}
#else //DLL_ONLY_ONE_INSTANCE
switch(lKey)
{
case 0: // the game world
return new LipSync_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