memory card refactoring
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
*/
|
||||
#include "PlayerNumber.h"
|
||||
|
||||
struct UsbStorageDevice;
|
||||
class MemoryCardDriver;
|
||||
|
||||
class MemoryCardManager
|
||||
{
|
||||
public:
|
||||
@@ -19,6 +22,22 @@ public:
|
||||
~MemoryCardManager();
|
||||
|
||||
void Update( float fDelta );
|
||||
|
||||
enum CardState { ready, too_late, write_error, no_card };
|
||||
|
||||
CardState GetCardState( PlayerNumber pn );
|
||||
|
||||
CString GetOsMountDir( PlayerNumber pn ); // only valid when ready
|
||||
|
||||
void LockCards( bool bLock ); // prevent removing or changing of memory cards
|
||||
|
||||
protected:
|
||||
MemoryCardDriver *m_pDriver;
|
||||
|
||||
bool m_bCardsLocked;
|
||||
bool m_bTooLate[NUM_PLAYERS]; // card was inserted after lock
|
||||
bool m_bWriteError[NUM_PLAYERS]; // couldn't write to the card
|
||||
UsbStorageDevice* m_pDevice[NUM_PLAYERS]; // device in the memory card slot, NULL if none
|
||||
};
|
||||
|
||||
extern MemoryCardManager* MEMCARDMAN; // global and accessable from anywhere in our program
|
||||
|
||||
Reference in New Issue
Block a user