Ignore:
Timestamp:
Nov 10, 2003, 7:29:04 PM (18 years ago)
Author:
Sam Hocevar
Message:
  • libee/sprite.c: + Added sanity checks in ee_sprite_* functions.
  • libee/conic.c: + Use ellipsepoints() in ee_draw_circle().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ttyvaders/trunk/libee/sprite.c

    r122 r136  
    131131void ee_set_sprite_frame(struct ee_sprite *sprite, int f)
    132132{
     133    if(sprite == NULL)
     134        return;
     135
    133136    if(f < 0 || f >= sprite->nf)
    134137        return;
     
    139142int ee_get_sprite_frame(struct ee_sprite *sprite)
    140143{
     144    if(sprite == NULL)
     145        return -1;
     146
    141147    return sprite->f;
    142148}
     
    145151{
    146152    int i, j;
    147     struct ee_frame *frame = &sprite->frames[sprite->f];
     153    struct ee_frame *frame;
     154
     155    if(sprite == NULL)
     156        return;
     157
     158    frame = &sprite->frames[sprite->f];
    148159
    149160    for(j = 0; j < frame->h; j++)
     
    166177    int i;
    167178
     179    if(sprite == NULL)
     180        return;
     181
    168182    for(i = sprite->nf; i--;)
    169183    {
Note: See TracChangeset for help on using the changeset viewer.