Adjust file loading

Many files converted to pk3, and we now have a distinct IWAD
This commit is contained in:
TehRealSalt 2019-05-12 20:58:26 -04:00
parent dc41fe3d8d
commit da7e79ac83
10 changed files with 101 additions and 175 deletions

View file

@ -13,12 +13,12 @@ set(SRB2_ASSET_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/installer"
CACHE STRING "Path to directory that contains all asset files for the installer.") CACHE STRING "Path to directory that contains all asset files for the installer.")
set(SRB2_ASSET_HASHED set(SRB2_ASSET_HASHED
"srb2.srb;\ "main.kart;\
patch.kart;\ gfx.pk3;\
gfx.kart;\ textures.pk3;\
textures.kart;\ chars.pk3;\
chars.kart;\ maps.wad;\
maps.kart" patch.pk3"
CACHE STRING "Asset filenames to apply MD5 checks. No spaces between entries!" CACHE STRING "Asset filenames to apply MD5 checks. No spaces between entries!"
) )

View file

@ -83,16 +83,14 @@
# SRB2 data files # SRB2 data files
D_DIR?=../bin/Resources D_DIR?=../bin/Resources
D_FILES=$(D_DIR)/srb2.srb \ D_FILES=$(D_DIR)/main.kart \
$(D_DIR)/patch.dta \ $(D_DIR)/gfx.pk3 \
#$(D_DIR)/music.dta \ $(D_DIR)/textures.pk3 \
$(D_DIR)/gfx.kart \ $(D_DIR)/chars.pk3 \
$(D_DIR)/textures.kart \ $(D_DIR)/maps.wad \
$(D_DIR)/chars.kart \ $(D_DIR)/patch.pk3 \
$(D_DIR)/maps.kart \ $(D_DIR)/sounds.wad \
$(D_DIR)/sounds.kart \ $(D_DIR)/music.wad \
$(D_DIR)/patch.kart \
$(D_DIR)/music.kart \
PKG_CONFIG?=pkg-config PKG_CONFIG?=pkg-config

View file

