Current News
Archived News
Search News
Discussion Forum


Old Forum
Install Programs More Downloads...
Troubleshooting
Source Code
Format Specs.
Misc. Information
Non-SF Stuff
Links




ShadowFlare [Wed, 16 Jan 2013 23:27:13 +0000 (16:27 -0700)]
CwadLib.cpp
CwadLib.h

index a62bc60..b06eea3 100644 (file)
@@ -89,6 +89,12 @@ void CWadListFilesInternal(void *hCWAD);
 unsigned long CWadFindHeaderAndSize(FILE *hFile, unsigned long *pnCwadEnd);
 void CWadDecryptData(UInt8 *pBuffer, unsigned long nBufferLength);
 
+#ifndef _WIN32
+#define _T(x) x
+#define _tfopen fopen
+#define _tcsdup strdup
+#endif
+
 void * CWadOpenArchive(const TCHAR *pszFileName)
 {
        if (!pszFileName)
index 27c6f7b..9bb0f21 100644 (file)
--- a/CwadLib.h
+++ b/CwadLib.h
 #ifndef CWADLIB_INCLUDED
 #define CWADLIB_INCLUDED
 
+#ifdef _WIN32
 #include <tchar.h>
+#else
+#define TCHAR char
+#endif
+#include <stdio.h>
 
 #define CWAD_INFO_NUM_FILES       0x03 //Number of files in CWAD
 #define CWAD_INFO_SIZE            0x05 //Size of CWAD or uncompressed file