[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r2611 - in trunk/src: . editor worldobjs
From: |
jave27 |
Subject: |
[Pingus-CVS] r2611 - in trunk/src: . editor worldobjs |
Date: |
Thu, 19 Jan 2006 02:56:19 +0100 |
Author: jave27
Date: 2006-01-19 02:56:00 +0100 (Thu, 19 Jan 2006)
New Revision: 2611
Modified:
trunk/src/editor/level_objs.hxx
trunk/src/worldobj_factory.cxx
trunk/src/worldobjs/woodthing.cxx
trunk/src/worldobjs/woodthing.hxx
Log:
Enabled woodthing (mostly).
Modified: trunk/src/editor/level_objs.hxx
===================================================================
--- trunk/src/editor/level_objs.hxx 2006-01-19 01:29:43 UTC (rev 2610)
+++ trunk/src/editor/level_objs.hxx 2006-01-19 01:56:00 UTC (rev 2611)
@@ -60,7 +60,7 @@
val = HAS_SPEED | HAS_WIDTH | HAS_SURFACE;
else if (obj_type == "surface-background")
val = HAS_COLOR | HAS_STRETCH | HAS_PARA | HAS_SCROLL |
HAS_SURFACE;
- else if (obj_type == "entrance")
+ else if (obj_type == "entrance" || obj_type == "woodthing")
val = HAS_TYPE | HAS_DIRECTION | HAS_RELEASE_RATE |
HAS_OWNER | HAS_SURFACE_FAKE;
else if (obj_type == "exit")
val = HAS_OWNER | HAS_SURFACE;
Modified: trunk/src/worldobj_factory.cxx
===================================================================
--- trunk/src/worldobj_factory.cxx 2006-01-19 01:29:43 UTC (rev 2610)
+++ trunk/src/worldobj_factory.cxx 2006-01-19 01:56:00 UTC (rev 2611)
@@ -44,6 +44,7 @@
#include "worldobjs/switch_door.hxx"
#include "worldobjs/teleporter.hxx"
#include "worldobjs/thunderstorm_background.hxx"
+#include "worldobjs/woodthing.hxx"
namespace Pingus {
@@ -102,6 +103,7 @@
new WorldObjFactoryImpl<Liquid>("liquid");
new WorldObjFactoryImpl<Hotspot>("hotspot");
new WorldObjFactoryImpl<Entrance>("entrance");
+ new WorldObjFactoryImpl<WoodThing>("woodthing");
new WorldObjFactoryImpl<Exit>("exit");
// traps
Modified: trunk/src/worldobjs/woodthing.cxx
===================================================================
--- trunk/src/worldobjs/woodthing.cxx 2006-01-19 01:29:43 UTC (rev 2610)
+++ trunk/src/worldobjs/woodthing.cxx 2006-01-19 01:56:00 UTC (rev 2611)
@@ -26,7 +26,8 @@
namespace Pingus {
namespace WorldObjs {
-namespace Entrances {
+// FIXME: Re-enable this namespace.
+// namespace Entrances {
WoodThing::WoodThing(const FileReader& reader)
: Entrance(reader)
@@ -39,7 +40,10 @@
WoodThing::update ()
{
Entrance::update ();
-
+
+ if (last_release > 0)
+ surface.update();
+
if (rand() % 5 == 0)
{
world->get_smoke_particle_holder()->
@@ -52,18 +56,13 @@
void
WoodThing::draw (SceneContext& gc)
{
- // FIXME: What are these hard-codes in here for?
+ gc.color().draw(surface2, pos);
+ // Only draw the animation if a pingu is coming out.
if (last_release > 0)
- gc.color().draw(surface,
- Vector(pos.x - surface.get_width () / 2,
- pos.y - surface.get_height() + 32, pos.z));
- else
- gc.color().draw(surface2,
- Vector(pos.x - surface.get_width () / 2,
- pos.y - surface.get_height() + 32, pos.z));
+ gc.color().draw(surface, pos);
}
-} // namespace Entrances
+// } // namespace Entrances
} // namespace WorldObjs
} // namespace Pingus
Modified: trunk/src/worldobjs/woodthing.hxx
===================================================================
--- trunk/src/worldobjs/woodthing.hxx 2006-01-19 01:29:43 UTC (rev 2610)
+++ trunk/src/worldobjs/woodthing.hxx 2006-01-19 01:56:00 UTC (rev 2611)
@@ -24,7 +24,8 @@
namespace Pingus {
namespace WorldObjs {
-namespace Entrances {
+// FIXME: Re-enable this namespace.
+//namespace Entrances {
class WoodThing : public Entrance
{
@@ -42,7 +43,7 @@
WoodThing& operator= (const WoodThing&);
};
-} // namespace Entrances
+//} // namespace Entrances
} // namespace WorldObjs
} // namespace Pingus
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r2611 - in trunk/src: . editor worldobjs,
jave27 <=