@@ -64,7 +64,8 @@ const Plane& RendererSoftwareU32::RenderFrame() noexcept
64
64
if (m_cursorEnabled)
65
65
{
66
66
DrawCursor ();
67
- Video::paste (m_screen.data (), m_screen.m_width , m_screen.m_height , m_cursorPlane.data (), m_cursorPlane.m_width , m_cursorPlane.m_height , m_cursorX, m_cursorY);
67
+ // TODO: double resolution
68
+ Video::paste (m_screenARGB.data (), m_screen.m_width , m_screen.m_height , m_cursorPlaneARGB.data (), m_cursorPlaneARGB.m_width , m_cursorPlaneARGB.m_height , m_cursorX >> 1 , m_cursorY);
68
69
}
69
70
70
71
// TODO: this should be on the GUI side.
@@ -137,26 +138,24 @@ void RendererSoftwareU32::DrawCursor() noexcept
137
138
const Pixel color = backdropCursorColorToARGB (m_cursorColor);
138
139
const Pixel black{0 };
139
140
140
- int pattern = 0 ;
141
- for (PlaneU32::iterator it = m_cursorPlaneARGB. begin (); it < m_cursorPlaneARGB.end (); )
141
+ PlaneU32::iterator it = m_cursorPlaneARGB. begin () ;
142
+ for (int y = 0 ; y < m_cursorPlaneARGB.m_height ; ++y )
142
143
{
143
- for (int x = 0 ; x < m_cursorPlaneARGB. m_width ; ++ x)
144
+ for (int x = m_cursorPlaneARGB. m_width - 1 ; x >= 0 ; -- x)
144
145
{
145
146
const uint16_t mask = (1 << x);
146
- if (m_cursorPatterns[pattern ] & mask)
147
+ if (m_cursorPatterns[y ] & mask)
147
148
*it = color;
148
149
else
149
150
*it = black;
150
151
++it;
151
152
}
152
-
153
- ++pattern;
154
153
}
155
154
}
156
155
157
- static constexpr uint8_t intByteMult (uint32_t color1, uint32_t color2) noexcept {
158
- return static_cast <uint8_t >(((color1 * (color2 | color2 << 8 )) + 0x8080 ) >> 16 );
159
- }
156
+ // static constexpr uint8_t intByteMult(uint32_t color1, uint32_t color2) noexcept {
157
+ // return static_cast<uint8_t>(((color1 * (color2 | color2 << 8)) + 0x8080) >> 16);
158
+ // }
160
159
161
160
/* * \brief Apply the given Image Contribution Factor to the given color component (V.5.9). */
162
161
static constexpr uint32_t applyICFComponent (const int color, const int icf) noexcept
@@ -179,8 +178,6 @@ static constexpr Pixel applyICF(const Pixel pixel, const int icf) noexcept
179
178
/* * \brief Apply mixing to the given color components after ICF (V.5.9.1). */
180
179
static constexpr Pixel mix (const Pixel a, const Pixel b) noexcept
181
180
{
182
- // return limu8(a + b - 16);
183
-
184
181
uint8_t ra = a >> 16 ;
185
182
uint8_t ga = a >> 8 ;
186
183
uint8_t ba = a;
0 commit comments