Code cleanup

Move enums for max SI and EXI devices to their respective .h file, and rename them.

Use only those enums in BootManager.cpp. Same thing in Movie.cpp

Change one instance of MAX_BBMOTES to MAX_WIIMOTES in Movie.cpp, since movies do not support balance board.
This commit is contained in:
Rachel Bryk committed 2014-01-08 20:36:27 -05:00
1 parent 3046d0e701
commit 48470a20ca
6 files changed
+51 -45

No files matched your search

+6 -11
View File
@@ -20,16 +20,11 @@ namespace ExpansionInterface
static int changeDevice;
enum
{
NUM_CHANNELS = 3
};
CEXIChannel *g_Channels[NUM_CHANNELS];
CEXIChannel *g_Channels[MAX_EXI_CHANNELS];
void Init()
{
initSRAM();
for (u32 i = 0; i < NUM_CHANNELS; i++)
for (u32 i = 0; i < MAX_EXI_CHANNELS; i++)
g_Channels[i] = new CEXIChannel(i);
if (Movie::IsPlayingInput() && Movie::IsUsingMemcard() && Movie::IsConfigSaved())
@@ -111,9 +106,9 @@ void Read32(u32& _uReturnValue, const u32 _iAddress)
u32 iRegister = (iAddr >> 2) % 5;
u32 iChannel = (iAddr >> 2) / 5;
_dbg_assert_(EXPANSIONINTERFACE, iChannel < NUM_CHANNELS);
_dbg_assert_(EXPANSIONINTERFACE, iChannel < MAX_EXI_CHANNELS);
if (iChannel < NUM_CHANNELS)
if (iChannel < MAX_EXI_CHANNELS)
{
g_Channels[iChannel]->Read32(_uReturnValue, iRegister);
}
@@ -130,9 +125,9 @@ void Write32(const u32 _iValue, const u32 _iAddress)
u32 iRegister = (iAddr >> 2) % 5;
u32 iChannel = (iAddr >> 2) / 5;
_dbg_assert_(EXPANSIONINTERFACE, iChannel < NUM_CHANNELS);
_dbg_assert_(EXPANSIONINTERFACE, iChannel < MAX_EXI_CHANNELS);
if (iChannel < NUM_CHANNELS)
if (iChannel < MAX_EXI_CHANNELS)
g_Channels[iChannel]->Write32(_iValue, iRegister);
}