Merge remote-tracking branch 'upstream/master'

# Conflicts:
#	source/RGBMonitor.cpp
This commit is contained in:
Andrea Odetti 2020-11-28 14:17:24 +00:00
commit a0c3fcf416
3 changed files with 16 additions and 15 deletions

View file

@ -173,8 +173,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define NTSC_NUM_PHASES 4
#define NTSC_NUM_SEQUENCES 4096
const uint32_t ALPHA32_MASK = 0xFF000000; // Win32: aarrggbb
/*extern*/ uint32_t g_nChromaSize = 0; // for NTSC_VideoGetChromaTable()
static bgra_t g_aBnWMonitor [NTSC_NUM_SEQUENCES];
static bgra_t g_aHueMonitor[NTSC_NUM_PHASES][NTSC_NUM_SEQUENCES];

View file

@ -35,14 +35,6 @@ static LPBYTE g_aSourceStartofLine[ MAX_SOURCE_Y ];
// . V_CreateLookup_HiResHalfPixel_Authentic() uses both ColorMapping (CM_xxx) indices and Color_Palette_Index_e (HGR_xxx)!
#define DO_OPT_PALETTE 0
#ifdef _MSC_VER
#define BACKGOUND_BLACK 0x00000000
#define SETRGBCOLOR(r,g,b) {b,g,r,0x00}
#else
#define BACKGOUND_BLACK 0xFF000000
#define SETRGBCOLOR(r,g,b) {b,g,r,0xFF}
#endif
enum Color_Palette_Index_e
{
// hires (don't change order) - For tv emulation HGR Video Mode
@ -546,7 +538,7 @@ static void CopyMixedSource(int x, int y, int sx, int sy, bgra_t *pVideoAddress)
if (bIsHalfScanLines && (h & 1))
{
// 50% Half Scan Line clears every odd scanline (and SHIFT+PrintScreen saves only the even rows)
*(pDst+nBytes) = BACKGOUND_BLACK;
*(pDst+nBytes) = OPAQUE_BLACK;
}
else
{
@ -576,7 +568,7 @@ static void CopySource(int w, int h, int sx, int sy, bgra_t *pVideoAddress, cons
if (bIsHalfScanLines && !(h & 1))
{
// 50% Half Scan Line clears every odd scanline (and SHIFT+PrintScreen saves only the even rows)
std::fill(pDst, pDst + w, BACKGOUND_BLACK);
std::fill(pDst, pDst + w, OPAQUE_BLACK);
}
else
{
@ -744,7 +736,7 @@ void UpdateHiResRGBCell(int x, int y, uint16_t addr, bgra_t* pVideoAddress)
if (bIsHalfScanLines)
{
// Scanlines
std::fill(pDst, pDst + 14, BACKGOUND_BLACK);
std::fill(pDst, pDst + 14, OPAQUE_BLACK);
}
else
{
@ -959,7 +951,7 @@ void UpdateDHiResCellRGB(int x, int y, uint16_t addr, bgra_t* pVideoAddress, boo
if (bIsHalfScanLines)
{
// Scanlines
std::fill(pDst, pDst + 14, BACKGOUND_BLACK);
std::fill(pDst, pDst + 14, OPAQUE_BLACK);
}
else
{
@ -1148,7 +1140,7 @@ void UpdateDuochromeCell(int h, int w, bgra_t* pVideoAddress, uint8_t bits, uint
if (bIsHalfScanLines && !(h & 1))
{
// 50% Half Scan Line clears every odd scanline (and SHIFT+PrintScreen saves only the even rows)
std::fill(pDst, pDst + w, BACKGOUND_BLACK);
std::fill(pDst, pDst + w, OPAQUE_BLACK);
}
else
{

View file

@ -1,5 +1,16 @@
#pragma once
// in Windows it seems that the ALPHA value is irrelevant
// we have selected 0xFF since it works everywhere
// Windows
// SDL (SDL_PIXELFORMAT_ARGB8888)
// Qt (QImage::Format_ARGB32_Premultiplied)
#define ALPHA 0xFF // fully opaque
#define ALPHA32_MASK (ALPHA << 24)
#define SETRGBCOLOR(r, g, b) {b, g, r, ALPHA} // to create a RGBQUAD
#define OPAQUE_BLACK (0 | ALPHA32_MASK) // Black is RGB 0 0 0
// Types ____________________________________________________________
// NOTE: KEEP IN SYNC: VideoType_e g_aVideoChoices g_apVideoModeDesc