mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
- Added a wrapper that takes care of determining the file type of audio files.
- Fix: 'hit' sounds of non-profile NPCs were not played correctly git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8580 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2552,3 +2552,20 @@ UINT32 GetFreeSpaceOnHardDrive( STR pzDriveLetter )
|
||||
return( uiBytesFree );
|
||||
}
|
||||
|
||||
// Flugente: simple wrapper to check whether an audio file in mp3/ogg/wav format exists
|
||||
BOOLEAN SoundFileExists( STR strFilename, STR zFoundFilename )
|
||||
{
|
||||
SGPFILENAME zFilename;
|
||||
|
||||
sprintf( zFoundFilename, "%s.mp3", strFilename );
|
||||
if ( !FileExists( zFoundFilename ) )
|
||||
{
|
||||
sprintf( zFoundFilename, "%s.ogg", strFilename );
|
||||
if ( !FileExists( zFoundFilename ) )
|
||||
{
|
||||
sprintf( zFoundFilename, "%s.wav", strFilename );
|
||||
}
|
||||
}
|
||||
|
||||
return FileExists( zFoundFilename );
|
||||
}
|
||||
|
||||
@@ -192,6 +192,9 @@ UINT32 GetFreeSpaceOnHardDriveWhereGameIsRunningFrom( );
|
||||
//Gets the free hard drive space from the drive letter passed in. It has to be the root dir. ( eg. c:\ )
|
||||
UINT32 GetFreeSpaceOnHardDrive( STR pzDriveLetter );
|
||||
|
||||
// Flugente: simple wrapper to check whether an audio file in mp3/ogg/wav format exists
|
||||
BOOLEAN SoundFileExists( STR strFilename, STR zFoundFilename );
|
||||
|
||||
/*
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user