From c5daf1d9adca0c3a826dfa2ac7b6d4f8a64c84a3 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 12 Apr 2010 01:09:04 +0000 Subject: [PATCH] created a new project MapProcessorLib to for importing map files determined that `cfmap' will be the extension we'll use for map files added map reader with a module for general-purpose parsing git-svn-id: https://bd85.net/svn/cs3505_group@62 92bb83a3-7c8f-8a45-bc97-515c4e399668 --- CarFire/CarFire/CarFire.sln | 38 ++- CarFire/CarFire/CarFire.suo | Bin 23040 -> 41984 bytes CarFire/CarFire/CarFire/CarFire.csproj | 3 + .../CarFire/Content/Content.contentproj | 11 + CarFire/CarFire/CarFire/Game.cs | 2 +- CarFire/CarFire/CarFire/Map.cs | 50 +++ CarFire/CarFire/CarFire/MapReader.cs | 287 ++++++++++++++++++ CarFire/CarFire/CarFire/Parse.cs | 205 +++++++++++++ CarFire/CarFire/CarFire/ScreenManager.cs | 2 +- .../CarFire/MapProcessorLib/MapImporter.cs | 28 ++ .../MapProcessorLib/MapProcessorLib.csproj | 122 ++++++++ .../CarFire/MapProcessorLib/MapSourceCode.cs | 22 ++ CarFire/CarFire/MapProcessorLib/MapWriter.cs | 38 +++ .../Properties/AssemblyInfo.cs | 33 ++ 14 files changed, 837 insertions(+), 4 deletions(-) create mode 100644 CarFire/CarFire/CarFire/Map.cs create mode 100644 CarFire/CarFire/CarFire/MapReader.cs create mode 100644 CarFire/CarFire/CarFire/Parse.cs create mode 100644 CarFire/CarFire/MapProcessorLib/MapImporter.cs create mode 100644 CarFire/CarFire/MapProcessorLib/MapProcessorLib.csproj create mode 100644 CarFire/CarFire/MapProcessorLib/MapSourceCode.cs create mode 100644 CarFire/CarFire/MapProcessorLib/MapWriter.cs create mode 100644 CarFire/CarFire/MapProcessorLib/Properties/AssemblyInfo.cs diff --git a/CarFire/CarFire/CarFire.sln b/CarFire/CarFire/CarFire.sln index 6ed4e2b..2583a8e 100644 --- a/CarFire/CarFire/CarFire.sln +++ b/CarFire/CarFire/CarFire.sln @@ -5,6 +5,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CarFire", "CarFire\CarFire. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CharacterTestBed", "CharacterTestBed\CharacterTestBed.csproj", "{757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapProcessorLib", "MapProcessorLib\MapProcessorLib.csproj", "{EA5996C5-17A9-4827-AAB8-884B476B62EE}" +EndProject Global GlobalSection(SubversionScc) = preSolution Svn-Managed = True @@ -12,21 +14,53 @@ Global EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x86 = Debug|x86 + Debug|Xbox 360 = Debug|Xbox 360 + Debug|Zune = Debug|Zune Release|x86 = Release|x86 + Release|Xbox 360 = Release|Xbox 360 + Release|Zune = Release|Zune EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {FDDA5BCD-3616-400D-A40B-CFD57C54D0F2}.Debug|x86.ActiveCfg = Debug|x86 {FDDA5BCD-3616-400D-A40B-CFD57C54D0F2}.Debug|x86.Build.0 = Debug|x86 + {FDDA5BCD-3616-400D-A40B-CFD57C54D0F2}.Debug|Xbox 360.ActiveCfg = Debug|x86 + {FDDA5BCD-3616-400D-A40B-CFD57C54D0F2}.Debug|Zune.ActiveCfg = Debug|x86 {FDDA5BCD-3616-400D-A40B-CFD57C54D0F2}.Release|x86.ActiveCfg = Release|x86 {FDDA5BCD-3616-400D-A40B-CFD57C54D0F2}.Release|x86.Build.0 = Release|x86 - {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|x86.ActiveCfg = Debug|x86 - {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|x86.ActiveCfg = Release|x86 + {FDDA5BCD-3616-400D-A40B-CFD57C54D0F2}.Release|Xbox 360.ActiveCfg = Release|x86 + {FDDA5BCD-3616-400D-A40B-CFD57C54D0F2}.Release|Zune.ActiveCfg = Release|x86 {757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Debug|x86.ActiveCfg = Debug|x86 {757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Debug|x86.Build.0 = Debug|x86 + {757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Debug|Xbox 360.ActiveCfg = Debug|x86 + {757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Debug|Zune.ActiveCfg = Debug|x86 {757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Release|x86.ActiveCfg = Release|x86 {757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Release|x86.Build.0 = Release|x86 + {757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Release|Xbox 360.ActiveCfg = Release|x86 + {757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Release|Zune.ActiveCfg = Release|x86 + {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|x86.ActiveCfg = Debug|x86 + {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|Xbox 360.ActiveCfg = Debug|x86 + {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|Zune.ActiveCfg = Debug|x86 + {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|x86.ActiveCfg = Release|x86 + {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|Xbox 360.ActiveCfg = Release|x86 + {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|Zune.ActiveCfg = Release|x86 {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Debug|x86.ActiveCfg = Debug|x86 + {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Debug|Xbox 360.ActiveCfg = Debug|x86 + {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Debug|Zune.ActiveCfg = Debug|x86 {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Release|x86.ActiveCfg = Release|x86 + {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Release|Xbox 360.ActiveCfg = Release|x86 + {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Release|Zune.ActiveCfg = Release|x86 + {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Debug|x86.ActiveCfg = Debug|x86 + {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Debug|x86.Build.0 = Debug|x86 + {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 + {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 + {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Debug|Zune.ActiveCfg = Debug|Zune + {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Debug|Zune.Build.0 = Debug|Zune + {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Release|x86.ActiveCfg = Release|x86 + {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Release|x86.Build.0 = Release|x86 + {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 + {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Release|Xbox 360.Build.0 = Release|Xbox 360 + {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Release|Zune.ActiveCfg = Release|Zune + {EA5996C5-17A9-4827-AAB8-884B476B62EE}.Release|Zune.Build.0 = Release|Zune EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/CarFire/CarFire/CarFire.suo b/CarFire/CarFire/CarFire.suo index dd09ba19fe9e56eed8d46944c6f342d3069547ce..19bb6f3115c95d0caa2968cc36a974b6fb4b536b 100644 GIT binary patch literal 41984 zcmeHQeQ;dWb$^n<<)c8rgs%`HjBNtM8+}`bgd(k0LSSKG32exw%4)TeWlOu8T?yOR zi76pKX_C4brb*l;5MolAxZ$H|L%tdyp`9{i%s-haWIEGM=}bCpN@!==OeR?U{qA{p z-`DQjx4TbT$efQjZ&pG$pbI!f{+KK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5sNh)Xv5)4Qlitqez+xMaZ~%Rz~?K{`==iWVbI`aV=I zK3iunikQvR91PL}%v5>E#*|UY)lFILUcHD<>~HCgbBYU%JwN}LU zKWG#DP*N2OTWl3{wKhn_9dYLTx00Eic~=7(-6|&cOsj0O7;DbwMW}=;60 z)9L6CrE{h@_gcM5OXD*XA3sIcW9_t%HR+?a0L#Lpi#oCmc;h5{ojlPtob6^aG<7&9 z9-a)VFdr7_T$~AaRAX#XUJzGW>KQu;F-JFAldF7J(l>8v%tgzwgA{FRrz2X2b*_%; uk{{Dm9u&o7kB!T=maSyJ2;nPAXou+9hs~7ITK~7cvdu@n-s8}xR`VB5x_box diff --git a/CarFire/CarFire/CarFire/CarFire.csproj b/CarFire/CarFire/CarFire/CarFire.csproj index 9d05f39..30d2d0d 100644 --- a/CarFire/CarFire/CarFire/CarFire.csproj +++ b/CarFire/CarFire/CarFire/CarFire.csproj @@ -88,7 +88,10 @@ + + + diff --git a/CarFire/CarFire/CarFire/Content/Content.contentproj b/CarFire/CarFire/CarFire/Content/Content.contentproj index 6128e00..077c9a1 100644 --- a/CarFire/CarFire/CarFire/Content/Content.contentproj +++ b/CarFire/CarFire/CarFire/Content/Content.contentproj @@ -104,6 +104,17 @@ TextureProcessor + + + {EA5996C5-17A9-4827-AAB8-884B476B62EE} + MapProcessorLib + + + + + sandbox + + + \ No newline at end of file diff --git a/CarFire/CarFire/MapProcessorLib/MapSourceCode.cs b/CarFire/CarFire/MapProcessorLib/MapSourceCode.cs new file mode 100644 index 0000000..2ec33af --- /dev/null +++ b/CarFire/CarFire/MapProcessorLib/MapSourceCode.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Xna.Framework.Content.Pipeline; + +namespace MapProcessorLib +{ + /// + /// Container for the map file before it is rewritten as an XNB file. + /// + public class MapSourceCode + { + string[] mLines; + public string[] Lines { get { return mLines; } } + + public MapSourceCode(string[] lines) + { + mLines = lines; + } + } +} diff --git a/CarFire/CarFire/MapProcessorLib/MapWriter.cs b/CarFire/CarFire/MapProcessorLib/MapWriter.cs new file mode 100644 index 0000000..3cdcfad --- /dev/null +++ b/CarFire/CarFire/MapProcessorLib/MapWriter.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Content.Pipeline; +using Microsoft.Xna.Framework.Content.Pipeline.Graphics; +using Microsoft.Xna.Framework.Content.Pipeline.Processors; +using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler; + +using TWrite = MapProcessorLib.MapSourceCode; + +namespace MapProcessorLib +{ + /// + /// This class will be instantiated by the XNA Framework Content Pipeline + /// to write the specified data type into binary .xnb format. + /// + /// This should be part of a Content Pipeline Extension Library project. + /// + [ContentTypeWriter] + public class MapWriter : ContentTypeWriter + { + protected override void Write(ContentWriter output, TWrite value) + { + output.Write(value.Lines.Length); + foreach (string line in value.Lines) + { + output.Write(line); + } + } + + public override string GetRuntimeReader(TargetPlatform targetPlatform) + { + return "CarFire.MapReader, CarFire"; + } + } +} diff --git a/CarFire/CarFire/MapProcessorLib/Properties/AssemblyInfo.cs b/CarFire/CarFire/MapProcessorLib/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..591c56a --- /dev/null +++ b/CarFire/CarFire/MapProcessorLib/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MapProcessorLib")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("MapProcessorLib")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f2f52768-d8d6-47ee-8ee8-ef34e3f2d195")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] -- 2.45.2