void graphics_quit()
{
	if(!kiss_init())
		return;

	kiss_lock();
	kiss_exec_op(KISS_CLOSE_WINDOW, 0, 0);
	kiss_unlock();
}
int graphics_init(int width, int height)
{
	if(!kiss_init())
		return 0;

	kiss_lock();
	kiss_exec_op(KISS_OPEN_WINDOW, width, height);
	kiss_unlock();
	return 1;
}
void graphics_update()
{
	if(!kiss_init())
		return;

	kiss_lock();
	kiss_graphics_lock();
	kiss_exec_op(KISS_COPY, 0, 0);
	kiss_graphics_unlock();
	kiss_unlock();
}
void graphics_line(int x1, int y1, int x2, int y2, int r, int g, int b)
{
	if(!kiss_init())
		return;

	kiss_lock();
	kiss_graphics_lock();
	if(kiss_g_graphics_enabled)
		kiss_graphics_line(x1, y1, x2, y2, r, g, b);
	kiss_graphics_unlock();
	kiss_unlock();
}
void graphics_pixel(int x, int y, int r, int g, int b)
{
	if(!kiss_init())
		return;

	kiss_lock();
	kiss_graphics_lock();
	if(kiss_g_graphics_enabled)
		kiss_graphics_pixel(x, y, r, g, b);
	kiss_graphics_unlock();
	kiss_unlock();
}
void graphics_triangle_fill(int x1, int y1, int x2, int y2, int x3, int y3, int r, int g, int b)
{
	if(!kiss_init())
		return;
		
	kiss_lock();
	kiss_graphics_lock();
	if(kiss_g_graphics_enabled)
		kiss_graphics_triangle_fill(x1, y1, x2, y2, x3, y3, r, g, b);
	kiss_graphics_unlock();
	kiss_unlock();
}
void graphics_circle(int cx, int cy, int radius, int r, int g, int b)
{
	if(!kiss_init())
		return;

	kiss_lock();
	kiss_graphics_lock();
	if(kiss_g_graphics_enabled)
		kiss_graphics_circle(cx, cy, radius, r, g, b);
	kiss_graphics_unlock();
	kiss_unlock();
}
void graphics_fill(int r, int g, int b)
{
	if(!kiss_init())
		return;

	kiss_lock();
	kiss_graphics_lock();
	if(kiss_g_graphics_enabled)
		kiss_graphics_fill(r, g, b);
	kiss_graphics_unlock();
	kiss_unlock();

}
Exemple #9
0
void kiss_terminate()
{
	kiss_lock();
	kiss_g_glfw_quit = 1;
	while(kiss_g_glfw_quit);
}