# sprites.h

## Data Structures
struct | SIMAGEPTR
struct | SDATAXPTR
struct | SDATACPTR
struct | SPRITESPTR
## Enumerations
enum | ANIMATION { MLEFT = 0x1, MRIGHT = 0x2, MUP = 0x4, MDOWN = 0x8, MATTACK = 0x10, MDAMAGED = 0x20, MRECOVER = 0x40, MNONE = 0x80 }
## Functions
SPRITESPTR | get_first_element_from_sprite_list (void)
SPRITESPTR | set_first_element_in_sprite_list (SPRITESPTR *newfirst)
SPRITESPTR | create_new_sprite (char *label, char *imagelabels[], int num_images, char *datalabels[], char *datatypes[], void *data[], int num_data, char *currentimg, float x, float y, float dx, float dy, int anim_counter, ANIMATION animflags, _Bool add_to_list)
SPRITESPTR | add_element_to_sprite_list (SPRITESPTR *sprite)
SPRITESPTR | remove_element_from_sprite_list (char *label)
SPRITESPTR | remove_element_from_sprite_list_ptr (SPRITESPTR sprite)
SPRITESPTR | search_sprite_list_for_element (char *label)
_Bool | empty_sprite_list (SPRITESPTR firstptr)
SPRITESPTR | set_anim_flags_on_sprite (SPRITESPTR sprite, ANIMATION nflags)
SPRITESPTR | remove_anim_flags_on_sprite (SPRITESPTR sprite, ANIMATION nflags)
SPRITESPTR | clear_anim_flags_on_sprite (SPRITESPTR sprite)
SPRITESPTR | clear_anim_flags_on_sprite_list (SPRITESPTR firstptr)
SPRITESPTR | remove_anim_flags_on_sprite_list (SPRITESPTR firstptr, ANIMATION nflags)
SIMAGEPTR | get_first_element_from_base_image_list (void)
SIMAGEPTR | set_first_element_in_base_image_list (SIMAGEPTR *newfirst)
SIMAGEPTR | create_base_image_list (char *labels[], char *images[], int max)
SIMAGEPTR | create_new_base_image (char *label, char *file_name)
SIMAGEPTR | add_element_to_base_image_list (SIMAGEPTR *image)
SIMAGEPTR | remove_element_from_base_image_list (char *label)
SIMAGEPTR | search_base_image_list_for_element (char *label)
_Bool | empty_base_image_list (SIMAGEPTR firstptr)
SIMAGEPTR | create_new_image_list (char *labels[], int max)
SIMAGEPTR | create_new_image (char *label)
SIMAGEPTR | add_element_to_image_list (SIMAGEPTR *ifirstptr, SIMAGEPTR *image)
SIMAGEPTR | remove_element_from_image_list (SIMAGEPTR *ifirstptr, char *label)
SIMAGEPTR | search_image_list_for_element (SIMAGEPTR *ifirstptr, char *label)
_Bool | empty_image_list (SIMAGEPTR firstptr)
SDATAXPTR | create_new_datax_list (char *labels[], char *types[], void *data[], int max)
SDATAXPTR | create_new_datax (char *label, char *type, void *data)
SDATAXPTR | add_element_to_datax_list (SDATAXPTR *dfirstptr, SDATAXPTR *datax)
SDATAXPTR | remove_element_from_datax_list (SDATAXPTR *dfirstptr, char *label)
SDATAXPTR | search_datax_list_for_element (SDATAXPTR *dfirstptr, char *label)
_Bool | empty_datax_list (SDATAXPTR firstptr)

## Detailed Description

Manages the base image linked list and the sprite linked list, provides function to create new sprites and add them to sprite list as well as removing sprites from the list

## Enumeration Type Documentation

enum ANIMATION

Enumerator:

  MLEFT |
  MRIGHT |
  MUP |
  MDOWN |
  MATTACK |
  MDAMAGED |
  MRECOVER |
  MNONE |

Definition at line 15 of file sprites.h.

## Function Documentation

SIMAGEPTR add_element_to_base_image_list | ( | SIMAGEPTR * | image | ) |

Definition at line 101 of file sprites.c.

SDATAXPTR add_element_to_datax_list | ( | SDATAXPTR * | dfirstptr,
|  | SDATAXPTR * | datax |
| ) |  |  |

Definition at line 321 of file sprites.c.

SIMAGEPTR add_element_to_image_list | ( | SIMAGEPTR * | ifirstptr,
|  | SIMAGEPTR * | image |
| ) |  |  |

Definition at line 203 of file sprites.c.

SPRITESPTR add_element_to_sprite_list | ( | SPRITESPTR * | sprite | ) |

Definition at line 452 of file sprites.c.

SPRITESPTR clear_anim_flags_on_sprite | ( | SPRITESPTR | sprite | ) |

