head 1.1; branch 1.1.1; access ; symbols start:1.1.1.1 PAlibDoc:1.1.1; locks ; strict; comment @# @; 1.1 date 2005.11.02.08.30.25; author jandujar; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2005.11.02.08.30.25; author jandujar; state Exp; branches ; next ; desc @@ 1.1 log @Initial revision @ text @ PA_lib: PA API functions

PA API functions


Data Structures

struct  PAPI_all
struct  PAPI_checks
struct  PAPI_buttons
struct  PAPI_sliders

Functions

void PAPI_Init (bool screen)
 Initialise the PA API system. MUST be used prior to any API usage. MUST be set on a 8bit background, don't forget to intialise it too !
void PAPI_SetImages (bool screen, void *images, void *palette)
 Change the image set used by the API system. This allows you to have your own buttons and everything... I'll explain later on how to correctly use this
void PAPI_ReInit (bool screen)
 ReInitialise the PA API system. This resets all the buttons, checkboxess, and all, you'll just have to clean the screen
void PAPI_LoadPal (bool screen)
 Loads the API palette in background colors 208. Use this each time you change the background palette
u8 PAPI_CreateCheck (bool screen, s16 x, s16 y, bool *var)
 Creates a new Checkbox. Returns the number of the checkbox in the API system
void PAPI_CheckCheck (void)
 Checks all the checkboxes for a new press
u8 PAPI_CreateButton (bool screen, s16 x, s16 y, s16 lx, s16 ly, fp funct, char *text, u8 color, s8 textsize)
 Creates a new Button. Returns the number of the button in the API system
void PAPI_CheckButton (void)
 Checks all the buttons for a new press

Variables

PAPI_checks PAPI_check [2][32]
PAPI_all PAPI_checkinfo [2]
PAPI_buttons PAPI_button [2][64]
PAPI_all PAPI_buttoninfo [2]

Detailed Description

PA API functions

Function Documentation

u8 PAPI_CreateButton bool  screen,
s16  x,
s16  y,
s16  lx,
s16  ly,
fp  funct,
char *  text,
u8  color,
s8  textsize
 

Creates a new Button. Returns the number of the button in the API system

Parameters:
screen Screen on which to create the button
x X position of the upper left corner
y Y position of the upper left corner
lx Width (typically 16 or 32, but can be anything)
ly Height...
funct Fonction to load when the button is pressed. Usage : &functionname
text Text to show on the button
color Text color in the palette index (0-255)
textsize Text size, typically 1, but can be bigger for big buttons. !!!! the define TEXT_ALLSIZES must be set in PA9.h (and install.bat used again) to enable other sizes than 1 !!!!

u8 PAPI_CreateCheck bool  screen,
s16  x,
s16  y,
bool *  var
 

Creates a new Checkbox. Returns the number of the checkbox in the API system

Parameters:
screen Screen on which to create the checkbox
x X position of the upper left corner
y Y position of the upper left corner
var Bool variable to change when the checkbox is touched. Usage : &variablename

void PAPI_Init bool  screen  ) 
 

Initialise the PA API system. MUST be used prior to any API usage. MUST be set on a 8bit background, don't forget to intialise it too !

Parameters:
screen Screen on which to initialise it

void PAPI_LoadPal bool  screen  ) 
 

Loads the API palette in background colors 208. Use this each time you change the background palette

Parameters:
screen Screen on which to initialise it

void PAPI_ReInit bool  screen  ) 
 

ReInitialise the PA API system. This resets all the buttons, checkboxess, and all, you'll just have to clean the screen

Parameters:
screen Screen on which to initialise it

void PAPI_SetImages bool  screen,
void *  images,
void *  palette
 

Change the image set used by the API system. This allows you to have your own buttons and everything... I'll explain later on how to correctly use this

Parameters:
screen Screen on which to initialise it
images Image set
palette Palette used by the image set, 16 colors...


Generated on Fri Oct 28 23:16:51 2005 for PA_lib by  doxygen 1.3.9.1
@ 1.1.1.1 log @Initial import of PalibDoc, begin on PAlib0.64b @ text @@