Object System Functions
[Object System]

Overview of all Object System functions. More...

Defines

Functions


Detailed Description

Overview of all Object System functions.


Define Documentation

#define hel_ObjCreate ( pSrc,
ObjShape,
ObjSize,
ObjMode,
ColMode,
PalNo,
Mosaic,
HFlip,
VFlip,
Prio,
DblSize,
X,
 ) 

Create an object.

The hel_ObjCreate function creates a new object and returns a handle to the created resource.

Parameters:
[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:
  • OBJ_SHAPE_SQUARE
  • OBJ_SHAPE_VERTICAL
  • OBJ_SHAPE_HORIZONTAL
[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:
  • OBJ_MODE_NORMAL
  • OBJ_MODE_OBJWINDOW
  • OBJ_MODE_SEMITRANSPARENT
[in] ColMode Color mode of object. Can be one of these values:
  • COLORS_16
  • COLORS_256
[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
Returns:
Returns a handle to the created resource on success, otherwise one of the Object System error codes.
See also:
hel_ObjCreate256, hel_ObjCreate16

#define hel_ObjCreate16 ( pSrc,
ObjShape,
ObjSize,
ObjMode,
PalNo,
X,
 ) 

Create a 16 color object.

Please see hel_ObjCreate for details.

#define hel_ObjCreate256 ( pSrc,
ObjShape,
ObjSize,
ObjMode,
X,
 ) 

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.

See also:
hel_ObjInit

#define OBJ_ATTR0 ( ObjShape,
ObjMode,
ColMode,
Mosaic,
DblSize,
 ) 

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.

Parameters:
[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):
  • OBJ_SHAPE_SQUARE
  • OBJ_SHAPE_HORIZONTAL
  • OBJ_SHAPE_VERTICAL
[in] ObjMode Specifies the object mode. This can be one of these values:
  • OBJ_MODE_NORMAL
  • OBJ_MODE_SEMITRANSPARENT
  • OBJ_MODE_OBJWINDOW
[in] ColMode Specifies the object color mode (16 or 256 colors). Can be on of these values:
  • COLORS_16
  • COLORS_256
[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
Note:
Here is a listing what size/shape pairs form which object dimension:
Size  Square   Horizontal  Vertical
0     8x8      16x8        8x16
1     16x16    32x8        8x32
2     32x32    32x16       16x32
3     64x64    64x32       32x64
Returns:
Returns the composed attribute 0 value (fits in a 16bit word).
See also:
OBJ_ATTR1, OBJ_ATTR2, hel_ObjCreateEx

#define OBJ_ATTR1 ( ObjSize,
VFlip,
HFlip,
 ) 

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.

Parameters:
[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
Note:
Here is a listing what size/shape pairs form which object dimension:
Size  Square   Horizontal  Vertical
0     8x8      16x8        8x16
1     16x16    32x8        8x32
2     32x32    32x16       16x32
3     64x64    64x32       32x64
Returns:
Returns the composed attribute 1 value (fits in a 16bit word).
See also:
OBJ_ATTR0, OBJ_ATTR2, hel_ObjCreateEx

#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.

Parameters:
[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.
Returns:
Returns the composed attribute 2 value (fits in a 16bit word).
See also:
OBJ_ATTR0, OBJ_ATTR1, hel_ObjCreateEx


Function Documentation

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.

Parameters:
[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.
Note:
This function does not backup the Object Vram!
See also:
hel_ObjRestore

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.

Parameters:
[in] Handle Object Handle
See also:
hel_ObjSendToBack

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:

Note:
This function has no impact on the object management system, it just clears the OAM. All objects and attributes from the shadowed OAM will stay intact.

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 video memory. If you change the graphic from the master object, all of its clones change the graphic too.

Parameters:
[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:
Returns a handle to the created object.

Returns a handle to the created resource on success, otherwise one of the Object System error codes.

See also:
hel_ObjCreate

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.

Parameters:
[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)
                        );

Returns:
Returns a handle to the created resource on success, otherwise one of the Object System error codes.
See also:
hel_ObjCreate, OBJ_ATTR0, OBJ_ATTR1, OBJ_ATTR2

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.

Parameters:
[in] Handle Handle of object to delete
Attention:
When you deleted an object, you must make sure the Handle gets an invalid value. The correct way to delete an object is the following:
    hel_ObjDelete(hObj);
    hObj = HANDLE_INVALID;

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.

Parameters:
[in] Handle Object Handle
Returns:
TRUE if the object exists, otherwise FALSE
See also:
hel_ObjIsVisible

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.

Parameters:
[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.

Parameters:
[in] Handle Object Handle
Returns:
Returns 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.

Returns:
Returns the handle of the first object. If no object exists, it returns HANDLE_INVALID.
See also:
Object-System Implementation details, hel_ObjGetLast

u32 ATTR_WARNUNUSEDRESULT hel_ObjGetFreeSlots ( void   ) 

Get amount of free object slots.

The hel_ObjGetFreeSlots function returns the amount of free/unused object slots.

Returns:
Amount of free 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.

Returns:
The graphic slot of the object specified by 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.

Parameters:
[in] Handle Object Handle
Note:
This function does not take the double-size attribute nor scaling parameters into account.
See also:
hel_ObjGetWidth, hel_ObjGetY, hel_ObjGetShape, hel_ObjGetSize

THandle hel_ObjGetLast ( void   ) 

Get the last object handle.

Returns:
Returns the handle of the last object. If no object exists, it returns HANDLE_INVALID.
See also:
Object-System Implementation details, hel_ObjGetFirst

u32 hel_ObjGetMode ( THandle  Handle  ) 

Get the mode of an object.

The hel_ObjGetMode function returns what mode an object uses.

Parameters:
[in] Handle Object Handle
Returns:
  • OBJ_MODE_NORMAL
  • OBJ_MODE_SEMITRANSPARENT
  • OBJ_MODE_OBJWINDOW
See also:
hel_ObjSetMode

THandle hel_ObjGetNext ( THandle  Handle  ) 

Get handle of next object.

Returns:
The hel_ObjGetNext function returns the handle of the next object in the doubled linked list.
If returns HANDLE_INVALID if there isn't a next object.

See also:
Object-System Implementation details, hel_ObjGetPrev

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.

Parameters:
[in] Handle Object Handle
Returns:
Returns the slot in OAM on success. When the object does not exist or is invisible, it returns HANDLE_INVALID.
Note:
If you want to change object attributes during Horizontal-Blank, you need a way to retrieve the current OAM slot of an object, because HEL internally works with shadowed attributes which get copied to OAM usually during Vertical-Blank by hel_ObjTransmit. However, if you want to perform HBL object effects, the changes must take place immediately and you need a way to retrieve the OAM slot of the object in question to change its attributes directly in hardware. This is when hel_ObjGetOamSlot comes into the game. Please keep in mind, the OAM slot of an object can change every time you call hel_ObjTransmit. If you want to cache this information for fast(er) access, create the cache after the call to hel_ObjTransmit.

u32 hel_ObjGetPalette ( THandle  Handle  ) 

Get Palettebank.

The hel_ObjGetPalette function returns the PaletteBank which the object specified by Handle points to.

Parameters:
[in] Handle Object Handle
Returns:
Returns the PaletteBank of the object specified by 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.
See also:
hel_ObjSetPalette, hel_ObjGetColorMode

THandle hel_ObjGetPrev ( THandle  Handle  ) 

Get handle of previous object.

Returns:
The hel_ObjGetPrev function returns the handle of the previous object in the doubled linked list.
If returns HANDLE_INVALID if there isn't a next object.

See also:
Object-System Implementation details, hel_ObjGetNext

u32 hel_ObjGetPrio ( THandle  Handle  ) 

Get object priority.

The hel_ObjGetPrio function returns the priority of the object specified by Handle.

Parameters:
[in] Handle Object Handle
See also:
hel_ObjSetPrio

u32 hel_ObjGetShape ( THandle  Handle  ) 

Get object shape.

The hel_ObjGetShape function returns the shape-type of the object specified by Handle.

Parameters:
[in] Handle Object Handle
Returns:
  • 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.

Parameters:
[in] Handle Object Handle
Returns:
The return value is between 0..3 and forms together with the ObjShape (hel_ObjGetShape) the dimension of the object. See table below:
   Size   Square   Horizontal  Vertical
     0     8x8       16x8        8x16
     1     16x16     32x8        8x32
     2     32x32     32x16       16x32
     3     64x64     64x32       32x64

See also:
hel_ObjGetSize, hel_ObjGetShape

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.

Parameters:
[in] Handle Object Handle
Returns:
Size in halfwords of the graphic where the object specified by 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:
  • 8BIT: (ObjWidth*ObjHeight)/2
  • 4BIT: (ObjWidth*ObjHeight)/4
See also:
hel_ObjGetSize, hel_ObjGetShape

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.

Parameters:
[in] Handle Object Handle
Note:
This function does not take the double-size attribute nor scaling parameters into account.
See also:
hel_ObjGetHeight, hel_ObjGetX, hel_ObjGetShape, hel_ObjGetSize

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.

Parameters:
[in] Handle Object Handle
Note:
The Game Boy Advance hardware uses 9bits (0..511) for the X coordinate. Therefore, if you passed negative values to hel_ObjSetX, they get wrapped. For example, if you passed -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).
See also:
hel_ObjGetY, hel_ObjGetWidth

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.

Parameters:
[in] Handle Object Handle
Note:
The Game Boy Advance hardware uses 8bits (0..255) for the Y coordinate. Therefore, if you passed negative values to hel_ObjSetY, they get wrapped. For example, if you passed -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).
See also:
hel_ObjGetX, hel_ObjGetHeight

void hel_ObjHideAll ( void   ) 

Hide all objects.

The hel_ObjHideAll function hides all existing objects.

See also:
hel_ObjShowAll, hel_ObjSetVisibleAll

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.

Parameters:
[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);

    // ...
}

See also:
hel_ObjQuit, hel_ObjTransmit

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.

Parameters:
[in] Handle Object Handle
Returns:
Returns TRUE if the object specified by Handle is a clone, otherwise FALSE.
Note:
You might want to check for clones when updating object graphics. If you update the graphic of the master object, all clones automatically change the graphic to the master object graphic, so you don't need to update the graphic of every clone.
Attention:
A clone always use the graphic from the master object, you cannot assign a different graphic!

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.

Parameters:
[in] Handle Object Handle
Returns:
Returns TRUE if it is horizontally flipped, otherwise FALSE
See also:
hel_ObjIsVFlip

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.

Parameters:
[in] Handle Object Handle
Returns:
Returns 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.

Parameters:
[in] Handle Object Handle
Returns:
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.

Parameters:
[in] Handle Object Handle
Returns:
Returns TRUE if it is vertically flipped, otherwise FALSE
See also:
hel_ObjIsHFlip

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.

Parameters:
[in] Handle Object Handle
Returns:
Returns TRUE if it is visible, otherwise FALSE
See also:
hel_ObjSetVisibleAll

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.

Parameters:
[in,out] pSource Pointer to the source buffer.
[in] Flags Either zero or a combination of the following flags:
  • OBJ_RESTORE_UPDATEGFX Copies the data from the last specified object graphic address to Vram. This is the graphic you passed to hel_ObjUpdateGfx or hel_ObjCreate etc.
Note:
This function does not restore the Object Vram! It can try to (OBJ_RESTORE_UPDATEGFX), but it will probably fail when the graphics have been created (on the fly) in some kind of scratch-pad ram.
See also:
hel_ObjBackup

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.

Parameters:
[in] Handle Object Handle
[in] RotNo Rotation/scaling parameter Handle
See also:
hel_ObjSetRotScale

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.

Parameters:
[in] Handle Object Handle
See also:
hel_ObjBringToFront

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.

Parameters:
[in] Handle Handle of object to change z-order
[in] TargetHandle Handle of object to be set in front of
See also:
hel_ObjSetBehind

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.

Parameters:
[in] Handle Handle of object to change z-order
[in] TargetHandle Handle of object to be set behind of
See also:
hel_ObjSetBefore

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.

Parameters:
[in] Handle Object Handle
[in] Value Either TRUE to enable, or FALSE to disable double-size
See also:
hel_ObjSetRotScale

void hel_ObjSetHFlip ( THandle  Handle,
u32  Value 
)

Set Horizontal Flipping.

The hel_ObjSetHFlip function horizontally flips the object specified by Handle.

Parameters:
[in] Handle Object Handle
[in] Value TRUE to flip, otherwise FALSE
See also:
hel_ObjSetVFlip

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.

Parameters:
[in] Handle Object Handle
[in] HFlip TRUE to flip horizontally, otherwise FALSE
[in] VFlip TRUE to flip vertically, otherwise FALSE
Note:
This function is faster if you need to update both, H and V flipping, than calling hel_ObjSetHFlip and hel_ObjSetVFlip.
See also:
hel_ObjSetHFlip, hel_ObjSetVFlip

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.

Parameters:
[in] Handle Object Handle
[in] Mode The mode this object has to be set to. This can be one of the following predefined values:
  • OBJ_MODE_NORMAL
  • OBJ_MODE_OBJWINDOW
  • OBJ_MODE_SEMITRANSPARENT
See also:
hel_ObjGetMode

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.

Parameters:
[in] Handle Object Handle
[in] Enable Set this to TRUE to enable mosaic processing, otherwise to FALSE.
See also:
hel_ObjSetMosaicSize

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).

