ScummVM API documentation
room_support.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_SUPPORT_H
23#define HARVESTER_ROOM_SUPPORT_H
24
25#include "common/array.h"
26#include "common/rect.h"
27#include "common/scummsys.h"
28#include "common/str.h"
29#include "harvester/script/script.h"
30
31namespace Graphics {
32class Font;
33class Screen;
34}
35
36namespace Harvester {
37
38class HarvesterEngine;
39class ResourceManager;
40class Entity;
41class Art;
42class DialogueSystem;
43struct IndexedBitmap;
44struct MenuTextConfig;
45
46struct SceneState {
47 ScriptExecutionContext executionContext() const { return ScriptExecutionContext(state.roomName); }
48
49 RoomSetupState state;
50 byte palette[256 * 3] = { 0 };
51 Common::Array<ObjectRecord> sceneObjects;
52 Common::Array<AnimRecord> sceneAnimations;
53 Common::Array<RegionRecord> sceneRegions;
54 float targetPaletteBrightness = 1.0f;
55};
56
58 const ObjectRecord *object = nullptr;
59 const NpcRecord *npc = nullptr;
60 const RegionRecord *region = nullptr;
61 const Entity *playerEntity = nullptr;
62 Common::String promptText;
63 int cursorSequence = 7;
64};
65
66bool sameMonsterEntityState(const MonsterRecord &lhs, const MonsterRecord &rhs);
67bool applyRoomActorPlacement(const RoomSetupState &state, Entity &entity,
68 int centerX, int bottomY, float z, const Common::String *entranceName = nullptr);
69void logScenePaletteSummary(const char *label, const SceneState &scene, float brightness);
70bool captureScreenBackdrop(const Graphics::Screen &screen, IndexedBitmap &bitmap);
71bool shouldDisplaySceneAnimation(const AnimRecord &anim);
72bool shouldRunStartupRoomProbe();
73bool doesPlayerFacingMatchRegion(int playerFacing, const RegionRecord &region);
74bool doesPlayerOverlapRegion(const Entity &playerEntity, const RegionRecord &region);
75
76} // End of namespace Harvester
77
78#endif // HARVESTER_ROOM_SUPPORT_H
Definition: array.h:52
Definition: str.h:59
Definition: screen.h:47
Definition: entity.h:66
Definition: script.h:269
Definition: formatinfo.h:28
Definition: script.h:113
Definition: bitmap.h:33
Definition: monster.h:31
Definition: script.h:132
Definition: script.h:86
Definition: script.h:164
Definition: room_support.h:57
Definition: script.h:237
Definition: room_support.h:46
Definition: atari-screen.h:58