1 | /*␊ |
2 | * graphics.h␊ |
3 | * ␊ |
4 | *␊ |
5 | * Created by fassl on 22.12.08.␊ |
6 | * Copyright 2008 __MyCompanyName__. All rights reserved.␊ |
7 | *␊ |
8 | */␊ |
9 | ␊ |
10 | #ifndef __BOOT_GRAPHICS_H␊ |
11 | #define __BOOT_GRAPHICS_H␊ |
12 | ␊ |
13 | //#include "libsaio.h"␊ |
14 | //#include "bootstruct.h"␊ |
15 | //#include "boot.h"␊ |
16 | #include "saio_types.h"␊ |
17 | #include "graphic_utils.h"␊ |
18 | #include "vbe.h"␊ |
19 | ␊ |
20 | #define DEFAULT_SCREEN_WIDTH 1024␊ |
21 | #define DEFAULT_SCREEN_HEIGHT 768␊ |
22 | ␊ |
23 | int loadPngImage(const char *filename, uint16_t *width, uint16_t *height, uint8_t **imageData);␊ |
24 | ␊ |
25 | unsigned long lookUpCLUTIndex( unsigned char index, unsigned char depth );␊ |
26 | ␊ |
27 | void drawColorRectangle( unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char colorIndex );␊ |
28 | void drawDataRectangle( unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char * data );␊ |
29 | int convertImage( unsigned short width, unsigned short height, const unsigned char *imageData, unsigned char **newImageData );␊ |
30 | ␊ |
31 | int initGraphicsMode ();␊ |
32 | ␊ |
33 | void drawCheckerBoard();␊ |
34 | ␊ |
35 | void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *data);␊ |
36 | ␊ |
37 | void drawCheckerBoard();␊ |
38 | void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *data);␊ |
39 | ␊ |
40 | int loadEmbeddedPngImage(uint8_t *pngData, int pngSize, uint16_t *width, uint16_t *height, uint8_t **imageData);␊ |
41 | ␊ |
42 | int getNumberArrayFromProperty( const char * propKey,␊ |
43 | ␉␉␉␉␉␉␉␉unsigned long numbers[],␊ |
44 | ␉␉␉␉␉␉␉␉unsigned long maxArrayCount );␊ |
45 | ␊ |
46 | char *getVBEInfoString();␊ |
47 | char *getVBEModeInfoString();␊ |
48 | unsigned short getVESAModeWithProperties( unsigned short width,␊ |
49 | ␉␉␉␉␉␉␉␉␉␉ unsigned short height,␊ |
50 | ␉␉␉␉␉␉␉␉␉␉ unsigned char bitsPerPixel,␊ |
51 | ␉␉␉␉␉␉␉␉␉␉ unsigned short attributesSet,␊ |
52 | ␉␉␉␉␉␉␉␉␉␉ unsigned short attributesClear,␊ |
53 | ␉␉␉␉␉␉␉␉␉␉ VBEModeInfoBlock * outModeInfo,␊ |
54 | ␉␉␉␉␉␉␉␉␉␉ unsigned short * vesaVersion );␊ |
55 | ␊ |
56 | void getGraphicModeParams(unsigned long params[]);␊ |
57 | ␊ |
58 | #endif /* !__BOOT_GRAPHICS_H */␊ |
59 | |