File: inventory_item.cpp

package info (click to toggle)
scummvm 2.7.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 363,784 kB
  • sloc: cpp: 3,622,060; asm: 27,410; python: 10,528; sh: 10,241; xml: 6,752; java: 5,579; perl: 2,570; yacc: 1,635; javascript: 1,016; lex: 539; makefile: 398; ansic: 378; awk: 275; objc: 82; sed: 11; php: 1
file content (121 lines) | stat: -rw-r--r-- 4,714 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/* ScummVM - Graphic Adventure Engine
 *
 * ScummVM is the legal property of its developers, whose names
 * are too numerous to list here. Please refer to the COPYRIGHT
 * file distributed with this source distribution.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#include "ags/plugins/core/inventory_item.h"
#include "ags/engine/ac/inventory_item.h"

namespace AGS3 {
namespace Plugins {
namespace Core {

void InventoryItem::AGS_EngineStartup(IAGSEngine *engine) {
	ScriptContainer::AGS_EngineStartup(engine);

	SCRIPT_METHOD(InventoryItem::GetAtScreenXY ^ 2, InventoryItem::GetInvAtLocation);
	SCRIPT_METHOD(InventoryItem::IsInteractionAvailable ^ 1, InventoryItem::CheckInteractionAvailable);
	SCRIPT_METHOD(InventoryItem::GetName ^ 1, InventoryItem::GetName);
	SCRIPT_METHOD(InventoryItem::GetProperty ^ 1, InventoryItem::GetProperty);
	SCRIPT_METHOD(InventoryItem::GetPropertyText ^ 2, InventoryItem::GetPropertyText);
	SCRIPT_METHOD(InventoryItem::GetTextProperty ^ 1, InventoryItem::GetTextProperty);
	SCRIPT_METHOD(InventoryItem::RunInteraction ^ 1, InventoryItem::RunInteraction);
	SCRIPT_METHOD(InventoryItem::SetName ^ 1, InventoryItem::SetName);
	SCRIPT_METHOD(InventoryItem::get_CursorGraphic, InventoryItem::GetCursorGraphic);
	SCRIPT_METHOD(InventoryItem::set_CursorGraphic, InventoryItem::SetCursorGraphic);
	SCRIPT_METHOD(InventoryItem::get_Graphic, InventoryItem::GetGraphic);
	SCRIPT_METHOD(InventoryItem::set_Graphic, InventoryItem::SetGraphic);
	SCRIPT_METHOD(InventoryItem::get_ID, InventoryItem::GetID);
	SCRIPT_METHOD(InventoryItem::get_Name, InventoryItem::GetName_New);
	SCRIPT_METHOD(InventoryItem::set_Name, InventoryItem::SetName);
}

void InventoryItem::GetInvAtLocation(ScriptMethodParams &params) {
	PARAMS2(int, xx, int, yy);
	params._result = AGS3::GetInvAtLocation(xx, yy);
}

void InventoryItem::CheckInteractionAvailable(ScriptMethodParams &params) {
	PARAMS2(ScriptInvItem *, iitem, int, mood);
	params._result = AGS3::InventoryItem_CheckInteractionAvailable(iitem, mood);
}

void InventoryItem::GetName(ScriptMethodParams &params) {
	PARAMS2(ScriptInvItem *, iitem, char *, buff);
	AGS3::InventoryItem_GetName(iitem, buff);
}

void InventoryItem::GetProperty(ScriptMethodParams &params) {
	PARAMS2(ScriptInvItem *, scii, const char *, property);
	params._result = AGS3::InventoryItem_GetProperty(scii, property);
}

void InventoryItem::GetPropertyText(ScriptMethodParams &params) {
	PARAMS3(ScriptInvItem *, scii, const char *, property, char *, bufer);
	AGS3::InventoryItem_GetPropertyText(scii, property, bufer);
}

void InventoryItem::GetTextProperty(ScriptMethodParams &params) {
	PARAMS2(ScriptInvItem *, scii, const char *, property);
	params._result = AGS3::InventoryItem_GetTextProperty(scii, property);
}

void InventoryItem::RunInteraction(ScriptMethodParams &params) {
	PARAMS2(ScriptInvItem *, iitem, int, mood);
	AGS3::InventoryItem_RunInteraction(iitem, mood);
}

void InventoryItem::SetName(ScriptMethodParams &params) {
	PARAMS2(ScriptInvItem *, scii, const char *, newname);
	AGS3::InventoryItem_SetName(scii, newname);
}

void InventoryItem::GetCursorGraphic(ScriptMethodParams &params) {
	PARAMS1(ScriptInvItem *, iitem);
	params._result = AGS3::InventoryItem_GetCursorGraphic(iitem);
}

void InventoryItem::SetCursorGraphic(ScriptMethodParams &params) {
	PARAMS2(ScriptInvItem *, iitem, int, newSprite);
	AGS3::InventoryItem_SetCursorGraphic(iitem, newSprite);
}

void InventoryItem::GetGraphic(ScriptMethodParams &params) {
	PARAMS1(ScriptInvItem *, iitem);
	params._result = AGS3::InventoryItem_GetGraphic(iitem);
}

void InventoryItem::SetGraphic(ScriptMethodParams &params) {
	PARAMS2(ScriptInvItem *, iitem, int, piccy);
	AGS3::InventoryItem_SetGraphic(iitem, piccy);
}

void InventoryItem::GetID(ScriptMethodParams &params) {
	PARAMS1(ScriptInvItem *, iitem);
	params._result = AGS3::InventoryItem_GetID(iitem);
}

void InventoryItem::GetName_New(ScriptMethodParams &params) {
	PARAMS1(ScriptInvItem *, iitem);
	params._result = AGS3::InventoryItem_GetName_New(iitem);
}

} // namespace Core
} // namespace Plugins
} // namespace AGS3