1 /* ResidualVM - A 3D game interpreter
2  *
3  * ResidualVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the AUTHORS
5  * file distributed with this source distribution.
6  *
7  * Additional copyright for this file:
8  * Copyright (C) 1999-2000 Revolution Software Ltd.
9  * This code is based on source code created by Revolution Software,
10  * used with permission.
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25  *
26  */
27 
28 #ifndef ICB_MAP_MARKERR
29 #define ICB_MAP_MARKERR
30 
31 #include "engines/icb/common/px_array.h"
32 #include "engines/icb/common/px_features.h"
33 #include "engines/icb/p4_generic.h"
34 
35 namespace ICB {
36 
37 #define MARKER_NAME_LEN 32
38 
39 // this must be same as MAX_voxel_list
40 #define MAX_markers 33
41 
42 // The real map_marker struct for in use in game engine
43 typedef struct {
44 	char name[MARKER_NAME_LEN]; // cut down name equivalent
45 	PXreal x, y, z;             // Reference point for the prop.
46 	_feature_type type;         // The type of the prop.
47 	PXfloat pan;                // 0 - 99 (maybe use -1 to indicate no direction)
48 } _map_marker;
49 
50 // The map_marker struct used for saving to disc
51 typedef struct {
52 	char name[MARKER_NAME_LEN]; // cut down name equivalent
53 	float x, y, z;              // Reference point for the prop.
54 	_feature_type type;         // The type of the prop.
55 	float pan;                  // 0 - 99 (maybe use -1 to indicate no direction)
56 } _file_map_marker;
57 
58 class _marker {
59 public:
60 	void ___init();
61 	_map_marker *Fetch_marker_by_object_name(const char *name);
62 	_map_marker *Create_new_marker(const char *name);
63 	uint32 num_markers;
64 	_map_marker marks[MAX_markers];
65 };
66 
67 } // End of namespace ICB
68 
69 #endif
70