mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
games/maelstrom: Fix build.
This commit is contained in:
parent
a02ac510ed
commit
99d5b840db
4 changed files with 63 additions and 16 deletions
|
@ -158,10 +158,6 @@ player numbers, and will set up the proper addresses for all players.
|
|||
It can field multiple games, and can be a "game hub" where a bunch
|
||||
of players can get together for romping network games. :)
|
||||
.P
|
||||
\fBNOTE\fR: Maelstrom-netd will not run correctly on 64\-bit hosts,
|
||||
and Maelstrom running on a 64\-bit host cannot successfully play in a
|
||||
mutiplayer game with the -server option. Use non\-server networked
|
||||
play mode instead.
|
||||
.SS Network Ports
|
||||
By default, Maelstrom uses UDP ports 44718 to 44720 for networked games,
|
||||
where the port number is the player number plus 44717.
|
||||
|
|
|
@ -9,7 +9,3 @@ deadlier.
|
|||
This package also comes with a script to create Slackware packages
|
||||
from the Maelstrom add-on graphics/sound files.
|
||||
Run 'maelstrom_addon_package.pl --help' for more information.
|
||||
|
||||
Note to users of 64-bit and other non-x86 Slackware derivatives: you
|
||||
won't be able to host or join multiplayer games that use a server.
|
||||
Peer to peer (without the -server argument) multiplayer works OK though.
|
||||
|
|
|
@ -1,6 +1,60 @@
|
|||
diff -Naur Maelstrom-3.0.6/screenlib/SDL_FrameBuf.cpp Maelstrom-3.0.6.patched/screenlib/SDL_FrameBuf.cpp
|
||||
--- Maelstrom-3.0.6/screenlib/SDL_FrameBuf.cpp 2001-07-22 17:03:13.000000000 -0400
|
||||
+++ Maelstrom-3.0.6.patched/screenlib/SDL_FrameBuf.cpp 2009-04-14 14:15:49.000000000 -0400
|
||||
diff -Naur Maelstrom-3.0.6.orig/Maelstrom-netd.c Maelstrom-3.0.6/Maelstrom-netd.c
|
||||
--- Maelstrom-3.0.6.orig/Maelstrom-netd.c 2000-02-12 04:58:59.000000000 -0500
|
||||
+++ Maelstrom-3.0.6/Maelstrom-netd.c 2016-07-30 18:49:48.254076062 -0400
|
||||
@@ -9,8 +9,11 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
+#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <time.h>
|
||||
|
||||
/* We wait in a loop for players to connect and tell us how many people
|
||||
are playing. Then, once all players have connected, then we broadcast
|
||||
@@ -181,7 +184,7 @@
|
||||
exit(sig);
|
||||
}
|
||||
|
||||
-main(int argc, char *argv[])
|
||||
+int main(int argc, char *argv[])
|
||||
{
|
||||
int netfd, i, slot;
|
||||
struct sockaddr_in serv_addr;
|
||||
@@ -201,7 +204,7 @@
|
||||
memset(&serv_addr, 0, sizeof(serv_addr));
|
||||
serv_addr.sin_family = AF_INET;
|
||||
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
- serv_addr.sin_port = htons(NETPLAY_PORT-1);
|
||||
+ serv_addr.sin_port = htons(NETPLAY_PORT - 1);
|
||||
if (bind(netfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) {
|
||||
perror("Can't bind local address");
|
||||
exit(3);
|
||||
diff -Naur Maelstrom-3.0.6.orig/netlogic/netplay.cpp Maelstrom-3.0.6/netlogic/netplay.cpp
|
||||
--- Maelstrom-3.0.6.orig/netlogic/netplay.cpp 2002-10-20 00:11:52.000000000 -0400
|
||||
+++ Maelstrom-3.0.6/netlogic/netplay.cpp 2016-07-30 18:34:07.295131706 -0400
|
||||
@@ -128,7 +128,7 @@
|
||||
if ( port ) {
|
||||
portnum = atoi(port);
|
||||
} else {
|
||||
- portnum = NETPLAY_PORT+playernum;
|
||||
+ portnum = NETPLAY_PORT + playernum;
|
||||
}
|
||||
if ( host ) {
|
||||
/* Resolve the remote address */
|
||||
@@ -183,7 +183,7 @@
|
||||
if ( port ) {
|
||||
portnum = atoi(port);
|
||||
} else {
|
||||
- portnum = NETPLAY_PORT-1;
|
||||
+ portnum = NETPLAY_PORT - 1;
|
||||
}
|
||||
SDLNet_ResolveHost(&ServAddr, host, portnum);
|
||||
if ( ServAddr.host == INADDR_NONE ) {
|
||||
diff -Naur Maelstrom-3.0.6.orig/screenlib/SDL_FrameBuf.cpp Maelstrom-3.0.6/screenlib/SDL_FrameBuf.cpp
|
||||
--- Maelstrom-3.0.6.orig/screenlib/SDL_FrameBuf.cpp 2001-07-22 17:03:13.000000000 -0400
|
||||
+++ Maelstrom-3.0.6/screenlib/SDL_FrameBuf.cpp 2016-07-30 18:18:37.043186717 -0400
|
||||
@@ -848,8 +848,8 @@
|
||||
for ( i=0; i<dirtymaplen; ++i ) {
|
||||
if ( dirtymap[i] != NULL ) {
|
||||
|
|
|
@ -6,14 +6,15 @@
|
|||
|
||||
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
||||
|
||||
# Note to 64-bit users: Maelstrom-netd and the -server option to Maelstrom
|
||||
# do not work correctly. I haven't investigated why. You can still play
|
||||
# networked games in non-server mode (see man page). Users of 32-bit
|
||||
# Slackware are not affected by this.
|
||||
# 20160730 bkw:
|
||||
# - Fix compile with gcc 5 (for Slack 14.2). Also fix some
|
||||
# compiler warnings while I'm at it.
|
||||
# - Remove warnings about multiplayer not working on 64-bit, it
|
||||
# works now.
|
||||
|
||||
PRGNAM=maelstrom
|
||||
VERSION=${VERSION:-3.0.6}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
SRCNAM=Maelstrom
|
||||
|
|
Loading…
Reference in a new issue