|
From: <red...@pr...> - 2004-03-13 16:13:13
|
Quoting chr...@ju...:
> Here's a new version of GeoData.h.
>
> If this is just used to load data in the start of the game, then I'm not sure
> if all of the virtual classes are necessary. So.. this is much more basic.
> After the previous discussion, it seems to me that there is not much to this
> class.
>
> -chrisp
>
Minor details:
#include"String.hh"
#include"List.h"
import the xenocide utility pack for it. And use the STL ones for lists and
strings (String in Xenocide).
The enums naming do not conform to the standard
enum terrainType {
GRASSLAND,
FOREST,
TROPICAL_RAINFOREST,
TEMPERATE_RAINFOREST,
PLAINS,
BADLANDS,
DESERT,
SAHARA,
TUNDRA,
ARCTIC,
COAST,
WATER //need to know that we can't go here
};
should be:
enum TERRAINTYPE
{
_TTFOREST,
_TTTROPICALRAINFOREST,
_TTTEMPERATERAINFOREST,
...
_TTWATER
};
Species is not an enum, but for now is ok as the other part is not coded yet.
Some functions do not have return values.
addCountry( Country newCountries );
setDescriptor( String newDescription );
should be:
void addCountry( Country newCountries );
void setDescriptor( String newDescription );
Be careful with this:
static Real id;
That means there is only one instance for all object.... Each continent may have
an ID if it really needed at all.
As you dont use pointers anywhere, there is no way to do defered loading if the
memory requirements of this class gets too big. If you want to be safe, use
counted referenced pointers from the utility package.
Greetings
Red Knight
|