Browse Source

fix line endings... again.

master
Robert Förster 8 years ago
parent
commit
0ed9f8b2b7
  1. 1
      .gitattributes
  2. 248
      dev-games/bncsutil/files/bncsutil-ghost.patch
  3. 10
      dev-games/bncsutil/files/bncsutil-werror.patch
  4. 44
      games-server/ghost++/files/cmake/modules/Findbncsutil.cmake
  5. 150
      games-server/ghost++/files/ghost++-ggb.patch
  6. 52
      games-server/ghost++/files/ghost++-stormlib-include.patch

1
.gitattributes

@ -0,0 +1 @@
* text=auto

248
dev-games/bncsutil/files/bncsutil-ghost.patch

@ -1,8 +1,8 @@
Index: src/bncsutil/bsha1.cpp
===================================================================
--- src/bncsutil/bsha1.cpp (revision 5)
+++ src/bncsutil/bsha1.cpp (working copy)
@@ -141,7 +141,7 @@
Index: src/bncsutil/bsha1.cpp
===================================================================
--- src/bncsutil/bsha1.cpp (revision 5)
+++ src/bncsutil/bsha1.cpp (working copy)
@@ -141,7 +141,7 @@
MEXP(void) calcHashBuf(const char* input, size_t length, char* result) {
int i;
@ -11,11 +11,11 @@ Index: src/bncsutil/bsha1.cpp
uint32_t* ldata;
char data[1024];
memset(data, 0, 1024);
Index: src/bncsutil/cdkeydecoder.cpp
===================================================================
--- src/bncsutil/cdkeydecoder.cpp (revision 5)
+++ src/bncsutil/cdkeydecoder.cpp (working copy)
@@ -31,7 +31,8 @@
Index: src/bncsutil/cdkeydecoder.cpp
===================================================================
--- src/bncsutil/cdkeydecoder.cpp (revision 5)
+++ src/bncsutil/cdkeydecoder.cpp (working copy)
@@ -31,7 +31,8 @@
#include <cctype> // for isdigit(), isalnum(), and toupper()
#include <cstring> // for memcpy()
#include <cstdio> // for sscanf()
@ -25,7 +25,7 @@ Index: src/bncsutil/cdkeydecoder.cpp
/**
* Implementation-specific CD-key hash structure.
*/
@@ -329,7 +330,7 @@
@@ -329,7 +330,7 @@
}
if ((accum % 10) != (cdkey[12] - '0')) {
@ -34,7 +34,7 @@ Index: src/bncsutil/cdkeydecoder.cpp
return 0;
}
@@ -452,7 +453,7 @@
@@ -452,7 +453,7 @@
cdkey[i] = toupper(cdkey[i]);
a = (b + 0x07B5) % W3_BUFLEN;
b = (a + 0x07B5) % W3_BUFLEN;
@ -43,11 +43,11 @@ Index: src/bncsutil/cdkeydecoder.cpp
table[a] = (decode / 5);
table[b] = (decode % 5);
}
Index: src/bncsutil/checkrevision.cpp
===================================================================
--- src/bncsutil/checkrevision.cpp (revision 5)
+++ src/bncsutil/checkrevision.cpp (working copy)
@@ -83,13 +83,14 @@
Index: src/bncsutil/checkrevision.cpp
===================================================================
--- src/bncsutil/checkrevision.cpp (revision 5)
+++ src/bncsutil/checkrevision.cpp (working copy)
@@ -83,13 +83,14 @@
checkrevision_seeds.push_back(0x11BF6A18);
checkrevision_seeds.push_back(0xC57292E6);
checkrevision_seeds.push_back(0x7927D27E);
@ -64,7 +64,7 @@ Index: src/bncsutil/checkrevision.cpp
return 0;
}
@@ -124,7 +125,7 @@
@@ -124,7 +125,7 @@
return mpqNum;
}
@ -73,7 +73,7 @@ Index: src/bncsutil/checkrevision.cpp
{
const char* base;
@@ -139,7 +140,8 @@
@@ -139,7 +140,8 @@
MEXP(int) checkRevision(const char* formula, const char* files[], int numFiles,
int mpqNumber, unsigned long* checksum)
{
@ -83,7 +83,7 @@ Index: src/bncsutil/checkrevision.cpp
char ops[4];
const char* token;
int curFormula = 0;
@@ -158,9 +160,9 @@
@@ -158,9 +160,9 @@
bncsutil_debug_message_a("}, %d, %d, %p);", numFiles, mpqNumber, checksum);
#endif
@ -96,7 +96,7 @@ Index: src/bncsutil/checkrevision.cpp
return 0;
}
@@ -171,8 +173,8 @@
@@ -171,8 +173,8 @@
}
if (seed_count <= (size_t) mpqNumber) {
@ -107,7 +107,7 @@ Index: src/bncsutil/checkrevision.cpp
return 0;
}
@@ -181,19 +183,19 @@
@@ -181,19 +183,19 @@
if (*(token + 1) == '=') {
int variable = BUCR_GETNUM(*token);
if (variable < 0 || variable > 3) {
@ -132,7 +132,7 @@ Index: src/bncsutil/checkrevision.cpp
return 0;
}
ovd[curFormula] = variable;
@@ -221,8 +223,8 @@
@@ -221,8 +223,8 @@
f = file_open(files[i], FILE_READ);
if (!f) {
@ -143,7 +143,7 @@ Index: src/bncsutil/checkrevision.cpp
return 0;
}
@@ -233,8 +235,8 @@
@@ -233,8 +235,8 @@
file_buffer = (uint8_t*) file_map(f, file_len, 0);
if (!file_buffer) {
file_close(f);
@ -154,7 +154,7 @@ Index: src/bncsutil/checkrevision.cpp
return 0;
}
@@ -251,8 +253,8 @@
@@ -251,8 +253,8 @@
buffer_size = file_len + extra;
dwBuf = (uint32_t*) malloc(buffer_size);
if (!dwBuf) {
@ -165,7 +165,7 @@ Index: src/bncsutil/checkrevision.cpp
file_unmap(f, file_buffer);
file_close(f);
return 0;
@@ -351,7 +353,7 @@
@@ -351,7 +353,7 @@
if (!file_name || !exe_info || !exe_info_size || !version)
return 0;
@ -174,11 +174,11 @@ Index: src/bncsutil/checkrevision.cpp
switch (platform) {
case BNCSUTIL_PLATFORM_X86:
Index: src/bncsutil/debug.c
===================================================================
--- src/bncsutil/debug.c (revision 5)
+++ src/bncsutil/debug.c (working copy)
@@ -18,7 +18,7 @@
Index: src/bncsutil/debug.c
===================================================================
--- src/bncsutil/debug.c (revision 5)
+++ src/bncsutil/debug.c (working copy)
@@ -18,7 +18,7 @@
#include <time.h>
#endif
@ -187,7 +187,7 @@ Index: src/bncsutil/debug.c
{
int enabled;
#ifdef MOS_WINDOWS
@@ -29,36 +29,36 @@
@@ -29,36 +29,36 @@
#else
FILE* output;
#endif
@ -231,7 +231,7 @@ Index: src/bncsutil/debug.c
~FOREGROUND_INTENSITY);
}
@@ -69,14 +69,14 @@
@@ -69,14 +69,14 @@
if (AllocConsole()) {
// only set title if new console was created
SetConsoleTitle("BNCSutil Debug Console");
@ -252,7 +252,7 @@ Index: src/bncsutil/debug.c
~(FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE |
FOREGROUND_INTENSITY);
}
@@ -87,9 +87,9 @@
@@ -87,9 +87,9 @@
#ifdef MOS_WINDOWS
DWORD chars_written;
BOOL res;
@ -264,7 +264,7 @@ Index: src/bncsutil/debug.c
&chars_written, (LPVOID) 0);
return (res) ? (size_t) chars_written : (size_t) -1;
#else
@@ -101,7 +101,7 @@
@@ -101,7 +101,7 @@
{
#ifdef MOS_WINDOWS
CONSOLE_SCREEN_BUFFER_INFO info;
@ -273,11 +273,11 @@ Index: src/bncsutil/debug.c
return (size_t) 0;
return (size_t) info.dwSize.X;
#else
Index: src/bncsutil/debug.h
===================================================================
--- src/bncsutil/debug.h (revision 5)
+++ src/bncsutil/debug.h (working copy)
@@ -6,86 +6,99 @@
Index: src/bncsutil/debug.h
===================================================================
--- src/bncsutil/debug.h (revision 5)
+++ src/bncsutil/debug.h (working copy)
@@ -6,86 +6,99 @@
* April 1, 2006
*/
@ -442,13 +442,13 @@ Index: src/bncsutil/debug.h
+
#endif
-
-#endif /* DEBUG */
\ No newline at end of file
Index: src/bncsutil/file.cpp
===================================================================
--- src/bncsutil/file.cpp (revision 5)
+++ src/bncsutil/file.cpp (working copy)
@@ -44,7 +44,7 @@
-#endif /* DEBUG */
\ No newline at end of file
Index: src/bncsutil/file.cpp
===================================================================
--- src/bncsutil/file.cpp (revision 5)
+++ src/bncsutil/file.cpp (working copy)
@@ -44,7 +44,7 @@
DWORD access;
DWORD share_mode;
DWORD open_mode;
@ -457,7 +457,7 @@ Index: src/bncsutil/file.cpp
size_t filename_buf_len;
if (mode & FILE_READ) {
@@ -61,18 +61,16 @@
@@ -61,18 +61,16 @@
FILE_ATTRIBUTE_NORMAL, NULL);
if (file == INVALID_HANDLE_VALUE) {
@ -480,7 +480,7 @@ Index: src/bncsutil/file.cpp
CloseHandle(file);
return (file_t) 0;
}
@@ -80,8 +78,7 @@
@@ -80,8 +78,7 @@
filename_buf_len = strlen(filename) + 1;
data->filename = (const char*) malloc(filename_buf_len);
if (!data->filename) {
@ -490,7 +490,7 @@ Index: src/bncsutil/file.cpp
CloseHandle(file);
delete data;
return (file_t) 0;
@@ -98,7 +95,7 @@
@@ -98,7 +95,7 @@
mapping_map::iterator it;
if (!file) {
@ -499,7 +499,7 @@ Index: src/bncsutil/file.cpp
return;
}
@@ -144,24 +141,21 @@
@@ -144,24 +141,21 @@
HANDLE mapping =
CreateFileMapping((HANDLE) file->f, NULL, PAGE_READONLY, 0, 0, NULL);
void* base;
@ -531,7 +531,7 @@ Index: src/bncsutil/file.cpp
return (void*) 0;
}
@@ -176,8 +170,7 @@
@@ -176,8 +170,7 @@
HANDLE mapping;
if (item == file->mappings.end()) {
@ -541,7 +541,7 @@ Index: src/bncsutil/file.cpp
return;
}
@@ -197,7 +190,7 @@
@@ -197,7 +190,7 @@
file_t data;
FILE* f;
size_t filename_buf_len;
@ -550,7 +550,7 @@ Index: src/bncsutil/file.cpp
if (mode_flags & FILE_WRITE)
mode[0] = 'w';
@@ -210,8 +203,7 @@
@@ -210,8 +203,7 @@
try {
data = new _file;
} catch (std::bad_alloc) {
@ -560,7 +560,7 @@ Index: src/bncsutil/file.cpp
fclose(f);
return (file_t) 0;
}
@@ -219,10 +211,9 @@
@@ -219,10 +211,9 @@
filename_buf_len = strlen(filename) + 1;
data->filename = (const char*) malloc(filename_buf_len);
if (!data->filename) {
@ -574,7 +574,7 @@ Index: src/bncsutil/file.cpp
fclose(f);
delete data;
return (file_t) 0;
@@ -236,9 +227,10 @@
@@ -236,9 +227,10 @@
void file_close(file_t file)
{
@ -587,7 +587,7 @@ Index: src/bncsutil/file.cpp
return;
}
@@ -277,14 +269,12 @@
@@ -277,14 +269,12 @@
{
int fd = fileno(file->f);
void* base = mmap((void*) 0, len, PROT_READ, MAP_SHARED, fd, offset);
@ -606,7 +606,7 @@ Index: src/bncsutil/file.cpp
return (void*) 0;
}
@@ -299,8 +289,7 @@
@@ -299,8 +289,7 @@
size_t len;
if (item == file->mappings.end()) {
@ -616,22 +616,22 @@ Index: src/bncsutil/file.cpp
return;
}
Index: src/bncsutil/keytables.h
===================================================================
--- src/bncsutil/keytables.h (revision 5)
+++ src/bncsutil/keytables.h (working copy)
@@ -128,4 +128,4 @@
Index: src/bncsutil/keytables.h
===================================================================
--- src/bncsutil/keytables.h (revision 5)
+++ src/bncsutil/keytables.h (working copy)
@@ -128,4 +128,4 @@
} // extern "C"
#endif
-#endif /* BNCSUTIL_KEYTABLES_H */
\ No newline at end of file
-#endif /* BNCSUTIL_KEYTABLES_H */
\ No newline at end of file
+#endif /* BNCSUTIL_KEYTABLES_H */
Index: src/bncsutil/libinfo.cpp
===================================================================
--- src/bncsutil/libinfo.cpp (revision 5)
+++ src/bncsutil/libinfo.cpp (working copy)
@@ -49,9 +49,8 @@
Index: src/bncsutil/libinfo.cpp
===================================================================
--- src/bncsutil/libinfo.cpp (revision 5)
+++ src/bncsutil/libinfo.cpp (working copy)
@@ -49,9 +49,8 @@
rev = ver;
if (rev > 99 || rev < 0) return 0;
@ -641,13 +641,13 @@ Index: src/bncsutil/libinfo.cpp
outBuf[8] = '\0';
return printed;
}
-
\ No newline at end of file
Index: src/bncsutil/mutil.h
===================================================================
--- src/bncsutil/mutil.h (revision 5)
+++ src/bncsutil/mutil.h (working copy)
@@ -27,6 +27,9 @@
-
\ No newline at end of file
Index: src/bncsutil/mutil.h
===================================================================
--- src/bncsutil/mutil.h (revision 5)
+++ src/bncsutil/mutil.h (working copy)
@@ -27,6 +27,9 @@
#ifndef MUTIL_H
#define MUTIL_H
@ -657,7 +657,7 @@ Index: src/bncsutil/mutil.h
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -35,6 +38,13 @@
@@ -35,6 +38,13 @@
#include "mutil_types.h"
#include <stdlib.h>
@ -671,7 +671,7 @@ Index: src/bncsutil/mutil.h
#ifdef _MSC_VER
#pragma intrinsic(_lrotl,_lrotr) /* use intrinsic compiler rotations */
#define ROL(x,n) _lrotl((x),(n))
@@ -163,6 +173,6 @@
@@ -163,6 +173,6 @@
#define NULL 0
#endif /* NULL */
@ -679,11 +679,11 @@ Index: src/bncsutil/mutil.h
+// #include <bncsutil/debug.h>
#endif /* MUTIL_H */
Index: src/bncsutil/mutil_types.h
===================================================================
--- src/bncsutil/mutil_types.h (revision 5)
+++ src/bncsutil/mutil_types.h (working copy)
@@ -26,6 +26,10 @@
Index: src/bncsutil/mutil_types.h
===================================================================
--- src/bncsutil/mutil_types.h (revision 5)
+++ src/bncsutil/mutil_types.h (working copy)
@@ -26,6 +26,10 @@
#ifndef BNCSUTIL_MUTIL_TYPES_H_INCLUDED
#define BNCSUTIL_MUTIL_TYPES_H_INCLUDED
@ -694,40 +694,40 @@ Index: src/bncsutil/mutil_types.h
#if defined(_MSC_VER) || (defined(HAVE_STDINT_H) && !HAVE_STDINT_H)
// no stdint.h available
// so just wing it
@@ -136,4 +140,6 @@
@@ -136,4 +140,6 @@
#include <stdint.h>
#endif
+#endif /* WIN32 */
+
#endif /* BNCSUTIL_MUTIL_TYPES_H_INCLUDED */
Index: src/bncsutil/oldauth.cpp
===================================================================
--- src/bncsutil/oldauth.cpp (revision 5)
+++ src/bncsutil/oldauth.cpp (working copy)
@@ -64,4 +64,4 @@
Index: src/bncsutil/oldauth.cpp
===================================================================
--- src/bncsutil/oldauth.cpp (revision 5)
+++ src/bncsutil/oldauth.cpp (working copy)
@@ -64,4 +64,4 @@
bncsutil_debug_message_a("hashPassword(\"%s\") =", password);
bncsutil_debug_dump(outBuffer, 20);
#endif
-}
\ No newline at end of file
-}
\ No newline at end of file
+}
Index: src/bncsutil/oldauth.h
===================================================================
--- src/bncsutil/oldauth.h (revision 5)
+++ src/bncsutil/oldauth.h (working copy)
@@ -46,4 +46,4 @@
Index: src/bncsutil/oldauth.h
===================================================================
--- src/bncsutil/oldauth.h (revision 5)
+++ src/bncsutil/oldauth.h (working copy)
@@ -46,4 +46,4 @@
} // extern "C"
#endif
-#endif /* BNCSUTIL_OLDAUTH_H */
\ No newline at end of file
-#endif /* BNCSUTIL_OLDAUTH_H */
\ No newline at end of file
+#endif /* BNCSUTIL_OLDAUTH_H */
Index: src/bncsutil/pe.c
===================================================================
--- src/bncsutil/pe.c (revision 5)
+++ src/bncsutil/pe.c (working copy)
@@ -37,7 +37,7 @@
Index: src/bncsutil/pe.c
===================================================================
--- src/bncsutil/pe.c (revision 5)
+++ src/bncsutil/pe.c (working copy)
@@ -37,7 +37,7 @@
cm_pe_optional_header_t* opt_header;
cm_pe_windows_header_t* win_header;
long pe_offset = 0;
@ -736,7 +736,7 @@ Index: src/bncsutil/pe.c
size_t count;
pe = (cm_pe_t) malloc(sizeof(struct cm_pe));
@@ -296,7 +296,7 @@
@@ -296,7 +296,7 @@
cm_stack_push(stack, root);
@ -745,7 +745,7 @@ Index: src/bncsutil/pe.c
while (dir->subdir_count + dir->resource_count <
dir->named_entry_count + dir->id_entry_count)
{
@@ -376,7 +376,7 @@
@@ -376,7 +376,7 @@
cm_stack_push(stack, root);
@ -754,18 +754,18 @@ Index: src/bncsutil/pe.c
if (dir->subdir_count) {
dir->subdir_count--;
cm_stack_push(stack, dir);
@@ -481,4 +481,4 @@
@@ -481,4 +481,4 @@
dir->offset = (uint32_t) ftell(f);
return 1;
-}
\ No newline at end of file
-}
\ No newline at end of file
+}
Index: src/bncsutil/stack.c
===================================================================
--- src/bncsutil/stack.c (revision 5)
+++ src/bncsutil/stack.c (working copy)
@@ -20,7 +20,8 @@
Index: src/bncsutil/stack.c
===================================================================
--- src/bncsutil/stack.c (revision 5)
+++ src/bncsutil/stack.c (working copy)
@@ -20,7 +20,8 @@
* A copy of the GNU Lesser General Public License is included in the BNCSutil
* distribution in the file COPYING. If you did not receive this copy,
* write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
@ -775,21 +775,21 @@ Index: src/bncsutil/stack.c
/*
* Mule Server
@@ -109,4 +110,4 @@
@@ -109,4 +110,4 @@
return 0;
return stack->size;
-}
\ No newline at end of file
-}
\ No newline at end of file
+}
Index: src/bncsutil/stack.h
===================================================================
--- src/bncsutil/stack.h (revision 5)
+++ src/bncsutil/stack.h (working copy)
@@ -51,4 +51,4 @@
Index: src/bncsutil/stack.h
===================================================================
--- src/bncsutil/stack.h (revision 5)
+++ src/bncsutil/stack.h (working copy)
@@ -51,4 +51,4 @@
void* cm_stack_peek(cm_stack_t stack);
unsigned int cm_stack_size(cm_stack_t stack);
-#endif
\ No newline at end of file
-#endif
\ No newline at end of file
+#endif

10
dev-games/bncsutil/files/bncsutil-werror.patch

@ -1,8 +1,8 @@
Index: configure.ac
===================================================================
--- configure.ac (revision 5)
+++ configure.ac (working copy)
@@ -1,6 +1,6 @@
Index: configure.ac
===================================================================
--- configure.ac (revision 5)
+++ configure.ac (working copy)
@@ -1,6 +1,6 @@
AC_INIT([bncsutil], [1.3.2], [bugs@example.com])
-AM_INIT_AUTOMAKE([-Wall -Werror foreign])

44
games-server/ghost++/files/cmake/modules/Findbncsutil.cmake

@ -1,23 +1,23 @@
# - Find bncsutil
# Find bncsutil headers and libraries.
#
# bncsutil_INCLUDE_DIR - where to find bncsutil.h, etc.
# bncsutil_LIBRARY - List of libraries when using bncsutil.
# bncsutil_FOUND - True if bncsutil found.
# Look for the header file.
FIND_PATH( bncsutil_INCLUDE_DIR NAMES bncsutil.h
PATHS /usr/include/bncsutil /usr/local/include/bncsutil)
MARK_AS_ADVANCED(bncsutil_INCLUDE_DIR)
# Look for the library.
FIND_LIBRARY( bncsutil_LIBRARY NAMES bncsutil
PATHS /usr/lib /usr/lib64 )
MARK_AS_ADVANCED(bncsutil_LIBRARY)
# Copy the results to the output variables.
IF(bncsutil_INCLUDE_DIR AND bncsutil_LIBRARY)
SET(bncsutil_FOUND 1)
ELSE(bncsutil_INCLUDE_DIR AND bncsutil_LIBRARY)
SET(bncsutil_FOUND 0)
# - Find bncsutil
# Find bncsutil headers and libraries.
#
# bncsutil_INCLUDE_DIR - where to find bncsutil.h, etc.
# bncsutil_LIBRARY - List of libraries when using bncsutil.
# bncsutil_FOUND - True if bncsutil found.
# Look for the header file.
FIND_PATH( bncsutil_INCLUDE_DIR NAMES bncsutil.h
PATHS /usr/include/bncsutil /usr/local/include/bncsutil)
MARK_AS_ADVANCED(bncsutil_INCLUDE_DIR)
# Look for the library.
FIND_LIBRARY( bncsutil_LIBRARY NAMES bncsutil
PATHS /usr/lib /usr/lib64 )
MARK_AS_ADVANCED(bncsutil_LIBRARY)
# Copy the results to the output variables.
IF(bncsutil_INCLUDE_DIR AND bncsutil_LIBRARY)
SET(bncsutil_FOUND 1)
ELSE(bncsutil_INCLUDE_DIR AND bncsutil_LIBRARY)
SET(bncsutil_FOUND 0)
ENDIF(bncsutil_INCLUDE_DIR AND bncsutil_LIBRARY)

150
games-server/ghost++/files/ghost++-ggb.patch

@ -1,17 +1,17 @@
Index: ghost/game_base.cpp
===================================================================
--- ghost/game_base.cpp (revision 580)
+++ ghost/game_base.cpp (working copy)
@@ -388,12 +388,13 @@
// we also broadcast the game to the local network every 5 seconds so we hijack this timer for our nefarious purposes
// however we only want to broadcast if the countdown hasn't started
- // see the !sendlan code later in this file for some more information about how this works
- // todotodo: should we send a game cancel message somewhere? we'll need to implement a host counter for it to work
-
- if( !m_CountDownStarted )
- {
- // construct a fixed host counter which will be used to identify players from this "realm" (i.e. LAN)
Index: ghost/game_base.cpp
===================================================================
--- ghost/game_base.cpp (revision 580)
+++ ghost/game_base.cpp (working copy)
@@ -388,12 +388,13 @@
// we also broadcast the game to the local network every 5 seconds so we hijack this timer for our nefarious purposes
// however we only want to broadcast if the countdown hasn't started
- // see the !sendlan code later in this file for some more information about how this works
- // todotodo: should we send a game cancel message somewhere? we'll need to implement a host counter for it to work
-
- if( !m_CountDownStarted )
- {
- // construct a fixed host counter which will be used to identify players from this "realm" (i.e. LAN)
+ // see the !sendlan code later in this file for some more information about how this works
+ // todotodo: should we send a game cancel message somewhere? we'll need to implement a host counter for it to work
+
@ -19,23 +19,23 @@ Index: ghost/game_base.cpp
+ if( !m_CountDownStarted )
+ {
+ // construct a fixed host counter which will be used to identify players from this "realm" (i.e. LAN)
// the fixed host counter's 4 most significant bits will contain a 4 bit ID (0-15)
// the rest of the fixed host counter will contain the 28 least significant bits of the actual host counter
// since we're destroying 4 bits of information here the actual host counter should not be greater than 2^28 which is a reasonable assumption
Index: ghost/ghost.cpp
===================================================================
--- ghost/ghost.cpp (revision 580)
+++ ghost/ghost.cpp (working copy)
@@ -677,12 +677,20 @@
if( m_AdminGamePort == m_HostPort )
CONSOLE_Print( "[GHOST] warning - admingame_port and bot_hostport are set to the same value, you won't be able to host any games" );
}
- else
- m_AdminGame = NULL;
-
- if( m_BNETs.empty( ) && !m_AdminGame )
- CONSOLE_Print( "[GHOST] warning - no battle.net connections found and no admin game created" );
-
// the fixed host counter's 4 most significant bits will contain a 4 bit ID (0-15)
// the rest of the fixed host counter will contain the 28 least significant bits of the actual host counter
// since we're destroying 4 bits of information here the actual host counter should not be greater than 2^28 which is a reasonable assumption
Index: ghost/ghost.cpp
===================================================================
--- ghost/ghost.cpp (revision 580)
+++ ghost/ghost.cpp (working copy)
@@ -677,12 +677,20 @@
if( m_AdminGamePort == m_HostPort )
CONSOLE_Print( "[GHOST] warning - admingame_port and bot_hostport are set to the same value, you won't be able to host any games" );
}
- else
- m_AdminGame = NULL;
-
- if( m_BNETs.empty( ) && !m_AdminGame )
- CONSOLE_Print( "[GHOST] warning - no battle.net connections found and no admin game created" );
-
+ else
+ m_AdminGame = NULL;
+
@ -50,16 +50,16 @@ Index: ghost/ghost.cpp
+ if( m_BNETs.empty( ) && !m_AdminGame )
+ CONSOLE_Print( "[GHOST] warning - no battle.net connections found and no admin game created" );
+
#ifdef GHOST_MYSQL
CONSOLE_Print( "[GHOST] GHost++ Version " + m_Version + " (with MySQL support)" );
#else
@@ -881,9 +889,23 @@
{
(*i)->SetFD( &fd, &send_fd, &nfds );
++NumFDs;
- }
-
- // before we call select we need to determine how long to block for
#ifdef GHOST_MYSQL
CONSOLE_Print( "[GHOST] GHost++ Version " + m_Version + " (with MySQL support)" );
#else
@@ -881,9 +889,23 @@
{
(*i)->SetFD( &fd, &send_fd, &nfds );
++NumFDs;
- }
-
- // before we call select we need to determine how long to block for
+ }
+ // 6. the Game Broadcasters
+ for(vector<CTCPSocket * >::iterator i = m_GameBroadcasters.begin( ); i!= m_GameBroadcasters.end( ); i++ )
@ -77,19 +77,19 @@ Index: ghost/ghost.cpp
+
+
+ // before we call select we need to determine how long to block for
// previously we just blocked for a maximum of the passed usecBlock microseconds
// however, in an effort to make game updates happen closer to the desired latency setting we now use a dynamic block interval
// note: we still use the passed usecBlock as a hard maximum
@@ -1170,12 +1192,37 @@
}
}
- m_LastAutoHostTime = GetTime( );
- }
-
- return m_Exiting || AdminExit || BNETExit;
-}
-
// previously we just blocked for a maximum of the passed usecBlock microseconds
// however, in an effort to make game updates happen closer to the desired latency setting we now use a dynamic block interval
// note: we still use the passed usecBlock as a hard maximum
@@ -1170,12 +1192,37 @@
}
}
- m_LastAutoHostTime = GetTime( );
- }
-
- return m_Exiting || AdminExit || BNETExit;
-}
-
+ m_LastAutoHostTime = GetTime( );
+ }
+
@ -121,20 +121,20 @@ Index: ghost/ghost.cpp
+ return m_Exiting || AdminExit || BNETExit;
+}
+
void CGHost :: EventBNETConnecting( CBNET *bnet )
{
if( m_AdminGame )
Index: ghost/ghost.h
===================================================================
--- ghost/ghost.h (revision 580)
+++ ghost/ghost.h (working copy)
@@ -130,13 +130,15 @@
string m_AdminGameMap; // config value: the admin game map config to use
unsigned char m_LANWar3Version; // config value: LAN warcraft 3 version
uint32_t m_ReplayWar3Version; // config value: replay warcraft 3 version (for saving replays)
- uint32_t m_ReplayBuildNumber; // config value: replay build number (for saving replays)
- bool m_TCPNoDelay; // config value: use Nagle's algorithm or not
- uint32_t m_MatchMakingMethod; // config value: the matchmaking method
void CGHost :: EventBNETConnecting( CBNET *bnet )
{
if( m_AdminGame )
Index: ghost/ghost.h
===================================================================
--- ghost/ghost.h (revision 580)
+++ ghost/ghost.h (working copy)
@@ -130,13 +130,15 @@
string m_AdminGameMap; // config value: the admin game map config to use
unsigned char m_LANWar3Version; // config value: LAN warcraft 3 version
uint32_t m_ReplayWar3Version; // config value: replay warcraft 3 version (for saving replays)
- uint32_t m_ReplayBuildNumber; // config value: replay build number (for saving replays)
- bool m_TCPNoDelay; // config value: use Nagle's algorithm or not
- uint32_t m_MatchMakingMethod; // config value: the matchmaking method
+ uint32_t m_ReplayBuildNumber; // config value: replay build number (for saving replays)
+ bool m_TCPNoDelay; // config value: use Nagle's algorithm or not
+ uint32_t m_MatchMakingMethod; // config value: the matchmaking method
@ -143,10 +143,10 @@ Index: ghost/ghost.h
+
+ CGHost( CConfig *CFG );
+ ~CGHost( );
- CGHost( CConfig *CFG );
- ~CGHost( );
-
// processing functions
bool Update( long usecBlock );
- CGHost( CConfig *CFG );
- ~CGHost( );
-
// processing functions
bool Update( long usecBlock );

52
games-server/ghost++/files/ghost++-stormlib-include.patch

@ -1,26 +1,26 @@
Index: ghost/ghost.cpp
===================================================================
--- ghost/ghost.cpp (revision 572)
+++ ghost/ghost.cpp (working copy)
@@ -48,7 +48,7 @@
#endif
#define __STORMLIB_SELF__
-#include <stormlib/StormLib.h>
+#include <StormLib.h>
/*
Index: ghost/map.cpp
===================================================================
--- ghost/map.cpp (revision 572)
+++ ghost/map.cpp (working copy)
@@ -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
Index: ghost/ghost.cpp
===================================================================
--- ghost/ghost.cpp (revision 572)
+++ ghost/ghost.cpp (working copy)
@@ -48,7 +48,7 @@
#endif
#define __STORMLIB_SELF__
-#include <stormlib/StormLib.h>
+#include <StormLib.h>
/*
Index: ghost/map.cpp
===================================================================
--- ghost/map.cpp (revision 572)
+++ ghost/map.cpp (working copy)
@@ -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
Loading…
Cancel
Save