@ -11,19 +11,13 @@
#ifdef CMAKECONFIG #ifdef CMAKECONFIG
// Base SRB2 hashes #define ASSET_HASH_MAIN_KART "${SRB2_ASSET_main.kart_HASH}"
#define ASSET_HASH_SRB2_SRB "${SRB2_ASSET_srb2.srb_HASH}" #define ASSET_HASH_GFX_PK3 "${SRB2_ASSET_gfx.pk3_HASH}"
#ifdef USE_PATCH_DTA #define ASSET_HASH_TEXTURES_PK3 "${SRB2_ASSET_textures.pk3_HASH}"
#define ASSET_HASH_PATCH_DTA "${SRB2_ASSET_patch.dta_HASH}" #define ASSET_HASH_CHARS_PK3 "${SRB2_ASSET_chars.pk3_HASH}"
#endif #define ASSET_HASH_MAPS_WAD "${SRB2_ASSET_maps.wad_HASH}"
#ifdef USE_PATCH_FILE
// SRB2Kart-specific hashes #define ASSET_HASH_PATCH_PK3 "${SRB2_ASSET_patch.pk3_HASH}"
#define ASSET_HASH_GFX_KART "${SRB2_ASSET_gfx.kart_HASH}"
#define ASSET_HASH_TEXTURES_KART "${SRB2_ASSET_textures.kart_HASH}"
#define ASSET_HASH_CHARS_KART "${SRB2_ASSET_chars.kart_HASH}"
#define ASSET_HASH_MAPS_KART "${SRB2_ASSET_maps.kart_HASH}"
#ifdef USE_PATCH_KART
#define ASSET_HASH_PATCH_KART "${SRB2_ASSET_patch.kart_HASH}"
#endif #endif
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}" #define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"
@ -34,25 +28,17 @@
#else #else
/* Manually defined asset hashes for non-CMake builds /* Manually defined asset hashes for non-CMake builds
* Last updated 2015 / 05 / 03 - SRB2 v2.1.15 - srb2.srb
* Last updated 2018 / 12 / 23 - SRB2 v2.1.22 - patch.dta
* Last updated 2019 / 01 / 18 - Kart v1.0.2 - Main assets * Last updated 2019 / 01 / 18 - Kart v1.0.2 - Main assets
* Last updated 2019 / 05 / 06 - Kart v1.1.0 - patch.kart * Last updated 2019 / 05 / 06 - Kart v1.1.0 - patch.kart
*/ */
// Base SRB2 hashes #define ASSET_HASH_MAIN_KART "00000000000000000000000000000000"
#define ASSET_HASH_SRB2_SRB "c1b9577687f8a795104aef4600720ea7" #define ASSET_HASH_GFX_PK3 "99c39f223d84ebc78e67ab68f3bead95"
#ifdef USE_PATCH_DTA #define ASSET_HASH_TEXTURES_PK3 "ec8e9b7535cf585afe72ef277b08f490"
#define ASSET_HASH_PATCH_DTA "b04fd9624bfd94dc96dcf4f400f7deb4" #define ASSET_HASH_CHARS_PK3 "e2c428347dde52858a3dacd29fc5b964"
#endif #define ASSET_HASH_MAPS_WAD "1335cd064656aedca359cfbb5233ac4a"
#ifdef USE_PATCH_FILE
// SRB2Kart-specific hashes #define ASSET_HASH_PATCH_PK3 "6461b30bb20754a16a1b582120f55842"
#define ASSET_HASH_GFX_KART "99c39f223d84ebc78e67ab68f3bead95"
#define ASSET_HASH_TEXTURES_KART "ec8e9b7535cf585afe72ef277b08f490"
#define ASSET_HASH_CHARS_KART "e2c428347dde52858a3dacd29fc5b964"
#define ASSET_HASH_MAPS_KART "1335cd064656aedca359cfbb5233ac4a"
#ifdef USE_PATCH_KART
#define ASSET_HASH_PATCH_KART "6461b30bb20754a16a1b582120f55842"
#endif #endif
#endif #endif

View file

