Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

ArrowEffects.h

Go to the documentation of this file.
00001 /* ArrowEffects - Functions that return properties of arrows based on Style and PlayerOptions. */ 00002 00003 #ifndef ARROWEFFECTS_H 00004 #define ARROWEFFECTS_H 00005 00006 struct PlayerState; 00007 00008 class ArrowEffects 00009 { 00010 public: 00011 00012 // fYOffset is a vertical position in pixels relative to the center. 00013 // (positive if has not yet been stepped on, negative if has already passed). 00014 // The ArrowEffect and ScrollSpeed is applied in this stage. 00015 static float GetYOffset( const PlayerState* pPlayerState, int iCol, float fNoteBeat, bool bAbsolute=false ); 00016 00017 /* Actual display position, with reverse and post-reverse-effects factored in 00018 * (fYOffset -> YPos). */ 00019 static float GetYPos( const PlayerState* pPlayerState, int iCol, float fYOffset, float fYReverseOffsetPixels, bool WithReverse = true ); 00020 00021 // Inverse of ArrowGetYPos (YPos -> fYOffset). 00022 static float GetYOffsetFromYPos( const PlayerState* pPlayerState, int iCol, float YPos, float fYReverseOffsetPixels ); 00023 00024 00025 // fRotation is Z rotation of an arrow. This will depend on the column of 00026 // the arrow and possibly the Arrow effect and the fYOffset (in the case of 00027 // EFFECT_DIZZY). 00028 static float GetRotation( const PlayerState* pPlayerState, float fNoteBeat ); 00029 00030 00031 // fXPos is a horizontal position in pixels relative to the center of the field. 00032 // This depends on the column of the arrow and possibly the Arrow effect and 00033 // fYPos (in the case of EFFECT_DRUNK). 00034 static float GetXPos( const PlayerState* pPlayerState, int iCol, float fYOffset ); 00035 00036 // Z position; normally 0. Only visible in perspective modes. 00037 static float GetZPos( const PlayerState* pPlayerState, int iCol, float fYPos ); 00038 00039 // Enable this if any ZPos effects are enabled. 00040 static bool NeedZBuffer( const PlayerState* pPlayerState ); 00041 00042 // fAlpha is the transparency of the arrow. It depends on fYPos and the 00043 // AppearanceType. 00044 static float GetAlpha( const PlayerState* pPlayerState, int iCol, float fYPos, float fPercentFadeToFail, float fYReverseOffsetPixels ); 00045 00046 00047 // fAlpha is the transparency of the arrow. It depends on fYPos and the 00048 // AppearanceType. 00049 static float GetGlow( const PlayerState* pPlayerState, int iCol, float fYPos, float fPercentFadeToFail, float fYReverseOffsetPixels ); 00050 00051 00052 // Depends on fYOffset. 00053 static float GetBrightness( const PlayerState* pPlayerState, float fNoteBeat ); 00054 00055 // This is the zoom of the individual tracks, not of the whole Player. 00056 static float GetZoom( const PlayerState* pPlayerState ); 00057 }; 00058 00059 #endif 00060 00061 /* 00062 * (c) 2001-2004 Chris Danford 00063 * All rights reserved. 00064 * 00065 * Permission is hereby granted, free of charge, to any person obtaining a 00066 * copy of this software and associated documentation files (the 00067 * "Software"), to deal in the Software without restriction, including 00068 * without limitation the rights to use, copy, modify, merge, publish, 00069 * distribute, and/or sell copies of the Software, and to permit persons to 00070 * whom the Software is furnished to do so, provided that the above 00071 * copyright notice(s) and this permission notice appear in all copies of 00072 * the Software and that both the above copyright notice(s) and this 00073 * permission notice appear in supporting documentation. 00074 * 00075 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00076 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00077 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00078 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00079 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00080 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00081 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00082 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00083 * PERFORMANCE OF THIS SOFTWARE. 00084 */

Generated on Thu Jan 27 20:57:18 2005 for StepMania by doxygen 1.3.7