I am working on my graphical terminal. I need some help with terminal scrolling.
1.I need to create a temporary buffer
2.I need to copy selected area of pixels from my main linear frame buffer to my temporary frame buffer.
3.I need to repaint the entire screen with back color.
4.I need to copy my temporary buffer back to my main frame buffer minus wanted Y coordinate.
Now my problems are:
1.How do I reverse engineer this method to get pixel method. So I want to get selected area of pixels from my frame buffer and copy that to another buffer.
Code: Select all
unsigned location = (position.Y * screenWidthBGA * 4) + (position.X * 4);
linearFrameBufferBGA[location + 0] = 0;
linearFrameBufferBGA[location + 2] = color.R;
linearFrameBufferBGA[location + 1] = color.G;
linearFrameBufferBGA[location + 0] = color.B;