PAlib: PA_Window.h File Reference

Main Page | Modules | File List | Globals | Search for

# PA_Window.h File Reference

Window options... More...

Go to the source code of this file.

## Defines

#define | WIN_BG0 1
#define | WIN_BG1 2
#define | WIN_BG2 4
#define | WIN_BG3 8
#define | WIN_OBJ 16
#define | WIN_SFX 32
#define | DISPCNTL(screen) _REG16(0x04000000 + (screen * 0x1000))
#define | DISPCNTH(screen) _REG16(0x04000002 + (screen * 0x1000))
#define | WINDOW0 (1 << 13)
#define | WINDOW1 (1 << 14)
#define | WINDOWOBJ (1 << 15)
#define | WIN0X(screen) _REG16(0x04000040 + (screen * 0x1000))
#define | WIN0Y(screen) _REG16(0x04000044 + (screen * 0x1000))
#define | WIN1X(screen) _REG16(0x04000042 + (screen * 0x1000))
#define | WIN1Y(screen) _REG16(0x04000046 + (screen * 0x1000))
#define | WININ(screen) _REG16(0x04000048 + (screen * 0x1000))
#define | WINOUT(screen) _REG16(0x0400004A + (screen * 0x1000))
#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 (u8 screen, u8 x1, u8 y1, u8 x2, u8 y2)
void | PA_WindowFade (u8 screen, u8 type, u8 time)
| This allows you to do fade in and out, using the window system

## Variables

const s16 | winfades [][4]

## Detailed Description

Window options...

Window options, nothing much to say.