pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/games/netmaze/patches s/long/int32_t/ to make this wor...
details: https://anonhg.NetBSD.org/pkgsrc/rev/fdb865dae777
branches: trunk
changeset: 464994:fdb865dae777
user: jdc <jdc%pkgsrc.org@localhost>
date: Fri Dec 19 07:07:19 2003 +0000
description:
s/long/int32_t/ to make this work on 64-bit machines.
Tested on alpha and sparc64.
diffstat:
games/netmaze/patches/patch-al | 130 +++++++++++++++++++++++++++++++++++++++++
games/netmaze/patches/patch-am | 13 ++++
games/netmaze/patches/patch-an | 13 ++++
3 files changed, 156 insertions(+), 0 deletions(-)
diffs (168 lines):
diff -r 3f53ab42f740 -r fdb865dae777 games/netmaze/patches/patch-al
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/netmaze/patches/patch-al Fri Dec 19 07:07:19 2003 +0000
@@ -0,0 +1,130 @@
+$NetBSD: patch-al,v 1.1 2003/12/19 07:07:19 jdc Exp $
+
+--- allmove.c.dist 1994-04-13 12:07:43.000000000 +0100
++++ allmove.c 2003-12-18 11:56:34.000000000 +0000
+@@ -12,24 +12,24 @@
+ extern void play_sound(int);
+ extern int random_maze(MAZE*,int,int);
+
+-extern long trigtab[];
++extern int32_t trigtab[];
+ extern struct shared_struct *sm;
+
+-static void enemy_colision(long,long,PLAYER*,PLAYER*);
++static void enemy_colision(int32_t,int32_t,PLAYER*,PLAYER*);
+ static int enemy_touch(PLAYER *player,PLAYER *players);
+-static void wall_pcoll(long,long,PLAYER*);
++static void wall_pcoll(int32_t,int32_t,PLAYER*);
+ static int wall_scoll(PLAYER*,int nr);
+-static int player_hit(int,long,long,PLAYER *players);
++static int player_hit(int,int32_t,int32_t,PLAYER *players);
+ static void set_player_pos(PLAYER*,int,MAZE *mazeadd);
+ static int add_shot(PLAYER*);
+ static void remove_shot(PLAYER*,int);
+-static int ball_bounce(PLAYER *p,int i,int xc,int yc,long x,long y);
++static int ball_bounce(PLAYER *p,int i,int xc,int yc,int32_t x,int32_t y);
+ static void convert_trigtabs(int divider);
+-void myrandominit(long s);
++void myrandominit(int32_t s);
+ static int myrandom(void);
+ static void reset_player(PLAYER *players,int i);
+
+-long walktab[320],shoottab[320];
++int32_t walktab[320],shoottab[320];
+
+ /*
+ in diesem Programmteil sollten moeglichst keine
+@@ -56,7 +56,7 @@
+ {
+ int i,joy,wink,plynum,j,next;
+ PLAYER *player;
+- long plx,ply;
++ int32_t plx,ply;
+ int count;
+
+ count = 1<<sm->config.divider;
+@@ -379,9 +379,9 @@
+ /* Player <-> Wall Collision */
+ /******************************/
+
+-static void wall_pcoll(long xold,long yold,PLAYER *player)
++static void wall_pcoll(int32_t xold,int32_t yold,PLAYER *player)
+ {
+- long x,y;
++ int32_t x,y;
+ int xc,yc;
+ int xflag=-1;
+ int yflag=-1;
+@@ -519,9 +519,9 @@
+
+ static int wall_scoll(PLAYER *p,int i)
+ {
+- long x,y;
++ int32_t x,y;
+ int xc,yc,flag=0;
+- long sx,sy;
++ int32_t sx,sy;
+
+ sx = p->shots[i].sx;
+ sy = p->shots[i].sy;
+@@ -627,7 +627,7 @@
+ * wall_scoll-helper (not complete yet)
+ */
+
+-static int ball_bounce(PLAYER *p,int i,int xc,int yc,long x,long y)
++static int ball_bounce(PLAYER *p,int i,int xc,int yc,int32_t x,int32_t y)
+ {
+ int f = 0,w = 0;
+
+@@ -716,7 +716,7 @@
+ /* Player <-> Player Collision */
+ /********************************/
+
+-static void enemy_colision(long xold,long yold,PLAYER *player,PLAYER *players)
++static void enemy_colision(int32_t xold,int32_t yold,PLAYER *player,PLAYER *players)
+ {
+ if(enemy_touch(player,players))
+ {
+@@ -728,7 +728,7 @@
+ static int enemy_touch(PLAYER *player,PLAYER *players)
+ {
+ int i;
+- long xd,yd;
++ int32_t xd,yd;
+
+ for(i=0;i<sm->anzplayers;i++,players++)
+ {
+@@ -757,10 +757,10 @@
+ /* -1: no hit / >= 0: playernr. */
+ /********************************/
+
+-static int player_hit(int plnr,long sx,long sy,PLAYER *plys)
++static int player_hit(int plnr,int32_t sx,int32_t sy,PLAYER *plys)
+ {
+ int i;
+- long xd,yd;
++ int32_t xd,yd;
+
+ for(i=0;i<sm->anzplayers;i++,plys++)
+ {
+@@ -949,7 +949,7 @@
+ * "Random" from: r.sedgewick/algorithms
+ */
+
+-void myrandominit(long s)
++void myrandominit(int32_t s)
+ {
+ int j;
+ sm->rndshiftpos = 10;
+@@ -978,9 +978,9 @@
+
+ static void convert_trigtabs(int divider)
+ {
+- long *tab1 = trigtab,*tab2 = walktab,*tab3 = shoottab;
++ int32_t *tab1 = trigtab,*tab2 = walktab,*tab3 = shoottab;
+ int i;
+- long s;
++ int32_t s;
+ static int t = -1;
+
+ if(divider == t) return;
diff -r 3f53ab42f740 -r fdb865dae777 games/netmaze/patches/patch-am
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/netmaze/patches/patch-am Fri Dec 19 07:07:19 2003 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-am,v 1.1 2003/12/19 07:07:19 jdc Exp $
+
+--- texture.c.dist 1994-04-15 21:20:12.000000000 +0100
++++ texture.c 2003-12-18 11:44:10.000000000 +0000
+@@ -25,7 +25,7 @@
+ static long *floortab;
+ long texturemem;
+ extern struct texture *vtex;
+-extern long trigtab[];
++extern int32_t trigtab[];
+
+ /*
+ * Draw a texture-wall.. really not fast
diff -r 3f53ab42f740 -r fdb865dae777 games/netmaze/patches/patch-an
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/netmaze/patches/patch-an Fri Dec 19 07:07:19 2003 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-an,v 1.1 2003/12/19 07:07:19 jdc Exp $
+
+--- trigtab.h.dist 1993-10-15 21:59:30.000000000 +0100
++++ trigtab.h 2003-12-18 11:44:14.000000000 +0000
+@@ -2,7 +2,7 @@
+ * sin/cos tab (DON'T CHANGE!!)
+ */
+
+-long trigtab[] = {
++int32_t trigtab[] = {
+ 0x00000000,0x00064855,0x000c8fb2,0x0012d520,
+ 0x001917a6,0x001f564e,0x00259020,0x002bc428,
+ 0x0031f170,0x00381704,0x003e33f2,0x00444749,
Home |
Main Index |
Thread Index |
Old Index