dc08309f80
Provided in PR 12072 by Ben Collver (collver@linuxfreemail.com). Ularn is a fantasy games in which your child has contracted a strange dis- ease, and none of your home remedies seem to have any effect. You set out to find a remedy in a limited amount of time, and to collect gold along the way of course! Ularn is based on larn, and adds the concept of character classes.
143 lines
2.8 KiB
Text
143 lines
2.8 KiB
Text
$NetBSD: patch-ad,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $
|
|
|
|
--- create.c.orig Fri Jun 19 13:55:34 1992
|
|
+++ create.c Sat Jan 13 21:52:52 2001
|
|
@@ -1,4 +1,6 @@
|
|
/* create.c */
|
|
+#include <stdlib.h>
|
|
+
|
|
#include "header.h"
|
|
#include "monst.h"
|
|
#include "player.h"
|
|
@@ -11,12 +13,12 @@
|
|
* subroutine to create the player and the players attributes
|
|
* this is called at the beginning of a game and at no other time
|
|
*/
|
|
-makeplayer ()
|
|
+void makeplayer ()
|
|
{
|
|
int i;
|
|
|
|
scbr();
|
|
- clear();
|
|
+ ularn_clear();
|
|
c[LEVEL]=1; /* player starts at level one */
|
|
c[REGENCOUNTER]=16;
|
|
c[ECOUNTER]=96; /*start regeneration correctly*/
|
|
@@ -49,7 +51,7 @@
|
|
* levels will get a few more monsters.
|
|
* Note that it is here we remove genocided monsters from the present level
|
|
*/
|
|
-newcavelevel (x)
|
|
+void newcavelevel (x)
|
|
int x;
|
|
{
|
|
int i,j;
|
|
@@ -87,7 +89,7 @@
|
|
*/
|
|
static int mx,mxl,mxh,my,myl,myh,tmp2;
|
|
|
|
-makemaze (lev)
|
|
+void makemaze (lev)
|
|
int lev;
|
|
{
|
|
int i,j;
|
|
@@ -160,7 +162,7 @@
|
|
/*
|
|
function to eat away a filled in maze
|
|
*/
|
|
-eat (xx,yy)
|
|
+void eat (xx,yy)
|
|
int xx, yy;
|
|
{
|
|
int dir,try;
|
|
@@ -225,7 +227,7 @@
|
|
* ! cure dianthroritis - random object
|
|
*/
|
|
|
|
-cannedlevel (lev)
|
|
+int cannedlevel (lev)
|
|
int lev;
|
|
{
|
|
int i,j;
|
|
@@ -307,7 +309,7 @@
|
|
* - level 10's treasure room has the eye in it and demon lords
|
|
* - level V5 has potion of cure dianthroritis and demon prince
|
|
*/
|
|
-treasureroom(lv)
|
|
+void treasureroom(lv)
|
|
int lv;
|
|
{
|
|
int tx,ty,xsize,ysize;
|
|
@@ -329,7 +331,7 @@
|
|
* room is filled with objects and monsters
|
|
* the coordinate given is that of the upper left corner of the room
|
|
*/
|
|
-troom(lv,xsize,ysize,tx,ty,glyph)
|
|
+void troom(lv,xsize,ysize,tx,ty,glyph)
|
|
int lv,xsize,ysize,tx,ty,glyph;
|
|
{
|
|
int i,j;
|
|
@@ -388,7 +390,7 @@
|
|
* ***********
|
|
* subroutine to create the objects in the maze for the given level
|
|
*/
|
|
-makeobject (j)
|
|
+void makeobject (j)
|
|
int j;
|
|
{
|
|
int i;
|
|
@@ -612,7 +614,7 @@
|
|
/*
|
|
* subroutine to fill in a number of objects of the same kind
|
|
*/
|
|
-fillmroom(n,what,arg)
|
|
+void fillmroom(n,what,arg)
|
|
int n, what, arg;
|
|
{
|
|
int i;
|
|
@@ -621,7 +623,7 @@
|
|
fillroom(what,arg);
|
|
}
|
|
|
|
-froom(n,itm,arg)
|
|
+void froom(n,itm,arg)
|
|
int n, itm, arg;
|
|
{
|
|
if (rnd(151) < n)
|
|
@@ -632,7 +634,7 @@
|
|
* subroutine to put an object into an empty room
|
|
* uses a random walk
|
|
*/
|
|
-fillroom (what,arg)
|
|
+void fillroom (what,arg)
|
|
int what, arg;
|
|
{
|
|
int x,y;
|
|
@@ -659,7 +661,7 @@
|
|
* subroutine to put monsters into an empty room without walls or other
|
|
* monsters
|
|
*/
|
|
-fillmonst (what)
|
|
+int fillmonst (what)
|
|
int what;
|
|
{
|
|
int x,y,trys;
|
|
@@ -684,7 +686,7 @@
|
|
* must be done when entering a new level
|
|
* if sethp(1) then wipe out old monsters else leave them there
|
|
*/
|
|
-sethp (flg)
|
|
+void sethp (flg)
|
|
int flg;
|
|
{
|
|
int i,j;
|
|
@@ -738,7 +740,7 @@
|
|
/*
|
|
* Function to destroy all genocided monsters on the present level
|
|
*/
|
|
-checkgen ()
|
|
+void checkgen (void)
|
|
{
|
|
int x,y;
|
|
|