ScummVM API documentation
room_presentation.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 HARVESTER_ROOM_PRESENTATION_H
23#define HARVESTER_ROOM_PRESENTATION_H
24
25#include "common/error.h"
26#include "graphics/font.h"
27#include "harvester/script/script.h"
28
29namespace Graphics {
30class Screen;
31}
32
33namespace Harvester {
34
35class Art;
36class Flow;
37class HarvesterEngine;
38struct IndexedBitmap;
39struct ResolvedText;
40struct SceneState;
41
43 const Art *art;
44 const Graphics::Font *promptFont;
45 const Graphics::Font *inspectFont;
46 const Graphics::Font *inventoryTooltipFont;
47 bool useNativePromptFont;
48 bool useNativeInspectFont;
49};
50
52 ResolvedText inspectText;
53 Common::String currentInteractionPromptText;
54 bool showingInspectText = false;
55 bool inspectCanDismiss = false;
56 ResolvedText combatLoadoutStatusText;
57 uint32 combatLoadoutStatusHideTick = 0;
58 bool closeInventoryAfterCombatLoadoutStatus = false;
59};
60
62public:
64 const Art *art, const Graphics::Font *inspectFont, bool useNativeInspectFont);
65
66 static void drawRoomScene(HarvesterEngine &engine, Graphics::Screen &screen,
67 const SceneState &scene, float brightness);
68
69 static void blitBitmap(Graphics::Screen &screen, const IndexedBitmap &bitmap, int x, int y);
70 static void drawShadowedString(Graphics::Screen &screen, const Graphics::Font &font, const Common::String &text,
71 int x, int y, int width, byte color, Graphics::TextAlign align = Graphics::kTextAlignLeft);
72 static void drawWrappedText(Graphics::Screen &screen, const Graphics::Font &font, const Common::String &text,
73 int x, int y, int width, byte color, int lineSpacing, bool useCftCharacterWrapping = false);
74 static const IndexedBitmap *resolveInspectTextboxBitmap(const Art &art, const ResolvedText &text);
75 static void drawRoomInspectText(Graphics::Screen &screen, const Art &art, const Graphics::Font &font,
76 const ResolvedText &inspectText, bool useNativeFont);
77
78 bool captureDialogueBackdrop(IndexedBitmap &dialogueBackdrop);
79 Common::Error applyLightingCommand(StartupLightingCommand lightingCommand);
80 Common::Error runModalShowText(const ResolvedText &modalText, Flow &flow);
81
82private:
83 HarvesterEngine &_engine;
84 SceneState &_scene;
85 const Art *_art;
86 const Graphics::Font *_inspectFont;
87 bool _useNativeInspectFont;
88};
89
90} // End of namespace Harvester
91
92#endif // HARVESTER_ROOM_PRESENTATION_H
Definition: error.h:81
Definition: str.h:59
Definition: font.h:83
Definition: screen.h:47
Definition: art.h:35
Definition: flow.h:45
Definition: harvester.h:47
Definition: room_presentation.h:61
TextAlign
Definition: font.h:48
@ kTextAlignLeft
Align the text to the left.
Definition: font.h:51
Definition: formatinfo.h:28
Definition: bitmap.h:33
Definition: script.h:306
Definition: room_presentation.h:51
Definition: room_presentation.h:42
Definition: room_support.h:46
Definition: atari-screen.h:58