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

NoteDisplay.h

Go to the documentation of this file.
00001 /* NoteDisplay - Draws TapNotes and HoldNotes. */ 00002 00003 #ifndef NOTEDISPLAY_H 00004 #define NOTEDISPLAY_H 00005 00006 #include "Sprite.h" 00007 class Model; 00008 #include "NoteTypes.h" 00009 00010 struct HoldNoteResult; 00011 struct NoteMetricCache_t; 00012 struct PlayerState; 00013 00014 class NoteDisplay 00015 { 00016 public: 00017 NoteDisplay(); 00018 ~NoteDisplay(); 00019 00020 void Load( int iColNum, const PlayerState* pPlayerState, CString NoteSkin, float fYReverseOffsetPixels ); 00021 00022 static void Update( float fDeltaTime ); 00023 00024 void DrawActor( Actor* pActor, int iCol, float fBeat, float fPercentFadeToFail, float fLife, float fReverseOffsetPixels, bool bUseLighting ); 00025 void DrawTap( int iCol, float fBeat, bool bOnSameRowAsHoldStart, bool bIsAddition, bool bIsMine, float fPercentFadeToFail, float fLife, float fReverseOffsetPixels ); 00026 void DrawHold( const TapNote& tn, int iCol, int iBeat, bool bIsBeingHeld, bool bIsActive, const HoldNoteResult &Result, float fPercentFadeToFail, bool bDrawGlowOnly, float fReverseOffsetPixels ); 00027 00028 bool DrawHoldHeadForTapsOnSameRow() const; 00029 00030 protected: 00031 void SetActiveFrame( float fNoteBeat, Actor &actorToSet, float fAnimationLengthInBeats, bool bVivid, bool bNoteColor ); 00032 Actor *GetTapNoteActor( float fNoteBeat ); 00033 Actor *GetTapAdditionActor( float fNoteBeat ); 00034 Actor *GetTapMineActor( float fNoteBeat ); 00035 Actor *GetHoldHeadActor( float fNoteBeat, bool bIsBeingHeld ); 00036 Actor* GetHoldTailActor( float fNoteBeat, bool bIsBeingHeld ); 00037 Sprite *GetHoldTopCapSprite( float fNoteBeat, bool bIsBeingHeld ); 00038 Sprite *GetHoldBodySprite( float fNoteBeat, bool bIsBeingHeld ); 00039 Sprite *GetHoldBottomCapSprite( float fNoteBeat, bool bIsBeingHeld ); 00040 00041 void DrawHoldBottomCap( const TapNote& tn, int iCol, int iBeat, const bool bIsBeingHeld, float fYHead, float fYTail, int fYStep, float fPercentFadeToFail, float fColorScale, bool bGlow ); 00042 void DrawHoldTopCap( const TapNote& tn, int iCol, int iBeat, const bool bIsBeingHeld, float fYHead, float fYTail, int fYStep, float fPercentFadeToFail, float fColorScale, bool bGlow ); 00043 void DrawHoldBody( const TapNote& tn, int iCol, int iBeat, const bool bIsBeingHeld, float fYHead, float fYTail, int fYStep, float fPercentFadeToFail, float fColorScale, bool bGlow ); 00044 void DrawHoldTail( const TapNote& tn, int iCol, int iBeat, const bool bIsBeingHeld, float fYTail, float fPercentFadeToFail, float fColorScale, bool bGlow ); 00045 void DrawHoldHead( const TapNote& tn, int iCol, int iBeat, const bool bIsBeingHeld, float fYHead, float fPercentFadeToFail, float fColorScale, bool bGlow ); 00046 00047 const PlayerState* m_pPlayerState; // to look up PlayerOptions 00048 00049 struct NoteMetricCache_t *cache; 00050 00051 #define NOTE_COLOR_IMAGES 8 00052 00053 Actor* m_pTapNote[NOTE_COLOR_IMAGES]; 00054 Actor* m_pTapAddition[NOTE_COLOR_IMAGES]; 00055 Actor* m_pTapMine[NOTE_COLOR_IMAGES]; 00056 Actor* m_pHoldHeadActive[NOTE_COLOR_IMAGES]; 00057 Actor* m_pHoldHeadInactive[NOTE_COLOR_IMAGES]; 00058 Sprite* m_pHoldTopCapActive[NOTE_COLOR_IMAGES]; 00059 Sprite* m_pHoldTopCapInactive[NOTE_COLOR_IMAGES]; 00060 Sprite* m_pHoldBodyActive[NOTE_COLOR_IMAGES]; 00061 Sprite* m_pHoldBodyInactive[NOTE_COLOR_IMAGES]; 00062 Sprite* m_pHoldBottomCapActive[NOTE_COLOR_IMAGES]; 00063 Sprite* m_pHoldBottomCapInactive[NOTE_COLOR_IMAGES]; 00064 Actor* m_pHoldTailActive[NOTE_COLOR_IMAGES]; 00065 Actor* m_pHoldTailInactive[NOTE_COLOR_IMAGES]; 00066 float m_fYReverseOffsetPixels; 00067 }; 00068 00069 #endif 00070 00071 /* 00072 * (c) 2001-2004 Brian Bugh, Ben Nordstrom, Chris Danford 00073 * All rights reserved. 00074 * 00075 * Permission is hereby granted, free of charge, to any person obtaining a 00076 * copy of this software and associated documentation files (the 00077 * "Software"), to deal in the Software without restriction, including 00078 * without limitation the rights to use, copy, modify, merge, publish, 00079 * distribute, and/or sell copies of the Software, and to permit persons to 00080 * whom the Software is furnished to do so, provided that the above 00081 * copyright notice(s) and this permission notice appear in all copies of 00082 * the Software and that both the above copyright notice(s) and this 00083 * permission notice appear in supporting documentation. 00084 * 00085 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00086 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00087 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00088 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00089 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00090 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00091 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00092 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00093 * PERFORMANCE OF THIS SOFTWARE. 00094 */

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