… | |
… | |
28 | |
28 | |
29 | #ifndef REGION_H |
29 | #ifndef REGION_H |
30 | #define REGION_H |
30 | #define REGION_H |
31 | |
31 | |
32 | /* |
32 | /* |
33 | * Each map is in a given region of the game world and links to a region definiton, so |
33 | * Each map is in a given region of the game world and links to a region definition, so |
34 | * they have to appear here in the headers, before the mapdef |
34 | * they have to appear here in the headers, before the mapdef |
35 | */ |
35 | */ |
36 | INTERFACE_CLASS (region) |
36 | INTERFACE_CLASS (region) |
37 | struct region : zero_initialised |
37 | struct region : zero_initialised, attachable |
38 | { |
38 | { |
39 | shstr ACC (RW, name); /* Shortend name of the region as maps refer to it */ |
39 | shstr ACC (RW, name); /* Shortend name of the region as maps refer to it */ |
40 | shstr ACC (RW, match); // a perl regex that matches map paths |
|
|
41 | region *ACC (RW, parent); /* |
40 | region *ACC (RW, parent); /* |
42 | * Pointer to the region that is a parent of the current |
41 | * Pointer to the region that is a parent of the current |
43 | * region, if a value isn't defined in the current region |
42 | * region, if a value isn't defined in the current region |
44 | * we traverse this series of pointers until it is. |
43 | * we traverse this series of pointers until it is. |
45 | */ |
44 | */ |