2016-02-10 18:21:19 +01:00
|
|
|
--- a/ghost/ghost.cpp
|
|
|
|
+++ b/ghost/ghost.cpp
|
2013-11-13 17:10:32 +01:00
|
|
|
@@ -48,7 +48,7 @@
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define __STORMLIB_SELF__
|
|
|
|
-#include <stormlib/StormLib.h>
|
|
|
|
+#include <StormLib.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
@@ -1408,7 +1408,7 @@
|
|
|
|
char *SubFileData = new char[FileLength];
|
|
|
|
DWORD BytesRead = 0;
|
|
|
|
|
|
|
|
- if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead ) )
|
|
|
|
+ if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead, NULL ) )
|
|
|
|
{
|
|
|
|
CONSOLE_Print( "[GHOST] extracting Scripts\\common.j from MPQ file to [" + m_MapCFGPath + "common.j]" );
|
|
|
|
UTIL_FileWrite( m_MapCFGPath + "common.j", (unsigned char *)SubFileData, BytesRead );
|
|
|
|
@@ -1435,7 +1435,7 @@
|
|
|
|
char *SubFileData = new char[FileLength];
|
|
|
|
DWORD BytesRead = 0;
|
|
|
|
|
|
|
|
- if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead ) )
|
|
|
|
+ if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead, NULL ) )
|
|
|
|
{
|
|
|
|
CONSOLE_Print( "[GHOST] extracting Scripts\\blizzard.j from MPQ file to [" + m_MapCFGPath + "blizzard.j]" );
|
|
|
|
UTIL_FileWrite( m_MapCFGPath + "blizzard.j", (unsigned char *)SubFileData, BytesRead );
|
2016-02-10 18:21:19 +01:00
|
|
|
--- a/ghost/map.cpp
|
|
|
|
+++ b/ghost/map.cpp
|
2013-11-13 17:10:32 +01:00
|
|
|
@@ -26,7 +26,7 @@
|
|
|
|
#include "map.h"
|
|
|
|
|
|
|
|
#define __STORMLIB_SELF__
|
|
|
|
-#include <stormlib/StormLib.h>
|
|
|
|
+#include <StormLib.h>
|
|
|
|
|
|
|
|
#define ROTL(x,n) ((x)<<(n))|((x)>>(32-(n))) // this won't work with signed types
|
|
|
|
#define ROTR(x,n) ((x)>>(n))|((x)<<(32-(n))) // this won't work with signed types
|
|
|
|
@@ -313,7 +313,7 @@
|
|
|
|
char *SubFileData = new char[FileLength];
|
|
|
|
DWORD BytesRead = 0;
|
|
|
|
|
|
|
|
- if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead ) )
|
|
|
|
+ if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead, NULL ) )
|
|
|
|
{
|
|
|
|
CONSOLE_Print( "[MAP] overriding default common.j with map copy while calculating map_crc/sha1" );
|
|
|
|
OverrodeCommonJ = true;
|
|
|
|
@@ -349,7 +349,7 @@
|
|
|
|
char *SubFileData = new char[FileLength];
|
|
|
|
DWORD BytesRead = 0;
|
|
|
|
|
|
|
|
- if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead ) )
|
|
|
|
+ if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead, NULL ) )
|
|
|
|
{
|
|
|
|
CONSOLE_Print( "[MAP] overriding default blizzard.j with map copy while calculating map_crc/sha1" );
|
|
|
|
OverrodeBlizzardJ = true;
|
|
|
|
@@ -407,7 +407,7 @@
|
|
|
|
char *SubFileData = new char[FileLength];
|
|
|
|
DWORD BytesRead = 0;
|
|
|
|
|
|
|
|
- if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead ) )
|
|
|
|
+ if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead, NULL ) )
|
|
|
|
{
|
|
|
|
if( *i == "war3map.j" || *i == "scripts\\war3map.j" )
|
|
|
|
FoundScript = true;
|
|
|
|
@@ -474,7 +474,7 @@
|
|
|
|
char *SubFileData = new char[FileLength];
|
|
|
|
DWORD BytesRead = 0;
|
|
|
|
|
|
|
|
- if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead ) )
|
|
|
|
+ if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead, NULL ) )
|
|
|
|
{
|
|
|
|
istringstream ISS( string( SubFileData, BytesRead ) );
|
|
|
|
|
2016-02-10 18:21:19 +01:00
|
|
|
--- a/ghost/socket.h
|
|
|
|
+++ b/ghost/socket.h
|
2013-11-13 17:10:32 +01:00
|
|
|
@@ -79,8 +79,6 @@
|
|
|
|
#define SOCKET_ERROR -1
|
|
|
|
|
|
|
|
#define closesocket close
|
|
|
|
-
|
|
|
|
- extern int GetLastError( );
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef INADDR_NONE
|