View Single Post
Old April 20, 2015, 08:54   #93
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,580
PowerWyrm is on a distinguished road
Another thing that is puzzling me is the new format of the xxx_stuff() methods.

Before:

Code:
void update_stuff(struct player *p)
{
...
calc_hitpoints();
...
}
Now:

Code:
void update_stuff(struct player_upkeep *upkeep)
{
...
calc_hitpoints();
...
}
However, if you look at the calc_hitpoints() method...

Code:
static void calc_hitpoints(void)
{
...
player->xxx
...
}
So much for using a parameter in the calling method...

Clearly, this should be:

Code:
static void calc_hitpoints(struct player *p)
{
...
p->xxx
...
}

void update_stuff(struct player *p)
{
...
calc_hitpoints(p);
...
}
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote