From 6490ed86128358311b9d0a55524b476d7ff1f97a Mon Sep 17 00:00:00 2001 From: chrisf Date: Thu, 5 Jul 2007 22:46:58 +0000 Subject: [PATCH] tiny bit of progress git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1105 993157c7-ee19-0410-b2c4-bb4e9862e678 --- OpenRa.Game/MainWindow.cs | 10 +++++++++- OpenRa.Game/OpenRa.Game.csproj | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/OpenRa.Game/MainWindow.cs b/OpenRa.Game/MainWindow.cs index 4dc7d61195..7f79967910 100644 --- a/OpenRa.Game/MainWindow.cs +++ b/OpenRa.Game/MainWindow.cs @@ -4,6 +4,8 @@ using System.Text; using System.Windows.Forms; using System.Drawing; using BluntDirectX.Direct3D; +using OpenRa.FileFormats; +using System.IO; namespace OpenRa.Game { @@ -11,14 +13,20 @@ namespace OpenRa.Game { GraphicsDevice device; + const string mapName = "scm12ea.ini"; + public MainWindow() { - Text = "OpenRA"; ClientSize = new Size(640, 480); Visible = true; device = GraphicsDevice.Create(this, ClientSize.Width, ClientSize.Height, true, false); + + IniFile mapFile = new IniFile(File.OpenRead("../../../" + mapName)); + Map map = new Map(mapFile); + + Text = string.Format("OpenRA - {0} - {1}", map.Title, mapName); } internal void Run() diff --git a/OpenRa.Game/OpenRa.Game.csproj b/OpenRa.Game/OpenRa.Game.csproj index e1b307f99c..31029a5c52 100644 --- a/OpenRa.Game/OpenRa.Game.csproj +++ b/OpenRa.Game/OpenRa.Game.csproj @@ -45,6 +45,12 @@ + + + {BDAEAB25-991E-46A7-AF1E-4F0E03358DAA} + OpenRa.FileFormats + +