@ -836,11 +836,11 @@ static inline void D_CleanFile(char **filearray)
static void IdentifyVersion(void) static void IdentifyVersion(void)
{ {
char *srb2wad1, *srb2wad2; char *mainresource;
const char *srb2waddir = NULL; const char *srb2waddir = NULL;
#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL) #if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL)
// change to the directory where 'srb2.srb' is found // change to the directory where 'main.kart' is found
srb2waddir = I_LocateWad(); srb2waddir = I_LocateWad();
#endif #endif
@ -871,46 +871,34 @@ static void IdentifyVersion(void)
srb2waddir = I_GetWadDir(); srb2waddir = I_GetWadDir();
#endif #endif
// Commercial. // Commercial.
srb2wad1 = malloc(strlen(srb2waddir)+1+8+1); mainresource = malloc(strlen(srb2waddir)+1+9+1);
srb2wad2 = malloc(strlen(srb2waddir)+1+8+1); if (mainresource == NULL)
if (srb2wad1 == NULL && srb2wad2 == NULL)
I_Error("No more free memory to look in %s", srb2waddir); I_Error("No more free memory to look in %s", srb2waddir);
if (srb2wad1 != NULL) if (mainresource != NULL)
sprintf(srb2wad1, pandf, srb2waddir, "srb2.srb"); sprintf(mainresource, pandf, srb2waddir, "main.kart");
if (srb2wad2 != NULL)
sprintf(srb2wad2, pandf, srb2waddir, "srb2.wad");
// will be overwritten in case of -cdrom or unix/win home // will be overwritten in case of -cdrom or unix/win home
snprintf(configfile, sizeof configfile, "%s" PATHSEP CONFIGFILENAME, srb2waddir); snprintf(configfile, sizeof configfile, "%s" PATHSEP CONFIGFILENAME, srb2waddir);
configfile[sizeof configfile - 1] = '\0'; configfile[sizeof configfile - 1] = '\0';
// Load the IWAD // Load the IWAD
if (srb2wad2 != NULL && FIL_ReadFileOK(srb2wad2)) if (mainresource != NULL && FIL_ReadFileOK(mainresource))
D_AddFile(srb2wad2, startupwadfiles); D_AddFile(mainresource, startupwadfiles);
else if (srb2wad1 != NULL && FIL_ReadFileOK(srb2wad1))
D_AddFile(srb2wad1, startupwadfiles);
else else
I_Error("SRB2.SRB/SRB2.WAD not found! Expected in %s, ss files: %s or %s\n", srb2waddir, srb2wad1, srb2wad2); I_Error("MAIN.KART not found! Expected in %s, ss file: %s \n", srb2waddir, mainresource);
if (srb2wad1) if (mainresource)
free(srb2wad1); free(mainresource);
if (srb2wad2)
free(srb2wad2);
// if you change the ordering of this or add/remove a file, be sure to update the md5 // if you change the ordering of this or add/remove a file, be sure to update the md5
// checking in D_SRB2Main // checking in D_SRB2Main
#ifdef USE_PATCH_DTA D_AddFile(va(pandf,srb2waddir,"gfx.pk3"), startupwadfiles);
// Add our crappy patches to fix our bugs D_AddFile(va(pandf,srb2waddir,"textures.pk3"), startupwadfiles);
D_AddFile(va(pandf,srb2waddir,"patch.dta")); D_AddFile(va(pandf,srb2waddir,"chars.pk3"), startupwadfiles);
#endif D_AddFile(va(pandf,srb2waddir,"maps.wad"), startupwadfiles); // TODO: make this a pk3 too!
#ifdef USE_PATCH_FILE
D_AddFile(va(pandf,srb2waddir,"gfx.kart"), startupwadfiles); D_AddFile(va(pandf,srb2waddir,"patch.pk3"), startupwadfiles);
D_AddFile(va(pandf,srb2waddir,"textures.kart"), startupwadfiles);
D_AddFile(va(pandf,srb2waddir,"chars.kart"), startupwadfiles);
D_AddFile(va(pandf,srb2waddir,"maps.kart"), startupwadfiles);
#ifdef USE_PATCH_KART
D_AddFile(va(pandf,srb2waddir,"patch.kart"), startupwadfiles);
#endif #endif
#if !defined (HAVE_SDL) || defined (HAVE_MIXER) #if !defined (HAVE_SDL) || defined (HAVE_MIXER)
@ -923,8 +911,8 @@ static void IdentifyVersion(void)
else if (ms == 0) \ else if (ms == 0) \
I_Error("File "str" has been modified with non-music/sound lumps"); \ I_Error("File "str" has been modified with non-music/sound lumps"); \
} }
MUSICTEST("sounds.kart") MUSICTEST("sounds.wad")
MUSICTEST("music.kart") MUSICTEST("music.wad")
#undef MUSICTEST #undef MUSICTEST
#endif #endif
} }
@ -1208,27 +1196,21 @@ void D_SRB2Main(void)
#ifndef DEVELOP #ifndef DEVELOP
// Check MD5s of autoloaded files // Check MD5s of autoloaded files
// Note: Do not add any files that ignore MD5! // Note: Do not add any files that ignore MD5!
W_VerifyFileMD5(mainwads, ASSET_HASH_SRB2_SRB); // srb2.srb/srb2.wad W_VerifyFileMD5(mainwads, ASSET_HASH_MAIN_KART); // main.kart
#ifdef USE_PATCH_DTA mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_GFX_PK3); // gfx.pk3
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_PATCH_DTA); // patch.dta mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_TEXTURES_PK3); // textures.pk3
#endif mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_CHARS_PK3); // chars.pk3
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_GFX_KART); // gfx.kart mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_MAPS_WAD); // maps.wad -- 4 - If you touch this, make sure to touch up the majormods stuff below.
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_TEXTURES_KART); // textures.kart #ifdef USE_PATCH_FILE
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_CHARS_KART); // chars.kart mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_PATCH_PK3); // patch.pk3
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_MAPS_KART); // maps.kart -- 4 - If you touch this, make sure to touch up the majormods stuff below.
#ifdef USE_PATCH_KART
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_PATCH_KART); // patch.kart
#endif #endif
#else #else
#ifdef USE_PATCH_DTA mainwads++; // gfx.pk3
mainwads++; // patch.dta mainwads++; // textures.pk3
#endif mainwads++; // chars.pk3
mainwads++; // gfx.kart mainwads++; // maps.wad
mainwads++; // textures.kart #ifdef USE_PATCH_FILE
mainwads++; // chars.kart mainwads++; // patch.pk3
mainwads++; // maps.kart
#ifdef USE_PATCH_KART
mainwads++; // patch.kart
#endif #endif
#endif //ifndef DEVELOP #endif //ifndef DEVELOP

