Main Page | Modules | Related Pages

Object Functions

Description. More...

Functions


Detailed Description

Description.

A lot of these Object Functions are available in HAM too, but the Object Functions in HEL get replaced with macros when you switch to release-mode. This make them a couple of times faster than the original functions from HAM (HAM 2.8 at this time).


Function Documentation

void hel_ObjBringToFront u8  ObjNo  ) 
 

Bring an object to front.

The hel_ObjBringToFront function brings the object specified by ObjNo in front of all other objects.

Parameters:
ObjNo Object Handle
See also:
hel_ObjSendToBack

void hel_ObjClearOAM void   ) 
 

Clear Object Attribute Memory (OAM).

The hel_ObjClearOAM function clears the OAM. More precise it sets every OAM entry to a 16Color object with background priority 3, a size of 8x8 pixels which is located at X=241 and Y=161.

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

u32 hel_ObjCountVisible void   ) 
 

Return the number of visible objects.

Returns:
Returns the number of visible objects in HAM's object management system.
Note:
This function does not check if objects are located inside the visible display area, it checks the "isVisible" flag instead (hel_ObjIsVisible).
See also:
hel_ObjIsVisible, hel_ObjToggleVisible, hel_ObjShowAll, hel_ObjHideAll

u8 hel_ObjCreate void *  pSrc,
u16  ObjShape,
u16  ObjSize,
u16  ObjMode,
u16  ColMode,
u16  PalNo,
u16  Mosaic,
u16  HFlip,
u16  VFlip,
u16  Prio,
u16  DblSize,
s16  X,
s16  Y
 

Create a new object.

hel_ObjCreate creates a new object in HAM.

The hel_ObjCreate is more or less only a wrapper function for ham_CreateObj. That's because you cannot specify negative values for either the X or Y coordinate with ham_CreateObj (at least for HAM 2.8 or older). The priority parameter seems to be ignored in ham_CreateObj as well. Check your local HAM documentation to learn more about the ham_CreateObj parameters.

Returns:
Handle of the new object.
See also:
hel_ObjCreate16, hel_ObjCreate256

u8 hel_ObjCreate16 void *  pSrc,
u16  ObjShape,
u16  ObjSize,
u16  ObjMode,
u16  PalNo,
s16  X,
s16  Y
 

Create a new object using 16 colors.

The hel_ObjCreate16 function is a simplified version of hel_ObjCreate for objects with 16 colors. It creates a new object in HAM, using a 16 color palette and it automatically sets these properties:

  • ColMode = 0
  • Mosaic = FALSE
  • HFlip = FALSE
  • VFlip = FALSE
  • Prio = 0
  • DblSize = FALSE
Check your local HAM documentation to learn more about the ham_CreateObj parameters.

Returns:
Handle of the new object.
See also:
hel_ObjCreate, hel_ObjCreate256

u8 hel_ObjCreate256 void *  pSrc,
u16  ObjShape,
u16  ObjSize,
u16  ObjMode,
s16  X,
s16  Y
 

Create a new object using 256 colors.

The hel_ObjCreate256 function is a simplified version of hel_ObjCreate for objects with 256 colors. It creates a new object in HAM, using a 256 color palette and it automatically sets these properties:

  • ColMode = 1
  • PalNo = 0
  • Mosaic = FALSE
  • HFlip = FALSE
  • VFlip = FALSE
  • Prio = 0
  • DblSize = FALSE
Check your local HAM documentation to learn more about ham_CreateObj parameters.

Returns:
Handle of the new object.
See also:
hel_ObjCreate, hel_ObjCreate16

u8 hel_ObjExists u8  ObjNo  ) 
 

Check if an object exist.

The hel_ObjExists function checks if the object specified by ObjNo exists in HAM. An object exists when you created it using either the original ham_CreateObj function, or one of HEL's wrapper functions: hel_ObjCreate, hel_ObjCreate16, hel_ObjCreate256

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

u8 hel_ObjGetColorMode u8  ObjNo  ) 
 

Check if an object uses 256 or 16 colors.

The hel_ObjGetColorMode can be used to check if the object specified by ObjNo uses 256 or 16 colors.

Parameters:
ObjNo Object Handle
Returns:
Returns 1 if it uses 256 colors, otherwise 0

u8 hel_ObjGetFirst void   ) 
 

Get the first object handle.

Returns:
Returns the handle (object index) of the first object in HAM.

u16 hel_ObjGetGfxSlot u8  ObjNo  ) 
 

