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
|
|
|
|
2003-09-12 06:23:51 +00:00
|
|
|
void Load( int iColNum, PlayerNumber pn, CString NoteSkin, float fYReverseOffsetPixels );
|
2002-08-13 23:26:46 +00:00
|
|
|
|
2003-08-16 23:34:47 +00:00
|
|
|
void DrawTap( int iCol, float fBeat, bool bOnSameRowAsHoldStart, bool bIsAddition, bool bIsMine, float fPercentFadeToFail, float fLife, float fReverseOffsetPixels );
|
|
|
|
|
void DrawHold( const HoldNote& hn, bool bActive, float fLife, float fPercentFadeToFail, bool bDrawGlowOnly, float fReverseOffsetPixels );
|
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 );
|
2003-08-10 06:00:30 +00:00
|
|
|
Actor *GetTapAdditionActor( float fNoteBeat );
|
2003-08-10 10:12:50 +00:00
|
|
|
Actor *GetTapMineActor( float fNoteBeat );
|
2003-05-09 04:42:04 +00:00
|
|
|
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-09-12 02:44:14 +00:00
|
|
|
Actor* m_pTapNote[NOTE_COLOR_IMAGES];
|
|
|
|
|
Actor* m_pTapAddition;
|
|
|
|
|
Actor* m_pTapMine;
|
|
|
|
|
Actor* m_pHoldHeadActive[NOTE_COLOR_IMAGES];
|
|
|
|
|
Actor* m_pHoldHeadInactive[NOTE_COLOR_IMAGES];
|
|
|
|
|
Sprite m_sprHoldTopCapActive[NOTE_COLOR_IMAGES];
|
|
|
|
|
Sprite m_sprHoldTopCapInactive[NOTE_COLOR_IMAGES];
|
|
|
|
|
Sprite m_sprHoldBodyActive[NOTE_COLOR_IMAGES];
|
|
|
|
|
Sprite m_sprHoldBodyInactive[NOTE_COLOR_IMAGES];
|
|
|
|
|
Sprite m_sprHoldBottomCapActive[NOTE_COLOR_IMAGES];
|
|
|
|
|
Sprite m_sprHoldBottomCapInactive[NOTE_COLOR_IMAGES];
|
|
|
|
|
Actor* m_pHoldTailActive[NOTE_COLOR_IMAGES];
|
|
|
|
|
Actor* m_pHoldTailInactive[NOTE_COLOR_IMAGES];
|
2003-09-04 05:27:43 +00:00
|
|
|
float m_fYReverseOffsetPixels;
|
2002-08-13 23:26:46 +00:00
|
|
|
};
|
2002-11-16 08:07:38 +00:00
|
|
|
|
|
|
|
|
#endif
|