fix gcc compiling

This commit is contained in:
zeromus 2009-09-21 17:10:52 +00:00
parent 523d2713f9
commit 14c011d8de
3 changed files with 18 additions and 15 deletions

View File

@ -1904,10 +1904,11 @@ bool DmaController::loadstate(EMUFILE* f)
read8le(&enable,f); read8le(&irq,f); read8le(&repeatMode,f); read8le(&_startmode,f);
read8le(&userEnable,f);
read32le(&wordcount,f);
readle(&startmode,f);
readle(&bitWidth,f);
readle(&sar,f);
readle(&dar,f);
u8 temp;
read8le(&temp,f); startmode = (EDMAMode)temp;
read8le(&temp,f); bitWidth = (EDMABitWidth)temp;
read8le(&temp,f); sar = (EDMASourceUpdate)temp;
read8le(&temp,f); dar = (EDMADestinationUpdate)temp;
read32le(&saddr,f); read32le(&daddr,f);
read32le(&check,f); read32le(&running,f); read32le(&paused,f); read32le(&triggered,f);
read64le(&nextEvent,f);

View File

@ -38,7 +38,7 @@
typedef const u8 TWaitState;
enum EDMAMode : u8
enum EDMAMode
{
EDMAMode_Immediate = 0,
EDMAMode_VBlank = 1,
@ -52,13 +52,13 @@ enum EDMAMode : u8
EDMAMode7_GBASlot = 9,
};
enum EDMABitWidth : u8
enum EDMABitWidth
{
EDMABitWidth_16 = 0,
EDMABitWidth_32 = 1
};
enum EDMASourceUpdate : u8
enum EDMASourceUpdate
{
EDMASourceUpdate_Increment = 0,
EDMASourceUpdate_Decrement = 1,
@ -66,7 +66,7 @@ enum EDMASourceUpdate : u8
EDMASourceUpdate_Invalid = 3,
};
enum EDMADestinationUpdate : u8
enum EDMADestinationUpdate
{
EDMADestinationUpdate_Increment = 0,
EDMADestinationUpdate_Decrement = 1,

View File

@ -32,6 +32,15 @@ int write16le(u16 b, EMUFILE* os);
int write32le(u32 b, EMUFILE* os);
int write64le(u64 b, EMUFILE* os);
int read8le(u8 *Bufo, EMUFILE*is);
int read16le(u16 *Bufo, EMUFILE*is);
inline int read16le(s16 *Bufo, EMUFILE*is) { return read16le((u16*)Bufo,is); }
int read32le(u32 *Bufo, EMUFILE*is);
inline int read32le(s32 *Bufo, EMUFILE*is) { return read32le((u32*)Bufo,is); }
int read64le(u64 *Bufo, EMUFILE*is);
int read16le(u16 *Bufo, std::istream *is);
template<typename T>
int readle(T *Bufo, EMUFILE*is)
{
@ -47,13 +56,6 @@ int readle(T *Bufo, EMUFILE*is)
}
int read8le(u8 *Bufo, EMUFILE*is);
int read16le(u16 *Bufo, EMUFILE*is);
inline int read16le(s16 *Bufo, EMUFILE*is) { return read16le((u16*)Bufo,is); }
int read32le(u32 *Bufo, EMUFILE*is);
inline int read32le(s32 *Bufo, EMUFILE*is) { return read32le((u32*)Bufo,is); }
int read64le(u64 *Bufo, EMUFILE*is);
int read16le(u16 *Bufo, std::istream *is);
int readbool(bool *b, EMUFILE* is);
void writebool(bool b, EMUFILE* os);