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.28; author jandujar; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2005.11.02.08.30.28; author jandujar; state Exp; branches ; next ; desc @@ 1.1 log @Initial revision @ text @ PA_lib: Window system

Window system


Defines

#define PA_SetWin1XY(screen, x1, y1, x2, y2)   {WIN1X(screen) = x2 + ((x1) << 8); WIN1Y(screen) = y2 + ((y1) << 8);}
 Set the X et Y coordinates of the rectangular second window. You'll also have to use PA_SetWin1 to chose which Backgrounds are visible and if sprites are too...
#define PA_EnableWin0(screen, bg_sprites)   {DISPCNTL(screen) |= WINDOW0; WININ(screen) &= 255; WININ(screen) |= bg_sprites;}
 Enable and set which backgrounds will be visible and whether sprites will too or not, for Window 0. You'll then have to configure it with PA_SetWin0XY
#define PA_DisableWin0(screen)   DISPCNTL(screen) &= ~WINDOW0
 Disable the first window...
#define PA_EnableWin1(screen, bg_sprites)   {DISPCNTL(screen) |= WINDOW1; WININ(screen) &= 255; WININ(screen) |= (bg_sprites << 8);}
 Enable and set which backgrounds will be visible and whether sprites will too or not, for Window 1. You'll then have to configure it with PA_SetWin1XY
#define PA_DisableWin1(screen)   DISPCNTL(screen) &= ~WINDOW1
 Disable the second window...
#define PA_EnableWinObj(screen, bg_sprites)   {DISPCNTL(screen) |= WINDOWOBJ; WINOUT(screen) &= 255; WINOUT |= (bg_sprites << 8);}
 Enable and set which backgrounds will be visible and whether sprites will too or not, for Object Winodw (created from sprites in Window mode).
#define PA_DisableWinObj(screen)   DISPCNTL(screen) &= ~WINDOWOBJ
 Disable the object window...
#define PA_SetOutWin(screen, bg_sprites)   {WINOUT(screen) &= ~255; WINOUT(screen) |= bg_sprites;}
 Set which backgrounds will be visible and whether sprites will too or not, outside of the windows

Functions

void PA_SetWin0XY (bool screen, u8 x1, u8 y1, u8 x2, u8 y2)
void PA_WindowFade (bool screen, u8 type, u8 time)
 This allows you to do fade in and out, using the window system

Detailed Description

Set up 2 windows and a possible object window...

Define Documentation

#define PA_DisableWin0 screen   )     DISPCNTL(screen) &= ~WINDOW0
 

Disable the first window...

Parameters:
screen Screen...

#define PA_DisableWin1 screen   )     DISPCNTL(screen) &= ~WINDOW1
 

Disable the second window...

Parameters:
screen Screen...

#define PA_DisableWinObj screen   )     DISPCNTL(screen) &= ~WINDOWOBJ
 

Disable the object window...

Parameters:
screen Screen...

#define PA_EnableWin0 screen,
bg_sprites   )     {DISPCNTL(screen) |= WINDOW0; WININ(screen) &= 255; WININ(screen) |= bg_sprites;}
 

Enable and set which backgrounds will be visible and whether sprites will too or not, for Window 0. You'll then have to configure it with PA_SetWin0XY

Parameters:
screen Screen...
bg_sprites Backgrounds and sprites, use the following macro : WIN_BG0 | WIN_BG1 | WIN_BG2 | WIN_BG3 | WIN_OBJ | WIN_SFX (for special effects)

#define PA_EnableWin1 screen,
bg_sprites   )     {DISPCNTL(screen) |= WINDOW1; WININ(screen) &= 255; WININ(screen) |= (bg_sprites << 8);}
 

Enable and set which backgrounds will be visible and whether sprites will too or not, for Window 1. You'll then have to configure it with PA_SetWin1XY

Parameters:
screen Screen...
bg_sprites Backgrounds and sprites, use the following macro : WIN_BG0 | WIN_BG1 | WIN_BG2 | WIN_BG3 | WIN_OBJ | WIN_SFX (for special effects)

#define PA_EnableWinObj screen,
bg_sprites   )     {DISPCNTL(screen) |= WINDOWOBJ; WINOUT(screen) &= 255; WINOUT |= (bg_sprites << 8);}
 

Enable and set which backgrounds will be visible and whether sprites will too or not, for Object Winodw (created from sprites in Window mode).

Parameters:
screen Screen...
bg_sprites Backgrounds and sprites, use the following macro : WIN_BG0 | WIN_BG1 | WIN_BG2 | WIN_BG3 | WIN_OBJ | WIN_SFX (for special effects)

#define PA_SetOutWin screen,
bg_sprites   )     {WINOUT(screen) &= ~255; WINOUT(screen) |= bg_sprites;}
 

Set which backgrounds will be visible and whether sprites will too or not, outside of the windows

Parameters:
screen Screen...
bg_sprites Backgrounds and sprites, use the following macro : WIN_BG0 | WIN_BG1 | WIN_BG2 | WIN_BG3 | WIN_OBJ

#define PA_SetWin1XY screen,
x1,
y1,
x2,
y2   )     {WIN1X(screen) = x2 + ((x1) << 8); WIN1Y(screen) = y2 + ((y1) << 8);}
 

Set the X et Y coordinates of the rectangular second window. You'll also have to use PA_SetWin1 to chose which Backgrounds are visible and if sprites are too...

Parameters:
screen Screen...
x1 X coordinate of the top left point
y1 Y coordinate of the top left point
x2 X coordinate of the bottom right point
y2 Y coordinate of the bottom right point


Function Documentation

inline void PA_WindowFade bool  screen,
u8  type,
u8  time
[inline]
 

This allows you to do fade in and out, using the window system

Parameters:
screen Screen...
type Type... 8 different types are available (0-7)
time Time, from 0 to 32 (included). 0 is a completely vuable screen, 32 is completely out


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