-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Console drawing library #26
base: master
Are you sure you want to change the base?
Conversation
Ok, so lets start with how and why it matches the criteria laid out at: https://github.com/HACKERCHANNEL/PSL1GHT/wiki/Framebuffer-Console-Requirements For each bolded heading list how your code meets the criteria. :) |
Also for us joes at work, do you have screenshots of it in action? :) |
It must not have any dependencies on psl1ght.
No fixed font sizes.
Flexible console and render target(s).
There is 3 separate """classes""" CONSOLE_VIDEO < handles output buffer and creates a movable viewport of same or smaller size into it; it can be set to 1/2/4 byte per pixel in resolution and you can initialize as many as you want. Also, one can initialize multiple CONSOLE_VIDEO handles to a same backing output buffer ( maybe because you want to have 2 different viewports or logical windows ) or to different backing buffers ( double buffering or different texture outputs or whatever... ) CONSOLE_LOGIC < handles "blind" or aseptic console logic of NxM cols*rows; it just handles Attr+Char pairs per cell and has cursor and mousepointer handling; also tracks changes for a "get delta changes" functionality, useful for later drawing changes only ( optimization ). You can initialize and use as many handles as you want CONSOLE_RENDER < handles the rendering of any CONSOLE_LOGIC to any CONSOLE_VIDEO; it takes the font+cursor+mousepointer gliph bitmaps, SlotWidth and SlotHeight, etc. All the "drawing" stuff. But the thing is that it doesnt take CONSOLE_VIDEO and CONSOLE_LOGIC in initialization time. So, later, you can do CONSOLE_RENDER_Render(ConsoleRenderHandle, ConsoleLogicHandle, ConsoleVideoHandle); passing any ConsoleLogic and any ConsoleVideo; so you can use the same ConsoleRenderHandle for many different viewports/outputs and for drawing different consoles independently etc. Double buffering.
No global variables.
Transparency.
Reading from the framebuffer.
Non-Scrolling text. This is going to be my next work; very simple scroll and a decent printf. There will be a CONSOLE_MISC or maybe called CONSOLE_TERMINAL or something like that that works over CONSOLE_LOGIC handles. But id like to fix some small glitches first and discuss possible polishing changes you may suggest or other requirements or so... Hoping this answers it... Finally, here are some shots: http://yfrog.com/03photo1mpj |
…ything functionally right now, but room for some optimizations
…ss ); Added 8x8X2 and 8x16X2
Added Makefile for libconsole
…ore when reordering )
…libs are and consoleTest can be built as other samples are
changed Console.h, ConsoleBase.h a bit
phiren, these are the files needed, I did not add a MakeFile and I still have some doubts. Also, I did not add a sample... plus there is still some small glitch to fix.
Thank you...