rogue4: fix most GCC5 warnings.
Converting all function definitions to ANSI style accounts for most of the change. This has exposed other problems, such as daemons not actually being their stated type, that will require more careful solutions.
This commit is contained in:
parent
384386d71c
commit
c1d6a6af6a
32 changed files with 625 additions and 394 deletions
|
|
@ -39,8 +39,8 @@ static struct init_weps {
|
|||
* missile:
|
||||
* Fire a missile in a given direction
|
||||
*/
|
||||
missile(ydelta, xdelta)
|
||||
int ydelta, xdelta;
|
||||
void
|
||||
missile(int ydelta, int xdelta)
|
||||
{
|
||||
register THING *obj, *nitem;
|
||||
|
||||
|
|
@ -86,9 +86,8 @@ int ydelta, xdelta;
|
|||
* Do the actual motion on the screen done by an object traveling
|
||||
* across the room
|
||||
*/
|
||||
do_motion(obj, ydelta, xdelta)
|
||||
register THING *obj;
|
||||
register int ydelta, xdelta;
|
||||
void
|
||||
do_motion(THING *obj, int ydelta, int xdelta)
|
||||
{
|
||||
/*
|
||||
* Come fly with us ...
|
||||
|
|
@ -129,9 +128,8 @@ register int ydelta, xdelta;
|
|||
* fall:
|
||||
* Drop an item someplace around here.
|
||||
*/
|
||||
fall(obj, pr)
|
||||
register THING *obj;
|
||||
register bool pr;
|
||||
void
|
||||
fall(THING *obj, bool pr)
|
||||
{
|
||||
static coord fpos;
|
||||
register int index;
|
||||
|
|
@ -163,9 +161,8 @@ register bool pr;
|
|||
* init_weapon:
|
||||
* Set up the initial goodies for a weapon
|
||||
*/
|
||||
init_weapon(weap, type)
|
||||
register THING *weap;
|
||||
char type;
|
||||
void
|
||||
init_weapon(THING *weap, char type)
|
||||
{
|
||||
register struct init_weps *iwp;
|
||||
|
||||
|
|
@ -187,9 +184,8 @@ char type;
|
|||
* hit_monster:
|
||||
* Does the missile hit the monster?
|
||||
*/
|
||||
hit_monster(y, x, obj)
|
||||
register int y, x;
|
||||
THING *obj;
|
||||
bool
|
||||
hit_monster(int y, int x, THING *obj)
|
||||
{
|
||||
static coord mp;
|
||||
|
||||
|
|
@ -203,9 +199,7 @@ THING *obj;
|
|||
* Figure out the plus number for armor/weapons
|
||||
*/
|
||||
char *
|
||||
num(n1, n2, type)
|
||||
register int n1, n2;
|
||||
register char type;
|
||||
num(int n1, int n2, char type)
|
||||
{
|
||||
static char numbuf[10];
|
||||
|
||||
|
|
@ -219,7 +213,8 @@ register char type;
|
|||
* wield:
|
||||
* Pull out a certain weapon
|
||||
*/
|
||||
wield()
|
||||
void
|
||||
wield(void)
|
||||
{
|
||||
register THING *obj, *oweapon;
|
||||
register char *sp;
|
||||
|
|
@ -257,9 +252,8 @@ bad:
|
|||
* fallpos:
|
||||
* Pick a random position around the give (y, x) coordinates
|
||||
*/
|
||||
fallpos(pos, newpos, pass)
|
||||
register coord *pos, *newpos;
|
||||
register bool pass;
|
||||
bool
|
||||
fallpos(coord *pos, coord *newpos, bool pass)
|
||||
{
|
||||
register int y, x, cnt, ch;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue