Skip to content

Commit

Permalink
ShowStringPic: Fix bugs found by testers :)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghabry committed Jan 28, 2023
1 parent 77b31f1 commit cc2693f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/game_pictures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -489,6 +490,8 @@ void Game_Pictures::Picture::AttachWindow(const Window_Base& window) {
sprite->SetBitmap(std::make_shared<Bitmap>(window.GetWidth(), window.GetHeight(), data.use_transparent_color));
sprite->OnPictureShow();
sprite->SetVisible(true);

ApplyOrigin(false);
}

void Game_Pictures::Picture::Update(bool is_battle) {
Expand Down
2 changes: 2 additions & 0 deletions src/game_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cc2693f

Please sign in to comment.