Various utilities for the pointer management.
More...
Go to the source code of this file.
|
void | POINTER_SetCurrentPointer (coord_t width, coord_t height, const u8 *bmp) |
|
s16 | POINTER_GetCurrentAngleStart (void) |
|
void | POINTER_SetCurrentAngleStart (u16 newangle) |
|
u16 | POINTER_GetCurrentSpeedOnAngle (void) |
|
void | POINTER_SetCurrentSpeedOnAngle (u16 newspeed) |
|
void | POINTER_SetCurrentAreaStore (u8 *ptr) |
|
void | POINTER_SetMode (enum POINTER_mode mode) |
|
enum POINTER_mode | POINTER_GetMode (void) |
|
enum POINTER_state | POINTER_GetState (void) |
|
void | POINTER_SetRect (coord_t x, coord_t y, coord_t width, coord_t height) |
|
void | POINTER_SetRectScreen (void) |
|
u16 | POINTER_GetPos (void) |
|
void | POINTER_SetPos (coord_t x, coord_t y) |
|
void | POINTER_Draw (coord_t x, coord_t y, coord_t width, coord_t height, const u8 *bmp) |
|
void | POINTER_Save (coord_t x, coord_t y, coord_t width, coord_t height) |
|
void | POINTER_Restore (coord_t x, coord_t y, coord_t width, coord_t height) |
|
void | POINTER_SetApplication_Pointer_Mgr (tAppPtrMgr mgr) |
|
void | POINTER_SetColor (color_t color) |
|
color_t | POINTER_GetColor (void) |
|
tPointer_Info * | POINTER_GetInfo (void) |
|
- Author
- FL
- Date
- 07/2007
- Version
- 1.1
- Date
- 10/2007
- Version
- 1.5 various corrections reported by Ron Miller to suppress jittery
- Date
- 10/2008
- Version
- 3.0 Add joystick use for Primer 2
- Date
- 10/2009
- Version
- 4.0 Add Open4 Primer
Definition in file pointer.c.
void POINTER_Draw |
( |
coord_t |
x, |
|
|
coord_t |
y, |
|
|
coord_t |
width, |
|
|
coord_t |
height, |
|
|
const u8 * |
bmp |
|
) |
| |
Draw pointer.
- Parameters
-
[in] | x | Horizontal coordinate of the bottom left corner of the pointer. |
[in] | y | Vertical coordinate of the bottom left corner of the pointer. |
[in] | width | Pointer bitmap width. |
[in] | height | Pointer bitmap height. |
[in] | bmp | Pointer to width * height bit array. If null used default pointer bitmap. |
- Note
- The provided bitmap is a monochrome one.
- Warning
- The (0x0) point in on the low left corner.
Definition at line 863 of file pointer.c.
color_t POINTER_GetColor |
( |
void |
) | |
|
Return the current pointer color.
- Returns
- Current pointer color.
Definition at line 1056 of file pointer.c.
s16 POINTER_GetCurrentAngleStart |
( |
void |
) | |
|
Get the current minimal angle to move pointer
- Returns
- current minimal angle.
Definition at line 550 of file pointer.c.
u16 POINTER_GetCurrentSpeedOnAngle |
( |
void |
) | |
|
Return the current speed/angle ratio.
- Returns
- current ratio.
Definition at line 586 of file pointer.c.
Get pointer informations.
- Returns
- A pointer to a pointer information structure.
Definition at line 1074 of file pointer.c.
Return the current mode of the pointer management
- Returns
- Current pointer management mode.
Definition at line 713 of file pointer.c.
u16 POINTER_GetPos |
( |
void |
) | |
|
Return the current position of the pointer (on the screen).
- Returns
- The current pointer screen position with X in the LSB and Y in the MSB.
- Warning
- The (0x0) point in on the low left corner.
Definition at line 815 of file pointer.c.
Return current pointer state.
- Returns
- Current pointer state.
Definition at line 731 of file pointer.c.
void POINTER_Restore |
( |
coord_t |
x, |
|
|
coord_t |
y, |
|
|
coord_t |
width, |
|
|
coord_t |
height |
|
) |
| |
Restore the background of the pointer with data saved in the current store area.
- Parameters
-
[in] | x | Horizontal coordinate of the bottom left corner of the area to restore. |
[in] | y | Vertical coordinate of the bottom left corner of the area to restore. |
[in] | width | Width of the area to restore. |
[in] | height | Height of the area to restore. |
- Warning
- The (0x0) point in on the low left corner.
- See Also
- POINTER_Save
-
POINTER_SetCurrentAreaStore
Definition at line 977 of file pointer.c.
void POINTER_Save |
( |
coord_t |
x, |
|
|
coord_t |
y, |
|
|
coord_t |
width, |
|
|
coord_t |
height |
|
) |
| |
Save the background of the pointer.
- Parameters
-
[in] | x | Horizontal coordinate of the bottom left corner of the area to save. |
[in] | y | Vertical coordinate of the bottom left corner of the area to save. |
[in] | width | Width of the area to save. |
[in] | height | Height of the area to save. |
- Note
- The store area must be large enough to store all the pixels (16 bits).
- Warning
- The (0x0) point in on the low left corner.
- See Also
- POINTER_Restore
-
POINTER_SetCurrentAreaStore
Definition at line 945 of file pointer.c.
void POINTER_SetApplication_Pointer_Mgr |
( |
tAppPtrMgr |
mgr) | |
|
Provides an user defined pointer manager.
- Parameters
-
[in] | mgr | Pointer to the user defined pointer manager. |
Definition at line 1020 of file pointer.c.
void POINTER_SetColor |
( |
color_t |
color) | |
|
Set the pointer color.
- Parameters
-
[in] | color | The new pointer color. |
Definition at line 1038 of file pointer.c.
void POINTER_SetCurrentAngleStart |
( |
u16 |
newangle) | |
|
Set the current minimal angle to move pointer
- Parameters
-
[in] | newangle | The new minimal angle to move pointer. |
Definition at line 568 of file pointer.c.
void POINTER_SetCurrentAreaStore |
( |
u8 * |
ptr) | |
|
Change the current storage area. If the provided value is NULL, the default storage area will be used.
- Parameters
-
[in] | ptr | New storage area (may be null). |
- Warning
- Memory space pointed by the provided pointer must be large enough to store a color bitmap corresponding to the pointer area. In other words, space must be width * height * 2 bytes large.
Definition at line 627 of file pointer.c.
void POINTER_SetCurrentPointer |
( |
coord_t |
width, |
|
|
coord_t |
height, |
|
|
const u8 * |
bmp |
|
) |
| |
Set the dimension and the bitmap of the pointer.
- Note
- The bitmap is a monochrome one!
- Parameters
-
[in] | width | width of the pointer (u8) |
[in] | height | height of the pointer (u8) |
[in] | bmp | pointer to an array of width * height bits. |
Definition at line 520 of file pointer.c.
void POINTER_SetCurrentSpeedOnAngle |
( |
u16 |
newspeed) | |
|
Set the current speed/angle ratio.
- Parameters
-
[in] | newspeed | New speed/angle ratio. |
Definition at line 604 of file pointer.c.
Change the current mode of the pointer management.
- Note
- Must be called only ONCE!!
- Parameters
-
[in] | mode | New pointer management mode. |
Definition at line 647 of file pointer.c.
void POINTER_SetPos |
( |
coord_t |
x, |
|
|
coord_t |
y |
|
) |
| |
Force the screen position of the pointer.
- Parameters
-
[in] | x | New horizontal coordinate. |
[in] | y | New vertical coordinate. |
- Warning
- The (0x0) point in on the low left corner.
Definition at line 836 of file pointer.c.
void POINTER_SetRect |
( |
coord_t |
x, |
|
|
coord_t |
y, |
|
|
coord_t |
width, |
|
|
coord_t |
height |
|
) |
| |
Set new limits for the move of the pointer
- Parameters
-
[in] | x | Horizontal coordinate of the bottom left corner of the new area. |
[in] | y | Vertical coordinate of the bottom left corner of the new are. |
[in] | width | New area width. |
[in] | height | New area height. |
- Warning
- The (0x0) point in on the low left corner.
Definition at line 754 of file pointer.c.
void POINTER_SetRectScreen |
( |
void |
) | |
|
Allow the pointer to move on the whole screen.
Definition at line 796 of file pointer.c.