3c421cb874
Tested on alpha and sparc64.
130 lines
3.4 KiB
Text
130 lines
3.4 KiB
Text
$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;
|