Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mateofio
Copy link
Contributor

@mateofio mateofio 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
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.

@Ghabry Ghabry self-requested a review November 10, 2018 20:50
@Ghabry
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 😅

* saves and loads scrolling panorama x and y position.
* Only supported by rm2k3e, but we enable for all modes.
@mateofio
Copy link
Contributor Author

Rebased.

The only way I know it works was by testing.

@Ghabry
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 merged commit 06d05df into EasyRPG:master Nov 26, 2018
@carstene1ns
Copy link
Member

maybe is a rounding difference.

@mateofio mateofio deleted the panorama branch November 28, 2018 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants