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

Show Picture: Image invisible when map & battle layer are disabled #2874

Closed
BlisterB opened this issue Dec 18, 2022 · 3 comments
Closed

Show Picture: Image invisible when map & battle layer are disabled #2874

BlisterB opened this issue Dec 18, 2022 · 3 comments

Comments

@BlisterB
Copy link
Member

BlisterB commented Dec 18, 2022

I've migrated my project to EasyRPG, and I noticed that Show Picture are not displayed.

Here's an example:

  • Start a new game
  • A blue custom message box is displayed with RPG_RT, but not with Player (EasyRPG)

Please note that this problem is not linked with the widescreen support, as it also appears with base resolution.

The common event that trigger the Show Picture is "88 Affichetexte".

image
image

A link to the game, you can find RPG_RT and Player (EasyRPG) inside:
https://e1.pcloud.link/publink/show?code=XZrz6YZvuWBKUQcYgJWvbbboMBvy50if41X

easyrpg_log.txt

@Ghabry
Copy link
Member

Ghabry commented Dec 18, 2022

The checkbox for "Show On Map" and for "Show On Battle" are unchecked so the Player does exactly this: It is invisible.

image

Though seems that RPG_RT automatically changes the map layer to 7 in that case.

@CherryDT do you remember if you implemented a fail-safe here that resets the map layer to 7 when both map and battle layer are disabled (0)? Asking is faster than starting up the dissasembler xD.

@Ghabry Ghabry added this to the 0.7.1 milestone Dec 18, 2022
@Ghabry Ghabry changed the title Show Picture doesn't works after migrating to Maniac Patch Show Picture: Image invisible when map & battle layer are disabled Dec 18, 2022
@CherryDT
Copy link

CherryDT commented Dec 18, 2022

I did but I don't remember if it's on 0/0 or on lower parameter count only. I guess it was on 0/0 though. This is also needed to be compatible with older versions without this setting.

@Ghabry
Copy link
Member

Ghabry commented Feb 23, 2023

well this one is simple, too:

diff --git a/src/game_pictures.cpp b/src/game_pictures.cpp
index 82d52946..5163f0cc 100644
--- a/src/game_pictures.cpp
+++ b/src/game_pictures.cpp
@@ -205,6 +205,11 @@ bool Game_Pictures::Picture::Show(const ShowParams& params) {
        data.spritesheet_speed = params.spritesheet_speed;
        data.map_layer = params.map_layer;
        data.battle_layer = params.battle_layer;
+
+       if (data.map_layer == 0 && data.battle_layer == 0) {
+               data.map_layer = 7;
+       }
+
        data.flags.erase_on_map_change = (params.flags & 1) == 1;
        data.flags.erase_on_battle_end = (params.flags & 2) == 2;
        data.flags.affected_by_tint = (params.flags & 16) == 16;

Ghabry added a commit to Ghabry/easyrpg-player that referenced this issue Mar 8, 2023
Ghabry added a commit to Ghabry/easyrpg-player that referenced this issue Mar 8, 2023
Ghabry added a commit to Ghabry/easyrpg-player that referenced this issue Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants