-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Many fixes by Krzysztof Nowaczyk #50
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
383987e
to
5cc5969
Compare
Fix by Krzysztof Nowaczyk, thank you! ❤️
When you start playing the game, the Hall of Fame is initially empty. When you complete the game, your name appears in the Hall of Fame, but not only in 1st place, but in 2nd and 3rd place too, with a time of 0:00:00. See screenshots below. Cause: the string containing the player name was not cleared when iterating over hall of fame entries. Fixed by Krzysztof Nowaczyk, thank you! :heart:
Let's take the following scenario: you start a game from a fresh state (Hall of Fame is clear). You complete the game. Your name appears as the first entry in the Hall of Fame. Then you want to go back to some of the already completed levels. After completing a level, another entry with your name, with the same time is created in the Hall of Fame (screenshot). This is because the completedAllLevels field of the PlayerEntry structure was updated incorrectly. The code in updateHallOfFameEntries function took the PlayerEntry and made a local copy of it, so the original PlayerEntry structure was never updated. I changed this, so now a pointer to a PlayerEntry is taken. Fixed by Krzysztof Nowaczyk, thank you! ❤️
When I was recording a demo, and wanted to restart the level, I tried using <Esc>, "Restart level" instead of going back to the main menu. The demo buffer was not cleared, so all my inputs from the second attempt got glued together with the first attempt, making the demo nonsensical. I fixed this by stopping the demo recording when restarting a level. Fixed by Krzysztof Nowaczyk, thank you! ❤️
When recording a demo I found that if a signature is present in myspsig.txt it is never appended to the demo. That's because the file the game is trying to open is actually MYSPSIG.TXT, all uppercase, which caused a file open to fail. Another issue: when the signature is about to be written to the output file, the code tries to write to a wrong file handle. It tries to write to the signature file (which is open in read-only mode) instead of the demo file. One last bug: there was an "off by one" error when writing the signature to the output file and the last terminating 0xFF byte was not written to the file. Fixed by Krzysztof Nowaczyk, thank you! ❤️
1316813
to
719c4f8
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Krzysztof Nowaczyk contacted me and sent me some patches to fix certain issues he found ❤️
I haven't tested the patches yet, I only reviewed them and made total sense. I'm just gonna paste his explanation here:
I. Average time does not display fractional part
If you go to the statistics screen, the fractional part is always 0. Cause: integer division. Screenshots from SpeedFix 6.3 and OpenSupaplex 7.1.2 below:
SpeedFix 6.3

OpenSupaplex 7.1.2

II. User name in empty entries in Hall of Fame
When you start playing the game, the Hall of Fame is initially empty. When you complete the game, your name appears in the Hall of Fame, but not only in 1st place, but in 2nd and 3rd place too, with a time of 0:00:00. See screenshots below. Cause: the string containing the player name was not cleared when iterating over hall of fame entries.
SpeedFix 6.3

OpenSupaplex 7.1.2

III. Duplicate entries in Hall of Fame created
Let's take the following scenario: you start a game from a fresh state (Hall of Fame is clear). You complete the game. Your name appears as the first entry in the Hall of Fame. Then you want to go back to some of the already completed levels. After completing a level, another entry with your name, with the same time is created in the Hall of Fame (screenshot). This is because the completedAllLevels field of the PlayerEntry structure was updated incorrectly. The code in updateHallOfFameEntries function took the PlayerEntry and made a local copy of it, so the original PlayerEntry structure was never updated. I changed this, so now a pointer to a PlayerEntry is taken.
IV. Demo signatures are never appended
When recording a demo I found that if a signature is present in myspsig.txt it is never appended to the demo. That's because the file the game is trying to open is actually MYSPSIG.TXT, all uppercase, which caused a file open to fail. Another issue: when the signature is about to be written to the output file, the code tries to write to a wrong file handle. It tries to write to the signature file (which is open in read-only mode) instead of the demo file. One last bug: there was an "off by one" error when writing the signature to the output file and the last terminating 0xFF byte was not written to the file.
V. Restarting a level when recording a demo
When I was recording a demo, and wanted to restart the level, I tried using , "Restart level" instead of going back to the main menu. The demo buffer was not cleared, so all my inputs from the second attempt got glued together with the first attempt, making the demo nonsensical. I fixed this by stopping the demo recording when restarting a level.
Also, the F11 key support in the main menu (that was supposed to replay the loaded demo) appears to be unimplemented.