- eliminated typedefs in sound code.cc.obj

This commit is contained in:
Christoph Oelckers 2021-12-31 13:31:13 +01:00
parent 085eb8a36e
commit 89ab00fe99
3 changed files with 7 additions and 34 deletions

View file

@ -67,7 +67,7 @@ bool bSpinBobVoxels = false; // Do twizzly stuff to voxels, but
bool bAutoSize = true; // Autosizing on/off bool bAutoSize = true; // Autosizing on/off
//extern int chainnumpages; //extern int chainnumpages;
extern ambientstruct ambarray[]; extern AMB_INFO ambarray[];
extern short NormalVisibility; extern short NormalVisibility;
extern ParentalStruct aVoxelArray[MAXTILES]; extern ParentalStruct aVoxelArray[MAXTILES];

View file

@ -71,7 +71,7 @@ int PLocked_Sounds[] =
// //
#define DIGI_TABLE #define DIGI_TABLE
VOC_INFO voc[] = VOCstruct voc[] =
{ {
#include "digi.h" #include "digi.h"
}; };
@ -237,7 +237,7 @@ void StopAmbientSound(void)
void InitAmbient(int num, DSWActor* actor) void InitAmbient(int num, DSWActor* actor)
{ {
VOC_INFOp vp; VOCstruct* vp;
int pitch = 0; int pitch = 0;
short angle, sound_dist; short angle, sound_dist;
int tx, ty, tz; int tx, ty, tz;
@ -786,7 +786,7 @@ void PlaySpriteSound(DSWActor* actor, int attrib_ndx, Voc3D_Flags flags)
int _PlayerSound(int num, PLAYERp pp) int _PlayerSound(int num, PLAYERp pp)
{ {
int handle; int handle;
VOC_INFOp vp; VOCstruct* vp;
if (Prediction) if (Prediction)
return 0; return 0;

View file

@ -61,14 +61,6 @@ enum
typedef int Voc3D_Flags; typedef int Voc3D_Flags;
struct VOCstruct; struct VOCstruct;
typedef struct VOCstruct VOC_INFO, *VOC_INFOp;
#if 0
struct VOC3Dstruct;
typedef struct VOC3Dstruct VOC3D_INFO, *VOC3D_INFOp;
#endif
struct ambientstruct;
typedef struct ambientstruct AMB_INFO, *AMB_INFOp;
void Terminate3DSounds(void); void Terminate3DSounds(void);
@ -89,23 +81,8 @@ void StopAmbientSound(void);
bool PlaySong(const char *song_file_name, int cdaudio_track, bool isThemeTrack = false); //(nullptr, nullptr, -1, false) starts the normal level music. bool PlaySong(const char *song_file_name, int cdaudio_track, bool isThemeTrack = false); //(nullptr, nullptr, -1, false) starts the normal level music.
void PlaySoundRTS(int rts_num); void PlaySoundRTS(int rts_num);
//
// Standard VOC format information - generally don't need this
//
typedef struct
{
uint8_t filler[0x1a];
uint8_t type;
uint32_t length;
uint8_t filler2;
uint8_t freq;
uint8_t pack;
uint8_t data[1];
} *VOC_HDRp;
// Ambient Sound Structure // Ambient Sound Structure
struct ambientstruct struct AMB_INFO
{ {
int16_t name; int16_t name;
int16_t diginame; int16_t diginame;
@ -120,16 +97,12 @@ enum
vf_normal = 0, vf_normal = 0,
vf_loop = 1 vf_loop = 1
}; };
typedef int Voc_Flags;
// //
// Table that describes the voc file and how it will be played // Table that describes the voc file and how it will be played
// Can be easily extended, but you may need to change digi.h // Can be easily extended, but you may need to change digi.h
// //
//struct STATEstruct;
//typedef struct VOCstruct VOC_INFO, *VOC_INFOp;
struct VOCstruct struct VOCstruct
{ {
char name[14]; // name of voc file on disk char name[14]; // name of voc file on disk
@ -140,13 +113,13 @@ struct VOCstruct
uint8_t priority; // priority at which vocs are played uint8_t priority; // priority at which vocs are played
int16_t voc_num; // Backward reference to parent sound int16_t voc_num; // Backward reference to parent sound
int voc_distance; // Sound's distance effectiveness int voc_distance; // Sound's distance effectiveness
Voc_Flags voc_flags; // Various allowable flag settings for voc int voc_flags; // Various allowable flag settings for voc
uint16_t lock; // locking byte for caching uint16_t lock; // locking byte for caching
uint8_t playing; // number of this type of sound currently playing uint8_t playing; // number of this type of sound currently playing
}; };
extern VOC_INFO voc[]; extern VOCstruct voc[];
END_SW_NS END_SW_NS