Merged
Conversation
Good catch. The fact that it's in a different object than some other things makes it not reset on its own, and I didn't think of that when I implemented it. |
carstene1ns
approved these changes
Nov 9, 2018
ghost
approved these changes
Nov 10, 2018
Member
|
(needs rebase) Guess the code is correct, I will just need a while to understand why the result of this code is the same as the old code 😅 |
* saves and loads scrolling panorama x and y position. * Only supported by rm2k3e, but we enable for all modes.
Contributor
Author
|
Rebased. The only way I know it works was by testing. |
Member
|
Fired some test data at it, when I substract the width and height from the original code I get the same result as in your new code. The X value is off by one pixel compared to the original but I can't say if this is correct or not. |
Ghabry
approved these changes
Nov 26, 2018
Member
|
maybe is a rounding difference. |
This file contains hidden or 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
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.
I've tested and the numbers match rm2k3e. You can save and load a game between RPG_RT and Player and the panorama will have the same starting position.
One thing I don't understand is that the range of pan_x/pan_y are 2 times the size of the panorama picture. In order to make the numbers match rm2k3e I had to scale them by 2 in places.
This feature has a bug in rm2k3. If you edit the map, say to change the panorama or turn off scrolling and the load the game the offsets still get loaded. So you could have a non-scrolling panorama which is stuck at a weird offset. I reset the panorama data when
save_countdoes not match.