libnds
Loading...
Searching...
No Matches
Enumerations | Functions
window.h File Reference

Definitions for sprite and background windows. More...

#include <nds/arm9/background.h>
#include <nds/arm9/sassert.h>
#include <nds/arm9/sprite.h>
#include <nds/arm9/video.h>
#include <nds/dma.h>
#include <nds/memory.h>
#include <nds/ndstypes.h>

Enumerations

enum  WINDOW {
  WINDOW_0 = DISPLAY_WIN0_ON ,
  WINDOW_1 = DISPLAY_WIN1_ON ,
  WINDOW_OBJ = DISPLAY_SPR_WIN_ON ,
  WINDOW_OUT = BIT(16)
}
 The supported windows. More...
 

Functions

void bgWindowDisable (int id, WINDOW window)
 Disables the window on the supplied background.
 
void bgWindowEnable (int id, WINDOW window)
 Enables the window on the supplied background.
 
void oamWindowDisable (OamState *oam, WINDOW w)
 Disables the specified OAM window.
 
void oamWindowEnable (OamState *oam, WINDOW w)
 Enables the specified OAM window.
 
static void windowDisable (WINDOW w)
 Disable the specified window(s) (main engine).
 
static void windowDisableSub (WINDOW w)
 Disable the specified window(s) (sub engine).
 
static void windowEnable (WINDOW w)
 Enable the specified window(s) (main engine).
 
static void windowEnableSub (WINDOW w)
 Enable the specified window(s) (sub engine).
 
void windowSetBounds (WINDOW window, u8 left, u8 top, u8 right, u8 bottom)
 Set the windows bounds (main engine).
 
void windowSetBoundsSub (WINDOW window, u8 left, u8 top, u8 right, u8 bottom)
 Set the windows bounds (sub engine).
 

Detailed Description

Definitions for sprite and background windows.

Enumeration Type Documentation

◆ WINDOW

enum WINDOW

The supported windows.

Enumerator
WINDOW_0 

Window 0.

WINDOW_1 

Window 1.

WINDOW_OBJ 

Object window.

WINDOW_OUT 

Area outside all windows.

Function Documentation

◆ bgWindowDisable()

void bgWindowDisable ( int  id,
WINDOW  window 
)

Disables the window on the supplied background.

Parameters
idBackground ID returned from bgInit or bgInitSub.
windowThe window to disable.

◆ bgWindowEnable()

void bgWindowEnable ( int  id,
WINDOW  window 
)

Enables the window on the supplied background.

Parameters
idBackground ID returned from bgInit or bgInitSub.
windowThe window to enable.

◆ oamWindowDisable()

void oamWindowDisable ( OamState oam,
WINDOW  w 
)

Disables the specified OAM window.

Parameters
oamMust be &oamMain or &oamSub.
wThe window to disable.

◆ oamWindowEnable()

void oamWindowEnable ( OamState oam,
WINDOW  w 
)

Enables the specified OAM window.

Parameters
oamMust be &oamMain or &oamSub.
wThe window to enable.

◆ windowDisable()

static void windowDisable ( WINDOW  w)
inlinestatic

Disable the specified window(s) (main engine).

Parameters
wThe window to set bounds on (may be ORed together).

◆ windowDisableSub()

static void windowDisableSub ( WINDOW  w)
inlinestatic

Disable the specified window(s) (sub engine).

Parameters
wThe window to set bounds on (may be ORed together).

◆ windowEnable()

static void windowEnable ( WINDOW  w)
inlinestatic

Enable the specified window(s) (main engine).

Parameters
wThe window to set bounds on (may be ORed together).

◆ windowEnableSub()

static void windowEnableSub ( WINDOW  w)
inlinestatic

Enable the specified window(s) (sub engine).

Parameters
wThe window to set bounds on (may be ORed together).

◆ windowSetBounds()

void windowSetBounds ( WINDOW  window,
u8  left,
u8  top,
u8  right,
u8  bottom 
)

Set the windows bounds (main engine).

Parameters
windowThe window to set bounds on.
leftThe X coordinate of the left hand side of the rectangle.
topThe Y coordinate of the top of the rectangle.
rightThe X coordinate of the right hand side of the rectangle.
bottomThe Y coordinate of the bottom of the rectangle.

◆ windowSetBoundsSub()

void windowSetBoundsSub ( WINDOW  window,
u8  left,
u8  top,
u8  right,
u8  bottom 
)

Set the windows bounds (sub engine).

Parameters
windowThe window to set bounds on.
leftThe X coordinate of the left hand side of the rectangle.
topThe Y coordinate of the top of the rectangle.
rightThe X coordinate of the right hand side of the rectangle.
bottomThe Y coordinate of the bottom of the rectangle.