[3ddesktop-dev] Re: Continue Patch

ok, the list striped the patch... here it goes again...

diff -c 3ddesktop-0.1.6/3ddeskd.cpp 3ddesktop-0.1.6-patched/3ddeskd.cpp
*** 3ddesktop-0.1.6/3ddeskd.cpp Wed May  1 02:46:19 2002
--- 3ddesktop-0.1.6-patched/3ddeskd.cpp Tue Jun  4 23:38:27 2002
***************
*** 1244,1251 ****
      case 55:
      case 56:
      case 57:
!         faces->goto_face(key - 49);
          break;
 =20
  #define  KEY_ENTER  0xff0d
  #define  KEY_UP     0xff52
--- 1244,1271 ----
      case 55:
      case 56:
      case 57:
!         {
!           if (initiate_destroy) {
!              initiate_destroy =3D 0;
!              faces->entry_movement_cont();
!              float speed =3D faces->goto_face(key - 49);
!        =20
!              long t =3D get_milli_time()=20
!                       + (long)(speed * animation_step)
!                       + 400;  // not an exact science ;)
!        =20
!              GotoEndTask *end_task =3D new GotoEndTask
(t,entry_exit_movement,faces);
!             if (!end_task) {
!                 msgout (ERROR, "out of memory\n");
!                 end_program(-1);
!             }
!        =20
!             tasks.push_back((Task *)end_task);
!           } else {
!             faces->goto_face(key - 49);
!           }
          break;
+         }
 =20
  #define  KEY_ENTER  0xff0d
  #define  KEY_UP     0xff52
Common subdirectories: 3ddesktop-0.1.6/digits and
3ddesktop-0.1.6-patched/digits
diff -c 3ddesktop-0.1.6/faceset.cpp 3ddesktop-0.1.6-patched/faceset.cpp
*** 3ddesktop-0.1.6/faceset.cpp Tue Apr 30 23:10:41 2002
--- 3ddesktop-0.1.6-patched/faceset.cpp Tue Jun  4 23:37:21 2002
***************
*** 198,203 ****
--- 198,211 ----
                     Movement::MOVE_TYPE_SMOOTH);
  }
 =20
+ void FaceSet::entry_movement_cont(void)=20
+ {
+     z_off_mv.init (&z_offset,=20
+                    z_offset, get_distant_z_offset(),=20
+                    ee_speed_z,=20
+                    Movement::MOVE_TYPE_SMOOTH);
+ }
+=20
  void FaceSet::exit_movement_start(void)=20
  {
      z_off_mv.init(&z_offset,=20
***************
*** 414,419 ****
--- 422,436 ----
      FaceSet::entry_movement_start();
  }
 =20
+ void CarouselFaceSet::entry_movement_cont(void)=20
+ {
+     x_rot_mv.init (&X_Rot,
+                    0.0, x_rot_final,
+                    speed_x,
+                    Movement::MOVE_TYPE_SMOOTH);
+     FaceSet::entry_movement_cont();
+ }
+=20
  void CarouselFaceSet::exit_movement_start(void)=20
  {
      x_rot_mv.init(&X_Rot,
***************
*** 585,590 ****
--- 602,616 ----
                     speed_x,
                     Movement::MOVE_TYPE_SMOOTH);
      FaceSet::entry_movement_start();
+ }
+=20
+ void CylinderFaceSet::entry_movement_cont(void)=20
+ {
+     x_rot_mv.init (&X_Rot,
+                    0.0, x_rot_final,
+                    speed_x,
+                    Movement::MOVE_TYPE_SMOOTH);
+     FaceSet::entry_movement_cont();
  }
 =20
  void CylinderFaceSet::exit_movement_start(void)=20
diff -c 3ddesktop-0.1.6/faceset.hpp 3ddesktop-0.1.6-patched/faceset.hpp
*** 3ddesktop-0.1.6/faceset.hpp Tue Apr 30 20:01:20 2002
--- 3ddesktop-0.1.6-patched/faceset.hpp Tue Jun  4 23:38:07 2002
***************
*** 97,102 ****
--- 97,103 ----
      // movement hooks for controling entry and exit movements (zoom
      // out and zoom in etc)
      virtual void entry_movement_start(void);
+     virtual void entry_movement_cont(void);
      virtual void entry_exit_move(void);
      virtual void exit_movement_start(void);
      virtual int is_entry_movement_done(void);
***************
*** 138,143 ****
--- 139,145 ----
 =20
      // Entry/Exit movement functions
      void entry_movement_start(void);
+     void entry_movement_cont(void);
      void exit_movement_start(void);
      void entry_exit_move(void);
  };
***************
*** 167,172 ****
--- 169,175 ----
 =20
      // Entry/Exit movement functions
      void entry_movement_start(void);
+     void entry_movement_cont(void);
      void exit_movement_start(void);
      void entry_exit_move(void);


On Wed, 2002-06-05 at 00:21, Pedro Miguel de Sousa Caria wrote:
>=20
>=20
> Hi,
>=20
> Found 3ddesktop today and I was hooked... great work!
>=20
> However I felt the need to change it a little bit to suit my needs,
> patch and explanation follows.
>=20
> On my setup alt-nr runs 3ddesk --goto nr, this seemed ok, but was slower
> than regular switching, specially when I got the wrong desktop (happens
> a lot to me). However I noticed that by seeing all the desktops I could
> pinpoint the right one more easily, now the problem was --goto doesn't
> give you enough time to choose a second or third option...
>=20
> Ok, my patch is simple, you got regular goto behavior the diference is
> when you press a number key (to change to another desktop) during zoom
> in it zooms back to the desktop you choose (giving you a little more
> time) and then continues regular goto behaviour to the new desktop
> ofcourse if you press another desktop number you get another zoom back
> and little more time.=20
>=20
> Sorry for my poor description, but it's the best I can do at this
> hour...
>=20
> I don't know if you're going to like my code, but if you do and like
> what it does, it's yours...
>=20
> --
> Pedro Caria
> (M=E1quina de Estados)
>=20
> -- Binary/unsupported file stripped by Ecartis --
> -- Type: text/x-patch
> -- File: continue.patch
>=20
>=20
>=20



Other related posts: