diff --git a/ChangeLog b/ChangeLog index b03cd91..8c84c96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,30 @@ +2006-06-21 Jeffrey Stedfast + + * SCSharp/SCSharp.Mpq.Smk/BitStream.cs: Removed unused variables. + (Reset): Instead of resetting the unused variables mCurrent and + mBitCount variables to 0 (which aren't used anywhere else in the + code), set mCurrentByte and mCurrentBit to 0, which is probably + what the author originally intended. + + * SCSharp/SCSharp.Mpq.Smk/Smk.cs: Reindented - some lines seemed + to use 8-space indents and others seemed to use 4, and even others + used tab. Made everything use a uniform 4-space indent like the + other files in this directory. + + * SCSharp/SCSharp.Mpq.Smk/SmkDecoder.cs: Removed unused + variables. Reindented the tables at the top too, as they were + weirdly indented in all of my editors (Emacs and MSVS). + + * SCSharp.sln: Microsoft Visual Studio Solution file for SCSharp + + * SCSharp.csproj: Project file for scsharp.exe + + * SCSharp/SCSharp.dll.csproj: Project file for SCSharp.dll + + * SCSharp/SCSharp.Smk.dll.csproj: Project file for SCSharp.Smk.dll + + * SCSharp/SCSharp.UI.dll.csproj: Project file for SCSharp.UI.dll + 2006-06-25 Chris Toshok * tools/: add a couple of tools: lsmpq.exe to list the contents of diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ed09042 --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,66 @@ +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("SCSharp")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SCSharp")] +[assembly: AssemblyCopyright("Copyright © 2006")] +[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("a5595746-1d5f-41c9-a3ca-c3313854fe3c")] + +// 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")] +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("SCSharp")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SCSharp")] +[assembly: AssemblyCopyright("Copyright © 2006")] +[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("a5595746-1d5f-41c9-a3ca-c3313854fe3c")] + +// 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")] diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs new file mode 100644 index 0000000..7f73900 --- /dev/null +++ b/Properties/Resources.Designer.cs @@ -0,0 +1,142 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.42 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SCSharp.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SCSharp.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.42 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SCSharp.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SCSharp.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Properties/Resources.resx b/Properties/Resources.resx new file mode 100644 index 0000000..f316784 --- /dev/null +++ b/Properties/Resources.resx @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + diff --git a/SCSharp.csproj b/SCSharp.csproj new file mode 100644 index 0000000..412723a --- /dev/null +++ b/SCSharp.csproj @@ -0,0 +1,93 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {9D64B7CE-59CC-4662-BF97-89DC03C3697C} + WinExe + Properties + SCSharp + SCSharp + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + sdldotnet-bin\SdlDotNet.dll + + + + + + + + + False + sdldotnet-bin\Tao.Sdl.dll + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + + PreserveNewest + + + + + + + + + + + + {A723BC2F-13F1-4055-BBED-48DE99D6259B} + SCSharp.dll + + + {74F6BCDE-F12B-4699-9E68-9E36621E35CE} + SCSharp.Smk.dll + + + {705B65E8-C871-4A6B-B42E-D6D538CEA13D} + SCSharp.UI.dll + + + + + diff --git a/SCSharp.sln b/SCSharp.sln new file mode 100644 index 0000000..026dcd4 --- /dev/null +++ b/SCSharp.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C# Express 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SCSharp", "SCSharp.csproj", "{9D64B7CE-59CC-4662-BF97-89DC03C3697C}" + ProjectSection(ProjectDependencies) = postProject + {A723BC2F-13F1-4055-BBED-48DE99D6259B} = {A723BC2F-13F1-4055-BBED-48DE99D6259B} + {74F6BCDE-F12B-4699-9E68-9E36621E35CE} = {74F6BCDE-F12B-4699-9E68-9E36621E35CE} + {705B65E8-C871-4A6B-B42E-D6D538CEA13D} = {705B65E8-C871-4A6B-B42E-D6D538CEA13D} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SCSharp.Smk.dll", "SCSharp\SCSharp.Smk.dll.csproj", "{74F6BCDE-F12B-4699-9E68-9E36621E35CE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SCSharp.UI.dll", "SCSharp\SCSharp.UI.dll.csproj", "{705B65E8-C871-4A6B-B42E-D6D538CEA13D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SCSharp.dll", "SCSharp\SCSharp.dll.csproj", "{A723BC2F-13F1-4055-BBED-48DE99D6259B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9D64B7CE-59CC-4662-BF97-89DC03C3697C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D64B7CE-59CC-4662-BF97-89DC03C3697C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D64B7CE-59CC-4662-BF97-89DC03C3697C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D64B7CE-59CC-4662-BF97-89DC03C3697C}.Release|Any CPU.Build.0 = Release|Any CPU + {74F6BCDE-F12B-4699-9E68-9E36621E35CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {74F6BCDE-F12B-4699-9E68-9E36621E35CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {74F6BCDE-F12B-4699-9E68-9E36621E35CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {74F6BCDE-F12B-4699-9E68-9E36621E35CE}.Release|Any CPU.Build.0 = Release|Any CPU + {705B65E8-C871-4A6B-B42E-D6D538CEA13D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {705B65E8-C871-4A6B-B42E-D6D538CEA13D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {705B65E8-C871-4A6B-B42E-D6D538CEA13D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {705B65E8-C871-4A6B-B42E-D6D538CEA13D}.Release|Any CPU.Build.0 = Release|Any CPU + {A723BC2F-13F1-4055-BBED-48DE99D6259B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A723BC2F-13F1-4055-BBED-48DE99D6259B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A723BC2F-13F1-4055-BBED-48DE99D6259B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A723BC2F-13F1-4055-BBED-48DE99D6259B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/SCSharp/Properties/SCSharp.Smk.dll/AssemblyInfo.cs b/SCSharp/Properties/SCSharp.Smk.dll/AssemblyInfo.cs new file mode 100644 index 0000000..f45a296 --- /dev/null +++ b/SCSharp/Properties/SCSharp.Smk.dll/AssemblyInfo.cs @@ -0,0 +1,70 @@ +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("SCSharp.Smk.dll")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SCSharp.Smk.dll")] +[assembly: AssemblyCopyright("Copyright © 2006")] +[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("abf9e0da-eba0-4f0c-84d3-3743e38fc8ec")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +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("SCSharp.Smk.dll")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SCSharp.Smk.dll")] +[assembly: AssemblyCopyright("Copyright © 2006")] +[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("abf9e0da-eba0-4f0c-84d3-3743e38fc8ec")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SCSharp/Properties/SCSharp.UI.dll/AssemblyInfo.cs b/SCSharp/Properties/SCSharp.UI.dll/AssemblyInfo.cs new file mode 100644 index 0000000..778fcf7 --- /dev/null +++ b/SCSharp/Properties/SCSharp.UI.dll/AssemblyInfo.cs @@ -0,0 +1,70 @@ +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("SCSharp.UI.dll")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SCSharp.UI.dll")] +[assembly: AssemblyCopyright("Copyright © 2006")] +[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("49fd6551-0fd2-42bf-b07b-cfd8fd46694c")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +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("SCSharp.UI.dll")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SCSharp.UI.dll")] +[assembly: AssemblyCopyright("Copyright © 2006")] +[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("49fd6551-0fd2-42bf-b07b-cfd8fd46694c")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SCSharp/Properties/SCSharp.dll/AssemblyInfo.cs b/SCSharp/Properties/SCSharp.dll/AssemblyInfo.cs new file mode 100644 index 0000000..fd55689 --- /dev/null +++ b/SCSharp/Properties/SCSharp.dll/AssemblyInfo.cs @@ -0,0 +1,70 @@ +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("SCSharp.dll")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SCSharp.dll")] +[assembly: AssemblyCopyright("Copyright © 2006")] +[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("35d1478c-6c9f-4bb8-ac0f-fe5b554f7caa")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +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("SCSharp.dll")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SCSharp.dll")] +[assembly: AssemblyCopyright("Copyright © 2006")] +[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("35d1478c-6c9f-4bb8-ac0f-fe5b554f7caa")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SCSharp/SCSharp.Mpq.Smk/BitStream.cs b/SCSharp/SCSharp.Mpq.Smk/BitStream.cs index 50fea83..96dab6a 100644 --- a/SCSharp/SCSharp.Mpq.Smk/BitStream.cs +++ b/SCSharp/SCSharp.Mpq.Smk/BitStream.cs @@ -14,14 +14,13 @@ namespace SCSharp.Smk public class BitStream { private Stream mStream; - private int mCurrent; + private int mCurrentByte; private int mCurrentBit; - private int mBitCount; private int nbBytes; //Raising this value causes more bytes to be cached in the stream and reduces the number of accesses to disk - private const int MAX_BYTES = 512; + private const int MAX_BYTES = 512; private byte [] bytes = new byte[MAX_BYTES]; - private int mCurrentByte; + public BitStream(Stream SourceStream) { mStream = SourceStream; @@ -35,20 +34,21 @@ public int ReadBits(int BitCount) { if (BitCount > 16) throw new ArgumentOutOfRangeException("BitCount", "Maximum BitCount is 16"); - - + //We need BitCount bits - int result =0 ; - int bitsRead=0; - while (BitCount > 0 ) + int result = 0; + int bitsRead = 0; + while (BitCount > 0) { if (mCurrentByte >= nbBytes) { - if (mStream.Position >= mStream.Length) throw new EndOfStreamException(); + if (mStream.Position >= mStream.Length) + throw new EndOfStreamException(); nbBytes = mStream.Read(bytes, 0, MAX_BYTES); mCurrentByte = 0; mCurrentBit = 0; } + if (mCurrentBit + BitCount < 8) //Everything fits in this byte { result |= (((int)bytes[mCurrentByte] >> mCurrentBit) & (0xffff >> (16 - BitCount))) << bitsRead; @@ -66,7 +66,6 @@ public int ReadBits(int BitCount) } } - return result; } @@ -75,31 +74,27 @@ public int ReadBits(int BitCount) // // if (EnsureBits(8) == false) return -1; // // return mCurrent & 0xff; //} - + //public void EnsureBits() //{ - - //} - + //private bool WasteBits(int BitCount) //{ // mCurrent >>= BitCount; // mBitCount -= BitCount; // return true; //} - + public void Reset() { mStream.Seek(0, SeekOrigin.Begin); - mCurrent = 0; - mBitCount = 0; + mCurrentByte = 0; + mCurrentBit = 0; } } - - - -//This should move to another file + + //This should move to another file // [TestFixture] // public class BitStreamTest // { @@ -118,5 +113,4 @@ public void Reset() // } // } - } diff --git a/SCSharp/SCSharp.Mpq.Smk/Smk.cs b/SCSharp/SCSharp.Mpq.Smk/Smk.cs index 8a17daa..5222438 100644 --- a/SCSharp/SCSharp.Mpq.Smk/Smk.cs +++ b/SCSharp/SCSharp.Mpq.Smk/Smk.cs @@ -8,80 +8,82 @@ namespace SCSharp.Smk { - public class SmackerFile + public class SmackerFile + { + private SmackerHeader header; + + public SmackerHeader Header { - private SmackerHeader header; + get { return header; } + set { header = value; } + } - public SmackerHeader Header - { - get { return header; } - set { header = value; } - } - private UInt32[] frameSizes; + private UInt32[] frameSizes; - public UInt32[] FrameSizes - { - get { return frameSizes; } - set { frameSizes = value; } - } - private byte[] frameTypes; + public UInt32[] FrameSizes + { + get { return frameSizes; } + set { frameSizes = value; } + } - public byte[] FrameTypes - { - get { return frameTypes; } - set { frameTypes = value; } - } + private byte[] frameTypes; - private bool isV4; + public byte[] FrameTypes + { + get { return frameTypes; } + set { frameTypes = value; } + } - public bool IsV4 - { - get { return isV4; } - set { isV4 = value; } - } + private bool isV4; - BigHuffmanTree mMap, mClr, full, type; + public bool IsV4 + { + get { return isV4; } + set { isV4 = value; } + } - public BigHuffmanTree Type - { - get { return type; } - set { type = value; } - } + BigHuffmanTree mMap, mClr, full, type; - public BigHuffmanTree Full - { - get { return full; } - set { full = value; } - } + public BigHuffmanTree Type + { + get { return type; } + set { type = value; } + } - public BigHuffmanTree MClr - { - get { return mClr; } - set { mClr = value; } - } + public BigHuffmanTree Full + { + get { return full; } + set { full = value; } + } - public BigHuffmanTree MMap - { - get { return mMap; } - set { mMap = value; } - } + public BigHuffmanTree MClr + { + get { return mClr; } + set { mClr = value; } + } - private Stream stream; + public BigHuffmanTree MMap + { + get { return mMap; } + set { mMap = value; } + } - public Stream Stream - { - get { return stream; } - set { stream = value; } - } + private Stream stream; - SmackerFile() { - } - - private static SmackerHeader ReadHeader(Stream s) + public Stream Stream + { + get { return stream; } + set { stream = value; } + } + + SmackerFile() + { + } + + private static SmackerHeader ReadHeader(Stream s) { - int i; SmackerHeader smk = new SmackerHeader(); - + int i; /* read and check header */ smk.Signature = Util.ReadDWord(s); @@ -103,20 +105,16 @@ private static SmackerHeader ReadHeader(Stream s) smk.Type_Size = Util.ReadDWord(s); for (i = 0; i < 7; i++) smk.AudioRate[i] = Util.ReadDWord(s); ; - smk.Dummy = Util.ReadDWord(s); ; + smk.Dummy = Util.ReadDWord(s); + /* setup data */ if (smk.NbFrames > 0xFFFFFF) - { throw new InvalidDataException("Too many frames: " + smk.NbFrames); - } - - return smk; + } - } - - private static double CalcFps(SmackerHeader smk) + private static double CalcFps(SmackerHeader smk) { if ((int)smk.Pts_Inc > 0) return 1000.0 / (int)smk.Pts_Inc; @@ -125,7 +123,7 @@ private static double CalcFps(SmackerHeader smk) else return 10.0; } - + public static SmackerFile OpenFromStream(Stream s) { int i; @@ -143,7 +141,7 @@ public static SmackerFile OpenFromStream(Stream s) file.IsV4 = (file.Header.Signature != Util.MakeTag('S', 'M', 'K', '2')); /* read frame info */ - + for (i = 0; i < nbFrames; i++) { file.FrameSizes[i] = Util.ReadDWord(s); @@ -157,34 +155,29 @@ public static SmackerFile OpenFromStream(Stream s) //Read huffman trees - //MMap - // System.Console.WriteLine("Mono map tree"); + // System.Console.WriteLine("Mono map tree"); file.MMap = new BigHuffmanTree(); file.MMap.BuildTree(m); //MClr (color map) - // System.Console.WriteLine("Mono Color tree"); + // System.Console.WriteLine("Mono Color tree"); file.MClr = new BigHuffmanTree(); file.MClr.BuildTree(m); //Full (full block stuff) - // System.Console.WriteLine("Full tree"); + // System.Console.WriteLine("Full tree"); file.Full = new BigHuffmanTree(); file.Full.BuildTree(m); //Type (full block stuff) - // System.Console.WriteLine("Type descriptor tree"); + // System.Console.WriteLine("Type descriptor tree"); file.Type = new BigHuffmanTree(); file.Type.BuildTree(m); - //We are ready to decode frames - - file.Stream = s; return file; } - /// /// Returns a decoder for this Smackerfile /// @@ -195,88 +188,61 @@ public SmackerDecoder Decoder return new SmackerDecoder(this); } } - } + } + + public class SmackerHeader + { + /* Smacker file header */ + public UInt32 Signature; + public UInt32 Width, Height; + public UInt32 NbFrames; + public int Pts_Inc; + public double Fps; + public UInt32 Flags; + public UInt32[] AudioSize = new UInt32[7]; + public UInt32 TreesSize; + public UInt32 NMap_Size, MClr_Size, Full_Size, Type_Size; + public UInt32[] AudioRate = new UInt32[7]; + public UInt32 Dummy; - public class SmackerHeader + /// + /// Returns the sample rate for the specified audio track + /// + /// the audio track to return the sample rate for + /// The smaple rate for track i + public int GetSampleRate(int i) { - - - /* Smacker file header */ - public UInt32 Signature; - public UInt32 Width, Height; - public UInt32 NbFrames; - public int Pts_Inc; - public double Fps; - public UInt32 Flags; - public UInt32 []AudioSize = new UInt32[7]; - public UInt32 TreesSize; - public UInt32 NMap_Size, MClr_Size, Full_Size, Type_Size; - public UInt32[] AudioRate = new UInt32[7]; - public UInt32 Dummy; - - /// - /// Returns the sample rate for the specified audio track - /// - /// the audio track to return the sample rate for - /// The smaple rate for track i - public int GetSampleRate(int i) - { - return (int)(AudioRate[i] & 0xFFFFFF); //Mask out the upper byte - } - - public bool IsStereoTrack(int i) - { - return ((AudioRate[i] >> 24) & 16 )> 0; - } - public bool Is16BitTrack(int i) - { - return ((AudioRate[i] >> 24) & 32) > 0; - } - public bool IsCompressedTrack(int i) - { - return ((AudioRate[i] >> 24) & 128) > 0; - } - - public bool HasRingFrame() - { - return (Flags & 1) > 0; - } - public bool IsYInterlaced() - { - return (Flags & 2) > 0; - } - public bool IsYDoubled() - { - return (Flags & 4) > 0; - } - + return (int)(AudioRate[i] & 0xFFFFFF); //Mask out the upper byte } - - - - - - - - + public bool IsStereoTrack(int i) + { + return ((AudioRate[i] >> 24) & 16) > 0; + } + public bool Is16BitTrack(int i) + { + return ((AudioRate[i] >> 24) & 32) > 0; + } + + public bool IsCompressedTrack(int i) + { + return ((AudioRate[i] >> 24) & 128) > 0; + } - + public bool HasRingFrame() + { + return (Flags & 1) > 0; + } - + public bool IsYInterlaced() + { + return (Flags & 2) > 0; + } - + public bool IsYDoubled() + { + return (Flags & 4) > 0; + } + } } - - - - - - - - - - - - diff --git a/SCSharp/SCSharp.Mpq.Smk/SmkDecoder.cs b/SCSharp/SCSharp.Mpq.Smk/SmkDecoder.cs index 9144f56..afed0b7 100644 --- a/SCSharp/SCSharp.Mpq.Smk/SmkDecoder.cs +++ b/SCSharp/SCSharp.Mpq.Smk/SmkDecoder.cs @@ -20,30 +20,32 @@ internal SmackerDecoder(SmackerFile file) lastAudioData = new byte[7][]; lastFrameData = new byte[File.Header.Width * File.Header.Height]; } - /* palette map used in Smacker */ + + // palette map used in Smacker byte[] smackerMap = new byte[] { - 0x00, 0x04, 0x08, 0x0C, 0x10, 0x14, 0x18, 0x1C, - 0x20, 0x24, 0x28, 0x2C, 0x30, 0x34, 0x38, 0x3C, - 0x41, 0x45, 0x49, 0x4D, 0x51, 0x55, 0x59, 0x5D, - 0x61, 0x65, 0x69, 0x6D, 0x71, 0x75, 0x79, 0x7D, - 0x82, 0x86, 0x8A, 0x8E, 0x92, 0x96, 0x9A, 0x9E, - 0xA2, 0xA6, 0xAA, 0xAE, 0xB2, 0xB6, 0xBA, 0xBE, - 0xC3, 0xC7, 0xCB, 0xCF, 0xD3, 0xD7, 0xDB, 0xDF, - 0xE3, 0xE7, 0xEB, 0xEF, 0xF3, 0xF7, 0xFB, 0xFF -}; - //Runlength map (used in block decoding) + 0x00, 0x04, 0x08, 0x0C, 0x10, 0x14, 0x18, 0x1C, + 0x20, 0x24, 0x28, 0x2C, 0x30, 0x34, 0x38, 0x3C, + 0x41, 0x45, 0x49, 0x4D, 0x51, 0x55, 0x59, 0x5D, + 0x61, 0x65, 0x69, 0x6D, 0x71, 0x75, 0x79, 0x7D, + 0x82, 0x86, 0x8A, 0x8E, 0x92, 0x96, 0x9A, 0x9E, + 0xA2, 0xA6, 0xAA, 0xAE, 0xB2, 0xB6, 0xBA, 0xBE, + 0xC3, 0xC7, 0xCB, 0xCF, 0xD3, 0xD7, 0xDB, 0xDF, + 0xE3, 0xE7, 0xEB, 0xEF, 0xF3, 0xF7, 0xFB, 0xFF + }; + + // Runlength map (used in block decoding) uint[] sizetable = new uint[] { - 1, 2, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 128, 256, 512, 1024, 2048 - }; - - //Palette containts 256 byte triples + 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 128, 256, 512, 1024, 2048 + }; + + // Palette containts 256 byte triples Color[] CurrentPalette = new Color[256]; //File being decoded @@ -55,7 +57,6 @@ internal SmackerFile File set { file = value; } } - //Current Frame being decoded private int currentFrame; @@ -67,7 +68,7 @@ public int CurrentFrame private void UpdatePalette() { - // System.Console.WriteLine("Updating palette"); + // System.Console.WriteLine("Updating palette"); Stream s = File.Stream; Color[] OldPallette = (Color[])CurrentPalette.Clone(); int size = (int)Util.ReadByte(s); @@ -85,7 +86,8 @@ private void UpdatePalette() { int t = (int)Util.ReadByte(s); if ((t & 0x80) != 0) - { /* skip palette entries */ + { + /* skip palette entries */ sz += (t & 0x7F) + 1; for (int i = 0; i < (t & 0x7F) + 1; i++) { @@ -94,7 +96,8 @@ private void UpdatePalette() //palIndex += ((t & 0x7F) + 1) ; } else if ((t & 0x40) != 0) - { /* copy with offset */ + { + /* copy with offset */ int off = ((int)Util.ReadByte(s)); j = (t & 0x3F) + 1; while ((j-- != 0) && sz < 256) @@ -105,16 +108,13 @@ private void UpdatePalette() } } else - { /* new entries */ + { + /* new entries */ CurrentPalette[palIndex++] = Color.FromArgb(smackerMap[t], smackerMap[(int)Util.ReadByte(s) & 0x3F], smackerMap[(int)Util.ReadByte(s) & 0x3F]); - - sz++; } } s.Seek(pos, SeekOrigin.Begin); - - } public uint GetIndex(uint x, uint y) @@ -130,27 +130,25 @@ public uint GetIndex(uint x, uint y) /// public void ReadNextFrame() { - uint x, y; + uint mask = 1; + if (CurrentFrame >= File.Header.NbFrames) throw new EndOfStreamException("No more frames"); long currentPos = File.Stream.Position; - //If this frame has a palette record - if ((File.FrameTypes[CurrentFrame] & 1) > 0) + if ((File.FrameTypes[CurrentFrame] & mask) > 0) { //Update the palette UpdatePalette(); } //Sound data - - - x = 2; - for (int i = 0; i < 7; i++) + mask <<= 1; + for (int i = 0; i < 7; i++, mask <<= 1) { - if ((file.FrameTypes[CurrentFrame] & x) > 0) + if ((file.FrameTypes[CurrentFrame] & mask) > 0) { long pos = File.Stream.Position; uint length = Util.ReadDWord(File.Stream); @@ -163,7 +161,6 @@ public void ReadNextFrame() bool stereo = m.ReadBits(1) > 0; bool is16Bit = m.ReadBits(1) > 0; - //Next are some trees uint nbTrees = 1; if (stereo) @@ -177,9 +174,9 @@ public void ReadNextFrame() { tree[k] = new Huffmantree(); tree[k].BuildTree(m); - } - int res; + + int res; if (is16Bit) { Int16 rightBaseMSB = 0, rightBaseLSB = 0, leftBaseMSB = 0, leftBaseLSB = 0; @@ -239,13 +236,12 @@ public void ReadNextFrame() leftBase = (byte)m.ReadBits(8); //Add sample audioData[audioDataIndex++] = leftBase; - } + for (int l = 0; l < unpackedLength; l++) { if ((l & ((stereo) ? 1 : 0)) > 0) { - leftBase += (byte)tree[1].Decode(m); //Add sample audioData[audioDataIndex++] = leftBase; @@ -261,11 +257,8 @@ public void ReadNextFrame() lastAudioData[i] = audioData; } - - File.Stream.Seek(pos + (long)length, SeekOrigin.Begin); } - x <<= 1; } //Video data @@ -281,8 +274,6 @@ public void ReadNextFrame() //Seek to the next frame File.Stream.Seek(currentPos + File.FrameSizes[CurrentFrame], SeekOrigin.Begin); CurrentFrame++; - - } /// @@ -297,8 +288,8 @@ public byte[] GetAudioData(int streamIndex) private void DecodeVideo() { - uint x, y, mask, bitmask, offset, currentBlock = 0, runLength, colors, blockHeader, blockType=0, posX, posY, index, pix, pix1, pix2; - uint i, j; + uint x, y, mask, currentBlock = 0, runLength, colors, blockHeader, blockType = 0; + uint posX, posY, index, pix, pix1, pix2, i, j; byte color, color1, color2; //Reset all huffman decoders @@ -311,16 +302,13 @@ private void DecodeVideo() byte[] currentFrameData = new byte[File.Header.Width * File.Header.Height]; BitStream m = new BitStream(File.Stream); - uint nbBlocksX = File.Header.Width / 4; uint nbBlocksY = File.Header.Height / 4; uint nbBlocks = nbBlocksX * nbBlocksY; long runLengthNotComplete = 0; - uint lastType = 0; while (currentBlock < nbBlocks) { - blockHeader = (uint)File.Type.Decode(m); runLength = sizetable[(blockHeader >> 2) & 0x3F]; @@ -348,7 +336,6 @@ private void DecodeVideo() } } - currentBlock++; } runLengthNotComplete = runLength - i; @@ -371,7 +358,6 @@ private void DecodeVideo() } } - currentBlock++; } runLengthNotComplete = runLength - i; @@ -384,16 +370,11 @@ private void DecodeVideo() color1 = (byte)(colors >> 8); color2 = (byte)(colors & 0xFF); - mask = (uint)File.MMap.Decode(m); - - bitmask = 1; - posX = (currentBlock % nbBlocksX) * 4; posY = (currentBlock / nbBlocksX) * 4; for (y = 0; y < 4; y++) { - if ((mask & 1) > 0) { currentFrameData[GetIndex(posX, posY + y)] = color1; @@ -426,13 +407,12 @@ private void DecodeVideo() { currentFrameData[GetIndex(posX + 3, posY + y)] = color2; } - mask >>= 4; - + mask >>= 4; } currentBlock++; } - // runLengthNotComplete = runLength - i; + // runLengthNotComplete = runLength - i; break; case 1: // System.Console.WriteLine("FULL - "); @@ -451,6 +431,7 @@ private void DecodeVideo() else mode = 1; } + switch (mode) { case 0://v2 Full block @@ -480,7 +461,7 @@ private void DecodeVideo() } break; case 1: - for ( i = 0; i < runLength && currentBlock < nbBlocks; i++) + for (i = 0; i < runLength && currentBlock < nbBlocks; i++) { posX = (currentBlock % nbBlocksX) * 4; posY = (currentBlock / nbBlocksX) * 4; @@ -514,14 +495,14 @@ private void DecodeVideo() currentBlock++; } - // runLengthNotComplete = runLength - i; + // runLengthNotComplete = runLength - i; break; case 2: - for ( j = 0; j < runLength && currentBlock < nbBlocks; j++) + for (j = 0; j < runLength && currentBlock < nbBlocks; j++) { posX = (currentBlock % nbBlocksX) << 2; posY = (currentBlock / nbBlocksX) << 2; - for ( i = 0; i < 2; i++) + for (i = 0; i < 2; i++) { pix1 = (uint)File.Full.Decode(m); @@ -550,27 +531,24 @@ private void DecodeVideo() } currentBlock++; } - // runLengthNotComplete = runLength - j; + // runLengthNotComplete = runLength - j; break; default: break; } break; - } - - } + //if (runLengthNotComplete > 0) //{ // Console.WriteLine("Warning: frame ended before runlength has reached zero"); //} - - lastFrameData = currentFrameData; } + /// /// Encapsulates the video data from the last decoded frame in a System.Drawing.Bitmap /// @@ -600,6 +578,7 @@ public byte[] VideoData return lastFrameData; } } + /// /// The pallette to use to render the frame /// @@ -610,6 +589,7 @@ public Color[] Palette return CurrentPalette; } } + /// /// Returns the video data as RGB data /// @@ -621,10 +601,10 @@ public byte[] RGBData int j = 0; for (int i = 0; i < lastFrameData.Length; i++) { - j = i*3; + j = i * 3; result[j] = CurrentPalette[lastFrameData[i]].R; - result[j+1] = CurrentPalette[lastFrameData[i]].G; - result[j+2] = CurrentPalette[lastFrameData[i]].B; + result[j + 1] = CurrentPalette[lastFrameData[i]].G; + result[j + 2] = CurrentPalette[lastFrameData[i]].B; } return result; @@ -646,18 +626,19 @@ public byte[] BGRAData result[j] = CurrentPalette[lastFrameData[i]].B; result[j + 1] = CurrentPalette[lastFrameData[i]].G; result[j + 2] = CurrentPalette[lastFrameData[i]].R; - if (result[j] != 0 || result[j+1] != 0 || result[j+2] != 0) - result[j + 3] = 0xFF; + if (result[j] != 0 || result[j + 1] != 0 || result[j + 2] != 0) + result[j + 3] = 0xFF; } return result; } } - /// - /// Hack as described on MSDN to get a clean palette - /// - /// the number of colors the palette should contain (between 2-256) - /// An empty, clean ColorPalette structure, ready to be written to - protected ColorPalette GetColorPalette(uint nColors) + + /// + /// Hack as described on MSDN to get a clean palette + /// + /// the number of colors the palette should contain (between 2-256) + /// An empty, clean ColorPalette structure, ready to be written to + protected ColorPalette GetColorPalette(uint nColors) { // Assume monochrome image. PixelFormat bitscolordepth = PixelFormat.Format1bppIndexed; @@ -679,6 +660,7 @@ protected ColorPalette GetColorPalette(uint nColors) return palette; // Send the palette back } + bool firstTime = true; //Indicates whether the animation is decoded for the first time /// @@ -687,12 +669,16 @@ protected ColorPalette GetColorPalette(uint nColors) public void Reset() { uint nbFrames = file.Header.NbFrames; - if (file.Header.HasRingFrame()) nbFrames++; + + if (file.Header.HasRingFrame()) + nbFrames++; + //Seek to the beginning of the frame data section //Header = 104 bytes, 5 bytes per frame (one dword + one byte) + trees int pos = (int)(104 + 5 * nbFrames + file.Header.TreesSize); file.Stream.Seek(pos, SeekOrigin.Begin); CurrentFrame = 0; + //The ring frame replace the first frame on the second+ run. if (!firstTime && file.Header.HasRingFrame()) { @@ -700,8 +686,10 @@ public void Reset() file.Stream.Seek(file.FrameSizes[0], SeekOrigin.Current); CurrentFrame = 1; } + firstTime = false; } + /// /// Set the decoder to decode the specified frame next /// @@ -709,15 +697,14 @@ public void Reset() public void SeekTo(int i) { Reset(); //Seek to frame 0 - if (i >= File.Header.NbFrames ) throw new IndexOutOfRangeException("Not a valid frame number!"); + if (i >= File.Header.NbFrames) throw new IndexOutOfRangeException("Not a valid frame number!"); uint total = 0; for (int j = 0; j < i; j++) { total += File.FrameSizes[j]; } - CurrentFrame += i - 1 ; + CurrentFrame += i - 1; file.Stream.Seek(total, SeekOrigin.Current); } } - } diff --git a/SCSharp/SCSharp.Smk.dll.csproj b/SCSharp/SCSharp.Smk.dll.csproj new file mode 100644 index 0000000..4b1ff66 --- /dev/null +++ b/SCSharp/SCSharp.Smk.dll.csproj @@ -0,0 +1,62 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {74F6BCDE-F12B-4699-9E68-9E36621E35CE} + Library + Properties\SCSharp.Smk.dll + SCSharp.Smk + SCSharp.Smk + + + true + full + false + ..\bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\bin\Release\ + TRACE + prompt + 4 + + + + + + + + False + ..\sdldotnet-bin\Tao.Sdl.dll + + + + + + + + + + + + + {A723BC2F-13F1-4055-BBED-48DE99D6259B} + SCSharp.dll + + + + + diff --git a/SCSharp/SCSharp.UI.dll.csproj b/SCSharp/SCSharp.UI.dll.csproj new file mode 100644 index 0000000..b14e570 --- /dev/null +++ b/SCSharp/SCSharp.UI.dll.csproj @@ -0,0 +1,115 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {705B65E8-C871-4A6B-B42E-D6D538CEA13D} + Library + Properties\SCSharp.UI.dll + SCSharp.UI + SCSharp.UI + + + true + full + false + ..\bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\bin\Release\ + TRACE + prompt + 4 + + + + False + ..\sdldotnet-bin\SdlDotNet.dll + + + + + + + + False + ..\sdldotnet-bin\Tao.Sdl.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {A723BC2F-13F1-4055-BBED-48DE99D6259B} + SCSharp.dll + + + {74F6BCDE-F12B-4699-9E68-9E36621E35CE} + SCSharp.Smk.dll + + + + + diff --git a/SCSharp/SCSharp.dll.csproj b/SCSharp/SCSharp.dll.csproj new file mode 100644 index 0000000..9d2bff0 --- /dev/null +++ b/SCSharp/SCSharp.dll.csproj @@ -0,0 +1,74 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {A723BC2F-13F1-4055-BBED-48DE99D6259B} + Library + Properties\SCSharp.dll + SCSharp + SCSharp + false + + + true + full + false + ..\bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scsharp.exe.config b/scsharp.exe.config new file mode 100644 index 0000000..f8134eb --- /dev/null +++ b/scsharp.exe.config @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + diff --git a/scsharp.exe.config-example b/scsharp.exe.config-example new file mode 100644 index 0000000..f86e2b0 --- /dev/null +++ b/scsharp.exe.config-example @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/mono.sh b/src/mono.sh index 70d30cf..510a49f 100644 --- a/src/mono.sh +++ b/src/mono.sh @@ -1,2 +1,2 @@ -export MONO_PATH=`pwd`/../sdldotnet-bin:`pwd`/../SCSharp -export LD_LIBRARY_PATH=`pwd`/../StormLib/.libs +export MONO_PATH=`pwd`/../sdldotnet-bin:`pwd`/../SCSharp:$MONO_PATH +export LD_LIBRARY_PATH=`pwd`/../StormLib/.libs:$LD_LIBRARY_PATH