fade.h

Go to the documentation of this file.
00001 
00002 //            Copyright (C) 2004-2007 by The Allacrost Project
00003 //                         All Rights Reserved
00004 //
00005 // This code is licensed under the GNU GPL version 2. It is free software 
00006 // and you may modify it and/or redistribute it under the terms of this license.
00007 // See http://www.gnu.org/copyleft/gpl.html for details.
00009 
00016 #ifndef __FADE_HEADER__
00017 #define __FADE_HEADER__
00018 
00019 #include "defs.h"
00020 #include "utils.h"
00021 #include "color.h"
00022 
00023 namespace hoa_video {
00024 
00025 namespace private_video {
00026 
00037 class ScreenFader {
00038 public:
00039   ScreenFader();
00040   
00047   void FadeTo(const Color &final, float num_seconds);
00048 
00052   void Update(int32 t);
00053 
00055   bool ShouldUseFadeOverlay() const
00056     { return use_fade_overlay; }
00057 
00058   Color GetFadeOverlayColor() const
00059     { return fade_overlay_color; }
00060 
00061   float GetFadeModulation() const
00062     { return fade_modulation; }
00063 
00064   bool IsFading() const
00065     { return is_fading; }
00066 
00068   Color current_color;
00069 
00071   Color initial_color;
00072 
00074   Color final_color;
00075 
00077   int32 current_time;
00078 
00080   int32 end_time;
00081 
00083   bool is_fading;
00084   
00086   bool use_fade_overlay;
00087 
00089   Color fade_overlay_color;
00090 
00092   float fade_modulation;
00094 }; // class ScreenFader
00095 
00096 } // namespace private_video
00097 
00098 } // namespace hoa_video
00099 
00100 #endif // __FADE_HEADER__

Generated on Fri Jul 6 23:11:14 2007 for Hero of Allacrost by  doxygen 1.5.1