summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-strategy/freecnc/files/freecnc-0.2.0-endian.patch')
-rw-r--r--games-strategy/freecnc/files/freecnc-0.2.0-endian.patch124
1 files changed, 0 insertions, 124 deletions
diff --git a/games-strategy/freecnc/files/freecnc-0.2.0-endian.patch b/games-strategy/freecnc/files/freecnc-0.2.0-endian.patch
deleted file mode 100644
index ad8779ace61a..000000000000
--- a/games-strategy/freecnc/files/freecnc-0.2.0-endian.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-freecnc normally bundles a file called 'endian.h' ... this causes problems
-with the real system endian.h. grab upstream cvs fix for this (rename
-endian.h to fcnc_endian.h).
-
---- src/game/loadmap.cpp
-+++ src/game/loadmap.cpp
-@@ -8,3 +8,3 @@
- #include "shpimage.h"
--#include "endian.h"
-+#include "fcnc_endian.h"
- #include "config.h"
---- src/include/fcnc_endian.h
-+++ src/include/fcnc_endian.h
-@@ -0,0 +1,68 @@
-+// mode: -*- C++ -*-
-+/*****************************************************************************
-+ * endian.h - Includes macro definitions to convert bytes to correct endianess
-+ * This code has yet to be tested on Big Endian Machines.
-+ *
-+ * Author: Kareem Dana
-+ ****************************************************************************/
-+
-+#ifndef __FCNC_ENDIAN_H
-+#define __FCNC_ENDIAN_H
-+
-+#include <stdio.h>
-+#include "SDL_endian.h"
-+
-+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
-+ #define readbyte(x,y) x[y]
-+ #define readword(x,y) x[y] + (x[y+1] << 8)
-+ #define readthree(x,y) x[y] + (x[y+1] << 8) + (x[y+2] << 16) + (0 << 24)
-+ #define readlong(x,y) x[y] + (x[y+1] << 8) + (x[y+2] << 16) + (x[y+3] << 24)
-+#else
-+ #define readbyte(x,y) x[y]
-+ #define readword(x,y) SDL_Swap16((x[y] << 8) ^ x[y+1])
-+ #define readthree(x,y) SDL_Swap32((x[y] << 24) ^ (x[y+1] << 16) ^ (x[y+2] << 8))
-+ #define readlong(x,y) SDL_Swap32((x[y] << 24) ^ (x[y+1] << 16) ^ (x[y+2] << 8) ^ (x[y+3]))
-+#endif
-+
-+static __inline__ Uint8 freadbyte(FILE *fptr)
-+{
-+ Uint8 x;
-+ fread(&x,1,1,fptr);
-+ return x;
-+}
-+
-+static __inline__ Uint16 freadword(FILE *fptr)
-+{
-+ Uint16 x;
-+ fread(&x,2,1,fptr);
-+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
-+
-+ return SDL_Swap16(x);
-+#else
-+
-+ return x;
-+#endif
-+}
-+
-+static __inline__ Uint32 freadthree(FILE *fptr)
-+{
-+ /* Can this be made betteR?? */
-+ Uint8 x[3];
-+ fread(x,3,1,fptr);
-+ return readthree(x,0);
-+}
-+
-+static __inline__ Uint32 freadlong(FILE *fptr)
-+{
-+ Uint32 x;
-+ fread(&x, 4, 1, fptr);
-+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
-+
-+ return SDL_Swap32(x);
-+#else
-+
-+ return x;
-+#endif
-+}
-+
-+#endif
---- src/ui/font.cpp
-+++ src/ui/font.cpp
-@@ -1,3 +1,3 @@
- #include "font.h"
--#include "endian.h"
-+#include "fcnc_endian.h"
- #include "vfs.h"
---- src/vfs/vfs_mix/mixvfs.cpp
-+++ src/vfs/vfs_mix/mixvfs.cpp
-@@ -2,3 +2,3 @@
- #include "ws-key.h"
--#include "endian.h"
-+#include "fcnc_endian.h"
- #include "SDL_endian.h"
---- src/video/cpsimage.cpp
-+++ src/video/cpsimage.cpp
-@@ -4,3 +4,3 @@
- #include "inifile.h"
--#include "endian.h"
-+#include "fcnc_endian.h"
- #include "compression.h"
---- src/video/shpimage.cpp
-+++ src/video/shpimage.cpp
-@@ -7,3 +7,3 @@
- #include "inifile.h"
--#include "endian.h"
-+#include "fcnc_endian.h"
- #include "compression.h"
---- src/video/vqa.cpp
-+++ src/video/vqa.cpp
-@@ -1,3 +1,3 @@
- #include "compression.h"
--#include "endian.h"
-+#include "fcnc_endian.h"
- #include "vfs.h"
---- src/video/wsaimage.cpp
-+++ src/video/wsaimage.cpp
-@@ -1,3 +1,3 @@
- #include "wsa.h"
--#include "endian.h"
-+#include "fcnc_endian.h"
- #include "compression.h"