replay: level and minutes left not always shown

Open-source port of PoP that runs natively on Windows, Linux, etc.

Moderator: English Moderator Team

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 2953
Joined: April 9th, 2009, 10:58 pm
Contact:

replay: level and minutes left not always shown

Postby Norbert » February 19th, 2017, 3:54 pm

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.

Falcury
Wise Scribe
Wise Scribe
Posts: 292
Joined: June 25th, 2009, 10:01 pm

Re: replay: level and minutes left not always shown

Postby Falcury » February 25th, 2017, 12:25 pm

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).

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 2953
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: replay: level and minutes left not always shown

Postby Norbert » February 25th, 2017, 3:27 pm

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.


Return to “SDLPoP”

Who is online

Users browsing this forum: No registered users and 1 guest