pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src Playfield.cc,1.39,1.40 Playfield.hh,1


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src Playfield.cc,1.39,1.40 Playfield.hh,1.28,1.29 World.cc,1.77,1.78 World.hh,1.39,1.40
Date: 12 Jun 2002 11:04:07 -0000

Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv19107

Modified Files:
        Playfield.cc Playfield.hh World.cc World.hh 
Log Message:
removed shared_ptr<View>


Index: Playfield.cc
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/Playfield.cc,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- Playfield.cc        10 Jun 2002 13:03:35 -0000      1.39
+++ Playfield.cc        12 Jun 2002 11:04:03 -0000      1.40
@@ -78,13 +78,13 @@
       {
        if (verbose)
          std::cout << "Playfield: Using gimmick" << std::endl;
-       view.push_back(shared_ptr<View>(new View(0, 21, x2/2, y2/2, 0.5f)));
-       view.push_back(shared_ptr<View>(new View(x2/2, y1, x2, y2, 1.0f)));
-       view.push_back(shared_ptr<View>(new View(0, y2/2, x2/2, y2, 2.0f)));
+       view.push_back(new View(0, 21, x2/2, y2/2, 0.5f));
+       view.push_back(new View(x2/2, y1, x2, y2, 1.0f));
+       view.push_back(new View(0, y2/2, x2/2, y2, 2.0f));
       } 
     else
       { // !gimmicks_enabled
-       view.push_back(shared_ptr<View>(new View(x1, y1, x2, y2)));
+       view.push_back(new View(x1, y1, x2, y2));
        
        view[0]->set_x_offset(((x2 - x1) / 2) - level_data->get_startx());
        view[0]->set_y_offset(((y2 - y1) / 2) - level_data->get_starty());
@@ -98,12 +98,16 @@
 {
   if (verbose)
     std::cout << "Playfield going down" << std::endl;
+    
+  for (std::vector<View*>::iterator it = view.begin(); it != view.end(); ++it) 
{
+    delete *it;
+  }
 }
 
 void
 Playfield::draw()
 { 
-  for(std::vector<shared_ptr<View> >::iterator i = view.begin();
+  for(std::vector<View*>::iterator i = view.begin();
       i != view.end(); 
       ++i)
     {

Index: Playfield.hh
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/Playfield.hh,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- Playfield.hh        10 Jun 2002 13:03:35 -0000      1.28
+++ Playfield.hh        12 Jun 2002 11:04:03 -0000      1.29
@@ -46,7 +46,7 @@
   PinguHolder* pingus;
   PinguInfo* pingu_info;
   World* world;
-  std::vector<boost::shared_ptr<View> > view;
+  std::vector<View*> view;
   
   ///int  x_offset, y_offset;
   Pingu* current_pingu;

Index: World.cc
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/World.cc,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- World.cc    12 Jun 2002 10:40:05 -0000      1.77
+++ World.cc    12 Jun 2002 11:04:03 -0000      1.78
@@ -354,7 +354,7 @@
 void 
 World::play_wav (std::string name, const CL_Vector& pos, float volume)
 {
-  if (view.get ())
+  if (view)
     {
       CL_Vector center = view->get_center ();
       float panning = pos.x - center.x;
@@ -375,7 +375,7 @@
 }
 
 void
-World::set_view (shared_ptr<View> v)
+World::set_view (View* v)
 {
   view = v;
 }

Index: World.hh
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/World.hh,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- World.hh    12 Jun 2002 10:40:05 -0000      1.39
+++ World.hh    12 Jun 2002 11:04:03 -0000      1.40
@@ -22,7 +22,6 @@
 
 #include <list>
 #include <string>
-#include "boost/smart_ptr.hpp"
 #include "WorldObj.hh"
 
 // Forward declarations
@@ -78,7 +77,7 @@
   ActionHolder*   action_holder;
   ColMap*         colmap;
   PLF*            plf;
-  boost::shared_ptr<View> view;
+  View*           view;
 
   void    init_worldobjs (void);
   void    init_map (void);
@@ -150,7 +149,7 @@
 
   /** Sets the main view, it is needed to play stereo wave and for
       other screen orientated effects */
-  void set_view (boost::shared_ptr<View> v);
+  void set_view (View* v);
 
   PinguHolder* get_pingu_p(void);
   void set_action_holder(ActionHolder*);




reply via email to

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