Definition at line 621 of file sprites.c.

SPRITESPTR clear_anim_flags_on_sprite_list | ( | SPRITESPTR | firstptr | ) |

Definition at line 630 of file sprites.c.

SIMAGEPTR create_base_image_list | ( | char * | labels[],
|  | char * | images[],
|  | int | max |
| ) |  |  |

Definition at line 67 of file sprites.c.

SIMAGEPTR create_new_base_image | ( | char * | label,
|  | char * | file_name |
| ) |  |  |

Definition at line 84 of file sprites.c.

SDATAXPTR create_new_datax | ( | char * | label,
|  | char * | type,
|  | void * | data |
| ) |  |  |

Definition at line 309 of file sprites.c.

SDATAXPTR create_new_datax_list | ( | char * | labels[],
|  | char * | types[],
|  | void * | data[],
|  | int | max |
| ) |  |  |

Definition at line 295 of file sprites.c.

SIMAGEPTR create_new_image | ( | char * | label | ) |

Definition at line 186 of file sprites.c.

SIMAGEPTR create_new_image_list | ( | char * | labels[],
|  | int | max |
| ) |  |  |

Definition at line 171 of file sprites.c.

SPRITESPTR create_new_sprite | ( | char * | label,
|  | char * | imagelabels[],
|  | int | num_images,
|  | char * | datalabels[],
|  | char * | datatypes[],
|  | void * | data[],
|  | int | num_data,
|  | char * | currentimg,
|  | float | x,
|  | float | y,
|  | float | dx,
|  | float | dy,
|  | int | anim_counter,
|  | ANIMATION | animflags,
|  | _Bool | add_to_list |
| ) |  |  |

Definition at line 425 of file sprites.c.

_Bool empty_base_image_list | ( | SIMAGEPTR | firstptr | ) |

Definition at line 128 of file sprites.c.

_Bool empty_datax_list | ( | SDATAXPTR | firstptr | ) |

Definition at line 373 of file sprites.c.

_Bool empty_image_list | ( | SIMAGEPTR | firstptr | ) |

Definition at line 258 of file sprites.c.

_Bool empty_sprite_list | ( | SPRITESPTR | firstptr | ) |

Definition at line 521 of file sprites.c.

SIMAGEPTR get_first_element_from_base_image_list | ( | void |  | ) |

Definition at line 48 of file sprites.c.

SPRITESPTR get_first_element_from_sprite_list | ( | void |  | ) |

Definition at line 410 of file sprites.c.

SPRITESPTR remove_anim_flags_on_sprite | ( | SPRITESPTR | sprite,
|  | ANIMATION | nflags |
| ) |  |  |

Definition at line 585 of file sprites.c.

SPRITESPTR remove_anim_flags_on_sprite_list | ( | SPRITESPTR | firstptr,
|  | ANIMATION | nflags |
| ) |  |  |

Definition at line 608 of file sprites.c.

SIMAGEPTR remove_element_from_base_image_list | ( | char * | label | ) |

Definition at line 109 of file sprites.c.

SDATAXPTR remove_element_from_datax_list | ( | SDATAXPTR * | dfirstptr,
|  | char * | label |
| ) |  |  |

Definition at line 343 of file sprites.c.

SIMAGEPTR remove_element_from_image_list | ( | SIMAGEPTR * | ifirstptr,
|  | char * | label |
| ) |  |  |

Definition at line 226 of file sprites.c.

SPRITESPTR remove_element_from_sprite_list | ( | char * | label | ) |

Definition at line 474 of file sprites.c.

SPRITESPTR remove_element_from_sprite_list_ptr | ( | SPRITESPTR | sprite | ) |

Definition at line 490 of file sprites.c.

SIMAGEPTR search_base_image_list_for_element | ( | char * | label | ) |

Definition at line 120 of file sprites.c.

SDATAXPTR search_datax_list_for_element | ( | SDATAXPTR * | dfirstptr,
|  | char * | label |
| ) |  |  |

Definition at line 358 of file sprites.c.

SIMAGEPTR search_image_list_for_element | ( | SIMAGEPTR * | ifirstptr,
|  | char * | label |
| ) |  |  |

Definition at line 242 of file sprites.c.

SPRITESPTR search_sprite_list_for_element | ( | char * | label | ) |

Definition at line 506 of file sprites.c.

SPRITESPTR set_anim_flags_on_sprite | ( | SPRITESPTR | sprite,
|  | ANIMATION | nflags |
| ) |  |  |

Definition at line 562 of file sprites.c.

SIMAGEPTR set_first_element_in_base_image_list | ( | SIMAGEPTR * | newfirst | ) |

Definition at line 57 of file sprites.c.

SPRITESPTR set_first_element_in_sprite_list | ( | SPRITESPTR * | newfirst | ) |

Definition at line 417 of file sprites.c.