Add rayman2 source files

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

View File

@@ -0,0 +1,258 @@
//This file is a SND adaptation of ACP's LSTEDLST.HPP
//(c) Ubi Studios 1996
// See Vincent Greco for any comment or question
#ifndef __SNDLSTED_HPP__
#define __SNDLSTED_HPP__
#include "SNDLstMt.Hpp"
//#include "ErrHie.h"
#define TemplateParam \
template<class EditorClass, class tdxHandleToStruct, class tdxPointerToAnchorStruct>
#define SNDLST2_ElementClass \
SNDLST2_EdElement<EditorClass, tdxHandleToStruct, tdxPointerToAnchorStruct>
#define SNDLST2_ListClass \
SNDLST2_EdList<EditorClass,tdxHandleToStruct,tdxPointerToAnchorStruct>
#define SNDLST2_ListBaseClass \
SNDLST2_List<SNDLST2_ElementClass >
//Be careful the space character must not be removed (class<class<param> > is OK, class<class<param>> is Wrong)
//**************************************
//assumes that tdxHandleToStruct has a tdxPointerToAnchorStruct * pAnchor member
//assumes that tdxHandleToStruct has a tdxHandleToStruct * hNextBrother member
//assumes that tdxHandleToStruct has a tdxHandleToStruct * hPrevBrother member
TemplateParam class SNDLST2_EdList;
TemplateParam
class SNDLST2_EdElement : virtual public SNDLST2_EdMot<tdxHandleToStruct>
{
private:
SNDLST2_ListClass * m_pList;
public:
SNDLST2_EdElement(void){m_pList=NULL;}//use SetList(NULL) ???
virtual ~SNDLST2_EdElement(void){}
public:
//accessors to private member
SNDLST2_ListClass *GetList(void){return m_pList;}
void SetList(SNDLST2_ListClass * _pList, BOOL ModifyEngine=TRUE)
{
m_pList=_pList;
if(ModifyEngine)
{
if(_pList)
{
SNDLST2_M_StaticGetFather(GetStruct())=_pList->GetEngineAnchor();
}
else
{
SNDLST2_M_StaticGetFather(GetStruct())=NULL;
}
}
}
public:
tdxHandleToStruct GetPrevStruct(void);
tdxHandleToStruct GetNextStruct(void);
void Isolate(BOOL ModifyEngine=TRUE);
// void InsertBetween(tdxHandleToStruct pPrev, tdxHandleToStruct pNext);
};
TemplateParam
class SNDLST2_EdList : public SNDLST2_ListBaseClass
{
private:
tdxPointerToAnchorStruct m_pAnchor;
public:
SNDLST2_EdList() {}
virtual ~SNDLST2_EdList(void){}
public:
//accessors to private member
tdxPointerToAnchorStruct GetEngineAnchor() {return m_pAnchor;}
void SetEngineAnchor(tdxPointerToAnchorStruct _pAnchor){m_pAnchor=_pAnchor;}
public:
//redefined functions
POSITION InsertAfter(POSITION position, SNDLST2_ElementClass* newElement, BOOL ModifyEngine=TRUE);
POSITION InsertBefore(POSITION position, SNDLST2_ElementClass* newElement, BOOL ModifyEngine=TRUE);
POSITION AddHead(SNDLST2_ElementClass* newElement, BOOL ModifyEngine=TRUE);
POSITION AddTail(SNDLST2_ElementClass* newElement, BOOL ModifyEngine=TRUE);
void RemoveAt(POSITION position, BOOL ModifyEngine=TRUE);
EditorClass* RemoveHead(BOOL ModifyEngine=TRUE);
EditorClass* RemoveTail(BOOL ModifyEngine=TRUE);
void RemoveAll(BOOL ModifyEngine=TRUE);
//simple type conversions
EditorClass* GetAt(POSITION position) {return (EditorClass*)SNDLST2_ListBaseClass::GetAt(position);}
EditorClass* GetNext(POSITION& position) {return (EditorClass*)SNDLST2_ListBaseClass::GetNext(position);}
EditorClass* GetPrev(POSITION& position) {return (EditorClass*)SNDLST2_ListBaseClass::GetPrev(position);}
EditorClass* GetHead() {return (EditorClass*)SNDLST2_ListBaseClass::GetHead();}
EditorClass* GetTail() {return (EditorClass*)SNDLST2_ListBaseClass::GetTail();}
EditorClass* GetHeadElement(POSITION& rPosition) const {return (EditorClass*)SNDLST2_ListBaseClass::GetHeadElement(rPosition);}
EditorClass* GetTailElement(POSITION& rPosition) const {return (EditorClass*)SNDLST2_ListBaseClass::GetTailElement(rPosition);}
EditorClass* GetNextElement(POSITION& rPosition) const {return (EditorClass*)SNDLST2_ListBaseClass::GetNextElement(rPosition);}
EditorClass* GetPrevElement(POSITION& rPosition) const {return (EditorClass*)SNDLST2_ListBaseClass::GetPrevElement(rPosition);}
EditorClass* GetHeadElement(void) const {return (EditorClass*)SNDLST2_ListBaseClass::GetHeadElement();}
EditorClass* GetTailElement(void) const {return (EditorClass*)SNDLST2_ListBaseClass::GetTailElement();}
EditorClass* GetNextElement(SNDLST2_ElementClass * pElement) const {return (EditorClass*)SNDLST2_ListBaseClass::GetNextElement(pElement);}
EditorClass* GetPrevElement(SNDLST2_ElementClass * pElement) const {return (EditorClass*)SNDLST2_ListBaseClass::GetPrevElement(pElement);}
};
//------------------------------------------------------------------
TemplateParam tdxHandleToStruct SNDLST2_ElementClass::GetPrevStruct(void)
{
tdxHandleToStruct hStruct= GetStruct();
return SNDLST2_M_StaticGetPrevElement(hStruct);
}
TemplateParam tdxHandleToStruct SNDLST2_ElementClass::GetNextStruct(void)
{
tdxHandleToStruct hStruct= GetStruct();
return SNDLST2_M_StaticGetNextElement(hStruct);
}
TemplateParam void SNDLST2_ElementClass::Isolate(BOOL ModifyEngine)//can be called as many times as you want.
{
if(GetList())
{
POSITION P=GetList()->Find(this);
GetList()->RemoveAt(P, ModifyEngine);
// SetList(NULL);//modifyEngine ???
SetList(NULL,ModifyEngine);
}
}
//-----------------------------------------
TemplateParam POSITION SNDLST2_ListClass::InsertAfter(POSITION position, SNDLST2_ElementClass* newElement, BOOL ModifyEngine)
{
if(!position) return AddHead(newElement, ModifyEngine);
SNDLST2_ElementClass* pPrevObj=GetAt(position);//can't be NULL
newElement->Isolate(ModifyEngine);
if(ModifyEngine)
{
tdxHandleToStruct pPrev=pPrevObj->GetStruct();
tdxHandleToStruct pNext=pPrevObj->GetNextStruct();
SNDLST2_M_StaticInsertBetween(newElement->GetStruct(),pPrev,pNext);
}
newElement->SetList(this, ModifyEngine);
return SNDLST2_ListBaseClass::InsertAfter(position, newElement);
}
TemplateParam POSITION SNDLST2_ListClass::InsertBefore(POSITION position, SNDLST2_ElementClass* newElement, BOOL ModifyEngine)
{
if(!position) return AddTail(newElement, ModifyEngine);
SNDLST2_ElementClass* pNextObj=GetAt(position);//can't be NULL
newElement->Isolate(ModifyEngine);
if(ModifyEngine)
{
tdxHandleToStruct pNext=pNextObj->GetStruct();
tdxHandleToStruct pPrev=pNextObj->GetPrevStruct();
SNDLST2_M_StaticInsertBetween(newElement->GetStruct(),pPrev,pNext);
}
newElement->SetList(this, ModifyEngine);
return SNDLST2_ListBaseClass::InsertBefore(position, newElement);
}
TemplateParam POSITION SNDLST2_ListClass::AddHead(SNDLST2_ElementClass* newElement, BOOL ModifyEngine )
{
newElement->Isolate(ModifyEngine);
if(ModifyEngine)
{
SNDLST2_M_StaticAddHead(GetEngineAnchor(),newElement->GetStruct());
}
newElement->SetList(this, ModifyEngine);
return SNDLST2_ListBaseClass::AddHead(newElement);
}
TemplateParam POSITION SNDLST2_ListClass::AddTail(SNDLST2_ElementClass* newElement, BOOL ModifyEngine )
{
newElement->Isolate(ModifyEngine);
if(ModifyEngine)
{
SNDLST2_M_StaticAddTail(GetEngineAnchor(),newElement->GetStruct());
}
newElement->SetList(this, ModifyEngine);
return SNDLST2_ListBaseClass::AddTail(newElement);
}
TemplateParam void SNDLST2_ListClass::RemoveAt(POSITION position, BOOL ModifyEngine)
{
SNDLST2_ElementClass *pOldObj = GetAt(position);
if(ModifyEngine)
{
SNDLST2_M_StaticIsolate(pOldObj->GetStruct());
}
pOldObj->SetList(NULL, ModifyEngine);
// pOldObj->SetAnchor(NULL, ModifyEngine);
SNDLST2_ListBaseClass::RemoveAt(position);
}
TemplateParam EditorClass* SNDLST2_ListClass::RemoveHead(BOOL ModifyEngine)
{
SNDLST2_ElementClass *pOldObj = SNDLST2_ListBaseClass::RemoveHead();
if(ModifyEngine)
{
SNDLST2_M_StaticIsolate(pOldObj->GetStruct());
}
pOldObj->SetList(NULL, ModifyEngine);
//pOldObj->SetAnchor(NULL, ModifyEngine);
return (EditorClass*)pOldObj;
}
TemplateParam EditorClass* SNDLST2_ListClass::RemoveTail(BOOL ModifyEngine)
{
SNDLST2_ElementClass *pOldObj = SNDLST2_ListBaseClass::RemoveTail();
if(ModifyEngine)
{
SNDLST2_M_StaticIsolate(pOldObj->GetStruct());
}
pOldObj->SetList(NULL, ModifyEngine);
return (EditorClass*)pOldObj;
}
TemplateParam void SNDLST2_ListClass::RemoveAll(BOOL ModifyEngine)//not tested !!!
{
if(ModifyEngine)
{
SNDLST2_M_StaticInitAnchor(GetEngineAnchor());
}
SNDLST2_ListBaseClass::RemoveAll();
}
//-----------------------------------------
#endif //__LSTEDLST_HPP__

View File

