Show images in eboot. If you want to display images of a non-full screen size, it is not very good. Therefore, several functions are encapsulated for displaying images or drawing images.
The screen size is 320*240. When the screen is painted, draw a row to the right in the upper left corner of the screen, and then draw the next row. The image to be displayed must be converted into an array. Here we use the BMP 2c.exe software. Because the screen is placed in the vertical direction, that is, 240*320. In this way, the image must be rotated 90 degrees counter-clockwise before it can be converted to the corresponding array.
The following function supports full screen or non-full screen image or color display.
Several key functions are as follows:
// Display the image bool showpicture (INT startx, int starty, int width, int high, const unsigned short * Picture) {unsigned int * pfb; int I, J; if (startx> 320 | starty> 240) return false; If (picture = NULL) return false; pfb = (unsigned int *) eboot_framebuffer_ua_start; For (j = 0; j
Parameter descriptions in the above functions:
Startx: X coordinate at the beginning of the image (subject to screen 320*240)
Starty: Y coordinate at the beginning of the image
Width: The image width (the image width after rotation)
High: The image height (the Image Height after rotation)
Picture: array pointer corresponding to the image
Color: color value. 0xffff indicates white, 0x0000 indicates black