Horizon Official Technical Documentation
GridDefinitions.hpp
Go to the documentation of this file.
1/***************************************************
2 * _ _ _ *
3 * | | | | (_) *
4 * | |_| | ___ _ __ _ _______ _ __ *
5 * | _ |/ _ \| '__| |_ / _ \| '_ \ *
6 * | | | | (_) | | | |/ / (_) | | | | *
7 * \_| |_/\___/|_| |_/___\___/|_| |_| *
8 ***************************************************
9 * This file is part of Horizon (c).
10 *
11 * Copyright (c) 2019 Sagun K. (sagunxp@gmail.com).
12 * Copyright (c) 2019 Horizon Dev Team.
13 *
14 * Base Author - Sagun K. (sagunxp@gmail.com)
15 *
16 * This library is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
20 *
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this library. If not, see <http://www.gnu.org/licenses/>.
28 **************************************************/
29
30#ifndef HORIZON_ZONE_GAME_GRIDDEFINITIONS_HPP
31#define HORIZON_ZONE_GAME_GRIDDEFINITIONS_HPP
32
35
36namespace Horizon
37{
38 namespace Zone
39 {
40 namespace Units
41 {
42 class Player;
43 class NPC;
44 class Elemental;
45 class Homunculus;
46 class Mercenary;
47 class Pet;
48 class Monster;
49 class Item;
50 class Skill;
51 }
52 }
53}
54
55template <class ZONE_OBJECT_TYPES>
56class GridHolder;
57
58template <int16_t MAX_COORDINATES>
59class Coordinates;
60
61template<class OBJECT_TYPES>
63
64// Max Cells in a map are 416.
65#define MAX_CELLS_PER_GRID 32
66#define MAX_GRIDS_PER_MAP 14
67#define MAX_CELLS_PER_MAP MAX_CELLS_PER_GRID * MAX_GRIDS_PER_MAP
68
69#define unit_ns(e) Horizon::Zone::Units::e
71 unit_ns(NPC),
72 unit_ns(Elemental),
73 unit_ns(Homunculus),
74 unit_ns(Mercenary),
75 unit_ns(Pet),
76 unit_ns(Monster),
77 unit_ns(Skill),
78 unit_ns(Item)) AllUnitTypes;
80#undef unit_ns
81
84
86
88{
92};
93
94#endif /* HORIZON_ZONE_GAME_GRIDDEFINITIONS_HPP */
GridHolder< AllUnitTypes > GridHolderType
Definition: GridDefinitions.hpp:79
Coordinates< MAX_CELLS_PER_MAP > MapCoords
Definition: GridDefinitions.hpp:83
#define unit_ns(e)
Definition: GridDefinitions.hpp:69
Coordinates< MAX_GRIDS_PER_MAP > GridCoords
Definition: GridDefinitions.hpp:82
typedef TYPELIST_9(unit_ns(Player), unit_ns(NPC), unit_ns(Elemental), unit_ns(Homunculus), unit_ns(Mercenary), unit_ns(Pet), unit_ns(Monster), unit_ns(Skill), unit_ns(Item)) AllUnitTypes
GridReferenceContainer< AllUnitTypes > MapUnitContainer
Definition: GridDefinitions.hpp:85
grid_unit_skill_use_notification_type
Definition: GridDefinitions.hpp:88
@ GRID_UNIT_SKILL_USE_NOTIFY_CASTTIME
Definition: GridDefinitions.hpp:89
@ GRID_UNIT_SKILL_USE_NOTIFY_SUCCESS_DAMAGE
Definition: GridDefinitions.hpp:90
@ GRID_UNIT_SKILL_USE_NOTIFY_SUCCESS_NO_DAMAGE
Definition: GridDefinitions.hpp:91
Definition: Coordinates.hpp:39
GridHolder is a container for Grids, handles the visiting of grids.
Definition: GridHolder.hpp:44
Definition: GridReferenceContainer.hpp:149
Definition: ReferenceListTest.cpp:114
Definition: Element.hpp:7