1 /* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 *
21 */
22
23 #include "ags/engine/ac/game_state.h"
24 #include "ags/engine/ac/global_inv_window.h"
25 #include "ags/engine/ac/global_translation.h"
26 #include "ags/engine/ac/properties.h"
27 #include "ags/shared/gui/gui_main.h"
28 #include "ags/shared/gui/gui_inv.h"
29 #include "ags/engine/script/executing_script.h"
30 #include "ags/globals.h"
31
32 namespace AGS3 {
33
34 using namespace AGS::Shared;
35
sc_invscreen()36 void sc_invscreen() {
37 _G(curscript)->queue_action(ePSAInvScreen, 0, "InventoryScreen");
38 }
39
SetInvDimensions(int ww,int hh)40 void SetInvDimensions(int ww, int hh) {
41 _GP(play).inv_item_wid = ww;
42 _GP(play).inv_item_hit = hh;
43 _GP(play).inv_numdisp = 0;
44 // backwards compatibility
45 for (int i = 0; i < _G(numguiinv); i++) {
46 _GP(guiinv)[i].ItemWidth = ww;
47 _GP(guiinv)[i].ItemHeight = hh;
48 _GP(guiinv)[i].OnResized();
49 }
50 }
51
52 } // namespace AGS3
53