Advanced Rogue 5: convert to ANSI function declarations.

This still leaves over a thousand lines of warning messages, mostly
related to the return types of daemons and fuses.
This commit is contained in:
John "Elwin" Edwards 2016-02-07 14:39:21 -05:00
parent 59f448e92e
commit f38b2223c8
37 changed files with 977 additions and 733 deletions

View file

@ -22,8 +22,8 @@ int between = 0;
* A healing daemon that restors hit points after rest
*/
doctor(tp)
register struct thing *tp;
void
doctor(struct thing *tp)
{
register int ohp;
register int limit, new_points;
@ -100,7 +100,8 @@ register struct thing *tp;
* Called when it is time to start rolling for wandering monsters
*/
swander()
void
swander(void)
{
start_daemon(rollwand, 0, BEFORE);
}
@ -110,7 +111,8 @@ swander()
* Called to roll to see if a wandering monster starts up
*/
rollwand()
void
rollwand(void)
{
if (++between >= 4)
{
@ -128,7 +130,8 @@ rollwand()
/*
* this function is a daemon called each turn when the character is a thief
*/
trap_look()
void
trap_look(void)
{
if (rnd(100) < (2*dex_compute() + 5*pstats.s_lvl))
search(TRUE, FALSE);
@ -139,7 +142,8 @@ trap_look()
* Release the poor player from his confusion
*/
unconfuse()
void
unconfuse(void)
{
turn_off(player, ISHUH);
msg("You feel less confused now");
@ -151,7 +155,8 @@ unconfuse()
* He lost his see invisible power
*/
unsee()
void
unsee(void)
{
if (!ISWEARING(R_SEEINVIS)) {
turn_off(player, CANSEE);
@ -164,7 +169,8 @@ unsee()
* Remove to-hit handicap from player
*/
unstink()
void
unstink(void)
{
turn_off(player, HASSTINK);
}
@ -174,7 +180,8 @@ unstink()
* Player is no longer immune to confusion
*/
unclrhead()
void
unclrhead(void)
{
turn_off(player, ISCLEAR);
msg("The blue aura about your head fades away.");
@ -185,7 +192,8 @@ unclrhead()
* Player can no longer walk through walls
*/
unphase()
void
unphase(void)
{
turn_off(player, CANINWALL);
msg("Your dizzy feeling leaves you.");
@ -197,7 +205,8 @@ unphase()
* Player can no longer fly
*/
land()
void
land(void)
{
turn_off(player, ISFLY);
msg("You regain your normal weight");
@ -209,7 +218,8 @@ land()
* He gets his sight back
*/
sight()
void
sight(void)
{
if (on(player, ISBLIND))
{
@ -225,7 +235,8 @@ sight()
* Restore player's strength
*/
res_strength()
void
res_strength(void)
{
/* If lost_str is non-zero, restore that amount of strength,
@ -249,7 +260,8 @@ res_strength()
* End the hasting
*/
nohaste()
void
nohaste(void)
{
turn_off(player, ISHASTE);
msg("You feel yourself slowing down.");
@ -260,7 +272,8 @@ nohaste()
* End the slowing
*/
noslow()
void
noslow(void)
{
turn_off(player, ISSLOW);
msg("You feel yourself speeding up.");
@ -271,7 +284,8 @@ noslow()
* If this gets called, the player has suffocated
*/
suffocate()
void
suffocate(void)
{
death(D_SUFFOCATION);
}
@ -279,7 +293,8 @@ suffocate()
/*
* digest the hero's food
*/
stomach()
void
stomach(void)
{
register int oldfood, old_hunger, food_use, i;
@ -335,7 +350,8 @@ stomach()
/*
* daemon for curing the diseased
*/
cure_disease()
void
cure_disease(void)
{
turn_off(player, HASDISEASE);
if (off (player, HASINFEST))
@ -346,7 +362,8 @@ cure_disease()
/*
* daemon for adding back dexterity
*/
un_itch()
void
un_itch(void)
{
if (--lost_dext < 1) {
lost_dext = 0;
@ -358,7 +375,8 @@ un_itch()
* appear:
* Become visible again
*/
appear()
void
appear(void)
{
turn_off(player, ISINVIS);
PLAYER = VPLAYER;
@ -369,7 +387,8 @@ appear()
* dust_appear:
* dust of disappearance wears off
*/
dust_appear()
void
dust_appear(void)
{
turn_off(player, ISINVIS);
PLAYER = VPLAYER;
@ -380,7 +399,8 @@ dust_appear()
* unchoke:
* the effects of "dust of choking and sneezing" wear off
*/
unchoke()
void
unchoke(void)
{
if (!find_slot(unconfuse))
turn_off(player, ISHUH);
@ -392,8 +412,8 @@ unchoke()
/*
* make some potion for the guy in the Alchemy jug
*/
alchemy(obj)
register struct object *obj;
void
alchemy(struct object *obj)
{
register struct object *tobj = NULL;
register struct linked_list *item;
@ -440,7 +460,8 @@ register struct object *obj;
* otto's irresistable dance wears off
*/
undance()
void
undance(void)
{
turn_off(player, ISDANCE);
msg ("Your feet take a break.....whew!");
@ -449,14 +470,16 @@ undance()
/*
* if he has our favorite necklace of strangulation then take damage every turn
*/
strangle()
void
strangle(void)
{
if ((pstats.s_hpt -= 6) <= 0) death(D_STRANGLE);
}
/*
* if he has on the gauntlets of fumbling he might drop his weapon each turn
*/
fumble()
void
fumble(void)
{
register struct linked_list *item;
@ -474,14 +497,16 @@ fumble()
/*
* this is called each turn the hero has the ring of searching on
*/
ring_search()
void
ring_search(void)
{
search(FALSE, FALSE);
}
/*
* this is called each turn the hero has the ring of teleportation on
*/
ring_teleport()
void
ring_teleport(void)
{
if (rnd(100) < 2) teleport();
}