pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r2715 - in branches/pingus_sdl/src: . actions components di


From: nehalmistry
Subject: [Pingus-CVS] r2715 - in branches/pingus_sdl/src: . actions components display gui lisp math particles physfs worldobjs
Date: Thu, 12 Jul 2007 21:11:01 +0200

Author: nehalmistry
Date: 2007-07-12 21:10:16 +0200 (Thu, 12 Jul 2007)
New Revision: 2715

Modified:
   branches/pingus_sdl/src/actions/teleported.cpp
   branches/pingus_sdl/src/actions/walker.cpp
   branches/pingus_sdl/src/components/playfield.cpp
   branches/pingus_sdl/src/display/drawing_context.cpp
   branches/pingus_sdl/src/graphic_context_state.cpp
   branches/pingus_sdl/src/ground_map.cpp
   branches/pingus_sdl/src/gui/cursor.cpp
   branches/pingus_sdl/src/lisp/getters.cpp
   branches/pingus_sdl/src/lisp/lexer.cpp
   branches/pingus_sdl/src/lisp/lisp.hpp
   branches/pingus_sdl/src/math.hpp
   branches/pingus_sdl/src/math/matrix.cpp
   branches/pingus_sdl/src/math/quaternion.cpp
   branches/pingus_sdl/src/math/vector2f.hpp
   branches/pingus_sdl/src/multiline_text.cpp
   branches/pingus_sdl/src/particles/pingu_particle_holder.cpp
   branches/pingus_sdl/src/particles/rain_particle_holder.cpp
   branches/pingus_sdl/src/particles/snow_particle_holder.cpp
   branches/pingus_sdl/src/physfs/physfs_sdl.cpp
   branches/pingus_sdl/src/physfs/physfs_stream.cpp
   branches/pingus_sdl/src/pingu_holder.cpp
   branches/pingus_sdl/src/sexpr_file_reader.cpp
   branches/pingus_sdl/src/sprite.cpp
   branches/pingus_sdl/src/start_screen.cpp
   branches/pingus_sdl/src/string_format.cpp
   branches/pingus_sdl/src/worldobjs/conveyor_belt.cpp
   branches/pingus_sdl/src/worldobjs/liquid.cpp
   branches/pingus_sdl/src/worldobjs/smasher.cpp
   branches/pingus_sdl/src/worldobjs/thunderstorm_background.cpp
Log:
fix warnings and various cleanups

Modified: branches/pingus_sdl/src/actions/teleported.cpp
===================================================================
--- branches/pingus_sdl/src/actions/teleported.cpp      2007-07-12 16:23:55 UTC 
(rev 2714)
+++ branches/pingus_sdl/src/actions/teleported.cpp      2007-07-12 19:10:16 UTC 
(rev 2715)
@@ -42,7 +42,7 @@
 void
 Teleported::update()
 {
-  pingu->set_pos (x_target, y_target);
+  pingu->set_pos((float)x_target, (float)y_target);
   pingu->set_status(PS_ALIVE);
   pingu->set_action(Actions::Walker);
 }

