#include <io.h>
#include <system.h>
#include <stdio.h>
#include "vga_update.h"
//------------------------------------------------
extern int x;
int vga_cnt = 0;
//------------------------------------------------
void sprite_refresh()
{
    sprite_clear_all();
    int half_second;
    half_second = vga_cnt / 8;
    if(vga_cnt < 47) vga_cnt++;
    else vga_cnt = 0;
    //IOWR_SET_SPRITE(x, 300, 6+half_second, 2);
    IOWR_SET_SPRITE(x, 300, 6, 1);
    IOWR_SET_SPRITE(x+250, 300, 6, 2);
    IOWR_SET_SPRITE(x, 100, 6, 3);
    IOWR_END_IRQ();
}
void sprite_clear_all()
{
    int i;
    for(i = 0; i<16; i++){
        IOWR_SET_SPRITE( 2047, 2047, 0, i );
    }
}
