engine/source/gamelib/spriteq.c
// newonly is 1 means don't draw locked sprites
newonly is 1 means don't draw locked sprites
newonly is 1 means don ' t draw locked sprites
void spriteq_draw(s_screen *screen, int newonly, int minz, int maxz, int dx, int dy)
{
    int i, x, y;
    spriteq_sort();
    for(i = 0; i < spritequeue_len; i++)
    {
        if((newonly && spriteq_locked && order[i] < queue + spriteq_old_len) || order[i]->z < minz || order[i]->z > maxz)
        {
            continue;
        }
        x = order[i]->x + dx;
        y = order[i]->y + dy;
        switch(order[i]->type)
        {
        case SQT_SPRITE: 
            if(order[i]->params[0])
            {
                ((s_sprite *)(order[i]->frame))->centerx = order[i]->params[1];
                ((s_sprite *)(order[i]->frame))->centery = order[i]->params[2];
            }
            putsprite(x, y, order[i]->frame, screen, &(order[i]->drawmethod));
            break;
        case SQT_SCREEN: 
            putscreen(screen, (s_screen *)(order[i]->frame), x, y, &(order[i]->drawmethod));
            break;
        case SQT_DOT:
            putpixel(x, y, order[i]->params[0], screen, &(order[i]->drawmethod));
            break;
        case SQT_LINE:
            putline(x, y, order[i]->params[1] + dx, order[i]->params[2] + dy, order[i]->params[0], screen, &(order[i]->drawmethod));
            break;
        case SQT_BOX:
            putbox(x, y, order[i]->params[1], order[i]->params[2], order[i]->params[0], screen, &(order[i]->drawmethod));
            break;
        default:
            continue;
        }
    }
}
void spriteq_draw ( s_screen * screen , int newonly , int minz , int maxz , int dx , int dy ) { int i , x , y ; spriteq_sort ( ) ; for ( i = 0 ; i < spritequeue_len ; i ++ ) { if ( ( newonly && spriteq_locked && order [ i ] < queue + spriteq_old_len ) || order [ i ] -> z < minz || order [ i ] -> z > maxz ) { continue ; } x = order [ i ] -> x + dx ; y = order [ i ] -> y + dy ; switch ( order [ i ] -> type ) { case SQT_SPRITE : if ( order [ i ] -> params [ 0 ] ) { ( ( s_sprite * ) ( order [ i ] -> frame ) ) -> centerx = order [ i ] -> params [ 1 ] ; ( ( s_sprite * ) ( order [ i ] -> frame ) ) -> centery = order [ i ] -> params [ 2 ] ; } putsprite ( x , y , order [ i ] -> frame , screen , & ( order [ i ] -> drawmethod ) ) ; break ; case SQT_SCREEN : putscreen ( screen , ( s_screen * ) ( order [ i ] -> frame ) , x , y , & ( order [ i ] -> drawmethod ) ) ; break ; case SQT_DOT : putpixel ( x , y , order [ i ] -> params [ 0 ] , screen , & ( order [ i ] -> drawmethod ) ) ; break ; case SQT_LINE : putline ( x , y , order [ i ] -> params [ 1 ] + dx , order [ i ] -> params [ 2 ] + dy , order [ i ] -> params [ 0 ] , screen , & ( order [ i ] -> drawmethod ) ) ; break ; case SQT_BOX : putbox ( x , y , order [ i ] -> params [ 1 ] , order [ i ] -> params [ 2 ] , order [ i ] -> params [ 0 ] , screen , & ( order [ i ] -> drawmethod ) ) ; break ; default : continue ; } } }
newonly is 1 means don't draw locked sprites
newonly is 1 means don ' t draw locked sprites
// sprite // determin if the sprite's center should be readjusted; // draw a screen instead of sprite