ScummVM API documentation
strings.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 HOLLYWOOD_RUNAWAY_STRINGS_H
23#define HOLLYWOOD_RUNAWAY_STRINGS_H
24
25#include "common/hash-str.h"
26#include "common/language.h"
27#include "common/ustr.h"
28
29namespace Common {
30class Archive;
31}
32
33namespace Hollywood {
34
35// Original executable labels are compiled from PO catalogs into hollywood.dat.
36// Dialogue and subtitles remain in RESOURCE.003.
38public:
39 enum TextId {
40 kLook, kTake, kUse, kPutAway, kWith, kInventory, kResume,
41 kOpen, kClose, kMove, kLookThrough, kUsePhone, kTakeFromShelf,
42 kUnplugCooler, kShirt, kWetCloth, kDirtyCloth,
43 kOptions, kLoad, kSave, kDelete, kPlay, kQuit, kMusic, kAntialias,
44 kScrolling, kPointerSound, kSubtitles, kOn, kOff, kFast, kSlow,
45 kVolume, kBrightness, kCredits, kSaveSettings, kDefaultSettings,
46 kConfirmQuit, kYes, kNo, kQuitKey, kLeaveHatch,
47 kEnterSaveName, kNoSaves, kNewSave, kGameSaved, kSettingsSaved, kDefaultsRestored,
48 kSaveFailed, kLoadFailed, kDeleteFailed, kNoFreeSlots, kDeleteKey, kCreditsFailed,
49 kPlayBeginning, kPlayChapter,
50 kDryMarkerPen, kSyringeWithAlcohol, kFakeMedicalChart, kHeadWithWig, kGlassWithWater,
51 kBoxOfSyringes, kMedicalChart, kFakeChart,
52 kMuseumDemoCondom, kFrozenBattery, kMayanPryingTool, kGroundCoffeeBowl, kEmptyBowl, kLadleWithBattery,
53 kAnthropologyBooks, kDocuments, kAlteredLaser, kVarnishBriefcase, kWilly,
54 kMayanBowlsAndJars, kExhibitBucket, kTeapot, kExhibitBowl,
55 kThermalChamber, kKey, kNitrogenTank, kElectronMicroscope,
56 kMakeshiftBullet, kPileOfMakeshiftBullets,
57 kMendedStrap, kBottleWithWater, kBottleWithGasoline, kFilledMeasuringTube,
58 kPolishedStone, kStoneOfLight, kMakeshiftMortar, kSteamOutletLever, kPressureWheel,
59 kMakeshiftMiningTool, kHotScalpel, kOpenPods, kTextCount
60 };
61 explicit RunawayStrings(Common::Language language) : _language(language) {}
62 bool load();
63 Common::U32String text(TextId id) const;
64 Common::U32String itemName(byte chapter, byte item) const;
65 Common::U32String hotspotName(uint16 scene, byte hotspot) const;
66 Common::U32String sceneActionCaption(uint16 scene, byte hotspot, byte item, bool look, const char *variant = nullptr) const;
67 Common::U32String combinationCaption(byte chapter, byte item, byte target) const;
68 static Common::U32String formatActionCaption(const Common::U32String &pattern, const Common::U32String &item, const Common::U32String &target);
69 Common::U32String shackHotspotName(byte hotspot) const;
70
71private:
72 bool loadCatalog(const Common::Archive &archive, const char *language);
73 Common::U32String lookup(const Common::String &key) const;
74 Common::Language _language;
76};
77
78} // End of namespace Hollywood
79
80#endif
Definition: archive.h:141
Definition: str.h:59
Definition: ustr.h:57
Definition: strings.h:37
Language
Definition: language.h:45
Definition: algorithm.h:29