Modified: branches/pingus_sdl/src/actions/walker.cpp
===================================================================
--- branches/pingus_sdl/src/actions/walker.cpp  2007-07-12 16:23:55 UTC (rev 
2714)
+++ branches/pingus_sdl/src/actions/walker.cpp  2007-07-12 19:10:16 UTC (rev 
2715)
@@ -43,8 +43,8 @@
 Walker::update ()
 {
   // update the sprite
-  walker[pingu->direction].update(0.033);
-  floaterlayer[pingu->direction].update(0.033);
+  walker[pingu->direction].update(0.033f);
+  floaterlayer[pingu->direction].update(0.033f);
 
   Vector3f last_pos = pingu->get_pos();
 

Modified: branches/pingus_sdl/src/components/playfield.cpp
===================================================================
--- branches/pingus_sdl/src/components/playfield.cpp    2007-07-12 16:23:55 UTC 
(rev 2714)
+++ branches/pingus_sdl/src/components/playfield.cpp    2007-07-12 19:10:16 UTC 
(rev 2715)
@@ -230,7 +230,7 @@
 void
 Playfield::set_viewpoint(int x, int y)
 {
-  state.set_pos(Vector2f(x, y));
+  state.set_pos(Vector2f((float)x, (float)y));
 }
 
 void
@@ -245,7 +245,7 @@
 void
 Playfield::scroll (int x, int y)
 {
-  state.set_pos(state.get_pos() + Vector2f(x, y));
+  state.set_pos(state.get_pos() + Vector2f((float)x, (float)y));
 }
 
 

Modified: branches/pingus_sdl/src/display/drawing_context.cpp
===================================================================
--- branches/pingus_sdl/src/display/drawing_context.cpp 2007-07-12 16:23:55 UTC 
(rev 2714)
+++ branches/pingus_sdl/src/display/drawing_context.cpp 2007-07-12 19:10:16 UTC 
(rev 2715)
@@ -126,7 +126,7 @@
   
 public:
   RectDrawingRequest(const Rect& rect_, const Color& color_, bool filled_, 
float z)
-    : DrawingRequest(Vector3f(rect.left, rect.top, z)),
+    : DrawingRequest(Vector3f((float)rect.left, (float)rect.top, z)),
       rect(rect_), color(color_), filled(filled_)
   {}
   

Modified: branches/pingus_sdl/src/graphic_context_state.cpp
===================================================================
--- branches/pingus_sdl/src/graphic_context_state.cpp   2007-07-12 16:23:55 UTC 
(rev 2714)
+++ branches/pingus_sdl/src/graphic_context_state.cpp   2007-07-12 19:10:16 UTC 
(rev 2715)
@@ -161,20 +161,20 @@
     {
       if (-impl->offset.x < impl->limit.left)
         {
-         impl->offset.x = -( impl->limit.left );
+         impl->offset.x = (float)-(impl->limit.left);
         }
       else if (-impl->offset.x + get_width() >= impl->limit.right)
         {
-         impl->offset.x = -( impl->limit.right - get_width() - 1 );
+         impl->offset.x = (float)-(impl->limit.right - get_width() - 1);
         }
 
       if (-impl->offset.y < impl->limit.top)
         {
-          impl->offset.y = -( impl->limit.top );
+          impl->offset.y = (float)-(impl->limit.top);
         }
       else if (-impl->offset.y + get_height() >= impl->limit.bottom)
         {
-          impl->offset.y = -( impl->limit.bottom - get_height() - 1 );
+          impl->offset.y = (float)-(impl->limit.bottom - get_height() - 1);
         }
     }
 }
@@ -235,7 +235,7 @@
 Vector2f
 GraphicContextState::screen2world(const Vector2i& pos_)
 {
-  Vector2f pos(pos_.x, pos_.y);
+  Vector2f pos((float)pos_.x, (float)pos_.y);
   float sa = (float)sin(-impl->rotation/180.0f*M_PI);
   float ca = (float)cos(-impl->rotation/180.0f*M_PI);
 

Modified: branches/pingus_sdl/src/ground_map.cpp
===================================================================
--- branches/pingus_sdl/src/ground_map.cpp      2007-07-12 16:23:55 UTC (rev 
2714)
+++ branches/pingus_sdl/src/ground_map.cpp      2007-07-12 19:10:16 UTC (rev 
2715)
@@ -143,15 +143,15 @@
               {
                 //std::cout << "Drawing GroundMap Tile " << std::endl;
                 gc.color().draw(tile[x][y].get_sprite(),
-                                Vector3f(x * tile_size, y * tile_size));
+                                Vector3f((float)x * tile_size, (float)y * 
tile_size));
               }
             else
               {
                 if (pingus_debug_flags & PINGUS_DEBUG_TILES)
-                  gc.color().draw_fillrect(x * tile_size,
-                                           y * tile_size,
-                                           x * tile_size + tile_size,
-                                           y * tile_size + tile_size,
+                  gc.color().draw_fillrect((float)x * tile_size,
+                                           (float)y * tile_size,
+                                           (float)x * tile_size + tile_size,
+                                           (float)y * tile_size + tile_size,
                                            Color(255, 0, 0, 75));
               }
           }

