kljhfdkjhfjkhdfkjf
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
#include "stdafx.h"
|
||||
//
|
||||
// HoldGhostArrow.cpp: implementation of the GhostArrow class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "HoldGhostArrow.h"
|
||||
|
||||
|
||||
const CString HOLD_GHOST_ARROW_SPRITE = "Sprites\\Hold Ghost Arrow.sprite";
|
||||
const float HOLD_GHOST_ARROW_TWEEN_TIME = 0.5f;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
HoldGhostArrow::HoldGhostArrow()
|
||||
{
|
||||
m_bWasSteppedOnLastFrame = false;
|
||||
m_fHeatLevel = 0;
|
||||
|
||||
LoadFromSpriteFile( HOLD_GHOST_ARROW_SPRITE );
|
||||
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
||||
SetZoom( 1.1f );
|
||||
}
|
||||
|
||||
void HoldGhostArrow::Update( float fDeltaTime )
|
||||
{
|
||||
Sprite::Update( fDeltaTime );
|
||||
|
||||
if( m_bWasSteppedOnLastFrame )
|
||||
{
|
||||
m_fHeatLevel += fDeltaTime * 4;
|
||||
if( m_fHeatLevel >= 1 )
|
||||
m_fHeatLevel = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_fHeatLevel -= fDeltaTime * 4;
|
||||
if( m_fHeatLevel < 0 )
|
||||
m_fHeatLevel = 0;
|
||||
}
|
||||
|
||||
int iStateNum = min( m_fHeatLevel * GetNumStates(), GetNumStates()-1 );
|
||||
SetState( iStateNum );
|
||||
|
||||
SetDiffuseColor( D3DXCOLOR(1,1,1,m_fHeatLevel*3) );
|
||||
|
||||
m_bWasSteppedOnLastFrame = false; // reset for next frame
|
||||
}
|
||||
|
||||
void HoldGhostArrow::SetBeat( const float fSongBeat )
|
||||
{
|
||||
//SetState( fmod(fSongBeat,1)<0.25 ? 1 : 0 );
|
||||
}
|
||||
|
||||
void HoldGhostArrow::Step()
|
||||
{
|
||||
m_bWasSteppedOnLastFrame = true;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
File: HoldGhostArrow.h
|
||||
|
||||
Desc: Class used to represent a color arrow on the screen.
|
||||
|
||||
Copyright (c) 2001 Ben Norstrom. All rights reserved.
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
class HoldGhostArrow;
|
||||
|
||||
#ifndef _HoldGhostArrow_H_
|
||||
#define _HoldGhostArrow_H_
|
||||
|
||||
|
||||
#include "Sprite.h"
|
||||
#include "Steps.h"
|
||||
|
||||
|
||||
class HoldGhostArrow : public Sprite
|
||||
{
|
||||
public:
|
||||
HoldGhostArrow();
|
||||
|
||||
void Update( float fDeltaTime );
|
||||
|
||||
void SetBeat( const float fSongBeat );
|
||||
void Step();
|
||||
|
||||
bool m_bWasSteppedOnLastFrame;
|
||||
float m_fHeatLevel; // effects brightness of electricity - between 0 and 1
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "Sprite.h"
|
||||
#include "RageTextureManager.h"
|
||||
#include "GameInfo.h"
|
||||
#include "IniFile.h"
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
@@ -43,7 +44,10 @@ void Sprite::Init()
|
||||
m_fVibrationDistance = 5.0f ;
|
||||
m_bVisibleThisFrame = FALSE;
|
||||
|
||||
m_bHasShadow = true;
|
||||
if( GAMEINFO )
|
||||
m_bHasShadow = GAMEINFO->m_GameOptions.m_bShadows;
|
||||
else
|
||||
m_bHasShadow = true;
|
||||
}
|
||||
|
||||
Sprite::~Sprite()
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
File: StepMania.h
|
||||
|
||||
Desc:
|
||||
|
||||
Copyright (c) 2001 Chris Danford. All rights reserved.
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef _STEPMANIA_H_
|
||||
#define _STEPMANIA_H_
|
||||
|
||||
|
||||
void Update(); // Update the game logic
|
||||
void Render(); // Render a frame
|
||||
void ShowFrame(); // Display the contents of the back buffer to the screen
|
||||
void SetFullscreen( BOOL bFullscreen ); // Switch between fullscreen and windowed modes.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user