Defines | |
#define | hel_ObjCreate(pSrc, ObjShape, ObjSize, ObjMode, ColMode, PalNo, Mosaic, HFlip, VFlip, Prio, DblSize, X, Y) |
Create an object. | |
#define | hel_ObjCreate16(pSrc, ObjShape, ObjSize, ObjMode, PalNo, X, Y) |
Create a 16 color object. | |
#define | hel_ObjCreate256(pSrc, ObjShape, ObjSize, ObjMode, X, Y) |
Create a 256 color object. | |
#define | HEL_SUBSYSTEM_OBJ_REQUIREDMEMORY |
Required memory for the Object System. | |
#define | OBJ_ATTR0(ObjShape, ObjMode, ColMode, Mosaic, DblSize, Y) |
Compose object attribute 0 value. | |
#define | OBJ_ATTR1(ObjSize, VFlip, HFlip, X) |
Compose object attribute 1 value. | |
#define | OBJ_ATTR2(PalNo, Prio) |
Compose object attribute 2 value. | |
Functions | |
void | hel_ObjBackup (void *pDest, u32 Flags) |
Backup Object-System. | |
void | hel_ObjBringToFront (THandle Handle) |
Bring an object to front. | |
void | hel_ObjClearOAM (void) |
Clear Object Attribute Memory (OAM). | |
THandle ATTR_FASTFUNC | hel_ObjClone (THandle Handle, s32 X, s32 Y) |
Clone an object. | |
THandle ATTR_FASTFUNC | hel_ObjCreateEx (const void *pSrc, u32 Attr0, u32 Attr1, u32 Attr2) |
Create an object. | |
void ATTR_FASTFUNC | hel_ObjDelete (THandle Handle) |
Delete an object. | |
u32 | hel_ObjExists (THandle Handle) |
Check if an object exist. | |
u16 ATTR_WARNUNUSEDRESULT | hel_ObjGetAttribute (THandle Handle, u32 AttributeNumber) |
Get object attributes. | |
u32 | hel_ObjGetColorMode (THandle Handle) |
Check if an object uses 256 or 16 colors. | |
THandle | hel_ObjGetFirst (void) |
Get the first object handle. | |
u32 ATTR_WARNUNUSEDRESULT | hel_ObjGetFreeSlots (void) |
Get amount of free object slots. | |
u32 | hel_ObjGetGfxSlot (THandle Handle) |
Get the graphic slot of an object. | |
u32 | hel_ObjGetHeight (THandle Handle) |
Get Height. | |
THandle | hel_ObjGetLast (void) |
Get the last object handle. | |
u32 | hel_ObjGetMode (THandle Handle) |
Get the mode of an object. | |
THandle | hel_ObjGetNext (THandle Handle) |
Get handle of next object. | |
u32 | hel_ObjGetOamSlot (THandle Handle) |
Get Object Attribute Memory Slot. | |
u32 | hel_ObjGetPalette (THandle Handle) |
Get Palettebank. | |
THandle | hel_ObjGetPrev (THandle Handle) |
Get handle of previous object. | |
u32 | hel_ObjGetPrio (THandle Handle) |
Get object priority. | |
u32 | hel_ObjGetShape (THandle Handle) |
Get object shape. | |
u32 | hel_ObjGetSize (THandle Handle) |
Get object size. | |
u32 | hel_ObjGetSizeU16 (THandle Handle) |
Get object size in halfwords. | |
u32 | hel_ObjGetWidth (THandle Handle) |
Get Width. | |
u32 | hel_ObjGetX (THandle Handle) |
Get X Coordinate. | |
u32 | hel_ObjGetY (THandle Handle) |
Get Y Coordinate. | |
void | hel_ObjHideAll (void) |
Hide all objects. | |
void | hel_ObjInit (void *pBuffer) |
Initialize Object-System. | |
u32 | hel_ObjIsClone (THandle Handle) |
Check if an object is a clone. | |
u32 | hel_ObjIsHFlip (THandle Handle) |
Check if an object is horizontally flipped. | |
u32 | hel_ObjIsMosaic (THandle Handle) |
Check if an object has mosaic attribute set. | |
u32 | hel_ObjIsRotScale (THandle Handle) |
Check if an object has the rotation/scaling attribute set. | |
u32 | hel_ObjIsVFlip (THandle Handle) |
Check if an object is vertically flipped. | |
u32 | hel_ObjIsVisible (THandle Handle) |
Check if an object is visible. | |
void | hel_ObjQuit (void) |
Uninitialize Object-System. | |
void | hel_ObjRestore (const void *pSource, u32 Flags) |
Restore Object-System backup. | |
void | hel_ObjSelectRotScale (THandle Handle, u8 RotNo) |
Select a rotation/scaling parameter. | |
void | hel_ObjSendToBack (THandle Handle) |
Set an object behind all other objects. | |
void | hel_ObjSetBefore (THandle Handle, THandle TargetHandle) |
Change Z-Order of an object. | |
void | hel_ObjSetBehind (THandle Handle, THandle TargetHandle) |
Change Z-Order of an object. | |
void | hel_ObjSetDblSize (THandle Handle, u32 Value) |
Set a double-size attribute. | |
void | hel_ObjSetHFlip (THandle Handle, u32 Value) |
Set Horizontal Flipping. | |
void | hel_ObjSetHVFlip (THandle Handle, u32 HFlip, u32 VFlip) |
Set vertical and horizontal flipping. | |
void | hel_ObjSetMode (THandle Handle, u32 Mode) |
Set mode of an object. | |
void | hel_ObjSetMosaic (THandle Handle, u32 Enable) |
Set mosaic processing. | |
HEL_INLINE void | hel_ObjSetMosaicSize (u32 HSize, u32 VSize) |
Set Mosaic Size. | |
void | hel_ObjSetPalette (THandle Handle, u32 PaletteBank) |
Set Palettebank. | |
void | hel_ObjSetPrio (THandle Handle, u32 Prio) |
Set object priority. | |
void | hel_ObjSetRotScale (THandle Handle, u32 Value) |
Set a rotation/scaling attribute. | |
void | hel_ObjSetVFlip (THandle Handle, u32 Value) |
Set Vertical Flipping. | |
void | hel_ObjSetVisible (THandle Handle, u32 Value) |
Set visibility of an object. | |
void | hel_ObjSetVisibleAll (u32 Show) |
Show/Hide all objects. | |
void | hel_ObjSetX (THandle Handle, s16 X) |
Set X position. | |
void | hel_ObjSetXY (THandle Handle, s16 X, s16 Y) |
Set X and Y position. | |
void | hel_ObjSetY (THandle Handle, s16 Y) |
Set Y position. | |
void | hel_ObjShowAll (void) |
Show all objects. | |
void | hel_ObjTransmit (void) |
Transmit object attributes to hardware. | |
void | hel_ObjUpdateGfx (THandle Handle, const void *pSrc) |
Update object graphic. | |
void | hel_ObjUpdateGfxUnComp (THandle Handle, const void *pSrc, u32 CompressionType) |
Update object graphic with decompression support. |
Objects in HEL are movable sprites. Up to 128 objects of any size, up to 64x64 pixels, can be displayed.
Special care has been spent on performance during development. The Object-System provides functions to create, delete and manipulate objects. Object attributes as well as graphic update calls are shadowed internally to avoid screen tearing. Changes should be transmitted to hardware during vertical blank only.
HEL
is implemented as a doubled linked list. Each item of the linked-list holds a handle to the previous and next item, which is basically the object. If you want to traverse the linked-list, you can do this with hel_ObjGetFirst, hel_ObjGetNext, hel_ObjGetPrev and hel_ObjGetLast. If one of these functions return HANDLE_INVALID
, it indicates there is no further item. For example, if you call hel_ObjGetNext and it returns HANDLE_INVALID
you just reached the end of the list. To check the result, I recommend to use the HANDLE_ISVALID
macro.
HAM
and HEL
. Use only one Object-System, either from HAM
or HEL
, otherwise the program behavior is undefined. #define hel_ObjCreate | ( | pSrc, | |||
ObjShape, | |||||
ObjSize, | |||||
ObjMode, | |||||
ColMode, | |||||
PalNo, | |||||
Mosaic, | |||||
HFlip, | |||||
VFlip, | |||||
Prio, | |||||
DblSize, | |||||
X, | |||||
Y | ) |
Create an object.
The hel_ObjCreate function creates a new object and returns a handle to the created resource.
[in] | pSrc | Pointer to source graphic. This parameter can be NULL . Please see hel_ObjCreateEx for more information. |
[in] | ObjShape | Shape of object. This can be one of the following values:
|
[in] | ObjSize | Size of object. The size is related to ObjShape . Size Square Horizontal Vertical 0 8x8 16x8 8x16 1 16x16 32x8 8x32 2 32x32 32x16 16x32 3 64x64 64x32 32x64 |
[in] | ObjMode | Mode of object, can be one of the following values:
|
[in] | ColMode | Color mode of object. Can be one of these values:
|
[in] | PalNo | Palette number. If the object is using a 16 color palette (ColMode equals 0), then must PalNo contain the palette number of the 16 color palette. |
[in] | Mosaic | Specifies if the object should activate mosaic processing. Set to FALSE to disable, or to TRUE to enable mosaic processing. |
[in] | HFlip | Specifies if the object should be horizontally flipped. Set to TRUE to enable horizontal flipping or FALSE to disable. |
[in] | VFlip | Specifies if the object should be vertically flipped. Set to TRUE to enable vertical flipping or FALSE to disable. |
[in] | Prio | Priority relative to backgrounds. Can between 0..3, 0 equals highest priority. |
[in] | DblSize | Specifies if the object should be double-sized. Can be TRUE or FALSE . |
[in] | X | Horizontal screen coordinate specified in pixels |
[in] | Y | Vertical screen coordinate specified in pixels |
OBJ_ERROR_VRAMFULL
: Vram is full. Required memory in Vram could not be allocated. OBJ_ERROR_ALLSLOTSTAKEN
: All 128 object slots are already in use.#define hel_ObjCreate16 | ( | pSrc, | |||
ObjShape, | |||||
ObjSize, | |||||
ObjMode, | |||||
PalNo, | |||||
X, | |||||
Y | ) |
Create a 16 color object.
Please see hel_ObjCreate for details.
#define hel_ObjCreate256 | ( | pSrc, | |||
ObjShape, | |||||
ObjSize, | |||||
ObjMode, | |||||
X, | |||||
Y | ) |
Create a 256 color object.
Please see hel_ObjCreate for details.
#define HEL_SUBSYSTEM_OBJ_REQUIREDMEMORY |
Required memory for the Object System.
This define represents the amount of memory, specified in bytes, the Object System from HEL requires to manage its internal states. When you initialize the Object System, you must pass a buffer which equals the size of HEL_SUBSYSTEM_OBJ_REQUIREDMEMORY.
#define OBJ_ATTR0 | ( | ObjShape, | |||
ObjMode, | |||||
ColMode, | |||||
Mosaic, | |||||
DblSize, | |||||
Y | ) |
Compose object attribute 0 value.
The OBJ_ATTR0 helper macro can be used to compose the attribute 0 value, which you can use to feed hel_ObjCreateEx with. For details please refer to GBATek.
[in] | ObjShape | Specifies the object shape, which in conjunction with the ObjSize parameter of OBJ_ATTR1, represents the object dimension. This argument can be one of the following values (see notes):
|
[in] | ObjMode | Specifies the object mode. This can be one of these values:
|
[in] | ColMode | Specifies the object color mode (16 or 256 colors). Can be on of these values:
|
[in] | Mosaic | Enables or disables mosaic processing for the object in question. Set it to TRUE or FALSE . |
[in] | DblSize | Enables or disables double-size for the object in question. Set it to TRUE or FALSE . Objects which can rotate usually require the double-size attribute bit set. |
[in] | Y | Vertical screen coordinate in pixels |
Size Square Horizontal Vertical 0 8x8 16x8 8x16 1 16x16 32x8 8x32 2 32x32 32x16 16x32 3 64x64 64x32 32x64
#define OBJ_ATTR1 | ( | ObjSize, | |||
VFlip, | |||||
HFlip, | |||||
X | ) |
Compose object attribute 1 value.
The OBJ_ATTR1 helper macro can be used to compose the attribute 1 value, which you can use to feed hel_ObjCreateEx with. For details please refer to GBATek.
[in] | ObjSize | Specifies the object size, which in conjunction with the ObjShape parameter of OBJ_ATTR0, represents the object dimension. This argument must between 0 and 3. See notes. |
[in] | VFlip | The VFlip argument can be used to enable or disable vertical flipping. Set it to TRUE to enable, or FALSE to disable v-flip. |
[in] | HFlip | The VFlip argument can be used to enable or disable horizontal flipping. Set it to TRUE to enable, or FALSE to disable h-flip. |
[in] | X | Horizontal screen coordinate in pixels |
Size Square Horizontal Vertical 0 8x8 16x8 8x16 1 16x16 32x8 8x32 2 32x32 32x16 16x32 3 64x64 64x32 32x64
#define OBJ_ATTR2 | ( | PalNo, | |||
Prio | ) |
Compose object attribute 2 value.
The OBJ_ATTR2 helper macro can be used to compose the attribute 2
value, which you can use to feed hel_ObjCreateEx with. For details please refer to GBATek.
[in] | PalNo | Palettebank/number which the object use. This value is of interest for objects with 16 colors only. Must between 0 ..15, set it to 0 for 256 color objects. |
[in] | Prio | Priority relative to backgrounds. Must between 0 ..3. 0 equals highest priority which means before top background. |
void hel_ObjBackup | ( | void * | pDest, | |
u32 | Flags | |||
) |
Backup Object-System.
The hel_ObjBackup function creates a 1:1 copy of the current Object-System.
You might want to use this feature to create a copy of the current Object-System when you switch from in-game into pause for example, which is sometimes not really an easy task to program.
[in,out] | pDest | Pointer to the destination buffer. It must be at least HEL_SUBSYSTEM_OBJ_REQUIREDMEMORY bytes large and aligned on 4byte boundary. |
[in] | Flags | Reserved for future usage. Must be zero. |
void hel_ObjBringToFront | ( | THandle | Handle | ) |
Bring an object to front.
The hel_ObjBringToFront function brings the object specified by Handle
in front of all other objects.
[in] | Handle | Object Handle |
void hel_ObjClearOAM | ( | void | ) |
Clear Object Attribute Memory (OAM).
The hel_ObjClearOAM function clears the entire OAM. It sets the following bits in attribute 0 for every OAM slot:
BIT8
= 0 (Rotation/Scaling Flag) BIT9
= 1 (OBJ Disable when Rotation/Scaling not used)THandle ATTR_FASTFUNC hel_ObjClone | ( | THandle | Handle, | |
s32 | X, | |||
s32 | Y | |||
) |
Clone an object.
The hel_ObjClone function clones the object specified by Handle
. Cloned objects use the graphic from the "master object", basically they just point to the same graphic slot in Vram. If you change the graphic from the master object, all of its clones change the graphic too.
[in] | Handle | Handle to object to clone (master object) |
[in] | X | Horizontal screen coordinate of cloned sprite, specified in pixels. |
[in] | Y | Vertical screen coordinate of cloned sprite, specified in pixels. |
Returns a handle to the created resource on success, otherwise it returns:
OBJ_ERROR_ALLSLOTSTAKEN
: All 128 object slots are already in use.THandle ATTR_FASTFUNC hel_ObjCreateEx | ( | const void * | pSrc, | |
u32 | Attr0, | |||
u32 | Attr1, | |||
u32 | Attr2 | |||
) |
Create an object.
The hel_ObjCreateEx creates a new object. It expects the incoming attributes in the same format as the hardware does. This function is used by hel_ObjCreate, hel_ObjCreate16 and hel_ObjCreate256.
[in] | pSrc | Pointer to source graphic. If this parameter is NULL , hel_ObjCreateEx will not load the graphics specified by pSrc to Vram. In this case, you should call hel_ObjUpdateGfx to load a graphic for the object to Vram. |
[in] | Attr0 | Bit-field that controls the object appearance. Use OBJ_ATTR0 macro to compose bit-field. |
[in] | Attr1 | Bit-field that controls the object appearance. Use OBJ_ATTR1 macro to compose bit-field. |
[in] | Attr2 | Bit-field that controls the object appearance. Use OBJ_ATTR2 macro to compose bit-field. |
// Create an object THandle Handle = hel_ObjCreateEx ( (void*)pSrcGraphic, OBJ_ATTR0(ObjShape, ObjMode, ColMode, Mosaic, DblSize, Y), OBJ_ATTR1(ObjSize, VFlip, HFlip, X), OBJ_ATTR2(PalNo, Prio) );
OBJ_ERROR_VRAMFULL
: Vram is full. Required memory in Vram could not be allocated. OBJ_ERROR_ALLSLOTSTAKEN
: All 128 object slots are already in use.void ATTR_FASTFUNC hel_ObjDelete | ( | THandle | Handle | ) |
Delete an object.
The hel_ObjDelete function deletes the object specified by Handle
and releases all associated resources when they are no longer needed and not used by cloned objects.
[in] | Handle | Handle of object to delete |
u32 hel_ObjExists | ( | THandle | Handle | ) |
Check if an object exist.
The hel_ObjExists function checks if the object specified by Handle
exists. An object exists in HEL when it was created using the hel_ObjCreate, hel_ObjCreate16 or hel_ObjCreate256 macros or the hel_ObjCreateEx function.
[in] | Handle | Object Handle |
TRUE
if the object exists, otherwise FALSE
u16 ATTR_WARNUNUSEDRESULT hel_ObjGetAttribute | ( | THandle | Handle, | |
u32 | AttributeNumber | |||
) |
Get object attributes.
The hel_ObjGetAttribute function returns an attribute of the object in question. An object has three different attributes with a number of various bits to control the object appearance.
[in] | Handle | Object Handle |
[in] | AttributeNumber | Number of attribute to retrieve. This can be 0 , 1 or 2 . |
u32 hel_ObjGetColorMode | ( | THandle | Handle | ) |
Check if an object uses 256 or 16 colors.
The hel_ObjGetColorMode can be used to check if the object specified by Handle
uses 256 or 16 colors.
[in] | Handle | Object Handle |
1
if it uses 256 colors, otherwise 0
. Alternatively you can also use the following defines to check whether it is a 16 or 256 color object: COLORS_16
COLORS_256
THandle hel_ObjGetFirst | ( | void | ) |
Get the first object handle.
HANDLE_INVALID
.u32 ATTR_WARNUNUSEDRESULT hel_ObjGetFreeSlots | ( | void | ) |
Get amount of free object slots.
The hel_ObjGetFreeSlots function returns the amount of free/unused object slots.
u32 hel_ObjGetGfxSlot | ( | THandle | Handle | ) |
Get the graphic slot of an object.
The hel_ObjGetGfxSlot function returns the graphic slot where the object specified by Handle
points to.
Handle
. This slot-value is between 0..1023 u32 hel_ObjGetHeight | ( | THandle | Handle | ) |
Get Height.
The hel_ObjGetHeight function returns the height in pixels of the object specified by Handle
. The height is computed from the Shape
(hel_ObjGetShape) and Size
(hel_ObjGetSize) attributes.
[in] | Handle | Object Handle |
THandle hel_ObjGetLast | ( | void | ) |
Get the last object handle.
HANDLE_INVALID
.u32 hel_ObjGetMode | ( | THandle | Handle | ) |
Get the mode of an object.
The hel_ObjGetMode function returns what mode an object uses.
[in] | Handle | Object Handle |
OBJ_MODE_NORMAL
OBJ_MODE_SEMITRANSPARENT
OBJ_MODE_OBJWINDOW
THandle hel_ObjGetNext | ( | THandle | Handle | ) |
Get handle of next object.
HANDLE_INVALID
if there isn't a next object.
u32 hel_ObjGetOamSlot | ( | THandle | Handle | ) |
Get Object Attribute Memory Slot.
The hel_ObjGetOamSlot function returns the slot in the OAM, where the object specified by Handle
was copied to, during the last call to hel_ObjTransmit.
[in] | Handle | Object Handle |
u32 hel_ObjGetPalette | ( | THandle | Handle | ) |
Get Palettebank.
The hel_ObjGetPalette function returns the PaletteBank which the object specified by Handle
points to.
[in] | Handle | Object Handle |
Handle
. This can be a value in the range of 0..15. 8Bit color mode objects don't use the PaletteBank attribute and have usually set it to 0.THandle hel_ObjGetPrev | ( | THandle | Handle | ) |
Get handle of previous object.
HANDLE_INVALID
if there isn't a next object.
u32 hel_ObjGetPrio | ( | THandle | Handle | ) |
Get object priority.
The hel_ObjGetPrio function returns the priority of the object specified by Handle
.
[in] | Handle | Object Handle |
u32 hel_ObjGetShape | ( | THandle | Handle | ) |
Get object shape.
The hel_ObjGetShape function returns the shape-type of the object specified by Handle
.
[in] | Handle | Object Handle |
OBJ_SHAPE_SQUARE
OBJ_SHAPE_HORIZONTAL
OBJ_SHAPE_VERTICAL
u32 hel_ObjGetSize | ( | THandle | Handle | ) |
Get object size.
The hel_ObjGetSize function returns the size-type of the object specified by Handle.
[in] | Handle | Object Handle |
Size Square Horizontal Vertical 0 8x8 16x8 8x16 1 16x16 32x8 8x32 2 32x32 32x16 16x32 3 64x64 64x32 32x64
u32 hel_ObjGetSizeU16 | ( | THandle | Handle | ) |
Get object size in halfwords.
The hel_ObjGetSizeU16 function returns the size in halfwords of the graphic where the object specified by p
Handle points to.
[in] | Handle | Object Handle |
Handle
points to. This depends on the ObjShape
(hel_ObjGetShape), ObjSize
(hel_ObjGetSize) as well as the ColorMode
(hel_ObjGetColorMode). An object with an 8bit 16*32pixel graphic uses 256 halfwords, whereas a 4bit graphic with the same dimension only uses the half amount (128 halfwords). It is computed as followed: u32 hel_ObjGetWidth | ( | THandle | Handle | ) |
Get Width.
The hel_ObjGetWidth function returns the width in pixels of the object specified by Handle
. The width is computed from the Shape
(hel_ObjGetShape) and Size
(hel_ObjGetSize) attributes.
[in] | Handle | Object Handle |
u32 hel_ObjGetX | ( | THandle | Handle | ) |
Get X Coordinate.
The hel_ObjGetX function returns the horizontal screen coordinate in pixels of the object specified by Handle
.
[in] | Handle | Object Handle |
-10
, the hel_ObjGetX function will not return -10
, it will return 502
instead. This function might seem a bit useless due to this limitation, but it's helpful if you need to attach objects to other objects, so you don't need to project coordinates twice (if using some sort of 3d for example). u32 hel_ObjGetY | ( | THandle | Handle | ) |
Get Y Coordinate.
The hel_ObjGetY function returns the vertical screen coordinate in pixels of the object specified by Handle
.
[in] | Handle | Object Handle |
-10
, the hel_ObjGetY function will not return -10
, it will return 246
instead. This function might seem a bit useless due to this limitation, but it's helpful if you need to attach objects to other objects, so you don't need to project coordinates twice (if using some sort of 3d for example). void hel_ObjHideAll | ( | void | ) |
Hide all objects.
The hel_ObjHideAll function hides all existing objects.
void hel_ObjInit | ( | void * | pBuffer | ) |
Initialize Object-System.
The hel_ObjInit initializes the Object-System and must be called before executing any other function from the Object-System, otherwise the program behaviour is undefined.
[in] | pBuffer | Must point to a buffer of at least HEL_SUBSYSTEM_OBJ_REQUIREDMEMORY allocated bytes. The buffer must be word-aligned and should be located in EWRAM. It must not be changed after initialization as long as the Object System is running! |
// Allocate memory for Object-System u8 ATTR_EWRAM ATTR_ALIGNED(4) g_ObjSystemBuffer[HEL_SUBSYSTEM_OBJ_REQUIREDMEMORY]; int main(void) { // Initialize Obj-System hel_ObjInit((void*)g_ObjSystemBuffer); // ... }
u32 hel_ObjIsClone | ( | THandle | Handle | ) |
Check if an object is a clone.
The hel_ObjIsClone function can be used to check if an object is a clone. A clone is an object which has been created using the hel_ObjClone function.
[in] | Handle | Object Handle |
TRUE
if the object specified by Handle
is a clone, otherwise FALSE
.u32 hel_ObjIsHFlip | ( | THandle | Handle | ) |
Check if an object is horizontally flipped.
The hel_ObjIsVFlip function checks if the object specified by Handle
is horizontally flipped, or to be more precise, if the horizontal flip bit is set.
[in] | Handle | Object Handle |
TRUE
if it is horizontally flipped, otherwise FALSE
u32 hel_ObjIsMosaic | ( | THandle | Handle | ) |
Check if an object has mosaic attribute set.
The hel_ObjIsMosaic function can be used to check if the object specified by Handle
has the Mosaic attribute set.
[in] | Handle | Object Handle |
TRUE
if it uses mosaic, otherwise FALSE
u32 hel_ObjIsRotScale | ( | THandle | Handle | ) |
Check if an object has the rotation/scaling attribute set.
The hel_ObjIsRotScale function can be used to check if the object specified by Handle
has the Rotation/Scaling
attribute set.
[in] | Handle | Object Handle |
TRUE
if rotation/scaling is used, otherwise FALSE
u32 hel_ObjIsVFlip | ( | THandle | Handle | ) |
Check if an object is vertically flipped.
The hel_ObjIsVFlip function checks if the object specified by Handle
is vertically flipped, or to be more precise, if the vertical flip bit is set.
[in] | Handle | Object Handle |
TRUE
if it is vertically flipped, otherwise FALSE
u32 hel_ObjIsVisible | ( | THandle | Handle | ) |
Check if an object is visible.
The hel_ObjIsVisible function checks if the object specified by Handle
is visible, since you can hide an object by calling hel_ObjSetVisible and pass FALSE
as value. The visibility flag can not be used to determine if an object is within the screen or outside.
[in] | Handle | Object Handle |
TRUE
if it is visible, otherwise FALSE
void hel_ObjQuit | ( | void | ) |
Uninitialize Object-System.
The hel_ObjQuit uninitializes the Object-System. It deletes all existing objects and releases all allocated object graphic slots in Vram.
void hel_ObjRestore | ( | const void * | pSource, | |
u32 | Flags | |||
) |
Restore Object-System backup.
This function restores a copy of the Object-System, which has been earlier created by hel_ObjBackup.
[in,out] | pSource | Pointer to the source buffer. |
[in] | Flags | Either zero or a combination of the following flags:
|
OBJ_RESTORE_UPDATEGFX
), but it will probably fail when the graphics have been created (on the fly) in some kind of scratch-pad ram.void hel_ObjSelectRotScale | ( | THandle | Handle, | |
u8 | RotNo | |||
) |
Select a rotation/scaling parameter.
The hel_ObjSelectRotScale function selects a rotation/scaling parameter of the object specified by Handle
.
[in] | Handle | Object Handle |
[in] | RotNo | Rotation/scaling parameter Handle |
void hel_ObjSendToBack | ( | THandle | Handle | ) |
Set an object behind all other objects.
The hel_ObjSendToBack function set the object specified by Handle
behind all other objects.
[in] | Handle | Object Handle |
void hel_ObjSetBefore | ( | THandle | Handle, | |
THandle | TargetHandle | |||
) |
Change Z-Order of an object.
The hel_ObjSetBefore function can be used to change the z-order of objects. It moves the object specified by Handle
in front of the object specified by TargetHandle
.
[in] | Handle | Handle of object to change z-order |
[in] | TargetHandle | Handle of object to be set in front of |
void hel_ObjSetBehind | ( | THandle | Handle, | |
THandle | TargetHandle | |||
) |
Change Z-Order of an object.
The hel_ObjSetBehind function can be used to change the z-order of objects. It moves the object specified by Handle
behind the object specified by TargetHandle
.
[in] | Handle | Handle of object to change z-order |
[in] | TargetHandle | Handle of object to be set behind of |
void hel_ObjSetDblSize | ( | THandle | Handle, | |
u32 | Value | |||
) |
Set a double-size attribute.
The hel_ObjSetDblSize function can be used to enable or disable the double-size attribute for the object specified by Handle
.
[in] | Handle | Object Handle |
[in] | Value | Either TRUE to enable, or FALSE to disable double-size |
void hel_ObjSetHFlip | ( | THandle | Handle, | |
u32 | Value | |||
) |
Set Horizontal Flipping.
The hel_ObjSetHFlip function horizontally flips the object specified by Handle
.
[in] | Handle | Object Handle |
[in] | Value | TRUE to flip, otherwise FALSE |
void hel_ObjSetHVFlip | ( | THandle | Handle, | |
u32 | HFlip, | |||
u32 | VFlip | |||
) |
Set vertical and horizontal flipping.
The hel_ObjSetHVFlip function sets horizontal and vertical flipping for the object specified by Handle
.
[in] | Handle | Object Handle |
[in] | HFlip | TRUE to flip horizontally, otherwise FALSE |
[in] | VFlip | TRUE to flip vertically, otherwise FALSE |
void hel_ObjSetMode | ( | THandle | Handle, | |
u32 | Mode | |||
) |
Set mode of an object.
The hel_ObjSetMode function sets the mode of the object specified by Handle
.
[in] | Handle | Object Handle |
[in] | Mode | The mode this object has to be set to. This can be one of the following predefined values:
|
void hel_ObjSetMosaic | ( | THandle | Handle, | |
u32 | Enable | |||
) |
Set mosaic processing.
The hel_ObjSetMosaic function either enables or disables mosaic processing for the object specified by Handle
.
[in] | Handle | Object Handle |
[in] | Enable | Set this to TRUE to enable mosaic processing, otherwise to FALSE . |
HEL_INLINE void hel_ObjSetMosaicSize | ( | u32 | HSize, | |
u32 | VSize | |||
) |
Set Mosaic Size.
The hel_ObjSetMosaicSize function sets the horizontal and vertical mosaic size for the entire Object System. The mosaic size applies to all objects with mosaic activated (hel_ObjSetMosaic
).
[in] | HSize | Horizontal size of Mosaic (0..15) |
[in] | VSize | Vertical size of Mosaic (0..15) |
void hel_ObjSetPalette | ( | THandle | Handle, | |
u32 | PaletteBank | |||
) |
Set Palettebank.
The hel_ObjSetPalette function can be used to set the PaletteBank
for the object specified by Handle
.
[in] | Handle | Object Handle |
[in] | PaletteBank | The Palettebank value, must between 0..15 |
PaletteBank
attribute has only impact on objects in 4bit color mode.void hel_ObjSetPrio | ( | THandle | Handle, | |
u32 | Prio | |||
) |
Set object priority.
The hel_ObjSetPrio function sets the priority of the object specified by Handle
. The object priority is relative to backgrounds.
[in] | Handle | Object Handle |
[in] | Prio | The priority value must between 0..3! It represents the background number where this object is placed before. |
void hel_ObjSetRotScale | ( | THandle | Handle, | |
u32 | Value | |||
) |
Set a rotation/scaling attribute.
The hel_ObjSetRotScale function can be used to enable or disable rotation/scaling processing for the object specified by Handle
.
[in] | Handle | Object Handle |
[in] | Value | Either TRUE to enable, or FALSE to disable rotation/scaling processing |
void hel_ObjSetVFlip | ( | THandle | Handle, | |
u32 | Value | |||
) |
Set Vertical Flipping.
The hel_ObjSetHFlip function vertically flips the object specified by Handle
.
[in] | Handle | Object Handle |
[in] | Value | TRUE to flip, otherwise FALSE |
void hel_ObjSetVisible | ( | THandle | Handle, | |
u32 | Value | |||
) |
Set visibility of an object.
The hel_ObjSetVisible function either shows or hides the object with the object handle specified by Handle
[in] | Handle | Object Handle |
Value | TRUE to show, FALSE to hide object |
void hel_ObjSetVisibleAll | ( | u32 | Show | ) |
Show/Hide all objects.
The hel_ObjSetVisibleAll function either shows or hides all existing objects.
[in] | Show | Must be TRUE to show or FALSE to hide all objects |
void hel_ObjSetX | ( | THandle | Handle, | |
s16 | X | |||
) |
Set X position.
The hel_ObjSetX function sets the horizontal position of the object specified by Handle
.
[in] | Handle | Object Handle |
[in] | X | The screen position, specified in pixels, where the object has to be set to |
void hel_ObjSetXY | ( | THandle | Handle, | |
s16 | X, | |||
s16 | Y | |||
) |
Set X and Y position.
The hel_ObjSetXY function sets the horizontal and vertical position of the object specified by Handle
.
[in] | Handle | Object Handle |
[in] | X | The screen position, specified in pixels, where the object has to be set to |
[in] | Y | The screen position, specified in pixels, where the object has to be set to |
void hel_ObjSetY | ( | THandle | Handle, | |
s16 | Y | |||
) |
Set Y position.
The hel_ObjSetY function sets the vertical position of the object specified by Handle
.
[in] | Handle | Object Handle |
[in] | Y | The screen position, specified in pixels, where the object has to be set to |
void hel_ObjShowAll | ( | void | ) |
Show all objects.
The hel_ObjShowAll function shows all existing objects.
void hel_ObjTransmit | ( | void | ) |
Transmit object attributes to hardware.
The hel_ObjTransmit function must be called during vertical blank to transmit the shadowed object attributes and graphic updates to the hardware.
void hel_ObjUpdateGfx | ( | THandle | Handle, | |
const void * | pSrc | |||
) |
Update object graphic.
The hel_ObjUpdateGfx function updates the graphic of the object specified by Handle
.
[in] | Handle | Object Handle |
[in] | pSrc | Pointer to source graphic |
void hel_ObjUpdateGfxUnComp | ( | THandle | Handle, | |
const void * | pSrc, | |||
u32 | CompressionType | |||
) |
Update object graphic with decompression support.
The hel_ObjUpdateGfxUnComp function updates the graphic of the object specified by Handle
and supports compressed data.
[in] | Handle | Object Handle |
[in] | pSrc | Pointer to compressed source graphic |
[in] | CompressionType | Type of compression source graphic uses. This can be one of the COMPRESSION_TYPE_* predefined values. |