00001
00002
00003
#ifndef NOTE_FIELD_H
00004
#define NOTE_FIELD_H
00005
00006
#include "Sprite.h"
00007
#include "ActorFrame.h"
00008
#include "BitmapText.h"
00009
#include "PrefsManager.h"
00010
#include "BitmapText.h"
00011
#include "Quad.h"
00012
#include "NoteData.h"
00013
#include "NoteDisplay.h"
00014
#include "ReceptorArrowRow.h"
00015
#include "GhostArrowRow.h"
00016
00017 class NoteField :
public ActorFrame
00018 {
00019
public:
00020
NoteField();
00021
~NoteField();
00022
virtual void Update(
float fDeltaTime );
00023
virtual void DrawPrimitives();
00024
00025
virtual void Load(
00026
const NoteData* pNoteData,
00027
const PlayerState* pPlayerState,
00028
int iStartDrawingPixel,
00029
int iEndDrawingPixel,
00030
float fYReverseOffsetPixels );
00031
virtual void Unload();
00032
00033 int m_iBeginMarker,
m_iEndMarker;
00034
00035
void FadeToFail();
00036
void CacheAllUsedNoteSkins(
bool bDeleteUnused );
00037
void CacheNoteSkin( CString skin );
00038
00039
void Step(
int iCol, TapNoteScore score );
00040
void SetPressed(
int iCol );
00041
void DidTapNote(
int iCol, TapNoteScore score,
bool bBright );
00042
void DidHoldNote(
int iCol );
00043
00044
00045
protected:
00046
void DrawBeatBar(
const float fBeat );
00047
void DrawMarkerBar(
int fBeat );
00048
void DrawAreaHighlight(
int iStartBeat,
int iEndBeat );
00049
void DrawBPMText(
const float fBeat,
const float fBPM );
00050
void DrawFreezeText(
const float fBeat,
const float fBPM );
00051
void DrawBGChangeText(
const float fBeat,
const CString sNewBGName );
00052
float GetWidth();
00053
00054
void RefreshBeatToNoteSkin();
00055
00056 const NoteData *
m_pNoteData;
00057
00058 float m_fPercentFadeToFail;
00059
00060 const PlayerState*
m_pPlayerState;
00061 int m_iStartDrawingPixel;
00062 int m_iEndDrawingPixel;
00063 float m_fYReverseOffsetPixels;
00064
00065
00066 struct NoteDisplayCols
00067 {
00068 NoteDisplay *
display;
00069 ReceptorArrowRow m_ReceptorArrowRow;
00070 GhostArrowRow m_GhostArrowRow;
00071 NoteDisplayCols(
int iNumCols ) {
display =
new NoteDisplay[iNumCols]; }
00072 ~NoteDisplayCols() {
delete []
display; }
00073 };
00074
00075
00076 map<CString, NoteDisplayCols *>
m_NoteDisplays;
00077
00078 int m_LastSeenBeatToNoteSkinRev;
00079
00080
00081 typedef map<float, NoteDisplayCols *>
NDMap;
00082
void SearchForBeat( NDMap::iterator &cur, NDMap::iterator &next,
float Beat );
00083
NoteDisplayCols *SearchForBeat(
float Beat );
00084
NoteDisplayCols *
SearchForSongBeat();
00085
00086 NDMap m_BeatToNoteDisplays;
00087
00088 NoteDisplayCols *
LastDisplay;
00089
00090
00091 Sprite m_sprBars;
00092 BitmapText m_textMeasureNumber;
00093 Quad m_rectMarkerBar;
00094 Quad m_rectAreaHighlight;
00095 };
00096
00097
#endif
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122