From e328f97c4ffc895f4620d14904d0af8534b009f6 Mon Sep 17 00:00:00 2001 From: LMH Date: Fri, 5 Jul 2013 15:55:20 -1000 Subject: [PATCH] Renamed walkingflame to livefire including sleeping and dormant versions --- .../{walkingflame => livefire}/left-0.png | Bin .../{walkingflame => livefire}/left-1.png | Bin .../{walkingflame => livefire}/left-2.png | Bin .../livefire.sprite} | 9 ------ .../{walkingflame => livefire}/sleeping-left.png | Bin .../{walkingflame => livefire}/waking-left-0.png | Bin .../{walkingflame => livefire}/waking-left-1.png | Bin .../{walkingflame => livefire}/waking-left-2.png | Bin data/images/creatures/walkingflame/iced-left.png | Bin 4408 -> 0 bytes data/levels/test/glow_effects.stl | 6 ++-- src/badguy/{walkingflame.cpp => livefire.cpp} | 34 ++++++++++----------- src/badguy/{walkingflame.hpp => livefire.hpp} | 16 +++++----- src/supertux/object_factory.cpp | 8 ++--- 13 files changed, 32 insertions(+), 41 deletions(-) rename data/images/creatures/{walkingflame => livefire}/left-0.png (100%) rename data/images/creatures/{walkingflame => livefire}/left-1.png (100%) rename data/images/creatures/{walkingflame => livefire}/left-2.png (100%) rename data/images/creatures/{walkingflame/walkingflame.sprite => livefire/livefire.sprite} (78%) rename data/images/creatures/{walkingflame => livefire}/sleeping-left.png (100%) rename data/images/creatures/{walkingflame => livefire}/waking-left-0.png (100%) rename data/images/creatures/{walkingflame => livefire}/waking-left-1.png (100%) rename data/images/creatures/{walkingflame => livefire}/waking-left-2.png (100%) delete mode 100644 data/images/creatures/walkingflame/iced-left.png rename src/badguy/{walkingflame.cpp => livefire.cpp} (85%) rename src/badguy/{walkingflame.hpp => livefire.hpp} (80%) diff --git a/data/images/creatures/walkingflame/left-0.png b/data/images/creatures/livefire/left-0.png similarity index 100% rename from data/images/creatures/walkingflame/left-0.png rename to data/images/creatures/livefire/left-0.png diff --git a/data/images/creatures/walkingflame/left-1.png b/data/images/creatures/livefire/left-1.png similarity index 100% rename from data/images/creatures/walkingflame/left-1.png rename to data/images/creatures/livefire/left-1.png diff --git a/data/images/creatures/walkingflame/left-2.png b/data/images/creatures/livefire/left-2.png similarity index 100% rename from data/images/creatures/walkingflame/left-2.png rename to data/images/creatures/livefire/left-2.png diff --git a/data/images/creatures/walkingflame/walkingflame.sprite b/data/images/creatures/livefire/livefire.sprite similarity index 78% rename from data/images/creatures/walkingflame/walkingflame.sprite rename to data/images/creatures/livefire/livefire.sprite index 27d1df3e7..0bad70a3c 100644 --- a/data/images/creatures/walkingflame/walkingflame.sprite +++ b/data/images/creatures/livefire/livefire.sprite @@ -10,15 +10,6 @@ (hitbox 6 10 31.8 31.8) (mirror-action "left")) (action - (name "iced-left") - (hitbox 6 10 31.8 31.8) - (images "iced-left.png")) - (action - (name "iced-right") - (hitbox 6 10 31.8 31.8) - (mirror-action "iced-left") - ) - (action (name "sleeping-left") (hitbox 6 10 31.8 31.8) (images "sleeping-left.png")) diff --git a/data/images/creatures/walkingflame/sleeping-left.png b/data/images/creatures/livefire/sleeping-left.png similarity index 100% rename from data/images/creatures/walkingflame/sleeping-left.png rename to data/images/creatures/livefire/sleeping-left.png diff --git a/data/images/creatures/walkingflame/waking-left-0.png b/data/images/creatures/livefire/waking-left-0.png similarity index 100% rename from data/images/creatures/walkingflame/waking-left-0.png rename to data/images/creatures/livefire/waking-left-0.png diff --git a/data/images/creatures/walkingflame/waking-left-1.png b/data/images/creatures/livefire/waking-left-1.png similarity index 100% rename from data/images/creatures/walkingflame/waking-left-1.png rename to data/images/creatures/livefire/waking-left-1.png diff --git a/data/images/creatures/walkingflame/waking-left-2.png b/data/images/creatures/livefire/waking-left-2.png similarity index 100% rename from data/images/creatures/walkingflame/waking-left-2.png rename to data/images/creatures/livefire/waking-left-2.png diff --git a/data/images/creatures/walkingflame/iced-left.png b/data/images/creatures/walkingflame/iced-left.png deleted file mode 100644 index 09a3f113346a1dd6350afaecfb6d94958b0aa18b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4408 zcmV-85y$R{P)WFU8GbZ8({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^A#@qD-@hhU%5q=)Br1L5}`#k+*|3MfP6Cw=22PL z5}eF!aEWaoR@xr~n>NA-s150tLOqNElWD{WFh@Z$t-u$frSA_wUvX7kRr^jd_4wm_+YwQu&21NZ0tc-yLO#op~+H8ZRR<1~^X~e)}*WY_M0#XPK63p zu%2fOpUGJFq0UFGwGp}JJ4lZ~|2_N}JHY=?7JL&jxCF>AF?NX_G_CeywY3YBjCbPX z)tj)7Ny9ATeXu&10%dXquhfE`$G^O|@nK9R6In21rUw?kp`ZcJRd4)(!u@bmS9ilPEk;w^c(+D6gs(Ht6WRlU|^5lfY^ID#by+x{~DYzFDLXkAL>^m6QBD`M1kv z%<45?tJkYeuS;f1y_26Q^?s$=$~Oy@RA0}RoFfYL@_pmu?TyNk|ie39-!Hy75wA9weJvfWpH{3;d!w$g;+3?V z+|wb$M%|<1d^O-N!=8OJeB?99S&~mBW#`|SEGd0`(rl@_Q>A6vrDW#coHj?MY09{X yzsO3Wwdlk0~1{_MQFbVE8ZTon*&1Oy2YW0000. -#include "badguy/walkingflame.hpp" +#include "badguy/livefire.hpp" #include "audio/sound_manager.hpp" #include "object/player.hpp" @@ -26,8 +26,8 @@ static const float WALKSPEED = 80; static const float MAXDROPHEIGHT = 20; -WalkingFlame::WalkingFlame(const Reader& reader) : - WalkingBadguy(reader, "images/creatures/walkingflame/walkingflame.sprite", "left", "right"), +LiveFire::LiveFire(const Reader& reader) : + WalkingBadguy(reader, "images/creatures/livefire/livefire.sprite", "left", "right"), lightsprite(sprite_manager->create("images/objects/lightmap_light/lightmap_light-medium.sprite")), state(STATE_WALKING) { @@ -38,7 +38,7 @@ WalkingFlame::WalkingFlame(const Reader& reader) : } void -WalkingFlame::collision_solid(const CollisionHit& hit) +LiveFire::collision_solid(const CollisionHit& hit) { if(state != STATE_WALKING) { BadGuy::collision_solid(hit); @@ -48,7 +48,7 @@ WalkingFlame::collision_solid(const CollisionHit& hit) } HitResponse -WalkingFlame::collision_badguy(BadGuy& badguy, const CollisionHit& hit) +LiveFire::collision_badguy(BadGuy& badguy, const CollisionHit& hit) { if(state != STATE_WALKING) { return BadGuy::collision_badguy(badguy, hit); @@ -57,7 +57,7 @@ WalkingFlame::collision_badguy(BadGuy& badguy, const CollisionHit& hit) } void -WalkingFlame::active_update(float elapsed_time) { +LiveFire::active_update(float elapsed_time) { if(state == STATE_WALKING) { WalkingBadguy::active_update(elapsed_time); @@ -98,7 +98,7 @@ WalkingFlame::active_update(float elapsed_time) { } void -WalkingFlame::draw(DrawingContext& context) +LiveFire::draw(DrawingContext& context) { //Draw the Sprite. sprite->draw(context, get_pos(), LAYER_OBJECTS); @@ -110,26 +110,26 @@ WalkingFlame::draw(DrawingContext& context) } void -WalkingFlame::freeze() +LiveFire::freeze() { // attempting to freeze a flame causes it to go out kill_fall(); } bool -WalkingFlame::is_freezable() const +LiveFire::is_freezable() const { return true; } bool -WalkingFlame::is_flammable() const +LiveFire::is_flammable() const { return false; } void -WalkingFlame::kill_fall() +LiveFire::kill_fall() { //TODO: get unique sound for ice-fire encounters sound_manager->play("sounds/fall.wav", get_pos()); @@ -151,29 +151,29 @@ WalkingFlame::kill_fall() /* The following defines a sleeping version */ -SWalkingFlame::SWalkingFlame(const Reader& reader) : - WalkingFlame(reader) +LiveFireAsleep::LiveFireAsleep(const Reader& reader) : + LiveFire(reader) { state = STATE_SLEEPING; } void -SWalkingFlame::initialize() +LiveFireAsleep::initialize() { physic.set_velocity_x(0); sprite->set_action(dir == LEFT ? "sleeping-left" : "sleeping-right"); } /* The following defines a dormant version that never wakes */ -DWalkingFlame::DWalkingFlame(const Reader& reader) : - WalkingFlame(reader) +LiveFireDormant::LiveFireDormant(const Reader& reader) : + LiveFire(reader) { walk_speed = 0; state = STATE_DORMANT; } void -DWalkingFlame::initialize() +LiveFireDormant::initialize() { physic.set_velocity_x(0); sprite->set_action(dir == LEFT ? "sleeping-left" : "sleeping-right"); diff --git a/src/badguy/walkingflame.hpp b/src/badguy/livefire.hpp similarity index 80% rename from src/badguy/walkingflame.hpp rename to src/badguy/livefire.hpp index 69e2e541d..ff0db6629 100644 --- a/src/badguy/walkingflame.hpp +++ b/src/badguy/livefire.hpp @@ -14,15 +14,15 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#ifndef HEADER_SUPERTUX_BADGUY_WALKINGFLAME_HPP -#define HEADER_SUPERTUX_BADGUY_WALKINGFLAME_HPP +#ifndef HEADER_SUPERTUX_BADGUY_LiveFire_HPP +#define HEADER_SUPERTUX_BADGUY_LiveFire_HPP #include "badguy/walking_badguy.hpp" -class WalkingFlame : public WalkingBadguy +class LiveFire : public WalkingBadguy { public: - WalkingFlame(const Reader& reader); + LiveFire(const Reader& reader); void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); @@ -48,18 +48,18 @@ protected: SState state; }; -class SWalkingFlame : public WalkingFlame +class LiveFireAsleep : public LiveFire { public: - SWalkingFlame(const Reader& reader); + LiveFireAsleep(const Reader& reader); void initialize(); }; -class DWalkingFlame : public WalkingFlame +class LiveFireDormant : public LiveFire { public: - DWalkingFlame(const Reader& reader); + LiveFireDormant(const Reader& reader); void initialize(); }; diff --git a/src/supertux/object_factory.cpp b/src/supertux/object_factory.cpp index ce556aee6..052b700b9 100644 --- a/src/supertux/object_factory.cpp +++ b/src/supertux/object_factory.cpp @@ -44,6 +44,7 @@ #include "badguy/jumpy.hpp" #include "badguy/kamikazesnowball.hpp" #include "badguy/kugelblitz.hpp" +#include "badguy/livefire.hpp" #include "badguy/mole.hpp" #include "badguy/mole_rock.hpp" #include "badguy/mrbomb.hpp" @@ -68,7 +69,6 @@ #include "badguy/totem.hpp" #include "badguy/treewillowisp.hpp" #include "badguy/walking_badguy.hpp" -#include "badguy/walkingflame.hpp" #include "badguy/walkingleaf.hpp" #include "badguy/willowisp.hpp" #include "badguy/yeti.hpp" @@ -186,7 +186,6 @@ ObjectFactory::init_factories() add_factory("dart"); add_factory("darttrap"); add_factory("dispenser"); - add_factory("dwalkingflame");// add_factory("fish"); add_factory("flame"); add_factory("flyingsnowball"); @@ -198,6 +197,9 @@ ObjectFactory::init_factories() add_factory("jumpy"); add_factory("kamikazesnowball"); add_factory("kugelblitz"); + add_factory("livefire"); + add_factory("livefire_asleep"); + add_factory("livefire_dormant"); add_factory("mole"); add_factory("mole_rock"); add_factory("mrbomb"); @@ -218,10 +220,8 @@ ObjectFactory::init_factories() add_factory("spiky"); add_factory("stalactite"); add_factory("stumpy"); - add_factory("swalkingflame");// add_factory("toad"); add_factory("totem"); - add_factory("walkingflame"); add_factory("walkingleaf"); add_factory("willowisp"); add_factory("yeti"); -- 2.11.0