@@ -0,0 +1,185 @@
// (c) Ubi Studios 1996
// See Vincent Greco for any comment or question
#ifndef __SNDLSTPR_HPP__
#define __SNDLSTPR_HPP__
#include "SNDLstEd.Hpp"
#define SNDLST2_ChildClass \
SNDLST2_EdChild<EditorClass, tdxHandleToStruct, tdxPointerToAnchorStruct>
#define SNDLST2_ParentClass \
SNDLST2_EdParent<EditorClass,tdxHandleToStruct,tdxPointerToAnchorStruct>
TemplateParam class SNDLST2_EdParent;
TemplateParam
class SNDLST2_EdChild : public SNDLST2_ElementClass
{
private:
// SNDLST2_ParentClass * pParent;
public:
SNDLST2_EdChild(void)
{
// pParent=NULL;
}
virtual ~SNDLST2_EdChild(void){}
public:
SNDLST2_ParentClass * GetParent() {return (SNDLST2_ParentClass *)GetList();}
// void SetParent(SNDLST2_ParentClass * _pParent, BOOL ModifyEngine=TRUE);
// void Isolate(BOOL ModifyEngine=TRUE);
};
TemplateParam
class SNDLST2_EdParent : virtual public SNDLST2_EdMot<tdxPointerToAnchorStruct>, public SNDLST2_ListClass
{
private:
// SNDLST2_EdList<EditorClass, tdxHandleToStruct, tdxPointerToAnchorStruct> m_List;
public:
void SetStruct(tdxPointerToAnchorStruct pNewStruct)
{
SNDLST2_EdMot<tdxPointerToAnchorStruct>::SetStruct(pNewStruct);
SetEngineAnchor(pNewStruct);
}
public:
SNDLST2_EdParent(void) {SetEngineAnchor(GetStruct());}//m_List.SetOwner(this);/*LST_M_InitParent(GetStruct());*/}
virtual ~SNDLST2_EdParent(void){}
// SNDLST2_EdList<EditorClass, tdxHandleToStruct, tdxPointerToAnchorStruct> *GetList(){return &m_List;}
/*
POSITION InsertAfter( POSITION position, SNDLST2_ChildClass* newElement, BOOL ModifyEngine=TRUE);
POSITION InsertBefore( POSITION position, SNDLST2_ChildClass* newElement, BOOL ModifyEngine=TRUE);
POSITION AddHead(SNDLST2_ChildClass* newElement, BOOL ModifyEngine=TRUE);
POSITION AddTail(SNDLST2_ChildClass* newElement, BOOL ModifyEngine=TRUE);
void RemoveAt(POSITION position, BOOL ModifyEngine=TRUE);
EditorClass* RemoveHead(BOOL ModifyEngine=TRUE);
EditorClass* RemoveTail(BOOL ModifyEngine=TRUE);
void RemoveAll(BOOL ModifyEngine=TRUE);
*/
};
//both Parent and Child (homogenous tree)
TemplateParam
class SNDLST2_EdNode : public SNDLST2_ElementClass, public SNDLST2_ListClass
{
private:
// SNDLST2_EdList<EditorClass, tdxHandleToStruct, tdxPointerToAnchorStruct> m_List;
public:
void SetStruct(tdxPointerToAnchorStruct pNewStruct)
{
SNDLST2_EdMot<tdxPointerToAnchorStruct>::SetStruct(pNewStruct);
SetEngineAnchor(pNewStruct);
}
EditorClass * GetParent() {return (EditorClass *)GetList();}
public:
SNDLST2_EdNode(void) {SetEngineAnchor(GetStruct());}
virtual ~SNDLST2_EdNode(void){}
};
//------------------------------------------------------------------
/*
//redondance avec SetList de SNDLST2_ElementClass ?
TemplateParam void SNDLST2_ChildClass::SetParent(SNDLST2_ParentClass * _pParent, BOOL ModifyEngine)
{
pParent=_pParent;
}
*/
/*
TemplateParam void SNDLST2_ChildClass::Isolate(BOOL ModifyEngine)//can be called as many times as you want.
{
if(pParent)
{
POSITION P=pParent->GetList()->Find(this);
pParent->GetList()->RemoveAt(P, ModifyEngine);
// pParent=NULL;//???
}
}
TemplateParam void SNDLST2_ChildClass::InsertBetween(tdxHandleToStruct pPrev, tdxHandleToStruct pNext)
{
if(pParent)
{
POSITION P=pParent->GetList()->Find(this);
pParent->GetList()->RemoveAt(P);
// pParent=NULL; InsertBetween is always followed by a SetParent
}
LST_M_StaticInsertBetween(GetStruct(),pPrev,pNext);
}
//-----------------------------------------
TemplateParam POSITION SNDLST2_ParentClass::InsertAfter(POSITION position, SNDLST2_ChildClass* newElement, BOOL ModifyEngine)
{
// newElement->SetParent(this, ModifyEngine);
return SNDLST2_ListClass::InsertAfter(position, newElement);
}
TemplateParam POSITION SNDLST2_ParentClass::InsertBefore(POSITION position, SNDLST2_ChildClass* newElement, BOOL ModifyEngine)
{
// newElement->SetParent(this, ModifyEngine);
return SNDLST2_ListClass::InsertBefore(position, newElement);
}
TemplateParam POSITION SNDLST2_ParentClass:: AddHead(SNDLST2_ChildClass* newElement, BOOL ModifyEngine )
{
// newElement->SetParent(this, ModifyEngine);
return SNDLST2_ListClass::AddHead(newElement);
}
TemplateParam POSITION SNDLST2_ParentClass::AddTail(SNDLST2_ChildClass* newElement, BOOL ModifyEngine )
{
// newElement->SetParent(this, ModifyEngine);
return SNDLST2_ListClass::AddTail(newElement);
}
TemplateParam void SNDLST2_ParentClass::RemoveAt(POSITION position, BOOL ModifyEngine)
{
// GetAt(position)->SetParent(NULL, ModifyEngine);
SNDLST2_ListClass::RemoveAt(position);
}
TemplateParam EditorClass* SNDLST2_ParentClass::RemoveHead(BOOL ModifyEngine)
{
SNDLST2_ChildClass *pOldObj = SNDLST2_ListClass::RemoveHead();
// pOldObj->SetParent(NULL, ModifyEngine);
return (EditorClass*)pOldObj;
}
TemplateParam EditorClass* SNDLST2_ParentClass::RemoveTail(BOOL ModifyEngine)
{
SNDLST2_ChildClass *pOldObj = SNDLST2_ListClass::RemoveTail();
// pOldObj->SetParent(NULL, ModifyEngine);
return (EditorClass*)pOldObj;
}
TemplateParam void SNDLST2_ParentClass::RemoveAll(BOOL ModifyEngine)//not tested !!!
{
SNDLST2_ListClass::RemoveAll();
}
*/
#endif //__LSTEDPAR_HPP__

View File

@@ -0,0 +1,70 @@
//This vile is adapted from CPA's LSTEDMOT.HPP
// (c) Ubi Studios 1996
// See Vincent Greco for any comment or question
#ifndef __SNDLSTMT_HPP__
#define __SNDLSTMT_HPP__
#include "SNDLst2.h"
#include "SNDList.Hpp"
//#include "ErrHie.h"
//YOU MUST DEFINE Mod BEFORE INCLUDING THIS FILE
// Example "#define Mod Hie" for hierarchy
//**************************************
#ifndef CPA_EXPORT
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else
#define CPA_EXPORT
#endif
#endif
//**************************************
template<class tdxHandleToStruct>
class SNDLST2_EdMot
{
private:
tdxHandleToStruct pStruct;
// void NewStruct(void);
static tdxHandleToStruct (*m_p_fn_hCreate)(void);
static void (*m_p_fn_hCopy)(tdxHandleToStruct,tdxHandleToStruct);
static void (*m_p_fn_vDestroy)(tdxHandleToStruct);
protected:
virtual void SetStruct(tdxHandleToStruct pNewStruct){pStruct=pNewStruct;}
public:
static void Init(tdxHandleToStruct (*_p_fn_hCreate)(void),void (*_p_fn_hCopy)(tdxHandleToStruct,tdxHandleToStruct),void (*_p_fn_vDestroy)(tdxHandleToStruct))
{
m_p_fn_hCreate=_p_fn_hCreate;
m_p_fn_hCopy=_p_fn_hCopy;
m_p_fn_vDestroy=_p_fn_vDestroy;
}
// IMPORTANT :
// even if SetStruct() is virtual
// the the SetStruct() called by the constructors of SNDLST2_EdMot
// is the one of SNDLST2_EdMot itself,
// so if you overload SetStruct(),
// overload also the constructors
SNDLST2_EdMot(void) {SetStruct((*m_p_fn_hCreate)());}
SNDLST2_EdMot(long _lValue) {SetStruct((tdxHandleToStruct)_lValue);}
SNDLST2_EdMot(tdxHandleToStruct _hValue) {SetStruct(_hValue);}
SNDLST2_EdMot(const SNDLST2_EdMot& C) {SetStruct((*m_p_fn_hCreate)()); (*m_p_fn_hCopy)(pStruct, C.pStruct);}
SNDLST2_EdMot& operator=(const SNDLST2_EdMot& C) {(*m_p_fn_hCopy)(pStruct, C.pStruct); return *this;}
virtual ~SNDLST2_EdMot(void) {(*m_p_fn_vDestroy)(pStruct);}
public:
tdxHandleToStruct GetStruct(void) const {return pStruct;}
};
#define SNDLST2_DeclareTemplateStatic(tdxHandleToStruct) \
tdxHandleToStruct (*SNDLST2_EdMot<tdxHandleToStruct>::m_p_fn_hCreate)(void); \
void (*SNDLST2_EdMot<tdxHandleToStruct>::m_p_fn_hCopy)(tdxHandleToStruct,tdxHandleToStruct); \
void (*SNDLST2_EdMot<tdxHandleToStruct>::m_p_fn_vDestroy)(tdxHandleToStruct);
#endif //__LSTEDMOT_HPP__

View File

@@ -0,0 +1,14 @@
Module SND (vers. 5.1.4)
------------------------
Uses modules:
LST 5.0.2
ERM 5.0.6
MMG 5.0.8
SCR 5.3.2
Used by modules:
GAM
MainEngine Application
TSN (SoundEditor)

View File

@@ -0,0 +1,308 @@
#ifndef _SNDDEF_H_
#define _SNDDEF_H_
#if defined(U64) || defined(PSX) || defined(DREAMCAST)
#define GAMECONSOLE
#endif
#if !defined(GAMECONSOLE) && defined(WIN32)
#include "win95\SND_disable_warning.h"
#include <windows.h>
#include <stdlib.h>
#endif
#if !defined(GAMECONSOLE)
#include <stdio.h>
#include <string.h>
#include <memory.h>
#else /* GAMECONSOLE*/
#if (defined(U64))
#include <ultra.h>
#endif
#if (defined(DREAMCAST))
#include <stdio.h>
#include <string.h>
#include "SND/dreamcast/dreaminc.h"
#endif
#if (defined(PSX))
#include <stdio.h>
#include <string.h>
#include <memory.h>
#endif
#endif /* GAMECONSOLE */
#if !defined(GAMECONSOLE) && !defined(GENERIC)
/******************************** Version PC ***************************************/
/*OPTIONS SONS pour PC*/
/*#define NO_ACP_SCRIPT*/
/*#define NO_ACP_MEMORY*/
/*#define NO_ACP_ERROR*/
/*#define NO_ACP_LDBIN*/
/*#define DISABLE_MPEG*/
/*#define DISABLE_MIDI*/
/*#define DISABLE_CD*/
/*#define DISABLE_WAVE*/
/*#define DISABLE_THEME_WAVE*/
/*#define DISABLE_BUFFER_CLIENT*/
/*#define DISABLE_THEME_MIDI*/
/*#define DISABLE_SEQUENCE*/
/*#define DISABLE_ADPCM*/
/*#define DISABLE_SEQUENCE*/
/*#define DISABLE_SPLIT*/
/*#define DISABLE_MULTIWAVFORMAT*/
#define SUPERVISATER
/*#define DISABLE_RECORD*/
/*#define USE_EAX */
#define SND_DISPLAY_ERROR_MESSAGE
#define NB_MICRO_MAX 2
/******************************** Version PC ***************************************/
#endif
#ifdef U64
/******************************** Version Ultra64 ***************************************/
/*OPTIONS SONS pour Ultra64*/
/*#define NO_ACP_SOUND //pour ne pas avoir le son*/
#define SND_BINARY_VERSION
/*#define NO_ACP_SCRIPT*/
/*#define NO_ACP_MEMORY*/
/*#define NO_ACP_ERROR*/
/*#define NO_ACP_LDBIN*/
#define DISABLE_ADPCM
#define DISABLE_MPEG
/*#define DISABLE_MIDI*/
#define DISABLE_CD
/*#define DISABLE_WAVE*/
#define DISABLE_THEME_WAVE
#define DISABLE_BUFFER_CLIENT
/*#define DISABLE_THEME_MIDI*/
#define DISABLE_SEQUENCE
#define DISABLE_SNDSTRM
#define DISABLE_MULTIWAVFORMAT
#define SND_PROFILE
#define RUN_TIME_LOADING
#define DISABLE_RECORD
/*#define SND_DISPLAY_ERROR_MESSAGE*/
#define NB_MICRO_MAX 2
/******************************** Version Ultra64 ***************************************/
#endif
#ifdef PSX
/******************************** Version PSX ***************************************/
/*OPTIONS SONS pour PSX-Sony*/
#define SND_BINARY_VERSION
#define DISABLE_MULTIWAVFORMAT
/*#define NO_ACP_SCRIPT*/
/*#define NO_ACP_MEMORY*/
/*#define NO_ACP_ERROR*/
/*#define NO_ACP_LDBIN*/
#define DISABLE_ADPCM
#define DISABLE_MPEG
#define DISABLE_MIDI
#define DISABLE_SPLIT
#define DISABLE_CD
#define DISABLE_SEQUENCE
#define DISABLE_SNDSTRM
#define DISABLE_THEME_WAVE
#define DISABLE_BUFFER_CLIENT
#define DISABLE_WAVE
#define DISABLE_THEME_MIDI
/*add*/
#define SUPERVISATER
#define DISABLE_RECORD
/*#define SND_DISPLAY_ERROR_MESSAGE*/
#define NB_MICRO_MAX 2
/******************************** Version PSX ***************************************/
#endif
#ifdef DREAMCAST
/******************************** Version SEGA dreamcast***************************************/
/*OPTIONS SONS pour PC*/
/*#define NO_ACP_SOUND //pour ne pas avoir le son*/
#define SND_BINARY_VERSION
/*#define NO_ACP_SCRIPT*/
/*#define NO_ACP_MEMORY*/
/*#define NO_ACP_ERROR*/
/*#define NO_ACP_LDBIN*/
#define DISABLE_MPEG
#define DISABLE_MIDI
#define DISABLE_CD
#define DISABLE_WAVE
#define DISABLE_THEME
#define DISABLE_THEME_WAVE
#define DISABLE_BUFFER_CLIENT
#define DISABLE_THEME_MIDI
#define DISABLE_SEQUENCE
#define DISABLE_ADPCM
#define DISABLE_SPLIT
#define DISABLE_MULTIWAVFORMAT
/*#define SUPERVISATER*/
#define DISABLE_RECORD
#define SND_DISPLAY_ERROR_MESSAGE
#define NB_MICRO_MAX 2
/******************************** Version SEGA dreamcast***************************************/
#endif
/*mode generic*/
#ifdef GENERIC
/******************************** Version Generic***************************************/
#define SND_BINARY_VERSION
#define DISABLE_ADPCM
#define DISABLE_MPEG
#define DISABLE_SEQUENCE
#define DISABLE_CD
#define DISABLE_SNDSTRM
#define SND_DISPLAY_ERROR_MESSAGE
/******************************** Version Generic PC ***************************************/
#endif
/*par d<>faut, on se met en mode hybride*/
#if !defined(SND_SCRIPT_VERSION) && !defined(SND_HYBRID_VERSION) && !defined(SND_BINARY_VERSION)
#define SND_HYBRID_VERSION
#endif
#ifdef SND_SCRIPT_VERSION /*Mode Script pur*/
#define NO_ACP_LDBIN
#if defined(NO_ACP_SCRIPT) || defined(SND_HYBRID_VERSION) || defined (SND_BINARY_VERSION)
#error Macros not coherent
#endif
#endif
#ifdef SND_HYBRID_VERSION /*Mode Hybride*/
#if defined(NO_ACP_LDBIN) || defined(NO_ACP_SCRIPT) || defined(SND_SCRIPT_VERSION) || defined(SND_BINARY_VERSION)
#error Macros not coherent
#endif
#endif
#ifdef SND_BINARY_VERSION /*Mode Binaire pur*/
#define NO_ACP_SCRIPT
#if defined(NO_ACP_LDBIN) || defined(SND_HYBRID_VERSION) || defined(SND_SCRIPT_VERSION)
#error Macros not coherent
#endif
#endif
#if !defined(GAMECONSOLE) || defined(GENERIC)
#define FILE_MODE_C_WIN95
#if (defined(_MSC_VER) && !defined(VISUAL)) || (defined(__WATCOMC__) && !defined(WATCOM))
#pragma message("Macros definitions are not homogenious")
#endif
#endif
/*alignment directives*/
#if defined(GAMECONSOLE)
#undef M_SET_ALIGNMENT
#else
#define M_SET_ALIGNMENT 4
#endif
/*-----check coherence des Macros*/
#ifdef NO_ACP
#undef NO_ACP_SCRIPT
#define NO_ACP_SCRIPT
#undef NO_ACP_MEMORY
#define NO_ACP_MEMORY
#undef NO_ACP_ERROR
#define NO_ACP_ERROR
#endif
#ifdef NO_ACP_SOUND
#define NO_ACP_SCRIPT
#define NO_ACP_MEMORY
#define NO_ACP_ERROR
#define NO_ACP_LDBIN
#define DISABLE_MPEG
#define DISABLE_MIDI
#define DISABLE_CD
#define DISABLE_WAVE
#endif
#ifdef NO_ACP_ERROR
#undef NO_ACP_MEMORY
#define NO_ACP_MEMORY
#endif
#define SND_C_RES_FANTOME_PTR NULL
#define SND_C_RES_FANTOME_ID -1
typedef struct _SND_tdstInitStruct
{
#if !defined(GAMECONSOLE) && !defined(GENERIC)
HINSTANCE hProcessInstance;
HWND hMainWindow;
HANDLE hMutexDX;
#else
int bidon; /* le kit partner n'aime pas les structures de taille nulle*/
#endif
} SND_tdstInitStruct;
#if !defined(GAMECONSOLE) && defined(WIN32)
/*#if defined(WIN32) || defined(__WINDOWS__)*/
#define SND_CALL WINAPI
#else
#define SND_CALL
#endif
/*id d'une resource*/
typedef unsigned long tdxId;
/*callback*/
typedef void (SND_CALL *SND_td_pfn_vSoundCallback)(long par);
/*type Booleen*/
#define UNINITIALIZED_VALUE 0x12345678
#ifdef PSX
#define SndBool_field_decl(x) SndBool x:1
#define TRUE 1 /*here*/
#define FALSE 0
#define PSX_EDITOR_TRUE 1
typedef int SndBool;
#else
#define SndBool_field_decl(x) SndBool x
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
typedef int SndBool;
#endif
/*alignement mini des enums*/
#define SND_ENUM_ALIGNEMENT (long)0x13245678
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifdef PSX
#define MEMCPY(a,b,c) Memcpy((unsigned char*)a,(unsigned char*)b,c)
#endif
#ifdef PSX
#define MEMSET(a,b,c) memset((unsigned char*)a,(unsigned char)b,c)
#endif
#endif /*_SNDDEF_H_*/