View file

@ -358,7 +358,6 @@ INT32 CL_CheckFiles(void)
// return 1; // return 1;
// the first is the iwad (the main wad file) // the first is the iwad (the main wad file)
// we don't care if it's called srb2.srb or srb2.wad.
// Never download the IWAD, just assume it's there and identical // Never download the IWAD, just assume it's there and identical
// ...No! Why were we sending the base wads to begin with?? // ...No! Why were we sending the base wads to begin with??
//fileneeded[0].status = FS_OPEN; //fileneeded[0].status = FS_OPEN;
@ -774,17 +773,14 @@ void Got_Filetxpak(void)
char *filename = file->filename; char *filename = file->filename;
static INT32 filetime = 0; static INT32 filetime = 0;
if (!(strcmp(filename, "srb2.srb") if (!(strcmp(filename, "main.kart")
&& strcmp(filename, "srb2.wad") && strcmp(filename, "gfx.pk3")
&& strcmp(filename, "patch.dta") && strcmp(filename, "textures.pk3")
//&& strcmp(filename, "music.dta") && strcmp(filename, "chars.pk3")
&& strcmp(filename, "gfx.kart") && strcmp(filename, "maps.wad")
&& strcmp(filename, "textures.kart") && strcmp(filename, "patch.pk3")
&& strcmp(filename, "chars.kart") && strcmp(filename, "sounds.wad")
&& strcmp(filename, "maps.kart") && strcmp(filename, "music.wad")
&& strcmp(filename, "sounds.kart")
&& strcmp(filename, "music.kart")
&& strcmp(filename, "patch.kart")
)) ))
I_Error("Tried to download \"%s\"", filename); I_Error("Tried to download \"%s\"", filename);

View file

@ -3749,8 +3749,7 @@ static void DEH_LoadDehackedFile(MYFILE *f, UINT16 wad)
} }
else if (fastcmp(word, "SRB2")) else if (fastcmp(word, "SRB2"))
{ {
if (mainwads) // srb2.srb triggers this warning otherwise deh_warning("Patch is only compatible with base SRB2.");
deh_warning("Patch is only compatible with base SRB2.");
} }
// Clear all data in certain locations (mostly for unlocks) // Clear all data in certain locations (mostly for unlocks)
// Unless you REALLY want to piss people off, // Unless you REALLY want to piss people off,

View file

@ -163,10 +163,7 @@ extern FILE *logstream;
// Does this version require an added patch file? // Does this version require an added patch file?
// Comment or uncomment this as necessary. // Comment or uncomment this as necessary.
//#define USE_PATCH_DTA //#define USE_PATCH_FILE
// Kart has it's own, as well.
#define USE_PATCH_KART
// Use .kart extension addons // Use .kart extension addons
#define USE_KART #define USE_KART

View file

