data dirs renamed
[k8-i-v-a-n.git] / Doc / Obsolete / Something.txt
blob81e7add296c6aa99fa972a7e0f275a3719a5b035
1 1 type ->
2 2 god
3 2 material
4 2 room
5 2 character
6 2 wterrain
7 2 level
8 2 dungeon
9 3 object
11 1 entity ->
12 2 character
13 2 unit
14 2 room
15 2 level
16 2 dungeon
18 2 unit ->
19 3 object
20 3 fluid
22 3 object ->
23 4 lterrain
24 4 item
26                         entity                                  type
28                          unit
30                         object
32                                 lterrain gterrain oterrain wterrain
34 material fluid item character glterrain olterrain gwterrain owterrain room level god
37 entity
38 Contains a void Be()-function. If the entity is loaded into memory and enabled, this function
39 is called by entitypool::Be() every tick. Character actions, food spoiling and all such
40 action handlers are handled through Be(). Some of entity's important information, namely
41 bool Exists and bool Hasbe are (for optimization reasons) stored in a class called entityinfo,
42 which is inserted into entitypool when the entity is allocated. If Exists == false, the
43 entity is deleted during next entitypool::Be(). If Hasbe == false, the entity is disabled
44 and its Be() in not called. For instance lterrains are all disabled, since calling thousands
45 of useless virtual Be()s every tick would considerably waste resources.
47 type
48 Contains an ushort Type member, which is determined at compile time by the macro system. Each
49 instantatiable child class with individual properties, such as long sword, farmer, goblin
50 etc. are derived from type. When such classes are loaded, protocontainers uses Type member to
51 determine which class truly needs to be allocated.
53 unit
54 Contains materials, which are stored in vector<material*> Material.
56 object
57 Contains an individual, material colorized bitmap* Picture.