projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f98af9
)
Keep behaviour of invisible tiles the same when reading old levels
author
Christoph Sommer
<mail@christoph-sommer.de>
Sat, 28 Oct 2006 14:36:05 +0000
(14:36 +0000)
committer
Christoph Sommer
<mail@christoph-sommer.de>
Sat, 28 Oct 2006 14:36:05 +0000
(14:36 +0000)
SVN-Revision: 4426
src/sector.cpp
patch
|
blob
|
history
diff --git
a/src/sector.cpp
b/src/sector.cpp
index
f43170a
..
7ef5049
100644
(file)
--- a/
src/sector.cpp
+++ b/
src/sector.cpp
@@
-289,6
+289,15
@@
Sector::parse_old_format(const lisp::Lisp& reader)
|| reader.get_vector("tilemap", tiles)) {
TileMap* tilemap = new TileMap();
tilemap->set(width, height, tiles, LAYER_TILES, true);
+
+ // replace tile id 112 (old invisible tile) with 1311 (new invisible tile)
+ for(size_t x=0; x < tilemap->get_width(); ++x) {
+ for(size_t y=0; y < tilemap->get_height(); ++y) {
+ const Tile* tile = tilemap->get_tile(x, y);
+ if(tile->getID() == 112) tilemap->change(x, y, 1311);
+ }
+ }
+
add_object(tilemap);
}