Add rayman2 source files
This commit is contained in:
104
Rayman_X/cpa/tempgrp/TSN/Inc/SNinterf.hpp
Normal file
104
Rayman_X/cpa/tempgrp/TSN/Inc/SNinterf.hpp
Normal file
@@ -0,0 +1,104 @@
|
||||
//**************************************
|
||||
// This is the base class of your DLL interface
|
||||
// All methods of CPA_ToolDLLBase are
|
||||
// present in that class.
|
||||
//**************************************
|
||||
|
||||
#ifndef __SNDEDITINTERF_HPP__
|
||||
#define __SNDEDITINTERF_HPP__
|
||||
|
||||
#ifdef USE_IPT_DX5
|
||||
#include "IPT_DX5.h" /* InPuT (absolutely before GAM.h)*/
|
||||
#else /* USE_IPT_WIN */
|
||||
#include "IPT.h" /* InPuT (absolutely before GAM.h)*/
|
||||
#endif /* USE_IPT_WIN */
|
||||
#include "soundeditor.h"
|
||||
#include "SND.h"
|
||||
#include "SNDres.h"
|
||||
#include "TSNEvent.h"
|
||||
|
||||
class TSN_Res
|
||||
{
|
||||
public:
|
||||
CString m_csName;
|
||||
short m_wId;
|
||||
};
|
||||
|
||||
class TSN_ResList
|
||||
{
|
||||
public:
|
||||
CString m_csName;
|
||||
short m_wId;
|
||||
CPA_List<TSN_Res> m_ResList;
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Tool DLL interface class
|
||||
//----------------------------------------------------------
|
||||
class SNDEDIT_Interface : public CPA_ToolDLLBase
|
||||
{
|
||||
private:
|
||||
|
||||
public:
|
||||
void fn_vDestroyResList(void);
|
||||
void fn_vFillResList(void);
|
||||
static const char * fn_czGetResNameFromEdId(unsigned long _ulId);
|
||||
CPA_List<tdstBlockResourceMem> m_ModifiedResList;
|
||||
CPA_List<TSN_Event> m_EdiEventList;
|
||||
CPA_List<TSN_ResList> m_ResListList;
|
||||
|
||||
|
||||
ISoundEditor m_IEditor;
|
||||
|
||||
SNDEDIT_Interface(void);
|
||||
~SNDEDIT_Interface(void);
|
||||
|
||||
// ACP Messages Functions overload:
|
||||
static void CALLBACK EXPORT m_fn_vTimerProc(UINT uID,UINT,DWORD dwUser,DWORD,DWORD);
|
||||
static void mfn_vNotificationCallback(SCR_tdst_File_Description *_p_stFile, char *_p_szSectionName, void *_pvData, SCR_tde_Ntfy_Action _eAction);
|
||||
|
||||
BOOL m_bEditorEnabled;
|
||||
UINT m_uiTimerId;
|
||||
|
||||
// *** Sound resource mixing keys //
|
||||
IPT_tdxHandleToEntryElement m_hSoundResourceVolumeUp;
|
||||
IPT_tdxHandleToEntryElement m_hSoundResourceVolumeDown;
|
||||
IPT_tdxHandleToEntryElement m_hSoundResourceVolumeUpFast;
|
||||
IPT_tdxHandleToEntryElement m_hSoundResourceVolumeDownFast;
|
||||
|
||||
void fn_vBeforeEngine(void);
|
||||
void fn_vBeforeEditor(void);
|
||||
|
||||
void _OnSubMenuCommand(EDT_SubMenu *_pSubMenu,UINT uiMsgId);
|
||||
BOOL fn_bDefineSubMenu (EDT_SubMenu *_p_oEDTSubMenu);
|
||||
|
||||
/*
|
||||
void fn_vOnCloseEditor(void);
|
||||
void fn_vOnActivateEditor(CPA_List<CPA_BaseObject> *_pParams,BOOL _bBackActivated);
|
||||
|
||||
*/
|
||||
void fn_vJustAfterRegistered(void);
|
||||
void fn_vConstruct(void);
|
||||
// Called when engine level has changed, before editor level changes
|
||||
virtual void fn_vLevelChanges (void);
|
||||
virtual BOOL fn_bLoadBaseObject (CPA_BaseObject *p_oObject);
|
||||
// long OnQueryAction(CPA_EditorBase*, WPARAM, LPARAM);
|
||||
|
||||
|
||||
};
|
||||
|
||||
extern SNDEDIT_Interface* g_poSNDEDITInterface;
|
||||
extern tdstDLLIdentity g_stSNDEDITIdentity;
|
||||
|
||||
SCR_tde_Anl_ReturnValue TSN_fn_eLoadEventGroup(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
|
||||
BOOL TSN_fn_bInitSoundInfos(const char* _szFileName);
|
||||
BOOL TSN_fn_bDesInitSoundInfos(void);
|
||||
|
||||
|
||||
#endif // __SNDEDITINTERF_HPP__
|
||||
|
||||
|
||||
|
||||
|
||||
|
17
Rayman_X/cpa/tempgrp/TSN/Inc/StdAfx.h
Normal file
17
Rayman_X/cpa/tempgrp/TSN/Inc/StdAfx.h
Normal file
@@ -0,0 +1,17 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#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
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
||||
|
20
Rayman_X/cpa/tempgrp/TSN/Inc/TSNEvent.h
Normal file
20
Rayman_X/cpa/tempgrp/TSN/Inc/TSNEvent.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef __TSNEVENT_HPP__
|
||||
#define __TSNEVENT_HPP__
|
||||
|
||||
|
||||
class TSN_Event:public CPA_SaveObject
|
||||
{
|
||||
public:
|
||||
BOOL fn_bEngineLoad(void);
|
||||
SND_tdstBlockEvent * m_pEngineEvent;
|
||||
|
||||
virtual void *GetData(void);
|
||||
virtual long GetDataType(void) { return -1;}
|
||||
|
||||
TSN_Event();
|
||||
~TSN_Event(void){};
|
||||
|
||||
static SCR_tde_Anl_ReturnValue m_fn_eLoad(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
|
||||
};
|
||||
|
||||
#endif //__TSNEVENT_HPP__
|
251
Rayman_X/cpa/tempgrp/TSN/Inc/soundeditor.h
Normal file
251
Rayman_X/cpa/tempgrp/TSN/Inc/soundeditor.h
Normal file
@@ -0,0 +1,251 @@
|
||||
#ifndef _SOUND_EDITOR_H_
|
||||
#define _SOUND_EDITOR_H_
|
||||
|
||||
#include "afxdisp.h"
|
||||
|
||||
// Machine generated IDispatch wrapper class(es) created with ClassWizard
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ISoundEditor wrapper class
|
||||
|
||||
class ISoundEditor : public COleDispatchDriver
|
||||
{
|
||||
public:
|
||||
ISoundEditor() {} // Calls COleDispatchDriver default constructor
|
||||
ISoundEditor(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
|
||||
ISoundEditor(const ISoundEditor& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
LPDISPATCH GetEventGroups();
|
||||
void SetEventGroups(LPDISPATCH);
|
||||
long GetVersionNumber();
|
||||
void SetVersionNumber(long);
|
||||
|
||||
// Operations
|
||||
public:
|
||||
BOOL OpenDocument(LPCTSTR csFilename);
|
||||
BOOL SaveDocument(LPCTSTR csFilename);
|
||||
BOOL AddSoundDirectory(LPCTSTR csPath);
|
||||
BOOL RebuildBanks();
|
||||
BOOL SaveLocalizedBanks(LPCTSTR _csDocumentPath, LPCTSTR _csLanguage);
|
||||
LPDISPATCH FindResFromEditorId(long _iId);
|
||||
};
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IEventGroup wrapper class
|
||||
|
||||
class IEventGroup : public COleDispatchDriver
|
||||
{
|
||||
public:
|
||||
IEventGroup() {} // Calls COleDispatchDriver default constructor
|
||||
IEventGroup(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
|
||||
IEventGroup(const IEventGroup& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
long GetId();
|
||||
void SetId(long);
|
||||
CString GetName();
|
||||
void SetName(LPCTSTR);
|
||||
LPDISPATCH GetResources();
|
||||
void SetResources(LPDISPATCH);
|
||||
LPDISPATCH GetEvents();
|
||||
void SetEvents(LPDISPATCH);
|
||||
CString GetFilePath();
|
||||
void SetFilePath(LPCTSTR);
|
||||
long GetVersionNumber();
|
||||
void SetVersionNumber(long);
|
||||
|
||||
// Operations
|
||||
public:
|
||||
};
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ISND_EdiBank wrapper class
|
||||
|
||||
class ISND_EdiBank : public COleDispatchDriver
|
||||
{
|
||||
public:
|
||||
ISND_EdiBank() {} // Calls COleDispatchDriver default constructor
|
||||
ISND_EdiBank(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
|
||||
ISND_EdiBank(const ISND_EdiBank& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
|
||||
// Operations
|
||||
public:
|
||||
};
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ISND_EdiMap wrapper class
|
||||
|
||||
class ISND_EdiMap : public COleDispatchDriver
|
||||
{
|
||||
public:
|
||||
ISND_EdiMap() {} // Calls COleDispatchDriver default constructor
|
||||
ISND_EdiMap(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
|
||||
ISND_EdiMap(const ISND_EdiMap& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
|
||||
// Operations
|
||||
public:
|
||||
};
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IEventGroups wrapper class
|
||||
|
||||
class IEventGroups : public COleDispatchDriver
|
||||
{
|
||||
public:
|
||||
IEventGroups() {} // Calls COleDispatchDriver default constructor
|
||||
IEventGroups(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
|
||||
IEventGroups(const IEventGroups& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
long GetCount();
|
||||
void SetCount(long);
|
||||
|
||||
// Operations
|
||||
public:
|
||||
LPDISPATCH Item(long Index);
|
||||
LPDISPATCH FindItem(LPCTSTR csName);
|
||||
LPDISPATCH Add(LPCTSTR csName);
|
||||
BOOL Remove(LPCTSTR csEventGroupName);
|
||||
LPUNKNOWN Get_NewEnum();
|
||||
};
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IResource wrapper class
|
||||
|
||||
class IResource : public COleDispatchDriver
|
||||
{
|
||||
public:
|
||||
IResource() {} // Calls COleDispatchDriver default constructor
|
||||
IResource(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
|
||||
IResource(const IResource& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
CString GetName();
|
||||
void SetName(LPCTSTR);
|
||||
long GetVolume();
|
||||
void SetVolume(long);
|
||||
LPDISPATCH GetSampleRes();
|
||||
void SetSampleRes(LPDISPATCH);
|
||||
long GetType();
|
||||
void SetType(long);
|
||||
long GetDataOffset();
|
||||
void SetDataOffset(long);
|
||||
long GetDataSize();
|
||||
void SetDataSize(long);
|
||||
long GetId();
|
||||
void SetId(long);
|
||||
|
||||
// Operations
|
||||
public:
|
||||
};
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IResources wrapper class
|
||||
|
||||
class IResources : public COleDispatchDriver
|
||||
{
|
||||
public:
|
||||
IResources() {} // Calls COleDispatchDriver default constructor
|
||||
IResources(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
|
||||
IResources(const IResources& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
long GetCount();
|
||||
void SetCount(long);
|
||||
|
||||
// Operations
|
||||
public:
|
||||
LPDISPATCH Item(long Index);
|
||||
LPDISPATCH FindItem(LPCTSTR csName);
|
||||
LPDISPATCH Add(LPCTSTR csName);
|
||||
LPDISPATCH AddSampleRes(LPCTSTR csName);
|
||||
BOOL Remove(LPCTSTR csResName);
|
||||
LPUNKNOWN Get_NewEnum();
|
||||
};
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ISampleResource wrapper class
|
||||
|
||||
class ISampleResource : public COleDispatchDriver
|
||||
{
|
||||
public:
|
||||
ISampleResource() {} // Calls COleDispatchDriver default constructor
|
||||
ISampleResource(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
|
||||
ISampleResource(const ISampleResource& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
CString GetFileName();
|
||||
void SetFileName(LPCTSTR);
|
||||
long GetZipType();
|
||||
void SetZipType(long);
|
||||
BOOL GetLoop();
|
||||
void SetLoop(BOOL);
|
||||
long GetStartLoop();
|
||||
void SetStartLoop(long);
|
||||
long GetLoopLength();
|
||||
void SetLoopLength(long);
|
||||
|
||||
// Operations
|
||||
public:
|
||||
BOOL SetSampleData(LPCTSTR csFilename);
|
||||
LPDISPATCH GetResource();
|
||||
};
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IEvents wrapper class
|
||||
|
||||
class IEvents : public COleDispatchDriver
|
||||
{
|
||||
public:
|
||||
IEvents() {} // Calls COleDispatchDriver default constructor
|
||||
IEvents(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
|
||||
IEvents(const IEvents& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
long GetCount();
|
||||
void SetCount(long);
|
||||
|
||||
// Operations
|
||||
public:
|
||||
LPDISPATCH Item(long Index);
|
||||
LPDISPATCH FindItem(LPCTSTR csName);
|
||||
LPDISPATCH Add(LPCTSTR csName);
|
||||
LPDISPATCH AddPlayEvent(LPDISPATCH Resource);
|
||||
LPDISPATCH AddStopEvent(LPDISPATCH lpEvent);
|
||||
BOOL Remove(LPCTSTR csEventName);
|
||||
LPUNKNOWN Get_NewEnum();
|
||||
};
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IEvent wrapper class
|
||||
|
||||
class IEvent : public COleDispatchDriver
|
||||
{
|
||||
public:
|
||||
IEvent() {} // Calls COleDispatchDriver default constructor
|
||||
IEvent(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
|
||||
IEvent(const IEvent& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
long GetId();
|
||||
void SetId(long);
|
||||
CString GetName();
|
||||
void SetName(LPCTSTR);
|
||||
BOOL GetDynamic();
|
||||
void SetDynamic(BOOL);
|
||||
BOOL GetStopable();
|
||||
void SetStopable(BOOL);
|
||||
long GetType();
|
||||
void SetType(long);
|
||||
|
||||
// Operations
|
||||
public:
|
||||
LPDISPATCH GetResource();
|
||||
};
|
||||
|
||||
#endif //_SOUND_EDITOR_H_
|
210
Rayman_X/cpa/tempgrp/TSN/Make/TSl.dsp
Normal file
210
Rayman_X/cpa/tempgrp/TSN/Make/TSl.dsp
Normal file
@@ -0,0 +1,210 @@
|
||||
# Microsoft Developer Studio Project File - Name="TSl" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=TSl - Win32 Release 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 "TSl.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 "TSl.mak" CFG="TSl - Win32 Release Glide with Editors"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "TSl - Win32 Debug Glide with Editors" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "TSl - Win32 Release Glide with Editors" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""$/CPA/TempGrp/Tsn/Make", PWHAAAAA"
|
||||
# PROP Scc_LocalPath "."
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "TSl - Win32 Debug Glide with Editors"
|
||||
|
||||
# PROP BASE Use_MFC 2
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "TSl___Wi"
|
||||
# PROP BASE Intermediate_Dir "TSl___Wi"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# 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/tsldfevd"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "X:\CPA\Public" /I "..\inc" /I "../res" /I "X:\CPA\TempGrp\SND" /I "X:/CPA/TempGrp/SND/win95/winmm" /D "_DEBUG" /D "CPA_DEBUG" /D "WIN32" /D "_WINDOWS" /D "CPA_VISUAL" /D "CPA_WANTS_IMPORT" /D "ACTIVE_EDITOR" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "SND_EDITOR_DLL" /D "SND_OBJ_SERVER" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /Gm /GX /Zi /Od /I "X:\CPA\Public" /I "..\inc" /I "../res" /I "X:\CPA\TempGrp\SND\src" /I "X:/CPA/TempGrp/SND/inc" /I "X:/CPA/TempGrp/SND/inc/win95" /I "X:/CPA/TempGrp/SND/inc/Win95" /I "X:/CPA/TempGrp/SIF" /D "_DEBUG" /D "CPA_DEBUG" /D "CPA_VISUAL" /D "CPA_WANTS_IMPORT" /D "_WINDLL" /D "WIN32" /D "_WINDOWS" /D "ACTIVE_EDITOR" /D "_AFXDLL" /D "_MBCS" /D "VISUAL" /D "SND_HYBRID_VERSION" /FR /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /i "..\res" /d "_DEBUG" /d "_AFXDLL"
|
||||
# ADD RSC /l 0x40c /i "..\res" /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 X:\CPA\Exe\Main/GAMDFEvd.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"X:\CPA\EXE\GAM/EDT_Data/Tools/TSlDFEvd.dll"
|
||||
# SUBTRACT BASE LINK32 /map
|
||||
# ADD LINK32 X:\CPA\Exe\Main/MaiDFEvd.lib winmm.lib /nologo /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"X:\CPA\EXE\Main/EDT_Data/Tools/TSlDFEvd.dll"
|
||||
# SUBTRACT LINK32 /map
|
||||
|
||||
!ELSEIF "$(CFG)" == "TSl - Win32 Release Glide with Editors"
|
||||
|
||||
# PROP BASE Use_MFC 2
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "TSl___Wi"
|
||||
# PROP BASE Intermediate_Dir "TSl___Wi"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 2
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "tmp/tsldfevr"
|
||||
# PROP Intermediate_Dir "tmp/tsldfevr"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "X:\CPA\Public" /I "..\inc" /I "../res" /I "X:\CPA\TempGrp\SND\src" /I "X:/CPA/TempGrp/SND/inc" /I "X:/CPA/TempGrp/SND/inc/win95" /I "X:/CPA/TempGrp/SND/inc/Win95" /I "X:/CPA/TempGrp/SIF" /D "_DEBUG" /D "CPA_DEBUG" /D "WIN32" /D "_WINDOWS" /D "CPA_VISUAL" /D "CPA_WANTS_IMPORT" /D "ACTIVE_EDITOR" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "SND_EDITOR_DLL" /D "SND_OBJ_SERVER" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "X:\CPA\Public" /I "..\inc" /I "../res" /I "X:\CPA\TempGrp\SND\src" /I "X:/CPA/TempGrp/SND/inc" /I "X:/CPA/TempGrp/SND/inc/win95" /I "X:/CPA/TempGrp/SND/inc/Win95" /I "X:/CPA/TempGrp/SIF" /D "_DEBUG" /D "CPA_DEBUG" /D "CPA_VISUAL" /D "CPA_WANTS_IMPORT" /D "_WINDLL" /D "WIN32" /D "_WINDOWS" /D "ACTIVE_EDITOR" /D "_AFXDLL" /D "_MBCS" /D "VISUAL" /D "SND_HYBRID_VERSION" /D "USE_IPT_DX5" /FR /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /i "..\res" /d "_DEBUG" /d "_AFXDLL"
|
||||
# ADD RSC /l 0x40c /i "..\res" /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 X:\CPA\Exe\Main/MaiDFEvd.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"X:\CPA\EXE\Main/EDT_Data/Tools/TSlDFEvd.dll"
|
||||
# SUBTRACT BASE LINK32 /map
|
||||
# ADD LINK32 X:\CPA\Exe\Main/MaiDFEvd.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"X:\CPA\EXE\Main/EDT_Data/Tools/TSlDFEvd.dll"
|
||||
# SUBTRACT LINK32 /map
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "TSl - Win32 Debug Glide with Editors"
|
||||
# Name "TSl - Win32 Release Glide with Editors"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\dllcom.cpp
|
||||
|
||||
!IF "$(CFG)" == "TSl - Win32 Debug Glide with Editors"
|
||||
|
||||
# ADD BASE CPP /I "X:/CPA/TempGrp/SND" /I "X:/CPA/TempGrp/Snd" /I "X:/CPA/TempGrp/Snd/win95/winmm" /Yu"StdAfx.h"
|
||||
# ADD CPP /I "X:/CPA/TempGrp/SND" /I "X:/CPA/TempGrp/Snd" /I "X:/CPA/TempGrp/Snd/win95/winmm" /YX"StdAfx.h"
|
||||
|
||||
!ELSEIF "$(CFG)" == "TSl - Win32 Release Glide with Editors"
|
||||
|
||||
# ADD BASE CPP /I "X:/CPA/TempGrp/SND" /I "X:/CPA/TempGrp/Snd" /I "X:/CPA/TempGrp/Snd/win95/winmm" /Yu"StdAfx.h"
|
||||
# ADD CPP /I "X:/CPA/TempGrp/SND" /I "X:/CPA/TempGrp/Snd" /I "X:/CPA/TempGrp/Snd/win95/winmm" /Yu"StdAfx.h"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\lSNinterf.cpp
|
||||
|
||||
!IF "$(CFG)" == "TSl - Win32 Debug Glide with Editors"
|
||||
|
||||
# ADD BASE CPP /Yu"StdAfx.h"
|
||||
# ADD CPP /YX"StdAfx.h"
|
||||
|
||||
!ELSEIF "$(CFG)" == "TSl - Win32 Release Glide with Editors"
|
||||
|
||||
# ADD BASE CPP /Yu"StdAfx.h"
|
||||
# ADD CPP /Yu"StdAfx.h"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\soundeditor.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\StdAfx.cpp
|
||||
|
||||
!IF "$(CFG)" == "TSl - Win32 Debug Glide with Editors"
|
||||
|
||||
# ADD BASE CPP /I "X:/CPA/TempGrp/SND" /I "X:/CPA/TempGrp/Snd" /I "X:/CPA/TempGrp/Snd/win95/winmm" /Yc"StdAfx.h"
|
||||
# ADD CPP /I "X:/CPA/TempGrp/SND" /I "X:/CPA/TempGrp/Snd" /I "X:/CPA/TempGrp/Snd/win95/winmm" /YX"StdAfx.h"
|
||||
|
||||
!ELSEIF "$(CFG)" == "TSl - Win32 Release Glide with Editors"
|
||||
|
||||
# ADD BASE CPP /I "X:/CPA/TempGrp/SND" /I "X:/CPA/TempGrp/Snd" /I "X:/CPA/TempGrp/Snd/win95/winmm" /Yc"StdAfx.h"
|
||||
# ADD CPP /I "X:/CPA/TempGrp/SND" /I "X:/CPA/TempGrp/Snd" /I "X:/CPA/TempGrp/Snd/win95/winmm" /Yc"StdAfx.h"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\TSNEvent.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\TSNSwInf.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\SNinterf.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\soundeditor.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\StdAfx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\TSNEvent.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Libs Debug"
|
||||
|
||||
# PROP Default_Filter "*.lib"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Exe\Main\MaiDFEvd.lib
|
||||
|
||||
!IF "$(CFG)" == "TSl - Win32 Debug Glide with Editors"
|
||||
|
||||
!ELSEIF "$(CFG)" == "TSl - Win32 Release Glide with Editors"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Libs Release"
|
||||
|
||||
# PROP Default_Filter "*.lib"
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TSl.mak
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
318
Rayman_X/cpa/tempgrp/TSN/Make/TSl.vcproj
Normal file
318
Rayman_X/cpa/tempgrp/TSN/Make/TSl.vcproj
Normal file
@@ -0,0 +1,318 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="TSl"
|
||||
ProjectGUID="{4D8C8CCF-C4BC-45AA-B9A6-66C3BB661D04}"
|
||||
SccProjectName=""$/CPA/TempGrp/Tsn/Make", PWHAAAAA"
|
||||
SccAuxPath=""
|
||||
SccLocalPath="."
|
||||
SccProvider="MSSCCI:NXN alienbrain"
|
||||
Keyword="MFCProj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release Glide with Editors|Win32"
|
||||
OutputDirectory=".\tmp/tsldfevr"
|
||||
IntermediateDirectory=".\tmp/tsldfevr"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="2"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="X:\CPA\Public,..\inc,../res,X:\CPA\TempGrp\SND\src,X:/CPA/TempGrp/SND/inc,X:/CPA/TempGrp/SND/inc/win95,X:/CPA/TempGrp/SND/inc/Win95,X:/CPA/TempGrp/SIF"
|
||||
PreprocessorDefinitions="_DEBUG;CPA_DEBUG;CPA_VISUAL;CPA_WANTS_IMPORT;WIN32;_WINDOWS;ACTIVE_EDITOR;VISUAL;SND_HYBRID_VERSION;USE_IPT_DX5"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\tmp/tsldfevr/TSl.pch"
|
||||
AssemblerListingLocation=".\tmp/tsldfevr/"
|
||||
ObjectFile=".\tmp/tsldfevr/"
|
||||
ProgramDataBaseFileName=".\tmp/tsldfevr/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="X:\CPA\Exe\Main/MaiDFEvd.lib"
|
||||
OutputFile="X:\CPA\EXE\Main/EDT_Data/Tools/TSlDFEvd.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile=".\tmp/tsldfevr/TSlDFEvd.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary=".\tmp/tsldfevr/TSlDFEvd.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\tmp/tsldfevr/TSl.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1036"
|
||||
AdditionalIncludeDirectories="..\res"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug Glide with Editors|Win32"
|
||||
OutputDirectory="X:\CPA\EXE\Main/EDT_Data/Tools"
|
||||
IntermediateDirectory=".\tmp/tsldfevd"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="2"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="X:\CPA\Public,..\inc,../res,X:\CPA\TempGrp\SND\src,X:/CPA/TempGrp/SND/inc,X:/CPA/TempGrp/SND/inc/win95,X:/CPA/TempGrp/SND/inc/Win95,X:/CPA/TempGrp/SIF"
|
||||
PreprocessorDefinitions="_DEBUG;CPA_DEBUG;CPA_VISUAL;CPA_WANTS_IMPORT;WIN32;_WINDOWS;ACTIVE_EDITOR;VISUAL;SND_HYBRID_VERSION"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\tmp/tsldfevd/TSl.pch"
|
||||
AssemblerListingLocation=".\tmp/tsldfevd/"
|
||||
ObjectFile=".\tmp/tsldfevd/"
|
||||
ProgramDataBaseFileName=".\tmp/tsldfevd/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="MaiDFEvd.lib winmm.lib"
|
||||
OutputFile="X:\CPA\EXE\Main/EDT_Data/Tools/TSlDFEvd.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="X:\cpa\exe\main;X:\cpa\libd"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="X:\CPA\EXE\Main/EDT_Data/Tools/TSlDFEvd.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="X:\CPA\EXE\Main/EDT_Data/Tools/TSlDFEvd.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName="X:\CPA\EXE\Main/EDT_Data/Tools/TSl.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1036"
|
||||
AdditionalIncludeDirectories="..\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;c;cxx;rc;def;r;odl;hpj;bat;for;f90">
|
||||
<File
|
||||
RelativePath="..\Src\dllcom.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="X:/CPA/TempGrp/SND;X:/CPA/TempGrp/Snd;X:/CPA/TempGrp/Snd/win95/winmm"
|
||||
PreprocessorDefinitions=""
|
||||
UsePrecompiledHeader="3"
|
||||
PrecompiledHeaderThrough="StdAfx.h"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="X:/CPA/TempGrp/SND;X:/CPA/TempGrp/Snd;X:/CPA/TempGrp/Snd/win95/winmm"
|
||||
PreprocessorDefinitions=""
|
||||
PrecompiledHeaderThrough="StdAfx.h"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Src\lSNinterf.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
UsePrecompiledHeader="3"
|
||||
PrecompiledHeaderThrough="StdAfx.h"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
PrecompiledHeaderThrough="StdAfx.h"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Src\soundeditor.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<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="Release Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="X:/CPA/TempGrp/SND;X:/CPA/TempGrp/Snd;X:/CPA/TempGrp/Snd/win95/winmm"
|
||||
PreprocessorDefinitions=""
|
||||
UsePrecompiledHeader="1"
|
||||
PrecompiledHeaderThrough="StdAfx.h"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="X:/CPA/TempGrp/SND;X:/CPA/TempGrp/Snd;X:/CPA/TempGrp/Snd/win95/winmm"
|
||||
PreprocessorDefinitions=""
|
||||
PrecompiledHeaderThrough="StdAfx.h"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Src\TSNEvent.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Src\TSNSwInf.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;fi;fd">
|
||||
<File
|
||||
RelativePath="..\Inc\SNinterf.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\soundeditor.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\StdAfx.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\TSNEvent.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="TSl.mak">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
5
Rayman_X/cpa/tempgrp/TSN/Make/mssccprj.scc
Normal file
5
Rayman_X/cpa/tempgrp/TSN/Make/mssccprj.scc
Normal file
@@ -0,0 +1,5 @@
|
||||
SCC = This is a source code control file
|
||||
|
||||
[TSl.vcproj]
|
||||
SCC_Aux_Path = "P4SCC#srvperforce-ma:1666##raymandata##Editor"
|
||||
SCC_Project_Name = Perforce Project
|
7
Rayman_X/cpa/tempgrp/TSN/Src/StdAfx.cpp
Normal file
7
Rayman_X/cpa/tempgrp/TSN/Src/StdAfx.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
// 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"
|
||||
|
||||
|
206
Rayman_X/cpa/tempgrp/TSN/Src/TSNEvent.cpp
Normal file
206
Rayman_X/cpa/tempgrp/TSN/Src/TSNEvent.cpp
Normal file
@@ -0,0 +1,206 @@
|
||||
//#include "ACP_Base.h"
|
||||
#include <StdAfx.h>
|
||||
|
||||
|
||||
#include "SCR.h"
|
||||
#include "ITF/cpasaveo.hpp"
|
||||
#include "acp_base.h" // for CPA_Tooldllb class definition
|
||||
#include "ITF/tooldllb.hpp" // for CPA_Tooldllb class definition
|
||||
#include "ITF/cpainter.hpp"
|
||||
|
||||
#include "SNInterf.hpp"
|
||||
#include "TSNEvent.h"
|
||||
|
||||
#include "x:\cpa\main\inc\_editid.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name : TSN_Event:m_fn_eLoad
|
||||
//-----------------------------------------------------------------------------
|
||||
// Description : Script Callback for the event section.
|
||||
// For each event section found, creates a TSN_Event section,
|
||||
// sets its section name (with a SndEventM action name),
|
||||
// and its name for the cpa lists( SetName() entry of SndEventE).
|
||||
//-----------------------------------------------------------------------------
|
||||
// Input : usual script callback input params
|
||||
// Output : SCR_tde_Anl_ReturnValue
|
||||
//-----------------------------------------------------------------------------
|
||||
// Creation date : 04/02/98 Author : Fr<46>d<EFBFBD>ric D<>cr<63>au
|
||||
//-----------------------------------------------------------------------------
|
||||
// Modification date : Modification Author :
|
||||
// Modifications :
|
||||
//------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
SCR_tde_Anl_ReturnValue TSN_Event::m_fn_eLoad(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType)
|
||||
{
|
||||
TSN_Event *pEvent;
|
||||
CString csName,csTemp;
|
||||
int iPos;
|
||||
tdeMissingCriteria eAns;
|
||||
|
||||
SCR_tdst_Sect_Open *pOpenSection;
|
||||
SND_tdstBlockEvent *pEngineEvent;
|
||||
switch (cType)
|
||||
{
|
||||
case SCR_EA_Anl_BeginSection:// Creation of event :
|
||||
// Create event:
|
||||
pEvent=new TSN_Event();
|
||||
SCR_M_RdL0_SetSectionLong(0,0,(unsigned long)pEvent);
|
||||
g_poSNDEDITInterface->m_EdiEventList.AddTail(pEvent);
|
||||
|
||||
// Transform the SndEventE in SndEventM:
|
||||
csName=SCR_M_RdL0_GetCompleteSectionNameR(0);
|
||||
iPos=csName.Find("SndEventE");
|
||||
if (iPos!=-1) csName.SetAt(iPos+8,'M');
|
||||
// set the engine event pointer is event is loaded:
|
||||
pOpenSection=SCR_fnp_st_RdL0_GetOpenSection((char*)(LPCTSTR)csName,0);
|
||||
if (pOpenSection!=NULL) // engine evnt is loaded
|
||||
{
|
||||
pEngineEvent=(SND_tdstBlockEvent *)SCR_M_ul_RdL0_ExtractLongValue(&pOpenSection->stSectionValues,0);
|
||||
if (pEngineEvent!=pEvent->m_pEngineEvent)
|
||||
{
|
||||
pEvent->fn_vUpdateData(pEngineEvent);
|
||||
pEvent->m_pEngineEvent=pEngineEvent;
|
||||
}
|
||||
pEvent->SetAvailable(TRUE);
|
||||
}
|
||||
|
||||
pEvent->SetReferencedSectionName(csName);
|
||||
break;
|
||||
|
||||
case SCR_EA_Anl_Entry:// event data:
|
||||
SCR_M_RdL0_GetSectionLong(0,0,TSN_Event *,pEvent);
|
||||
if (strcmp(szAction,"SetName")==0)
|
||||
{
|
||||
// Compute csb name, without the '.csb' extension:
|
||||
csName=SCR_M_RdL0_GetFileNameR(0);
|
||||
csTemp=csName.Left(csName.GetLength()-4);
|
||||
// crate event name as registered in name list:
|
||||
csName.Format("SND_%s_%s",szParams[0],csTemp);
|
||||
eAns=pEvent->fn_eRename(csName);
|
||||
if (eAns!=E_mc_None)
|
||||
{
|
||||
csTemp.Format("Sound Editor Event Creation error: Name SND_%s incorrect(already exists or syntax incorrect)!",csName);
|
||||
AfxMessageBox(csTemp);
|
||||
}
|
||||
// We have the event group's name: no need to continue this section analysis:
|
||||
return SCR_ERV_Anl_TerminateCurrentSection;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return SCR_ERV_Anl_NormalReturn;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name : TSN_Event:GetData()
|
||||
//-----------------------------------------------------------------------------
|
||||
// Description : TSN_Event object constructor.
|
||||
// Creates a new TSN_Event object, for the event object server
|
||||
//-----------------------------------------------------------------------------
|
||||
// Input : void
|
||||
// Output : void
|
||||
//-----------------------------------------------------------------------------
|
||||
// Creation date : 04/02/98 Author : Fr<46>d<EFBFBD>ric D<>cr<63>au
|
||||
//-----------------------------------------------------------------------------
|
||||
// Modification date : Modification Author :
|
||||
// Modifications :
|
||||
//------------------------------------------------------------------------------*/
|
||||
/*
|
||||
void *TSN_Event::GetData(void)
|
||||
{
|
||||
SCR_tdst_Cxt_Values* pContext;
|
||||
static BOOL bInDataModif=FALSE;
|
||||
SND_tdstBlockEvent *pNewEvent;
|
||||
|
||||
// If we already stocked the event pointer, it is supposed to be good:
|
||||
if (m_pEngineEvent!=NULL) return(void *)m_pEngineEvent;
|
||||
|
||||
|
||||
if (g_poSNDEDITInterface->GetInterface()->fn_bIsLoadingWorld())
|
||||
return (void *)m_pEngineEvent;
|
||||
|
||||
// This is for fn_vUpdateData, which calls GetData() and must get the old pointer:
|
||||
if (bInDataModif) return (void *)m_pEngineEvent;
|
||||
|
||||
|
||||
// We never LOAD the data here -> the section must have already be loaded by someone else:
|
||||
if (SCR_fnp_st_RdL0_GetOpenSection((char*)(LPCTSTR)GetReferencedSectionName(),0)==NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
// The event is loaded: get its pointer :
|
||||
pContext=SCR_fnp_st_RdL0_AnalyseSection(
|
||||
(char*)(LPCTSTR)GetReferencedSectionName(),SCR_CDF_uw_Anl_Normal);
|
||||
pNewEvent=(SND_tdstBlockEvent *)SCR_M_ul_RdL0_ExtractLongValue(pContext,0);
|
||||
if (pNewEvent!=NULL)
|
||||
{
|
||||
bInDataModif=TRUE;
|
||||
fn_vUpdateData(pNewEvent);
|
||||
m_pEngineEvent=pNewEvent;
|
||||
bInDataModif=FALSE;
|
||||
}
|
||||
|
||||
return (void *)m_pEngineEvent;
|
||||
}
|
||||
*/
|
||||
|
||||
void *TSN_Event::GetData(void)
|
||||
{
|
||||
return (void *)m_pEngineEvent;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name : TSN_Event:TSN_Event()
|
||||
//-----------------------------------------------------------------------------
|
||||
// Description : TSN_Event object constructor.
|
||||
// Creates a new TSN_Event object, for the event object server
|
||||
//-----------------------------------------------------------------------------
|
||||
// Input : usual script callback input params
|
||||
// Output : SCR_tde_Anl_ReturnValue
|
||||
//-----------------------------------------------------------------------------
|
||||
// Creation date : 04/02/98 Author : Fr<46>d<EFBFBD>ric D<>cr<63>au
|
||||
//-----------------------------------------------------------------------------
|
||||
// Modification date : Modification Author :
|
||||
// Modifications :
|
||||
//------------------------------------------------------------------------------*/
|
||||
|
||||
TSN_Event::TSN_Event():
|
||||
CPA_SaveObject(g_poSNDEDITInterface,C_szSoundEventTypeName,
|
||||
E_ss_NoSave,
|
||||
NULL, // pOwner
|
||||
TRUE, // bAvailaible
|
||||
"", // p_szDataPath
|
||||
NULL) // pSaveCallback
|
||||
{
|
||||
m_pEngineEvent=NULL;
|
||||
SetAvailable(FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOL TSN_Event::fn_bEngineLoad()
|
||||
{
|
||||
SCR_tdst_Cxt_Values* pContext;
|
||||
SND_tdstBlockEvent *pNewEvent;
|
||||
|
||||
// The event is loaded: get its pointer :
|
||||
pContext=SCR_fnp_st_RdL0_AnalyseSection(
|
||||
(char*)(LPCTSTR)GetReferencedSectionName(),
|
||||
SCR_CDF_uw_Anl_Normal);
|
||||
pNewEvent=(SND_tdstBlockEvent *)SCR_M_ul_RdL0_ExtractLongValue(pContext,0);
|
||||
if (pNewEvent!=m_pEngineEvent)
|
||||
{
|
||||
fn_vUpdateData(pNewEvent);
|
||||
m_pEngineEvent=pNewEvent;
|
||||
}
|
||||
SetAvailable(TRUE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
145
Rayman_X/cpa/tempgrp/TSN/Src/TSNSwInf.cpp
Normal file
145
Rayman_X/cpa/tempgrp/TSN/Src/TSNSwInf.cpp
Normal file
@@ -0,0 +1,145 @@
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "LST.hpp"
|
||||
#include "SCR.h"
|
||||
#include "SIF.h"
|
||||
#include "SifLoadS.h"
|
||||
|
||||
#include "ITF/cpasaveo.hpp" // For TSN_Event&SIF_InfoValue class definition
|
||||
#include "acp_base.h" // for CPA_Tooldllb class definition
|
||||
#include "ITF/tooldllb.hpp" // for CPA_Tooldllb class definition
|
||||
#include "SNinterf.hpp"
|
||||
|
||||
|
||||
|
||||
|
||||
class SIF_InfoValue: public CPA_SaveObject
|
||||
{
|
||||
public:
|
||||
// virtual CString fn_csGetReferencedSectionName (void);
|
||||
SIF_InfoValue::SIF_InfoValue(
|
||||
CString _csFileName,CString _csTypeName,CString _csValueName);
|
||||
virtual void* GetData(void) { return (void*)m_lValue; };
|
||||
virtual long GetDataType(void) { return -1;}
|
||||
long m_lValue;
|
||||
|
||||
static CPA_List<SIF_InfoValue> m_sObjectList;
|
||||
static void DeleteAllValues(void);
|
||||
};
|
||||
|
||||
|
||||
CPA_List<SIF_InfoValue> SIF_InfoValue::m_sObjectList;
|
||||
|
||||
SIF_InfoValue::SIF_InfoValue(CString _csFileName,CString _csTypeName,CString _csValueName):
|
||||
CPA_SaveObject( g_poSNDEDITInterface,
|
||||
"SIF_"+_csTypeName,
|
||||
E_ss_NoSave,
|
||||
NULL, // pOwner
|
||||
TRUE, // bAvailaible
|
||||
"",// p_szDataPath
|
||||
NULL) // pSaveCallback
|
||||
{
|
||||
tdeMissingCriteria eAns;
|
||||
CString csSectionName,csTemp;
|
||||
|
||||
// Create and set object name:
|
||||
eAns=fn_eRename("SIF_"+_csValueName);
|
||||
if (eAns!=E_mc_None)
|
||||
{
|
||||
csTemp.Format("Sound Information Value Creation error: Name SIF_%s incorrect(already exists or syntax incorrect)!",_csValueName);
|
||||
AfxMessageBox(csTemp);
|
||||
}
|
||||
|
||||
// Create and set section name:
|
||||
csSectionName=_csFileName+"^Sif_Type:"+_csTypeName+"^Sif_Value:"+_csValueName;
|
||||
SetReferencedSectionName(csSectionName);
|
||||
m_lValue=-1;
|
||||
}
|
||||
|
||||
void SIF_InfoValue::DeleteAllValues(void)
|
||||
{
|
||||
SIF_InfoValue* pValue;
|
||||
POSITION Pos=NULL;
|
||||
|
||||
while (pValue=m_sObjectList.GetNextElement(Pos)) delete pValue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOL TSN_fn_bInitSoundInfos(const char* _szFileName)
|
||||
{
|
||||
static BOOL bFirstInit=TRUE;
|
||||
int iInfoType;
|
||||
|
||||
char szCompleteName[256],szFileName[256],szActionName[256],szIdName[256];
|
||||
CString csSectionName,csValueName;
|
||||
unsigned int uiPos;
|
||||
SCR_tdst_Link_Value *p_stValue;
|
||||
unsigned long ulValue;
|
||||
char* pszSectionName;
|
||||
SCR_tdst_Link_Table *pTable;
|
||||
SIF_InfoValue *pInfoValue;
|
||||
|
||||
|
||||
SCR_fnp_st_RdL0_AnalyseSection((char*)_szFileName, SCR_CDF_uw_Anl_Normal);
|
||||
|
||||
// Scan each link table:
|
||||
for (iInfoType=0;iInfoType<SIF_fn_iGetSoundInfosCount();iInfoType++)
|
||||
{
|
||||
pTable=&SIF_fn_pstGetSoundInfosDescriptor(iInfoType)->m_Table;
|
||||
|
||||
// Get first element of array :
|
||||
uiPos = 0;
|
||||
SCR_M_DyAr_GetNextElement(SCR_tdst_Link_Value,uiPos,p_stValue,
|
||||
SCR_M_st_Link_GetDynamicArray(pTable));
|
||||
|
||||
while(p_stValue) // p_sValue is NULL at the end of the array
|
||||
{
|
||||
// Test current retrieved value:
|
||||
if(SCR_M_e_Link_GetState(p_stValue) != SCR_ELS_Link_Initialized) continue;
|
||||
|
||||
// Get section complete name & value:
|
||||
ulValue=SCR_M_ul_Link_GetValue(p_stValue);
|
||||
pszSectionName=SCR_M_p_sz_Link_GetKey(p_stValue);
|
||||
|
||||
// Transform "ed_main.sif^SIF_Type:Material^SIF_Value:Wood" into:
|
||||
// File:ed_main.sif / Type: Material /Value: Wood
|
||||
|
||||
// Split the section name, first pass:
|
||||
SCR_fn_v_RdL0_SplitSectionName(pszSectionName,
|
||||
szFileName,szActionName,szIdName);
|
||||
// With the example: szFileName="ed_main.sif^SIF_Type:Material",
|
||||
// szActionName="SIF_Value",szIdName="Wood".
|
||||
|
||||
// Save the value name, & second pass:
|
||||
csValueName=szIdName;
|
||||
strcpy(szCompleteName,szFileName);
|
||||
SCR_fn_v_RdL0_SplitSectionName(szCompleteName,
|
||||
szFileName,szActionName,szIdName);
|
||||
// With the example: szFileName="ed_main.sif",
|
||||
// szActionName="SIF_Type",szIdName="Material".
|
||||
|
||||
// Create an InfoValue object(Value,Type,File names):
|
||||
pInfoValue= new SIF_InfoValue(szFileName,szIdName,csValueName);
|
||||
// Set the handle to the proper value(value init need not call fn_vSetValue()):
|
||||
pInfoValue->m_lValue=ulValue;
|
||||
|
||||
// Get next element :
|
||||
uiPos++;
|
||||
SCR_M_DyAr_GetNextElement(SCR_tdst_Link_Value,uiPos,p_stValue,
|
||||
SCR_M_st_Link_GetDynamicArray(pTable));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL TSN_fn_bDesInitSoundInfos(void)
|
||||
{
|
||||
SIF_InfoValue::DeleteAllValues();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
132
Rayman_X/cpa/tempgrp/TSN/Src/dllcom.cpp
Normal file
132
Rayman_X/cpa/tempgrp/TSN/Src/dllcom.cpp
Normal file
@@ -0,0 +1,132 @@
|
||||
//
|
||||
// Common functions for Object DLL capabilities
|
||||
// C. Beaudet
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "afxdllx.h"
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
#include "SNinterf.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 SNDEDIT_Interface g_oSNDEDITInterface;
|
||||
/*
|
||||
#else
|
||||
SNDEDIT_Interface* g_poSNDEDITInterface=NULL;
|
||||
*/
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// functions that are present in all DLL :
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
static CList<CPA_DLLBase*,CPA_DLLBase*> g_oListOfInstances; //private internal
|
||||
|
||||
//========================================================================
|
||||
// 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_stSNDEDITIdentity . eType = TOOL_DLL;
|
||||
g_stSNDEDITIdentity . csName = C_szDLLSoundName;
|
||||
g_stSNDEDITIdentity . hModule = NULL;
|
||||
g_stSNDEDITIdentity . p_oListOfInstances = &g_oListOfInstances;
|
||||
return &g_stSNDEDITIdentity;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//========================================================================
|
||||
// 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)
|
||||
{
|
||||
// SND_hGlobalInst=hInstance;
|
||||
if (!AfxInitExtensionModule(extensionDLL, hInstance))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// Get the DLL
|
||||
//========================================================================
|
||||
extern "C" CPA_ToolDLLBase __declspec(dllexport) *fn_p_oGetDLL(long lKey)
|
||||
{
|
||||
#ifdef DLL_ONLY_ONE_INSTANCE
|
||||
|
||||
switch(lKey)
|
||||
{
|
||||
case 0: // the game world
|
||||
if (g_poSNDEDITInterface == NULL)
|
||||
{
|
||||
g_poSNDEDITInterface = new SNDEDIT_Interface();
|
||||
ASSERT(g_poSNDEDITInterface != NULL);
|
||||
}
|
||||
return g_poSNDEDITInterface;
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#else //DLL_ONLY_ONE_INSTANCE
|
||||
|
||||
switch(lKey)
|
||||
{
|
||||
case 0: // the game world
|
||||
/*
|
||||
ASSERT(g_poSNDEDITInterface==NULL);
|
||||
g_poSNDEDITInterface=new SNDEDIT_Interface();
|
||||
return g_poSNDEDITInterface;
|
||||
*/
|
||||
return new SNDEDIT_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
|
744
Rayman_X/cpa/tempgrp/TSN/Src/lSNinterf.cpp
Normal file
744
Rayman_X/cpa/tempgrp/TSN/Src/lSNinterf.cpp
Normal file
@@ -0,0 +1,744 @@
|
||||
//#################################################################################
|
||||
//
|
||||
// BASE CLASS OF YOUR DLL interface
|
||||
//
|
||||
//#################################################################################
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "SCR.h"
|
||||
#include "SND.h"
|
||||
#include "sndld_s.h" // for SND_pstGetEventGroupLinkTable...
|
||||
#include "sndld_hy.h" // for SND_fn_czGetProjectTitle...
|
||||
#include "snddbg.h" // for SND_fn_pstGetSelectedResource && SND_fn_bDoesSupervisaterSelectResource
|
||||
#include "sndres.h" // for tdstBlockResourceMem type use
|
||||
|
||||
|
||||
#include "acp_base.h" // for CPA_Tooldllb class definition
|
||||
#include "incITF.h" // for CPA_Tooldllb class definition
|
||||
|
||||
#include "SNinterf.hpp"
|
||||
#include "TSNEvent.h"
|
||||
|
||||
#include "SIF.h" // Sound info server..
|
||||
//#include "Sifloads.h" //for SIF_fn_pstGetSoundInfosDescriptor
|
||||
|
||||
#include "x:\cpa\main\inc\_editid.h" //Object type names..
|
||||
|
||||
/*
|
||||
|
||||
|
||||
#include "ITF/cpasaveo.hpp" // For TSN_Event&SIF_InfoValue class definition
|
||||
#include "LST/cpalist.hpp" // for the CPA_List defined in the SIF_InfoType object
|
||||
|
||||
|
||||
#include "ITF/CPAProj.hpp" // for M_GetMainWnd()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//static CList<CPA_DLLBase*,CPA_DLLBase*> g_oListOfInstances; //private internal
|
||||
|
||||
#define C_lEDST_Active 1
|
||||
#define C_lEDST_Inactive 0
|
||||
*/
|
||||
|
||||
|
||||
// the DLL global definition
|
||||
tdstDLLIdentity g_stSNDEDITIdentity;
|
||||
|
||||
SNDEDIT_Interface* g_poSNDEDITInterface=NULL;
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// CONSTRUCTOR.
|
||||
// You must put here all your DLL interface definitions.
|
||||
//--------------------------------------------------------------------------------
|
||||
SNDEDIT_Interface::SNDEDIT_Interface(void)
|
||||
{
|
||||
SetEditorInfo( "Sound", "Fr<EFBFBD>d<EFBFBD>ric D<>cr<63>au", "v6.0.0", "","");
|
||||
|
||||
// ************************** private internal
|
||||
m_p_stDLLIdentity = &g_stSNDEDITIdentity;
|
||||
|
||||
// Name of your .INI file.
|
||||
// m_stBaseDLLDefinition.p_cIniName = NULL;
|
||||
|
||||
// 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;
|
||||
m_bEditorEnabled=FALSE;
|
||||
m_uiTimerId=NULL;
|
||||
}
|
||||
|
||||
|
||||
SNDEDIT_Interface::~SNDEDIT_Interface(void)
|
||||
{
|
||||
POSITION Pos;
|
||||
TSN_Event *pEvent;
|
||||
|
||||
// delete events:
|
||||
Pos=NULL;
|
||||
while (pEvent=m_EdiEventList.GetNextElement(Pos)) delete pEvent;
|
||||
fn_vDestroyResList();
|
||||
TSN_fn_bDesInitSoundInfos();
|
||||
}
|
||||
|
||||
void SNDEDIT_Interface::fn_vJustAfterRegistered(void)
|
||||
{
|
||||
|
||||
int iTypeNum;
|
||||
int iNbTypes,iNbInfoTypes;
|
||||
CString *pa_csTypes;
|
||||
|
||||
//*******************************************************
|
||||
//* Register the CPA_SaveObject types *
|
||||
//*******************************************************
|
||||
|
||||
// Number of CPA_SaveObject types: 1 for sound events + 1 for each info type:
|
||||
iNbInfoTypes=SIF_fn_iGetSoundInfosCount();
|
||||
iNbTypes=iNbInfoTypes+1;
|
||||
|
||||
pa_csTypes= new CString[iNbTypes];
|
||||
|
||||
for (iTypeNum=0;iTypeNum<iNbInfoTypes;iTypeNum++)
|
||||
pa_csTypes[iTypeNum]=CString("SIF_")+SIF_fn_czGetSoundInfoNameForType(iTypeNum);
|
||||
pa_csTypes[iNbInfoTypes]=C_szSoundEventTypeName;
|
||||
fn_vRegisterObjectsType(pa_csTypes, iNbTypes);
|
||||
|
||||
delete[] pa_csTypes;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SNDEDIT_Interface::fn_vConstruct(void)
|
||||
{
|
||||
ASSERT(g_poSNDEDITInterface==NULL);
|
||||
g_poSNDEDITInterface=this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SNDEDIT_Interface::fn_vLevelChanges (void)
|
||||
{
|
||||
SCR_tdst_Link_Table *p_stTable;
|
||||
SCR_tdst_Link_Value *p_stValue;
|
||||
unsigned int uiPos;
|
||||
CString csName,csTemp;
|
||||
|
||||
SCR_tdst_Anl_Callback *pCallback;
|
||||
SCR_tdpfn_Anl_Callback pOldSndResM_CB;
|
||||
SCR_tdpfn_Anl_Callback pOldSndEventM_CB;
|
||||
|
||||
static BOOL bFirstLevelChange=TRUE;
|
||||
|
||||
if (bFirstLevelChange)
|
||||
{
|
||||
// Set the script callback fot the editor event:
|
||||
SCR_fn_v_RdL0_RegisterCallback("SndEventE",TSN_Event::m_fn_eLoad,SCR_CRC_c_RdL0_ForSection);
|
||||
bFirstLevelChange=FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
AfxMessageBox(" Sound Editor Error: Second level Change not implemented yet!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Add a message in the status bar:
|
||||
M_GetMainWnd()->UpdateStatus("Loading sound data",C_STATUSPANE_INFOS,C_STATUS_NORMAL);
|
||||
|
||||
// Save and delete script callbacks on SndResourceM and SndEventM:
|
||||
|
||||
pCallback=SCR_fnp_st_RdL0_GetRegisterCallback("SndResourceM",SCR_CRC_c_RdL0_ForSection);
|
||||
pOldSndResM_CB=pCallback->pfn_eCallback;
|
||||
pCallback=SCR_fnp_st_RdL0_GetRegisterCallback("SndEventM",SCR_CRC_c_RdL0_ForSection);
|
||||
pOldSndEventM_CB=pCallback->pfn_eCallback;
|
||||
|
||||
SCR_fn_v_RdL0_DeleteRegisterCallback("SndResourceM",SCR_CRC_c_RdL0_ForSection, SCR_CDR_c_RdL0_Match);
|
||||
SCR_fn_v_RdL0_DeleteRegisterCallback("SndEventM",SCR_CRC_c_RdL0_ForSection, SCR_CDR_c_RdL0_Match);
|
||||
|
||||
|
||||
csName=SND_fn_czGetProjectTitle();
|
||||
csName+=".sif";
|
||||
TSN_fn_bInitSoundInfos(csName);
|
||||
|
||||
|
||||
|
||||
// Scan event groups:
|
||||
|
||||
// Get first list element:
|
||||
uiPos = 0;
|
||||
p_stTable=SND_pstGetEventGroupLinkTable();
|
||||
SCR_M_DyAr_GetNextElement(SCR_tdst_Link_Value,uiPos,p_stValue,
|
||||
SCR_M_st_Link_GetDynamicArray(p_stTable));
|
||||
|
||||
while(p_stValue) // p_sValue is NULL at the end of the array
|
||||
{
|
||||
if(SCR_M_e_Link_GetState(p_stValue) != SCR_ELS_Link_Initialized) continue;
|
||||
|
||||
// Get event group name:
|
||||
csName=SCR_M_p_sz_Link_GetKey(p_stValue);
|
||||
|
||||
// Update status bar:
|
||||
csTemp.Format("Loading sound bank: %s",csName);
|
||||
M_GetMainWnd()->UpdateStatus((char*)(LPCTSTR)csTemp,C_STATUSPANE_INFOS,C_STATUS_NORMAL);
|
||||
|
||||
csName+=".csb";
|
||||
SCR_fnp_st_RdL0_AnalyseSection((char*)(LPCTSTR)csName, SCR_CDF_uw_Anl_Normal);
|
||||
|
||||
uiPos++;
|
||||
SCR_M_DyAr_GetNextElement(SCR_tdst_Link_Value,uiPos,p_stValue,
|
||||
SCR_M_st_Link_GetDynamicArray(SND_pstGetEventGroupLinkTable()));
|
||||
}
|
||||
|
||||
// Reset the script callbacks we deleted:
|
||||
unsigned char ucOldMemLevel = SCR_fn_uc_Mem_GetCurrentLevel();
|
||||
SCR_fn_v_Mem_SetCurrentLevel(0);
|
||||
SCR_fn_v_RdL0_RegisterCallback("SndResourceM",pOldSndResM_CB,SCR_CRC_c_RdL0_ForSection);
|
||||
SCR_fn_v_RdL0_RegisterCallback("SndEventM",pOldSndEventM_CB,SCR_CRC_c_RdL0_ForSection);
|
||||
SCR_fn_v_Mem_SetCurrentLevel(ucOldMemLevel);
|
||||
|
||||
|
||||
|
||||
|
||||
// Sound load finished:
|
||||
M_GetMainWnd()->UpdateStatus("",C_STATUSPANE_INFOS,C_STATUS_NORMAL);
|
||||
};
|
||||
|
||||
void SNDEDIT_Interface::fn_vBeforeEngine()
|
||||
{
|
||||
if (!m_bEditorEnabled) return;
|
||||
|
||||
ASSERT(m_uiTimerId==NULL);
|
||||
m_uiTimerId=timeSetEvent(10,10,m_fn_vTimerProc,NULL,TIME_ONESHOT);
|
||||
ASSERT(m_uiTimerId!=NULL);
|
||||
}
|
||||
|
||||
void SNDEDIT_Interface::fn_vBeforeEditor()
|
||||
{
|
||||
char szPath[MAX_PATH];
|
||||
|
||||
MMRESULT mReturn;
|
||||
if (!m_bEditorEnabled) return;
|
||||
|
||||
ASSERT(m_uiTimerId!=NULL);
|
||||
mReturn=timeKillEvent(m_uiTimerId);
|
||||
ASSERT(mReturn==TIMERR_NOERROR);
|
||||
m_uiTimerId=NULL;
|
||||
|
||||
// Record modified resources:
|
||||
IResource IRes;
|
||||
LPDISPATCH lpDispatch;
|
||||
POSITION Pos;
|
||||
tdstBlockResourceMem* pResM;
|
||||
|
||||
if (m_ModifiedResList.IsEmpty()) return;
|
||||
|
||||
Pos=NULL;
|
||||
while (pResM=m_ModifiedResList.GetNextElement(Pos))
|
||||
{
|
||||
// Find corresponding resource in editor:
|
||||
lpDispatch=m_IEditor.FindResFromEditorId(pResM->Id);
|
||||
if (lpDispatch!=NULL)
|
||||
{
|
||||
IRes.AttachDispatch(lpDispatch);
|
||||
// Change the volume in the editor:
|
||||
IRes.SetVolume(pResM->ucVolume);
|
||||
IRes.DetachDispatch();
|
||||
}
|
||||
}
|
||||
|
||||
// Open the sound project:
|
||||
|
||||
GetTempPath(MAX_PATH,szPath);
|
||||
strcat(szPath,"\\");
|
||||
strcat(szPath,"TSltemp.tmp");
|
||||
SCR_fn_v_SvL1_RegisterNotify(szPath,mfn_vNotificationCallback,NULL,SCR_EA_Ntfy_AddOrRebuildSection);
|
||||
m_ModifiedResList.RemoveAll();
|
||||
}
|
||||
|
||||
void CALLBACK EXPORT SNDEDIT_Interface::m_fn_vTimerProc(
|
||||
UINT uID, // event ID
|
||||
UINT nMsg, // Reserved
|
||||
DWORD dwUser, // user data
|
||||
DWORD dw1,DWORD dw2 // Reserved
|
||||
)
|
||||
{
|
||||
IResource IRes;
|
||||
|
||||
tdstBlockResourceMem* pResM;
|
||||
long lTemp;
|
||||
POSITION Pos=NULL;
|
||||
|
||||
BOOL bKeyPressed=FALSE;
|
||||
if (IPT_fn_bIsJustValidated(g_poSNDEDITInterface->m_hSoundResourceVolumeUp)==IPT_C_TRUE)
|
||||
{
|
||||
bKeyPressed=TRUE;
|
||||
lTemp=1;
|
||||
}
|
||||
if (IPT_fn_bIsJustValidated(g_poSNDEDITInterface->m_hSoundResourceVolumeDown)==IPT_C_TRUE)
|
||||
{
|
||||
bKeyPressed=TRUE;
|
||||
lTemp=-1;
|
||||
}
|
||||
if (IPT_fn_bIsJustValidated(g_poSNDEDITInterface->m_hSoundResourceVolumeUpFast)==IPT_C_TRUE)
|
||||
{
|
||||
bKeyPressed=TRUE;
|
||||
lTemp=10;
|
||||
}
|
||||
if (IPT_fn_bIsJustValidated(g_poSNDEDITInterface->m_hSoundResourceVolumeDownFast)==IPT_C_TRUE)
|
||||
{
|
||||
bKeyPressed=TRUE;
|
||||
lTemp=-10;
|
||||
}
|
||||
|
||||
|
||||
if (!bKeyPressed) goto procend_label;
|
||||
if (!SND_fn_bDoesSupervisaterSelectResource()) goto procend_label;
|
||||
|
||||
pResM=SND_fn_pstGetSelectedResource();
|
||||
if (pResM==NULL) goto procend_label;
|
||||
|
||||
// Compute new volume and check bounds:
|
||||
lTemp+=(long)pResM->ucVolume;
|
||||
if ((lTemp<0)||(lTemp>127)) goto procend_label;
|
||||
|
||||
// Change the volume in the game:
|
||||
pResM->ucVolume=(unsigned char)lTemp;
|
||||
if (g_poSNDEDITInterface->m_ModifiedResList.Find(pResM)==NULL)
|
||||
g_poSNDEDITInterface->m_ModifiedResList.AddTail(pResM);
|
||||
|
||||
|
||||
procend_label:
|
||||
|
||||
//resend the timer:
|
||||
if (g_poSNDEDITInterface->m_uiTimerId!=NULL)
|
||||
{
|
||||
g_poSNDEDITInterface->m_uiTimerId=timeSetEvent(10,10,m_fn_vTimerProc,NULL,TIME_ONESHOT);
|
||||
ASSERT(g_poSNDEDITInterface->m_uiTimerId!=NULL);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
BOOL SNDEDIT_Interface::fn_bLoadBaseObject(CPA_BaseObject *p_oObject)
|
||||
{
|
||||
TSN_Event *pEvent=(TSN_Event *)p_oObject;
|
||||
return (pEvent->fn_bEngineLoad());
|
||||
}
|
||||
|
||||
|
||||
BOOL SNDEDIT_Interface::fn_bDefineSubMenu(EDT_SubMenu *_pSubMenu)
|
||||
{
|
||||
switch(_pSubMenu->GetSubMenuType())
|
||||
{
|
||||
case C_SubMenuEditor:
|
||||
break;
|
||||
case C_SubMenuTool: //AddAnEntry args: Owner,Text,Id,_bCheck,_bEnable.
|
||||
_pSubMenu->AddAnEntry(this,"Enable Sound Mixing",1,m_bEditorEnabled,TRUE);
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SNDEDIT_Interface::_OnSubMenuCommand(EDT_SubMenu *_pSubMenu,UINT uiMsgId)
|
||||
{
|
||||
char szName[MAX_PATH],szPath[MAX_PATH];
|
||||
|
||||
switch (_pSubMenu->GetSubMenuType())
|
||||
{
|
||||
case C_SubMenuEditor:
|
||||
break;
|
||||
|
||||
case C_SubMenuTool:
|
||||
switch (uiMsgId)
|
||||
{
|
||||
case 1:
|
||||
//***********************************************
|
||||
//* Initialize sound editor *
|
||||
//***********************************************
|
||||
|
||||
// OLE DLL initailisation:
|
||||
if (!AfxOleInit())
|
||||
{
|
||||
AfxMessageBox("OLE Init failed. Check the OLE DLL versions.");
|
||||
return;
|
||||
}
|
||||
// Sound editor int:
|
||||
if (!m_IEditor.CreateDispatch(_T("SoundEditor.Document")))
|
||||
{
|
||||
AfxMessageBox("Could not load the sound editor");
|
||||
return;
|
||||
}
|
||||
// Open the sound project:
|
||||
|
||||
strcpy(szName,SND_fn_czGetProjectTitle());
|
||||
strcat(szName,".lcb");
|
||||
SND_fn_vResolveFileName(szName,szPath);
|
||||
SND_fn_bGetCurrentDirectory(szName,MAX_PATH);
|
||||
strcat(szName,"\\");
|
||||
strcat(szName,szPath);
|
||||
if (!m_IEditor.OpenDocument(szName))
|
||||
{
|
||||
AfxMessageBox("Could not open the sound project");
|
||||
return;
|
||||
}
|
||||
|
||||
// *** Init Sound resource mixing keys //
|
||||
m_hSoundResourceVolumeUp = IPT_fn_hGetEntryActionHandle("SndResVolumeUp");
|
||||
m_hSoundResourceVolumeDown= IPT_fn_hGetEntryActionHandle("SndResVolumeDown");
|
||||
m_hSoundResourceVolumeUpFast= IPT_fn_hGetEntryActionHandle("SndResVolumeUpFast");
|
||||
m_hSoundResourceVolumeDownFast= IPT_fn_hGetEntryActionHandle("SndResVolumeDownFast");
|
||||
|
||||
|
||||
if (m_hSoundResourceVolumeUp==NULL) return;
|
||||
if (m_hSoundResourceVolumeDown==NULL) return;
|
||||
if (m_hSoundResourceVolumeUpFast==NULL) return;
|
||||
if (m_hSoundResourceVolumeDownFast==NULL) return;
|
||||
|
||||
fn_vFillResList();
|
||||
SND_fn_vSetResNameCallback(fn_czGetResNameFromEdId);
|
||||
|
||||
m_bEditorEnabled=TRUE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SNDEDIT_Interface::mfn_vNotificationCallback(SCR_tdst_File_Description *_p_stFile, char *_p_szSectionName, void *_pvData, SCR_tde_Ntfy_Action _eAction)
|
||||
{
|
||||
char szName[MAX_PATH],szPath[MAX_PATH];
|
||||
|
||||
switch (_eAction)
|
||||
{
|
||||
case SCR_EA_Ntfy_AddSection:
|
||||
case SCR_EA_Ntfy_ModifySection:
|
||||
case SCR_EA_Ntfy_RebuildSection:
|
||||
case SCR_EA_Ntfy_AddOrModifySection:
|
||||
case SCR_EA_Ntfy_AddOrRebuildSection:
|
||||
strcpy(szName,SND_fn_czGetProjectTitle());
|
||||
strcat(szName,".lcb");
|
||||
SND_fn_vResolveFileName(szName,szPath);
|
||||
SND_fn_bGetCurrentDirectory(szName,MAX_PATH);
|
||||
strcat(szName,"\\");
|
||||
strcat(szName,szPath);
|
||||
g_poSNDEDITInterface->m_IEditor.SaveDocument(szName);
|
||||
break;
|
||||
|
||||
case SCR_EA_Ntfy_DeleteIfExists:
|
||||
case SCR_EA_Ntfy_DeleteSection:
|
||||
case SCR_EA_Ntfy_Dummy:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* OLD FUNCTIONS:
|
||||
|
||||
|
||||
|
||||
|
||||
BOOL SNDEDIT_Interface::fn_bDefineSubMenu(EDT_SubMenu *_pSubMenu)
|
||||
{
|
||||
switch(_pSubMenu->GetSubMenuType())
|
||||
{
|
||||
case C_SubMenuEditor:
|
||||
if (!fn_bIsCurrentEditor())
|
||||
_pSubMenu->AddAnEntry(this, "Sound Editor", C_uiOpenID, FALSE);
|
||||
else
|
||||
_pSubMenu->AddAnEntry(this, "Sound Editor", C_uiCloseID, TRUE);
|
||||
break;
|
||||
case C_SubMenuTool:
|
||||
if (fn_bIsCurrentEditor())
|
||||
{
|
||||
_pSubMenu->AddAnEntry(this,"Save sound data",1,FALSE);
|
||||
_pSubMenu->AddAnEntry(this,"Dump sound events in map",2,FALSE);
|
||||
_pSubMenu->AddAnEntry(this,"Check sample<->resource coherence",3,FALSE);
|
||||
_pSubMenu->AddAnEntry(this,"Load all sound banks",4,FALSE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SNDEDIT_Interface::_OnSubMenuCommand(EDT_SubMenu *_pSubMenu,UINT uiMsgId)
|
||||
{
|
||||
CString csDataPath;
|
||||
CString csLCBName,csSITName;
|
||||
POSITION Pos;
|
||||
SND_EventGroup *pGroup;
|
||||
|
||||
switch (_pSubMenu->GetSubMenuType())
|
||||
{
|
||||
case C_SubMenuEditor:
|
||||
switch (uiMsgId)
|
||||
{
|
||||
case C_uiOpenID:
|
||||
if (!fn_bIsCurrentEditor())
|
||||
GetMainWorld()->fn_bActivateEditor(this, NULL);
|
||||
break;
|
||||
|
||||
case C_uiCloseID:
|
||||
if (fn_bIsCurrentEditor())
|
||||
GetMainWorld()->fn_bCloseEditor(this);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case C_SubMenuTool:
|
||||
switch (uiMsgId)
|
||||
{
|
||||
case 1: // Save Sound data:
|
||||
// Get the lcb name:
|
||||
csLCBName="ed_main.lcb";
|
||||
csSITName="ed_main.sit";
|
||||
|
||||
csDataPath=m_Editor.m_fn_csGetSoundDirectory();
|
||||
csLCBName=csDataPath+"ed_main.lcb";
|
||||
m_Editor.m_fn_bSaveData((char*)(LPCTSTR)csLCBName);
|
||||
break;
|
||||
case 2: // Dump events in map:
|
||||
m_Editor.m_fn_vDumpEventsInMap();
|
||||
break;
|
||||
case 3: //Check sample<->resource coherence:
|
||||
m_Editor.m_fn_vCheckSampleResCoherence();
|
||||
break;
|
||||
case 4: //Load all sound banks:
|
||||
Pos=NULL;
|
||||
while (pGroup=m_Editor.m_fn_poGetEventGroupList()->GetNextElement(Pos))
|
||||
if (!pGroup->fn_bIsLoaded()) pGroup->fn_bLoadData();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void CALLBACK EXPORT SNDEDIT_Interface::m_fn_vTimerProc(HWND hWnd, // handle of CWnd that called SetTimer
|
||||
UINT nMsg, // WM_TIMER
|
||||
UINT nIDEvent, // timer identification
|
||||
DWORD dwTime // system time
|
||||
)
|
||||
{
|
||||
SND_ResourceView *pResView;
|
||||
SND_EdiRes* pRes;
|
||||
static SND_EdiRes* s_pEditedRes=NULL;
|
||||
tdstBlockResourceMem* pResM;
|
||||
long lTemp;
|
||||
unsigned long ulEvtGrpId;
|
||||
POSITION Pos=NULL;
|
||||
|
||||
BOOL bKeyPressed=FALSE;
|
||||
if (IPT_fn_bIsJustValidated(g_poSNDEDITInterface->m_hSoundResourceVolumeUp)==IPT_C_TRUE)
|
||||
{
|
||||
bKeyPressed=TRUE;
|
||||
lTemp=1;
|
||||
}
|
||||
if (IPT_fn_bIsJustValidated(g_poSNDEDITInterface->m_hSoundResourceVolumeDown)==IPT_C_TRUE)
|
||||
{
|
||||
bKeyPressed=TRUE;
|
||||
lTemp=-1;
|
||||
}
|
||||
if (IPT_fn_bIsJustValidated(g_poSNDEDITInterface->m_hSoundResourceVolumeUpFast)==IPT_C_TRUE)
|
||||
{
|
||||
bKeyPressed=TRUE;
|
||||
lTemp=10;
|
||||
}
|
||||
if (IPT_fn_bIsJustValidated(g_poSNDEDITInterface->m_hSoundResourceVolumeDownFast)==IPT_C_TRUE)
|
||||
{
|
||||
bKeyPressed=TRUE;
|
||||
lTemp=-10;
|
||||
}
|
||||
|
||||
if (bKeyPressed)
|
||||
{
|
||||
if (SND_fn_bDoesSupervisaterSelectResource())
|
||||
{
|
||||
pResM=SND_fn_pstGetSelectedResource();
|
||||
if (pResM==NULL) return;
|
||||
if ((s_pEditedRes==NULL)||(s_pEditedRes->GetStruct()!=pResM))
|
||||
{ // selected resource changed: get new corresponding editor res:
|
||||
ulEvtGrpId=HIWORD(pResM->Id); // Get event group id:
|
||||
// Get corresponding event group:
|
||||
SND_EventGroup* pGroup;
|
||||
Pos=NULL;
|
||||
while(pGroup=g_poSNDEDITInterface->m_Editor.m_fn_poGetEventGroupList()->GetNextElement(Pos))
|
||||
if (pGroup->fn_ulGetId()==ulEvtGrpId) break;
|
||||
if (pGroup==NULL) return; // event group not found;
|
||||
// Load event group if not yet loaded:
|
||||
if (!pGroup->fn_bIsLoaded()) pGroup->fn_bLoadData();
|
||||
// find resource in the group:
|
||||
Pos=NULL;
|
||||
while(s_pEditedRes=pGroup->m_ResList.GetNextElement(Pos))
|
||||
if (s_pEditedRes->GetStruct()==pResM) break;
|
||||
if (s_pEditedRes==NULL) return;
|
||||
}
|
||||
// Add ltemp to this resource's volume:
|
||||
lTemp+=(long)s_pEditedRes->m_oBRDisk.ucVolume;
|
||||
if ((lTemp>=0)&&(lTemp<=127))
|
||||
{
|
||||
s_pEditedRes->m_oBRDisk.ucVolume=(unsigned char)lTemp;
|
||||
s_pEditedRes->GetStruct()->ucVolume=(unsigned char)lTemp;
|
||||
s_pEditedRes->m_pGroup->fn_vNotifyRebuild();
|
||||
MessageBeep(MB_ICONEXCLAMATION);
|
||||
pResView=(SND_ResourceView *)g_poSNDEDITInterface->m_pSplitFrame->m_fn_p_oGetPane(2);
|
||||
pResView->OnUpdate(0,0,0);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
pResView=(SND_ResourceView *)g_poSNDEDITInterface->m_pSplitFrame->m_fn_p_oGetPane(2);
|
||||
while (pRes=pResView->m_EditedResList.GetNextElement(Pos))
|
||||
{
|
||||
// Add ltemp to this resource's volume:
|
||||
lTemp+=(long)pRes->m_oBRDisk.ucVolume;
|
||||
if ((lTemp>=0)&&(lTemp<=127))
|
||||
{
|
||||
pRes->m_oBRDisk.ucVolume=(unsigned char)lTemp;
|
||||
pRes->GetStruct()->ucVolume=(unsigned char)lTemp;
|
||||
pRes->m_pGroup->fn_vNotifyRebuild();
|
||||
MessageBeep(MB_ICONEXCLAMATION);
|
||||
pResView->OnUpdate(0,0,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
const char * SNDEDIT_Interface::fn_czGetResNameFromEdId(unsigned long _ulId)
|
||||
{
|
||||
if (g_poSNDEDITInterface->m_bEditorEnabled==FALSE) return "";
|
||||
|
||||
IResource IRes;
|
||||
LPDISPATCH lpDispatch;
|
||||
CString csName;
|
||||
|
||||
// Find corresponding resource in editor:
|
||||
lpDispatch=g_poSNDEDITInterface->m_IEditor.FindResFromEditorId(_ulId);
|
||||
if (lpDispatch==NULL) return "Unknown Id";
|
||||
|
||||
IRes.AttachDispatch(lpDispatch);
|
||||
csName=IRes.GetName();
|
||||
IRes.DetachDispatch();
|
||||
|
||||
return csName;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
const char * SNDEDIT_Interface::fn_czGetResNameFromEdId(unsigned long _ulId)
|
||||
{
|
||||
short wEventGroupId,wResId;
|
||||
POSITION Pos;
|
||||
TSN_ResList *pResList;
|
||||
TSN_Res *pRes;
|
||||
|
||||
|
||||
wEventGroupId=HIWORD(_ulId);
|
||||
wResId=LOWORD(_ulId);
|
||||
|
||||
if (g_poSNDEDITInterface->m_bEditorEnabled==FALSE) return "";
|
||||
|
||||
Pos=NULL;
|
||||
while (pResList=g_poSNDEDITInterface->m_ResListList.GetNextElement(Pos))
|
||||
if (pResList->m_wId==wEventGroupId) break;
|
||||
if (pResList==NULL) return "Unknown Id";
|
||||
|
||||
Pos=NULL;
|
||||
while (pRes=pResList->m_ResList.GetNextElement(Pos))
|
||||
if (pRes->m_wId==wResId) break;
|
||||
if (pRes==NULL) return "Unknown Id";
|
||||
|
||||
return pRes->m_csName;
|
||||
}
|
||||
|
||||
|
||||
void SNDEDIT_Interface::fn_vFillResList()
|
||||
{
|
||||
IEventGroups IGroups;
|
||||
IEventGroup IGroup;
|
||||
IResources IResList;
|
||||
TSN_ResList *pResList;
|
||||
TSN_Res *pRes;
|
||||
IResource IRes;
|
||||
int iNbGroups,iGroupNum,iNbRes,iResNum;
|
||||
|
||||
|
||||
IGroups.AttachDispatch(m_IEditor.GetEventGroups());
|
||||
iNbGroups=IGroups.GetCount();
|
||||
|
||||
for (iGroupNum=0;iGroupNum<iNbGroups;iGroupNum++)
|
||||
{
|
||||
IGroup.AttachDispatch(IGroups.Item(iGroupNum));
|
||||
|
||||
pResList=new TSN_ResList();
|
||||
pResList->m_csName=IGroup.GetName();
|
||||
pResList->m_wId=(short)IGroup.GetId();
|
||||
m_ResListList.AddTail(pResList);
|
||||
|
||||
IResList.AttachDispatch(IGroup.GetResources());
|
||||
iNbRes=IResList.GetCount();
|
||||
|
||||
for (iResNum=0;iResNum<iNbRes;iResNum++)
|
||||
{
|
||||
IRes.AttachDispatch(IResList.Item(iResNum));
|
||||
pRes=new TSN_Res();
|
||||
pRes->m_csName=IRes.GetName();
|
||||
pRes->m_wId=(short)IRes.GetId();
|
||||
|
||||
pResList->m_ResList.AddTail(pRes);
|
||||
IRes.DetachDispatch();
|
||||
}// end group scan
|
||||
|
||||
|
||||
|
||||
IGroup.DetachDispatch();
|
||||
}// end group scan
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void SNDEDIT_Interface::fn_vDestroyResList()
|
||||
{
|
||||
POSITION Pos,SubPos;
|
||||
TSN_ResList *pResList;
|
||||
TSN_Res *pRes;
|
||||
|
||||
|
||||
|
||||
|
||||
Pos=NULL;
|
||||
while (pResList=m_ResListList.GetNextElement(Pos))
|
||||
{
|
||||
SubPos=NULL;
|
||||
while (pRes=pResList->m_ResList.GetNextElement(SubPos)) delete pRes;
|
||||
delete pResList;
|
||||
}
|
||||
}
|
669
Rayman_X/cpa/tempgrp/TSN/Src/soundeditor.cpp
Normal file
669
Rayman_X/cpa/tempgrp/TSN/Src/soundeditor.cpp
Normal file
@@ -0,0 +1,669 @@
|
||||
// Machine generated IDispatch wrapper class(es) created with ClassWizard
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "soundeditor.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ISoundEditor properties
|
||||
|
||||
LPDISPATCH ISoundEditor::GetEventGroups()
|
||||
{
|
||||
LPDISPATCH result;
|
||||
GetProperty(0x1, VT_DISPATCH, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void ISoundEditor::SetEventGroups(LPDISPATCH propVal)
|
||||
{
|
||||
SetProperty(0x1, VT_DISPATCH, propVal);
|
||||
}
|
||||
|
||||
long ISoundEditor::GetVersionNumber()
|
||||
{
|
||||
long result;
|
||||
GetProperty(0x2, VT_I4, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void ISoundEditor::SetVersionNumber(long propVal)
|
||||
{
|
||||
SetProperty(0x2, VT_I4, propVal);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ISoundEditor operations
|
||||
|
||||
BOOL ISoundEditor::OpenDocument(LPCTSTR csFilename)
|
||||
{
|
||||
BOOL result;
|
||||
static BYTE parms[] =
|
||||
VTS_BSTR;
|
||||
InvokeHelper(0x3, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms,
|
||||
csFilename);
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOL ISoundEditor::SaveDocument(LPCTSTR csFilename)
|
||||
{
|
||||
BOOL result;
|
||||
static BYTE parms[] =
|
||||
VTS_BSTR;
|
||||
InvokeHelper(0x4, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms,
|
||||
csFilename);
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOL ISoundEditor::AddSoundDirectory(LPCTSTR csPath)
|
||||
{
|
||||
BOOL result;
|
||||
static BYTE parms[] =
|
||||
VTS_BSTR;
|
||||
InvokeHelper(0x5, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms,
|
||||
csPath);
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOL ISoundEditor::RebuildBanks()
|
||||
{
|
||||
BOOL result;
|
||||
InvokeHelper(0x6, DISPATCH_METHOD, VT_BOOL, (void*)&result, NULL);
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOL ISoundEditor::SaveLocalizedBanks(LPCTSTR _csDocumentPath, LPCTSTR _csLanguage)
|
||||
{
|
||||
BOOL result;
|
||||
static BYTE parms[] =
|
||||
VTS_BSTR VTS_BSTR;
|
||||
InvokeHelper(0x7, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms,
|
||||
_csDocumentPath, _csLanguage);
|
||||
return result;
|
||||
}
|
||||
|
||||
LPDISPATCH ISoundEditor::FindResFromEditorId(long _iId)
|
||||
{
|
||||
LPDISPATCH result;
|
||||
static BYTE parms[] =
|
||||
VTS_I4;
|
||||
InvokeHelper(0x8, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
|
||||
_iId);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IEventGroup properties
|
||||
|
||||
long IEventGroup::GetId()
|
||||
{
|
||||
long result;
|
||||
GetProperty(0x1, VT_I4, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IEventGroup::SetId(long propVal)
|
||||
{
|
||||
SetProperty(0x1, VT_I4, propVal);
|
||||
}
|
||||
|
||||
CString IEventGroup::GetName()
|
||||
{
|
||||
CString result;
|
||||
GetProperty(0x2, VT_BSTR, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IEventGroup::SetName(LPCTSTR propVal)
|
||||
{
|
||||
SetProperty(0x2, VT_BSTR, propVal);
|
||||
}
|
||||
|
||||
LPDISPATCH IEventGroup::GetResources()
|
||||
{
|
||||
LPDISPATCH result;
|
||||
GetProperty(0x3, VT_DISPATCH, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IEventGroup::SetResources(LPDISPATCH propVal)
|
||||
{
|
||||
SetProperty(0x3, VT_DISPATCH, propVal);
|
||||
}
|
||||
|
||||
LPDISPATCH IEventGroup::GetEvents()
|
||||
{
|
||||
LPDISPATCH result;
|
||||
GetProperty(0x4, VT_DISPATCH, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IEventGroup::SetEvents(LPDISPATCH propVal)
|
||||
{
|
||||
SetProperty(0x4, VT_DISPATCH, propVal);
|
||||
}
|
||||
|
||||
CString IEventGroup::GetFilePath()
|
||||
{
|
||||
CString result;
|
||||
GetProperty(0x5, VT_BSTR, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IEventGroup::SetFilePath(LPCTSTR propVal)
|
||||
{
|
||||
SetProperty(0x5, VT_BSTR, propVal);
|
||||
}
|
||||
|
||||
long IEventGroup::GetVersionNumber()
|
||||
{
|
||||
long result;
|
||||
GetProperty(0x6, VT_I4, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IEventGroup::SetVersionNumber(long propVal)
|
||||
{
|
||||
SetProperty(0x6, VT_I4, propVal);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IEventGroup operations
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ISND_EdiBank properties
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ISND_EdiBank operations
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ISND_EdiMap properties
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ISND_EdiMap operations
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IEventGroups properties
|
||||
|
||||
long IEventGroups::GetCount()
|
||||
{
|
||||
long result;
|
||||
GetProperty(0x1, VT_I4, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IEventGroups::SetCount(long propVal)
|
||||
{
|
||||
SetProperty(0x1, VT_I4, propVal);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IEventGroups operations
|
||||
|
||||
LPDISPATCH IEventGroups::Item(long Index)
|
||||
{
|
||||
LPDISPATCH result;
|
||||
static BYTE parms[] =
|
||||
VTS_I4;
|
||||
InvokeHelper(0x2, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
|
||||
Index);
|
||||
return result;
|
||||
}
|
||||
|
||||
LPDISPATCH IEventGroups::FindItem(LPCTSTR csName)
|
||||
{
|
||||
LPDISPATCH result;
|
||||
static BYTE parms[] =
|
||||
VTS_BSTR;
|
||||
InvokeHelper(0x3, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
|
||||
csName);
|
||||
return result;
|
||||
}
|
||||
|
||||
LPDISPATCH IEventGroups::Add(LPCTSTR csName)
|
||||
{
|
||||
LPDISPATCH result;
|
||||
static BYTE parms[] =
|
||||
VTS_BSTR;
|
||||
InvokeHelper(0x4, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
|
||||
csName);
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOL IEventGroups::Remove(LPCTSTR csEventGroupName)
|
||||
{
|
||||
BOOL result;
|
||||
static BYTE parms[] =
|
||||
VTS_BSTR;
|
||||
InvokeHelper(0x5, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms,
|
||||
csEventGroupName);
|
||||
return result;
|
||||
}
|
||||
|
||||
LPUNKNOWN IEventGroups::Get_NewEnum()
|
||||
{
|
||||
LPUNKNOWN result;
|
||||
InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IResource properties
|
||||
|
||||
CString IResource::GetName()
|
||||
{
|
||||
CString result;
|
||||
GetProperty(0x1, VT_BSTR, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IResource::SetName(LPCTSTR propVal)
|
||||
{
|
||||
SetProperty(0x1, VT_BSTR, propVal);
|
||||
}
|
||||
|
||||
long IResource::GetVolume()
|
||||
{
|
||||
long result;
|
||||
GetProperty(0x2, VT_I4, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IResource::SetVolume(long propVal)
|
||||
{
|
||||
SetProperty(0x2, VT_I4, propVal);
|
||||
}
|
||||
|
||||
LPDISPATCH IResource::GetSampleRes()
|
||||
{
|
||||
LPDISPATCH result;
|
||||
GetProperty(0x3, VT_DISPATCH, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IResource::SetSampleRes(LPDISPATCH propVal)
|
||||
{
|
||||
SetProperty(0x3, VT_DISPATCH, propVal);
|
||||
}
|
||||
|
||||
long IResource::GetType()
|
||||
{
|
||||
long result;
|
||||
GetProperty(0x4, VT_I4, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IResource::SetType(long propVal)
|
||||
{
|
||||
SetProperty(0x4, VT_I4, propVal);
|
||||
}
|
||||
|
||||
long IResource::GetDataOffset()
|
||||
{
|
||||
long result;
|
||||
GetProperty(0x5, VT_I4, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IResource::SetDataOffset(long propVal)
|
||||
{
|
||||
SetProperty(0x5, VT_I4, propVal);
|
||||
}
|
||||
|
||||
long IResource::GetDataSize()
|
||||
{
|
||||
long result;
|
||||
GetProperty(0x6, VT_I4, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IResource::SetDataSize(long propVal)
|
||||
{
|
||||
SetProperty(0x6, VT_I4, propVal);
|
||||
}
|
||||
|
||||
long IResource::GetId()
|
||||
{
|
||||
long result;
|
||||
GetProperty(0x7, VT_I4, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IResource::SetId(long propVal)
|
||||
{
|
||||
SetProperty(0x7, VT_I4, propVal);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IResource operations
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IResources properties
|
||||
|
||||
long IResources::GetCount()
|
||||
{
|
||||
long result;
|
||||
GetProperty(0x1, VT_I4, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IResources::SetCount(long propVal)
|
||||
{
|
||||
SetProperty(0x1, VT_I4, propVal);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IResources operations
|
||||
|
||||
LPDISPATCH IResources::Item(long Index)
|
||||
{
|
||||
LPDISPATCH result;
|
||||
static BYTE parms[] =
|
||||
VTS_I4;
|
||||
InvokeHelper(0x2, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
|
||||
Index);
|
||||
return result;
|
||||
}
|
||||
|
||||
LPDISPATCH IResources::FindItem(LPCTSTR csName)
|
||||
{
|
||||
LPDISPATCH result;
|
||||
static BYTE parms[] =
|
||||
VTS_BSTR;
|
||||
InvokeHelper(0x3, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
|
||||
csName);
|
||||
return result;
|
||||
}
|
||||
|
||||
LPDISPATCH IResources::Add(LPCTSTR csName)
|
||||
{
|
||||
LPDISPATCH result;
|
||||
static BYTE parms[] =
|
||||
VTS_BSTR;
|
||||
InvokeHelper(0x4, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
|
||||
csName);
|
||||
return result;
|
||||
}
|
||||
|
||||
LPDISPATCH IResources::AddSampleRes(LPCTSTR csName)
|
||||
{
|
||||
LPDISPATCH result;
|
||||
static BYTE parms[] =
|
||||
VTS_BSTR;
|
||||
InvokeHelper(0x5, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
|
||||
csName);
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOL IResources::Remove(LPCTSTR csResName)
|
||||
{
|
||||
BOOL result;
|
||||
static BYTE parms[] =
|
||||
VTS_BSTR;
|
||||
InvokeHelper(0x6, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms,
|
||||
csResName);
|
||||
return result;
|
||||
}
|
||||
|
||||
LPUNKNOWN IResources::Get_NewEnum()
|
||||
{
|
||||
LPUNKNOWN result;
|
||||
InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ISampleResource properties
|
||||
|
||||
CString ISampleResource::GetFileName()
|
||||
{
|
||||
CString result;
|
||||
GetProperty(0x1, VT_BSTR, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void ISampleResource::SetFileName(LPCTSTR propVal)
|
||||
{
|
||||
SetProperty(0x1, VT_BSTR, propVal);
|
||||
}
|
||||
|
||||
long ISampleResource::GetZipType()
|
||||
{
|
||||
long result;
|
||||
GetProperty(0x2, VT_I4, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void ISampleResource::SetZipType(long propVal)
|
||||
{
|
||||
SetProperty(0x2, VT_I4, propVal);
|
||||
}
|
||||
|
||||
BOOL ISampleResource::GetLoop()
|
||||
{
|
||||
BOOL result;
|
||||
GetProperty(0x3, VT_BOOL, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void ISampleResource::SetLoop(BOOL propVal)
|
||||
{
|
||||
SetProperty(0x3, VT_BOOL, propVal);
|
||||
}
|
||||
|
||||
long ISampleResource::GetStartLoop()
|
||||
{
|
||||
long result;
|
||||
GetProperty(0x4, VT_I4, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void ISampleResource::SetStartLoop(long propVal)
|
||||
{
|
||||
SetProperty(0x4, VT_I4, propVal);
|
||||
}
|
||||
|
||||
long ISampleResource::GetLoopLength()
|
||||
{
|
||||
long result;
|
||||
GetProperty(0x5, VT_I4, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void ISampleResource::SetLoopLength(long propVal)
|
||||
{
|
||||
SetProperty(0x5, VT_I4, propVal);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ISampleResource operations
|
||||
|
||||
BOOL ISampleResource::SetSampleData(LPCTSTR csFilename)
|
||||
{
|
||||
BOOL result;
|
||||
static BYTE parms[] =
|
||||
VTS_BSTR;
|
||||
InvokeHelper(0x6, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms,
|
||||
csFilename);
|
||||
return result;
|
||||
}
|
||||
|
||||
LPDISPATCH ISampleResource::GetResource()
|
||||
{
|
||||
LPDISPATCH result;
|
||||
InvokeHelper(0x7, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, NULL);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IEvents properties
|
||||
|
||||
long IEvents::GetCount()
|
||||
{
|
||||
long result;
|
||||
GetProperty(0x1, VT_I4, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IEvents::SetCount(long propVal)
|
||||
{
|
||||
SetProperty(0x1, VT_I4, propVal);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IEvents operations
|
||||
|
||||
LPDISPATCH IEvents::Item(long Index)
|
||||
{
|
||||
LPDISPATCH result;
|
||||
static BYTE parms[] =
|
||||
VTS_I4;
|
||||
InvokeHelper(0x2, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
|
||||
Index);
|
||||
return result;
|
||||
}
|
||||
|
||||
LPDISPATCH IEvents::FindItem(LPCTSTR csName)
|
||||
{
|
||||
LPDISPATCH result;
|
||||
static BYTE parms[] =
|
||||
VTS_BSTR;
|
||||
InvokeHelper(0x3, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
|
||||
csName);
|
||||
return result;
|
||||
}
|
||||
|
||||
LPDISPATCH IEvents::Add(LPCTSTR csName)
|
||||
{
|
||||
LPDISPATCH result;
|
||||
static BYTE parms[] =
|
||||
VTS_BSTR;
|
||||
InvokeHelper(0x4, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
|
||||
csName);
|
||||
return result;
|
||||
}
|
||||
|
||||
LPDISPATCH IEvents::AddPlayEvent(LPDISPATCH Resource)
|
||||
{
|
||||
LPDISPATCH result;
|
||||
static BYTE parms[] =
|
||||
VTS_DISPATCH;
|
||||
InvokeHelper(0x5, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
|
||||
Resource);
|
||||
return result;
|
||||
}
|
||||
|
||||
LPDISPATCH IEvents::AddStopEvent(LPDISPATCH lpEvent)
|
||||
{
|
||||
LPDISPATCH result;
|
||||
static BYTE parms[] =
|
||||
VTS_DISPATCH;
|
||||
InvokeHelper(0x6, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
|
||||
lpEvent);
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOL IEvents::Remove(LPCTSTR csEventName)
|
||||
{
|
||||
BOOL result;
|
||||
static BYTE parms[] =
|
||||
VTS_BSTR;
|
||||
InvokeHelper(0x7, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms,
|
||||
csEventName);
|
||||
return result;
|
||||
}
|
||||
|
||||
LPUNKNOWN IEvents::Get_NewEnum()
|
||||
{
|
||||
LPUNKNOWN result;
|
||||
InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IEvent properties
|
||||
|
||||
long IEvent::GetId()
|
||||
{
|
||||
long result;
|
||||
GetProperty(0x1, VT_I4, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IEvent::SetId(long propVal)
|
||||
{
|
||||
SetProperty(0x1, VT_I4, propVal);
|
||||
}
|
||||
|
||||
CString IEvent::GetName()
|
||||
{
|
||||
CString result;
|
||||
GetProperty(0x2, VT_BSTR, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IEvent::SetName(LPCTSTR propVal)
|
||||
{
|
||||
SetProperty(0x2, VT_BSTR, propVal);
|
||||
}
|
||||
|
||||
BOOL IEvent::GetDynamic()
|
||||
{
|
||||
BOOL result;
|
||||
GetProperty(0x3, VT_BOOL, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IEvent::SetDynamic(BOOL propVal)
|
||||
{
|
||||
SetProperty(0x3, VT_BOOL, propVal);
|
||||
}
|
||||
|
||||
BOOL IEvent::GetStopable()
|
||||
{
|
||||
BOOL result;
|
||||
GetProperty(0x4, VT_BOOL, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IEvent::SetStopable(BOOL propVal)
|
||||
{
|
||||
SetProperty(0x4, VT_BOOL, propVal);
|
||||
}
|
||||
|
||||
long IEvent::GetType()
|
||||
{
|
||||
long result;
|
||||
GetProperty(0x5, VT_I4, (void*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void IEvent::SetType(long propVal)
|
||||
{
|
||||
SetProperty(0x5, VT_I4, propVal);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IEvent operations
|
||||
|
||||
LPDISPATCH IEvent::GetResource()
|
||||
{
|
||||
LPDISPATCH result;
|
||||
InvokeHelper(0x6, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, NULL);
|
||||
return result;
|
||||
}
|
123
Rayman_X/cpa/tempgrp/TSN/Src/tsneventCB.cpp
Normal file
123
Rayman_X/cpa/tempgrp/TSN/Src/tsneventCB.cpp
Normal file
@@ -0,0 +1,123 @@
|
||||
//BEGIN FS 10/9/98
|
||||
/*----------------------------------------------------------------------
|
||||
* Description: callback for .CSB sript file
|
||||
*----------------------------------------------------------------------
|
||||
* Input:
|
||||
* Output:
|
||||
*----------------------------------------------------------------------
|
||||
* Author: FS
|
||||
* Creation date:10/9/98
|
||||
* Modif date:
|
||||
*----------------------------------------------------------------------*/
|
||||
int TSN_Event::LoadCSB_File( LDT_tdst_Link *pLink )
|
||||
{
|
||||
LDT_tdeParseResult result=ParseResult_BeginSection;
|
||||
char *szSectionName;
|
||||
|
||||
result=LDT_GetNextEntry();
|
||||
while( result==ParseResult_BeginSection )
|
||||
{
|
||||
szSectionName=LDT_szGetEntryName();
|
||||
switch (*(long*)(szSectionName+5/*"SndEv"*/))
|
||||
{
|
||||
case 'etne': //"SndEventE"
|
||||
LDT_LoadSection(NULL);
|
||||
break;
|
||||
default:
|
||||
LDT_SkipSection();
|
||||
}//end switch
|
||||
result=LDT_GetNextEntry();
|
||||
}//end while
|
||||
return 0;
|
||||
}
|
||||
//END FS 10/9/98
|
||||
|
||||
//BEGIN FS 10/5/98
|
||||
/*----------------------------------------------------------------------
|
||||
* Description: callback for SndEventE section from .CSB sript file
|
||||
*----------------------------------------------------------------------
|
||||
* Input:
|
||||
* Output:
|
||||
*----------------------------------------------------------------------
|
||||
* Author: FS
|
||||
* Creation date:10/5/98
|
||||
* Modif date:
|
||||
*----------------------------------------------------------------------*/
|
||||
int TSN_Event::LoadCSB_SndEventE( LDT_tdst_Link *pLink )
|
||||
{
|
||||
LDT_tdeParseResult result=ParseResult_BeginSection;
|
||||
char *szEntryName;
|
||||
|
||||
TSN_Event *pEvent;
|
||||
CString csName,csTemp;
|
||||
int iPos;
|
||||
tdeMissingCriteria eAns;
|
||||
char szEntry1[MAX_PATH];
|
||||
int iLen;
|
||||
|
||||
// unsigned long* pOpenSection;
|
||||
// SCR_tdst_Sect_Open *pOpenSection;
|
||||
SND_tdstBlockEvent *pEngineEvent;
|
||||
|
||||
//Working for BeginSection
|
||||
// Create event:
|
||||
pEvent=new TSN_Event();
|
||||
pLink->pObject=pEvent;
|
||||
g_poSNDEDITInterface->m_EdiEventList.AddTail(pEvent);
|
||||
|
||||
// Transform the SndEventE in SndEventM:
|
||||
iLen=LDT_ComputeSectionName(pLink,szEntry1);
|
||||
csName = szEntry1+iLen;
|
||||
iPos=csName.Find("sndevente");
|
||||
|
||||
if (iPos!=-1)
|
||||
{
|
||||
csName.SetAt(iPos+8,'m');
|
||||
}
|
||||
// set the engine event pointer if event is loaded:
|
||||
//pEngineEvent=(SND_tdstBlockEvent*)LDT_LoadSection((char*)(LPCTSTR)csName);
|
||||
LDT_tdst_Link *pLink1 = LDT_GetLink( (char*)(LPCTSTR)csName );
|
||||
if (pLink1!=NULL)
|
||||
{
|
||||
pEngineEvent=(SND_tdstBlockEvent*)pLink1->pObject;
|
||||
// pEngineEvent=(SND_tdstBlockEvent *)SCR_M_ul_RdL0_ExtractLongValue(&pOpenSection->stSectionValues,0);
|
||||
if( pEngineEvent !=NULL )
|
||||
{
|
||||
if (pEngineEvent!=pEvent->m_pEngineEvent)
|
||||
{
|
||||
pEvent->fn_vUpdateData(pEngineEvent);
|
||||
pEvent->m_pEngineEvent=pEngineEvent;
|
||||
}
|
||||
pEvent->SetAvailable(TRUE);
|
||||
}
|
||||
}
|
||||
pEvent->SetReferencedSectionName(csName);
|
||||
|
||||
//Working for entries
|
||||
result=LDT_GetNextEntry();
|
||||
while( result!=ParseResult_EndSection )
|
||||
{
|
||||
szEntryName=LDT_szGetEntryName();
|
||||
switch (*(long*)(szEntryName))
|
||||
{
|
||||
case 'NteS': //"SetName"
|
||||
// Compute csb name, without the '.csb' extension:
|
||||
csName=pLink->szFile;
|
||||
csTemp=csName.Left(csName.GetLength()-4);
|
||||
// crate event name as registered in name list:
|
||||
csName.Format("SND_%s_%s",LDT_szGetParam(1),csTemp);
|
||||
eAns=pEvent->fn_eRename(csName);
|
||||
if (eAns!=E_mc_None)
|
||||
{
|
||||
csTemp.Format("Sound Editor Event Creation error: Name SND_%s incorrect(already exists or syntax incorrect)!",csName);
|
||||
AfxMessageBox(csTemp);
|
||||
}
|
||||
// We have the event group's name: no need to continue this section analysis:
|
||||
while (LDT_GetNextEntry()!=ParseResult_EndSection);
|
||||
return 0;
|
||||
}//end switch
|
||||
result=LDT_GetNextEntry();
|
||||
}//end while
|
||||
return 0;
|
||||
}
|
||||
//END FS 10/5/98
|
Reference in New Issue
Block a user