@ -443,26 +443,26 @@ static int libd_drawFill(lua_State *L)
static int libd_fadeScreen(lua_State *L) static int libd_fadeScreen(lua_State *L)
{ {
UINT16 color = luaL_checkinteger(L, 1); UINT16 color = luaL_checkinteger(L, 1);
UINT8 strength = luaL_checkinteger(L, 2); UINT8 strength = luaL_checkinteger(L, 2);
const UINT8 maxstrength = ((color & 0xFF00) ? 32 : 10); const UINT8 maxstrength = ((color & 0xFF00) ? 32 : 10);
HUDONLY HUDONLY
if (!strength) if (!strength)
return 0; return 0;
if (strength > maxstrength) if (strength > maxstrength)
return luaL_error(L, "%s fade strength %d out of range (0 - %d)", ((color & 0xFF00) ? "COLORMAP" : "TRANSMAP"), strength, maxstrength); return luaL_error(L, "%s fade strength %d out of range (0 - %d)", ((color & 0xFF00) ? "COLORMAP" : "TRANSMAP"), strength, maxstrength);
if (strength == maxstrength) // Allow as a shortcut for drawfill... if (strength == maxstrength) // Allow as a shortcut for drawfill...
{ {
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, ((color & 0xFF00) ? 31 : color)); V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, ((color & 0xFF00) ? 31 : color));
return 0; return 0;
} }
V_DrawFadeScreen(color, strength); V_DrawFadeScreen(color, strength);
return 0; return 0;
} }
static int libd_drawString(lua_State *L) static int libd_drawString(lua_State *L)

View file

