Functions | |
void | hel_WinCreate (u8 WinNo, u8 Left, u8 Top, u8 Right, u8 Bottom, u8 InsideFlags, u8 OutsideFlags) |
Create a new Window. | |
void | hel_WinCreateEx (u8 WinNo, u8 Left, u8 Top, u8 Right, u8 Bottom, u8 InsideFlags, u8 OutsideFlags, u8 SkipOutsideFlags) |
Create a new Window. | |
void | hel_WinDelete (u8 WinNo) |
Delete an existing window. | |
void | hel_WinHide (u8 WinNo) |
Hide an existing window. | |
void | hel_WinInit (void) |
Initialize the Window-System. | |
void | hel_WinQuit (void) |
Uninitialize the Window-System. | |
void | hel_WinSetInsideFlags (u8 WinNo, u8 InsideFlags) |
Set inside flags of an existing window. | |
void | hel_WinSetOutsideFlags (u8 WinNo, u8 OutsideFlags) |
Set inside flags of an existing window. | |
void | hel_WinSetRegion (u8 WinNo, u8 Left, u8 Top, u8 Right, u8 Bottom) |
Set region of an existing window. | |
void | hel_WinSetVisible (u8 WinNo, u8 Value) |
Set visibility of an existing window. | |
void | hel_WinShow (u8 WinNo) |
Show an existing window. | |
HEL_INLINE void | hel_WinTransmit (void) |
Transmit Window Attributes to Vram. |
The Window Feature can be used to split the screen into different regions. BG0-3, OBJ Layers and Special Effects can be separately enabled and/or disabled in each of these regions.
Most functions get replaced with macros when you switch to release-mode. The Window Attributes are shadowed and need to be transmitted to hardware during Vertical Blank. This method avoids screen tearing!
void hel_WinCreate | ( | u8 | WinNo, | |
u8 | Left, | |||
u8 | Top, | |||
u8 | Right, | |||
u8 | Bottom, | |||
u8 | InsideFlags, | |||
u8 | OutsideFlags | |||
) |
Create a new Window.
The hel_WinCreate function creates a new window.
Please refer to hel_WinCreateEx for details.
SkipOutsideFlags
set to FALSE
. void hel_WinCreateEx | ( | u8 | WinNo, | |
u8 | Left, | |||
u8 | Top, | |||
u8 | Right, | |||
u8 | Bottom, | |||
u8 | InsideFlags, | |||
u8 | OutsideFlags, | |||
u8 | SkipOutsideFlags | |||
) |
Create a new Window.
The hel_WinCreateEx function initializes a new window. Windows can be used, for example, to split the screen into different regions.
[in] | WinNo | Number of Window to initialize, this can be 0, 1 and 2. See notes! |
[in] | Left | Left screen-coordinate of window, specified in pixels. |
[in] | Top | Top screen-coordinate of window, specified in pixels. |
[in] | Right | Right screen-coordinate of window, specified in pixels. |
[in] | Bottom | Bottom screen-coordinate of window, specified in pixels. |
[in] | InsideFlags | The InsideFlags can be used to separately enable and/or disable BG0-3, OBJ layers as well as SpecialFX for the inner-region. The following values can be used and combined for the InsideFlags (See notes!):
|
[in] | OutsideFlags | The OutsideFlags can be used to separately enable and/or disable BG0-3, OBJ layers as well as SpecialFX for the outer-region. Please note that window 0 and 1 share the OutsideFlags . You can only use the OutsideFlags for window 0 and 1 together. The following values can be used and combined for the InsideFlags (See notes!):
|
[in] | SkipOutsideFlags | Since the OutsideFlags are shared for Window 0 and 1, you might don't want to override them when you create another window. When you set SkipOutsideFlags to TRUE , they will not be set! This parameter has no impact on Window 2. |
OBJ_MODE_OBJWINDOW
. Any pixels of these Objects with the palette index 0, are used as Object Window Region. The Object itself is not displayed! For more about Objects, please refer to the Object Documentation and read: hel_ObjCreate OutsideFlags
have to be specified always for Window 2 and SkipOutsideFlags
have to be FALSE
.WIN_BG0
: Enable BG Layer 0 WIN_BG1
: Enable BG Layer 1 WIN_BG2
: Enable BG Layer 2 WIN_BG3
: Enable BG Layer 3 WIN_OBJ
: Enable OBJ Layer WIN_FX
: Enable SpecialFX processing WIN_ALL
: Enable all BG Layers and OBJ Layer (cannot be combined) WIN_NONE
: Disable all BG Layers and OBJ Layer (cannot be combined)hel_WinCreateEx ( 0, // WinNo 0, // Left 16, // Top 240, // Right 144, // Bottom WIN_BG0 | WIN_BG 1 | WIN_FX, // InsideFlags WIN_NONE, // OutsideFlags FALSE // SkipOutsideFlags );
void hel_WinDelete | ( | u8 | WinNo | ) |
Delete an existing window.
The hel_WinDelete function deletes the window specified by WinNo
.
[in] | WinNo | Window-Number |
void hel_WinHide | ( | u8 | WinNo | ) |
Hide an existing window.
The hel_WinHide function hides an existing window.
[in] | WinNo | Window-Number |
void hel_WinInit | ( | void | ) |
Initialize the Window-System.
Call this function before using any other function from the Window-System Module. If you don't initialize the Window-System, the program behaviour is undefined.
void hel_WinQuit | ( | void | ) |
Uninitialize the Window-System.
The hel_WinQuit function uninitializes Window-System and deactivates window processing. It deactivates the window attributes in the display control register and transmits default window attributes to the hardware.
void hel_WinSetInsideFlags | ( | u8 | WinNo, | |
u8 | InsideFlags | |||
) |
Set inside flags of an existing window.
The hel_WinSetInsideFlags function sets the InsideFlags of an existing window.
[in] | WinNo | Window-Number |
[in] | InsideFlags | Please refer to hel_WinInit |
hel_WinSetInsideFlags ( 0, // WinNo WIN_BG2 | WIN_FX // InsideFlags );
void hel_WinSetOutsideFlags | ( | u8 | WinNo, | |
u8 | OutsideFlags | |||
) |
Set inside flags of an existing window.
The hel_WinSetInsideFlags function sets the InsideFlags of an existing window.
[in] | WinNo | Window-Number |
[in] | OutsideFlags | Please refer to hel_WinCreateEx |
hel_WinSetOutsideFlags ( 0, // WinNo WIN_ALL // InsideFlags );
void hel_WinSetRegion | ( | u8 | WinNo, | |
u8 | Left, | |||
u8 | Top, | |||
u8 | Right, | |||
u8 | Bottom | |||
) |
Set region of an existing window.
The hel_WinSetRegion function sets the region of an existing window.
[in] | WinNo | Window-Number |
[in] | Left | Left screen-coordinate of window, specified in pixels. |
[in] | Top | Top screen-coordinate of window, specified in pixels. |
[in] | Right | Right screen-coordinate of window, specified in pixels. |
[in] | Bottom | Bottom screen-coordinate of window, specified in pixels. |
void hel_WinSetVisible | ( | u8 | WinNo, | |
u8 | Value | |||
) |
Set visibility of an existing window.
The hel_WinSetVisible function either shows or hides the Window specified by WinNo
.
[in] | WinNo | Window-Number |
[in] | Value | TRUE to show, FALSE to hide |
hel_WinSetVisible ( 0, // WinNo FALSE // Value );
void hel_WinShow | ( | u8 | WinNo | ) |
Show an existing window.
The hel_WinShow function shows an existing window, which was made invisible from a previous call to hel_WinHide.
[in] | WinNo | Window-Number |
HEL_INLINE void hel_WinTransmit | ( | void | ) |
Transmit Window Attributes to Vram.
The hel_WinTransmit function must be called during VBlank to transmit the shadowed window attributes to hardware.