I'm working on a small game project and by mere curiosity I commented the line that makes a refresh to the main WINDOW
object.
while(game->state)
{
//Move into player
params->mov = player_1;
params->x = player_1->pos_x;
params->y = player_1->pos_y;
params->game = game;
//curs_set(FALSE);
player_1->key_move(params);
//Move into player
mvwprintw(p_info,y, x, "TERRAIN: [%c]", player_1->inplace);
//wrefresh(main_scene); /* THE LINE I DELETED */
wrefresh(p_info);
sleep(TICK);
}
The game ran without problems and player updated its position graphically. player_1->key_move(params)
eventually calls wgetch()
, mvwaddch()
, and mvinch()
, nothing else (from ncurses
). wrefresh(p_info)
was commented after and, as expected, that WINDOW
object never updated. I'm wondering if that function calls wrefresh()
at some point. There's no direct indication of this in the manual.
If it does, are there alternatives to mvwaddch()
that doesn't update the WINDOW
object?