# SPDX-License-Identifier: MIT require "red_bird" require "red_bird/demo/version" module RedBird module Demo require_relative "demo/stage_main" require_relative "demo/stage_move_on_tiles" require_relative "demo/stage_resolution" require_relative "demo/version" class Error < StandardError; end def self.run RedBird::Engine.debug = true RedBird::Engine.set_pixel_quantity(256, 240) RedBird::Engine.set_screen_resolution(256, 240) gb = { stage: :main, palette: nil } RedBird::Engine.run(gb) do |global_data| case global_data[:stage] when :main then Demo::Stage::Main.new(global_data) when :move_on_tiles then Demo::Stage::MoveOnTiles.new(global_data) when :resolution then Demo::Stage::Resolution.new(global_data) end end end end end