Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I've developed my os for quite a while and recently decided to work a little on the GUI before continuing further. I've setup a vesa mode (1024x768x32) and can draw text and stuff, however I'm kind of stuck at this one problem, I try drawing 24 bit bitmaps but the output the image is like 1/4th of the original size.
Uncommenting the commented code, I get the original image dimensions, however the image quality goes down cos I stretch the image.
I've attached a picture of the output I get when I try to draw a background image.
I don't see what type of pointer you use, but in C/C++ pointer if you add 1 to pointer to u32, it increase the address by 4, not by one. There is no 3 byte format to work with memory, so instead of that you could do following:
As far as I know 24-bit .bmp saved from paint are bottom-up so Y dimension goes backwards, while writing in the video buffer goes upwards. Y dimension must be loopen in the outer loop. And 24-bit .bmp saved from paint has memory as BB GG RR, but video buffer is XX RR GG BB, so that way should display it normal.
ALCA OS: Project temporarity suspended! Current state: real-mode kernel-FS reader...
Masterkiller wrote:I don't see what type of pointer you use, but in C/C++ pointer if you add 1 to pointer to u32, it increase the address by 4, not by one. There is no 3 byte format to work with memory, so instead of that you could do following:
Can't believe I overlooked that changing it to u8 * works, thanks a lot masterkiller..
Masterkiller wrote:As far as I know 24-bit .bmp saved from paint are bottom-up so Y dimension goes backwards, while writing in the video buffer goes upwards. Y dimension must be loopen in the outer loop. And 24-bit .bmp saved from paint has memory as BB GG RR, but video buffer is XX RR GG BB, so that way should display it normal.
Ah yea I kinda flip the row order of the images in photoshop before saving to bmp format. Thats why i coded it that way.