better memory card assignment logic, add memory card icons, more memory card sounds
This commit is contained in:
@@ -0,0 +1,43 @@
|
|||||||
|
#include "global.h"
|
||||||
|
#include "MemoryCardDisplay.h"
|
||||||
|
#include "ThemeManager.h"
|
||||||
|
#include "MemoryCardManager.h"
|
||||||
|
|
||||||
|
|
||||||
|
MemoryCardDisplay::MemoryCardDisplay()
|
||||||
|
{
|
||||||
|
m_PlayerNumber = PLAYER_INVALID;
|
||||||
|
m_LastSeenState = MEMORY_CARD_STATE_INVALID;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MemoryCardDisplay::Load( PlayerNumber pn )
|
||||||
|
{
|
||||||
|
m_PlayerNumber = pn;
|
||||||
|
|
||||||
|
for( int i=0; i<NUM_MEMORY_CARD_STATES; i++ )
|
||||||
|
{
|
||||||
|
MemoryCardState mcs = (MemoryCardState)i;
|
||||||
|
CString sState = MemoryCardStateToString(mcs);
|
||||||
|
m_spr[i].Load( THEME->GetPathToG(ssprintf("MemoryCardDisplay %s p%d",sState.c_str(),pn+1)) );
|
||||||
|
m_spr[i].SetHidden( true );
|
||||||
|
this->AddChild( &m_spr[i] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MemoryCardDisplay::Update( float fDelta )
|
||||||
|
{
|
||||||
|
MemoryCardState newMcs = MEMCARDMAN->GetCardState(m_PlayerNumber);
|
||||||
|
if( m_LastSeenState != newMcs )
|
||||||
|
{
|
||||||
|
m_spr[m_LastSeenState].SetHidden( true );
|
||||||
|
m_LastSeenState = newMcs;
|
||||||
|
m_spr[m_LastSeenState].SetHidden( false );
|
||||||
|
}
|
||||||
|
|
||||||
|
ActorFrame::Update( fDelta );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Copyright (c) 2003 by the person(s) listed below. All rights reserved.
|
||||||
|
Chris Danford
|
||||||
|
*/
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
#ifndef MEMORY_CARD_DISPLAY_H
|
||||||
|
#define MEMORY_CARD_DISPLAY_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
File: MemoryCardDisplay.h
|
||||||
|
|
||||||
|
Desc: A graphic displayed on the screen during dance
|
||||||
|
|
||||||
|
Copyright (c) 2003 by the person(s) listed below. All rights reserved.
|
||||||
|
Chris Danford
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "GameConstantsAndTypes.h"
|
||||||
|
#include "PlayerNumber.h"
|
||||||
|
#include "Sprite.h"
|
||||||
|
#include "ActorFrame.h"
|
||||||
|
|
||||||
|
|
||||||
|
class MemoryCardDisplay : public ActorFrame
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MemoryCardDisplay();
|
||||||
|
void Load( PlayerNumber pn );
|
||||||
|
void Update( float fDelta );
|
||||||
|
|
||||||
|
protected:
|
||||||
|
PlayerNumber m_PlayerNumber;
|
||||||
|
MemoryCardState m_LastSeenState;
|
||||||
|
Sprite m_spr[NUM_MEMORY_CARD_STATES];
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user