Fake 16bit bitmap mode


Macros

#define PA_LoadFake16bitBitmap(screen, bitmap)   DMA_Copy(bitmap, (void*)PA_DrawFake16[screen], 256*192, DMA_16NOW)
 [nothing]
#define PA_ClearFake16bitBg(screen)   DMA_Copy(Blank, (void*)PA_DrawFake16[screen], 256*192, DMA_16NOW)
#define PA_PutFake16bitPixel(screen, x, y, color)   PA_DrawFake16[screen][(x) + 256 * (y)] = color
 [nothing]
#define PA_GetFake16bitPixel(screen, x, y)   PA_DrawFake16[screen][(x) + 256 * (y)]
 [nothing]
#define PA_DrawFake16bitRect(screen, x1, y1, x2, y2, color)
 [nothing]
#define PA_Fake16bitLoadBmpEx(screen, bmp, x, y)   PA_LoadBmpToBuffer(PA_DrawFake16[screen], x, y, bmp, 256)
 [nothing]
#define PA_Fake16bitLoadBmp(screen, bmp)   PA_Fake16bitLoadBmpEx(screen, bmp, 0, 0)
 [nothing]
#define PA_Fake16bitLoadGifXY(screen, gif, x, y)   DecodeGif((const u8*)gif, (u8*)(PA_DrawFake16[screen] + x + (y<<8)), (u16*)0x05000000, 1, 256);
#define PA_Fake16bitLoadGif(screen, gif)   PA_Fake16bitLoadGifXY(screen, gif, 0, 0)
 [nothing]
#define PA_Fake16bitLoadJpeg(screen, jpeg)   JPEG_DecompressImage((u8*)jpeg, PA_DrawFake16[screen], 256, 192)
 [nothing]

Fonctions

void PA_InitFake16bitBg (u8 screen, u8 prio)
 [nothing]
void PA_DrawFake16bitLine (u8 screen, u16 x1, u16 y1, u16 x2, u16 y2, u16 color)
 [nothing]

Description détaillée

Functions to handle fake 16 bit backgrounds that take up less memory than real ones!

Documentation des macros

#define PA_ClearFake16bitBg ( screen   )     DMA_Copy(Blank, (void*)PA_DrawFake16[screen], 256*192, DMA_16NOW)

#define PA_DrawFake16bitRect ( screen,
x1,
y1,
x2,
y2,
color   ) 

Valeur :

{PA_DrawFake16bitLine(screen, x1, y1, x2, y1, color);\
        PA_DrawFake16bitLine(screen, x1, y1, x1, y2, color);\
        PA_DrawFake16bitLine(screen, x2, y1, x2, y2, color);\
        PA_DrawFake16bitLine(screen, x1, y2, x2, y2, color);}
[nothing]

Paramètres:
screen [nothing]
x1 Position X du premier point. Attention, si X n'est pas compris entre 0 et 255, le résultat ne sera pas celui escompté
y1 Position Y du premier point. Attention, si Y n'est pas compris entre 0 et 191, le résultat ne sera pas celui escompté
x2 Position X du deuxième point. Attention, si X n'est pas compris entre 0 et 255, le résultat ne sera pas celui escompté
y2 Position Y du deuxième point. Attention, si Y n'est pas compris entre 0 et 191, le résultat ne sera pas celui escompté
color Couleur de 15 bits.On peut utiliser la macro PA_RGB pour entrer les valeurs RGB...

#define PA_Fake16bitLoadBmp ( screen,
bmp   )     PA_Fake16bitLoadBmpEx(screen, bmp, 0, 0)

[nothing]

Paramètres:
screen Choix de l'écran (0 ou 1)
bmp image au format BMP...

#define PA_Fake16bitLoadBmpEx ( screen,
bmp,
x,
 )     PA_LoadBmpToBuffer(PA_DrawFake16[screen], x, y, bmp, 256)

[nothing]

Paramètres:
screen Choix de l'écran (0 ou 1)
x Position X du coin supérieur gauche
y Position Y du coin supérieur gauche
bmp image au format BMP...

#define PA_Fake16bitLoadGif ( screen,
gif   )     PA_Fake16bitLoadGifXY(screen, gif, 0, 0)

[nothing]

Paramètres:
screen Choix de l'écran (0 ou 1)
gif image au format Gif...

#define PA_Fake16bitLoadGifXY ( screen,
gif,
x,
 )     DecodeGif((const u8*)gif, (u8*)(PA_DrawFake16[screen] + x + (y<<8)), (u16*)0x05000000, 1, 256);

#define PA_Fake16bitLoadJpeg ( screen,
jpeg   )     JPEG_DecompressImage((u8*)jpeg, PA_DrawFake16[screen], 256, 192)

[nothing]

Paramètres:
screen Choix de l'écran (0 ou 1)
jpeg image au format jpeg...

#define PA_GetFake16bitPixel ( screen,
x,
 )     PA_DrawFake16[screen][(x) + 256 * (y)]

[nothing]

Paramètres:
screen [nothing]
x Position X du point. Attention, si X n'est pas compris entre 0 et 255, le résultat ne sera pas celui escompté
y Position Y du point. Attention, si Y n'est pas compris entre 0 et 191, le résultat ne sera pas celui escompté

#define PA_LoadFake16bitBitmap ( screen,
bitmap   )     DMA_Copy(bitmap, (void*)PA_DrawFake16[screen], 256*192, DMA_16NOW)

[nothing]

Paramètres:
screen [nothing]
bitmap [nothing]

#define PA_PutFake16bitPixel ( screen,
x,
y,
color   )     PA_DrawFake16[screen][(x) + 256 * (y)] = color

[nothing]

Paramètres:
screen [nothing]
x Position X du point. Attention, si X n'est pas compris entre 0 et 255, le résultat ne sera pas celui escompté
y Position Y du point. Attention, si Y n'est pas compris entre 0 et 191, le résultat ne sera pas celui escompté
color Couleur de 15 bits.On peut utiliser la macro PA_RGB pour entrer les valeurs RGB...


Documentation des fonctions

void PA_DrawFake16bitLine ( u8  screen,
u16  x1,
u16  y1,
u16  x2,
u16  y2,
u16  color 
)

[nothing]

Paramètres:
screen [nothing]
x1 Position X du premier point. Attention, si X n'est pas compris entre 0 et 255, le résultat ne sera pas celui escompté
y1 Position Y du premier point. Attention, si Y n'est pas compris entre 0 et 191, le résultat ne sera pas celui escompté
x2 Position X du deuxième point. Attention, si X n'est pas compris entre 0 et 255, le résultat ne sera pas celui escompté
y2 Position Y du deuxième point. Attention, si Y n'est pas compris entre 0 et 191, le résultat ne sera pas celui escompté
color Couleur de 15 bits.On peut utiliser la macro PA_RGB pour entrer les valeurs RGB...

void PA_InitFake16bitBg ( u8  screen,
u8  prio 
)

[nothing]

Paramètres:
screen [nothing]
prio [nothing]


Généré le Sat Jun 13 12:57:00 2009 pour PAlib - Programmer's Arsenal par  doxygen 1.5.8