Nilorea Library

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Macros
Functions
n_object.c File Reference
`#include "nilorea.h"`
Include dependency graph for n_object.c:

Go to the source code of this file.

## Functions

int | init_object_list (OBJECT_LIST **objlst, int max)
| Initialize an OBJECT list. More...
int | destroy_object_list (OBJECT_LIST **objlist)
| Remove an OBJECT list. More...
int | add_object (OBJECT_LIST **objlist, int type, int action, int id, double X, double Y, double speed_x, double speed_y, double acc_x, double acc_y, int time_stamp, int timeout)
int | rem_object (OBJECT_LIST *objlist, int id)
| Remove an object. More...
int | refresh_list_of_object (OBJECT_LIST **objlst)
| Remove timed out entries. More...
int | sort_list_of_object (OBJECT_LIST *list)
| Sort the list of object from 0 to SCREEN_W and from 0 to SCREEN_H ( ready to display );. More...

## Detailed Description

object functions

Author
  Castagnier Mickael

Version
  1.0

Date
  04/07/05

Definition in file n_object.c.

## Function Documentation

int add_object | ( | OBJECT_LIST ** | objlist,
|  | int | type,
|  | int | action,
|  | int | id,
|  | double | X,
|  | double | Y,
|  | double | speed_x,
|  | double | speed_y,
|  | double | acc_x,
|  | double | acc_y,
|  | int | time_stamp,
|  | int | timeout
| ) |  |

Definition at line 106 of file n_object.c.

int destroy_object_list | ( | OBJECT_LIST ** | objlist | ) |

Remove an OBJECT list.

Parameters

  objlist | The OBJECT_LIST *objlist to destroy

Returns
  TRUE or FALSE

Definition at line 64 of file n_object.c.

int init_object_list | ( | OBJECT_LIST ** | objlst,
|  | int | max
| ) |  |

Initialize an OBJECT list.

Parameters

  objlst | The OBJECT_LIST *objlst to initialize
  max | Maximum elements or -1 if disable

Returns
  TRUE or FALSE

Definition at line 32 of file n_object.c.

int refresh_list_of_object | ( | OBJECT_LIST ** | objlst | ) |

Remove timed out entries.

Parameters

  objlst | The list to refresh

Returns
  TRUE or FALSE

Definition at line 264 of file n_object.c.

Here is the call graph for this function:

int rem_object | ( | OBJECT_LIST * | objlist,
|  | int | id
| ) |  |

Remove an object.

Parameters

  objlist | The list where you want to remove an object
  id | The id of the object to remove

Returns
  TRUE or FALSE if no object with the given id

Definition at line 216 of file n_object.c.

int sort_list_of_object | ( | OBJECT_LIST * | list | ) |

Sort the list of object from 0 to SCREEN_W and from 0 to SCREEN_H ( ready to display );.

Parameters

  list | The list to sort

Returns
  TRUE or FALSE

Definition at line 360 of file n_object.c.