View File

@@ -0,0 +1,224 @@
#ifndef _SNDERR_H_
#define _SNDERR_H_
#ifndef NO_ACP_ERROR
#define SNDERR_USE_ACP
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/*code for SND_fn_vDisplayErrorExSnd*/
#define SNDERR_DISPLAY_ALLWAYS 1
#define SNDERR_DISPLAY_ONLY_ONCE 2
#define SNDERR_DISPLAY_IF_WANTED 3
/*mode de gravit<69> des errerus*/
#define __FATAL_ERR_SND__
#define __WARNING1_ERR_SND__
#define __WARNING2_ERR_SND__
#define __WARNING3_ERR_SND__
/*----------*/
/* Constants for errors*/
/*----------*/
/* error of the Snd Module*/
typedef enum e_uwSndErrNumber_{
E_uwSndFatalErr,
#ifdef __FATAL_ERR_SND__
/* -----------------*/
E_uwSndMemoryBlockError,
E_uwSndThreadDeadLockError,
E_uwSndThreadReentranceDetectedError,
E_uwSndInitNotDoneError,
E_uwSndBadHostConfiguration,
E_uwSndFatalError4,
#endif /*__FATAL_ERR_SND__*/
E_uwSndStartOfWarning,/* important constant, it allows to recognize if an error is fatal or not.*/
#ifdef __WARNING1_ERR_SND__
/* -------------------*/
E_uwSndMemoryAllocError,
E_uwSndMemoryReAllocError,
E_uwSndCannotOpenFile,
E_uwSndErrorReadingFile,
E_uwSndINIFileNotFound,
#endif /*__WARNING1_ERR_SND__*/
#ifdef __WARNING2_ERR_SND__
/* -------------------*/
E_uwSndScriptLoadError,
E_uwSndDLLCannotFindFunction,
E_uwSndDLLCannotLoadDLL,
E_uwSndEndOfWarningLevel2,
#endif /*__WARNING2_ERR_SND__*/
#ifdef __WARNING3_ERR_SND__
/* -------------------*/
E_uwSndResourceMissing,
E_uwSndTooManyEvents,
E_uwSndInvalidTypeOfEvent,
E_uwSndTooManyVoices,
E_uwSndInvalidTypeOfResource,
E_uwSndTooManySequences,
E_uwSndTooManySamples,
E_uwSndTooManySwitchs,
E_uwSndTooManySplits,
E_uwSndInvalidDynParamForResource,
E_uwSndInvalidStaticParamForResource,
E_uwSndThreadMultiThreadDetectedError,
E_uwSndSystemError,
E_uwSndWaveCreateThread,
E_uwSndCDLoadTrack,
E_uwSndCDStatus,
E_uwSndCDSet,
E_uwSndCDPlay,
E_uwSndCDStop,
E_uwSndCDNotifyFailure,
E_uwSndCDNotifyAborted,
E_uwSndCDNotifySuperseded,
E_uwSndCDCreateThread,
E_uwSndCDClose,
E_uwSndCDFade,
E_uwSndCDSeek,
E_uwSndCDNbTracks,
E_uwSndCDRegisterWndClass,
E_uwSndMIDILoadTrack,
E_uwSndMIDIUnloadTrack,
E_uwSndMIDIStatus,
E_uwSndMIDISet,
E_uwSndMIDIPlay,
E_uwSndMIDIStop,
E_uwSndMIDINotifyFailure,
E_uwSndMIDINotifyAborted,
E_uwSndMIDINotifySuperseded,
E_uwSndMIDICreateThread,
E_uwSndMIDIOpen,
E_uwSndMIDIClose,
E_uwSndMIDIFade,
E_uwSndMIDISeek,
E_uwSndMIDINbTracks,
E_uwSndMIDIAllTracksUsed,
E_uwSndMixerNoMixer,
E_uwSndMixerNoId,
E_uwSndMixerOpen,
E_uwSndMixerCapacities,
E_uwSndMixerDesinit,
E_uwSndEventNotInABank,
E_uwSndEventUsesUnloadedBank,
E_uwSndEndOfWarningLevel3,
#endif /*__WARNING3_ERR_SND__*/
E_uwSndErrNumber
} e_uwSndErrNumber;
/*
//-----------------------------------------------------
// Gestion des erreurs
//-----------------------------------------------------
*/
#if defined(DEBUG) || !defined(NDEBUG)
#define DEBUG_SON /*maxidebug*/
#endif
void SND_fn_vUpdateLastError(unsigned long ulChannelId,
unsigned short uwErrNum,
long lDebugData,
unsigned char ucOpenInfoWindow,
unsigned char ucStopForDebug,
char* message);
#define SND_M_UpdateLastError(ulChannelId,uwErrNum,lDebugData,ucOpenInfoWindow,ucStopForDebug,message) \
SND_fn_vUpdateLastError(ulChannelId, uwErrNum, lDebugData, ucOpenInfoWindow, ucStopForDebug, message)
#ifdef SNDERR_USE_ACP
#define SND_M_ClearLastError(ulChannelId) \
Erm_M_ClearLastError(ulChannelId)
#define SND_M_CheckError(ulChannelId) \
Erm_M_uwCheckError(Snd,ulChannelId)
#else /*SNDERR_USE_ACP*/
void SND_fn_vClearLastError(unsigned long ulChannelId);
unsigned short SND_fn_vCheckError(unsigned long ulChannelId);
#define SND_M_ClearLastError(ulChannelId) \
SND_fn_vClearLastError(ulChannelId)
#define SND_M_CheckError(ulChannelId) \
SND_fn_vCheckError(ulChannelId)
#endif /*SNDERR_<52>USE_ACP*/
#undef DLL_IMPEXP
#undef CPA_EXPORT
#ifdef _DLL_COMPILATION_MODE
#define DLL_IMPEXP __declspec(dllexport)
#define CPA_EXPORT
#else
#define DLL_IMPEXP
/****************************************/
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else
#define CPA_EXPORT
#endif
/****************************************/
#endif
#if defined(_DLL_COMPILATION_MODE) && !defined(SNDDLL_MODULE)
#pragma message("-> snderr : pointeurs de fonctions definis dans SNDDLL.H")
#else
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vInitErrorSnd(SND_tdstInitStruct *pInitStruct);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vDesInitErrorSnd(void);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vDisplayError(unsigned short uwErrNum,char * message);
DLL_IMPEXP CPA_EXPORT int SND_CALL snd_erreur_init(int num_err);
/*--this part is not ACP-complient*/
DLL_IMPEXP CPA_EXPORT int SND_CALL SND_fn_iErreurInit(int idErr);
DLL_IMPEXP CPA_EXPORT void SND_CALL _snd_assert(char* test,char* file,int line);
#ifdef DEBUG_SON
#define snd_assert(fct) if (!(fct)) _snd_assert(#fct, __FILE__, __LINE__)
#else
#define snd_assert(fct)
#endif
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vDisplayErrorEx(unsigned short uwErrNum,char * message,int flags);
#endif
/*using macro SND_M_DisplayError rather than SND_fn_vDisplayError to avoid string storage in EXE*/
#ifdef SND_DISPLAY_ERROR_MESSAGE
#define SND_M_DisplayError(err_num,message) SND_fn_vDisplayError(err_num,message)
#define SND_M_DisplayErrorEx(err_num,message,flags) SND_fn_vDisplayErrorEx(err_num,message,flags)
#else
#define SND_M_DisplayError(err_num,message) SND_fn_vDisplayError(err_num,"")
#define SND_M_DisplayErrorEx(err_num,message,flags) SND_fn_vDisplayErrorEx(err_num,"",flags)
#endif /*SND_DISPLAY_ERROR_MESSAGE*/
#define SND_ERREUR_INIT_BADSNDDRIVER 30
#define SND_ERREUR_INIT_SNDDRIVERBUSY 31
#define SND_ERREUR_INIT_BADCDDRIVER 32
#define SND_ERREUR_INIT_CDDRIVERBUSY 33
/*-------------- snd assert -------------------------------------------*/
#define INIT_RETRY 2
#define INIT_IGNORE 3
#define INIT_FAILED 4
#define INIT_PLAY 5
#define INIT_PLAYASIF 6
/*SndBool snd_erreur(short num_err,char message[],short level);*/
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*du #ifdef __ERREUR_H__*/

View File

