summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortwinaphex2015-11-05 14:29:26 +0100
committertwinaphex2015-11-05 14:29:26 +0100
commita13a040c067999fa52c9e0ac8d08f6edcd6c792f (patch)
tree5bca649b1b28347e4ec3209fc7c3f3fa29076c23
parent8c7819e57646ad4fd44285b49e0eaa4c55b8e231 (diff)
downloadsnes9x2002-a13a040c067999fa52c9e0ac8d08f6edcd6c792f.tar.gz
snes9x2002-a13a040c067999fa52c9e0ac8d08f6edcd6c792f.tar.bz2
snes9x2002-a13a040c067999fa52c9e0ac8d08f6edcd6c792f.zip
Change some int casts to intptr_t
-rw-r--r--src/getset.h14
-rw-r--r--src/sa1.cpp6
2 files changed, 10 insertions, 10 deletions
diff --git a/src/getset.h b/src/getset.h
index 44759e8..00387e1 100644
--- a/src/getset.h
+++ b/src/getset.h
@@ -81,7 +81,7 @@ INLINE uint8 S9xGetByte (uint32 Address)
return (*(GetAddress + (Address & 0xffff)));
}
- switch ((int) GetAddress)
+ switch ((intptr_t) GetAddress)
{
case CMemory::MAP_PPU:
#ifdef VAR_CYCLES
@@ -177,7 +177,7 @@ INLINE uint16 S9xGetWord (uint32 Address)
#endif
}
- switch ((int) GetAddress)
+ switch ((intptr_t) GetAddress)
{
case CMemory::MAP_PPU:
#ifdef VAR_CYCLES
@@ -290,7 +290,7 @@ INLINE void S9xSetByte (uint8 Byte, uint32 Address)
return;
}
- switch ((int) SetAddress)
+ switch ((intptr_t) SetAddress)
{
case CMemory::MAP_PPU:
#ifdef VAR_CYCLES
@@ -428,7 +428,7 @@ INLINE void S9xSetWord (uint16 Word, uint32 Address)
return;
}
- switch ((int) SetAddress)
+ switch ((intptr_t) SetAddress)
{
case CMemory::MAP_PPU:
#ifdef VAR_CYCLES
@@ -531,7 +531,7 @@ INLINE uint8 *GetBasePointer (uint32 Address)
if (GetAddress >= (uint8 *) CMemory::MAP_LAST)
return (GetAddress);
- switch ((int) GetAddress)
+ switch ((intptr_t) GetAddress)
{
case CMemory::MAP_PPU:
return (Memory.FillRAM - 0x2000);
@@ -570,7 +570,7 @@ INLINE uint8 *S9xGetMemPointer (uint32 Address)
if (GetAddress >= (uint8 *) CMemory::MAP_LAST)
return (GetAddress + (Address & 0xffff));
- switch ((int) GetAddress)
+ switch ((intptr_t) GetAddress)
{
case CMemory::MAP_PPU:
return (Memory.FillRAM - 0x2000 + (Address & 0xffff));
@@ -621,7 +621,7 @@ INLINE void S9xSetPCBase (uint32 Address)
return;
}
- switch ((int) GetAddress)
+ switch ((intptr_t) GetAddress)
{
case CMemory::MAP_PPU:
#ifdef VAR_CYCLES
diff --git a/src/sa1.cpp b/src/sa1.cpp
index 9bd0f8f..73b1fa4 100644
--- a/src/sa1.cpp
+++ b/src/sa1.cpp
@@ -203,7 +203,7 @@ uint8 S9xSA1GetByte (uint32 address)
{
uint8 *GetAddress = SA1_Map [(address >> MEMMAP_SHIFT) & MEMMAP_MASK];
if (GetAddress >= (uint8 *) CMemory::MAP_LAST) return (*(GetAddress + (address & 0xffff)));
- return S9xSA1GetByte_JumpTable[(int) GetAddress](address);
+ return S9xSA1GetByte_JumpTable[(intptr_t) GetAddress](address);
// return (SA1_Map [(address >> MEMMAP_SHIFT) & MEMMAP_MASK] >= (uint8 *)CMemory::MAP_LAST) ?
// (*((uint8 *)(SA1_Map [(address >> MEMMAP_SHIFT) & MEMMAP_MASK]) + (address & 0xffff))) :
// S9xSA1GetByte_JumpTable[(int) SA1_Map [(address >> MEMMAP_SHIFT) & MEMMAP_MASK]](address);
@@ -292,7 +292,7 @@ void S9xSA1SetByte (uint8 byte, uint32 address)
*(Setaddress + (address & 0xffff)) = byte;
return;
}
- S9xSA1SetByte_JumpTable[(int)Setaddress](byte, address);
+ S9xSA1SetByte_JumpTable[(intptr_t)Setaddress](byte, address);
}
void S9xSA1SetPCBase (uint32 address)
@@ -305,7 +305,7 @@ void S9xSA1SetPCBase (uint32 address)
return;
}
- switch ((int) GetAddress)
+ switch ((intptr_t) GetAddress)
{
case CMemory::MAP_PPU:
SA1.PCBase = Memory.FillRAM - 0x2000;