From cc2693f9408b73c35ce36ec2fb0851fba7161bd2 Mon Sep 17 00:00:00 2001 From: Ghabry Date: Wed, 7 Dec 2022 22:27:00 +0100 Subject: [PATCH] ShowStringPic: Fix bugs found by testers :) --- src/game_pictures.cpp | 3 +++ src/game_windows.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/game_pictures.cpp b/src/game_pictures.cpp index fe2de64a51d..2a5f068dc82 100644 --- a/src/game_pictures.cpp +++ b/src/game_pictures.cpp @@ -231,6 +231,7 @@ bool Game_Pictures::Picture::Show(const ShowParams& params) { data.easyrpg_flip = params.flip_x ? lcf::rpg::SavePicture::EasyRpgFlip_x : 0; data.easyrpg_flip |= params.flip_y ? lcf::rpg::SavePicture::EasyRpgFlip_y : 0; data.easyrpg_blend_mode = params.blend_mode; + data.easyrpg_type = lcf::rpg::SavePicture::EasyRpgType_default; // Not saved as the coordinate system is directly transformed to "center" origin = params.origin; @@ -489,6 +490,8 @@ void Game_Pictures::Picture::AttachWindow(const Window_Base& window) { sprite->SetBitmap(std::make_shared(window.GetWidth(), window.GetHeight(), data.use_transparent_color)); sprite->OnPictureShow(); sprite->SetVisible(true); + + ApplyOrigin(false); } void Game_Pictures::Picture::Update(bool is_battle) { diff --git a/src/game_windows.cpp b/src/game_windows.cpp index 9e941a9e17c..eb525d43fb7 100644 --- a/src/game_windows.cpp +++ b/src/game_windows.cpp @@ -87,6 +87,8 @@ Game_Windows::Window_User* Game_Windows::GetWindowPtr(int id) { } bool Game_Windows::Window_User::Create(const WindowParams& params) { + Erase(); + data.width = params.width; data.height = params.height; data.system_name = lcf::DBString(params.system_name);