@@ -0,0 +1,138 @@
/*
//////////////////////////////////////////////////////
// SNDFILE.H - Librairie SOUNDxd version 2.0 //
//////////////////////////////////////////////////////
// D<>finitions des types et fonctions de gestion //
// des fichiers //
// Version Win95 //
//////////////////////////////////////////////////////
*/
#ifndef _SNDFILE_H_
#define _SNDFILE_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
#undef DLL_IMPEXP
#undef CPA_EXPORT
#ifdef _DLL_COMPILATION_MODE
#define DLL_IMPEXP __declspec(dllexport)
#define CPA_EXPORT
#else
#define DLL_IMPEXP
/****************************************/
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else
#define CPA_EXPORT
#endif
/****************************************/
#endif
#ifdef FILE_MODE_C_WIN95
#include <windows.h>
#endif
/*#define DATA_PATH "C:\\SoundAcp\\Data\\"*/
#ifdef FILE_MODE_C_WIN95 /*utilisation de CreateFile*/
#define OPENFILESND_READ GENERIC_READ
#define OPENFILESND_WRITE GENERIC_WRITE
#define OPENFILESND_FAILED INVALID_HANDLE_VALUE
#define SEEKFILESND_BEGIN FILE_BEGIN
#define SEEKFILESND_CURRENT FILE_CURRENT
#else
#ifdef DREAMCAST /**/
#define OPENFILESND_READ 0
#define OPENFILESND_WRITE 0
#define OPENFILESND_FAILED NULL
#define SEEKFILESND_BEGIN FILE_SEEK_SET
#define SEEKFILESND_CURRENT FILE_SEEK_CUR
#else
#ifdef FILE_MODE_C_STANDARD /*utilisation de _open*/
#define OPENFILESND_READ _O_RD|_O_BINARY
#define OPENFILESND_WRITE _O_CREAT|_O_RDWR|_O_BINARY
#define OPENFILESND_FAILED -1
#define SEEKFILESND_BEGIN FILE_BEGIN
#define SEEKFILESND_CURRENT FILE_CURRENT
#else /*mode C-ANSI*/
#define OPENFILESND_READ 1
#define OPENFILESND_WRITE 2
#define OPENFILESND_FAILED 3
#define SEEKFILESND_BEGIN 4
#define SEEKFILESND_CURRENT 5
#endif
#endif
#endif
typedef struct {
unsigned char day;
unsigned char month;
unsigned char year;
}tdstDate;
typedef struct {
unsigned char hour;
unsigned char minute;
unsigned char second;
}tdstTime;
/* prototypes */
#if defined(_DLL_COMPILATION_MODE) && !defined(SNDDLL_MODULE)
#pragma message("-> sndfile : pointeurs de fonctions definis dans SNDDLL.H")
#else
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bLoadDataInMem(void* adr,unsigned long ulNbBytes,char* czFileName,unsigned long ulOffset);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bLoadDataInMemAndSwap(void* adr,unsigned long ulNbBytes,char* czFileName,unsigned long ulOffset,SndBool bSwap);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bSetCurrentDirectory(char* czDir);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bGetCurrentDirectory(char* czDir,int iMaxChar);
DLL_IMPEXP CPA_EXPORT unsigned long SND_CALL SND_fn_dwFileSndLength(tdhSndFile hSndFile);
DLL_IMPEXP CPA_EXPORT unsigned long SND_CALL SND_fn_dwWriteFileSnd(tdhSndFile hSndFile,unsigned long dwNbBytes,void * ptr);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vAddDataDirectory(const char* czDir);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vRemoveDataDirectory(const char* cdDir);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vPurgeDataDirectory(void);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bGetOneDataDirectory(int id,char* czDir,int iMaxChar);
DLL_IMPEXP CPA_EXPORT int SND_CALL SND_fn_iGetNumberOfDataDirectory(void);
DLL_IMPEXP CPA_EXPORT int SND_CALL SND_fn_iGetIdDataDirectory(const char* szDir);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bIsDataDirectory(const char* szDir);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vResolveFileName(char* RelativeName,char* AbsoluteName);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSetSoftDirectory(char* czDir);
DLL_IMPEXP CPA_EXPORT char* SND_CALL SND_fn_szGetSoftDirectory(void);
DLL_IMPEXP CPA_EXPORT tdhSndFile SND_CALL SND_fn_hOpenFileReadSnd(char * czFileName);
DLL_IMPEXP CPA_EXPORT unsigned long SND_CALL SND_fn_dwReadFileSnd(tdhSndFile hSndFile,unsigned long dwNbBytes,void * ptr);
DLL_IMPEXP CPA_EXPORT unsigned long SND_CALL SND_fn_dwSeekFileSnd(tdhSndFile hSndFile,unsigned long dwOffset,unsigned long dwOrigin);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vCloseFileSnd(tdhSndFile hSndFile);
DLL_IMPEXP CPA_EXPORT unsigned long SND_fn_dwGetSizeFileSnd(tdhSndFile hSndFile);
DLL_IMPEXP CPA_EXPORT tdhSndFileAsync SND_CALL SND_fn_hOpenFileReadAsyncSnd(char * czFileName);
DLL_IMPEXP CPA_EXPORT unsigned long SND_CALL SND_fn_dwReadFileAsyncSnd(tdhSndFileAsync hSndFile,unsigned long dwNbBytes,unsigned long dwOffset,void * ptr);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vCloseFileAsyncSnd(tdhSndFileAsync hSndFile);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bTestLastAsyncReadSnd(tdhSndFileAsync hSndFile);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vAbortLastAsyncReadSnd(tdhSndFileAsync hSndFile);
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SNDFILE_H_*/

View File

@@ -0,0 +1,11 @@
#ifndef _SNDHANDLE_H_
#define _SNDHANDLE_H_
/*fichier inclus pour lee handles*/
/*handles*/
typedef long SND_tdxHandleToSoundInfo;
typedef struct _SND_tdstBlockEvent *SND_tdxHandleToSoundEvent;
#endif /* _SNDHANDLE_H_*/

View File

@@ -0,0 +1,116 @@
#ifndef _SND_LOAD_BINARY_H_
#define _SND_LOAD_BINARY_H_
/*
/////////////////////////////////////////////////////////////////
// SNDLDBIN.H Version 2.0 //
/////////////////////////////////////////////////////////////////
// Module de chargement des banques son binaires //
/////////////////////////////////////////////////////////////////
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/****************************************/
#undef DLL_IMPEXP
#undef CPA_EXPORT
#ifdef _DLL_COMPILATION_MODE
#define DLL_IMPEXP __declspec(dllexport)
#define CPA_EXPORT
#else
#define DLL_IMPEXP
/****************************************/
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else
#define CPA_EXPORT
#endif
/****************************************/
#endif
/****************************************/
/************************************************************/
/**** Sound Bank Management functions *********/
/************************************************************/
#if defined(_DLL_COMPILATION_MODE) && !defined(SNDDLL_MODULE)
#pragma message("-> sndldbin : pointeurs de fonctions definis dans SNDDLL.H")
#else
/*get the number of bank*/
DLL_IMPEXP CPA_EXPORT int SND_CALL SND_fn_iGetNumberOfBanks(void);
/*get the number of events in a bank*/
DLL_IMPEXP CPA_EXPORT int SND_CALL SND_fn_iGetNumberOfEventInBank(int bank);
/* Usually, user will first call SND_fn_bStartLoadBanks,*/
/* then SND_fn_bInitBank for each bank to be loaded,*/
/* ending with SND_fn_bEndLoadBanks to load banks*/
/* SND_fn_bStartLoadBanks:*/
/* This function must be called before a series of bank loadings: */
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bStartLoadBanks(void);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bStartLoadBanks2(int level);
/* SND_fn_bInitBank:*/
/* This function must be called for each bank to be loaded: */
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bInitBank(int _iBankNum);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bInitBank2(int _iBankNum,int level);
/* SND_fn_bEndLoadBanks:*/
/* This function must be called after a series of bank loadings: */
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bEndLoadBanks(void);
DLL_IMPEXP CPA_EXPORT SND_tdstBlockEvent* SND_CALL SND_fn_pGetBinEvent(unsigned long _ulBinId);
DLL_IMPEXP CPA_EXPORT tdstBlockResourceMem* SND_CALL SND_fn_pGetBinRes(unsigned long _ulBinId);
/* This function loads the data in memory and sets the parent structs:*/
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bLoadBinaryBank(int _iBankNum);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bUnLoadBinaryBank(int _iBankNum);
/* non public function*/
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vInitBankSnd(char *czPathName);
/* non public function*/
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vDesInitBankSnd(void);
DLL_IMPEXP CPA_EXPORT SndBool SND_fn_bInitDataLoadSnd(const char *_szFileTitle);
#endif
#define BANK_ALL_LEVEL -1
/* Declaration of the 2 global variables:*/
/*extern CPA_EXPORT tdstSndBankDescriptorList SND_g_dBankDescriptionList;*/
typedef struct _EvtGrpDesc
{
unsigned long ulId;
unsigned long ulNbEvents;
unsigned long ulOffset;
} EvtGrpDesc;
#ifndef NO_ACP_LDBIN
unsigned long SND_fn_ulGetEventGroupCount(void);
EvtGrpDesc *SND_fn_pstGetEventGroupData(void);
void SND_fn_vSetEventGroupData(EvtGrpDesc *_pData);
void SND_fn_vSetEventGroupCount(unsigned long _ulCount);
#endif /*NO_ACP_LDBIN*/
const char *SND_fn_pszGetSoundEventSectionNameFromPointer(SND_tdstBlockEvent* _pEvent);
unsigned long SND_fn_ulGetEventBinIdFromPointer(SND_tdstBlockEvent *_pEvent);
SND_tdxHandleToSoundEvent SND_fn_hGetSoundEventHandleFromEditorId(unsigned long _ulEvtId);
unsigned long SND_fn_ulGetEventBinIdFromSectionName(const char *szSectioName);
tdstBlockResourceMem* SND_fn_pstGetResFromEdIdSnd(unsigned long ulEdId);
#define SND_INVALID_BINID 0xFFFFFFFF
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SND_LOAD_BINARY_H_*/

View File

@@ -0,0 +1,165 @@
//this file is adapted from CPA's CPALST.HPP
// (c) Ubi Studios 1996
// See Vincent Greco for any comment or question
#ifndef __SNDLST_HPP__
#define __SNDLST_HPP__
#include "afxtempl.h"
template<class TYPE>
class SNDLST2_List : public CList<TYPE*, TYPE*>
{
public:
SNDLST2_List(){}
~SNDLST2_List(){}
// TYPE* FindElementFromPos (POSITION& rPosition) const;
TYPE* FindElementFromIndex(int nIndex) const;//nIndex is int (not tIndex) because of MFC compatibility...
//Position based Iteration
TYPE* GetAtElement (POSITION& rPosition) const;
TYPE* GetHeadElement (POSITION& rPosition) const;
TYPE* GetTailElement (POSITION& rPosition) const;
TYPE* GetNextElement (POSITION& rPosition) const;
TYPE* GetPrevElement (POSITION& rPosition) const;
BOOL AvailableElement(POSITION& rPosition) const;
//Element based Iteration
TYPE* GetHeadElement (void) const;
TYPE* GetTailElement (void) const;
TYPE* GetNextElement (TYPE* pElement) const;
TYPE* GetPrevElement (TYPE* pElement) const;
BOOL AvailableElement(TYPE* pElement) const;
};
//inline functions
template<class TYPE>
inline TYPE* SNDLST2_List<TYPE>::GetAtElement(POSITION& rPosition) const
{
return rPosition!=NULL ? GetAt(rPosition) : NULL;
}
template<class TYPE>
inline TYPE* SNDLST2_List<TYPE>::FindElementFromIndex(int nIndex) const
{
POSITION Position=FindIndex(nIndex);
return GetAtElement(Position);
}
//Position based Iteration
template<class TYPE>
inline TYPE* SNDLST2_List<TYPE>::GetHeadElement(POSITION& rPosition) const
{
rPosition = GetHeadPosition();
return GetAtElement(rPosition);
}
template<class TYPE>
inline TYPE* SNDLST2_List<TYPE>::GetTailElement(POSITION& rPosition) const
{
rPosition = GetTailPosition();
return GetAtElement(rPosition);
}
template<class TYPE>
inline TYPE* SNDLST2_List<TYPE>::GetNextElement(POSITION& rPosition) const
{
if(rPosition)
{
GetNext(rPosition);
return GetAtElement(rPosition);
}
else
return GetHeadElement(rPosition);
}
template<class TYPE>
inline TYPE* SNDLST2_List<TYPE>::GetPrevElement(POSITION& rPosition) const
{
if(rPosition)
{
GetPrev(rPosition);
return GetAtElement(rPosition);
}
else
return GetTailElement(rPosition);
}
template<class TYPE>
inline BOOL SNDLST2_List<TYPE>::AvailableElement(POSITION& rPosition) const
{
return (rPosition != NULL);
}
//Element based Iteration
template<class TYPE>
inline TYPE* SNDLST2_List<TYPE>::GetHeadElement(void) const
{
POSITION Position;
return GetHeadElement(Position);
}
template<class TYPE>
inline TYPE* SNDLST2_List<TYPE>::GetTailElement(void) const
{
POSITION Position;
return GetTailElement(Position);
}
template<class TYPE>
inline TYPE* SNDLST2_List<TYPE>::GetNextElement(TYPE* pElement) const
{
POSITION Position=NULL;
if(!pElement) return GetNextElement(Position);//return head
Position=Find(pElement);
return Position?GetNextElement(Position):NULL;//if not found return NULL
}
template<class TYPE>
inline TYPE* SNDLST2_List<TYPE>::GetPrevElement(TYPE* pElement) const
{
POSITION Position=NULL;
if(!pElement) return GetPrevElement(Position);//return tail
Position=Find(pElement);
return Position?GetPrevElement(Position):NULL;//if not found return NULL
}
template<class TYPE>
inline BOOL SNDLST2_List<TYPE>::AvailableElement(TYPE* pElement) const
{
return (pElement != NULL);
}
#define M_ForAllTheElementsInList(pElement, pListe, Position) \
for \
( \
pElement=(pListe)->GetHeadElement(Position); \
(pListe)->AvailableElement(Position); \
pElement=(pListe)->GetNextElement(Position) \
)
#endif//__CPALST_HPP__

View File

