[Scummvm-git-logs] scummvm master -> 1a001403485e8472ccaaf48492df929afd89620d
dreammaster
dreammaster at scummvm.org
Mon Mar 15 03:19:32 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1a00140348 AGS: Workaround for Shivah map crash
Commit: 1a001403485e8472ccaaf48492df929afd89620d
https://github.com/scummvm/scummvm/commit/1a001403485e8472ccaaf48492df929afd89620d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-03-14T20:19:15-07:00
Commit Message:
AGS: Workaround for Shivah map crash
Changed paths:
engines/ags/engine/ac/button.cpp
diff --git a/engines/ags/engine/ac/button.cpp b/engines/ags/engine/ac/button.cpp
index fb6e1b72bc..27aad8afd5 100644
--- a/engines/ags/engine/ac/button.cpp
+++ b/engines/ags/engine/ac/button.cpp
@@ -154,9 +154,16 @@ void Button_SetNormalGraphic(GUIButton *guil, int slotn) {
if (((guil->IsMouseOver == 0) || (guil->MouseOverImage < 1)) && (guil->IsPushed == 0))
guil->CurrentImage = slotn;
guil->Image = slotn;
- // update the clickable area to the same size as the graphic
- guil->Width = _GP(game).SpriteInfos[slotn].Width;
- guil->Height = _GP(game).SpriteInfos[slotn].Height;
+
+ // WORKAROUND: Showing the map in Shivah has a button with invalid slot -1
+ if (slotn == -1) {
+ guil->Width = 0;
+ guil->Height = 0;
+ } else {
+ // update the clickable area to the same size as the graphic
+ guil->Width = _GP(game).SpriteInfos[slotn].Width;
+ guil->Height = _GP(game).SpriteInfos[slotn].Height;
+ }
_G(guis_need_update) = 1;
FindAndRemoveButtonAnimation(guil->ParentId, guil->Id);
More information about the Scummvm-git-logs
mailing list