#include <stdlib.h>
#include "noidZ.h"
//#include "sand.h"
#include "bubble.h"




SDL_Surface *screen = NULL;
struct noidZ_mice mouse_info;
int end;

//==========================================================================
//==========================================================================



//==========================================================================
//==========================================================================

void main_loop(void) 
{

	mouse_info = noidZ_Got_Mouse(screen);
	bresline(screen,mouse_info.x+0.1,mouse_info.x-0.1,mouse_info.y+0.1,mouse_info.y-0.1,white);
	bresline(screen,mouse_info.x+0.1,mouse_info.x-0.1,mouse_info.y-0.1,mouse_info.y+0.1,white);
	noidZ_Refresh(screen);
}

int main( int argc, char* args[] ) 
{ 
	SDL_Init( SDL_INIT_EVERYTHING );
	screen = SDL_SetVideoMode( 200, 200, 16, SDL_SWSURFACE|SDL_ANYFORMAT );
	SDL_WM_SetCaption( "NOiD Zero", NULL );

				init_bulle();

	noidZ_Init(screen);
		while (!end)
		{
              		//SDL_Delay(10);
			main_loop();
			end = noidZ_Loop();
 				draw_bulle(screen);


				inter_bulle();
				toute_bulle();


				if(mouse_info.b == 1)
				{

				}

		}

	SDL_FreeSurface( screen );
	SDL_Quit(); 
	return 0; 
}
