mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 15:10:28 +00:00
Cleaning up leftover scraps from graphics code hacking, reimplementing GrCalcScreenUpdates
This commit is contained in:
parent
05febc9803
commit
f8c9845026
1 changed files with 18 additions and 28 deletions
|
@ -362,35 +362,36 @@ U0 DCBlotColor8(CDC *dc, CDC *img)
|
|||
|
||||
U0 GrCalcScreenUpdates()
|
||||
{
|
||||
U16 *screen, *last_screen = gr.screen_cache;
|
||||
U64 i, *src = text.raw_screen, *dst = text.fb_alias, diffs_size = GR_WIDTH * GR_HEIGHT / 2;
|
||||
U8 *screen, *last_screen = gr.screen_cache;
|
||||
U32 i, *src = text.raw_screen, *dst = text.fb_alias, diffs_size = GR_WIDTH * GR_HEIGHT;
|
||||
U64 x, y, w = sys_framebuffer_pitch / (sys_framebuffer_bpp / 8);
|
||||
|
||||
if (gr.screen_zoom == 1)
|
||||
screen = gr.dc2->body;
|
||||
else
|
||||
screen = gr.zoomed_dc->body;
|
||||
|
||||
/*
|
||||
for (i = 0; i < diffs_size; i++)
|
||||
for (y = 0; y < GR_HEIGHT; y++)
|
||||
{
|
||||
for (x = 0; x < GR_WIDTH; x++)
|
||||
{
|
||||
i = x + y * GR_WIDTH;
|
||||
if (screen[i] != last_screen[i])
|
||||
dst[i] = src[i];
|
||||
{
|
||||
dst = text.fb_alias + x + y * w;
|
||||
src = text.raw_screen + x + y * w;
|
||||
*dst = *src;
|
||||
}
|
||||
*/
|
||||
// MemCopy(gr.screen_cache, screen, diffs_size * 2);
|
||||
}
|
||||
}
|
||||
MemCopy(gr.screen_cache, screen, diffs_size * 2);
|
||||
}
|
||||
|
||||
U0 GrUpdateScreen32()
|
||||
{
|
||||
// U64 size, *dst;
|
||||
U64 size;
|
||||
U64 size, x, y, wi, yi, w = sys_framebuffer_pitch / (sys_framebuffer_bpp / 8);
|
||||
U32 *dst;
|
||||
U8 *src;
|
||||
U64 x;
|
||||
U64 y;
|
||||
U64 w = sys_framebuffer_pitch / (sys_framebuffer_bpp / 8);
|
||||
U64 wi;
|
||||
U64 yi;
|
||||
|
||||
if (gr.screen_zoom == 1)
|
||||
{
|
||||
|
@ -406,24 +407,13 @@ U0 GrUpdateScreen32()
|
|||
size = src + gr.zoomed_dc->height * gr.zoomed_dc->width_internal;
|
||||
wi = gr.zoomed_dc->width_internal;
|
||||
yi = gr.zoomed_dc->height;
|
||||
// SysLog("%d\n", wi);
|
||||
// SysLog("%d\n\n", yi);
|
||||
}
|
||||
// dst = text.raw_screen;
|
||||
// while (src < size) // need to do 1 pixel at a time... //draw 2 pixels at a time
|
||||
// *dst++ = gr_palette[*src++ & 0xFF] | gr_palette[*src++ & 0xFF] << 32;
|
||||
|
||||
for (y = 0; y < yi; y++)
|
||||
{
|
||||
for (x = 0; x < wi; x++)
|
||||
{
|
||||
// dst = text.raw_screen[x + (y * sys_framebuffer_width)];
|
||||
dst = text.fb_alias + x + (y * w);
|
||||
// dst = text.raw_screen + x + (y * w);
|
||||
// *dst = gr_palette[*src++ & 0xFF];
|
||||
// *dst = gr_palette[src[x + (y * sys_framebuffer_width)] & 0xFF];
|
||||
*dst = gr_palette[src[x + (y * wi)] & 0xFF];
|
||||
// *dst = 0xFFFF0000;
|
||||
dst = text.raw_screen + x + y * w;
|
||||
*dst = gr_palette[src[x + y * wi] & 0xFF];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue