Skip to content
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

Support SavePanorama data #1485

Merged
merged 3 commits into from Nov 26, 2018

Conversation

Projects
None yet
5 participants
@fmatthew5876
Copy link
Contributor

fmatthew5876 commented Nov 6, 2018

  • saves and loads scrolling panorama x and y position.
  • Only supported by rm2k3e, but we enable for all modes.

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_count does not match.

@CherryDT

This comment has been minimized.

Copy link

CherryDT commented Nov 6, 2018

So you could have a non-scrolling panorama which is stuck at a weird offset. I reset the panorama data when save_count does not match.

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.

@fdelapena fdelapena added the Savegames label Nov 8, 2018

@Ghabry Ghabry self-requested a review Nov 10, 2018

@Ghabry

This comment has been minimized.

Copy link
Member

Ghabry commented Nov 18, 2018

(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 😅

fmatthew5876 added some commits Nov 6, 2018

Support SavePanorama data
* saves and loads scrolling panorama x and y position.
* Only supported by rm2k3e, but we enable for all modes.

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:panorama branch from 57b2b4a to 245708d Nov 18, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Nov 18, 2018

Rebased.

The only way I know it works was by testing.

@Ghabry

This comment has been minimized.

Copy link
Member

Ghabry commented Nov 26, 2018

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

Ghabry approved these changes Nov 26, 2018

@Ghabry Ghabry merged commit 06d05df into EasyRPG:master Nov 26, 2018

6 checks passed

Android (armeabi-v7a) Build finished.
Details
GNU/Linux Build finished.
Details
OSX Build finished.
Details
Windows (x64) Build finished.
Details
Windows (x86) Build finished.
Details
web Build finished.
Details
@carstene1ns

This comment has been minimized.

Copy link
Member

carstene1ns commented Nov 28, 2018

maybe is a rounding difference.

@fmatthew5876 fmatthew5876 deleted the fmatthew5876:panorama branch Nov 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.