Get the graphic slot of an object.

The hel_ObjGetGfxSlot function returns the graphic slot where the object specified by ObjNo points to.

Returns:
The graphic slot of the object specified by ObjNo. This slot-value is between 0..1023

u8 hel_ObjGetMode u8  ObjNo  ) 
 

Get the mode of an object.

The hel_ObjGetMode function returns what mode an object uses.

Parameters:
ObjNo Object Handle
Returns:
  • OBJ_MODE_NORMAL
  • OBJ_MODE_SEMITRANSPARENT
  • OBJ_MODE_OBJWINDOW
See also:
hel_ObjSetMode

u8 hel_ObjGetPrio u8  ObjNo  ) 
 

Get object priority.

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

Parameters:
ObjNo Object Handle
See also:
hel_ObjSetPrio

u32 hel_ObjGetShape u8  ObjNo  ) 
 

Get object shape.

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

Parameters:
ObjNo Object Handle
Returns:
  • OBJ_SHAPE_SQUARE
  • OBJ_SHAPE_HORIZONTAL
  • OBJ_SHAPE_VERTICAL

u32 hel_ObjGetSize u8  ObjNo  ) 
 

Get object size.

The hel_ObjGetSize function returns the size-type of the object specified by ObjNo.

Parameters:
ObjNo 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 u8  ObjNo  ) 
 

Get object size in halfwords.

The hel_ObjGetSizeU16 function returns the size in halfwords of the graphic where the object specified by p ObjNo points to.

Parameters:
ObjNo Object Handle
Returns:
Size in halfwords of the graphic where the object specified by ObjNo 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

void hel_ObjHideAll void   ) 
 

Hide all objects.

The hel_ObjHideAll function hides all available objects in HAM's object management system.

See also:
hel_ObjShowAll, hel_ObjSetVisibleAll

u8 hel_ObjIsHFlip u8  ObjNo  ) 
 

Check if an object is horizontally flipped.

The hel_ObjIsVFlip function checks if the object specified by ObjNo is horizontally flipped, or to be more precise, if the horizontal flip bit is set.

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

u8 hel_ObjIsMosaic u8  ObjNo  ) 
 

Check if an object has mosaic attribute set.

The hel_ObjIsMosaic function can be used to check if the object specified by ObjNo has the Mosaic attribute set.

Parameters:
ObjNo Object Handle
Returns:
Returns TRUE if it uses mosaic, otherwise FALSE

u8 hel_ObjIsRotScale u8  ObjNo  ) 
 

Check if an object has the rotation/scaling attribute set.

The hel_ObjIsRotScale function can be used to check if the object specified by ObjNo has the Rotation/Scaling attribute set.

Parameters:
ObjNo Object Handle
Returns:
TRUE if rotation/scaling is used, otherwise FALSE

u8 hel_ObjIsVFlip u8  ObjNo  ) 
 

Check if an object is vertically flipped.

The hel_ObjIsVFlip function checks if the object specified by ObjNo is vertically flipped, or to be more precise, if the vertical flip bit is set.

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

u8 hel_ObjIsVisible u8  ObjNo  ) 
 

Check if an object is visible.

The hel_ObjIsVisible function checks if the object specified by ObjNo is visible.

Parameters:
ObjNo Object Handle
Returns:
Returns TRUE if it is visible, otherwise FALSE
See also:
hel_ObjSetVisibleAll, hel_ObjToggleVisible

void hel_ObjSelectRotScale u8  ObjNo,
u8  RotNo
 

Select a rotation/scaling parameter.

The hel_ObjSelectRotScale function selects a rotation/scaling parameter of the object specified by ObjNo.

Parameters:
ObjNo Object Handle
RotNo Rotation/scaling parameter Handle
See also:
hel_ObjSetRotScale

void hel_ObjSendToBack u32  ObjNo  ) 
 

Set an object behind all other objects.

The hel_ObjSendToBack function sends the object specified by ObjNo behind all other objects.

Parameters:
ObjNo Object Handle
See also:
hel_ObjBringToFront

void hel_ObjSetHFlip u8  ObjNo,
u8  Value
 

Set Horizontal Flipping.

The hel_ObjSetHFlip function horizontally flips the object specified by ObjNo.

Parameters:
ObjNo Object Handle
Value TRUE to flip, otherwise FALSE
See also:
hel_ObjSetVFlip

void hel_ObjSetMode u8  ObjNo,
u8  Mode
 

Set mode of an object.

The hel_ObjSetMode function sets the mode of the object specified by ObjNo.

