equal
deleted
inserted
replaced
4 |
4 |
5 #ifndef NEWGRF_HOUSE_H |
5 #ifndef NEWGRF_HOUSE_H |
6 #define NEWGRF_HOUSE_H |
6 #define NEWGRF_HOUSE_H |
7 |
7 |
8 #include "town.h" |
8 #include "town.h" |
9 |
|
10 /** |
|
11 * Maps a house id stored on the map to a GRF file. |
|
12 * House IDs are stored on the map, so there needs to be a way to tie them to |
|
13 * GRF files. An array of HouseIDMapping structs is saved with the savegame so |
|
14 * that house GRFs can be loaded in a different order, or removed safely. The |
|
15 * index in the array is the house ID stored on the map. |
|
16 * |
|
17 * The substitute ID is the ID of an original house that should be used instead |
|
18 * if the GRF containing the new house is not available. |
|
19 */ |
|
20 struct HouseIDMapping { |
|
21 uint32 grfid; ///< The GRF ID of the file this house belongs to |
|
22 uint8 house_id; ///< The house ID within the GRF file |
|
23 uint8 substitute_id; ///< The (original) house ID to use if this GRF is not available |
|
24 }; |
|
25 |
9 |
26 /** |
10 /** |
27 * Makes class IDs unique to each GRF file. |
11 * Makes class IDs unique to each GRF file. |
28 * Houses can be assigned class IDs which are only comparable within the GRF |
12 * Houses can be assigned class IDs which are only comparable within the GRF |
29 * file they were defined in. This mapping ensures that if two houses have the |
13 * file they were defined in. This mapping ensures that if two houses have the |