PA_API.h

Go to the documentation of this file.
00001 #ifndef _PA_PAPI
00002 #define _PA_API
00003 
00004 #ifdef __cplusplus
00005 extern "C" {
00006 #endif
00007 
00014 #include "PA_Draw.h"
00015 #include "PA_Text.h"
00016 #include "PA_Palette.h"
00017 
00018 
00019 
00026 typedef struct{
00027        s8 n; // Nombre
00028        u8 first, last; // Premier et dernier
00029        u8 free[128]; //Emplacements dispos...
00030        u8 touched; // Touché
00031        u8 *image[4]; // Different images...
00032 } PAPI_all;
00033 
00034 typedef struct{
00035        bool *var; // Variable à changer, stocke l'état...
00036        bool value; // valeur, pour voir si l'utilisateur a changé la valeur ou pas...
00037        s16 x, y; // Poour la position...
00038        s8 previous, next; // Pour savoir qui tester avant/apres
00039 } PAPI_checks;
00040 
00041 extern PAPI_checks PAPI_check[2][32]; // 32 possibles par écran
00042 extern PAPI_all PAPI_checkinfo[2];
00043 
00044 typedef struct{
00045        fp funct; // Variable à changer, stocke l'état...
00046        char text[20]; // Texte à afficher sur le bouton...
00047        s8 textsize; // Taille du texte, 2 par défaut
00048        u8 color; // Couleur de la palette pour le texte
00049        s16 x, y, lx, ly; // Pour la position... et la taille
00050        s8 previous, next; // Pour savoir qui tester avant/apres
00051 } PAPI_buttons;
00052 
00053 typedef struct{
00054        s32* var; // Variable à changer, stocke l'état...
00055        s32 value; // valeur, pour voir si l'utilisateur a changé la valeur ou pas...
00056        bool sens; // 0 pour hori, 1 pour verti
00057        s32 min, max; // Valeurs min et max à prendre
00058        s16 x, y, lx; // Pour la position... et la taille
00059        s8 previous, next; // Pour savoir qui tester avant/apres
00060 } PAPI_sliders;
00061 
00062 extern PAPI_buttons PAPI_button[2][64]; //64 possibles par écran
00063 extern PAPI_all PAPI_buttoninfo[2];
00064 
00065 
00066 // Init functions
00067 
00068 
00077 void PAPI_Init(bool screen);
00078 
00079 
00094 void PAPI_SetImages(bool screen, void *images, void *palette);
00095 
00104 void PAPI_ReInit(bool screen);
00105 
00114 void PAPI_LoadPal(bool screen);
00115 
00116 
00134 u8 PAPI_CreateCheck(bool screen, s16 x, s16 y, bool *var);
00135 
00136 
00137 
00138 
00144 void PAPI_CheckCheck(void);
00145 
00146 
00147 
00180 u8 PAPI_CreateButton(bool screen, s16 x, s16 y, s16 lx, s16 ly, fp funct, char* text, u8 color, s8 textsize);
00181 
00187 void PAPI_CheckButton(void);
00188 
00189 
00190 
00191  // end of PAPI
00193 #ifdef __cplusplus
00194 }
00195 #endif
00196 
00197 #endif
00198 
00199 

Generated on Sat Feb 4 17:32:54 2006 for PAlib by  doxygen 1.3.9.1