Parameters:
ObjNo Object Handle
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_ObjSetMosaicSize u8  HSize,
u8  VSize
[inline]
 

Set OBJ Mosaic Size.

The hel_ObjSetMosaicSize function sets the horizontal and vertical mosaic size for the OBJ system. The OBJ mosaic size applies to all objects with mosaic activated (ham_SetObjMosaic).

Parameters:
HSize Horizontal Size of Mosaic (0..15)
VSize Vertical Size of Mosaic (0..15)
See also:
hel_ObjCreate, hel_ObjIsVisible

void hel_ObjSetPrio u8  ObjNo,
u32  Prio
 

Set object priority.

The hel_ObjSetPrio function sets the priority of the object specified by ObjNo. The object priority is relative to backgrounds.

Parameters:
ObjNo Object Handle
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 u8  ObjNo,
u8  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 ObjNo.

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

void hel_ObjSetVFlip u8  ObjNo,
u8  Value
 

Set Vertical Flipping.

The hel_ObjSetHFlip function vertically flips the object specified by ObjNo.

Parameters:
ObjNo Object Handle
Value TRUE to flip, otherwise FALSE
See also:
hel_ObjSetHFlip

void hel_ObjSetVisible u8  ObjNo,
u8  Value
 

Set visibility of an object.

The hel_ObjSetVisible function either shows or hides the object with the object number specified by ObjNo

Parameters:
ObjNo Object Handle
Value TRUE to show, FALSE to hide object
See also:
hel_ObjIsVisible, hel_ObjSetVisibleAll, hel_ObjToggleVisible, hel_ObjShowAll

void hel_ObjSetVisibleAll u8  Show  ) 
 

Show/Hide all objects.

The hel_ObjSetVisibleAll function either shows or hides all available objects in HAM's object management system.

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

void hel_ObjSetX u8  ObjNo,
s16  X
 

Set X position.

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

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

void hel_ObjSetXY u8  ObjNo,
s16  X,
s16  Y
 

Set X and Y position.

The hel_ObjSetXY function sets the horizontal and vertical position of the object specified by ObjNo.

Parameters:
ObjNo Object Handle
X The screen position, specified in pixels, where the object has to be set to
Y The screen position, specified in pixels, where the object has to be set to
See also:
hel_ObjSetX, hel_ObjSetY

void hel_ObjSetY u8  ObjNo,
s16  Y
 

Set Y position.

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

Parameters:
ObjNo Object Handle
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 created objects in HAM's object management system.

See also:
hel_ObjHideAll, hel_ObjSetVisibleAll

u8 hel_ObjToggleVisible u8  ObjNo  ) 
 

Toggle visibility of an object.

The hel_ObjToggleVisible function toggles the visibility of the object with the object number specified by ObjNo

Parameters:
ObjNo Object Handle
Returns:
Returns TRUE if the object is visible, otherwise FALSE
See also:
hel_ObjIsMosaic

void hel_ObjUpdateGfx u8  ObjNo,
void *  pSrc
 

Update object graphic.

The hel_ObjUpdateGfx function updates the graphic of the object specified by ObjNo.

Parameters:
ObjNo Object Handle
pSrc Pointer to source graphic
See also:
hel_ObjUpdateGfxUnComp

void hel_ObjUpdateGfxUnComp u8  ObjNo,
void *  pSrc,
u32  CompressionType
 

Update object graphic with decompression support.

The hel_ObjUpdateGfxUnComp function updates the graphic of the object specified by ObjNo and supports compressed data.

Parameters:
ObjNo Object Handle
pSrc Pointer to compressed source graphic
CompressionType Type of compression source graphic uses. This can be one of the COMPRESSION_TYPE_* predefined values.
See also:
hel_ObjUpdateGfx, hel_SwiUnComp

void ATTR_DEPRECATED hel_ObjUpdateInOAM u8  ObjNo  ) 
 

Update an object in OAM immediately.

The hel_ObjUpdateInOAM function updates the object specified by ObjNo in OAM immediately.

Parameters:
ObjNo Object Handle
Remarks:
This function can be very handy though. Imagine you want, for example, change the visibility of an object immediately, instead of waiting until ham_CopyObjToOAM commits the new data to OAM, what usually happens when the VBL interrupt occurs (but this depends on your code). Then this function is what you want.
Note:
Check your local HAM documentation for more info about ham_CopyObjToOAM.


Generated on Sun Oct 9 20:21:01 2005 by DoxyGen 1.4.4