Parameters:
[in] HSize Horizontal size of Mosaic (0..15)
[in] VSize Vertical size of Mosaic (0..15)
See also:
hel_ObjCreate, hel_ObjIsVisible

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.

Parameters:
[in] Handle Object Handle
[in] PaletteBank The Palettebank value, must between 0..15
Note:
The PaletteBank attribute has only impact on objects in 4bit color mode.
See also:
hel_ObjGetPalette, hel_ObjGetColorMode

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.

Parameters:
[in] Handle Object Handle
[in] Prio The priority value must between 0..3! It represents the background number where this object is placed before.
See also:
hel_ObjGetPrio

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.

Parameters:
[in] Handle Object Handle
[in] Value Either TRUE to enable, or FALSE to disable rotation/scaling processing
See also:
hel_ObjSelectRotScale

void hel_ObjSetVFlip ( THandle  Handle,
u32  Value 
)

Set Vertical Flipping.

The hel_ObjSetHFlip function vertically flips the object specified by Handle.

Parameters:
[in] Handle Object Handle
[in] Value TRUE to flip, otherwise FALSE
See also:
hel_ObjSetHFlip

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

Parameters:
[in] Handle Object Handle
Value TRUE to show, FALSE to hide object
See also:
hel_ObjIsVisible, hel_ObjSetVisibleAll, hel_ObjShowAll