Modified: branches/pingus_sdl/src/gui/cursor.cpp
===================================================================
--- branches/pingus_sdl/src/gui/cursor.cpp      2007-07-12 16:23:55 UTC (rev 
2714)
+++ branches/pingus_sdl/src/gui/cursor.cpp      2007-07-12 19:10:16 UTC (rev 
2715)
@@ -43,7 +43,7 @@
 {
   int x,y;
   SDL_GetMouseState(&x, &y);
-  sprite.draw(x, y, Display::get_screen());
+  sprite.draw((float)x, (float)y, Display::get_screen());
 }
 
 

Modified: branches/pingus_sdl/src/lisp/getters.cpp
===================================================================
--- branches/pingus_sdl/src/lisp/getters.cpp    2007-07-12 16:23:55 UTC (rev 
2714)
+++ branches/pingus_sdl/src/lisp/getters.cpp    2007-07-12 19:10:16 UTC (rev 
2715)
@@ -15,7 +15,7 @@
 bool get(const Lisp* lisp, float& val)
 {
   if(lisp->get_type() == Lisp::TYPE_INT)
-    val = lisp->get_int();
+    val = (float)lisp->get_int();
   else if(lisp->get_type() == Lisp::TYPE_FLOAT)
     val = lisp->get_float();
   else

Modified: branches/pingus_sdl/src/lisp/lexer.cpp
===================================================================
--- branches/pingus_sdl/src/lisp/lexer.cpp      2007-07-12 16:23:55 UTC (rev 
2714)
+++ branches/pingus_sdl/src/lisp/lexer.cpp      2007-07-12 19:10:16 UTC (rev 
2715)
@@ -39,7 +39,7 @@
     c = 0;
     bufend = 0;
     nextChar();
-  } catch(EOFException& e) {
+  } catch(EOFException&) {
   }
 }
 

Modified: branches/pingus_sdl/src/lisp/lisp.hpp
===================================================================
--- branches/pingus_sdl/src/lisp/lisp.hpp       2007-07-12 16:23:55 UTC (rev 
2714)
+++ branches/pingus_sdl/src/lisp/lisp.hpp       2007-07-12 19:10:16 UTC (rev 
2715)
@@ -90,7 +90,7 @@
         if(type != TYPE_INT)
           throw std::runtime_error("Lisp is not a float");
         else
