declarations.h

main 126 lines · 4.4 KB Raw
Alex Alex Commit Client Upload Part 2 19/10/2026 00:06
1/*
2 * Copyright (c) 2010-2017 OTClient <https://github.com/edubart/otclient>
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
22
23#ifndef CLIENT_DECLARATIONS_H
24#define CLIENT_DECLARATIONS_H
25
26#include "global.h"
27#include <framework/net/declarations.h>
28#include <framework/ui/declarations.h>
29
30// core
31class Map;
32class Game;
33class MapView;
34class LightView;
35class Tile;
36class Thing;
37class Item;
38class Container;
39class Creature;
40class Monster;
41class Npc;
42class Player;
43class LocalPlayer;
44class Effect;
45class Missile;
46class AnimatedText;
47class StaticText;
48class Animator;
49class ThingType;
50class ItemType;
51class House;
52class Town;
53class CreatureType;
54class Spawn;
55class TileBlock;
56
57typedef stdext::shared_object_ptr<MapView> MapViewPtr;
58typedef stdext::shared_object_ptr<LightView> LightViewPtr;
59typedef stdext::shared_object_ptr<Tile> TilePtr;
60typedef stdext::shared_object_ptr<Thing> ThingPtr;
61typedef stdext::shared_object_ptr<Item> ItemPtr;
62typedef stdext::shared_object_ptr<Container> ContainerPtr;
63typedef stdext::shared_object_ptr<Creature> CreaturePtr;
64typedef stdext::shared_object_ptr<Monster> MonsterPtr;
65typedef stdext::shared_object_ptr<Npc> NpcPtr;
66typedef stdext::shared_object_ptr<Player> PlayerPtr;
67typedef stdext::shared_object_ptr<LocalPlayer> LocalPlayerPtr;
68typedef stdext::shared_object_ptr<Effect> EffectPtr;
69typedef stdext::shared_object_ptr<Missile> MissilePtr;
70typedef stdext::shared_object_ptr<AnimatedText> AnimatedTextPtr;
71typedef stdext::shared_object_ptr<StaticText> StaticTextPtr;
72typedef stdext::shared_object_ptr<Animator> AnimatorPtr;
73typedef stdext::shared_object_ptr<ThingType> ThingTypePtr;
74typedef stdext::shared_object_ptr<ItemType> ItemTypePtr;
75typedef stdext::shared_object_ptr<House> HousePtr;
76typedef stdext::shared_object_ptr<Town> TownPtr;
77typedef stdext::shared_object_ptr<CreatureType> CreatureTypePtr;
78typedef stdext::shared_object_ptr<Spawn> SpawnPtr;
79
80typedef std::vector<ThingPtr> ThingList;
81typedef std::vector<ThingTypePtr> ThingTypeList;
82typedef std::vector<ItemTypePtr> ItemTypeList;
83typedef std::list<HousePtr> HouseList;
84typedef std::list<TownPtr> TownList;
85typedef std::list<ItemPtr> ItemList;
86typedef std::list<TilePtr> TileList;
87typedef std::vector<ItemPtr> ItemVector;
88typedef std::unordered_map<Position, TilePtr, PositionHasher> TileMap;
89typedef std::unordered_map<Position, CreatureTypePtr, PositionHasher> CreatureMap;
90typedef std::unordered_map<Position, SpawnPtr, PositionHasher> SpawnMap;
91
92// net
93class ProtocolLogin;
94class ProtocolGame;
95
96typedef stdext::shared_object_ptr<ProtocolGame> ProtocolGamePtr;
97typedef stdext::shared_object_ptr<ProtocolLogin> ProtocolLoginPtr;
98
99// ui
100class UIItem;
101class UICreature;
102class UIGraph;
103class UIMap;
104class UIMinimap;
105class UIProgressRect;
106class UIMapAnchorLayout;
107class UIPositionAnchor;
108class UISprite;
109
110typedef stdext::shared_object_ptr<UIItem> UIItemPtr;
111typedef stdext::shared_object_ptr<UICreature> UICreaturePtr;
112typedef stdext::shared_object_ptr<UIGraph> UIGraphPtr;
113typedef stdext::shared_object_ptr<UISprite> UISpritePtr;
114typedef stdext::shared_object_ptr<UIMap> UIMapPtr;
115typedef stdext::shared_object_ptr<UIMinimap> UIMinimapPtr;
116typedef stdext::shared_object_ptr<UIProgressRect> UIProgressRectPtr;
117typedef stdext::shared_object_ptr<UIMapAnchorLayout> UIMapAnchorLayoutPtr;
118typedef stdext::shared_object_ptr<UIPositionAnchor> UIPositionAnchorPtr;
119
120// custom
121class HealthBar;
122
123typedef stdext::shared_object_ptr<HealthBar> HealthBarPtr;
124
125#endif
126
Top