HAM Documentation

Home · Downloads · Your Account · Submit News

Documentation Homepage HAMLib reference Back to HAM Homepage |

# obj.c File Reference

Sprite Manipulation Functions. More...

`#include "mygba.h"`

## Functions

void | ham_ResetObj ()
| Reinitialize the complete Obj (Sprite) system.
u8 | ham_CreateObjFromGfxSlot (u16 slot, u16 obj_shape, u16 obj_size, u16 obj_mode, u16 col_mode, u16 pal_no,u16 mosaic, u16 hflip, u16 vflip, u16 prio, u16 dbl_size, u16 x, u16 y)
| advanced: create a new OBJ from Existing GFX slot
u8 | ham_CreateObj (void *src, u16 obj_shape, u16 obj_size, u16 obj_mode, u16 col_mode, u16 pal_no,u16 mosaic, u16 hflip, u16 vflip, u16 prio, u16 dbl_size, u16 x, u16 y)
| create a new Sprite in HAM
u8 | ham_CreateObjFromBg (u8 bgno, u32 bg_tileno_x, u32 bg_tileno_y, u16 obj_shape, u16 obj_size, u32 erase_bg, u32 tileno_filler)
| advanced: create a Sprite from a piece of a BG Map
u16 | ham_CreateObjGfx (void *src, u16 obj_shape, u16 obj_size, u16 col_mode)
| advanced: create new sprite GFX in OBJ memory for later use
void | ham_DeleteObjGfx (u16 slotno)
| advanced: deallocate previously allocated GFX from a slot
void | ham_SetObjBefore (u8 objno, u8 objno_target)
| change the Z Order of Sprites amongst each other
void | ham_UpdateObjGfx (u8 objno, void *src)
| replace the graphics of an existing Sprite with new ones
u16 | ham_GetObjGfxSlot (u8 objno)
| advanced: retrieve the graphics slot of a sprite
u8 | ham_GetObjPal16 (u8 objno)
| retrieve the palette number of a 16col Sprite
void | ham_SetObjGfxSlot (u8 objno, u16 slotno, u8 palno)
| advanced: change GFX slot number of sprite to other existing block
void | ham_UpdateObjPal16 (u8 objno, u8 pal_no)
| Update palette number of a 16 color sprite
void | ham_DeleteObj (u8 entryno)
| Unload and delete an initialized Sprite
u8 | ham_CloneObj (u8 objno, u16 x, u16 y)
| Clone an existing Sprite
void | ham_SetObjMode (u8 objno, u16 obj_mode)
| Set a Sprites OBJ Mode
void | ham_SetObjX (u8 objno, u16 x)
| Set a Sprites X Position on the screen
void | ham_SetObjY (u8 objno, u16 y)
| Set a Sprites Y Position on the screen
void | ham_SetObjXY (u8 objno, u16 x, u16 y)
| Set a Sprites X and Y Position on the screen
void | ham_SetObjMosaic (u8 objno, u8 val)
| Enable Mosaic Mode for a sprite
void | ham_SetObjDblSize (u8 objno, u8 val)
| set douvle size Mode for Rotating Sprites
void | ham_SetObjHFlip (u8 objno, u8 val)
| apply horizontal flipping for a Sprite
void | ham_SetObjVFlip (u8 objno, u8 val)
| apply vertical flipping for a Sprite
void | ham_SetObjPrio (u8 objno, u8 val)
| Set the BG priority for a Sprite
void | ham_SetObjVisible (u8 objno, u8 val)
| Hide/Display an initialized Sprite
void | ham_SetObjRotEnable (u8 objno, u8 val)
| Enable a Sprite for Rotation
void | ham_SetObjRotSetSelect (u8 objno, u8 val)
| Assign a Sprite to a Rotation Set
void | ham_CopyObjToOAM ()
| Commit all changes in HAM Sprite System to the GBA Hardware
u32 | ham_GetObjAvailable ()
| Return the number of available Sprites

## Detailed Description

Sprite Manipulation Functions.

Documentation Homepage | HAMLib reference | Back to HAM Homepage
documentation created with Doxygen