mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-06-09 22:29:40 +00:00
Adjusted the Config PropSheetPage to widen the Video Mode's combo box.
Renamed a few globals & made static. Removed a few VS2008 'int to bool' perf warnings.
This commit is contained in:
parent
08458a9d29
commit
b5739b862a
|
@ -90,11 +90,11 @@ CAPTION "Configuration"
|
||||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "&Model:",IDC_STATIC,5,7,40,8
|
LTEXT "&Model:",IDC_STATIC,5,7,40,8
|
||||||
COMBOBOX IDC_COMPUTER,45,5,90,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_COMPUTER,45,5,91,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
CONTROL "Confirm reboot",IDC_CHECK_CONFIRM_REBOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,8,62,10
|
CONTROL "Confirm reboot",IDC_CHECK_CONFIRM_REBOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,8,62,10
|
||||||
GROUPBOX "Video",IDC_STATIC,5,22,200,56
|
GROUPBOX "Video",IDC_STATIC,5,22,200,56
|
||||||
LTEXT "Mo&de:",IDC_STATIC,12,33,33,8
|
LTEXT "Mo&de:",IDC_STATIC,12,33,33,8
|
||||||
COMBOBOX IDC_VIDEOTYPE,45,30,90,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_VIDEOTYPE,33,30,103,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
PUSHBUTTON "Monochrome &Color...",IDC_MONOCOLOR,12,46,80,14
|
PUSHBUTTON "Monochrome &Color...",IDC_MONOCOLOR,12,46,80,14
|
||||||
CONTROL "50% Scan lines",IDC_CHECK_HALF_SCAN_LINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,33,62,10
|
CONTROL "50% Scan lines",IDC_CHECK_HALF_SCAN_LINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,33,62,10
|
||||||
CONTROL "Vertical blend",IDC_CHECK_VERTICAL_BLEND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,48,62,10
|
CONTROL "Vertical blend",IDC_CHECK_VERTICAL_BLEND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,48,62,10
|
||||||
|
|
|
@ -667,10 +667,10 @@ void UpdateHiResRGBCell(int x, int y, uint16_t addr, bgra_t* pVideoAddress)
|
||||||
int color = 0;
|
int color = 0;
|
||||||
DWORD dwordval_tmp = dwordval;
|
DWORD dwordval_tmp = dwordval;
|
||||||
dwordval_tmp = dwordval_tmp >> 7;
|
dwordval_tmp = dwordval_tmp >> 7;
|
||||||
bool offset = (byteval2 & 0x80);
|
bool offset = (byteval2 & 0x80) ? true : false;
|
||||||
for (int i = 0; i < 14; i++)
|
for (int i = 0; i < 14; i++)
|
||||||
{
|
{
|
||||||
if (i == 7) offset = (byteval3 & 0x80);
|
if (i == 7) offset = (byteval3 & 0x80) ? true : false;
|
||||||
color = dwordval_tmp & 0x3;
|
color = dwordval_tmp & 0x3;
|
||||||
// Two cases because AppleWin's palette is in a strange order
|
// Two cases because AppleWin's palette is in a strange order
|
||||||
if (offset)
|
if (offset)
|
||||||
|
@ -739,8 +739,8 @@ void UpdateHiResRGBCell(int x, int y, uint16_t addr, bgra_t* pVideoAddress)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool dhgr_lastcell_iscolor = true;
|
static bool g_dhgrLastCellIsColor = true;
|
||||||
int dhgr_lastbit = 0;
|
static int g_dhgrLastBit = 0;
|
||||||
|
|
||||||
void UpdateDHiResCellRGB(int x, int y, uint16_t addr, bgra_t* pVideoAddress, bool isMixMode, bool isBit7Inversed)
|
void UpdateDHiResCellRGB(int x, int y, uint16_t addr, bgra_t* pVideoAddress, bool isMixMode, bool isBit7Inversed)
|
||||||
{
|
{
|
||||||
|
@ -815,31 +815,31 @@ void UpdateDHiResCellRGB(int x, int y, uint16_t addr, bgra_t* pVideoAddress, boo
|
||||||
*(pDst++) = colors[1];
|
*(pDst++) = colors[1];
|
||||||
|
|
||||||
dwordval >>= 7;
|
dwordval >>= 7;
|
||||||
dhgr_lastcell_iscolor = true;
|
g_dhgrLastCellIsColor = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// BW
|
// BW
|
||||||
for (int i = 0; i < 7; i++)
|
for (int i = 0; i < 7; i++)
|
||||||
{
|
{
|
||||||
dhgr_lastbit = dwordval & 1;
|
g_dhgrLastBit = dwordval & 1;
|
||||||
*(pDst++) = bw[dhgr_lastbit];
|
*(pDst++) = bw[g_dhgrLastBit];
|
||||||
dwordval >>= 1;
|
dwordval >>= 1;
|
||||||
}
|
}
|
||||||
dhgr_lastcell_iscolor = false;
|
g_dhgrLastCellIsColor = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((byteval2 & 0x80) || !isMixMode)
|
if ((byteval2 & 0x80) || !isMixMode)
|
||||||
{
|
{
|
||||||
// Remaining of color cell 1
|
// Remaining of color cell 1
|
||||||
if (dhgr_lastcell_iscolor)
|
if (g_dhgrLastCellIsColor)
|
||||||
{
|
{
|
||||||
*(pDst++) = colors[1];
|
*(pDst++) = colors[1];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Repeat last BW bit once
|
// Repeat last BW bit once
|
||||||
*(pDst++) = bw[dhgr_lastbit];
|
*(pDst++) = bw[g_dhgrLastBit];
|
||||||
}
|
}
|
||||||
// Color cell 2
|
// Color cell 2
|
||||||
*(pDst++) = colors[2];
|
*(pDst++) = colors[2];
|
||||||
|
@ -849,17 +849,17 @@ void UpdateDHiResCellRGB(int x, int y, uint16_t addr, bgra_t* pVideoAddress, boo
|
||||||
// Color cell 3
|
// Color cell 3
|
||||||
*(pDst++) = colors[3];
|
*(pDst++) = colors[3];
|
||||||
*(pDst++) = colors[3];
|
*(pDst++) = colors[3];
|
||||||
dhgr_lastcell_iscolor = true;
|
g_dhgrLastCellIsColor = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 7; i++)
|
for (int i = 0; i < 7; i++)
|
||||||
{
|
{
|
||||||
dhgr_lastbit = dwordval & 1;
|
g_dhgrLastBit = dwordval & 1;
|
||||||
*(pDst++) = bw[dhgr_lastbit];
|
*(pDst++) = bw[g_dhgrLastBit];
|
||||||
dwordval >>= 1;
|
dwordval >>= 1;
|
||||||
}
|
}
|
||||||
dhgr_lastcell_iscolor = false;
|
g_dhgrLastCellIsColor = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Second cell
|
else // Second cell
|
||||||
|
@ -869,7 +869,7 @@ void UpdateDHiResCellRGB(int x, int y, uint16_t addr, bgra_t* pVideoAddress, boo
|
||||||
if ((byteval3 & 0x80) || !isMixMode)
|
if ((byteval3 & 0x80) || !isMixMode)
|
||||||
{
|
{
|
||||||
// Remaining of color cell 3
|
// Remaining of color cell 3
|
||||||
if (dhgr_lastcell_iscolor)
|
if (g_dhgrLastCellIsColor)
|
||||||
{
|
{
|
||||||
*(pDst++) = colors[3];
|
*(pDst++) = colors[3];
|
||||||
*(pDst++) = colors[3];
|
*(pDst++) = colors[3];
|
||||||
|
@ -877,8 +877,8 @@ void UpdateDHiResCellRGB(int x, int y, uint16_t addr, bgra_t* pVideoAddress, boo
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Repeat last BW bit twice
|
// Repeat last BW bit twice
|
||||||
*(pDst++) = bw[dhgr_lastbit];
|
*(pDst++) = bw[g_dhgrLastBit];
|
||||||
*(pDst++) = bw[dhgr_lastbit];
|
*(pDst++) = bw[g_dhgrLastBit];
|
||||||
}
|
}
|
||||||
// Color cell 4
|
// Color cell 4
|
||||||
*(pDst++) = colors[4];
|
*(pDst++) = colors[4];
|
||||||
|
@ -889,23 +889,23 @@ void UpdateDHiResCellRGB(int x, int y, uint16_t addr, bgra_t* pVideoAddress, boo
|
||||||
*(pDst++) = colors[5];
|
*(pDst++) = colors[5];
|
||||||
|
|
||||||
dwordval >>= 7;
|
dwordval >>= 7;
|
||||||
dhgr_lastcell_iscolor = true;
|
g_dhgrLastCellIsColor = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 7; i++)
|
for (int i = 0; i < 7; i++)
|
||||||
{
|
{
|
||||||
dhgr_lastbit = dwordval & 1;
|
g_dhgrLastBit = dwordval & 1;
|
||||||
*(pDst++) = bw[dhgr_lastbit];
|
*(pDst++) = bw[g_dhgrLastBit];
|
||||||
dwordval >>= 1;
|
dwordval >>= 1;
|
||||||
}
|
}
|
||||||
dhgr_lastcell_iscolor = false;
|
g_dhgrLastCellIsColor = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((byteval4 & 0x80) || !isMixMode)
|
if ((byteval4 & 0x80) || !isMixMode)
|
||||||
{
|
{
|
||||||
// Remaining of color cell 5
|
// Remaining of color cell 5
|
||||||
if (dhgr_lastcell_iscolor)
|
if (g_dhgrLastCellIsColor)
|
||||||
{
|
{
|
||||||
*(pDst++) = colors[5];
|
*(pDst++) = colors[5];
|
||||||
*(pDst++) = colors[5];
|
*(pDst++) = colors[5];
|
||||||
|
@ -914,26 +914,26 @@ void UpdateDHiResCellRGB(int x, int y, uint16_t addr, bgra_t* pVideoAddress, boo
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Repeat last BW bit three times
|
// Repeat last BW bit three times
|
||||||
*(pDst++) = bw[dhgr_lastbit];
|
*(pDst++) = bw[g_dhgrLastBit];
|
||||||
*(pDst++) = bw[dhgr_lastbit];
|
*(pDst++) = bw[g_dhgrLastBit];
|
||||||
*(pDst++) = bw[dhgr_lastbit];
|
*(pDst++) = bw[g_dhgrLastBit];
|
||||||
}
|
}
|
||||||
// Color cell 6
|
// Color cell 6
|
||||||
*(pDst++) = colors[6];
|
*(pDst++) = colors[6];
|
||||||
*(pDst++) = colors[6];
|
*(pDst++) = colors[6];
|
||||||
*(pDst++) = colors[6];
|
*(pDst++) = colors[6];
|
||||||
*(pDst++) = colors[6];
|
*(pDst++) = colors[6];
|
||||||
dhgr_lastcell_iscolor = true;
|
g_dhgrLastCellIsColor = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 7; i++)
|
for (int i = 0; i < 7; i++)
|
||||||
{
|
{
|
||||||
dhgr_lastbit = dwordval & 1;
|
g_dhgrLastBit = dwordval & 1;
|
||||||
*(pDst++) = bw[dhgr_lastbit];
|
*(pDst++) = bw[g_dhgrLastBit];
|
||||||
dwordval >>= 1;
|
dwordval >>= 1;
|
||||||
}
|
}
|
||||||
dhgr_lastcell_iscolor = false;
|
g_dhgrLastCellIsColor = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user