void hel_ObjSetVisibleAll ( u32  Show  ) 

Show/Hide all objects.

The hel_ObjSetVisibleAll function either shows or hides all existing objects.

Parameters:
[in] Show Must be TRUE to show or FALSE to hide all objects
See also:
hel_ObjHideAll, hel_ObjShowAll

void hel_ObjSetX ( THandle  Handle,
s16  X 
)

Set X position.

The hel_ObjSetX function sets the horizontal position of the object specified by Handle.

Parameters:
[in] Handle Object Handle
[in] X The screen position, specified in pixels, where the object has to be set to
See also:
hel_ObjSetY, hel_ObjSetXY

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.

Parameters:
[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
See also:
hel_ObjSetX, hel_ObjSetY

void hel_ObjSetY ( THandle  Handle,
s16  Y 
)

Set Y position.

The hel_ObjSetY function sets the vertical position of the object specified by Handle.

Parameters:
[in] Handle Object Handle
[in] Y The screen position, specified in pixels, where the object has to be set to
See also:
hel_ObjSetY, hel_ObjSetXY

void hel_ObjShowAll ( void   ) 

Show all objects.

The hel_ObjShowAll function shows all existing objects.

See also:
hel_ObjHideAll, hel_ObjSetVisibleAll

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.

Parameters:
[in] Handle Object Handle
[in] pSrc Pointer to source graphic
See also:
hel_ObjUpdateGfxUnComp

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.

Parameters:
[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.
See also:
hel_ObjUpdateGfx, hel_SwiUnComp


Generated on Mon Apr 9 16:39:01 2007 for HEL Library by  doxygen 1.5.1