-/* $Header: /cvsroot/src/games/warp/bang.c,v 1.1 2020/11/09 23:37:05 kamil Exp $ */
+/* Header: bang.c,v 7.0.1.3 86/12/12 16:57:00 lwall Exp */
-/* $Log: bang.c,v $
-/* Revision 1.1 2020/11/09 23:37:05 kamil
-/* Add Warp Kit, Version 7.0 by Larry Wall
-/*
-/* Warp is a real-time space war game that doesn't get boring very quickly.
-/* Read warp.doc and the manual page for more information.
-/*
-/* games/warp originally distributed with 4.3BSD-Reno, is back to the BSD
-/* world via NetBSD. Its remnants were still mentioned in games/Makefile.
-/*
-/* Larry Wall, the original author and the copyright holder, generously
-/* donated the game and copyright to The NetBSD Foundation, Inc.
-/*
-/* Import the game sources as-is from 4.3BSD-Reno, with the cession
-/* of the copyright and license to BSD-2-clause NetBSD-style.
-/*
-/* Signed-off-by: Larry Wall <larry@wall.org>
-/* Signed-off-by: Kamil Rytarowski <kamil@netbsd.org>
-/*
+/* Log: bang.c,v
* Revision 7.0.1.3 86/12/12 16:57:00 lwall
* Made circular explosions.
*
#include "bang.h"
void
-bang_init()
+bang_init(void)
{
;
}
void
-make_plink(y,x)
-Reg1 int x;
-Reg2 int y;
+make_plink(int x, int y)
{
- Reg3 OBJECT *obj;
+ OBJECT *obj;
move(y+1,x*2,0);
beg_qwrite();
}
void
-make_blast(y,x,mass,size)
-Reg1 int x;
-Reg2 int y;
-int size;
-long mass;
+make_blast(int x, int y, int size, long mass)
{
bangy[nxtbang] = y;
bangx[nxtbang] = x;
return;
}
else if (mass >= 0) {
- Reg3 OBJECT *obj;
+ OBJECT *obj;
move(y+1,x*2,0);
beg_qwrite();
}
void
-do_bangs()
+do_bangs(void)
{
- Reg1 int x;
- Reg2 int y;
- Reg3 int i;
- Reg4 int j;
- Reg7 int k;
- Reg5 int lastxy;
- Reg6 OBJECT *obj;
+ int x;
+ int y;
+ int i;
+ int j;
+ int k;
+ int lastxy;
+ OBJECT *obj;
/* read blast list and update blast array */
assert(nxtbang >= 0 && nxtbang <= XSIZE * YSIZE);
yblasted[yy[j] = (y+YSIZE00) % YSIZE] |= 1;
xblasted[xx[j] = (x+XSIZE00) % XSIZE] |= 1;
}
- blasted = TRUE;
+ blasted = true;
for (y=lastxy;y>=0;--y) {
for (x=lastxy;x>=0;--x) {
if (lastxy > 2) {