mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Keep the status bar in better sync with the game display.
[originally from svn r4177]
This commit is contained in:
@ -554,6 +554,13 @@ void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
|
|||||||
{
|
{
|
||||||
char statusbuf[256];
|
char statusbuf[256];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Don't show the new status until we're also showing the
|
||||||
|
* new _state_ - after the game animation is complete.
|
||||||
|
*/
|
||||||
|
if (oldstate)
|
||||||
|
state = oldstate;
|
||||||
|
|
||||||
sprintf(statusbuf, "%sMoves: %d",
|
sprintf(statusbuf, "%sMoves: %d",
|
||||||
(state->completed ? "COMPLETED! " : ""),
|
(state->completed ? "COMPLETED! " : ""),
|
||||||
(state->completed ? state->completed : state->movecount));
|
(state->completed ? state->completed : state->movecount));
|
||||||
|
@ -599,6 +599,13 @@ void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
|
|||||||
{
|
{
|
||||||
char statusbuf[256];
|
char statusbuf[256];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Don't show the new status until we're also showing the
|
||||||
|
* new _state_ - after the game animation is complete.
|
||||||
|
*/
|
||||||
|
if (oldstate)
|
||||||
|
state = oldstate;
|
||||||
|
|
||||||
sprintf(statusbuf, "%sMoves: %d",
|
sprintf(statusbuf, "%sMoves: %d",
|
||||||
(state->completed ? "COMPLETED! " : ""),
|
(state->completed ? "COMPLETED! " : ""),
|
||||||
(state->completed ? state->completed : state->movecount));
|
(state->completed ? state->completed : state->movecount));
|
||||||
|
Reference in New Issue
Block a user