src/player-birth.c
void player_generate(struct player *p, const struct player_race *r,
					 const struct player_class *c, bool old_history)
{
	if (!c)
		c = p->class;
	if (!r)
		r = p->race;

	p->class = c;
	p->race = r;

	/* Level 1 */
	p->max_lev = p->lev = 1;

	/* Experience factor */
	p->expfact = p->race->r_exp + p->class->c_exp;

	/* Hitdice */
	p->hitdie = p->race->r_mhp + p->class->c_mhp;

	/* Initial hitpoints */
	p->mhp = p->hitdie;

	/* Pre-calculate level 1 hitdice */
	p->player_hp[0] = p->hitdie;

	/* Roll for age/height/weight */
	get_ahw(p);

	if (!old_history)
		p->history = get_history(p->race->history);
}
/**
 * This fleshes out a full player based on the choices currently made,
 * and so is called whenever things like race or class are chosen.
 */
This fleshes out a full player based on the choices currently made,
and so is called whenever things like race or class are chosen.
This fleshes out a full player based on the choices currently made and so is called whenever things like race or class are chosen .
void player_generate(struct player *p, const struct player_race *r,
					 const struct player_class *c, bool old_history)
{
	if (!c)
		c = p->class;
	if (!r)
		r = p->race;
	p->class = c;
	p->race = r;
	p->max_lev = p->lev = 1;
	p->expfact = p->race->r_exp + p->class->c_exp;
	p->hitdie = p->race->r_mhp + p->class->c_mhp;
	p->mhp = p->hitdie;
	p->player_hp[0] = p->hitdie;
	get_ahw(p);
	if (!old_history)
		p->history = get_history(p->race->history);
}
void player_generate ( struct player * p , const struct player_race * r , const struct player_class * c , bool old_history ) { if ( ! c ) c = p -> class ; if ( ! r ) r = p -> race ; p -> class = c ; p -> race = r ; p -> max_lev = p -> lev = 1 ; p -> expfact = p -> race -> r_exp + p -> class -> c_exp ; p -> hitdie = p -> race -> r_mhp + p -> class -> c_mhp ; p -> mhp = p -> hitdie ; p -> player_hp [ 0 ] = p -> hitdie ; get_ahw ( p ) ; if ( ! old_history ) p -> history = get_history ( p -> race -> history ) ; }
This fleshes out a full player based on the choices currently made,
 and so is called whenever things like race or class are chosen.
This fleshes out a full player based on the choices currently made and so is called whenever things like race or class are chosen .
/* Level 1 */ /* Experience factor */ /* Hitdice */ /* Initial hitpoints */ /* Pre-calculate level 1 hitdice */ /* Roll for age/height/weight */