require '../src/ClanRuby'
include ClanRuby

#
# This sample simply draws a couple of boxes on
# a white background.
#

#
# Initialize the core and display libs.
#
SetupCore.init()
SetupDisplay.init()

#
# Create an 640 X 480 window, 16 bits of color.
#
Display.setVideoMode( 640, 480, 16, false )

#
# Draw some boxes
#
while ( ! KeyBoard.getKeycode( CL_KEY_ESCAPE) )

	#
	# Fill the window with white.
	#
	Display.fillRect( 0, 0, 640, 480, 1, 1, 1, 1)
	
	#
	# Draw two semi tranparent boxes on top of the while.
	#
	Display.fillRect( 100, 100, 200, 400, 1, 0, 0, 0.9)
	Display.fillRect( 40, 300, 600, 470, 0, 1, 0, 0.25)
	
	#
	# Make it all visible.
	#
	Display.flipDisplay()
	System.keepAlive(100)
end

#
# Clean up
#
SetupDisplay.deinit()
SetupCore.deinit()




