ScummVM API documentation
data.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 ULTIMA1_DATA_DATA_H
23#define ULTIMA1_DATA_DATA_H
24
25#include "common/rect.h"
26#include "common/serializer.h"
27#include "ultima/ultima1/data/entity.h"
28
29namespace Ultima {
30namespace Ultima1 {
31namespace Data {
32
33constexpr int MAX_NAME_LENGTH = 14;
34constexpr int QUEST_COUNT = 9;
35constexpr int OVERWORLD_ENTITY_COUNT = 40;
36constexpr int CREATURES_COUNT = 10;
37constexpr int LOCATION_ENTITY_COUNT = 15;
38
39extern const char *SEX_NAMES[];
40extern const char *RACE_NAMES[];
41extern const char *CLASS_NAMES[];
42extern const char *ARMOR_NAMES[];
43extern const char *WEAPON_NAMES[];
44extern const char *WEAPON_NAMES_LOWER[];
45extern const byte WEAPONS_DISTANCE[];
46extern const char *SPELL_NAMES[];
47extern const char *SPELL_PHRASES[];
48extern const char *TRANSPORT_NAMES[];
49extern const char *GEM_NAMES[];
50
51// Per player-transport-type chance (as a 1-100 threshold) for a pursuing
52// monster to get a chance to move/attack on a given turn - faster player
53// transports make it harder for monsters to keep up
54extern const int TRANSPORT_RANDOM_THRESHOLD[];
55
56// Per player-transport-type number of turns between each point of food
57// consumed - faster/hungrier transports (or none at all, for the time
58// machine) burn through food quicker
59extern const int FOOD_PER_TRANSPORT[];
60
61enum Sex {
62 SEX_MALE = 0, SEX_FEMALE = 1
63};
64enum Race {
65 RACE_HUMAN = 1, RACE_ELF = 2, RACE_DWARF = 3, RACE_BOBBIT = 4
66};
67enum CharClass {
68 CLASS_FIGHTER = 1, CLASS_CLERIC = 2, CLASS_WIZARD = 3, CLASS_THIEF = 4
69};
70
71// Indexes into _armor. Index 0 isn't a real item - it mirrors the
72// unexplained sentinel field seen immediately before the named item
73// slots in the original armor/weapon/spell/transport lists
74enum ArmorType {
75 ARMOR_NONE = 0, ARMOR_LEATHER = 1, ARMOR_CHAINMAIL = 2, ARMOR_PLATE_MAIL = 3,
76 ARMOR_VACUUM_SUIT = 4, ARMOR_REFLECT_SUIT = 5, ARMOR_COUNT = 6
77};
78
79// Indexes into _weapons
80enum WeaponType {
81 WEAPON_NONE = 0, WEAPON_DAGGER = 1, WEAPON_MACE = 2, WEAPON_AXE = 3,
82 WEAPON_ROPE_AND_SPIKES = 4, WEAPON_SWORD = 5, WEAPON_GREAT_SWORD = 6, WEAPON_BOW = 7,
83 WEAPON_AMULET = 8, WEAPON_WAND = 9, WEAPON_STAFF = 10, WEAPON_TRIANGLE = 11,
84 WEAPON_PISTOL = 12, WEAPON_LIGHT_SWORD = 13, WEAPON_PHAZOR = 14, WEAPON_BLASTER = 15,
85 WEAPON_COUNT = 16
86};
87
88// Indexes into _spells
89enum SpellType {
90 SPELL_PRAYER = 0, SPELL_OPEN = 1, SPELL_UNLOCK = 2, SPELL_MAGIC_MISSILE = 3, SPELL_STEAL = 4,
91 SPELL_LADDER_DOWN = 5, SPELL_LADDER_UP = 6, SPELL_BLINK = 7, SPELL_CREATE = 8,
92 SPELL_DESTROY = 9, SPELL_KILL = 10, SPELL_COUNT = 11
93};
94
95// Indexes into _transports
96enum TransportType {
97 TRANSPORT_FOOT = 0, TRANSPORT_HORSE = 1, TRANSPORT_CART = 2, TRANSPORT_RAFT = 3,
98 TRANSPORT_FRIGATE = 4, TRANSPORT_AIRCAR = 5, TRANSPORT_SHUTTLE = 6, TRANSPORT_TIME_MACHINE = 7,
99 TRANSPORT_COUNT = 8
100};
101
102} // namespace Data
103} // namespace Ultima1
104} // namespace Ultima
105
106#endif