ScummVM API documentation
scene_surface_state.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_MONSTERS_SCENES_PLAYABLE_SCENE_SURFACE_STATE_H
23#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE_SURFACE_STATE_H
24
25#include "common/array.h"
26#include "common/types.h"
27#include "graphics/managed_surface.h"
28
29#include "hollywood/monsters/graphics.h"
30
31namespace Hollywood {
32
47public:
48 void initialize(uint paletteSize, uint paletteMaskOriginalSize, uint paletteMaskUsedBytes,
49 uint paletteMapPageSize, uint paletteRegionCount, uint actorPaletteBaseSize);
50 void initializeFramebuffers();
51 uint framebufferByteCount() const;
52 byte *framebufferPixels(Graphics::ManagedSurface &surface);
53 const byte *framebufferPixels(const Graphics::ManagedSurface &surface) const;
54 void copyBaseFramebufferToSceneFramebuffer();
55 void restoreBaseFramebufferFromOriginal();
56 bool isFramebufferOffsetValid(uint offset) const;
57 byte savedFramebufferPixelAt(uint offset) const;
58 void setPaletteEntry6Bit(byte colorIndex, byte red, byte green, byte blue);
59 byte paletteEntryComponent6Bit(byte colorIndex, uint component) const;
60 void rebuildPresentationPaletteRemapTable();
61 bool updatePresentedScreenCache();
62
63 Common::Array<byte> _paletteResource;
64 Common::Array<byte> _paletteCurrent;
65 Common::Array<byte> _actorPaletteBase;
66 Graphics::ManagedSurface _baseFramebufferOriginal;
67 Graphics::ManagedSurface _baseFramebuffer;
68 Graphics::ManagedSurface _sceneFramebuffer;
69 Graphics::ManagedSurface _savedFramebuffer;
70 Common::Array<byte> _fillRuns;
71 Common::Array<byte> _paletteMaskOriginal;
72 Common::Array<byte> _paletteMask;
73 Common::Array<byte> _fullPaletteRegionMask;
74 Common::Array<byte> _walkablePaletteMask;
75 Common::Array<byte> _colorToActorDepthClassMap;
76 Common::Array<byte> _presentationPaletteRemapTable;
77 Common::Array<uint16> _actorDepthYThresholds;
78 Common::Array<uint16> _drawActorDepthYThresholds;
80 Graphics::ManagedSurface _presentedScreen;
81 Palette6Bit _displayPalette;
82 bool _hasPresentedScreen;
83};
84
85} // End of namespace Hollywood
86
87#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE_SURFACE_STATE_H
Definition: managed_surface.h:51
Definition: graphics.h:51
Definition: scene_surface_state.h:46