… | |
… | |
369 | for (mapspace *ms = spaces + size (); ms-- > spaces; ) |
369 | for (mapspace *ms = spaces + size (); ms-- > spaces; ) |
370 | for (object *op = ms->bot; op; op = op->above) |
370 | for (object *op = ms->bot; op; op = op->above) |
371 | op->activate_recursive (); |
371 | op->activate_recursive (); |
372 | |
372 | |
373 | state = MAP_ACTIVE; |
373 | state = MAP_ACTIVE; |
|
|
374 | |
|
|
375 | activate_physics (); |
374 | } |
376 | } |
375 | |
377 | |
376 | void |
378 | void |
377 | maptile::deactivate () |
379 | maptile::deactivate () |
378 | { |
380 | { |
… | |
… | |
835 | msg = 0; |
837 | msg = 0; |
836 | maplore = 0; |
838 | maplore = 0; |
837 | shoprace = 0; |
839 | shoprace = 0; |
838 | delete [] shopitems, shopitems = 0; |
840 | delete [] shopitems, shopitems = 0; |
839 | |
841 | |
840 | for (int i = 0; i < TILE_NUM; i++) |
842 | for (int i = 0; i < array_length (tile_path); i++) |
841 | tile_path [i] = 0; |
843 | tile_path [i] = 0; |
842 | } |
844 | } |
843 | |
845 | |
844 | maptile::~maptile () |
846 | maptile::~maptile () |
845 | { |
847 | { |
… | |
… | |
852 | /* We need to look through all the maps and see if any maps |
854 | /* We need to look through all the maps and see if any maps |
853 | * are pointing at this one for tiling information. Since |
855 | * are pointing at this one for tiling information. Since |
854 | * tiling can be asymetric, we just can not look to see which |
856 | * tiling can be asymetric, we just can not look to see which |
855 | * maps this map tiles with and clears those. |
857 | * maps this map tiles with and clears those. |
856 | */ |
858 | */ |
857 | for (int i = 0; i < TILE_NUM; i++) |
859 | for (int i = 0; i < array_length (tile_path); i++) |
858 | if (tile_map[i] == m) |
860 | if (tile_map[i] == m) |
859 | tile_map[i] = 0; |
861 | tile_map[i] = 0; |
860 | } |
862 | } |
861 | |
863 | |
862 | void |
864 | void |
… | |
… | |
1193 | middle = 0; |
1195 | middle = 0; |
1194 | |
1196 | |
1195 | if (top == middle) |
1197 | if (top == middle) |
1196 | middle = 0; |
1198 | middle = 0; |
1197 | |
1199 | |
|
|
1200 | // dire hack to handle "transparent" floors - currently only open_space |
|
|
1201 | if (floor && floor->arch->archname == shstr_quad_open_space) |
|
|
1202 | { |
|
|
1203 | floor->set_anim_frame (0); |
|
|
1204 | |
|
|
1205 | if (maptile *m = floor->map->tile_map [TILE_DOWN]) |
|
|
1206 | { |
|
|
1207 | // mirror the floor - very unreliable because usually outdated, |
|
|
1208 | // but somewhta works because floors do not change often :/ |
|
|
1209 | middle = floor; |
|
|
1210 | |
|
|
1211 | mapspace &ms = m->at (floor->x, floor->y); |
|
|
1212 | |
|
|
1213 | ms.update (); |
|
|
1214 | |
|
|
1215 | if (object *floor2 = ms.faces_obj [2]) |
|
|
1216 | if (floor2->arch->archname != shstr_quad_open_space && !middle) |
|
|
1217 | { |
|
|
1218 | floor->set_anim_frame (1); |
|
|
1219 | middle = floor; |
|
|
1220 | floor = floor2; |
|
|
1221 | } |
|
|
1222 | } |
|
|
1223 | } |
|
|
1224 | |
1198 | #if 0 |
1225 | #if 0 |
1199 | faces_obj [0] = top; |
1226 | faces_obj [0] = top; |
1200 | faces_obj [1] = middle; |
1227 | faces_obj [1] = middle; |
1201 | faces_obj [2] = floor; |
1228 | faces_obj [2] = floor; |
1202 | #endif |
1229 | #endif |