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

Pictures with "Scrolls with Map" setting become misaligned when loading a savegame #1296

Closed
Ghabry opened this Issue Oct 28, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@Ghabry
Copy link
Member

Ghabry commented Oct 28, 2017

Use "Show Picture" with "Scrolls with Map" attribute (so that the picture is constant to the map and scrolls away when you walk) and save.

When loading the picture is correctly positioned until fade-in is done and then jumps away.

@Ghabry Ghabry added the Savegames label Oct 28, 2017

@Ghabry Ghabry added this to the 0.5.4 milestone Oct 28, 2017

@Ghabry

This comment has been minimized.

Copy link
Member Author

Ghabry commented Oct 29, 2017

Initializing old_map_x and old_map_y fixes it

diff --git a/src/game_picture.cpp b/src/game_picture.cpp
index 57d69bf7..591f92e8 100644
--- a/src/game_picture.cpp
+++ b/src/game_picture.cpp
@@ -28,8 +28,8 @@ constexpr int z_mask = (1 << 16);
 
 Game_Picture::Game_Picture(int ID) :
 	id(ID),
-	old_map_x(0),
-	old_map_y(0)
+	old_map_x(Game_Map::GetDisplayX()),
+	old_map_y(Game_Map::GetDisplayY())
 {
 	RequestPictureSprite();
 }

carstene1ns added a commit that referenced this issue Oct 29, 2017

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.