@@ -0,0 +1,230 @@
#ifndef _SND_LOAD_H_
#define _SND_LOAD_H_
/*****************************************************************/
/** **/
/** SNDLOAD.H Version 1.0 **/
/** **/
/** Public sound data load&reference functions **/
/** **/
/*****************************************************************/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/****************************************/
#undef DLL_IMPEXP
#undef CPA_EXPORT
#ifdef _DLL_COMPILATION_MODE
#define DLL_IMPEXP __declspec(dllexport)
#define CPA_EXPORT
#else
#define DLL_IMPEXP
/****************************************/
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else
#define CPA_EXPORT
#endif
/****************************************/
#endif
/****************************************/
/*************************************************************/
/** Sound Bank Management functions **/
/** ( defined in all versions ) **/
/*************************************************************/
#if defined(_DLL_COMPILATION_MODE) && !defined(SNDDLL_MODULE)
#pragma message("-> sndload : pointeurs de fonctions definis dans SNDDLL.H")
#else
/*get the number of bank*/
DLL_IMPEXP CPA_EXPORT int SND_CALL SND_fn_iGetNumberOfBanks(void);
/*get the number of events in a bank*/
DLL_IMPEXP CPA_EXPORT int SND_CALL SND_fn_iGetNumberOfEventInBank(int bank);
/* Usually, user will first call SND_fn_bStartLoadBanks,*/
/* then SND_fn_bInitBank for each bank to be loaded,*/
/* ending with SND_fn_bEndLoadBanks to load banks*/
/* SND_fn_bStartLoadBanks:*/
/* This function must be called before a series of bank loadings: */
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bStartLoadBanks(void);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bStartLoadBanks2(int level);
/* SND_fn_bInitBank:*/
/* This function must be called for each bank to be loaded: */
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bInitBank(int _iBankNum);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bInitBank2(int _iBankNum,int level);
/* SND_fn_bEndLoadBanks:*/
/* This function must be called after a series of bank loadings: */
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bEndLoadBanks(void);
DLL_IMPEXP CPA_EXPORT SND_tdstBlockEvent* SND_CALL SND_fn_pGetBinEvent(unsigned long _ulBinId);
DLL_IMPEXP CPA_EXPORT tdstBlockResourceMem* SND_CALL SND_fn_pGetBinRes(unsigned long _ulBinId);
/* This function loads the data in memory and sets the parent structs:*/
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bLoadBinaryBank(int _iBankNum);
DLL_IMPEXP CPA_EXPORT SndBool SND_CALL SND_fn_bUnLoadBinaryBank(int _iBankNum);
/* To be called once before loading any bank*/
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vInitBankSnd(char *czPathName);
/* To be called once when banks management is no more used*/
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vDesInitBankSnd(void);
/* Call once in hybrid mode after sound init is done and script paths are registered:*/
/* Does nothing in script or binary mode:*/
DLL_IMPEXP CPA_EXPORT SndBool SND_fn_bInitDataLoadSnd(const char *_szFileTitle);
#endif
#define BANK_ALL_LEVEL -1
#define SND_INVALID_BINID 0xFFFFFFFF
CPA_EXPORT SndBool SND_fn_bIsResLoaded(tdstBlockResourceMem* _pBRMem);
CPA_EXPORT SndBool SND_fn_bIsEventLoaded(SND_tdstBlockEvent* _pEvent);
/*************************************************************/
/** Hybrid version specific functions **/
/** **/
/*************************************************************/
#ifdef SND_HYBRID_VERSION
/* Conversion functions ( Pointer <-> Bin Id <-> Section name )*/
unsigned long SND_fn_ulGetEventBinIdFromSectionName(const char *szSectionName);
const char* SND_fn_szGetEventSectionNameFromBinId(unsigned long _ulBinId);
unsigned long SND_fn_ulGetEventBinIdFromPointer(SND_tdstBlockEvent *_pEvent);
const char* SND_fn_szGetEventSectionNameFromPointer(SND_tdstBlockEvent *_pEvent);
/* Event group id functions:*/
unsigned long SND_fn_ulGetEventGroupId(const char *_szFileName);
const char *SND_fn_szGetEventGroupNameFromId(unsigned long _ulId);
unsigned char SND_fn_uc_GetSoundScriptMemLevel(void);
void SND_fn_v_SetSoundScriptMemLevel(unsigned char);
BOOL SND_fn_bStartLogEventNames(const char *szFilePath,const char *szMapName);
BOOL SND_fn_bEndLogEventNames(void);
/* Map manipulation functions:*/
int SND_fn_iGetLoadedBankArray(int *paiBankListArray,int iArraySize);
void SND_fn_vLoadSoundMap(const char *_szMapName,SndBool _bSingleMap);
#endif /*SND_HYBRID_VERSION*/
/*************************************************************/
/** Script version specific functions **/
/** **/
/*************************************************************/
#ifdef SND_SCRIPT_VERSION
unsigned char SND_fn_uc_GetSoundScriptMemLevel(void);
void SND_fn_v_SetSoundScriptMemLevel(unsigned char);
/* structure loading functions:*/
SCR_tde_Anl_ReturnValue SND_fn_eLoadResDisk(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
SCR_tde_Anl_ReturnValue SND_fn_eLoadResM(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
SCR_tde_Anl_ReturnValue SND_fn_eLoadEventM(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
SCR_tde_Anl_ReturnValue SND_fn_eLoadTrackM(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
SCR_tde_Anl_ReturnValue SND_fn_eLoadRefResM(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
SCR_tde_Anl_ReturnValue SND_fn_eLoadPolyTrackM(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
SCR_tde_Anl_ReturnValue SND_fn_eLoadPolyRefResM(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
SCR_tde_Anl_ReturnValue SND_fn_eLoadSwitchListM(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
SCR_tde_Anl_ReturnValue SND_fn_eLoadSwitchListElementM(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
/* structure allocation functions:*/
/* resource:*/
extern CPA_EXPORT tdstBlockResourceMem* SND_fn_pCreateResM(void);
extern CPA_EXPORT void SND_fn_vCopyResM(tdstBlockResourceMem*_pDest,tdstBlockResourceMem* _pSrc);
extern CPA_EXPORT void SND_fn_vDestroyResM(tdstBlockResourceMem* _pObj);
extern CPA_EXPORT tdstSndPolyResource* SND_fn_pCreatePolyResM(void);
extern CPA_EXPORT void SND_fn_vCopyPolyResM(tdstSndPolyResource*_pDest,tdstSndPolyResource* _pSrc);
extern CPA_EXPORT void SND_fn_vDestroyPolyResM(tdstSndPolyResource* _pObj);
/* event:*/
extern CPA_EXPORT SND_tdstBlockEvent* SND_fn_pCreateEventM(void);
extern CPA_EXPORT void SND_fn_vCopyEventM(SND_tdstBlockEvent*_pDest,SND_tdstBlockEvent* _pSrc);
extern CPA_EXPORT void SND_fn_vDestroyEventM(SND_tdstBlockEvent* _pObj);
extern CPA_EXPORT tdstSndPolyEvent* SND_fn_pCreatePolyEventM(void);
extern CPA_EXPORT void SND_fn_vCopyPolyEventM(tdstSndPolyEvent*_pDest,tdstSndPolyEvent* _pSrc);
extern CPA_EXPORT void SND_fn_vDestroyPolyEventM(tdstSndPolyEvent* _pObj);
/* track:*/
extern CPA_EXPORT tdstInfoTrackMem* SND_fn_pCreateTrackM(void);
extern CPA_EXPORT void SND_fn_vCopyTrackM(tdstInfoTrackMem*_pDest,tdstInfoTrackMem* _pSrc);
extern CPA_EXPORT void SND_fn_vDestroyTrackM(tdstInfoTrackMem* _pObj);
extern CPA_EXPORT tdstInfoTrackList* SND_fn_pCreatePolyTrackM(void);
extern CPA_EXPORT void SND_fn_vCopyPolyTrackM(tdstInfoTrackList*_pDest,tdstInfoTrackList* _pSrc);
extern CPA_EXPORT void SND_fn_vDestroyPolyTrackM(tdstInfoTrackList* _pObj);
/*switch*/
extern CPA_EXPORT tdstSwitchElement* SND_fn_pCreateSwitchElementM(void);
extern CPA_EXPORT void SND_fn_vCopySwitchElementM(tdstSwitchElement*_pDest,tdstSwitchElement* _pSrc);
extern CPA_EXPORT void SND_fn_vDestroySwitchElementM(tdstSwitchElement* _pObj);
extern CPA_EXPORT tdstTypeSwitchMem* SND_fn_pCreateSwitchListM(void);
extern CPA_EXPORT void SND_fn_vCopySwitchListM(tdstTypeSwitchMem*_pDest,tdstTypeSwitchMem* _pSrc);
extern CPA_EXPORT void SND_fn_vDestroySwitchListM(tdstTypeSwitchMem* _pObj);
/*random*/
extern CPA_EXPORT tdstRandomElement* SND_fn_pCreateRandomElementM(void);
extern CPA_EXPORT void SND_fn_vCopyRandomElementM(tdstRandomElement*_pDest,tdstRandomElement* _pSrc);
extern CPA_EXPORT void SND_fn_vDestroyRandomElementM(tdstRandomElement* _pObj);
extern CPA_EXPORT tdstTypeRandomMem* SND_fn_pCreateRandomListM(void);
extern CPA_EXPORT void SND_fn_vCopyRandomListM(tdstTypeRandomMem*_pDest,tdstTypeRandomMem* _pSrc);
extern CPA_EXPORT void SND_fn_vDestroyRandomListM(tdstTypeRandomMem* _pObj);
/*split*/
extern CPA_EXPORT tdstRangeSplitListMem* SND_fn_pCreatePolyRangeM(void);
extern CPA_EXPORT void SND_fn_vCopyPolyRangeM(tdstRangeSplitListMem*_pDest,tdstRangeSplitListMem* _pSrc);
extern CPA_EXPORT void SND_fn_vDestroyPolyRangeM(tdstRangeSplitListMem* _pObj);
extern CPA_EXPORT tdstRangeSplitMem* SND_fn_pCreateRangeM(void);
extern CPA_EXPORT void SND_fn_vCopyRangeM(tdstRangeSplitMem*_pDest,tdstRangeSplitMem* _pSrc);
extern CPA_EXPORT void SND_fn_vDestroyRangeM(tdstRangeSplitMem* _pObj);
extern CPA_EXPORT tdstThemeBridge* SND_fn_pCreateThemeBridge(void);
extern CPA_EXPORT void SND_fn_vCopyThemeBridge(tdstThemeBridge*_pDest,tdstThemeBridge* _pSrc);
extern CPA_EXPORT void SND_fn_vDestroyThemeBridge(tdstThemeBridge* _pObj);
extern CPA_EXPORT tdstThemePart* SND_fn_pCreateThemePart(void);
extern CPA_EXPORT void SND_fn_vCopyThemePart(tdstThemePart*_pDest,tdstThemePart* _pSrc);
extern CPA_EXPORT void SND_fn_vDestroyThemePart(tdstThemePart* _pObj);
extern CPA_EXPORT tdstThemePartOutro* SND_fn_pCreateThemePartOutro(void);
extern CPA_EXPORT void SND_fn_vCopyThemePartOutro(tdstThemePartOutro*_pDest,tdstThemePartOutro* _pSrc);
extern CPA_EXPORT void SND_fn_vDestroyThemePartOutro(tdstThemePartOutro* _pObj);
extern CPA_EXPORT tdstTypeThemeMem* SND_fn_pCreateTheme(void);
extern CPA_EXPORT void SND_fn_vCopyTheme(tdstTypeThemeMem*_pDest,tdstTypeThemeMem* _pSrc);
extern CPA_EXPORT void SND_fn_vDestroyTheme(tdstTypeThemeMem* _pObj);
#endif /*SND_SCRIPT_VERSION*/
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SND_LOAD_H_*/

View File

@@ -0,0 +1,89 @@
#ifndef _SNDMEM_H_
#define _SNDMEM_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/*
//////////////////////////////////////////////////////////////
// SNDMEM.H //
//////////////////////////////////////////////////////////////
// Module de gestion de la m<>moire //
//////////////////////////////////////////////////////////////
*/
#undef DLL_IMPEXP
#undef CPA_EXPORT
#ifdef _DLL_COMPILATION_MODE
#define DLL_IMPEXP __declspec(dllexport)
#define CPA_EXPORT
#else
#define DLL_IMPEXP
/****************************************/
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else
#define CPA_EXPORT
#endif
/****************************************/
#endif
typedef enum e_ucSndStaticBlocks_{
E_ucSndBlockMain,
E_ucSndBlockMap,
#ifdef U64
E_ucSnd64BlockMain,
#endif
E_ucSndMaxBlocksNb /* maximum number of static block, You have to follow this syntax 'E_uc+ Abbreviation Module +MaxBlocksNb'*/
} e_ucSndStaticBlocks;
#if defined(_DLL_COMPILATION_MODE) && !defined(SNDDLL_MODULE)
#pragma message("-> sndmem : pointeurs de fonctions definis dans SNDDLL.H")
#else
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vInitMallocSnd(void);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vDesInitMallocSnd(void);
DLL_IMPEXP CPA_EXPORT void* SND_CALL SND_fn_pvMallocSnd(unsigned long nb_octets);
DLL_IMPEXP CPA_EXPORT void* SND_CALL SND_fn_pvReAllocSnd(void* ptr,unsigned long nb_octets);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vFreeSnd(void* ptr);
DLL_IMPEXP CPA_EXPORT void* SND_CALL SND_fn_pvMallocSndEx(unsigned char id,unsigned long nb_octets);
DLL_IMPEXP CPA_EXPORT void* SND_CALL SND_fn_pvReAllocSndEx(unsigned char id,void* ptr,unsigned long nb_octets);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vFreeSndEx(unsigned char id,void* ptr);
#if defined(PSX) && !defined(WIN32)
DLL_IMPEXP CPA_EXPORT asm void *Memcpy(unsigned char *dest, unsigned char *src,int n);
#endif
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vResizeMemoryBlockSnd(unsigned char id,unsigned long size);
CPA_EXPORT void SND_PrintUsedStaticMemory(void);
#ifdef MEMORY_ACCES_MANAGEMENT_MODE
#define MEMORY_ACCES_MANAGEMENT_FLAG 0x80
#define MEMORY_ACCES_MANAGEMENT_BLOCK(i) (0x80+(i<<4))
#define SND_fn_vLockMemoryWriteSnd(a) SND_fn_vLockMemoryWriteSnd_(a)
#define SND_fn_vLockMemoryReadSnd(a) SND_fn_vLockMemoryReadSnd_(a)
#define SND_fn_vUnLockMemoryWriteSnd(a) SND_fn_vUnLockMemoryWriteSnd_(a)
#define SND_fn_vUnLockMemoryReadSnd(a) SND_fn_vUnLockMemoryReadSnd_(a)
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vLockMemoryWriteSnd_(void* ptr);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vLockMemoryReadSnd_(void* ptr);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vUnLockMemoryWriteSnd_(void* ptr);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vUnLockMemoryReadSnd_(void* ptr);
#else
#define MEMORY_ACCES_MANAGEMENT_FLAG 0
#define MEMORY_ACCES_MANAGEMENT_BLOCK(i) 0
#define SND_fn_vLockMemoryWriteSnd(a)
#define SND_fn_vLockMemoryReadSnd(a)
#define SND_fn_vUnLockMemoryWriteSnd(a)
#define SND_fn_vUnLockMemoryReadSnd(a)
#endif /*MEMORY_ACCES_MANAGEMENT_MODE*/
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SNDMEM_H_*/

View File

@@ -0,0 +1,72 @@
#ifndef _SNDREAL_H_
#define _SNDREAL_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/*
//////////////////////////////////////////////////////
// SNDREAL.H - Librairie SOUNDxd version 2.0 //
//////////////////////////////////////////////////////
// D<>finitions des types et fonctions de gestion //
// des pseudo-r<>els //
//////////////////////////////////////////////////////
*/
#undef DLL_IMPEXP
#undef CPA_EXPORT
#ifdef _DLL_COMPILATION_MODE
#define DLL_IMPEXP __declspec(dllexport)
#define CPA_EXPORT
#else
#define DLL_IMPEXP
/****************************************/
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else
#define CPA_EXPORT
#endif
/****************************************/
#endif
/**************************************************************************************/
#define M_MulIntRealSnd(i,r) ((i)*(r))
#define M_RealToDoubleSnd(r) (((double)r)/(0x10000))
#define M_DoubleToRealSnd(d) ((SndReal)((d)*0x10000))
#define M_DivIntIntRealSnd(a,b) ((SndReal)(((a)<<16)/(b)))
#define M_RealToIntSnd(r) ((r)>>16)
#define M_IntToRealSnd(r) ((r)<<16)
#define M_Fixed1616ToRealSnd(r) (r)
#define M_HighestIntAbsValueRealSnd (0x7FFF) /*plus grand entier convertible en SndReal*/
#define M_LowestDoubleAbsValueRealSnd (0.0000153) /*plus petit r<>el convertible en SndReal*/
#if defined(_DLL_COMPILATION_MODE) && !defined(SNDDLL_MODULE)
#pragma message("-> sndreal : pointeurs de fonctions definis dans SNDDLL.H")
#else
#if defined(PSX) && !defined(WIN32)
DLL_IMPEXP CPA_EXPORT asm SndReal SND_CALL SND_fn_rMulRealRealSnd(SndReal r1,SndReal r2);
DLL_IMPEXP CPA_EXPORT asm SndReal SND_CALL SND_fn_rMulRealRealQuickSnd(SndReal r1,SndReal r2);
DLL_IMPEXP CPA_EXPORT asm SndReal SND_CALL SND_fn_rAbsRealSnd(SndReal r);
DLL_IMPEXP CPA_EXPORT asm SndReal SND_CALL SND_fn_rDivRealRealSnd(SndReal r1,SndReal r2);
#else
DLL_IMPEXP CPA_EXPORT SndReal SND_CALL SND_fn_rDivRealRealSnd(SndReal r1,SndReal r2);
DLL_IMPEXP CPA_EXPORT SndReal SND_CALL SND_fn_rMulRealRealSnd(SndReal r1,SndReal r2);
DLL_IMPEXP CPA_EXPORT SndReal SND_CALL SND_fn_rMulRealRealQuickSnd(SndReal r1,SndReal r2);
DLL_IMPEXP CPA_EXPORT SndReal SND_CALL SND_fn_rAbsRealSnd(SndReal r);
#endif
DLL_IMPEXP CPA_EXPORT SndReal SND_CALL SND_fn_rSqrtRealSnd(SndReal r);
DLL_IMPEXP CPA_EXPORT SndReal SND_CALL SND_fn_rPseudoNormeRealSnd(SndReal r1,SndReal r2,SndReal r3);
DLL_IMPEXP CPA_EXPORT void SND_CALL SND_fn_vSndRealTwinToSndReal(SndRealTwin,SndReal*,SndReal*);
DLL_IMPEXP CPA_EXPORT SndRealTwin SND_CALL SND_fn_rtSndRealToSndRealTwin(SndReal,SndReal);
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /*_SNDREAL_H_*/

View File

@@ -0,0 +1,14 @@
/* SNDSCRIPT.H: public sound script functions declarations*/
#ifndef _SND_SCRIPT_H_
#define _SND_SCRIPT_H_
CPA_EXPORT void SND_fn_vUnRegisterEvent(char *_szCompleteSectionName);
CPA_EXPORT void SND_fn_vUnRegisterEventByPtr(SND_tdstBlockEvent *_pEvent);
CPA_EXPORT void SND_fn_vUnRegisterAllEvents(void);
CPA_EXPORT void SND_fn_vCollectReleasedEvents(void);
CPA_EXPORT SCR_tdst_Link_Table* SND_fn_pGetSoundEventLinkTable(void);
#endif /*_SND_SCRIPT_H_*/

View File

@@ -0,0 +1,425 @@
#ifndef _SNDTYPE_H_
#define _SNDTYPE_H_
#if (defined(__cplusplus)&& !defined(CPA_ForceCplusplus))
extern "C" {
#endif /* __cplusplus*/
/*
//////////////////////////////////////////////////////
// SNDTYPE.H - Librairie SOUNDxd version 2.0 //
//////////////////////////////////////////////////////
// Definitions des types et constantes utilisees //
// par tous les modules de SOUNDxD et strictement //
// portables (noms et membres communs) //
//////////////////////////////////////////////////////
*/
#include "SND/snddef.h"
/*#include "cpa_std.h"*/
/*#include "sndhard.h"*/
#ifdef M_SET_ALIGNMENT
#pragma pack(push)
#pragma pack(M_SET_ALIGNMENT)
#endif
/*handles partages avec les autres moduless*/
#include "SND\sndhandl.h"
/*--------------------type PseudoReel-------------------*/
typedef long SndReal;
#define C_SNDREAL_1 0x10000
#define C_SNDREAL_0 0x00000
/*melting of 2 SndReal onto one 32-bits long*/
typedef long SndRealTwin;/*r1r1r2r2 nota:1.0/128<abs(r1)<128.0*/
/*extract 2 SndReal (poiter value passed) from 1 SndRealTwin (value passed)*/
#define M_SndRealTwinToSndReal(rtwin,pr1,pr2) *(pr1)=(((rtwin)>>16)<<8);*(pr2)=(((rtwin)<<16)>>8);
/*generate a SndRealTwin (return) from 2 SndReal passed*/
#define M_SndRealToSndRealTwin(r1,r2) ((SndRealTwin)(((r1)<<8)&xFFFF0000)&(((r2>>8)&0xFFFF)))
/***************** EVENTs **************************************/
/*declarations des types communs*/
typedef struct _SND_tdstBlockEvent SND_tdstBlockEvent;
typedef struct _SndVector SndVector;
typedef struct _MicroLink MicroLink;
typedef struct _SoundParam SoundParam;
typedef struct _ExtraSoundParam ExtraSoundParam;
typedef struct _RollOffParam RollOffParam;
typedef struct _SwitchParam SwitchParam;
typedef struct _SampleParam SampleParam;
typedef struct _MicroParam MicroParam;
typedef union _SND_tduRefEvt SND_tduRefEvt;
typedef struct _tdstSndPolyEvent tdstSndPolyEvent;
typedef struct _tdstAllRetObjectSound tdstAllRetObjectSound;
typedef struct _tdstAllRetMicroSound tdstAllRetMicroSound;
typedef struct _tdstAllRetChannelSound tdstAllRetChannelSound;
typedef union _tduRefRes tduRefRes;
/*structures definies ulterieuremenr*/
typedef struct _tdstBlockResourceDisk tdstBlockResourceDisk;
typedef struct _tdstBlockResourceMem tdstBlockResourceMem;
typedef struct _tdstSndPolyResource tdstSndPolyResource;
typedef struct _tdstInfoTrackDisk tdstInfoTrackDisk;
typedef struct _tdstInfoTrackMem tdstInfoTrackMem;
typedef struct _tdstTypeSampleDisk tdstTypeSampleDisk;
typedef struct _tdstSampleMemory tdstSampleMemory;
typedef struct _tdstSampleStreaming tdstSampleStreaming;
typedef union _tduDataSample tduDataSample;
typedef struct _tdstTypeSampleMem tdstTypeSampleMem;
typedef struct _tdstTypeMidiDisk tdstTypeMidiDisk;
typedef struct _tdstMidiMemory tdstMidiMemory;
typedef struct _tdstMidiStreaming tdstMidiStreaming;
typedef union _tduDataMidi tduDataMidi;
typedef struct _tdstTypeMidiMem tdstTypeMidiMem;
typedef struct _tdstTypeCD tdstTypeCD;
typedef struct _tdstTypeSequenceDisk tdstTypeSequenceDisk;
typedef struct _tdstTypeSequenceMem tdstTypeSequenceMem;
typedef union _tduResDisk tduResDisk;
typedef union _tduResMem tduResMem;
typedef struct _tdstTypeSwitchDisk tdstTypeSwitchDisk;
typedef struct _tdstTypeSwitchMem tdstTypeSwitchMem;
typedef struct _tdstRefResList tdstRefResList;
typedef struct _tdstRefRes tdstRefRes;
typedef struct _tdstTypeSplitDisk tdstTypeSplitDisk;
typedef struct _tdstTypeSplitMem tdstTypeSplitMem;
typedef struct _tdstRangeSplitDisk tdstRangeSplitDisk;
typedef struct _tdstRangeSplitListDisk tdstRangeSplitListDisk;
typedef struct _tdstRangeSplitMem tdstRangeSplitMem;
typedef struct _tdstRangeSplitListMem tdstRangeSplitListMem;
typedef struct _tdstSwitchElement tdstSwitchElement;
typedef struct _tdstSwitchList tdstSwitchList;
typedef union _tduBlockResource tduBlockResource;
typedef struct _tdstThemeBridge tdstThemeBridge;
typedef struct _tdstThemePart tdstThemePart;
typedef struct _tdstThemePartOutro tdstThemePartOutro;
typedef struct _tdstTypeThemeDisk tdstTypeThemeDisk;
typedef struct _tdstTypeThemeMem tdstTypeThemeMem;
typedef struct _tdstRandomElement tdstRandomElement;
typedef struct _tdstTypeRandomDisk tdstTypeRandomDisk;
typedef struct _tdstTypeRandomMem tdstTypeRandomMem;
/*typedef struct _tdstRefRes tdstRefRes;*/
/*typedef struct _tdstRefResList tdstRefResList;*/
typedef struct _tdstInfoTrackList tdstInfoTrackList;
/*banques binaires*/
typedef struct tdstSndBankDescriptorList_ tdstSndBankDescriptorList;
typedef struct _tdstSndBankDescriptor tdstSndBankDescriptor;
typedef struct _tdstSndBankHeader tdstSndBankHeader;
typedef struct _tdstSndBankHead tdstSndBankHead;
#ifdef FILE_MODE_C_WIN95
typedef HANDLE tdhSndFile;
#else
#ifdef DREAMCAST
typedef FMN_tdstFile* tdhSndFile;
#else
#ifdef FILE_MODE_C_STANDARD
typedef int tdhSndFile;
#else
typedef long tdhSndFile;
#endif
#endif
#endif
typedef long tdhSndFileAsync;
/*designation d'un evt*/
union _SND_tduRefEvt{
tdxId Id;
SND_tdstBlockEvent *pstPtr;
} ;
/*designation d'une ressource*/
union _tduRefRes {
tdxId Id;
tdstBlockResourceMem *pstPtr;
} ;
/*description d'un vecteur spatial*/
struct _SndVector {
SndReal x ;
SndReal y ;
SndReal z ;
};
/*parametres d'un son 2D*/
struct _SampleParam{
SndReal Freq; /*frequence relative du sample <20> jouer */
unsigned char ucVol; /*volume du sample (0 inaudible <20> 127 maxi)*/
unsigned char ucPan; /*panoramique (0 gauche <20> 127 droite)*/
unsigned char ucSpace; /*parametre de spatialisation (codage DOLBY= 0 tout <20> l<>avant, 127 tout <20> l<>arriere)*/
unsigned char ucReverb; /*parametre de la reverberation (tunnels...)*/
} ;
extern SampleParam C_SAMPLEPARAM_MUET;
extern SampleParam C_SAMPLEPARAM_NEUTRE;
/*parametres d'un son 3D*/
struct _MicroLink{
long lId;
SndBool bLinked;
};
/*-------------SoundParam transcendentale structure (varaible geometry to allow compatibility)*/
/* &SoundParamTranscendentale+0: ->SoundParam (without astMicro)*/
/* &SoundParamTranscendentale+sizeof(SoundParam)-sizeof(astMicro[NB_LINK])*/
/* ->n * astMicro (one for each micro)*/
/* &SoundParamTranscendentale+SoundParam->iNbLinks*sizeof(astMicro)*/
/* ->ExtraSoundParam (if SoundParam->iFlags & C_SOUNDPARAM_ROLLOFF)*/
/* This system must be keeped for compatibility between previous DLL and new LIB (version 5.7.0)*/
#ifdef NB_MICRO_MAX
#define NB_LINK NB_MICRO_MAX /*SoundParam will be a sized struct big enough to always describe NB_MICRO_MAX microphones*/
#else
#define NB_LINK 8 /*SoundParam will be a UNsized struct; declaration use a size struct for compatibility; NEVER use a static instance of SoundParam*/
#endif
/*flags du champs SoundParam->iFlags*/
#define C_SOUNDPARAM_NO_POSITION 1 /*si TRUE, SoundParam->Pos et Vit ne sont pas <20> exploiter*/
#define C_SOUNDPARAM_NO_DOPPLER 2 /*si TRUE, SoundParam->Vit n'est pas <20> exploiter*/
#define C_SOUNDPARAM_COEF_VOL 4 /*si TRUE, SondParam->ucVol doit etre exploite*/
#define C_SOUNDPARAM_COEF_FREQ 8 /*obsolete*/
#define C_SOUNDPARAM_ROLLOFF 16 /*when TRUE, RollOff parameters are given*/
#define C_SOUNDPARAM_SWITCH 32 /*when TRUE, lSwitchIndice is given*/
struct _RollOffParam {
SndReal rDistSatur; /*distance de saturation=pour d<rDistSatur, vol=MAXI*/
SndReal rDistBackGround; /*distance du bruit de fond=pour d>rDistBackGround, VOL=cte*/
};
struct _SwitchParam {
long lObjectType;
long lObjectId;
};
struct _ExtraSoundParam {
RollOffParam stRollOff; /*must always be the first extra data in SoundParam*/
SwitchParam stSwitch; /*indice of active switch element (if any)*/
};
struct _SoundParam{
SndReal Freq; /*frequence relative du sample <20> jouer */
unsigned char ucVol; /*volume du sample (0 inaudible <20> 127 maxi)*/
unsigned char ucPan; /*panoramique (0 gauche <20> 127 droite)*/
unsigned char ucSpace; /*parametre de spatialisation (codage DOLBY= 0 tout <20> l<>avant, 127 tout <20> l<>arriere)*/
unsigned char ucReverb; /*parametre de la reverberation (tunnels...)*/
SndVector Pos; /*position de la source associee*/
SndVector Vit; /*vitesse de la source associee*/
int iFlags ; /*flags justifiant les champs (cf plus loin)*/
int iNbLinks; /*nombre d'element du champ suivant*/
MicroLink astMicro[NB_LINK]; /*liste statique des liens micros<->objet*/
ExtraSoundParam xExtra; /*!!!!! this field should be never refered; it's only used to pre-size the struct SoundParam*/
} ;
#define C_ROLLOFFPARAM_INFINITE 0x7FFFFFFF
#define C_ROLLOFFPARAM_DEFAULT 0x7FFFFFFE
/*get the offst of effective ExtraSoundParam filed from SoundParam*; BE CAREFUL: effective ExtraSoundParam is NOT the extra field, but depend on iNbLinks*/
#define SND_M_GetExtraParamFromSoundParam(pstSoundParam) (ExtraSoundParam*)((char*)pstSoundParam+sizeof(SoundParam)-sizeof(ExtraSoundParam)+(pstSoundParam->iNbLinks-NB_LINK)*sizeof(MicroLink))
#define SND_M_lGetSizeOfSoundParamFromNbLink(nb) (sizeof(SoundParam)+(nb-NB_LINK)*sizeof(MicroLink))
#define SND_M_lGetSizeOfSoundParam( _pObj) (SND_M_lGetSizeOfSoundParamFromNbLink(_pObj->iNbLinks))
/*parametres d'un micro*/
struct _MicroParam{
SndVector pos;
SndVector vit;
SndVector dirnor;
SndVector dirtan;
} ;
/*proptotype d'une fonction RetObjectSound..*/
typedef SndReal (*td_pfn_rRetSoundCoord)(long obj);
typedef unsigned char (*td_pfn_ucRetSoundMidi)(long obj);
typedef void (*td_pfn_vRetSoundExtraCoef)(long obj,SND_tduRefEvt evt,SndReal* pitch,SndReal* pan,SndReal* vol);
typedef long (*td_pfn_lRetSoundLong)(long obj);
typedef SND_tdxHandleToSoundInfo (*td_pfn_lRetSoundSwitch)(long obj,long type_switch);
typedef SndBool (*td_pfn_bRetSoundLink)(long obj,long micro);
typedef void (*td_pfn_vCopyString)(long obj,char* str,long size_str);
typedef SndBool (*td_pfn_bRetRollOffFactor)(long obj,RollOffParam* rolloff);/*distance absolue en m.*/
typedef void (*td_pfn_vRetSoundVector)(long obj,SndVector* vect);
/*proptotype for RetChannelSound..*/
typedef SndReal (*td_pfn_rRetChannelCoord)(long obj, long channel);
typedef SndBool (*td_pfn_bRetChannelActive)(long obj, long channel);
typedef SndBool (*td_pfn_bRetChannelAbsCoord)(long obj, long channel);
/*fonctions liees <20> un type d'objet*/
struct _tdstAllRetObjectSound{
td_pfn_rRetSoundCoord X,Y,Z,VX,VY,VZ;
td_pfn_ucRetSoundMidi REVERB;
td_pfn_vRetSoundExtraCoef ExtraCoef;
td_pfn_lRetSoundSwitch Switch;
td_pfn_bRetSoundLink MicroLink;
//plalancette - added 31/05/99
td_pfn_vRetSoundVector VectorI;
td_pfn_vRetSoundVector VectorJ;
td_pfn_vRetSoundVector VectorK;
};
/* functions related to channels*/
struct _tdstAllRetChannelSound{
td_pfn_rRetChannelCoord X,Y,Z,VX,VY,VZ;
td_pfn_bRetChannelActive Active;
SndBool bAbsCoord;
};
/*fonctions liees aux parametres d'un micro*/
struct _tdstAllRetMicroSound{
td_pfn_rRetSoundCoord X,Y,Z,VX,VY,VZ;
td_pfn_rRetSoundCoord DNX,DNY,DNZ,DTX,DTY,DTZ;
td_pfn_lRetSoundLong Filtre;
};
/*constantes particulieres pour vo,pan,space et reverb*/
#define C_SOUNDPAN_MEDIAN 64
#define C_SOUNDPAN_LEFT 0
#define C_SOUNDPAN_RIGHT 127
#define C_SOUNDVOL_MINI 0
#define C_SOUNDVOL_MAXI 127
#define C_SOUNDSPACE_FRONT 0
#define C_SOUNDSPACE_BACK 127
#define NO_REVERB 0
/*obtenir les volumes des voies physiques <20> partir des params Midi*/
#define M_VolLeft(vol,pan) (((int)(vol)*(pan))>>7)
#define M_VolRight(vol,pan) (((int)(vol)*(127-(pan)))>>7)
#define M_VolFront(vol,space) (((int)(vol)*(127-(space)))>>7)
#define M_VolBack(vol,space) (((int)(vol)*(space))>>7)
/*obtenir les params midi <20> partir des volumes physiques*/
#define M_GetVol(voll,volr,volb) ((int)(voll)+(volr)+(volb))
#define M_GetPan(voll,volr,volb) (((voll)==0) ? 0 : ((int)127*(voll)/((voll)+(volr))))
#define M_GetSpace(voll,volr,volb) ((((voll)+(volr))==0) ? 127 : ((int)127*(volb)/((voll)+(volr))))
#define C_CREATEMICRO_FAILED -1
#define C_PLAY_FAILED -1
#define C_GETVOLUME_FAILED 255
#define C_INIT_FAILED 2
#define C_INIT_OK 3
#define C_INIT_RUNNING 4
#define C_INIT_UNCOMPLETED 5
#define LOW_LATENCY 0x1000
extern SND_tduRefEvt SND_EVT_FANTOME;
/*
//liste des evts
struct _tdstSndPolyEvent {
// M_LstParentDeclaration(SND_tdstBlockEvent);
LST2_M_StaticParentDeclaration(SND_tdstBlockEvent*)
};
//liste de references <20> des events
struct _tdstSndPolyRefEvt{
// M_LstParentDeclaration(SND_tduRefEvt);
LST2_M_StaticParentDeclaration(SND_tduRefEvt*)
};
//liste de references <20> des ressources
struct _tdstSndPolyRefRes{
// M_LstParentDeclaration(tduRefRes);
LST2_M_StaticParentDeclaration(tduRefRes*)
};
*/
/*----------------------- buffers clients*/
typedef enum{
SAMPLE_INVALID,
SAMPLE_PCM,
SAMPLE_MPEG,
SAMPLE_AIFF,
SAMPLE_ADPCM,
SAMPLE_ADPCM_TO_CONVERT,
SAMPLE_FOR_ALIGNEMENT=SND_ENUM_ALIGNEMENT
} tdeTypeZip;
typedef struct _tdstFormatPCM {
unsigned long ulNbSamples; /*nb sample (0 si pas de choix)*/
unsigned short uwResolution; /*8 ou 16 bits*/
unsigned short uwNbChannels; /*1=mono 2=stereo*/
unsigned long ulFreq; /*freq de restitution*/
} tdstFormatPCM;
typedef struct _tdstFormatPCM tdstFormatMPEG; /*pas de format MPEG specifique pour l'instant*/
typedef struct _tdstFormatPCM tdstFormatADPCM; /*pas de format ADPCM specifique pour l'instant*/
typedef struct _SND_tdstFormat {
tdeTypeZip eZip;
union {
tdstFormatPCM stPCM;
tdstFormatMPEG stMPEG;
tdstFormatADPCM stADPCM;
} uFormat;
} SND_tdstFormat;
typedef struct _SND_tdstStackBuffer {
unsigned long ulNbSamples;
void *ptrData;
} SND_tdstStackBuffer;
typedef void (SND_CALL *td_pfn_vBufferClientPoped)(long user_id,long poped_id);
typedef void (SND_CALL *td_pfn_vRefreshBufferClient)(long user_id,unsigned long first,unsigned long nb,void* ptr_first_sample);
/*id_buffer=id/voie du biffer client concerne*/
/*first=id du 1<> sample <20> rafraichir (pas en octets)*/
/*nb=nb de samples <20> calculer */
/*ptr_first_sample=adresse cible*/
/*parametre pour le type de CallbackClient*/
typedef enum _SND_tdstTypeCallback {
BUFFER_ASYNCHRONE, /*buffer bouclant rafraichis asynchroniquement (ancien bufferclient)*/
BUFFER_SYNCHRONE, /*rafraichissement d'un tampon en "juste <20> temps"*/
BUFFER_STACK, /*empillage par le client de buffers <20> enchainer*/
ALIGN_FOR_BUFFER_CLIENT=0x12345678
} SND_tduTypeCallback;
typedef struct _SND_tdstCallback {
SND_tduTypeCallback eType;/*type de rafraichissement*/
union {/*pointeur sur la fonction client pour callback*/
td_pfn_vRefreshBufferClient CallbackASynchrone; /*fonction de callback asynchrone*/
td_pfn_vRefreshBufferClient CallbackSynchrone; /*fonction de callback en "juste <20> temps"*/
td_pfn_vBufferClientPoped CallbackStack; /*fonction indiquant qu'un buffer pushed <20> ete joue (peut etre libere)*/
} uCallback;
union {/*indication retournee au client pour la gestion de son bufferclient*/
SndReal rCallbackPeriod; /*periode indicative de la callback (pas de calcul plus long SVP)*/
long lNbSampleToPush; /*nb de sample devant etre pushes en permanence*/
} uInfo;
} SND_tdstCallback;
/*pour SNDVIRT*/
/*!!!ATTENTION: ne jamais passer une macro LST2_M_ en parametre <20> une autre macro LST2_M_*/
typedef struct _virtual_module *SND_tdhVirtualModule;
/*Callback pour obtenir le nom d'une ressource*/
typedef const char * (*tdpfnResNameCallback)(unsigned long);
#ifdef M_SET_ALIGNMENT
#pragma pack(pop)
#endif
#if (defined(__cplusplus)&& !defined(CPA_ForceCplusplus))
}
#endif /* __cplusplus*/
#endif /*_SNDTYPE_H_*/

View File

@@ -0,0 +1,198 @@
#ifndef _SOUND3D_H_
#define _SOUND3D_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus*/
/*
//////////////////////////////////////////////////////////////
// SOUND3D.H Version 2.0 //
//////////////////////////////////////////////////////////////
// Module d'exploitation haut-niveau du son //
// Fichier 100% portable en C-ANSI //
// Fonctions publiques: //
//////////////////////////////////////////////////////////////
*/
#include "SND/sndtype.h"
/*#include "sndreal.h"*/
/* OPTIONS PERMETTANT DE CREER DES DLL ( A TERME, ELLE SERONT PEUT-ETRE AILLEURS):*/
/****************************************/
#undef CPA_EXPORT
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else
#define CPA_EXPORT
#endif
/****************************************/
/* fonctions publiques definies par SOUND3D.C */
/*sound event/object management*/
extern CPA_EXPORT long SND_fn_lSendRequestSound(long indice,long type,SND_tduRefEvt evt,long prio,SND_td_pfn_vSoundCallback proc);
extern CPA_EXPORT void SND_fn_vKillObjectSound(long indice);
extern CPA_EXPORT void SND_fn_vKillObjectSound2(long indice,long type);
extern CPA_EXPORT void SND_fn_vKillAllObjectTypeSound(long type);
extern CPA_EXPORT void SND_fn_vKillAllObjectSound(void);
extern CPA_EXPORT void SND_fn_vKillAllObjectButTypeSound(long indice);
/*volume line*/
extern CPA_EXPORT long SND_fn_lAddVolumeLineSound(void);
#define SND_fn_lAddObjectTypeSound(ptrfn) SND_fn_lAddObjectTypeSound2(ptrfn,SND_C_LINE_FANTOME)
extern CPA_EXPORT long SND_fn_lAddObjectTypeSound2(tdstAllRetObjectSound *ptrfct,long lLine);
extern CPA_EXPORT void SND_fn_vSetRetObjectTypeSound(long type,tdstAllRetObjectSound *ptrfct);
extern CPA_EXPORT void SND_fn_vSetInfoForTypeSound(long type,td_pfn_vCopyString);
extern CPA_EXPORT void SND_fn_vGetInfoForObjectSound(long id,long type,char* str,long size_ptr);
extern CPA_EXPORT void SND_fn_vSetRollOffFunctionForTypeSound(long type,td_pfn_bRetRollOffFactor fct);
extern CPA_EXPORT void SND_fn_vSetRetMicroSound(tdstAllRetMicroSound *ptrfct);
extern CPA_EXPORT long SND_fn_lGetVolumeLineSound(long lLine);
extern CPA_EXPORT void SND_fn_vSetVolumeLineSound(long lLine,long lNewVolume);
//Sound Channel
extern CPA_EXPORT void SND_fn_vSetRetChannelTypeSound(long type, tdstAllRetChannelSound *ptrfct);
extern CPA_EXPORT long SND_fn_lSendRequestChannelSound(long channel, long indice,long type, SND_tduRefEvt evt,long prio,SND_td_pfn_vSoundCallback proc);
extern CPA_EXPORT void SND_fn_vKillChannelSound(long channel, long indice, long type);
/*volume changes*/
/* change object's volume*/
extern CPA_EXPORT void SND_fn_vChangeVolumeSound(long indice,long type,long lNewVolume);
extern CPA_EXPORT void SND_fn_vResetVolumeSound(long indice,long type);
extern CPA_EXPORT long SND_fn_lGetVolumeObjectSound(long indice,long type);
/* change all object's volume but one*/
extern CPA_EXPORT void SND_fn_vChangeVolumeAllObjectButOneSound(long indice,long type,long lNewVolume);
extern CPA_EXPORT void SND_fn_vResetVolumeAllObjectButOneSound(long indice,long type);
/* change object-type's volume*/
extern CPA_EXPORT void SND_fn_vChangeVolumeTypeSound(long type,long lNewVolume);
extern CPA_EXPORT void SND_fn_vResetVolumeTypeSound(long type);
extern CPA_EXPORT long SND_fn_lGetVolumeTypeSound(long type);
/* change all object-type's volume but one*/
extern CPA_EXPORT void SND_fn_vChangeVolumeButOneTypeSound(long type,long lNewVolume);
extern CPA_EXPORT void SND_fn_vResetVolumeButOneTypeSound(long type);
/* change all object's volume for a specific type*/
extern CPA_EXPORT void SND_fn_vChangeVolumeAllObjectSound(long type,long lNewVolume);
extern CPA_EXPORT void SND_fn_vResetVolumeAllObjectSound(long type);
/* change all object-type's volume*/
extern CPA_EXPORT void SND_fn_vChangeVolumeAllTypeSound(long lNewVolume);
extern CPA_EXPORT void SND_fn_vResetVolumeAllTypeSound(void);
extern CPA_EXPORT void SND_fn_vSetEffectSound(long id_effect);
/*main management*/
extern CPA_EXPORT void SND_fn_vSynchroSound(void);
extern CPA_EXPORT int SND_fn_iInitSound(SND_tdstInitStruct *pInitStruct);
extern CPA_EXPORT int SND_fn_iTestInitSound(void);
extern CPA_EXPORT void SND_fn_vDesInitSound(void);
extern CPA_EXPORT void SND_fn_vSetDopplerFactorSound(SndReal factor);
extern CPA_EXPORT void SND_fn_vSetDefaultRollOffSound(RollOffParam *rolloff);
extern CPA_EXPORT SndReal SND_fn_rGetPosSound(long handle);
extern CPA_EXPORT SndReal SND_fn_rGetLengthSound(long handle);
extern CPA_EXPORT void SND_fn_vPauseSound(void);
extern CPA_EXPORT void SND_fn_vResumeSound(void);
extern CPA_EXPORT void SND_fn_vPauseObjectSound(long indice,long type);
extern CPA_EXPORT void SND_fn_vResumeObjectSound(long indice,long type);
extern CPA_EXPORT void SND_fn_vPauseTypeSound(long type);
extern CPA_EXPORT void SND_fn_vResumeTypeSound(long type);
extern CPA_EXPORT void SND_fn_vPauseButOneTypeSound(long type);
extern CPA_EXPORT void SND_fn_vResumeButOneTypeSound(long type);
extern CPA_EXPORT long SND_fn_lCreateMicroSound(void);
extern CPA_EXPORT void SND_fn_vDestroyMicroSound(long indice);
extern CPA_EXPORT void SND_fn_vDestroyAllMicroSound(void);
extern CPA_EXPORT SndBool SND_fn_bReleaseDriverSound(void);
extern CPA_EXPORT SndBool SND_fn_bRestoreDriverSound(void);
extern CPA_EXPORT void SND_fn_vReleaseDriverSound(void);
extern CPA_EXPORT void SND_fn_vRestoreDriverSound(void);
extern CPA_EXPORT void SND_fn_vForceReleaseDriverSound(void);
extern CPA_EXPORT void SND_fn_vForceRestoreDriverSound(void);
extern CPA_EXPORT long SND_fn_lGetVolumeSound(void);
extern CPA_EXPORT void SND_fn_vSetVolumeSound(long vol);
extern CPA_EXPORT void SND_fn_vSetStereoSound(SndBool active);
extern CPA_EXPORT SndBool SND_fn_bGetStereoSound(void);
extern CPA_EXPORT SndBool SND_fn_bIsMusicPlayingSound(void);
extern CPA_EXPORT void SND_fn_vSetReverseStereoSound(SndBool active);
extern CPA_EXPORT SndBool SND_fn_bGetReverseStereoSound(void);
extern CPA_EXPORT void SND_fn_vGetTargetLabelSound(char* name,int nb_char);
extern CPA_EXPORT void SND_fn_vSetupTargetSound(void);
extern CPA_EXPORT SndBool SND_fn_bCanSetupTargetSound(void);
extern CPA_EXPORT long SND_fn_lCreateNewBufferSound(unsigned long nb_samples,unsigned short uwResolution,unsigned short uwNbChannels,unsigned long ulFreq,SoundParam* par,td_pfn_vRefreshBufferClient callback,long user_id);
extern CPA_EXPORT void SND_fn_vDeleteBufferSound(long id_buffer);
extern CPA_EXPORT void SND_fn_vPauseBufferSound(long id_buffer);
extern CPA_EXPORT void SND_fn_vResumeBufferSound(long id_buffer);
extern CPA_EXPORT SndReal SND_fn_rGetPosBufferSound(long id_buffer);
extern CPA_EXPORT void SND_fn_vSetParamBufferSound(long id_buffer,SoundParam* par);
extern CPA_EXPORT long SND_fn_lCreateNewBufferExSound(SND_tdstFormat* pformat,SND_tdstCallback* pCallback,SoundParam* par,long user_id);
extern CPA_EXPORT long SND_fn_lGetPosBufferExSound(long id_buffer);
extern CPA_EXPORT long SND_fn_lPushBufferExSound(long id_buffer,SND_tdstStackBuffer* pStack);
extern CPA_EXPORT SND_tdstBlockEvent* SND_fn_pstGetLastEventForObjectTypeSound(long type);
extern CPA_EXPORT long SND_fn_lGetNbVoiceOptimumSound(void);
extern CPA_EXPORT long SND_fn_lGetNbVoiceWishedSound(void);
extern CPA_EXPORT void SND_fn_vSetNbVoiceWishedSound(long nb);
extern CPA_EXPORT SND_tduRefEvt SND_fn_uGenerateEventPlaySound(void* data,SND_tdstFormat* pformat,SndBool loop);
extern CPA_EXPORT SND_tduRefEvt SND_fn_uGenerateEventStopSound(SND_tduRefEvt event);
extern CPA_EXPORT void SND_fn_vDestroyEventSound(SND_tduRefEvt event);
extern CPA_EXPORT SndBool SND_fn_bTestFormatRecordSound(SND_tdstFormat* pformat,int flags);
extern CPA_EXPORT long SND_fn_lCreateBufferRecordSound(SND_tdstFormat* pformat,SND_tdstCallback* pCallback);
extern CPA_EXPORT SndBool SND_fn_bIsBufferFullDuplexRecordSound(long id_buffer);
extern CPA_EXPORT SndBool SND_fn_bStartRecordSound(long id_buffer);
extern CPA_EXPORT void SND_fn_vStopRecordSound(long id_buffer);
extern CPA_EXPORT SndBool SND_fn_bIsWorkingRecordSound(long id_buffer);
extern CPA_EXPORT long SND_fn_lPushBufferToRecordSound(long id_buffer,void* ptr,int size_ptr);
extern CPA_EXPORT SndBool SND_fn_bManageMsgForRecordSound(long p_msg);
extern CPA_EXPORT unsigned char SND_fn_ucGetInstantVuMeterRecordSound(void);
#define FORMATREC_RESOLUTION 1
#define FORMATREC_FREQUENCY 2
#define FORMATREC_NBCHANNEL 4
#define FORMATREC_ZIP 8
#define EVT_FANTOME_ID -1
#define EVT_FANTOME_PTR NULL
#define SND_C_OBJET_FANTOME -1
#define SND_C_CHANNEL_FANTOME -1
#define SND_C_TYPE_FANTOME 0
#define SND_C_LINE_FANTOME ((long)NULL)
#define SND_C_POS_UNKNOWN -1
#define SND_C_POS_ENDED -2
#define SND_C_LENGTH_UNKNOWN -1
#define C_INITSOUND_FAILED 0
#define C_INITSOUND_OK 1
#define SND_C_EVT_CALLBACK_FAILED -1
#define SND_C_EVT_FAILED -2
#define SND_C_NO_DOPPLER (M_IntToRealSnd(0))
#define SND_C_NORMAL_DOPPLER (M_IntToRealSnd(1))
#define NO_FILTRE 0
#define NO_REVERB 0
#define NO_EFFECT 0
#ifdef __cplusplus
}
#endif /* __cplusplus*/
#endif /* _SOUND3D_H_*/

View File

@@ -0,0 +1 @@
"Moteur sonore ACP - Version M5.8.4"

View File

@@ -0,0 +1,18 @@
/*disable Level4 warning for Visual*/
/*This file should only disable Level4 warning encoutered in windows.H files*/
#ifdef VISUAL
//#pragma message("Warning: some Level4 warning messages have been disabled by SND_disable_warning.H(SND.H)")
/*warning found in Win32 headers (noboby is perfect)*/
#pragma warning (disable:4115) /*named type definition in parentheses*/
#pragma warning (disable:4201) /*nonstandard extension used : nameless struct/union*/
#pragma warning (disable:4214) /*nonstandard extension used : bit field types other than int*/
#pragma warning (disable:4514) /*unreferenced inline function has been removed*/
/*unsignificant warnings found in SND source code*/
#pragma warning (disable:4706) /*assignment within conditional expression*/
#pragma warning (disable:4100) /*unreferenced formal parameter*/
#pragma warning (disable:4127) /*conditional expression is constant*/
#endif /*VISUAL*/