-
Notifications
You must be signed in to change notification settings - Fork 194
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
Maniac Patch: Implement Load, Save, SaveInfo and Mouse input #2623
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
Already found some bugs: Load
Different behaviour: Key Input Proc
The rest appears to work. In the new, rewritten Maniac Patch GetSaveInfo seems to be kinda broken o_O |
27 tasks
carstene1ns
reviewed
Sep 4, 2021
carstene1ns
reviewed
Sep 4, 2021
carstene1ns
reviewed
Sep 4, 2021
The handling is incompatible to how Maniacs does it: First the interpreter is yielded before performing the actions. This prevents issues with undefined data.
…direct for ValueOrVariable function Maniac Patch itself does not support this for all commands but supporting it for all is simpler and makes most sense.
Ghabry
force-pushed
the
maniac-events
branch
2 times, most recently
from
September 11, 2021 20:21
a0538da
to
076e2a9
Compare
carstene1ns
reviewed
Sep 11, 2021
carstene1ns
reviewed
Sep 11, 2021
Ghabry
force-pushed
the
maniac-events
branch
from
September 12, 2021 09:34
076e2a9
to
6af16df
Compare
carstene1ns
reviewed
Sep 12, 2021
carstene1ns
approved these changes
Sep 12, 2021
fdelapena
approved these changes
Sep 12, 2021
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.
This implements the imo most useful commands of the Maniac Patch (except for String picture, this is also pretty cool!)
Still have to do careful testing of this again. There shouldn't be regressions as the code is usually in ManiacPatch checks.
Discussion:
Load
This does a Async Load (yields the interpreter), in Maniac it loads directly, this is incompatible with how our code works.
The parameter for checking whether the save exists is ignored, in RPG_RT loading a non-existant save simply crashes.
Save
This does a Async save (Yields the interpreter), in Maniac this saves directly resulting in saving at an undefined state because there is stuff in temporaries. So yielding here is safer.
Get Save Info
In Maniac this is implemented by setting the arguments (or not if the pic exists) and then doing a jump just before the 2k3E picture code that handles layers etc. (so save game pictures shown inherit the attributes of the current picture in the slot)
As we cannot really do this I added a function for retrieving the current Show Params instead.
There will be likely minor incompatibilities here, but when they do not do anything fancy with the picture it should work...
Key Input Proc (Mouse)
Had to add "& 2"-checks where applicable as Maniac uses bit 1 of certain keys for this:
To reduce chaos in the code this will only work properly with RPG2k3E, KeyInput is already messy enough, so sorry, no fully Maniac mouse input in Player for 2k ;).
New return values in Control Variables
Maniacs added tons of stuff here, also new ops like sin and pow. For now I only add the absolute minimum:
ValueOrVariable
Maniac Patch adds support for "Variable indirect", "Switch" and "Switch Indirect" to some event commands (and I guess with TPC and the new engine to even more).
To make this easier for me I simply added this handling to ValueOrVariable which is our resolver for this indirection stuff.
Has the side-effect that all event commands that support indirection got these features now with a minimal code change.
This e.g. implements for Call Event: "Added method to specify common event by variable number variable."