ScummVM API documentation
macs2_constants.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 MACS2_CONSTANTS_H
23#define MACS2_CONSTANTS_H
24
25#include "common/scummsys.h"
26
27namespace Macs2 {
28
29// V1 (AHFFMACS0100) viewport - default engine dimensions.
30static constexpr int kScreenWidth = 320;
31static constexpr int kScreenWidthLast = kScreenWidth - 1;
32static constexpr int kGameHeight = 200;
33static constexpr int kGameHeightLast = kGameHeight - 1;
34
35// V2 dimensions.
36static constexpr int kWinScreenWidth = 640;
37static constexpr int kWinScreenWidthLast = kWinScreenWidth - 1;
38static constexpr int kWinGameHeight = 400;
39static constexpr int kWinGameHeightLast = kWinGameHeight - 1;
40
41// SCUMM-style verb/inventory strip (kEnhUIUX enhancement only).
42static constexpr int kUIHeight = 64;
43static constexpr int kScreenHeight = kGameHeight + kUIHeight;
44static constexpr int kScreenHeightLast = kScreenHeight - 1;
45static constexpr int kWinScreenHeight = kWinGameHeight + kUIHeight;
46
51static constexpr uint kMcsMagicSize = 12;
52static constexpr const char *kMcsMagicV1 = "AHFFMACS0100";
53static constexpr const char *kMcsMagicV2 = "AHFFMACS0200";
54
56static constexpr uint32 kMcsV1ActorIndexOffset = 0x0C;
57static constexpr uint32 kMcsV1DirectoryOffset = 0x10;
58static constexpr uint32 kMcsV1DirectorySize = 0x3000; // 512 entries * 12 bytes
60static constexpr uint32 kMcsV1ObjectDataPtrRel = 0x17F4;
62static constexpr uint32 kMcsV1ObjectScriptPtrRel = 0x17F8;
63static constexpr uint32 kMcsV1VanillaPaletteOffset = kMcsV1DirectoryOffset + kMcsV1DirectorySize; // 0x3010
64static constexpr uint32 kMcsV1VanillaPaletteSize = 0x300;
65static constexpr uint32 kMcsV1ShadingTableOffset = kMcsV1VanillaPaletteOffset + kMcsV1VanillaPaletteSize; // 0x3310
66static constexpr uint32 kMcsV1ShadingTableSize = 0x800;
67static constexpr uint kMcsV1CursorImageCount = 0x21;
68static constexpr uint kMcsV1MapSceneOffsetCount = 256;
69static constexpr uint32 kMcsV1MapSceneOffsetsSize = kMcsV1MapSceneOffsetCount * 4; // 0x400
70static constexpr uint kPathNodeSlots = 16;
71
72static constexpr uint32 kMcsV2ActorIndexOffset = 0x20E;
73static constexpr uint32 kMcsV2DirectoryOffset = 0x212;
74
75} // namespace Macs2
76
77#endif // MACS2_CONSTANTS_H