[WideScreen] Various fixes related with FakeResolution Mode (Pictures/Panoramas' position & Camera Scrolling)#3510
[WideScreen] Various fixes related with FakeResolution Mode (Pictures/Panoramas' position & Camera Scrolling)#3510BlisterB wants to merge 9 commits intoEasyRPG:masterfrom
Conversation
|
ca660b6 Fixes the calculation of Picture's offset (the fix is similar to e073662 for Panoramas). At first it didn't solve issues in Aëdemphia for some map smaller than the screen.
I discovered that when using FakeResolution mode, the result was wrong, ex. with a map of 20 horizontal tiles:
Turns out 80c4715 fixes this issue by removing this offset applying to the screen X/Y position when using FakeResolution mode. Interior are now fixed in Aëdemphia, here is a video of the first town of the city with this PR: |
|
In Aëdemphia, the waterfall map using parallax effect displays Picture with the wrong offset, both with wide and ultra-wide mode. In 320x240: OK In Ultra-wide: KO |
|
The graphical bug previously reported on Aëdemphia, in the waterfall map with parallax, is not a bug related to EasyRPG. While analyzing the code in RPG Maker, I found that the pictures used for the environments were not configured to scroll with the map. It's an error, as they are configured to scroll with the map in all other maps. By checking "Scrolls with the map", the problem is solved and the Parallax even works as expected. Here is a video showing the result: This further validates the implementation of this PR. 👍
|
|
c60093d Fixes the starting position of the camera :
It applies an offset corresponding to the black border's size. Fix one of the two problems from #3511
|
|
d580fce Fixes the scrolling of the camera :
It applies an offset corresponding to the black border's size in The issue #3511 is now completely fixed |
|
Here is a showcase of the scrolling fixed on "Onsen: A Tale of Yu" |
|
I found a bug related to the widescreen mode.
|
|
The bug previously reported has been fixed by applying an offset to the Panorama only when the map is to small to fit the screen. |
|
@Ghabry I don't have any reported bugs for this PR. Seems good for now. |
There was a problem hiding this comment.
@BlisterB I'm sorry that it took so long. I made some tests in various games I used to implement the fake panorama stuff and couldn't find any regressions. Good job 👍 (so I can conclude you didn't make it worse xD).
There are just some small things that must be changed:
- Please rebase your code to get the latest upstream commits
git remote add upstream https://github.com/easyrpg/player
git fetch upstream
git rebase upstream/master
# Push changes
git push --force-with-lease origin
Your code seems to conflict with a change in upstream. With your code it doesn't seem to be relevant anymore and it breaks rendering of panoramas in the fake res case. At least couldn't find any reason to keep it. Just remove these lines to make it work:
diff --git a/src/plane.cpp b/src/plane.cpp
index d4c9806cd..a2650722c 100644
--- a/src/plane.cpp
+++ b/src/plane.cpp
@@ -84,11 +84,6 @@ void Plane::Draw(Bitmap& dst) {
dst_rect.x = bg_x;
dst_rect.width = bg_width;
- if (Game_Map::GetDisplayX() / 16 + Player::screen_width > Game_Map::GetTilesX() * TILE_SIZE) {
- // Do not draw out of bounds to the right
- dst_rect.width -= (Game_Map::GetDisplayX() / 16 + Player::screen_width) - (Game_Map::GetTilesX() * TILE_SIZE);
- }
-
// Correct the offset if the top-left corner moved.
offset_x = shake_x + bg_x;
}FakeXPosition and FakeYPosition in Panorama are not used anymore. Please remove them including all reads/writes from to the variables parallax_fake_x and parallax_fake_y
bool Game_Map::Parallax::FakeXPosition() {
return parallax_fake_x;
}
bool Game_Map::Parallax::FakeYPosition() {
return parallax_fake_y;
}
… the map is too small to fit the screen
|
Hi @Ghabry , I implemented all the actions 👍 |







This PR will address problems of Panoramas/Pictures not being correctly displayed when using Custom Resolution and the FakeResolution mode.
Problems occur when displaying a map smaller than the screen. With the FakeResolution mode, the map is centered (and black bar are displayed around the screen.
But Panoramas and pictures offset are not calculated correctly, resulting in wrong positioning.
I discovered that the root cause was that the code was assuming that small maps were always of the size of 320x240, therefore maps with size larger than 320x240 but smaller than the Custom Resolution were not handled correctly.
Please do not merge yet, the issue related to Panorama should be fixed, but I discovered that we have a similar problem with Pictures.
As mentioned in #3509, Aëdemphia is a great game to test this PR.
This also fixes #3342 .
Fix #3509