2002-11-16 08:07:38 +00:00
|
|
|
#ifndef NOTEDISPLAY_H
|
|
|
|
|
#define NOTEDISPLAY_H
|
2002-08-13 23:26:46 +00:00
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
Class: NoteDisplay
|
|
|
|
|
|
|
|
|
|
Desc: Draws TapNotes and HoldNotes.
|
|
|
|
|
|
|
|
|
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
|
|
|
|
Brian Bugh
|
|
|
|
|
Ben Nordstrom
|
|
|
|
|
Chris Danford
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "Sprite.h"
|
2003-05-09 04:42:04 +00:00
|
|
|
#include "Model.h"
|
2002-08-13 23:26:46 +00:00
|
|
|
#include "NoteTypes.h"
|
2003-02-26 00:20:00 +00:00
|
|
|
#include "PlayerNumber.h"
|
2002-08-13 23:26:46 +00:00
|
|
|
|
|
|
|
|
|
2003-02-08 23:47:47 +00:00
|
|
|
struct NoteMetricCache_t;
|
|
|
|
|
|
2002-08-13 23:26:46 +00:00
|
|
|
class NoteDisplay
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
NoteDisplay();
|
2003-02-08 23:47:47 +00:00
|
|
|
~NoteDisplay();
|
2002-08-13 23:26:46 +00:00
|
|
|
|
|
|
|
|
void Load( int iColNum, PlayerNumber pn );
|
|
|
|
|
|
2002-09-17 23:02:37 +00:00
|
|
|
void DrawTap( const int iCol, const float fBeat, const bool bOnSameRowAsHoldStart, const float fPercentFadeToFail, const float fLife = 1 );
|
2002-08-29 01:38:21 +00:00
|
|
|
void DrawHold( const HoldNote& hn, const bool bActive, const float fLife, const float fPercentFadeToFail, bool bDrawGlowOnly = false );
|
2002-08-13 23:26:46 +00:00
|
|
|
|
|
|
|
|
protected:
|
2003-05-09 04:42:04 +00:00
|
|
|
void SetActiveFrame( float fNoteBeat, Actor &actorToSet, float fAnimationLengthInBeats, bool bVivid, bool bNoteColor );
|
|
|
|
|
Actor *GetTapNoteActor( float fNoteBeat );
|
|
|
|
|
Actor *GetHoldHeadActor( float fNoteBeat, bool bActive );
|
2003-07-09 05:57:48 +00:00
|
|
|
Actor* GetHoldTailActor( float fNoteBeat, bool bActive );
|
2003-02-08 23:47:47 +00:00
|
|
|
Sprite *GetHoldTopCapSprite( float fNoteBeat, bool bActive );
|
|
|
|
|
Sprite *GetHoldBodySprite( float fNoteBeat, bool bActive );
|
|
|
|
|
Sprite *GetHoldBottomCapSprite( float fNoteBeat, bool bActive );
|
2002-08-13 23:26:46 +00:00
|
|
|
|
2003-07-17 06:10:25 +00:00
|
|
|
void DrawHoldBottomCap( const HoldNote& hn, const bool bActive, float fYHead, float fYTail, int fYStep, int iCol, float fPercentFadeToFail, float fColorScale, bool bGlow );
|
|
|
|
|
void DrawHoldTopCap( const HoldNote& hn, const bool bActive, float fYHead, float fYTail, int fYStep, int iCol, float fPercentFadeToFail, float fColorScale, bool bGlow );
|
|
|
|
|
void DrawHoldBody( const HoldNote& hn, const bool bActive, float fYHead, float fYTail, int fYStep, int iCol, float fPercentFadeToFail, float fColorScale, bool bGlow );
|
|
|
|
|
void DrawHoldTail( const HoldNote& hn, const bool bActive, float fYTail, int iCol, float fPercentFadeToFail, float fColorScale, bool bGlow );
|
|
|
|
|
void DrawHoldHead( const HoldNote& hn, const bool bActive, float fYHead, int iCol, float fPercentFadeToFail, float fColorScale, bool bGlow );
|
|
|
|
|
|
2002-08-13 23:26:46 +00:00
|
|
|
PlayerNumber m_PlayerNumber; // to look up PlayerOptions
|
|
|
|
|
|
2003-02-08 23:47:47 +00:00
|
|
|
struct NoteMetricCache_t *cache;
|
|
|
|
|
|
2003-02-06 07:32:57 +00:00
|
|
|
#define NOTE_COLOR_IMAGES 6
|
|
|
|
|
|
2003-05-09 04:42:04 +00:00
|
|
|
Actor* m_pTapNote[NOTE_COLOR_IMAGES];
|
|
|
|
|
Actor* m_pHoldHeadActive[NOTE_COLOR_IMAGES];
|
|
|
|
|
Actor* m_pHoldHeadInactive[NOTE_COLOR_IMAGES];
|
2003-02-08 23:47:47 +00:00
|
|
|
Sprite m_sprHoldTopCapActive[NOTE_COLOR_IMAGES];
|
|
|
|
|
Sprite m_sprHoldTopCapInactive[NOTE_COLOR_IMAGES];
|
2003-02-06 07:32:57 +00:00
|
|
|
Sprite m_sprHoldBodyActive[NOTE_COLOR_IMAGES];
|
|
|
|
|
Sprite m_sprHoldBodyInactive[NOTE_COLOR_IMAGES];
|
2003-02-08 23:47:47 +00:00
|
|
|
Sprite m_sprHoldBottomCapActive[NOTE_COLOR_IMAGES];
|
|
|
|
|
Sprite m_sprHoldBottomCapInactive[NOTE_COLOR_IMAGES];
|
2003-07-09 05:57:48 +00:00
|
|
|
Actor* m_pHoldTailActive[NOTE_COLOR_IMAGES];
|
|
|
|
|
Actor* m_pHoldTailInactive[NOTE_COLOR_IMAGES];
|
2002-08-13 23:26:46 +00:00
|
|
|
};
|
2002-11-16 08:07:38 +00:00
|
|
|
|
|
|
|
|
#endif
|