-          return v.int_;
+          return (float)v.int_;
       }
     else
       {    

Modified: branches/pingus_sdl/src/math/matrix.cpp
===================================================================
--- branches/pingus_sdl/src/math/matrix.cpp     2007-07-12 16:23:55 UTC (rev 
2714)
+++ branches/pingus_sdl/src/math/matrix.cpp     2007-07-12 19:10:16 UTC (rev 
2715)
@@ -147,17 +147,17 @@
 Matrix
 Matrix::rotate(float angle, float x, float y, float z)
 {
-  double len2 = x*x+y*y+z*z;
+  float len2 = x*x+y*y+z*z;
   if (len2 != 1.0)
     {
-      double len = sqrt(len2);
+      float len = sqrt(len2);
       x /= len;
       y /= len;
       z /= len;
     }
 
-  double c = cos(angle*3.14159265/180);
-  double s = sin(angle*3.14159265/180);
+  float c = cos(angle*3.14159265f/180);
+  float s = sin(angle*3.14159265f/180);
 
   Matrix matrix = Matrix::identity();
   matrix[0]  = x*x*(1-c)+c;

Modified: branches/pingus_sdl/src/math/quaternion.cpp
===================================================================
--- branches/pingus_sdl/src/math/quaternion.cpp 2007-07-12 16:23:55 UTC (rev 
2714)
+++ branches/pingus_sdl/src/math/quaternion.cpp 2007-07-12 19:10:16 UTC (rev 
2715)
@@ -85,7 +85,7 @@
    */
   float dot = dot_product(o);
 
-  const float DOT_THRESHOLD = 0.995;
+  const float DOT_THRESHOLD = 0.995f;
   if(dot > DOT_THRESHOLD) {
     // quaternions are too close, lineary interpolate them
     Quaternion result = *this + (o - *this)*t;

Modified: branches/pingus_sdl/src/math/vector2f.hpp
===================================================================
--- branches/pingus_sdl/src/math/vector2f.hpp   2007-07-12 16:23:55 UTC (rev 
2714)
+++ branches/pingus_sdl/src/math/vector2f.hpp   2007-07-12 19:10:16 UTC (rev 
2715)
@@ -34,7 +34,7 @@
       : x(other.x), y(other.y)
   { }
   Vector2f(const Vector2i& other)
-    : x(other.x), y(other.y)
+    : x((float)other.x), y((float)other.y)
   {}
   Vector2f()
       : x(0), y(0)

Modified: branches/pingus_sdl/src/math.hpp
===================================================================
--- branches/pingus_sdl/src/math.hpp    2007-07-12 16:23:55 UTC (rev 2714)
+++ branches/pingus_sdl/src/math.hpp    2007-07-12 19:10:16 UTC (rev 2715)
@@ -67,9 +67,9 @@
 }
 
 inline
-double frand()
+float frand()
 {
-  return double(rand()) / (RAND_MAX+1.0);
+  return rand() / (RAND_MAX + 1.0f);
 }
 
 inline

Modified: branches/pingus_sdl/src/multiline_text.cpp
===================================================================
--- branches/pingus_sdl/src/multiline_text.cpp  2007-07-12 16:23:55 UTC (rev 
2714)
+++ branches/pingus_sdl/src/multiline_text.cpp  2007-07-12 19:10:16 UTC (rev 
2715)
@@ -38,13 +38,13 @@
 void
 MultiLineText::set_text(const std::string& str, int text_width)
 {
-  int last_pos;
+  size_t last_pos;
 
-  for(unsigned int j=0; j < str.length(); )
+  for(size_t j=0; j < str.length(); )
     {
       last_pos = str.length();
 
-      for(unsigned int i=j; /* i < (text_width + j) */
+      for(size_t i=j; /* i < (text_width + j) */
          font.get_size(str.substr(j, i-j).c_str()).width < text_width;
          ++i)
        {

Modified: branches/pingus_sdl/src/particles/pingu_particle_holder.cpp
===================================================================
--- branches/pingus_sdl/src/particles/pingu_particle_holder.cpp 2007-07-12 
16:23:55 UTC (rev 2714)
+++ branches/pingus_sdl/src/particles/pingu_particle_holder.cpp 2007-07-12 
19:10:16 UTC (rev 2715)
@@ -32,8 +32,8 @@
 PinguParticleHolder::PinguParticle::PinguParticle (int x, int y)
   : livetime(50 + (rand() % 75)),
     use_frame2((rand() % 5) == 0),
-    pos(Vector3f(x, y)),
-    velocity(Vector3f((float)Math::frand() * 7 - 3.5, (float)Math::frand() * 
-9))
+    pos(Vector3f((float)x, (float)y)),
+    velocity(Vector3f(Math::frand() * 7 - 3.5f, Math::frand() * -9))
 {
 }
 

Modified: branches/pingus_sdl/src/particles/rain_particle_holder.cpp
===================================================================
--- branches/pingus_sdl/src/particles/rain_particle_holder.cpp  2007-07-12 
16:23:55 UTC (rev 2714)
+++ branches/pingus_sdl/src/particles/rain_particle_holder.cpp  2007-07-12 
19:10:16 UTC (rev 2715)
@@ -28,10 +28,10 @@
 namespace Particles {
 
 RainParticleHolder::RainParticle::RainParticle(int x, int y)
-  : alive(true), splash(false), use_rain2_surf(false), splash_counter(0), 
splash_frame(0), pos(Vector3f(x, y))
+  : alive(true), splash(false), use_rain2_surf(false), splash_counter(0), 
splash_frame(0), pos(Vector3f((float)x, (float)y))
 {
   use_rain2_surf = ((rand() % 3) == 0);
-  pos.z = 1.0 + (float)Math::frand() * 3.0;
+  pos.z = 1.0f + Math::frand() * 3.0f;
 }
 
 

Modified: branches/pingus_sdl/src/particles/snow_particle_holder.cpp
===================================================================
--- branches/pingus_sdl/src/particles/snow_particle_holder.cpp  2007-07-12 
16:23:55 UTC (rev 2714)
+++ branches/pingus_sdl/src/particles/snow_particle_holder.cpp  2007-07-12 
19:10:16 UTC (rev 2715)
@@ -31,8 +31,8 @@
 SnowParticleHolder::SnowParticle::SnowParticle (int x, int y, bool colliding_)
   : alive(true),
     colliding(colliding_),
-    pos(Vector3f(x,y)),
-    velocity(Vector3f(0.0f, 1 + ((float)Math::frand() * 3.5f)))
+    pos(Vector3f((float)x,(float)y)),
+    velocity(Vector3f(0.0f, 1 + (Math::frand() * 3.5f)))
 {
   switch (rand() % 10)
     {
@@ -100,7 +100,7 @@
          continue;
        }
 
-      it->velocity.x += ((float)Math::frand() - 0.5f) / 10;
+      it->velocity.x += (Math::frand() - 0.5f) / 10;
 #ifdef CLANLIB_0_6
       if (it->colliding)
         {

Modified: branches/pingus_sdl/src/physfs/physfs_sdl.cpp
===================================================================
--- branches/pingus_sdl/src/physfs/physfs_sdl.cpp       2007-07-12 16:23:55 UTC 
(rev 2714)
+++ branches/pingus_sdl/src/physfs/physfs_sdl.cpp       2007-07-12 19:10:16 UTC 
(rev 2715)
@@ -58,7 +58,7 @@
 {
     PHYSFS_file* file = (PHYSFS_file*) context->hidden.unknown.data1;
 
-    int res = PHYSFS_read(file, ptr, size, maxnum);
+    int res = (int)PHYSFS_read(file, ptr, size, maxnum);
     return res;
 }
 

Modified: branches/pingus_sdl/src/physfs/physfs_stream.cpp
===================================================================
--- branches/pingus_sdl/src/physfs/physfs_stream.cpp    2007-07-12 16:23:55 UTC 
(rev 2714)
+++ branches/pingus_sdl/src/physfs/physfs_stream.cpp    2007-07-12 19:10:16 UTC 
(rev 2715)
@@ -82,7 +82,7 @@
       break;
     case std::ios_base::cur:
       if(off == 0)
-        return static_cast<pos_type> (ptell) - static_cast<pos_type> (egptr() 
- gptr());
+                 return static_cast<pos_type> ((std::streamoff)ptell) - 
static_cast<pos_type> ((std::streamoff)(egptr() - gptr()));
       pos += static_cast<off_type> (ptell) - static_cast<off_type> (egptr() - 
gptr());
       break;
     case std::ios_base::end:
@@ -127,7 +127,7 @@
         return 0;
 
     size_t size = pptr() - pbase();
-    PHYSFS_sint64 res = PHYSFS_write(file, pbase(), 1, size);
+    PHYSFS_sint64 res = PHYSFS_write(file, pbase(), 1, (PHYSFS_uint32)size);
     if(res <= 0)
         return traits_type::eof();
     

Modified: branches/pingus_sdl/src/pingu_holder.cpp
===================================================================
--- branches/pingus_sdl/src/pingu_holder.cpp    2007-07-12 16:23:55 UTC (rev 
2714)
+++ branches/pingus_sdl/src/pingu_holder.cpp    2007-07-12 19:10:16 UTC (rev 
2715)
@@ -45,7 +45,7 @@
     {
       // We use all_pingus.size() as pingu_id, so that id == array
       // index
-      Pingu* pingu = new Pingu (all_pingus.size(), pos, owner_id);
+      Pingu* pingu = new Pingu ((int)all_pingus.size(), pos, owner_id);
 
       // This list will deleted
       all_pingus.push_back (pingu);
@@ -155,19 +155,19 @@
 int
 PinguHolder::get_number_of_killed()
 {
-  return all_pingus.size() - pingus.size() - get_number_of_exited();
+  return (int)all_pingus.size() - (int)pingus.size() - get_number_of_exited();
 }
 
 int
 PinguHolder::get_number_of_alive()
 {
-  return pingus.size();
+  return (int)pingus.size();
 }
 
 int
 PinguHolder::get_number_of_released()
 {
-  return all_pingus.size();
+  return (int)all_pingus.size();
 }
 
 int
@@ -179,7 +179,7 @@
 unsigned int
 PinguHolder::get_end_id()
 {
-  return all_pingus.size();
+  return (unsigned int)all_pingus.size();
 }
 
 

Modified: branches/pingus_sdl/src/sexpr_file_reader.cpp
===================================================================
--- branches/pingus_sdl/src/sexpr_file_reader.cpp       2007-07-12 16:23:55 UTC 
(rev 2714)
+++ branches/pingus_sdl/src/sexpr_file_reader.cpp       2007-07-12 19:10:16 UTC 
(rev 2715)
@@ -83,7 +83,7 @@
           }
         else if (item->get_type() == lisp::Lisp::TYPE_INT)
           {
-            v = item->get_int();
+            v = (float)item->get_int();
             return true;
           }
         else

Modified: branches/pingus_sdl/src/sprite.cpp
===================================================================
--- branches/pingus_sdl/src/sprite.cpp  2007-07-12 16:23:55 UTC (rev 2714)
+++ branches/pingus_sdl/src/sprite.cpp  2007-07-12 19:10:16 UTC (rev 2715)
@@ -181,7 +181,7 @@
 
 Sprite::operator bool()
 {
-  return impl.get();
+  return (impl.get() != 0);
 }
 
 void

Modified: branches/pingus_sdl/src/start_screen.cpp
===================================================================
--- branches/pingus_sdl/src/start_screen.cpp    2007-07-12 16:23:55 UTC (rev 
2714)
+++ branches/pingus_sdl/src/start_screen.cpp    2007-07-12 19:10:16 UTC (rev 
2715)
@@ -150,7 +150,7 @@
 void
 StartScreenComponent::draw(DrawingContext& gc)
 {
-  gc.draw(background, Display::get_width()/2, Display::get_height()/2);
+  gc.draw(background, Display::get_width()/2.f, Display::get_height()/2.f);
 
   int left_x  = Display::get_width()/2 - 120;
   int right_x = Display::get_width()/2 + 120;

Modified: branches/pingus_sdl/src/string_format.cpp
===================================================================
--- branches/pingus_sdl/src/string_format.cpp   2007-07-12 16:23:55 UTC (rev 
2714)
+++ branches/pingus_sdl/src/string_format.cpp   2007-07-12 19:10:16 UTC (rev 
2715)
@@ -62,8 +62,8 @@
   while ((pos = text.find("  ", pos)) != std::string::npos)
     text.replace(pos, 2, 1, ' ');
 
-  int start_pos      = 0;
-  int previous_space = 0;
+  size_t start_pos      = 0;
+  size_t previous_space = 0;
   pos = 0;
 
   while ((pos = text.find(' ', pos + 1)) != std::string::npos)

Modified: branches/pingus_sdl/src/worldobjs/conveyor_belt.cpp
===================================================================
--- branches/pingus_sdl/src/worldobjs/conveyor_belt.cpp 2007-07-12 16:23:55 UTC 
(rev 2714)
+++ branches/pingus_sdl/src/worldobjs/conveyor_belt.cpp 2007-07-12 19:10:16 UTC 
(rev 2715)
@@ -43,12 +43,12 @@
   gc.color().draw(left_sur, pos);
   for (int i=0; i < width; ++i)
     gc.color().draw(middle_sur,
-           Vector3f(static_cast<int>(pos.x + left_sur.get_width() + i * 
middle_sur.get_width()),
-                  static_cast<int>(pos.y)));
+           Vector3f(static_cast<float>(pos.x + left_sur.get_width() + i * 
middle_sur.get_width()),
+                  static_cast<float>(pos.y)));
 
   gc.color().draw(right_sur,
-         Vector3f(static_cast<int>(pos.x + left_sur.get_width() + width * 
middle_sur.get_width()),
-                 static_cast<int>(pos.y)));
+         Vector3f(static_cast<float>(pos.x + left_sur.get_width() + width * 
middle_sur.get_width()),
+                 static_cast<float>(pos.y)));
 }
 
 void

Modified: branches/pingus_sdl/src/worldobjs/liquid.cpp
===================================================================
--- branches/pingus_sdl/src/worldobjs/liquid.cpp        2007-07-12 16:23:55 UTC 
(rev 2714)
+++ branches/pingus_sdl/src/worldobjs/liquid.cpp        2007-07-12 19:10:16 UTC 
(rev 2715)
@@ -73,7 +73,7 @@
   for(int x = static_cast<int>(pos.x);
       x < pos.x + width;
       x += sur.get_width())
-    gc.color().draw(sur, Vector3f(x, pos.y));
+    gc.color().draw(sur, Vector3f((float)x, pos.y));
 }
 
 void

Modified: branches/pingus_sdl/src/worldobjs/smasher.cpp
===================================================================
--- branches/pingus_sdl/src/worldobjs/smasher.cpp       2007-07-12 16:23:55 UTC 
(rev 2714)
+++ branches/pingus_sdl/src/worldobjs/smasher.cpp       2007-07-12 19:10:16 UTC 
(rev 2715)
@@ -69,9 +69,7 @@
                            {
                              world->get_smoke_particle_holder()->
                                 add_particle(pos.x + 20 + float(rand() % 260),
-                                             pos.y + 180,
-                                             float(Math::frand()-0.5f),
-                                                                               
                                                                                
                 float(Math::frand()-0.5f));
+                                             pos.y + 180, Math::frand()-0.5f, 
Math::frand()-0.5f);
                            }
 
                    for (PinguIter pingu = holder->begin (); pingu != 
holder->end (); ++pingu)

Modified: branches/pingus_sdl/src/worldobjs/thunderstorm_background.cpp
===================================================================
--- branches/pingus_sdl/src/worldobjs/thunderstorm_background.cpp       
2007-07-12 16:23:55 UTC (rev 2714)
+++ branches/pingus_sdl/src/worldobjs/thunderstorm_background.cpp       
2007-07-12 19:10:16 UTC (rev 2715)
@@ -47,7 +47,7 @@
 void
 ThunderstormBackground::draw (SceneContext& gc)
 {
-  gc.color().draw(clouds_sur, Vector3f(x_pos, 0));
+  gc.color().draw(clouds_sur, Vector3f((float)x_pos, 0));
 }
 
 } // namespace WorldObjs





reply via email to

[Prev in Thread] Current Thread [Next in Thread]