This year, say "hello world" with boxes



To get started with ClanRuby, have a look in the src/samples directory for examples of using ClanRuby.

Just to wet your appetite, here is "boxes.rb", a little ClanRuby script which draws a series of boxes in a window:

require 'ClanRuby'
include ClanRuby

#
# 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 until the user hits escape.
#

while ( ! KeyBoard.getKeycode( CL_KEY_ESCAPE) )
Display.fillRect( 0, 0, 640, 480, 1, 1, 1, 1)
Display.fillRect( 100, 100, 200, 400, 1, 0, 0, 0.9)
Display.fillRect( 40, 300, 600, 470, 0, 1, 0, 0.25)
Display.flipDisplay()
System.keepAlive(100)
end

#
# Clean up
#
SetupDisplay.deinit()
SetupCore.deinit()

Not much too it, is there?