public void Initialise(GameLoopEventHandler onUpdate, GameLoopEventHandler onRender, IEntityDataProvider graphicsDataProvider) { BLT.Open(); _update = onUpdate; _render = onRender; var config = $"window: size={Configuration.InitialWidth * TILE_SPACING}x{Configuration.InitialHeight * TILE_SPACING}, cellsize=4x4, title='{Configuration.WindowTitle}'"; BLT.Set(config); BLT.Set("input: precise-mouse=false, filter=[keyboard,mouse+];"); BLT.Set("text font: Images/Tileset/Andux_sleipnir_8x12_tf.png, codepage=437, size=8x12, spacing=2x3;"); BLT.Set("textLarge font: Images/Tileset/Andux_sleipnir_8x12_tf.png, codepage=437, size=8x12, resize=16x24, resize-filter=nearest, spacing=4x6;"); BLT.Set("textXLarge font: Images/Tileset/Andux_sleipnir_8x12_tf.png, codepage=437, size=8x12, resize=32x48, resize-filter=nearest, spacing=8x12;"); _spriteManager = SetUpSpriteManager(graphicsDataProvider); List <IDataRogueControlRenderer> controlRenderers = BLTControlRenderer.DefaultControlRenderers; controlRenderers.AddRange(Configuration.AdditionalControlRenderers); Renderer = new BLTTilesUnifiedRenderer(controlRenderers, _spriteManager, Configuration); BLT.Refresh(); }
public void Initialise(GameLoopEventHandler onUpdate, GameLoopEventHandler onRender, IEntityDataProvider graphicsDataProvider) { string fontFileName = "Images\\Tileset\\Alloy_curses_12x12.png"; string consoleTitle = Configuration.WindowTitle; _rootConsole = new RLRootConsole(fontFileName, Configuration.InitialWidth, Configuration.InitialHeight, Configuration.TileWidth, Configuration.TileHeight, 1, consoleTitle); _onUpdate = onUpdate; _onRender = onRender; _rootConsole.Update += UpdateHandler; _rootConsole.Render += RenderHandler; var controlRenderers = RLNetControlRenderer.DefaultStatsDisplayers.OfType <IDataRogueControlRenderer>().ToList(); controlRenderers.AddRange(Configuration.AdditionalControlRenderers); Renderer = new ConsoleUnifiedRenderer(_rootConsole, Configuration, controlRenderers); }