ScummVM API documentation
usecode.h
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 modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (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, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef DARKSEED_USECODE_H
23#define DARKSEED_USECODE_H
24
25#include "common/scummsys.h"
26#include "darkseed/console.h"
27#include "darkseed/inventory.h"
28#include "darkseed/objects.h"
29#include "darkseed/player.h"
30
31namespace Darkseed {
32
33class UseCode {
34 Console *_console = nullptr;
35 Player *_player = nullptr;
36 Objects &_objectVar;
37 Inventory &_inventory;
38 uint8 _genericResponseCounter = 0;
39
40public:
41 UseCode(Console *console, Player *player, Objects &objectVar, Inventory &inventory);
42
43 void useCode(int objNum);
44 void useCodeGloves(int16 targetObjNum);
45 void useCodeMoney(int16 targetObjNum);
46 void useCodeJournal(int16 actionObjNum, int16 targetObjNum);
47 void useCodeShopItems(int16 actionObjNum, int16 targetObjNum);
48 void useCrowBar(int16 targetObjNum);
49 void useCodeNewspaper(int16 targetObjNum);
50 void useCodeLibraryCard(int16 targetObjNum);
51 void useCodeBobbyPin(int16 targetObjNum);
52 void useCodeKeys(int16 actionObjNum, int16 targetObjNum);
53 void useCodeMirrorShard(int16 targetObjNum);
54 void useCodeBinoculars(int16 targetObjNum);
55 void useCodeShovel(int16 targetObjNum);
56 void useCodeDelbertsCard(int16 targetObjNum);
57 void useCodeStick(int16 targetObjNum);
58 void useCodeAxeHandle(int16 targetObjNum);
59 void useCodeRope(int16 targetObjNum);
60 void useCodeMicroFilm(int16 targetObjNum);
61 void useCodeSpecialHammer(int16 actionObjNum, int16 targetObjNum);
62 void useCodeGun(int16 targetObjNum);
63 void useCodeMoversNote(int16 targetObjNum);
64 void useCodeBluePrints(int16 targetObjNum);
65 void useCodeWatch(int16 targetObjNum);
66 void useCodeTinCup(int16 targetObjNum);
67 void useCodeEmptyUrn(int16 targetObjNum);
68 void genericResponse(int16 useObjNum, int16 targetObjNum, int16 tosIdx);
69
70private:
71 int getHandDescriptionTosIdx(uint16 objNum);
72 int16 getUseGlovesTosIdx(uint16 objNum);
73 int16 getUseMoneyTosIdx(uint16 objNum);
74 int16 getUseCrowbarTosIdx(uint16 objNum);
75 int16 getUseJournalTosIdx(uint16 objNum);
76 int16 getUseLibraryCardTosIdx(uint16 objNum);
77 int16 getUseBobbyPinTosIdx(uint16 objNum);
78 int16 getUseKeysTosIdx(uint16 objNum);
79 int16 getUseBinocularsTosIdx(uint16 objNum);
80 int16 getUseShovelTosIdx(uint16 objNum);
81 int16 getUseDelbertsCardTosIdx(uint16 objNum);
82 int16 getUseStickTosIdx(uint16 objNum);
83 int16 getUseAxeHandleTosIdx(uint16 objNum);
84 int16 getUseRopeTosIdx(uint16 objNum);
85 int16 getUseMicroFilmTosIdx(uint16 objNum);
86 int16 getUseSpecialHammerTosIdx(uint16 objNum);
87 int16 getUseGunTosIdx(uint16 objNum);
88 int16 getUseWatchTosIdx(uint16 objNum);
89
90 void putObjUnderPillow(int objNum);
91
92 void startDigging(int16 targetObjNum);
93 void genericSingleObjectResponse(const I18nText &text, int16 useObjNum, KoreanObjectSuffixType krObjSuffixType=KoreanObjectSuffixType::None);
94};
95
96} // namespace Darkseed
97
98#endif // DARKSEED_USECODE_H
Definition: console.h:32
Definition: inventory.h:27
Definition: objects.h:36
Definition: player.h:31
Definition: usecode.h:33
Definition: langtext.h:37