moved almost all hardcoded constants to "define.dat"
[k8-i-v-a-n.git] / src / game / wmapset.cpp
blob3c370852eb22e6cebff84ce6fc5019a97a9f4ab5
1 /*
3 * Iter Vehemens ad Necem (IVAN)
4 * Copyright (C) Timo Kiviluoto
5 * Released under the GNU General
6 * Public License
8 * See LICENSING which should be included
9 * along with this file for more details
12 #define __FILE_OF_STATIC_WTERRAIN_PROTOTYPE_DEFINITIONS__
14 #include "proto.h"
15 #include "wterra.h"
17 SYSTEM_SPECIALIZATIONS(gwterrain) SYSTEM_SPECIALIZATIONS(owterrain)
19 #include "wterras.h"
21 #undef __FILE_OF_STATIC_WTERRAIN_PROTOTYPE_DEFINITIONS__
23 cint OceanType = ocean::ProtoType.GetIndex();
24 cint SnowType = snow::ProtoType.GetIndex();
25 cint GlacierType = glacier::ProtoType.GetIndex();
26 cint EGForestType = evergreenforest::ProtoType.GetIndex();
27 cint LForestType = leafyforest::ProtoType.GetIndex();
28 cint SteppeType = steppe::ProtoType.GetIndex();
29 cint DesertType = desert::ProtoType.GetIndex();
30 cint JungleType = jungle::ProtoType.GetIndex();
32 #include <algorithm>
34 #include "allocate.h"
35 #include "char.h"
36 #include "cont.h"
37 #include "game.h"
38 #include "cont.h"
39 #include "femath.h"
40 #include "iconf.h"
41 #include "graphics.h"
42 #include "whandler.h"
43 #include "message.h"
44 #include "igraph.h"
45 #include "bitmap.h"
46 #include "fesave.h"
47 #include "feparse.h"
48 #include "confdef.h"
50 #include "cont.cpp"
51 #include "worldmap.cpp"
52 #include "wsquare.cpp"
53 #include "wterra.cpp"
54 #include "wterras.cpp"
57 //#define REGISTER_PLACE(name, ttype, spawner) worldmap::RegisterPlace(name::Spawn(), ttype, spawner)
58 #define REGISTER_PLACE(name, ttype, area) worldmap::RegisterPlace(name::Spawn(), ttype, area, (PlaceSpawner)name::Spawn)
61 // gum solution
62 void InitPlaces () {
63 static truth initialized = false;
65 if (!initialized) {
66 initialized = true;
68 REGISTER_PLACE(newattnam, LForestType, NEW_ATTNAM);
69 REGISTER_PLACE(underwatertunnel, LForestType, UNDER_WATER_TUNNEL);
70 REGISTER_PLACE(underwatertunnelexit, LForestType, UNDER_WATER_TUNNEL_EXIT);
72 REGISTER_PLACE(attnam, EGForestType, ATTNAM);
73 REGISTER_PLACE(elpuricave, SnowType, ELPURI_CAVE);
74 REGISTER_PLACE(mondedr, SteppeType, MONDEDR);
75 REGISTER_PLACE(muntuo, LForestType, MUNTUO);
76 REGISTER_PLACE(dragontower, SteppeType, DRAGON_TOWER);
77 REGISTER_PLACE(darkforest, LForestType, DARK_FOREST);
78 REGISTER_PLACE(xinrochtomb, SnowType, XINROCH_TOMB);
79 // alien mod
80 REGISTER_PLACE(alienvessel, JungleType, ALIEN_VESSEL);
85 #if 0
86 REGISTER_PLACE(newattnam, LForestType, NEW_ATTNAM, newattnam::Spawn());
87 REGISTER_PLACE(underwatertunnel, LForestType, UNDER_WATER_TUNNEL, underwatertunnel::Spawn());
88 REGISTER_PLACE(underwatertunnelexit, LForestType, UNDER_WATER_TUNNEL_EXIT, underwatertunnelexit::Spawn());
90 REGISTER_PLACE(attnam, EGForestType, ATTNAM, attnam::Spawn());
91 REGISTER_PLACE(elpuricave, SnowType, ELPURI_CAVE, elpuricave::Spawn());
92 REGISTER_PLACE(mondedr, SteppeType, MONDEDR, mondedr::Spawn());
93 REGISTER_PLACE(muntuo, LForestType, MUNTUO, muntuo::Spawn());
94 REGISTER_PLACE(dragontower, SteppeType, DRAGON_TOWER, dragontower::Spawn());
95 REGISTER_PLACE(darkforest, LForestType, DARK_FOREST, darkforest::Spawn());
96 REGISTER_PLACE(xinrochtomb, SnowType, XINROCH_TOMB, xinrochtomb::Spawn());
97 #endif