// HEL Library \\

 
Main Page | Modules | Related Pages

Object Functions

Description. More...

Functions


Detailed Description

Description.

A lot of these Object Functions are available in HAM as well, but the Object Functions in HEL get replaced with macros when you switch to release-mode, what 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 infront of all other objects.

Parameters:
ObjNo Object number in HAM's object management system
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.
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 orginal ham_CreateObj function, or one of HEL's wrapper functions: hel_ObjCreate, hel_ObjCreate16, hel_ObjCreate256

Parameters:
ObjNo Object number in HAM's object management system
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 number in HAM's object management system
Returns:
Returns 1 if it uses 256 colors, otherwise 0

u8 hel_ObjGetFirst void   ) 
 

Get the first object number.

Returns:
Returns the handle (object index) of the first object in HAM's object management system.

u16 hel_ObjGetGfxSlot u8  ObjNo  ) 
 

Get the graphic slot of an object.

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

Returns:
The graphicslot 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 number in HAM's object management system
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 number in HAM object management system
See also:
hel_ObjSetPrio

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 number in HAM's object management system
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 number in HAM's object management system
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 number in HAM's object management system
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 number in HAM object management system
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 number in HAM's object management system
Returns:
Returns TRUE if it is visible, otherwise FALSE
See also:
hel_ObjSetVisibleAll, hel_ObjToggleVisible

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 number in HAM's object management system
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 number in HAM object management system
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 number in HAM's object management system
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 mosaicsize 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 number in HAM object management system
Prio The priority value must between 0..3! It represents the backgroundnumber where this object is placed before.
See also:
hel_ObjGetPrio

void hel_ObjSetVFlip u8  ObjNo,
u8  Value
 

Set Vertical Flipping.

The hel_ObjSetHFlip function vertically flips the object specified by ObjNo.

Parameters:
ObjNo Object number in HAM object management system
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 objectnumber specified by ObjNo

Parameters:
ObjNo Object number in HAM object management system
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 number in HAM's object management system
X The screenposition, 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 number in HAM's object management system
X The screenposition, specified in pixels, where the object has to be set to
Y The screenposition, 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 number in HAM's object management system
Y The screenposition, 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 objectnumber specified by ObjNo

Parameters:
ObjNo Object number in HAM object management system
Returns:
Returns TRUE if the object is visible, otherwise FALSE
See also:
hel_ObjIsMosaic

void hel_ObjUpdateInOAM u8  ObjNo  )  [inline]
 

Update an object in OAM immediately.

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

Parameters:
ObjNo Object number in HAM'S object management system
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 Fri Jul 8 19:55:50 2005 by DoxyGen 1.4.3