-
Notifications
You must be signed in to change notification settings - Fork 218
Support SavePanorama data #1485
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
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. |
|
(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.
|
Rebased. The only way I know it works was by testing. |
|
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. |
|
maybe is a rounding difference. |
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.