module Salamander
Constants
- COLORS
- COMPASS
- DIRECTIONS
- VERSION
Public Class Methods
setup(width, height)
click to toggle source
Initialize SDL and create a window
Do not call more than once
# File lib/salamander.rb, line 12 def self.setup (width, height) SDL.Init(SDL::INIT_VIDEO) at_exit { SDL.Quit } info = SDL.GetVideoInfo flags = (info.hw_available) ? SDL::HWSURFACE : SDL::SWSURFACE Canvas.new(SDL.SetVideoMode(width, height, info.vfmt.BitsPerPixel, flags)) end