ScummVM API documentation
px_floor_map.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
* 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 modify
13
* it under the terms of the GNU General Public License as published by
14
* the Free Software Foundation, either version 3 of the License, or
15
* (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, see <http://www.gnu.org/licenses/>.
24
*
25
*/
26
27
#ifndef ICB_PX_FLOOR_MAP_H_INCLUDED
28
#define ICB_PX_FLOOR_MAP_H_INCLUDED
29
30
#include "engines/icb/common/px_common.h"
31
32
namespace
ICB
{
33
34
// Should put this in a nice header file somewhere
35
typedef
float
PXreal;
36
typedef
float
PXfloat;
37
38
// This defines the length of the hashed camera name on the PSX.
39
#define HASH_CAMERA_LEN 8
40
41
// These define the filenames for files containing floor maps.
42
#define PX_FILENAME_FLOOR_MAP "pxwgfloors"
43
#ifndef PC_EXT_LINKED
44
#define PC_EXT_LINKED "linked"
45
#endif
46
47
#ifndef PSX_EXT_LINKED
48
#define PSX_EXT_LINKED "PSXlinked"
49
#endif
50
51
// Update this whenever the format of the data changes, so engine can check it is in sync with data.
52
#define VERSION_PXWGFLOORS 300
53
54
// This holds one of the rectangles making up the floor. The coordinates are held looking DOWN on the floor, and the
55
// coordinate system used is our system (y is up/down, x and z axes are in the horizontal plane).
56
typedef
struct
{
57
PXreal x1, z1;
// X, Z of top-left of the floor rectangle (looking DOWN on the floor).
58
PXreal x2, z2;
// Ditto for bottom-right corner.
59
}
_rect
;
60
61
// struct _neighbour_map_entry
62
// This holds one of the entries in the exit map.
63
typedef
struct
{
64
uint32 neighbour;
// Index of neighbour (can be passed directly into _linked_data_file.Fetch_item_by_number()).
65
uint32 offset_exit_descriptor;
// File position of the exit descriptor for this.
66
}
_neighbour_map_entry
;
67
68
// struct _floor
69
// This is the top structure in a floor entry. All the other structures hang off this one.
70
typedef
struct
{
71
PXreal base_height;
72
_rect
rect;
73
char
camera_cluster[HASH_CAMERA_LEN];
74
uint32 camera_name_offset;
75
uint32 map_location_hash;
76
uint32 num_neighbours;
77
_neighbour_map_entry
neighbour_map[1];
78
}
_floor
;
79
80
// struct _exit_descriptor
81
// This holds an exit descriptor would you believe?
82
typedef
struct
{
83
uint32 num_waypoints;
// Number of waypoints for the exit.
84
uint32 offset_waypoints;
// File offset of the list of waypoints for this exit.
85
uint32 offset_propname;
// File offset of the ASCII name of a prop associated with this exit.
86
}
_exit_descriptor
;
87
88
// struct _floor_waypoint
89
// This holds a waypoint for an exit.
90
typedef
struct
{
91
PXreal x, z;
// Physical position of waypoint on floor.
92
PXfloat direction;
// A direction (0-360?) for the waypoint. Might be used to face a mega a certain way.
93
}
_floor_waypoint
;
94
95
}
// End of namespace ICB
96
97
#endif // #ifndef _PX_FLOOR_MAP_H_INCLUDED
ICB::_rect
Definition:
px_floor_map.h:56
ICB
Definition:
actor.h:32
ICB::_exit_descriptor
Definition:
px_floor_map.h:82
ICB::_neighbour_map_entry
Definition:
px_floor_map.h:63
ICB::_floor_waypoint
Definition:
px_floor_map.h:90
ICB::_floor
Definition:
px_floor_map.h:70
engines
icb
common
px_floor_map.h
Generated on Fri Nov 22 2024 09:18:47 for ScummVM API documentation by
1.8.13