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