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 00010 /*!**************************************************************************** 00011 * \file shake.h 00012 * \author Raj Sharma, roos@allacrost.org 00013 * \date Last Updated: November 7th, 2005 00014 * \brief Header file for ShakeForce class 00015 * 00016 * The ShakeForce class holds information about a screen shake, and is used 00017 * by the video engine to keep track of how to shake the screen 00018 *****************************************************************************/ 00019 00020 #ifndef __SHAKE_HEADER__ 00021 #define __SHAKE_HEADER__ 00022 00023 #include "defs.h" 00024 #include "utils.h" 00025 00026 00027 namespace hoa_video 00028 { 00029 00030 00031 /*!*************************************************************************** 00032 * \brief An enumeration of shake falloff modes.which controls how quickly the 00033 * shaking dies down when you do a screen shake. 00034 *****************************************************************************/ 00035 00036 enum ShakeFalloff 00037 { 00038 VIDEO_FALLOFF_INVALID = -1, 00039 00041 VIDEO_FALLOFF_NONE = 0, 00042 00044 VIDEO_FALLOFF_EASE = 1, 00045 00047 VIDEO_FALLOFF_LINEAR = 2, 00048 00050 VIDEO_FALLOFF_GRADUAL = 3, 00051 00053 VIDEO_FALLOFF_SUDDEN = 4, 00054 00055 VIDEO_FALLOFF_TOTAL = 5 00056 }; 00057 00058 00059 namespace private_video 00060 { 00061 00062 /*!*************************************************************************** 00063 * \brief every time ShakeScreen() is called, a new ShakeForce is created 00064 * to represent the force of that particular shake 00065 *****************************************************************************/ 00066 00067 class ShakeForce 00068 { 00069 public: 00070 00072 float initial_force; 00073 00075 Interpolator interpolator; 00076 00078 int32 current_time; 00079 00081 int32 end_time; 00082 }; 00083 00084 00085 } // namespace private_video 00086 } // namespace hoa_video 00087 00088 #endif // !__SHAKE_HEADER__
1.5.1