summaryrefslogtreecommitdiff
path: root/games/bfm
diff options
context:
space:
mode:
authorAlejandro Pulver <alepulver@FreeBSD.org>2007-03-22 16:21:18 +0000
committerAlejandro Pulver <alepulver@FreeBSD.org>2007-03-22 16:21:18 +0000
commit192cb8db921e5fb29d5240a156c33cd597f20687 (patch)
treee1f2f6ccd4b2d3e68cbbe7271d48b2b9e661645c /games/bfm
parent- Update to 2.1 (diff)
- Fix building with GCC 4.x.
Reported by: pointyhat
Notes
Notes: svn path=/head/; revision=188033
Diffstat (limited to 'games/bfm')
-rw-r--r--games/bfm/files/patch-src__editor__editloop.c11
-rw-r--r--games/bfm/files/patch-src__include__myendian.h20
-rw-r--r--games/bfm/files/patch-src__unit__unittype.c24
3 files changed, 55 insertions, 0 deletions
diff --git a/games/bfm/files/patch-src__editor__editloop.c b/games/bfm/files/patch-src__editor__editloop.c
new file mode 100644
index 000000000000..b65ab340f691
--- /dev/null
+++ b/games/bfm/files/patch-src__editor__editloop.c
@@ -0,0 +1,11 @@
+--- ./src/editor/editloop.c.orig Thu Apr 14 12:09:25 2005
++++ ./src/editor/editloop.c Thu Mar 22 10:50:07 2007
+@@ -2043,7 +2043,7 @@
+ ---------------------------------------------------------------------------*/
+
+ // Deletes all units, changes player properties and fills map with grass.
+-local int EditorClearMap(void)
++int EditorClearMap(void)
+ {
+ Unit* unit;
+ int mz;
diff --git a/games/bfm/files/patch-src__include__myendian.h b/games/bfm/files/patch-src__include__myendian.h
new file mode 100644
index 000000000000..df135322d8f5
--- /dev/null
+++ b/games/bfm/files/patch-src__include__myendian.h
@@ -0,0 +1,20 @@
+--- ./src/include/myendian.h.orig Thu Apr 14 12:09:25 2005
++++ ./src/include/myendian.h Thu Mar 22 10:53:40 2007
+@@ -102,7 +102,7 @@
+
+ #else
+
+-#define FetchLE16(p) SDL_SwapLE16(*((unsigned short*)(p))++)
++inline Uint16 FetchLE16(Uint16 **p);
+
+ #endif
+
+@@ -122,7 +122,7 @@
+
+ #else
+
+-#define FetchLE32(p) SDL_SwapLE32(*((unsigned int*)(p))++)
++inline Uint32 FetchLE32(Uint32 **p);
+
+ #endif
+
diff --git a/games/bfm/files/patch-src__unit__unittype.c b/games/bfm/files/patch-src__unit__unittype.c
new file mode 100644
index 000000000000..29a10ea006a9
--- /dev/null
+++ b/games/bfm/files/patch-src__unit__unittype.c
@@ -0,0 +1,24 @@
+--- ./src/unit/unittype.c.orig Thu Apr 14 12:09:25 2005
++++ ./src/unit/unittype.c Thu Mar 22 10:54:41 2007
+@@ -263,7 +263,20 @@
+ }
+
+ /// Macro to fetch an 8bit value, to have some looking 8/16/32 bit funcs.
+-#define Fetch8(p) (*((unsigned char*)(p))++)
++inline Uint8 Fetch8(Uint8 **p)
++{
++ return (*p++);
++}
++
++inline Uint16 FetchLE16(Uint16 **p)
++{
++ return (SDL_SwapLE16(*p++));
++}
++
++inline Uint32 FetchLE32(Uint32 **p)
++{
++ return (SDL_SwapLE32(*p++));
++}
+
+ /**
+ ** Parse UDTA area from puds.