git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1330 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
@@ -6,19 +6,6 @@ using OpenRa.FileFormats;
|
||||
|
||||
namespace OpenRa.FileFormats
|
||||
{
|
||||
public class Folder : IFolder
|
||||
{
|
||||
readonly string path;
|
||||
|
||||
public Folder(string path) { this.path = path; }
|
||||
|
||||
public Stream GetContent(string filename)
|
||||
{
|
||||
try { return File.OpenRead(path + filename); }
|
||||
catch { throw new FileNotFoundException("File not found", filename); }
|
||||
}
|
||||
}
|
||||
|
||||
public static class FileSystem
|
||||
{
|
||||
static List<IFolder> mountedFolders = new List<IFolder>();
|
||||
|
||||
20
OpenRa.FileFormats/Folder.cs
Normal file
20
OpenRa.FileFormats/Folder.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace OpenRa.FileFormats
|
||||
{
|
||||
public class Folder : IFolder
|
||||
{
|
||||
readonly string path;
|
||||
|
||||
public Folder(string path) { this.path = path; }
|
||||
|
||||
public Stream GetContent(string filename)
|
||||
{
|
||||
try { return File.OpenRead(path + filename); }
|
||||
catch { throw new FileNotFoundException("File not found", filename); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,8 +17,7 @@ namespace OpenRa.FileFormats
|
||||
|
||||
public readonly int Width;
|
||||
public readonly int Height;
|
||||
|
||||
public PointF Size { get { return new PointF(Width, Height); } }
|
||||
public int2 Size { get { return new int2(Width, Height); } }
|
||||
|
||||
public readonly TileReference[ , ] MapTiles = new TileReference[ 128, 128 ];
|
||||
public readonly List<TreeReference> Trees = new List<TreeReference>();
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Blowfish.cs" />
|
||||
<Compile Include="FileSystem.cs" />
|
||||
<Compile Include="Folder.cs" />
|
||||
<Compile Include="Format40.cs" />
|
||||
<Compile Include="Format80.cs" />
|
||||
<Compile Include="IniFile.cs" />
|
||||
|
||||
Reference in New Issue
Block a user