From c0fed8bdef7dbc9540b476fd28949ebad7d3c2ba Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 17 Apr 2006 09:22:14 +0000 Subject: [PATCH] - Fixed ghostforest vs. ghostwood name - Added waterways (no spritechange implemented though) - Removed FIXME file, use the wiki TODO - relax Sector::inside test to conside things above the sector as inside (this fixes the badguy porting problems in a simpler way, and the lifeup on top disappearing) SVN-Revision: 3351 --- FIXME | 8 -- .../{ghostforest => ghostwood}/ghostforest.xcf | Bin .../{ghostforest => ghostwood}/ghostwood-1.png | Bin .../{ghostforest => ghostwood}/ghostwood-4.png | Bin .../{ghostforest => ghostwood}/ghostwood-5.png | Bin .../{ghostforest => ghostwood}/ghostwood-6.png | Bin .../{ghostforest => ghostwood}/ghostwood-7.png | Bin data/images/worldmap.strf | 110 +++++++++++++++++++++ data/images/worldmap/antarctica/water-editor.png | Bin 0 -> 1880 bytes data/images/worldmap/common/boat/boat.sprite | 36 ++++--- src/badguy/badguy.cpp | 4 +- src/badguy/badguy.hpp | 6 -- src/badguy/mriceblock.cpp | 2 - src/console.cpp | 4 +- src/sector.cpp | 2 +- src/sector.hpp | 5 +- src/worldmap/tux.cpp | 2 + src/worldmap/worldmap.hpp | 2 + 18 files changed, 147 insertions(+), 34 deletions(-) delete mode 100644 FIXME rename data/images/tiles/{ghostforest => ghostwood}/ghostforest.xcf (100%) rename data/images/tiles/{ghostforest => ghostwood}/ghostwood-1.png (100%) rename data/images/tiles/{ghostforest => ghostwood}/ghostwood-4.png (100%) rename data/images/tiles/{ghostforest => ghostwood}/ghostwood-5.png (100%) rename data/images/tiles/{ghostforest => ghostwood}/ghostwood-6.png (100%) rename data/images/tiles/{ghostforest => ghostwood}/ghostwood-7.png (100%) create mode 100644 data/images/worldmap/antarctica/water-editor.png diff --git a/FIXME b/FIXME deleted file mode 100644 index b2236ce77..000000000 --- a/FIXME +++ /dev/null @@ -1,8 +0,0 @@ -SUPERTUX FIXME'S -This file is for small, obvious and temporary issues that are too minor to be put into the TODO at the wiki. -Just put them here so you don't forget. ---- - -Errors in scripts crash X-Server (very annoying, please fix) -Some levels don't have the music path set correctly -Revert Tux to single image sprite diff --git a/data/images/tiles/ghostforest/ghostforest.xcf b/data/images/tiles/ghostwood/ghostforest.xcf similarity index 100% rename from data/images/tiles/ghostforest/ghostforest.xcf rename to data/images/tiles/ghostwood/ghostforest.xcf diff --git a/data/images/tiles/ghostforest/ghostwood-1.png b/data/images/tiles/ghostwood/ghostwood-1.png similarity index 100% rename from data/images/tiles/ghostforest/ghostwood-1.png rename to data/images/tiles/ghostwood/ghostwood-1.png diff --git a/data/images/tiles/ghostforest/ghostwood-4.png b/data/images/tiles/ghostwood/ghostwood-4.png similarity index 100% rename from data/images/tiles/ghostforest/ghostwood-4.png rename to data/images/tiles/ghostwood/ghostwood-4.png diff --git a/data/images/tiles/ghostforest/ghostwood-5.png b/data/images/tiles/ghostwood/ghostwood-5.png similarity index 100% rename from data/images/tiles/ghostforest/ghostwood-5.png rename to data/images/tiles/ghostwood/ghostwood-5.png diff --git a/data/images/tiles/ghostforest/ghostwood-6.png b/data/images/tiles/ghostwood/ghostwood-6.png similarity index 100% rename from data/images/tiles/ghostforest/ghostwood-6.png rename to data/images/tiles/ghostwood/ghostwood-6.png diff --git a/data/images/tiles/ghostforest/ghostwood-7.png b/data/images/tiles/ghostwood/ghostwood-7.png similarity index 100% rename from data/images/tiles/ghostforest/ghostwood-7.png rename to data/images/tiles/ghostwood/ghostwood-7.png diff --git a/data/images/worldmap.strf b/data/images/worldmap.strf index 0f5dbb392..529b731da 100644 --- a/data/images/worldmap.strf +++ b/data/images/worldmap.strf @@ -378,6 +378,116 @@ (east #t) (stop #f)) + (tile (id 78) + (images "worldmap/antarctica/water.png") + (editor-images + (region "worldmap/antarctica/water-editor.png" 0 0 32 32) + ) + (north #f) + (south #f) + (west #t) + (east #t) + ) + + (tile (id 79) + (images "worldmap/antarctica/water.png") + (editor-images + (region "worldmap/antarctica/water-editor.png" 32 0 32 32) + ) + (north #t) + (south #t) + (west #f) + (east #f) + ) + + (tile (id 80) + (images "worldmap/antarctica/water.png") + (editor-images + (region "worldmap/antarctica/water-editor.png" 64 0 32 32) + ) + (north #f) + (south #t) + (west #f) + (east #t) + ) + + (tile (id 81) + (images "worldmap/antarctica/water.png") + (editor-images + (region "worldmap/antarctica/water-editor.png" 96 0 32 32) + ) + (north #f) + (south #t) + (west #t) + (east #f) + ) + + (tile (id 82) + (images "worldmap/antarctica/water.png") + (editor-images + (region "worldmap/antarctica/water-editor.png" 0 32 32 32) + ) + (north #t) + (south #t) + (west #f) + (east #t) + ) + + (tile (id 83) + (images "worldmap/antarctica/water.png") + (editor-images + (region "worldmap/antarctica/water-editor.png" 32 32 32 32) + ) + (north #t) + (south #t) + (west #t) + (east #f) + ) + + (tile (id 84) + (images "worldmap/antarctica/water.png") + (editor-images + (region "worldmap/antarctica/water-editor.png" 64 32 32 32) + ) + (north #t) + (south #f) + (west #f) + (east #t) + ) + + (tile (id 85) + (images "worldmap/antarctica/water.png") + (editor-images + (region "worldmap/antarctica/water-editor.png" 96 32 32 32) + ) + (north #t) + (south #f) + (west #t) + (east #f) + ) + + (tile (id 86) + (images "worldmap/antarctica/water.png") + (editor-images + (region "worldmap/antarctica/water-editor.png" 0 64 32 32) + ) + (north #t) + (south #f) + (west #t) + (east #t) + ) + + (tile (id 87) + (images "worldmap/antarctica/water.png") + (editor-images + (region "worldmap/antarctica/water-editor.png" 32 64 32 32) + ) + (north #f) + (south #t) + (west #t) + (east #t) + ) + (tile (id 167) (images diff --git a/data/images/worldmap/antarctica/water-editor.png b/data/images/worldmap/antarctica/water-editor.png new file mode 100644 index 0000000000000000000000000000000000000000..9ca55987becb6be96cd17b9f89b47eff0db2bdab GIT binary patch literal 1880 zcmZuycTm#_7XAgIvOpws5HtxzS_DK5Mp{A$5SkD|5}IKlw1GenlofRd2m%5U6*OQD zMBqF?qDaZIyHuq~)1!tW#X=E8q)Q|h_ph6|do%BSGjG0mZQi_>;qK-D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9uNvWyYJ z%L9~-xz=(Z4jPrZNAv_aWlUu3h)s435-+rK8!}8@E8K`z?ze3Dw_y}bf7n2OjXgG% zu`|EBUdrDoHO6^KwU6wby#FHU!VfE|=yjrsO@D(;wT+@7s-&)dm6 zq2cI)B?Y6pZOI*rOthJB(2xCCc(-tl0!Argmh4>~D^N1_W#|4;pS+Hd{jo7E@9T5h zunp8{7Pt)k0j|B2!)ElAt{!Ti%udZ5mo|53fTZ6*pRxWB*5|e=hxW<$e6MxNdGkQ3 z9`{-xZBWMi3H+!-h3sAd*Lxw?H~tIkGy1{X&T~6S-v*y01~xh(@>mmhhIh6jmtU7o z6>tzepQ=T@L(9Txb)rMzg$e!>lbNRC19GTtR+i;hZVvVel7{zpXl{@Ex+Taknx}S5 zgz`BM;SE=Mp3=s{m?&D;ip(&X!mWiVh{9mD>4~*Dm{|ZsV1_4HzsnI{Jw+AIf>5Kx zoi+0-MO7(jzRLDV<19-!0DzUisA^EGqT3w{uQfF2MIYdG%ikCSQqElvg1Rt3Rz&JA zP#a#7p{^HOngm7S7X5BYm}P4jR9+pvIaoA1gpQ$&wIw_ zW%`*usHg7a6UPL8^0SmCd1(|t#sY9a3IISDKnxN927m%=MRgnX2k(a062b|=_hLOM zY0||8_YLeq{ZtkVn4vUziTD`A0KjUqKYLxryAFYk=v60UF)XQ93szf?O+j;iDwEg} zD1hXC7(`;5RTO=1kk|t_|D6JmU;*MxVDbO^*)ah6-zxqO1uj}M$$!o(32axq1c-%z LceCT!1|inside(bbox) && remove_out_of_bounds) { + if(!Sector::current()->inside(bbox)) { remove_me(); return; } diff --git a/src/badguy/badguy.hpp b/src/badguy/badguy.hpp index f318a4e06..24f31549f 100644 --- a/src/badguy/badguy.hpp +++ b/src/badguy/badguy.hpp @@ -141,12 +141,6 @@ protected: /// is the enemy activated bool activated; /** - * Should the badguy be removed when it leaves the bounds of the sector? - * Use this when the badguy is portable and picked up by the player, who - * may actually leave the sector's bounds sometimes. - */ - bool remove_out_of_bounds; - /** * initial position of the enemy. Also the position where enemy respawns when * after being deactivated. */ diff --git a/src/badguy/mriceblock.cpp b/src/badguy/mriceblock.cpp index 8ec6f9a09..732793742 100644 --- a/src/badguy/mriceblock.cpp +++ b/src/badguy/mriceblock.cpp @@ -276,7 +276,6 @@ MrIceBlock::grab(MovingObject&, const Vector& pos, Direction dir) sprite->set_action(dir == LEFT ? "flat-left" : "flat-right"); set_state(ICESTATE_GRABBED); set_group(COLGROUP_DISABLED); - remove_out_of_bounds = false; } void @@ -285,7 +284,6 @@ MrIceBlock::ungrab(MovingObject& , Direction dir) this->dir = dir; set_state(ICESTATE_KICKED); set_group(COLGROUP_MOVING); - remove_out_of_bounds = true; } IMPLEMENT_FACTORY(MrIceBlock, "mriceblock") diff --git a/src/console.cpp b/src/console.cpp index abb10d615..7e7b38f76 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -196,8 +196,8 @@ Console::addLine(std::string s) } alpha = 1.0; - if(stayOpen < 5) - stayOpen += 1; + if(stayOpen < 6) + stayOpen += 1.5; } void diff --git a/src/sector.cpp b/src/sector.cpp index f746eec81..d92fc37c4 100644 --- a/src/sector.cpp +++ b/src/sector.cpp @@ -1165,7 +1165,7 @@ Sector::inside(const Rect& rect) const { if(rect.p1.x > solids->get_width() * 32 || rect.p1.y > solids->get_height() * 32 - || rect.p2.x < 0 || rect.p2.y < 0) + || rect.p2.x < 0) return false; return true; diff --git a/src/sector.hpp b/src/sector.hpp index c6b486d48..9b72e7d1f 100644 --- a/src/sector.hpp +++ b/src/sector.hpp @@ -93,7 +93,10 @@ public: const std::string& get_name() const { return name; } - /// tests if a given rectangle is inside the sector + /** + * tests if a given rectangle is inside the sector + * (a rectangle that is on top of the sector is considered inside) + */ bool inside(const Rect& rectangle) const; void play_music(MusicType musictype); diff --git a/src/worldmap/tux.cpp b/src/worldmap/tux.cpp index ade0588b9..f1086af52 100644 --- a/src/worldmap/tux.cpp +++ b/src/worldmap/tux.cpp @@ -182,6 +182,8 @@ Tux::tryContinueWalking(float elapsed_time) } } + + // stop if we reached a level, a WORLDMAP_STOP tile or a special tile without a passive_message if ((worldmap->at_level()) || (worldmap->at(tile_pos)->getData() & Tile::WORLDMAP_STOP) || (special_tile && !special_tile->passive_message)) { diff --git a/src/worldmap/worldmap.hpp b/src/worldmap/worldmap.hpp index b6e3a4377..69e1ca76c 100644 --- a/src/worldmap/worldmap.hpp +++ b/src/worldmap/worldmap.hpp @@ -160,10 +160,12 @@ public: * Save worldmap state to squirrel state table */ void save_state(); + /** * Load worldmap state from squirrel state table */ void load_state(); + /** * Load a worldmap */ -- 2.11.0