Refactor : WORD -> uint16_t

This commit is contained in:
Aaron Culliney 2015-06-07 11:37:17 -07:00
parent 4b28e33906
commit 6d252b0b3e
4 changed files with 14 additions and 15 deletions

View File

@ -151,13 +151,13 @@ static inline bool SUCCEEDED(int x) { return x == DS_OK; }
typedef struct { typedef struct {
WORD wFormatTag; uint16_t wFormatTag;
WORD nChannels; uint16_t nChannels;
DWORD nSamplesPerSec; DWORD nSamplesPerSec;
DWORD nAvgBytesPerSec; DWORD nAvgBytesPerSec;
WORD nBlockAlign; uint16_t nBlockAlign;
WORD wBitsPerSample; uint16_t wBitsPerSample;
WORD cbSize; uint16_t cbSize;
} WAVEFORMATEX, *LPWAVEFORMATEX; } WAVEFORMATEX, *LPWAVEFORMATEX;
typedef struct DSBUFFERDESC { typedef struct DSBUFFERDESC {

View File

@ -1697,7 +1697,7 @@ void MB_Reset()
#define nAddr ea #define nAddr ea
GLUE_C_READ(MB_Read) GLUE_C_READ(MB_Read)
#else #else
static BYTE MB_Read(WORD PC, WORD nAddr, BYTE bWrite, BYTE nValue, ULONG nCyclesLeft) static BYTE MB_Read(uint16_t PC, uint16_t nAddr, BYTE bWrite, BYTE nValue, ULONG nCyclesLeft)
#endif #endif
{ {
MB_UpdateCycles(); MB_UpdateCycles();
@ -1775,7 +1775,7 @@ static BYTE MB_Read(WORD PC, WORD nAddr, BYTE bWrite, BYTE nValue, ULONG nCycles
#define nValue b #define nValue b
GLUE_C_WRITE(MB_Write) GLUE_C_WRITE(MB_Write)
#else #else
static BYTE MB_Write(WORD PC, WORD nAddr, BYTE bWrite, BYTE nValue, ULONG nCyclesLeft) static BYTE MB_Write(uint16_t PC, uint16_t nAddr, BYTE bWrite, BYTE nValue, ULONG nCyclesLeft)
#endif #endif
{ {
MB_UpdateCycles(); MB_UpdateCycles();
@ -1858,7 +1858,7 @@ static BYTE MB_Write(WORD PC, WORD nAddr, BYTE bWrite, BYTE nValue, ULONG nCycle
#ifdef APPLE2IX #ifdef APPLE2IX
GLUE_C_READ(PhasorIO) GLUE_C_READ(PhasorIO)
#else #else
static BYTE PhasorIO(WORD PC, WORD nAddr, BYTE bWrite, BYTE nValue, ULONG nCyclesLeft) static BYTE PhasorIO(uint16_t PC, uint16_t nAddr, BYTE bWrite, BYTE nValue, ULONG nCyclesLeft)
#endif #endif
{ {
if(!g_bPhasorEnable) if(!g_bPhasorEnable)
@ -1891,7 +1891,7 @@ void mb_io_initialize(unsigned int slot4, unsigned int slot5)
MB_InitializeIO(NULL, slot4, slot5); MB_InitializeIO(NULL, slot4, slot5);
} }
//typedef BYTE (*iofunction)(WORD nPC, WORD nAddr, BYTE nWriteFlag, BYTE nWriteValue, ULONG nCyclesLeft); //typedef BYTE (*iofunction)(uint16_t nPC, uint16_t nAddr, BYTE nWriteFlag, BYTE nWriteValue, ULONG nCyclesLeft);
typedef void (*iofunction)(); typedef void (*iofunction)();
static void RegisterIoHandler(UINT uSlot, iofunction IOReadC0, iofunction IOWriteC0, iofunction IOReadCx, iofunction IOWriteCx, LPVOID unused_lpSlotParameter, BYTE* unused_pExpansionRom) static void RegisterIoHandler(UINT uSlot, iofunction IOReadC0, iofunction IOWriteC0, iofunction IOReadCx, iofunction IOWriteCx, LPVOID unused_lpSlotParameter, BYTE* unused_pExpansionRom)
{ {

View File

@ -39,13 +39,13 @@ typedef struct DSBUFFERDESC ALBufferParamsStruct;
DWORD dwReserved; DWORD dwReserved;
LPWAVEFORMATEX lpwfxFormat LPWAVEFORMATEX lpwfxFormat
{ {
WORD wFormatTag; uint16_t wFormatTag;
WORD nChannels; uint16_t nChannels;
DWORD nSamplesPerSec; DWORD nSamplesPerSec;
DWORD nAvgBytesPerSec; DWORD nAvgBytesPerSec;
WORD nBlockAlign; uint16_t nBlockAlign;
WORD wBitsPerSample; uint16_t wBitsPerSample;
WORD cbSize; uint16_t cbSize;
} }
*/ */

View File

@ -34,7 +34,6 @@ typedef long LONG;
typedef unsigned int UINT; typedef unsigned int UINT;
typedef char TCHAR; typedef char TCHAR;
typedef short SHORT; typedef short SHORT;
typedef unsigned short WORD;
typedef unsigned char BYTE; typedef unsigned char BYTE;
typedef long *LPLONG; typedef long *LPLONG;