Commit d70d1dbb authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Take out C++11 extension

parent fe501533
......@@ -344,7 +344,7 @@ static void UpdateInput(void)
for(unsigned i = 0; i < 12; i++)
bs |= (bool)cb.input_state(port, RETRO_DEVICE_JOYPAD, 0, i) << i;
//
MDFN_en16lsb(port_data[port], bs);
MDFN_en16lsb<false>(port_data[port], bs);
}
}
......
......@@ -94,7 +94,7 @@ SPCReader::SPCReader(Stream* fp)
fp->rewind();
fp->read(header, sizeof(header));
reg_pc = MDFN_de16lsb(&header[0x25]);
reg_pc = MDFN_de16lsb<false>(&header[0x25]);
reg_a = header[0x27];
reg_x = header[0x28];
reg_y = header[0x29];
......
......@@ -119,7 +119,7 @@ static INLINE T MDFN_deXsb(const void* ptr)
//
// Native endian.
//
template<typename T, bool aligned = false>
template<typename T, bool aligned>
static INLINE T MDFN_densb(const void* ptr)
{
return MDFN_deXsb<-1, T, aligned>(ptr);
......@@ -128,13 +128,13 @@ static INLINE T MDFN_densb(const void* ptr)
//
// Little endian.
//
template<typename T, bool aligned = false>
template<typename T, bool aligned>
static INLINE T MDFN_delsb(const void* ptr)
{
return MDFN_deXsb<0, T, aligned>(ptr);
}
template<bool aligned = false>
template<bool aligned>
static INLINE uint16 MDFN_de16lsb(const void* ptr)
{
return MDFN_delsb<uint16, aligned>(ptr);
......@@ -147,13 +147,13 @@ static INLINE uint32 MDFN_de24lsb(const void* ptr)
return (ptr_u8[0] << 0) | (ptr_u8[1] << 8) | (ptr_u8[2] << 16);
}
template<bool aligned = false>
template<bool aligned>
static INLINE uint32 MDFN_de32lsb(const void* ptr)
{
return MDFN_delsb<uint32, aligned>(ptr);
}
template<bool aligned = false>
template<bool aligned>
static INLINE uint64 MDFN_de64lsb(const void* ptr)
{
return MDFN_delsb<uint64, aligned>(ptr);
......@@ -162,13 +162,13 @@ static INLINE uint64 MDFN_de64lsb(const void* ptr)
//
// Big endian.
//
template<typename T, bool aligned = false>
template<typename T, bool aligned>
static INLINE T MDFN_demsb(const void* ptr)
{
return MDFN_deXsb<1, T, aligned>(ptr);
}
template<bool aligned = false>
template<bool aligned>
static INLINE uint16 MDFN_de16msb(const void* ptr)
{
return MDFN_demsb<uint16, aligned>(ptr);
......@@ -181,13 +181,13 @@ static INLINE uint32 MDFN_de24msb(const void* ptr)
return (ptr_u8[0] << 16) | (ptr_u8[1] << 8) | (ptr_u8[2] << 0);
}
template<bool aligned = false>
template<bool aligned>
static INLINE uint32 MDFN_de32msb(const void* ptr)
{
return MDFN_demsb<uint32, aligned>(ptr);
}
template<bool aligned = false>
template<bool aligned>
static INLINE uint64 MDFN_de64msb(const void* ptr)
{
return MDFN_demsb<uint64, aligned>(ptr);
......@@ -228,7 +228,7 @@ static INLINE void MDFN_enXsb(void* ptr, T value)
//
// Native endian.
//
template<typename T, bool aligned = false>
template<typename T, bool aligned>
static INLINE void MDFN_ennsb(void* ptr, T value)
{
MDFN_enXsb<-1, T, aligned>(ptr, value);
......@@ -237,13 +237,13 @@ static INLINE void MDFN_ennsb(void* ptr, T value)
//
// Little endian.
//
template<typename T, bool aligned = false>
template<typename T, bool aligned>
static INLINE void MDFN_enlsb(void* ptr, T value)
{
MDFN_enXsb<0, T, aligned>(ptr, value);
}
template<bool aligned = false>
template<bool aligned>
static INLINE void MDFN_en16lsb(void* ptr, uint16 value)
{
MDFN_enlsb<uint16, aligned>(ptr, value);
......@@ -258,13 +258,13 @@ static INLINE void MDFN_en24lsb(void* ptr, uint32 value)
ptr_u8[2] = value >> 16;
}
template<bool aligned = false>
template<bool aligned>
static INLINE void MDFN_en32lsb(void* ptr, uint32 value)
{
MDFN_enlsb<uint32, aligned>(ptr, value);
}
template<bool aligned = false>
template<bool aligned>
static INLINE void MDFN_en64lsb(void* ptr, uint64 value)
{
MDFN_enlsb<uint64, aligned>(ptr, value);
......@@ -274,13 +274,13 @@ static INLINE void MDFN_en64lsb(void* ptr, uint64 value)
//
// Big endian.
//
template<typename T, bool aligned = false>
template<typename T, bool aligned>
static INLINE void MDFN_enmsb(void* ptr, T value)
{
MDFN_enXsb<1, T, aligned>(ptr, value);
}
template<bool aligned = false>
template<bool aligned>
static INLINE void MDFN_en16msb(void* ptr, uint16 value)
{
MDFN_enmsb<uint16, aligned>(ptr, value);
......@@ -295,13 +295,13 @@ static INLINE void MDFN_en24msb(void* ptr, uint32 value)
ptr_u8[2] = value >> 0;
}
template<bool aligned = false>
template<bool aligned>
static INLINE void MDFN_en32msb(void* ptr, uint32 value)
{
MDFN_enmsb<uint32, aligned>(ptr, value);
}
template<bool aligned = false>
template<bool aligned>
static INLINE void MDFN_en64msb(void* ptr, uint64 value)
{
MDFN_enmsb<uint64, aligned>(ptr, value);
......
......@@ -75,7 +75,7 @@ static INLINE void block(uint32 h[5], void* blk_data)
uint32 v[5];
for(unsigned t = 0; t < 16; t++)
w[t] = MDFN_de32msb((uint8*)blk_data + (t << 2));
w[t] = MDFN_de32msb<false>((uint8*)blk_data + (t << 2));
for(unsigned t = 16; t < 80; t++)
w[t] = rotl<1>(w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);
......@@ -123,7 +123,7 @@ sha1_digest sha1(const void* data, const uint64 len)
}
for(unsigned i = 0; i < 5; i++)
MDFN_en32msb(&ret[i * 4], h[i]);
MDFN_en32msb<false>(&ret[i * 4], h[i]);
//printf("%08x %08x %08x %08x %08x\n", h[0], h[1], h[2], h[3], h[4]);
......
......@@ -92,7 +92,7 @@ INLINE void sha256_hasher::process_block(const uint8* blk_data)
alignas(16) auto v = h;
for(unsigned t = 0; t < 16; t++)
w[t] = MDFN_de32msb(blk_data + (t << 2));
w[t] = MDFN_de32msb<false>(blk_data + (t << 2));
for(unsigned t = 16; t < 64; t++)
w[t] = ls1(w[t - 2]) + w[t - 7] + ls0(w[t - 15]) + w[t - 16];
......@@ -158,12 +158,12 @@ sha256_digest sha256_hasher::digest(void) const
memset(footer, 0, sizeof(footer));
footer[0] |= 0x80;
MDFN_en64msb(&footer[footer_len - 8], bytes_processed * 8);
MDFN_en64msb<false>(&footer[footer_len - 8], bytes_processed * 8);
tmp.process(footer, footer_len);
for(unsigned i = 0; i < 8; i++)
MDFN_en32msb(&ret[i * 4], tmp.h[i]);
MDFN_en32msb<false>(&ret[i * 4], tmp.h[i]);
return ret;
}
......
......@@ -478,7 +478,7 @@ double APU_Init(const bool IsPAL, double master_clock)
{
#ifdef MDFN_SNES_FAUST_SPC700_IPL_HLE
memset(IPL, 0xFF, sizeof(IPL));
MDFN_en16lsb(&IPL[0x3E], 0xFFC0);
MDFN_en16lsb<false>(&IPL[0x3E], 0xFFC0);
#else
static const uint8 IPL_Init[64] =
{
......
......@@ -186,7 +186,7 @@ bool CART_Init(Stream* fp, uint8 id[16], const int32 cx4_ocmultiplier, const int
for(unsigned s = 0; s < 2; s++)
{
unsigned char* tmp = &Cart.ROM[s * 0x8000];
unsigned rv = MDFN_de16lsb(&tmp[0x7FFC]);
unsigned rv = MDFN_de16lsb<false>(&tmp[0x7FFC]);
if(rv >= 0x8000)
{
......
......@@ -396,7 +396,7 @@ static DEFWRITE(MainCPU_WriteIO)
//assert(Decomp.dma_trigger_addr == ~0U);
Decomp.dma_trigger_addr = MDFN_de24lsb(&DMARegs[(ch << 3) + 2]);
Decomp.dma_count = MDFN_de16lsb(&DMARegs[(ch << 3) + 5]);
Decomp.dma_count = MDFN_de16lsb<false>(&DMARegs[(ch << 3) + 5]);
//
InitDecomp(Decomp.dma_trigger_addr);
break;
......
......@@ -723,7 +723,7 @@ static INLINE void V9(unsigned voice_num)
static INLINE void ReadEchoBuffer(unsigned lr)
{
HGS.EchoFIRBuf[lr][HGS.EchoFIRBufPos] = MDFN_de16lsb(&APURAM[(uint16)(HGS.EchoBase + HGS.EchoOffset) + (lr << 1)]) &~ 1;
HGS.EchoFIRBuf[lr][HGS.EchoFIRBufPos] = MDFN_de16lsb<false>(&APURAM[(uint16)(HGS.EchoBase + HGS.EchoOffset) + (lr << 1)]) &~ 1;
if(lr)
HGS.EchoFIRBufPos = (HGS.EchoFIRBufPos + 1) & 7;
......@@ -748,7 +748,7 @@ static INLINE void WriteEchoBuffer(unsigned lr)
uint8* const target = &APURAM[(uint16)(HGS.EchoBase + HGS.EchoOffset) + (lr << 1)];
// printf("Write: %d, %04x\n", lr, target - APURAM);
MDFN_en16lsb(target, HGS.EchoAccum[lr] &~ 1);
MDFN_en16lsb<false>(target, HGS.EchoAccum[lr] &~ 1);
}
static INLINE int16 CalcOutput(unsigned lr)
......
......@@ -242,7 +242,7 @@ void InputDevice_Gamepad::Power(void)
void InputDevice_Gamepad::UpdatePhysicalState(const uint8* data)
{
buttons = MDFN_de16lsb(data);
buttons = MDFN_de16lsb<false>(data);
if(pls)
latched = buttons | 0xFFFF0000;
}
......@@ -388,7 +388,7 @@ void INPUT_AutoRead(void)
}
for(unsigned ai = 0; ai < 2; ai++)
MDFN_en16lsb(&JoyARData[sport * 2 + ai * 4], ard[ai]);
MDFN_en16lsb<false>(&JoyARData[sport * 2 + ai * 4], ard[ai]);
}
JoyLS = false;
}
......
......@@ -118,8 +118,8 @@ static uint32 NO_INLINE Update(uint32 master_timestamp)
const float imp_b = Impulse[phase_index + 1][i];
const float imp = imp_a + (imp_b - imp_a) * phase_ip;
accum[0] += imp * MDFN_densb<int16>(&inbuf[(i << 2) + 0]);
accum[1] += imp * MDFN_densb<int16>(&inbuf[(i << 2) + 2]);
accum[0] += imp * MDFN_densb<int16, false>(&inbuf[(i << 2) + 0]);
accum[1] += imp * MDFN_densb<int16, false>(&inbuf[(i << 2) + 2]);
}
(&ResampBuf[0].BufPudding()->f)[ResampBufPos] = accum[0] * eff_volume;
......@@ -588,7 +588,7 @@ void MSU1_Init(GameFile* gf, double* IdealSoundRate, uint64 affinity_audio, uint
uint64 loop_pos;
afp->read(header, sizeof(header));
loop_pos = (uint64)MDFN_de32lsb(&header[4]) * 4 + sizeof(header);
loop_pos = (uint64)MDFN_de32lsb<false>(&header[4]) * 4 + sizeof(header);
loop_pos = std::min<uint64>(loop_pos, size);
//
MDFN_printf(_("Audio Track 0x%04x:\n"), tnum);
......@@ -596,7 +596,7 @@ void MSU1_Init(GameFile* gf, double* IdealSoundRate, uint64 affinity_audio, uint
MDFN_AutoIndent aindt(1);
MDFN_printf(_("Byte Size: 0x%08llx\n"), (unsigned long long)raw_size);
MDFN_printf(_("Loop Pos: 0x%08llx (frame 0x%08x)\n"), (unsigned long long)loop_pos, MDFN_de32lsb(&header[4]));
MDFN_printf(_("Loop Pos: 0x%08llx (frame 0x%08x)\n"), (unsigned long long)loop_pos, MDFN_de32lsb<false>(&header[4]));
}
//
//
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment