/** * Display the character on the screen (two different modes) * * The top two lines, and the bottom line (or two) are left blank. * * Mode 0 = standard display with skills/history * Mode 1 = special display with equipment flags */ void display_player(int mode) { /* Erase screen */ clear_from(0); /* When not playing, do not display in subwindows */ if (Term != angband_term[0] && !player->upkeep->playing) return; /* Stat info */ display_player_stat_info(); if (mode) { struct panel *p = panels[0].panel(); display_panel(p, panels[0].align_left, &panels[0].bounds); panel_free(p); /* Stat/Sustain flags */ display_player_sust_info(); /* Other flags */ display_player_flag_info(); } else { /* Extra info */ display_player_xtra_info(); } }
/* * Display the character on the screen (two different modes) * * The top two lines, and the bottom line (or two) are left blank. * * Mode 0 = standard display with skills/history * Mode 1 = special display with equipment flags */ void display_player(int mode) { /* Erase screen */ clear_from(0); /* Stat info */ display_player_stat_info(); if (mode) { data_panel data[MAX_PANEL]; int rows = get_panel(1, data, N_ELEMENTS(data)); display_panel(data, rows, 1, &boundaries[1]); /* Stat/Sustain flags */ display_player_sust_info(); /* Other flags */ display_player_flag_info(); } /* Standard */ else { /* Extra info */ display_player_xtra_info(); } }
static void point_based_start(void) { const char *prompt = "[up/down to move, left/right to modify, 'r' to reset, 'Enter' to accept]"; /* Clear */ Term_clear(); /* Display the player */ display_player_xtra_info(); display_player_stat_info(); prt(prompt, Term->hgt - 1, Term->wid / 2 - strlen(prompt) / 2); /* Register handlers for various events - cheat a bit because we redraw the lot at once rather than each bit at a time. */ event_add_handler(EVENT_BIRTHPOINTS, point_based_points, NULL); event_add_handler(EVENT_STATS, point_based_stats, NULL); event_add_handler(EVENT_GOLD, point_based_misc, NULL); }
/* This is called whenever a stat changes. We take the easy road, and just redisplay them all using the standard function. */ static void point_based_stats(game_event_type type, game_event_data *data, void *user) { display_player_stat_info(); }