10 changed files with 21 additions and 91 deletions
@ -1,43 +0,0 @@
|
||||
/**
|
||||
* @file wave.cpp |
||||
* |
||||
* Implementation of functionality for loading fies and processing wave files. |
||||
*/ |
||||
#include "all.h" |
||||
#include "../3rdParty/Storm/Source/storm.h" |
||||
|
||||
DEVILUTION_BEGIN_NAMESPACE |
||||
|
||||
void WCloseFile(HANDLE file) |
||||
{ |
||||
SFileCloseFile(file); |
||||
} |
||||
|
||||
LONG WGetFileSize(HANDLE hsFile, DWORD *lpFileSizeHigh, const char *FileName) |
||||
{ |
||||
LONG ret; |
||||
|
||||
if ((ret = SFileGetFileSize(hsFile, lpFileSizeHigh)) == 0) |
||||
FileErrDlg(FileName); |
||||
|
||||
return ret; |
||||
} |
||||
|
||||
BOOL WOpenFile(const char *FileName, HANDLE *phsFile, BOOL mayNotExist) |
||||
{ |
||||
if (!SFileOpenFile(FileName, phsFile)) |
||||
FileErrDlg(FileName); |
||||
|
||||
return TRUE; |
||||
} |
||||
|
||||
void WReadFile(HANDLE hsFile, LPVOID buf, DWORD to_read, const char *FileName) |
||||
{ |
||||
if (SFileSetFilePointer(hsFile, 0, NULL, DVL_FILE_CURRENT) == -1) |
||||
FileErrDlg(FileName); |
||||
|
||||
if (!SFileReadFile(hsFile, buf, to_read, NULL, NULL)) |
||||
FileErrDlg(FileName); |
||||
} |
||||
|
||||
DEVILUTION_END_NAMESPACE |
||||
@ -1,27 +0,0 @@
|
||||
/**
|
||||
* @file wave.h |
||||
* |
||||
* Interface of functionality for loading files and processing wave files. |
||||
*/ |
||||
#ifndef __WAVE_H__ |
||||
#define __WAVE_H__ |
||||
|
||||
DEVILUTION_BEGIN_NAMESPACE |
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
void WCloseFile(HANDLE file); |
||||
LONG WGetFileSize(HANDLE hsFile, DWORD *lpFileSizeHigh, const char *FileName); |
||||
BOOL WOpenFile(const char *FileName, HANDLE *phsFile, BOOL mayNotExist); |
||||
void WReadFile(HANDLE hsFile, LPVOID buf, DWORD to_read, const char *FileName); |
||||
int WSetFilePointer(HANDLE file1, int offset, HANDLE file2, int whence); |
||||
|
||||
#ifdef __cplusplus |
||||
} |
||||
#endif |
||||
|
||||
DEVILUTION_END_NAMESPACE |
||||
|
||||
#endif /* __WAVE_H__ */ |
||||
Loading…
Reference in new issue