memory card refactoring

This commit is contained in:
Chris Danford
2003-12-17 10:20:53 +00:00
parent 23623a1c64
commit e11afda65a
13 changed files with 531 additions and 307 deletions
+19
View File
@@ -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