tennix: fix build
in the first attempt git removed whitespaces
This commit is contained in:
parent
7d3ffc5bf8
commit
6d89fff92a
|
@ -1,5 +1,5 @@
|
||||||
From: Thomas Perl <m@thp.io>
|
From: Thomas Perl <m@thp.io>
|
||||||
Description: Fix FTBFS
|
Description: Fix FTBFS
|
||||||
Origin: upstream, http://repo.or.cz/w/tennix.git/commitdiff/6144cb7626dfdc0820a0036af83a531e8e68bae6
|
Origin: upstream, http://repo.or.cz/w/tennix.git/commitdiff/6144cb7626dfdc0820a0036af83a531e8e68bae6
|
||||||
Bug-Debian: http://bugs.debian.org/664907
|
Bug-Debian: http://bugs.debian.org/664907
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ Bug-Debian: http://bugs.debian.org/664907
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
+#include <libgen.h>
|
+#include <libgen.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#include "archive.hh"
|
#include "archive.hh"
|
||||||
--- tennix-1.1.orig/game.c
|
--- tennix-1.1.orig/game.c
|
||||||
+++ tennix-1.1/game.c
|
+++ tennix-1.1/game.c
|
||||||
|
@ -29,37 +29,37 @@ Bug-Debian: http://bugs.debian.org/664907
|
||||||
+++ tennix-1.1/network.h
|
+++ tennix-1.1/network.h
|
||||||
@@ -103,19 +103,19 @@ void
|
@@ -103,19 +103,19 @@ void
|
||||||
net_serialize_ball(const Ball* src, NetworkBall* dest);
|
net_serialize_ball(const Ball* src, NetworkBall* dest);
|
||||||
|
|
||||||
void
|
void
|
||||||
-net_unserialize_ball(const NetworkBall* src, Ball* dest);
|
-net_unserialize_ball(const NetworkBall* src, Ball* dest);
|
||||||
+net_unserialize_ball(NetworkBall* src, Ball* dest);
|
+net_unserialize_ball(NetworkBall* src, Ball* dest);
|
||||||
|
|
||||||
void
|
void
|
||||||
net_serialize_player(const Player* src, NetworkPlayer* dest);
|
net_serialize_player(const Player* src, NetworkPlayer* dest);
|
||||||
|
|
||||||
void
|
void
|
||||||
-net_unserialize_player(const NetworkPlayer* src, Player* dest);
|
-net_unserialize_player(const NetworkPlayer* src, Player* dest);
|
||||||
+net_unserialize_player(NetworkPlayer* src, Player* dest);
|
+net_unserialize_player(NetworkPlayer* src, Player* dest);
|
||||||
|
|
||||||
void
|
void
|
||||||
net_serialize_gamestate(const GameState* src, NetworkGameState* dest);
|
net_serialize_gamestate(const GameState* src, NetworkGameState* dest);
|
||||||
|
|
||||||
void
|
void
|
||||||
-net_unserialize_gamestate(const NetworkGameState* src, GameState* dest);
|
-net_unserialize_gamestate(const NetworkGameState* src, GameState* dest);
|
||||||
+net_unserialize_gamestate(NetworkGameState* src, GameState* dest);
|
+net_unserialize_gamestate(NetworkGameState* src, GameState* dest);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
--- tennix-1.1.orig/locations.h
|
--- tennix-1.1.orig/locations.h
|
||||||
+++ tennix-1.1/locations.h
|
+++ tennix-1.1/locations.h
|
||||||
@@ -155,7 +155,7 @@ static Location locations[] = {
|
@@ -155,7 +155,7 @@ static Location locations[] = {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* End marker */
|
/* End marker */
|
||||||
- { NULL, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0, false }
|
- { NULL, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0, false }
|
||||||
+ { NULL, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0, false, false, 0, 0 }
|
+ { NULL, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0, false, false, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned int location_count()
|
unsigned int location_count()
|
||||||
--- tennix-1.1.orig/tennix.cc
|
--- tennix-1.1.orig/tennix.cc
|
||||||
+++ tennix-1.1/tennix.cc
|
+++ tennix-1.1/tennix.cc
|
||||||
|
@ -75,76 +75,76 @@ Bug-Debian: http://bugs.debian.org/664907
|
||||||
--- tennix-1.1.orig/SDL_rotozoom.c
|
--- tennix-1.1.orig/SDL_rotozoom.c
|
||||||
+++ tennix-1.1/SDL_rotozoom.c
|
+++ tennix-1.1/SDL_rotozoom.c
|
||||||
@@ -365,6 +365,9 @@ int zoomSurfaceRGBA(SDL_Surface * src, S
|
@@ -365,6 +365,9 @@ int zoomSurfaceRGBA(SDL_Surface * src, S
|
||||||
|
|
||||||
int zoomSurfaceY(SDL_Surface * src, SDL_Surface * dst, int flipx, int flipy)
|
int zoomSurfaceY(SDL_Surface * src, SDL_Surface * dst, int flipx, int flipy)
|
||||||
{
|
{
|
||||||
+ (void)flipx;
|
+ (void)flipx;
|
||||||
+ (void)flipy;
|
+ (void)flipy;
|
||||||
+
|
+
|
||||||
Uint32 x, y, sx, sy, *sax, *say, *csax, *csay, csx, csy;
|
Uint32 x, y, sx, sy, *sax, *say, *csax, *csay, csx, csy;
|
||||||
Uint8 *sp, *dp, *csp;
|
Uint8 *sp, *dp, *csp;
|
||||||
int dgap;
|
int dgap;
|
||||||
@@ -393,7 +396,7 @@ int zoomSurfaceY(SDL_Surface * src, SDL_
|
@@ -393,7 +396,7 @@ int zoomSurfaceY(SDL_Surface * src, SDL_
|
||||||
*/
|
*/
|
||||||
csx = 0;
|
csx = 0;
|
||||||
csax = sax;
|
csax = sax;
|
||||||
- for (x = 0; x < dst->w; x++) {
|
- for (x = 0; x < dst->w; x++) {
|
||||||
+ for (x = 0; x < (Uint32)dst->w; x++) {
|
+ for (x = 0; x < (Uint32)dst->w; x++) {
|
||||||
csx += sx;
|
csx += sx;
|
||||||
*csax = (csx >> 16);
|
*csax = (csx >> 16);
|
||||||
csx &= 0xffff;
|
csx &= 0xffff;
|
||||||
@@ -401,7 +404,7 @@ int zoomSurfaceY(SDL_Surface * src, SDL_
|
@@ -401,7 +404,7 @@ int zoomSurfaceY(SDL_Surface * src, SDL_
|
||||||
}
|
}
|
||||||
csy = 0;
|
csy = 0;
|
||||||
csay = say;
|
csay = say;
|
||||||
- for (y = 0; y < dst->h; y++) {
|
- for (y = 0; y < dst->h; y++) {
|
||||||
+ for (y = 0; y < (Uint32)dst->h; y++) {
|
+ for (y = 0; y < (Uint32)dst->h; y++) {
|
||||||
csy += sy;
|
csy += sy;
|
||||||
*csay = (csy >> 16);
|
*csay = (csy >> 16);
|
||||||
csy &= 0xffff;
|
csy &= 0xffff;
|
||||||
@@ -410,13 +413,13 @@ int zoomSurfaceY(SDL_Surface * src, SDL_
|
@@ -410,13 +413,13 @@ int zoomSurfaceY(SDL_Surface * src, SDL_
|
||||||
|
|
||||||
csx = 0;
|
csx = 0;
|
||||||
csax = sax;
|
csax = sax;
|
||||||
- for (x = 0; x < dst->w; x++) {
|
- for (x = 0; x < dst->w; x++) {
|
||||||
+ for (x = 0; x < (Uint32)dst->w; x++) {
|
+ for (x = 0; x < (Uint32)dst->w; x++) {
|
||||||
csx += (*csax);
|
csx += (*csax);
|
||||||
csax++;
|
csax++;
|
||||||
}
|
}
|
||||||
csy = 0;
|
csy = 0;
|
||||||
csay = say;
|
csay = say;
|
||||||
- for (y = 0; y < dst->h; y++) {
|
- for (y = 0; y < dst->h; y++) {
|
||||||
+ for (y = 0; y < (Uint32)dst->h; y++) {
|
+ for (y = 0; y < (Uint32)dst->h; y++) {
|
||||||
csy += (*csay);
|
csy += (*csay);
|
||||||
csay++;
|
csay++;
|
||||||
}
|
}
|
||||||
@@ -432,10 +435,10 @@ int zoomSurfaceY(SDL_Surface * src, SDL_
|
@@ -432,10 +435,10 @@ int zoomSurfaceY(SDL_Surface * src, SDL_
|
||||||
* Draw
|
* Draw
|
||||||
*/
|
*/
|
||||||
csay = say;
|
csay = say;
|
||||||
- for (y = 0; y < dst->h; y++) {
|
- for (y = 0; y < dst->h; y++) {
|
||||||
+ for (y = 0; y < (Uint32)dst->h; y++) {
|
+ for (y = 0; y < (Uint32)dst->h; y++) {
|
||||||
csax = sax;
|
csax = sax;
|
||||||
sp = csp;
|
sp = csp;
|
||||||
- for (x = 0; x < dst->w; x++) {
|
- for (x = 0; x < dst->w; x++) {
|
||||||
+ for (x = 0; x < (Uint32)dst->w; x++) {
|
+ for (x = 0; x < (Uint32)dst->w; x++) {
|
||||||
/*
|
/*
|
||||||
* Draw
|
* Draw
|
||||||
*/
|
*/
|
||||||
@@ -801,6 +804,8 @@ SDL_Surface* rotateSurface90Degrees(SDL_
|
@@ -801,6 +804,8 @@ SDL_Surface* rotateSurface90Degrees(SDL_
|
||||||
void rotozoomSurfaceSizeTrig(int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight,
|
void rotozoomSurfaceSizeTrig(int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight,
|
||||||
double *canglezoom, double *sanglezoom)
|
double *canglezoom, double *sanglezoom)
|
||||||
{
|
{
|
||||||
+ (void)zoomy;
|
+ (void)zoomy;
|
||||||
+
|
+
|
||||||
double x, y, cx, cy, sx, sy;
|
double x, y, cx, cy, sx, sy;
|
||||||
double radangle;
|
double radangle;
|
||||||
int dstwidthhalf, dstheighthalf;
|
int dstwidthhalf, dstheighthalf;
|
||||||
--- tennix-1.1.orig/network.c
|
--- tennix-1.1.orig/network.c
|
||||||
+++ tennix-1.1/network.c
|
+++ tennix-1.1/network.c
|
||||||
@@ -183,7 +183,7 @@ net_serialize_ball(const Ball* src, Netw
|
@@ -183,7 +183,7 @@ net_serialize_ball(const Ball* src, Netw
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
-net_unserialize_ball(const NetworkBall* src, Ball* dest)
|
-net_unserialize_ball(const NetworkBall* src, Ball* dest)
|
||||||
+net_unserialize_ball(NetworkBall* src, Ball* dest)
|
+net_unserialize_ball(NetworkBall* src, Ball* dest)
|
||||||
|
@ -153,7 +153,7 @@ Bug-Debian: http://bugs.debian.org/664907
|
||||||
dest->x = unpack_float(SDLNet_Read32(&(src->x)), -WIDTH, WIDTH*2);
|
dest->x = unpack_float(SDLNet_Read32(&(src->x)), -WIDTH, WIDTH*2);
|
||||||
@@ -213,7 +213,7 @@ net_serialize_player(const Player* src,
|
@@ -213,7 +213,7 @@ net_serialize_player(const Player* src,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
-net_unserialize_player(const NetworkPlayer* src, Player* dest)
|
-net_unserialize_player(const NetworkPlayer* src, Player* dest)
|
||||||
+net_unserialize_player(NetworkPlayer* src, Player* dest)
|
+net_unserialize_player(NetworkPlayer* src, Player* dest)
|
||||||
|
@ -171,36 +171,36 @@ Bug-Debian: http://bugs.debian.org/664907
|
||||||
dest->accelerate = unpack_float(SDLNet_Read32(&(src->accelerate)), 0, 200);
|
dest->accelerate = unpack_float(SDLNet_Read32(&(src->accelerate)), 0, 200);
|
||||||
@@ -250,7 +250,7 @@ net_serialize_gamestate(const GameState*
|
@@ -250,7 +250,7 @@ net_serialize_gamestate(const GameState*
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
-net_unserialize_gamestate(const NetworkGameState* src, GameState* dest)
|
-net_unserialize_gamestate(const NetworkGameState* src, GameState* dest)
|
||||||
+net_unserialize_gamestate(NetworkGameState* src, GameState* dest)
|
+net_unserialize_gamestate(NetworkGameState* src, GameState* dest)
|
||||||
{
|
{
|
||||||
int p;
|
int p;
|
||||||
|
|
||||||
--- tennix-1.1.orig/makefile
|
--- tennix-1.1.orig/makefile
|
||||||
+++ tennix-1.1/makefile
|
+++ tennix-1.1/makefile
|
||||||
@@ -27,24 +27,23 @@ ifeq ($(MKCALLGRAPH),1)
|
@@ -27,24 +27,23 @@ ifeq ($(MKCALLGRAPH),1)
|
||||||
LD = nccld
|
LD = nccld
|
||||||
endif
|
endif
|
||||||
|
|
||||||
-RELEASE = 1.1
|
-RELEASE = 1.1
|
||||||
-
|
-
|
||||||
-UNAME = $(shell uname)
|
-UNAME = $(shell uname)
|
||||||
+RELEASE = 1.1.1
|
+RELEASE = 1.1.1
|
||||||
|
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
BINDIR ?= $(PREFIX)/bin
|
BINDIR ?= $(PREFIX)/bin
|
||||||
DATAROOTDIR ?= $(PREFIX)/share
|
DATAROOTDIR ?= $(PREFIX)/share
|
||||||
DATADIR ?= $(DATAROOTDIR)/games
|
DATADIR ?= $(DATAROOTDIR)/games
|
||||||
|
|
||||||
-LIBS =
|
-LIBS =
|
||||||
-CFLAGS += -W -Wall -ansi -pedantic -Wcast-qual -Wwrite-strings -DVERSION=\"$(RELEASE)\" -O2 -DPREFIX=\"$(PREFIX)\" -g
|
-CFLAGS += -W -Wall -ansi -pedantic -Wcast-qual -Wwrite-strings -DVERSION=\"$(RELEASE)\" -O2 -DPREFIX=\"$(PREFIX)\" -g
|
||||||
+CFLAGS += -W -Wall -DVERSION=\"$(RELEASE)\" -O2 -DPREFIX=\"$(PREFIX)\"
|
+CFLAGS += -W -Wall -DVERSION=\"$(RELEASE)\" -O2 -DPREFIX=\"$(PREFIX)\"
|
||||||
CXXFLAGS += $(CFLAGS)
|
CXXFLAGS += $(CFLAGS)
|
||||||
|
|
||||||
USE_PYTHON ?= 1
|
USE_PYTHON ?= 1
|
||||||
|
|
||||||
ifeq ($(USE_PYTHON),1)
|
ifeq ($(USE_PYTHON),1)
|
||||||
- CFLAGS += `python-config --includes` -DTENNIX_PYTHON
|
- CFLAGS += `python-config --includes` -DTENNIX_PYTHON
|
||||||
- LIBS += `python-config --libs`
|
- LIBS += `python-config --libs`
|
||||||
|
@ -209,12 +209,12 @@ Bug-Debian: http://bugs.debian.org/664907
|
||||||
+ CFLAGS += $(PYTHON_INCLUDES) -DTENNIX_PYTHON
|
+ CFLAGS += $(PYTHON_INCLUDES) -DTENNIX_PYTHON
|
||||||
+ LIBS += $(PYTHON_LIBS)
|
+ LIBS += $(PYTHON_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(NONFREE_LOCATIONS),1)
|
ifeq ($(NONFREE_LOCATIONS),1)
|
||||||
@@ -67,17 +66,14 @@ ifeq ($(MAEMO),1)
|
@@ -67,17 +66,14 @@ ifeq ($(MAEMO),1)
|
||||||
CFLAGS += -DMAEMO
|
CFLAGS += -DMAEMO
|
||||||
endif
|
endif
|
||||||
|
|
||||||
-ifeq ($(UNAME),Darwin)
|
-ifeq ($(UNAME),Darwin)
|
||||||
- SDLLIBS=$$(sdl-config --prefix)/lib
|
- SDLLIBS=$$(sdl-config --prefix)/lib
|
||||||
- LIBS += $$(sdl-config --static-libs) $(SDLLIBS)/libSDL_mixer.a $(SDLLIBS)/libSDL_image.a $(SDLLIBS)/libSDL_ttf.a $(SDLLIBS)/libSDL_net.a $$(freetype-config --prefix)/lib/libfreetype.a
|
- LIBS += $$(sdl-config --static-libs) $(SDLLIBS)/libSDL_mixer.a $(SDLLIBS)/libSDL_image.a $(SDLLIBS)/libSDL_ttf.a $(SDLLIBS)/libSDL_net.a $$(freetype-config --prefix)/lib/libfreetype.a
|
||||||
|
@ -228,7 +228,7 @@ Bug-Debian: http://bugs.debian.org/664907
|
||||||
+
|
+
|
||||||
+LIBS += $(SDL_LIBS) -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net
|
+LIBS += $(SDL_LIBS) -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_net
|
||||||
+CFLAGS += $(SDL_CFLAGS)
|
+CFLAGS += $(SDL_CFLAGS)
|
||||||
|
|
||||||
-SRC = tennix.cc game.c graphics.cc input.c util.c sound.cc animation.c network.c
|
-SRC = tennix.cc game.c graphics.cc input.c util.c sound.cc animation.c network.c
|
||||||
OBJ = tennix.o game.o graphics.o input.o util.o sound.o animation.o archive.o SDL_rotozoom.o network.o
|
OBJ = tennix.o game.o graphics.o input.o util.o sound.o animation.o archive.o SDL_rotozoom.o network.o
|
||||||
+
|
+
|
||||||
|
@ -240,7 +240,7 @@ Bug-Debian: http://bugs.debian.org/664907
|
||||||
@@ -98,6 +98,13 @@ typedef struct {
|
@@ -98,6 +98,13 @@ typedef struct {
|
||||||
bool inhibit_gravity;
|
bool inhibit_gravity;
|
||||||
} Ball;
|
} Ball;
|
||||||
|
|
||||||
+enum PlayerDesire {
|
+enum PlayerDesire {
|
||||||
+ DESIRE_NORMAL,
|
+ DESIRE_NORMAL,
|
||||||
+ DESIRE_TOPSPIN,
|
+ DESIRE_TOPSPIN,
|
||||||
|
@ -266,7 +266,7 @@ Bug-Debian: http://bugs.debian.org/664907
|
||||||
@@ -118,13 +125,6 @@ enum {
|
@@ -118,13 +125,6 @@ enum {
|
||||||
PLAYER_TYPE_AI
|
PLAYER_TYPE_AI
|
||||||
};
|
};
|
||||||
|
|
||||||
-enum {
|
-enum {
|
||||||
- DESIRE_NORMAL,
|
- DESIRE_NORMAL,
|
||||||
- DESIRE_TOPSPIN,
|
- DESIRE_TOPSPIN,
|
||||||
|
@ -276,9 +276,9 @@ Bug-Debian: http://bugs.debian.org/664907
|
||||||
-
|
-
|
||||||
/* wait 2 seconds before we score the game */
|
/* wait 2 seconds before we score the game */
|
||||||
#define SCORING_DELAY 1000
|
#define SCORING_DELAY 1000
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ enum {
|
@@ -161,7 +161,7 @@ enum {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const Location* location;
|
const Location* location;
|
||||||
- char current_location; /* index of loc. in global location table */
|
- char current_location; /* index of loc. in global location table */
|
||||||
|
|
Loading…
Reference in a new issue