More coding style.

This commit is contained in:
tomrus88 2009-05-29 10:04:29 +04:00
parent b0006cfbc0
commit 27395d13c4
2 changed files with 11 additions and 6 deletions

View file

@ -24,7 +24,7 @@
#define __STORMLIB_SELF__ // Don't use StormLib.lib #define __STORMLIB_SELF__ // Don't use StormLib.lib
#include "StormLib.h" #include "StormLib.h"
#pragma warning(disable : 4505) #pragma warning(disable : 4505)
#pragma comment(lib, "Winmm.lib") #pragma comment(lib, "Winmm.lib")
//From Extractor //From Extractor
@ -44,7 +44,8 @@
typedef unsigned char uint8; typedef unsigned char uint8;
typedef unsigned short uint16; typedef unsigned short uint16;
typedef unsigned int uint32; typedef unsigned int uint32;
typedef struct{ typedef struct
{
char name[64]; char name[64];
unsigned int id; unsigned int id;
}map_id; }map_id;
@ -208,14 +209,17 @@ int ExtractWmo(const std::vector<std::string>& pArchiveNames)
// Close the search handle // Close the search handle
if(hFind != NULL) if(hFind != NULL)
SFileFindClose(hFind); SFileFindClose(hFind);
} }
} }
// Close both archives // Close both archives
if(hMpq != NULL) if(hMpq != NULL)
{
//SFileCloseArchive(hMpq); //SFileCloseArchive(hMpq);
if(nError == ERROR_SUCCESS) }
printf("\nExtract wmo complete (No errors)\n");
if(nError == ERROR_SUCCESS)
printf("\nExtract wmo complete (No errors)\n");
return nError; return nError;
} }

View file

@ -106,7 +106,8 @@ WDTFile::~WDTFile(void)
ADTFile* WDTFile::GetMap(int x, int z) ADTFile* WDTFile::GetMap(int x, int z)
{ {
if(!(x>=0 && z >= 0 && x<64 && z<64)) return NULL; if(!(x>=0 && z >= 0 && x<64 && z<64))
return NULL;
char name[512]; char name[512];