@ -131,7 +131,7 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
#include <errno.h> #include <errno.h>
#endif #endif
// Locations for searching the srb2.srb // Locations for searching for main.kart
#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) #if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
#define DEFAULTWADLOCATION1 "/usr/local/share/games/SRB2Kart" #define DEFAULTWADLOCATION1 "/usr/local/share/games/SRB2Kart"
#define DEFAULTWADLOCATION2 "/usr/local/games/SRB2Kart" #define DEFAULTWADLOCATION2 "/usr/local/games/SRB2Kart"
@ -149,8 +149,7 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
/** \brief WAD file to look for /** \brief WAD file to look for
*/ */
#define WADKEYWORD1 "srb2.srb" #define WADKEYWORD "main.kart"
#define WADKEYWORD2 "srb2.wad"
/** \brief holds wad path /** \brief holds wad path
*/ */
static char returnWadPath[256]; static char returnWadPath[256];
@ -3454,15 +3453,7 @@ static boolean isWadPathOk(const char *path)
if (!wad3path) if (!wad3path)
return false; return false;
sprintf(wad3path, pandf, path, WADKEYWORD1); sprintf(wad3path, pandf, path, WADKEYWORD);
if (FIL_ReadFileOK(wad3path))
{
free(wad3path);
return true;
}
sprintf(wad3path, pandf, path, WADKEYWORD2);
if (FIL_ReadFileOK(wad3path)) if (FIL_ReadFileOK(wad3path))
{ {
@ -3487,7 +3478,7 @@ static void pathonly(char *s)
} }
} }
/** \brief search for srb2.srb in the given path /** \brief search for main.kart in the given path
\param searchDir starting path \param searchDir starting path
@ -3500,7 +3491,7 @@ static const char *searchWad(const char *searchDir)
static char tempsw[256] = ""; static char tempsw[256] = "";
filestatus_t fstemp; filestatus_t fstemp;
strcpy(tempsw, WADKEYWORD1); strcpy(tempsw, WADKEYWORD);
fstemp = filesearch(tempsw,searchDir,NULL,true,20); fstemp = filesearch(tempsw,searchDir,NULL,true,20);
if (fstemp == FS_FOUND) if (fstemp == FS_FOUND)
{ {
@ -3508,19 +3499,12 @@ static const char *searchWad(const char *searchDir)
return tempsw; return tempsw;
} }
strcpy(tempsw, WADKEYWORD2);
fstemp = filesearch(tempsw, searchDir, NULL, true, 20);
if (fstemp == FS_FOUND)
{
pathonly(tempsw);
return tempsw;
}
return NULL; return NULL;
} }
/** \brief go through all possible paths and look for srb2.srb /** \brief go through all possible paths and look for main.kart
\return path to srb2.srb if any \return path to main.kart if any
*/ */
static const char *locateWad(void) static const char *locateWad(void)
{ {
@ -3649,7 +3633,7 @@ const char *I_LocateWad(void)
if (waddir) if (waddir)
{ {
// change to the directory where we found srb2.srb // change to the directory where we found main.kart
#if defined (_WIN32) #if defined (_WIN32)
SetCurrentDirectoryA(waddir); SetCurrentDirectoryA(waddir);
#else #else

View file

@ -145,7 +145,7 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s?
#define O_BINARY 0 #define O_BINARY 0
#endif #endif
// Locations for searching the srb2.srb // Locations for searching the main.kart
#ifdef _arch_dreamcast #ifdef _arch_dreamcast
#define DEFAULTWADLOCATION1 "/cd" #define DEFAULTWADLOCATION1 "/cd"
#define DEFAULTWADLOCATION2 "/pc" #define DEFAULTWADLOCATION2 "/pc"
@ -217,8 +217,7 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s?
/** \brief WAD file to look for /** \brief WAD file to look for
*/ */
#define WADKEYWORD1 "srb2.srb" #define WADKEYWORD "main.kart"
#define WADKEYWORD2 "srb2.wad"
/** \brief holds wad path /** \brief holds wad path
*/ */
static char returnWadPath[256]; static char returnWadPath[256];
@ -3398,15 +3397,7 @@ static boolean isWadPathOk(const char *path)
if (!wad3path) if (!wad3path)
return false; return false;
sprintf(wad3path, pandf, path, WADKEYWORD1); sprintf(wad3path, pandf, path, WADKEYWORD);
if (FIL_ReadFileOK(wad3path))
{
free(wad3path);
return true;
}
sprintf(wad3path, pandf, path, WADKEYWORD2);
if (FIL_ReadFileOK(wad3path)) if (FIL_ReadFileOK(wad3path))
{ {
@ -3431,7 +3422,7 @@ static void pathonly(char *s)
} }
} }
/** \brief search for srb2.srb in the given path /** \brief search for main.kart in the given path
\param searchDir starting path \param searchDir starting path
@ -3444,7 +3435,7 @@ static const char *searchWad(const char *searchDir)
static char tempsw[256] = ""; static char tempsw[256] = "";
filestatus_t fstemp; filestatus_t fstemp;
strcpy(tempsw, WADKEYWORD1); strcpy(tempsw, WADKEYWORD);
fstemp = filesearch(tempsw,searchDir,NULL,true,20); fstemp = filesearch(tempsw,searchDir,NULL,true,20);
if (fstemp == FS_FOUND) if (fstemp == FS_FOUND)
{ {
@ -3452,19 +3443,12 @@ static const char *searchWad(const char *searchDir)
return tempsw; return tempsw;
} }
strcpy(tempsw, WADKEYWORD2);
fstemp = filesearch(tempsw, searchDir, NULL, true, 20);
if (fstemp == FS_FOUND)
{
pathonly(tempsw);
return tempsw;
}
return NULL; return NULL;
} }
/** \brief go through all possible paths and look for srb2.srb /** \brief go through all possible paths and look for main.kart
\return path to srb2.srb if any \return path to main.kart if any
*/ */
static const char *locateWad(void) static const char *locateWad(void)
{ {
@ -3581,7 +3565,7 @@ const char *I_LocateWad(void)
if (waddir) if (waddir)
{ {
// change to the directory where we found srb2.srb // change to the directory where we found main.kart
#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX) #if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX)
SetCurrentDirectoryA(waddir); SetCurrentDirectoryA(waddir);
#elif !defined (_WIN32_WCE) && !defined (_PS3) #elif !defined (_WIN32_WCE) && !defined (_PS3)