Files
itgmania212121/stepmania/src/GrooveRadar.h
T

86 lines
2.6 KiB
C++
Raw Normal View History

2004-06-07 21:14:03 +00:00
/* GrooveRadar - The song's GrooveRadar displayed in SelectSong. */
2002-03-31 07:55:25 +00:00
2004-06-07 21:14:03 +00:00
#ifndef GROOVE_RADAR_H
#define GROOVE_RADAR_H
2002-03-31 07:55:25 +00:00
#include "ActorFrame.h"
#include "Sprite.h"
2003-04-02 04:41:49 +00:00
#include "PlayerNumber.h"
#include "GameConstantsAndTypes.h"
2003-08-03 00:13:55 +00:00
class Steps;
2006-08-16 22:55:14 +00:00
struct RadarValues;
2002-03-31 07:55:25 +00:00
class GrooveRadar : public ActorFrame
{
public:
2002-04-16 17:31:00 +00:00
GrooveRadar();
2006-10-20 00:17:51 +00:00
virtual GrooveRadar *Copy() const;
virtual void LoadFromNode( const XNode* pNode );
2002-03-31 07:55:25 +00:00
2006-08-16 22:55:14 +00:00
void SetEmpty( PlayerNumber pn );
void SetFromRadarValues( PlayerNumber pn, const RadarValues &rv );
void SetFromSteps( PlayerNumber pn, Steps* pSteps ); // NULL means no Steps
2002-04-16 17:31:00 +00:00
void TweenOnScreen();
void TweenOffScreen();
2002-03-31 07:55:25 +00:00
2006-08-16 22:55:14 +00:00
// Lua
void PushSelf( lua_State *L );
2002-03-31 07:55:25 +00:00
protected:
2002-04-16 17:31:00 +00:00
2002-05-19 01:59:48 +00:00
// the value map must be a separate Actor so we can tween it separately from the labels
class GrooveRadarValueMap : public ActorFrame
{
public:
GrooveRadarValueMap();
2002-04-16 17:31:00 +00:00
2002-05-19 01:59:48 +00:00
virtual void Update( float fDeltaTime );
virtual void DrawPrimitives();
2006-08-16 22:55:14 +00:00
void SetEmpty();
void SetFromSteps( const RadarValues &rv );
2002-05-19 01:59:48 +00:00
2005-08-31 04:00:42 +00:00
void SetRadius( float f ) { m_size.x = f; m_size.y = f; }
2002-05-19 01:59:48 +00:00
2005-08-31 04:00:42 +00:00
bool m_bValuesVisible;
float m_PercentTowardNew;
2006-01-07 04:11:29 +00:00
float m_fValuesNew[NUM_RadarCategory];
float m_fValuesOld[NUM_RadarCategory];
2002-05-19 01:59:48 +00:00
2005-08-31 04:00:42 +00:00
PlayerNumber m_PlayerNumber;
2002-05-19 01:59:48 +00:00
};
2005-08-31 04:00:42 +00:00
Sprite m_sprRadarBase;
GrooveRadarValueMap m_GrooveRadarValueMap[NUM_PLAYERS];
2006-01-07 04:11:29 +00:00
Sprite m_sprRadarLabels[NUM_RadarCategory];
2005-08-31 04:00:42 +00:00
ActorFrame m_Frame;
2002-03-31 07:55:25 +00:00
};
#endif
2004-06-07 21:14:03 +00:00
/*
* (c) 2001-2004 Chris Danford
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, and/or sell copies of the Software, and to permit persons to
* whom the Software is furnished to do so, provided that the above
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/