mirror of https://github.com/stella-emu/stella.git
Fixes for a few minor warnings from cppcheck.
This commit is contained in:
parent
928de47898
commit
c0ab3580c3
|
@ -100,8 +100,9 @@ void AtariNTSC::enableThreading(bool enable)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void AtariNTSC::render(const uInt8* atari_in, const uInt32 in_width, const uInt32 in_height,
|
void AtariNTSC::render(const uInt8* atari_in, const uInt32 in_width,
|
||||||
void* rgb_out, const uInt32 out_pitch, uInt32* rgb_in)
|
const uInt32 in_height, void* rgb_out,
|
||||||
|
const uInt32 out_pitch, uInt32* rgb_in)
|
||||||
{
|
{
|
||||||
// Spawn the threads...
|
// Spawn the threads...
|
||||||
for(uInt32 i = 0; i < myWorkerThreads; ++i)
|
for(uInt32 i = 0; i < myWorkerThreads; ++i)
|
||||||
|
@ -520,28 +521,9 @@ void AtariNTSC::genKernel(init_t& impl, float y, float i, float q, uInt32* out)
|
||||||
while ( --burst_remain );
|
while ( --burst_remain );
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
const AtariNTSC::Setup AtariNTSC::TV_Composite = {
|
|
||||||
0.0F, 0.15F, 0.0F, 0.0F, 0.0F
|
|
||||||
};
|
|
||||||
const AtariNTSC::Setup AtariNTSC::TV_SVideo = {
|
|
||||||
0.0F, 0.45F, -1.0F, -1.0F, 0.0F
|
|
||||||
};
|
|
||||||
const AtariNTSC::Setup AtariNTSC::TV_RGB = {
|
|
||||||
0.2F, 0.70F, -1.0F, -1.0F, -1.0F
|
|
||||||
};
|
|
||||||
const AtariNTSC::Setup AtariNTSC::TV_Bad = {
|
|
||||||
0.2F, 0.1F, 0.5F, 0.5F, 0.5F
|
|
||||||
};
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
const std::array<AtariNTSC::pixel_info_t, AtariNTSC::alignment_count>
|
const std::array<AtariNTSC::pixel_info_t, AtariNTSC::alignment_count>
|
||||||
AtariNTSC::atari_ntsc_pixels = { {
|
AtariNTSC::atari_ntsc_pixels = { {
|
||||||
{ PIXEL_OFFSET1(-4, -9), PIXEL_OFFSET2(-4), { 1, 1, 1, 1 } },
|
{ PIXEL_OFFSET1(-4, -9), PIXEL_OFFSET2(-4), { 1, 1, 1, 1 } },
|
||||||
{ PIXEL_OFFSET1( 0, -5), PIXEL_OFFSET2( 0), { 1, 1, 1, 1 } }
|
{ PIXEL_OFFSET1( 0, -5), PIXEL_OFFSET2( 0), { 1, 1, 1, 1 } }
|
||||||
} };
|
} };
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
const std::array<float, 6> AtariNTSC::default_decoder = {
|
|
||||||
0.9563F, 0.6210F, -0.2721F, -0.6474F, -1.1070F, 1.7046F
|
|
||||||
};
|
|
||||||
|
|
|
@ -67,10 +67,18 @@ class AtariNTSC
|
||||||
};
|
};
|
||||||
|
|
||||||
// Video format presets
|
// Video format presets
|
||||||
static const Setup TV_Composite; // color bleeding + artifacts
|
static constexpr Setup TV_Composite = { // color bleeding + artifacts
|
||||||
static const Setup TV_SVideo; // color bleeding only
|
0.0F, 0.15F, 0.0F, 0.0F, 0.0F
|
||||||
static const Setup TV_RGB; // crisp image
|
};
|
||||||
static const Setup TV_Bad; // badly adjusted TV
|
static constexpr Setup TV_SVideo = { // color bleeding only
|
||||||
|
0.0F, 0.45F, -1.0F, -1.0F, 0.0F
|
||||||
|
};
|
||||||
|
static constexpr Setup TV_RGB = { // crisp image
|
||||||
|
0.2F, 0.70F, -1.0F, -1.0F, -1.0F
|
||||||
|
};
|
||||||
|
static constexpr Setup TV_Bad = { // badly adjusted TV
|
||||||
|
0.2F, 0.1F, 0.5F, 0.5F, 0.5F
|
||||||
|
};
|
||||||
|
|
||||||
// Initializes and adjusts parameters
|
// Initializes and adjusts parameters
|
||||||
// Note that this must be called before setting a palette
|
// Note that this must be called before setting a palette
|
||||||
|
@ -175,7 +183,9 @@ class AtariNTSC
|
||||||
};
|
};
|
||||||
static const std::array<pixel_info_t, alignment_count> atari_ntsc_pixels;
|
static const std::array<pixel_info_t, alignment_count> atari_ntsc_pixels;
|
||||||
|
|
||||||
static const std::array<float, 6> default_decoder;
|
static constexpr std::array<float, 6> default_decoder = {
|
||||||
|
0.9563F, 0.6210F, -0.2721F, -0.6474F, -1.1070F, 1.7046F
|
||||||
|
};
|
||||||
|
|
||||||
void init(init_t& impl, const Setup& setup);
|
void init(init_t& impl, const Setup& setup);
|
||||||
void initFilters(init_t& impl, const Setup& setup);
|
void initFilters(init_t& impl, const Setup& setup);
|
||||||
|
@ -242,7 +252,7 @@ class AtariNTSC
|
||||||
(rescale_out - (((scaled) + rescale_out * 10) % rescale_out)) % rescale_out +
|
(rescale_out - (((scaled) + rescale_out * 10) % rescale_out)) % rescale_out +
|
||||||
(kernel_size * 2 * (((scaled) + rescale_out * 10) % rescale_out)));
|
(kernel_size * 2 * (((scaled) + rescale_out * 10) % rescale_out)));
|
||||||
}
|
}
|
||||||
static constexpr int PIXEL_OFFSET2( int ntsc ) {
|
static constexpr float PIXEL_OFFSET2( int ntsc ) {
|
||||||
return 1.0F - (((ntsc) + 100) & 2);
|
return 1.0F - (((ntsc) + 100) & 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -339,7 +339,7 @@ bool CartDebug::disassemble(int bank, uInt16 PC, Disassembly& disassembly,
|
||||||
// If the offset has changed, all old addresses must be 'converted'
|
// If the offset has changed, all old addresses must be 'converted'
|
||||||
// For example, if the list contains any $fxxx and the address space is now
|
// For example, if the list contains any $fxxx and the address space is now
|
||||||
// $bxxx, it must be changed
|
// $bxxx, it must be changed
|
||||||
const uInt16 offset = PC & 0x1000 ? myConsole.cartridge().bankOrigin(bank, PC) : 0;
|
const uInt16 offset = (PC & 0x1000) ? myConsole.cartridge().bankOrigin(bank, PC) : 0;
|
||||||
AddressList& addresses = info.addressList;
|
AddressList& addresses = info.addressList;
|
||||||
for(auto& i: addresses)
|
for(auto& i: addresses)
|
||||||
i = (i & 0xFFF) + offset;
|
i = (i & 0xFFF) + offset;
|
||||||
|
|
Loading…
Reference in New Issue