gentoo/games-server/ghost++/files/ghost++-stormlib-8.22.patch

88 lines
3.0 KiB
Diff

--- a/ghost/ghost.cpp
+++ b/ghost/ghost.cpp
@@ -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 );
--- a/ghost/map.cpp
+++ b/ghost/map.cpp
@@ -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 ) );
--- a/ghost/socket.h
+++ b/ghost/socket.h
@@ -79,8 +79,6 @@
#define SOCKET_ERROR -1
#define closesocket close
-
- extern int GetLastError( );
#endif
#ifndef INADDR_NONE