From 4f1cfc3e5fbbc8afd68f0161d4dae5cebe532fac Mon Sep 17 00:00:00 2001 From: Christoph Sommer Date: Sat, 20 May 2006 00:58:55 +0000 Subject: [PATCH] Platform that hurts Tux and Badguys when touched SVN-Revision: 3550 --- data/images/objects/sawblade/default-0.png | Bin 0 -> 1883 bytes data/images/objects/sawblade/default-1.png | Bin 0 -> 1904 bytes data/images/objects/sawblade/default-2.png | Bin 0 -> 1863 bytes data/images/objects/sawblade/default-3.png | Bin 0 -> 1911 bytes data/images/objects/sawblade/sawblade.sprite | 14 +++ data/levels/test/hurting_platform.stl | 136 +++++++++++++++++++++++++++ src/object/hurting_platform.cpp | 49 ++++++++++ src/object/hurting_platform.hpp | 42 +++++++++ 8 files changed, 241 insertions(+) create mode 100644 data/images/objects/sawblade/default-0.png create mode 100644 data/images/objects/sawblade/default-1.png create mode 100644 data/images/objects/sawblade/default-2.png create mode 100644 data/images/objects/sawblade/default-3.png create mode 100644 data/images/objects/sawblade/sawblade.sprite create mode 100644 data/levels/test/hurting_platform.stl create mode 100644 src/object/hurting_platform.cpp create mode 100644 src/object/hurting_platform.hpp diff --git a/data/images/objects/sawblade/default-0.png b/data/images/objects/sawblade/default-0.png new file mode 100644 index 0000000000000000000000000000000000000000..562b223f7ebd051b1a78a2dad8fe32656e3eea15 GIT binary patch literal 1883 zcmV-h2c-CkP)WFU8GbZ8({Xk{QrNlj4iWF>9@00zHFL_t(o!=+bEh-6n4 z{?5Jcz59NutE*a)87Gc^NlBKT0}n6>-By!nM__JqN!5q5$D|9A`nIp6A^g$MFNq{G^DCeBXb0GMW7F zFniN&oE{UAM*+M_ME8VY`0Xf)P}en-QqWqnh&X0ut#wXBRF-9Et@WcQQuF!zzja-| zT`ASkS{K9NFg-MYt*xytGryE1$-6`Z0O0#Rlu`mfnsx2k_FYT220(RP%X~in1rgmx zM5{#f&~P}sbf^#vhr?7veyz2JF$Q56*2Wm?c^;HfiipVbJTb&02fxO&J)E$Ddb9eMc#k5D`UDBuSD?<2df7X{xQY?TJA|BqBG~ z6A|RP)eQ@(*<2 zISW89hi1tHfSXRI7XkbZz_rn6^pv-~y{#sb$*vy0Cl@v06)LWiil0)VnCLtWS36p`Em@NgK0iiqk)wVH?!1Oe*01~cRM@#9F-l=D1SK@gx3 zXL~}z5iJZu_`d%{p69PB5qWtwn?1+OeiJikQ>!dX1VMnRs$?>mfQV4nb(`-8(tDWR zqqP@tGutf7t|iB9;4jhcmcDmcmX%dieMv-q zuSDduh#X7P^qD-*_ixk+Ql|lxi8E8KFcyGib9$i za+ioavfueF6>Y8kmbLb4N~y0_RrRANitcNtnzk7o;QU6~IpCabJS3fzM&0YgAi=ybXG3G{N@;r|LxZT~|oSAowG4C|SP@1NH z>GgW=8w>_=N0-y}_4WS@27_8eelVNOE{e#Xd%fO=7K_EEwHEXF{GYqKyT7ffN(1nn zbC*V=(Yvdv`gEG6&jL92e_c**!_4~ud>z0$06ZunPiUE>wnx} Vwwi&m=M4Y=002ovPDHLkV1knrfZYH9 literal 0 HcmV?d00001 diff --git a/data/images/objects/sawblade/default-1.png b/data/images/objects/sawblade/default-1.png new file mode 100644 index 0000000000000000000000000000000000000000..ff607dd55341027e21e24d9d474521abf7db808c GIT binary patch literal 1904 zcmV-$2aouPP)WFU8GbZ8({Xk{QrNlj4iWF>9@00z`aL_t(o!<|=4j2u@L zJ@>xXRbAaZUEMZ`aJ&G6L0J$W3ll|%jU^fsML^JWw`DGc-yDP=^2vn;bB zQUpQJ-`m@JW;`ChxUsR(8I4Biu>oAVbm;*Ae`~kf57h~cQi`J}0svlm&I6G8ztn3i zA~c)LUKf$4MC30-^z3LfdTBWq9|qvUg$p;C`B~?jZ@1f~)9G*&MGAmgN^XhB6A{nX znE6(#)he~t5=GI+wAOEQyWK7`|LCw>dhsGjl5c9QzYU;6L}3sF1fa3>j9mc20EmbP z07OK2@84Hd)o!QLVE~OF2pRyu%xwU;eED*Bb#-<2t`a0k@*sdW+wFEg2!dsxvV1=g zq1|qSh~S)qa}HHiK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w*2 z9v}=uh{&OOaP{g{T)K4WUO=d#DBzsCsD{Jg=e5>9&|2$x{VJtOW@gXxP!t8CC_2gn zc6WDi{rdI0*Q>R9GMT(gL{HQ9_V%FJY_^Dq0cg+jgqh*{zLaGtT5BsJ0RXDk>zGU? z5RrrDUY2tXX`23vncr5-{MvXtzV4jU0K_>*A|lMJqA1eNxv*BNIU+)qWeCIYAVkNM z=lN=Qa=q3XaU8!7z+0-<>wVTa_w%aM$}HyA+5;!X7_Z%Ki&9Fa(ayxZ-vYBrlW5rui4gPDnlT$OAP5oe4+yG#XBgtbKwG= zUa$9pi0oCj_OmS8?{qo<5CABRF~ZDPT3P}#V{dN{qtS>w&(m6Kvet^V)`^G_5uTHC zSv>$id7fi58eJKUMi)fnXGf>v2dk2c$z;+dqO{RyG}1KnM1<2c)y_FIn@yBu31iIc z#xpspsu|6%a9(x{!6#pEe{POMD*LqWU@ONjeeEqIb~V4kmtEXQ3N7l z5s@s*aO1`e7-OKdM!jA~9LG0#J=`PYIO#PSjZcZl9|wa$=az}6*XzBbwf^Y(`uaDk zzChMmT@(d1n@#aNZyx}Q2#TV>bUHoEJ)KT3HX4nn zEX((2S@zv1iXL8HU;p>1zl@H2tekPq{RzPDwbrj{t@}|FsnKZkl2WP`$MGXsmi?ER zdqnhJrPR|RvLYg1OOoWdJK4YEu)n&xy4UG+KGNxQo>^U8{c~BCPmagqmx<_&vMfJ0 xnM__6ktHGulO*|_h$9&5MT&!46<{tp!U|%4Prn002ovPDHLkV1i$Vr2YT^ literal 0 HcmV?d00001 diff --git a/data/images/objects/sawblade/sawblade.sprite b/data/images/objects/sawblade/sawblade.sprite new file mode 100644 index 000000000..e3462ce1d --- /dev/null +++ b/data/images/objects/sawblade/sawblade.sprite @@ -0,0 +1,14 @@ +(supertux-sprite + (action + (name "default") + (hitbox 0 0 32 32) + (fps 120) + (images + "default-0.png" + "default-1.png" + "default-2.png" + "default-3.png" + ) + ) +) + diff --git a/data/levels/test/hurting_platform.stl b/data/levels/test/hurting_platform.stl new file mode 100644 index 000000000..6b274604c --- /dev/null +++ b/data/levels/test/hurting_platform.stl @@ -0,0 +1,136 @@ +(supertux-level + (version 2) + (name (_ "Sawblade Test")) + (author "Marek") + (sector + (name "main") + (background + (x 0) + (y 0) + (image "images/background/castledoor.jpg") + (speed 0.5) + ) + (tilemap + (z-pos -100) + (solid #f) + (speed 1) + (width 30) + (height 30) + (tiles 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 80 0 0 0 0 0 0 0 0 27 28 28 28 28 29 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 79 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 61 61 0 0 0 0 0 0 79 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 79 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 79 0 0 0 27 28 28 28 28 28 29 0 0 0 0 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 79 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 1349 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61) + ) + (tilemap + (z-pos 100) + (solid #f) + (speed 1) + (width 30) + (height 30) + (tiles 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 80 0 0 0 0 0 0 0 0 27 28 28 28 28 29 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 79 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 61 61 0 0 0 0 0 0 79 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 79 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 79 0 0 0 27 28 28 28 28 28 29 0 0 0 0 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 79 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 0 0 0 0 0 0 0 0 1349 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61) + ) + (camera + (mode "normal") + ) + (spawnpoint + (name "main") + (x 40) + (y 700) + ) + (hurting_platform + (sprite "images/objects/sawblade/sawblade.sprite") + (path + (mode "circular") + (node + (x 400) + (y 816) + (time 2.8) + ) + (node + (x 624) + (y 816) + (time 0.4) + ) + (node + (x 624) + (y 848) + (time 2.8) + ) + (node + (x 400) + (y 848) + (time 0.4) + ) + ) + ) + (spiky + (x 760) + (y 588) + ) + (spiky + (x 660) + (y 588) + ) + (spiky + (x 560) + (y 588) + ) + (hurting_platform + (sprite "images/objects/sawblade/sawblade.sprite") + (path + (mode "circular") + (node + (x 752) + (y 688) + (time 2.4) + ) + (node + (x 560) + (y 688) + (time 0.4) + ) + (node + (x 560) + (y 720) + (time 2.4) + ) + (node + (x 752) + (y 720) + (time 0.4) + ) + ) + ) + (hurting_platform + (sprite "images/objects/sawblade/sawblade.sprite") + (path + (mode "circular") + (node + (x 288) + (y 704) + (time 1.75) + ) + (node + (x 288) + (y 704) + (time 0.5) + ) + (node + (x 288) + (y 896) + (time 0.25) + ) + (node + (x 288) + (y 896) + (time 0.5) + ) + ) + ) + ) +) diff --git a/src/object/hurting_platform.cpp b/src/object/hurting_platform.cpp new file mode 100644 index 000000000..c730e182f --- /dev/null +++ b/src/object/hurting_platform.cpp @@ -0,0 +1,49 @@ +// $Id: hurtingplatform.cpp 3506 2006-05-12 01:41:09Z sommer $ +// +// SuperTux - Hurting Platform +// Copyright (C) 2006 Christoph Sommer +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#include +#include + +#include "hurting_platform.hpp" + +#include "log.hpp" +#include "player.hpp" +#include "badguy/badguy.hpp" +#include "object_factory.hpp" + +HurtingPlatform::HurtingPlatform(const lisp::Lisp& reader) + : Platform(reader) +{ +} + +HitResponse +HurtingPlatform::collision(GameObject& other, const CollisionHit& hit) +{ + Player* player = dynamic_cast(&other); + if (player) { + player->kill(false); + } + BadGuy* badguy = dynamic_cast(&other); + if (badguy) { + badguy->kill_fall(); + } + return Platform::collision(other, hit); +} + +IMPLEMENT_FACTORY(HurtingPlatform, "hurting_platform"); diff --git a/src/object/hurting_platform.hpp b/src/object/hurting_platform.hpp new file mode 100644 index 000000000..04c48fed9 --- /dev/null +++ b/src/object/hurting_platform.hpp @@ -0,0 +1,42 @@ +// $Id: hurting_platform.hpp 3506 2006-05-12 01:41:09Z sommer $ +// +// SuperTux - Hurting Platform +// Copyright (C) 2006 Christoph Sommer +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#ifndef __HURTING_PLATFORM_H__ +#define __HURTING_PLATFORM_H__ + +#include +#include "object/platform.hpp" + +/** + * Platform that hurts Tux and Badguys when touched + */ +class HurtingPlatform : public Platform +{ +public: + HurtingPlatform(const lisp::Lisp& reader); + virtual HurtingPlatform* clone() const { return new HurtingPlatform(*this); } + + virtual HitResponse collision(GameObject& other, const CollisionHit& hit); + +private: + +}; + +#endif + -- 2.11.0