[Scummvm-git-logs] scummvm master -> 162802ba0c4476d30d0a465e7e4be75f941cd390

tag2015 noreply at scummvm.org
Wed Dec 4 22:13:31 UTC 2024


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:
162802ba0c AGS: Fix game.top_inv_item script variable not working (again)


Commit: 162802ba0c4476d30d0a465e7e4be75f941cd390
    https://github.com/scummvm/scummvm/commit/162802ba0c4476d30d0a465e7e4be75f941cd390
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2024-12-04T23:11:28+01:00

Commit Message:
AGS: Fix game.top_inv_item script variable not working (again)

This completes commit f1ce81461e40dcf924c9d63aef8e0744bc5b74ce
that was only partially working after the update to AGS 3.6.1
Fix #15545

Changed paths:
    engines/ags/engine/ac/dynobj/script_game.cpp


diff --git a/engines/ags/engine/ac/dynobj/script_game.cpp b/engines/ags/engine/ac/dynobj/script_game.cpp
index d45892b2653..5bf4bad2709 100644
--- a/engines/ags/engine/ac/dynobj/script_game.cpp
+++ b/engines/ags/engine/ac/dynobj/script_game.cpp
@@ -23,6 +23,8 @@
 #include "ags/engine/ac/dynobj/script_game.h"
 #include "ags/engine/ac/game.h"
 #include "ags/engine/ac/game_state.h"
+#include "ags/shared/ac/game_setup_struct.h"
+#include "ags/shared/gui/gui_main.h"
 #include "ags/shared/script/cc_common.h" // cc_error
 #include "ags/globals.h"
 
@@ -231,6 +233,7 @@ void CCScriptGame::WriteInt32(void *address, intptr_t offset, int32_t val) {
 		break;
 	case 57:
 		_GP(play).inv_top = val;
+		GUI::MarkInventoryForUpdate(_GP(game).playercharacter, true);
 		break;
 	case 58: // play.inv_numdisp
 	case 59: // play.inv_numorder




More information about the Scummvm-git-logs mailing list