pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src credits.cxx,1.22,1.23 layer_manager.c


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src credits.cxx,1.22,1.23 layer_manager.cxx,1.4,1.5 layer_manager.hxx,1.7,1.8 menu_background.cxx,1.7,1.8
Date: 11 Apr 2003 01:21:23 -0000

Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv22353/src

Modified Files:
        credits.cxx layer_manager.cxx layer_manager.hxx 
        menu_background.cxx 
Log Message:
some small bug fixes

Index: credits.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/credits.cxx,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- credits.cxx 10 Apr 2003 17:11:58 -0000      1.22
+++ credits.cxx 11 Apr 2003 01:21:21 -0000      1.23
@@ -94,6 +94,7 @@
   credits.push_back(_("-Translation (german)"));
   credits.push_back("_David Philippi");
   credits.push_back("_Ingo Ruhnke");
+  credits.push_back("_Giray Devlet");
   credits.push_back("n");
 
   credits.push_back(_("-Special"));

Index: layer_manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/layer_manager.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- layer_manager.cxx   24 Mar 2003 11:18:53 -0000      1.4
+++ layer_manager.cxx   11 Apr 2003 01:21:21 -0000      1.5
@@ -31,14 +31,7 @@
 void
 LayerManager::add_layer (const CL_Surface& sur, float x_o, float y_o, float 
x_u, float y_u)
 {
-  Layer layer;
-  layer.sur = sur;
-  layer.x_offset = x_o;
-  layer.y_offset = y_o;
-  layer.x_update = x_u;
-  layer.y_update = y_u;
-
-  layers.push_back (layer);
+  layers.push_back (Layer(sur, x_o, y_o, x_u, y_u));
 }
 
 void

Index: layer_manager.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/layer_manager.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- layer_manager.hxx   24 Mar 2003 11:18:53 -0000      1.7
+++ layer_manager.hxx   11 Apr 2003 01:21:21 -0000      1.8
@@ -30,52 +30,44 @@
 private:
   class Layer
   {
+  private:
+    CL_Surface sur;
+
+    float x_offset;
+    float y_offset;
+    
+    float x_update;
+    float y_update;
+
+    float x_pos;
+    float y_pos;
+
   public:
-    Layer () : x_pos(0.0f), y_pos(0.0f) {
-    }
+    Layer () 
+      : x_pos(0), y_pos(0),
+        x_update(0), y_update(0),
+        x_offset(0), y_offset(0)
+    {}
+
+    Layer (const CL_Surface& arg_sur, float x_o, float y_o, float x_u, float 
y_u)
+      : sur(arg_sur),
+        x_pos(0), y_pos(0),
+        x_offset(x_o), y_offset(y_o),
+        x_update(x_u), y_update(y_u)
+    {}
     
-    void draw (GraphicContext& gc) {
+    void draw (GraphicContext& gc) 
+    {
       gc.draw(sur, int(x_pos + x_offset),
               int(y_pos + y_offset));
       gc.draw(sur, int(x_pos + x_offset - 800),
               int(y_pos + y_offset));
     }
 
-    void update (float delta) {
+    void update (float delta) 
+    {
       x_pos = fmod((x_pos + x_update * delta),800);
       y_pos = fmod((y_pos + y_update * delta),600);
-    }
-    
-    CL_Surface sur;
-    
-    float x_update;
-    float y_update;
-
-    float x_offset;
-    float y_offset;
-
-    float x_pos;
-    float y_pos;
-    
-    Layer (const Layer& old) : sur(old.sur), 
-                               x_update(old.x_update), y_update(old.y_update),
-                               x_offset(old.x_offset), y_offset(old.y_offset),
-                              x_pos(old.x_pos), y_pos(old.y_pos)
-    { }
-
-    Layer& operator= (const Layer& old) {
-      if (this == &old)
-        return *this;
-       
-      sur      = old.sur;
-      x_update = old.x_update;
-      y_update = old.y_update;
-      x_offset = old.x_offset;
-      y_offset = old.y_offset;
-      x_pos    = old.x_pos;
-      y_pos    = old.y_pos;
-      
-      return *this;
     }
   };
 

Index: menu_background.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/menu_background.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- menu_background.cxx 28 Mar 2003 12:06:32 -0000      1.7
+++ menu_background.cxx 11 Apr 2003 01:21:21 -0000      1.8
@@ -43,10 +43,7 @@
 void 
 MenuBackground::update (float delta)
 {
-#ifndef WIN32
-  // FIXME: WIN32 shouldn't be an issue here
   layer_manager.update (delta);
-#endif
 }
 
 /* EOF */





reply via email to

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