[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r2824 - in branches/pingus_sdl: . src src/particles
From: |
jsalmon3 |
Subject: |
[Pingus-CVS] r2824 - in branches/pingus_sdl: . src src/particles |
Date: |
Tue, 7 Aug 2007 03:48:09 +0200 |
Author: jsalmon3
Date: 2007-08-07 03:48:00 +0200 (Tue, 07 Aug 2007)
New Revision: 2824
Modified:
branches/pingus_sdl/TODO
branches/pingus_sdl/src/particles/snow_particle_holder.cpp
branches/pingus_sdl/src/particles/snow_particle_holder.hpp
branches/pingus_sdl/src/world.cpp
branches/pingus_sdl/src/world.hpp
Log:
Fixed snow so it lands on the ground
Modified: branches/pingus_sdl/TODO
===================================================================
--- branches/pingus_sdl/TODO 2007-08-06 23:03:10 UTC (rev 2823)
+++ branches/pingus_sdl/TODO 2007-08-07 01:48:00 UTC (rev 2824)
@@ -30,8 +30,6 @@
- liquid's old-width-handling isn't handled by sexpr, but might be needed for
some levels
-- snow doesn't land on the ground
-
- completly broken: data/levels/playable/bombing.scm (z ordering?)
- hotspot offset gets ignored/mishandled
Modified: branches/pingus_sdl/src/particles/snow_particle_holder.cpp
===================================================================
--- branches/pingus_sdl/src/particles/snow_particle_holder.cpp 2007-08-06
23:03:10 UTC (rev 2823)
+++ branches/pingus_sdl/src/particles/snow_particle_holder.cpp 2007-08-07
01:48:00 UTC (rev 2824)
@@ -62,7 +62,7 @@
snow3 (Resource::load_sprite("particles/snow3")),
snow4 (Resource::load_sprite("particles/snow4")),
snow5 (Resource::load_sprite("particles/snow5")),
- ground(Resource::load_sprite("particles/ground_snow"))
+ ground(Resource::load_collision_mask("particles/ground_snow"))
{
}
@@ -101,7 +101,6 @@
}
it->velocity.x += (Math::frand() - 0.5f) / 10;
-#ifdef CLANLIB_0_6
if (it->colliding)
{
int pixel =
world->get_colmap()->getpixel(static_cast<int>(it->pos.x),
static_cast<int>(it->pos.y));
@@ -109,13 +108,11 @@
&& pixel != Groundtype::GP_WATER
&& pixel != Groundtype::GP_OUTOFSCREEN)
{
- world->put(ground, static_cast<int>(it->pos.x - 1),
static_cast<int>(it->pos.y - 1));
+ world->get_gfx_map()->put(ground.get_pixelbuffer(),
static_cast<int>(it->pos.x - 1), static_cast<int>(it->pos.y - 1));
it->alive = false;
}
}
-#endif
}
-
}
Modified: branches/pingus_sdl/src/particles/snow_particle_holder.hpp
===================================================================
--- branches/pingus_sdl/src/particles/snow_particle_holder.hpp 2007-08-06
23:03:10 UTC (rev 2823)
+++ branches/pingus_sdl/src/particles/snow_particle_holder.hpp 2007-08-07
01:48:00 UTC (rev 2824)
@@ -53,7 +53,7 @@
Sprite snow3;
Sprite snow4;
Sprite snow5;
- Sprite ground;
+ CollisionMask ground;
std::vector<SnowParticle> particles;
Modified: branches/pingus_sdl/src/world.cpp
===================================================================
--- branches/pingus_sdl/src/world.cpp 2007-08-06 23:03:10 UTC (rev 2823)
+++ branches/pingus_sdl/src/world.cpp 2007-08-07 01:48:00 UTC (rev 2824)
@@ -207,7 +207,7 @@
void
World::armageddon(void)
{
- Sound::PingusSound::play_sound (Sound::GOODIDEA);
+ Sound::PingusSound::play_sound (Sound::GOODIDEA);
do_armageddon = true;
armageddon_count = 0;
}
@@ -218,6 +218,12 @@
return colmap;
}
+GroundMap*
+World::get_gfx_map()
+{
+ return gfx_map;
+}
+
void
World::play_sound(std::string name, const Vector3f& pos, float volume)
{
Modified: branches/pingus_sdl/src/world.hpp
===================================================================
--- branches/pingus_sdl/src/world.hpp 2007-08-06 23:03:10 UTC (rev 2823)
+++ branches/pingus_sdl/src/world.hpp 2007-08-07 01:48:00 UTC (rev 2824)
@@ -126,6 +126,9 @@
/** @return A pointer to the collision map used in this world */
ColMap* get_colmap();
+ /** @return A pointer to the gfx map used in this world */
+ GroundMap* get_gfx_map();
+
void put(int x, int y, Groundtype::GPType p = Groundtype::GP_GROUND);
void put(const CollisionMask&, int x, int y, Groundtype::GPType);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r2824 - in branches/pingus_sdl: . src src/particles,
jsalmon3 <=