309 lines
7.1 KiB
C
309 lines
7.1 KiB
C
#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_*/
|
||
|