pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/editor editor_groundpiece_obj.cxx,1.4


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/editor editor_groundpiece_obj.cxx,1.4,1.5
Date: 26 Jun 2002 12:04:26 -0000

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

Modified Files:
        editor_groundpiece_obj.cxx 
Log Message:
- rotation of objects happens now around the center
- fixed the clanlib getpixel() bug, update your clanlib to have rotation and 
flipping working

Index: editor_groundpiece_obj.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/editor/editor_groundpiece_obj.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- editor_groundpiece_obj.cxx  25 Jun 2002 21:31:40 -0000      1.4
+++ editor_groundpiece_obj.cxx  26 Jun 2002 12:04:24 -0000      1.5
@@ -70,16 +70,30 @@
 EditorGroundpieceObj::rotate_90 ()
 {
   std::cout << "rot90" << std::endl;
+
+  pos.x += sprite.get_width ()/2;
+  pos.y += sprite.get_height ()/2;
+
   desc.modifier = Pingus::rotate_90(desc.modifier);
   sprite.get_surface () = PingusResource::load_surface (desc);
+
+  pos.x -= sprite.get_width ()/2;
+  pos.y -= sprite.get_height ()/2;
 }
 
 void
 EditorGroundpieceObj::rotate_270 ()
 {
   std::cout << "rot 270" << std::endl;
+
+  pos.x += sprite.get_width ()/2;
+  pos.y += sprite.get_height ()/2;
+
   desc.modifier = Pingus::rotate_270(desc.modifier);
   sprite.get_surface () = PingusResource::load_surface (desc);
+
+  pos.x -= sprite.get_width ()/2;
+  pos.y -= sprite.get_height ()/2;
 }
 
 /* EOF */




reply via email to

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