ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/region.h
(Generate patch)

Comparing deliantra/server/include/region.h (file contents):
Revision 1.7 by root, Wed Jul 11 16:55:18 2007 UTC vs.
Revision 1.9 by root, Fri Aug 10 05:25:16 2007 UTC

27 */ 27 */
28 28
29#ifndef REGION_H 29#ifndef REGION_H
30#define REGION_H 30#define REGION_H
31 31
32typedef refptr<region> region_ptr;
33
32/* 34/*
33 * Each map is in a given region of the game world and links to a region definition, so 35 * 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 36 * they have to appear here in the headers, before the mapdef
35 */ 37 */
36INTERFACE_CLASS (region) 38INTERFACE_CLASS (region)
37struct region : zero_initialised, attachable 39struct region : zero_initialised, attachable
38{ 40{
39 shstr ACC (RW, name); /* Shortend name of the region as maps refer to it */ 41 shstr ACC (RW, name); /* Shortend name of the region as maps refer to it */
40 region *ACC (RW, parent); /* 42 region_ptr ACC (RW, parent); /*
41 * Pointer to the region that is a parent of the current 43 * Pointer to the region that is a parent of the current
42 * region, if a value isn't defined in the current region 44 * region, if a value isn't defined in the current region
43 * we traverse this series of pointers until it is. 45 * we traverse this series of pointers until it is.
44 */ 46 */
45 shstr ACC (RW, longname); /* Official title of the region, this might be defined 47 shstr ACC (RW, longname); /* Official title of the region, this might be defined
48 shstr ACC (RW, jailmap); /*where a player that is arrested in this region should be imprisoned. */ 50 shstr ACC (RW, jailmap); /*where a player that is arrested in this region should be imprisoned. */
49 sint16 ACC (RW, jailx), ACC (RW, jaily);/* The coodinates in jailmap to which the player should be sent. */ 51 sint16 ACC (RW, jailx), ACC (RW, jaily);/* The coodinates in jailmap to which the player should be sent. */
50 shstr ACC (RW, portalmap); 52 shstr ACC (RW, portalmap);
51 sint16 ACC (RW, portalx), ACC (RW, portaly); 53 sint16 ACC (RW, portalx), ACC (RW, portaly);
52 object_vector_index ACC (RW, index); 54 object_vector_index ACC (RW, index);
53 uint32 ACC (RW, counter); /* A generic counter for holding temporary data. */
54 bool ACC (RW, fallback); /* whether, in the event of a region not existing, 55 bool ACC (RW, fallback); /* whether, in the event of a region not existing,
55 * this should be the one we fall back on as the default */ 56 * this should be the one we fall back on as the default */
56 float treasure_density; // chance of treasure per mapspace 57 float treasure_density; // chance of treasure per mapspace
57 treasurelist *treasure; // treasure to generate (mostly monsters) 58 treasurelist *treasure; // treasure to generate (mostly monsters)
58 59
59 static region *default_region (); 60 static region *default_region ();
60 static region *find (const char *name); 61 static region *find (const char *name);
61 static region *find_fuzzy (const char *name); 62 static region *find_fuzzy (const char *name);
62 static region *read (object_thawer &f); 63 static region *read (object_thawer &f);
64
65 void do_destroy ();
63}; 66};
64 67
65typedef object_vector<region, &region::index> regionvec; 68typedef object_vector<region, &region::index> regionvec;
66 69
67extern regionvec regions; 70extern regionvec regions;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines