Super-Rogue: convert to ANSI-style function declarations.
This fixes most of the build warnings.
This commit is contained in:
parent
0f87d5b4d8
commit
59f448e92e
33 changed files with 783 additions and 518 deletions
|
|
@ -11,16 +11,25 @@
|
|||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "rogue.h"
|
||||
#include "rogue.ext"
|
||||
|
||||
#define NOTPRICED -1
|
||||
|
||||
bool open_market(void);
|
||||
void trans_line(void);
|
||||
void draw_maze(void);
|
||||
int findcells(int y, int x);
|
||||
void rmwall(int newy, int newx, int oldy, int oldx);
|
||||
void crankout(void);
|
||||
|
||||
/*
|
||||
* do_post:
|
||||
* Put a trading post room and stuff on the screen
|
||||
*/
|
||||
do_post()
|
||||
void
|
||||
do_post(void)
|
||||
{
|
||||
struct coord tp;
|
||||
reg int i;
|
||||
|
|
@ -66,7 +75,8 @@ do_post()
|
|||
* price_it:
|
||||
* Price the object that the hero stands on
|
||||
*/
|
||||
price_it()
|
||||
bool
|
||||
price_it(void)
|
||||
{
|
||||
static char *bargain[] = {
|
||||
"great bargain",
|
||||
|
|
@ -100,7 +110,8 @@ price_it()
|
|||
* buy_it:
|
||||
* Buy the item on which the hero stands
|
||||
*/
|
||||
buy_it()
|
||||
void
|
||||
buy_it(void)
|
||||
{
|
||||
reg int wh;
|
||||
|
||||
|
|
@ -151,7 +162,8 @@ buy_it()
|
|||
* sell_it:
|
||||
* Sell an item to the trading post
|
||||
*/
|
||||
sell_it()
|
||||
void
|
||||
sell_it(void)
|
||||
{
|
||||
reg struct linked_list *item;
|
||||
reg struct object *obj;
|
||||
|
|
@ -199,7 +211,8 @@ sell_it()
|
|||
* open_market:
|
||||
* Retruns TRUE when ok do to transacting
|
||||
*/
|
||||
open_market()
|
||||
bool
|
||||
open_market(void)
|
||||
{
|
||||
if (trader >= MAXPURCH) {
|
||||
msg("The market is closed. The stairs are that-a-way.");
|
||||
|
|
@ -213,8 +226,8 @@ open_market()
|
|||
* get_worth:
|
||||
* Calculate an objects worth in gold
|
||||
*/
|
||||
get_worth(obj)
|
||||
struct object *obj;
|
||||
int
|
||||
get_worth(struct object *obj)
|
||||
{
|
||||
reg int worth, wh;
|
||||
|
||||
|
|
@ -272,7 +285,8 @@ struct object *obj;
|
|||
* trans_line:
|
||||
* Show how many transactions the hero has left
|
||||
*/
|
||||
trans_line()
|
||||
void
|
||||
trans_line(void)
|
||||
{
|
||||
sprintf(prbuf,"You have %d transactions remaining.",MAXPURCH-trader);
|
||||
mvwaddstr(cw, LINES - 4, 0, prbuf);
|
||||
|
|
@ -282,7 +296,8 @@ trans_line()
|
|||
* domaze:
|
||||
* Draw the maze on this level.
|
||||
*/
|
||||
do_maze()
|
||||
void
|
||||
do_maze(void)
|
||||
{
|
||||
struct coord tp;
|
||||
reg int i, least;
|
||||
|
|
@ -328,14 +343,16 @@ struct bordercells {
|
|||
} mborder;
|
||||
|
||||
char *frontier, *bits;
|
||||
char *moffset(), *foffset();
|
||||
char *moffset(int y, int x);
|
||||
char *foffset(int y, int x);
|
||||
int tlines, tcols;
|
||||
|
||||
/*
|
||||
* draw_maze:
|
||||
* Generate and draw the maze on the screen
|
||||
*/
|
||||
draw_maze()
|
||||
void
|
||||
draw_maze(void)
|
||||
{
|
||||
reg int i, j, more;
|
||||
reg char *ptr;
|
||||
|
|
@ -372,8 +389,7 @@ draw_maze()
|
|||
* Calculate memory address for bits
|
||||
*/
|
||||
char *
|
||||
moffset(y, x)
|
||||
int y, x;
|
||||
moffset(int y, int x)
|
||||
{
|
||||
char *ptr;
|
||||
|
||||
|
|
@ -386,8 +402,7 @@ int y, x;
|
|||
* Calculate memory address for frontier
|
||||
*/
|
||||
char *
|
||||
foffset(y, x)
|
||||
int y, x;
|
||||
foffset(int y, int x)
|
||||
{
|
||||
char *ptr;
|
||||
|
||||
|
|
@ -399,8 +414,8 @@ int y, x;
|
|||
* findcells:
|
||||
* Figure out cells to open up
|
||||
*/
|
||||
findcells(y,x)
|
||||
int x, y;
|
||||
int
|
||||
findcells(int y, int x)
|
||||
{
|
||||
reg int rtpos, i;
|
||||
|
||||
|
|
@ -450,8 +465,8 @@ int x, y;
|
|||
* rmwall:
|
||||
* Removes appropriate walls from the maze
|
||||
*/
|
||||
rmwall(newy, newx, oldy, oldx)
|
||||
int newy, newx, oldy, oldx;
|
||||
void
|
||||
rmwall(int newy, int newx, int oldy, int oldx)
|
||||
{
|
||||
reg int xdif,ydif;
|
||||
|
||||
|
|
@ -467,7 +482,8 @@ int newy, newx, oldy, oldx;
|
|||
* crankout:
|
||||
* Does actual drawing of maze to window
|
||||
*/
|
||||
crankout()
|
||||
void
|
||||
crankout(void)
|
||||
{
|
||||
reg int x, y, i;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue