paragui-cvs
[Top][All Lists]
Advanced

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

[paragui-cvs] CVS: pgmpeg/src pgmpeg.cpp,1.2,1.3 pgmpeg.h,1.2,1.3


From: Eric Ross <address@hidden>
Subject: [paragui-cvs] CVS: pgmpeg/src pgmpeg.cpp,1.2,1.3 pgmpeg.h,1.2,1.3
Date: Sun, 02 Jun 2002 05:41:22 -0400

Update of /cvsroot/paragui/pgmpeg/src
In directory subversions:/tmp/cvs-serv32080

Modified Files:
        pgmpeg.cpp pgmpeg.h 
Log Message:
Added a sigFrameUpdate to signal every time a frame changes.
Now, the player can be derived and overload the FrameUpdate() method, or
make a composition and connect the signal.


Index: pgmpeg.cpp
===================================================================
RCS file: /cvsroot/paragui/pgmpeg/src/pgmpeg.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** pgmpeg.cpp  20 Apr 2002 01:23:13 -0000      1.2
--- pgmpeg.cpp  2 Jun 2002 09:41:20 -0000       1.3
***************
*** 52,64 ****
                SDL_BlitSurface(dst, &rsrc, player->my_srfScreen, &rdst);
                SDL_UpdateRects(player->my_srfScreen, 1, &rdst);
!       }
!       else {          
                player->Update();
        }
  
        PG_Application::UnlockScreen();         
  }
  
! void PG_MPEGPlayer::SetFastMode(bool fast) {
        bFastMode = fast;
  }
--- 52,73 ----
                SDL_BlitSurface(dst, &rsrc, player->my_srfScreen, &rdst);
                SDL_UpdateRects(player->my_srfScreen, 1, &rdst);
!       } else {                
                player->Update();
        }
  
+       player->sigFrameUpdate();
+       player->FrameUpdate();
+ 
        PG_Application::UnlockScreen();         
  }
  
! void PG_MPEGPlayer::SetFastMode(bool fast) 
! {
        bFastMode = fast;
  }
+ 
+ void PG_MPEGPlayer::FrameUpdate() 
+ {
+       // Empty...maybe abstract soon ?? 
+ };
+ 

Index: pgmpeg.h
===================================================================
RCS file: /cvsroot/paragui/pgmpeg/src/pgmpeg.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** pgmpeg.h    20 Apr 2002 01:23:13 -0000      1.2
--- pgmpeg.h    2 Jun 2002 09:41:20 -0000       1.3
***************
*** 32,35 ****
--- 32,38 ----
  #include <map>
  
+ #include "pgsignals.h"
+ typedef PG_Signal0 PG_SignalFrameUpdate;
+ 
  /**
      @author Eric Ross, Alexander Pipelka
***************
*** 75,78 ****
--- 78,91 ----
        
        static void cb(SDL_Surface* dst, int x, int y, unsigned int w, unsigned 
int h);
+ 
+       PG_SignalFrameUpdate sigFrameUpdate;
+ protected:
+       /**
+       Called in every frame update
+ 
+       This function get called in every frame update. The current 
+       implementation is empty. Only for overloading in derived classes.
+       */
+       virtual void FrameUpdate();
  
  private:




reply via email to

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