MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / UpdateText40ColorCell

Function UpdateText40ColorCell

source/RGBMonitor.cpp:1070–1088  ·  view source on GitHub ↗

=========================================================================== Color TEXT (some RGB cards only) Default BG and FG are usually defined by hardware switches, defaults to black/white

Source from the content-addressed store, hash-verified

1068// Color TEXT (some RGB cards only)
1069// Default BG and FG are usually defined by hardware switches, defaults to black/white
1070void UpdateText40ColorCell(int x, int y, uint16_t addr, bgra_t* pVideoAddress, uint8_t bits, uint8_t character)
1071{
1072 uint8_t foreground = g_nRegularTextFG;
1073 uint8_t background = g_nRegularTextBG;
1074 if (g_nTextFBMode)
1075 {
1076 const BYTE val = *MemGetAuxPtr(addr); // RGB cards with F/B text use their own AUX memory!
1077 foreground = val >> 4;
1078 background = val & 0x0F;
1079 }
1080 else if (g_RGBVideocard == RGB_Videocard_e::Video7_SL7 && character < 0x80)
1081 {
1082 // in regular 40COL mode, the SL7 videocard renders inverse characters as B&W
1083 foreground = 15;
1084 background = 0;
1085 }
1086
1087 UpdateDuochromeCell(2, 14, pVideoAddress, bits, foreground, background);
1088}
1089
1090void UpdateText80ColorCell(int x, int y, uint16_t addr, bgra_t* pVideoAddress, uint8_t bits, uint8_t character)
1091{

Callers 1

updateScreenText40RGBFunction · 0.85

Calls 2

MemGetAuxPtrFunction · 0.85
UpdateDuochromeCellFunction · 0.85

Tested by

no test coverage detected