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
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (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, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef ULTIMA4_MAP_CITY_H
24 #define ULTIMA4_MAP_CITY_H
25 
26 #include "ultima/ultima4/map/map.h"
27 #include "ultima/shared/std/containers.h"
28 
29 namespace Ultima {
30 namespace Ultima4 {
31 
32 class Person;
33 class Dialogue;
34 
35 struct PersonRole {
36 	int _role;
37 	int _id;
38 };
39 
40 typedef Std::vector<Person *> PersonList;
41 typedef Common::List<PersonRole *> PersonRoleList;
42 
43 class City : public Map {
44 public:
45 	City();
46 	~City() override;
47 
48 	// Members
49 	/**
50 	 * Returns the name of the city
51 	 */
52 	Common::String getName() override;
53 
54 	/**
55 	 * Adds a person object to the map
56 	 */
57 	Person *addPerson(Person *p);
58 
59 	/**
60 	 * Add people to the map
61 	 */
62 	void addPeople();
63 
64 	/**
65 	 * Removes all people from the current map
66 	 */
67 	void removeAllPeople();
68 
69 	/**
70 	 * Returns the person object at the given (x,y,z) coords, if one exists.
71 	 * Otherwise, returns nullptr.
72 	 */
73 	Person *personAt(const Coords &coords);
74 
75 	// Properties
76 	Common::String _name;
77 	Common::String _type;
78 	PersonList _persons;
79 	Common::String _tlkFname;
80 	PersonRoleList _personRoles;
81 	Std::vector<Dialogue *> _extraDialogues;
82 };
83 
84 /**
85  * Returns true if the Map pointed to by 'punknown'
86  * is a City map
87  */
88 bool isCity(Map *punknown);
89 
90 } // End of namespace Ultima4
91 } // End of namespace Ultima
92 
93 #endif
94