Page 1 of 1

replay: level and minutes left not always shown

Posted: February 19th, 2017, 3:54 pm
by Norbert
When I copy six .p1r files into replays/, then use Tab to cycle through them, status bar messages are inconsistent.
Only the first replay reports the "LEVEL ..." and "... MINUTES LEFT".
These messages are not displayed for other levels.
When I quickly press Tab after "LEVEL ...", the "... MINUTES LEFT" text is displayed for the next level.

Related, but not as important, the replays seem to be loaded in a random order. A solution might be to use "qsort (..., ..., ..., StrCmp);" with a StrCmp() you can find at the bottom of class.c in the Ggradebook 0.92 package.

Re: replay: level and minutes left not always shown

Posted: February 25th, 2017, 12:25 pm
by Falcury
Norbert wrote:When I copy six .p1r files into replays/, then use Tab to cycle through them, status bar messages are inconsistent.
Only the first replay reports the "LEVEL ..." and "... MINUTES LEFT".
These messages are not displayed for other levels.
When I quickly press Tab after "LEVEL ...", the "... MINUTES LEFT" text is displayed for the next level.

Related, but not as important, the replays seem to be loaded in a random order. A solution might be to use "qsort (..., ..., ..., StrCmp);" with a StrCmp() you can find at the bottom of class.c in the Ggradebook 0.92 package.
I suppose the timer that handles the time display at the start of the level is not part of the savestate. Then, it would always be displayed when the game thinks a new level has been loaded (i.e. when the first replay is loaded). When you forcibly cycle to the next replay, this does not count as a 'level restart', however (similar to a quickload).
I suppose the desired behavior is to only show the time when you are actually at the beginning of a level?
Then, that would mean that we should add that timer variable to the savestate, I think (Note: not verified!)

Right now, replays are played in reverse file creation order... (This behavior uses qsort() as well; see the procedure in replay.c that lists all the replay files in the replays directory.) I suppose it would make sense to change this behavior (alphabetically? recording time instead of file creation time?)
Ideally, there would be some sort of selection screen. We would probably have to extend the GUI facilities a bit more (currently, all that can be easily done is a simple dialog box or a screen with text).

Re: replay: level and minutes left not always shown

Posted: February 25th, 2017, 3:27 pm
by Norbert
I dunno, but the time left and replay order aren't that important, I think.
Consistently showing the level number might be informative and useful, in my opinion.

Re: replay: level and minutes left not always shown

Posted: January 7th, 2018, 2:52 pm
by Norbert
Was this fixed?
I could re-check, but maybe someone already knows the status.

Re: replay: level and minutes left not always shown

Posted: January 13th, 2018, 6:56 pm
by David
Norbert wrote:
January 7th, 2018, 2:52 pm
Was this fixed?
I could re-check, but maybe someone already knows the status.
I fixed it now: https://github.com/NagyD/SDLPoP/commit/ ... b335729a43
Took only a few minutes.
I don't know why didn't I solve this when you reported it...

Re: replay: level and minutes left not always shown

Posted: January 13th, 2018, 8:04 pm
by Norbert
Thanks.