From: <je...@us...> - 2007-05-18 19:59:28
|
Revision: 1379 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1379&view=rev Author: jendave Date: 2007-05-18 12:59:26 -0700 (Fri, 18 May 2007) Log Message: ----------- ignore generated files Property Changed: ---------------- trunk/scsharp/ trunk/scsharp/src/SCSharp/ trunk/scsharp/src/SCSharpLib/ trunk/scsharp/tests/ Property changes on: trunk/scsharp ___________________________________________________________________ Name: svn:ignore + SCSharp.build SCSharp.mds SCSharp.sln SCSharp.suo Property changes on: trunk/scsharp/src/SCSharp ___________________________________________________________________ Name: svn:ignore + bin obj SCSharp.csproj SCSharp.csproj.user SCSharp.exe.build SCSharp.mdp Property changes on: trunk/scsharp/src/SCSharpLib ___________________________________________________________________ Name: svn:ignore + bin SCSharpLib.csproj SCSharpLib.csproj.user SCSharpLib.dll.build SCSharpLib.mdp SCSharpLib.xml obj Property changes on: trunk/scsharp/tests ___________________________________________________________________ Name: svn:ignore + obj Tests.csproj Tests.csproj.user Tests.dll.build Tests.mdp bin This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-18 20:45:40
|
Revision: 1380 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1380&view=rev Author: jendave Date: 2007-05-18 13:45:34 -0700 (Fri, 18 May 2007) Log Message: ----------- Fixed transparency issue. Transparency changed from SdlDotNet 5.0.0 to 6.0.0 Modified Paths: -------------- trunk/scsharp/ChangeLog trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs trunk/scsharp/src/SCSharpLib/UI/DialogBoxElement.cs trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs trunk/scsharp/src/SCSharpLib/UI/LabelElement.cs trunk/scsharp/src/SCSharpLib/UI/ListBoxElement.cs trunk/scsharp/src/SCSharpLib/UI/Pcx.cs Modified: trunk/scsharp/ChangeLog =================================================================== --- trunk/scsharp/ChangeLog 2007-05-18 19:59:26 UTC (rev 1379) +++ trunk/scsharp/ChangeLog 2007-05-18 20:45:34 UTC (rev 1380) @@ -342,6 +342,8 @@ * configure.ac: add a check for mono >= 1.1.14 + * 0.0000007 released + 2006-05-01 Chris Toshok <to...@hu...> * SCSharp/SCSharp.Mpq/Mpq.cs: Make GetStreamForResource public so Modified: trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs 2007-05-18 19:59:26 UTC (rev 1379) +++ trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs 2007-05-18 20:45:34 UTC (rev 1380) @@ -64,12 +64,13 @@ Surface surf = new Surface(Width, Height); surf.TransparentColor = Color.Black; /* XXX */ + surf.Transparent = true; - Surface text_surf = GuiUtil.ComposeText(Text, Font, Palette, -1, -1, + Surface textSurf = GuiUtil.ComposeText(Text, Font, Palette, -1, -1, Sensitive ? 4 : 24); - surf.Blit(text_surf, new Point((surf.Width - text_surf.Width) / 2, - (surf.Height - text_surf.Height) / 2)); + surf.Blit(textSurf, new Point((surf.Width - textSurf.Width) / 2, + (surf.Height - textSurf.Height) / 2)); return surf; } Modified: trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs 2007-05-18 19:59:26 UTC (rev 1379) +++ trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs 2007-05-18 20:45:34 UTC (rev 1380) @@ -226,10 +226,11 @@ if (cursor != -1) { - Surface item_surface = GuiUtil.ComposeText(items[cursor], Font, Palette, 4); + Surface itemSurface = GuiUtil.ComposeText(items[cursor], Font, Palette, 4); - item_surface.TransparentColor = Color.Black; - surf.Blit(item_surface, new Point(0, 0)); + itemSurface.TransparentColor = Color.Black; + itemSurface.Transparent = true; + surf.Blit(itemSurface, new Point(0, 0)); } return surf; @@ -242,13 +243,14 @@ int y = 0; for (int i = 0; i < items.Count; i++) { - Surface item_surface = GuiUtil.ComposeText(items[i], Font, Palette, + Surface itemSurface = GuiUtil.ComposeText(items[i], Font, Palette, i == selectedItem ? 4 : 24); - item_surface.TransparentColor = Color.Black; + itemSurface.TransparentColor = Color.Black; + itemSurface.Transparent = true; - dropdownSurface.Blit(item_surface, new Point(0, y)); - y += item_surface.Height; + dropdownSurface.Blit(itemSurface, new Point(0, y)); + y += itemSurface.Height; } } Modified: trunk/scsharp/src/SCSharpLib/UI/DialogBoxElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/DialogBoxElement.cs 2007-05-18 19:59:26 UTC (rev 1379) +++ trunk/scsharp/src/SCSharpLib/UI/DialogBoxElement.cs 2007-05-18 20:45:34 UTC (rev 1380) @@ -107,6 +107,7 @@ surf.Fill(new Rectangle(new Point(0, 0), new Size(Width, Height)), Color.FromArgb(0, 0, 0, 0)); surf.TransparentColor = Color.Black; /* XXX */ + surf.Transparent = true; Pcx pal = new Pcx(); pal.ReadFromStream((Stream)Mpq.GetResource("unit\\cmdbtns\\ticon.pcx"), Modified: trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs 2007-05-18 19:59:26 UTC (rev 1379) +++ trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs 2007-05-18 20:45:34 UTC (rev 1380) @@ -139,20 +139,20 @@ ScrollCursors = new CursorAnimator[8]; } - Surface[] starfield_layers; + Surface[] starfieldLayers; void PaintStarfield(Surface surf, DateTime dt) { float scroll_factor = 1.0f; - float[] factors = new float[starfield_layers.Length]; + float[] factors = new float[starfieldLayers.Length]; - for (int i = 0; i < starfield_layers.Length; i++) + for (int i = 0; i < starfieldLayers.Length; i++) { factors[i] = scroll_factor; scroll_factor *= 0.75f; } - for (int i = starfield_layers.Length - 1; i >= 0; i--) + for (int i = starfieldLayers.Length - 1; i >= 0; i--) { int scroll_x = (int)(topleft_x * factors[i]); int scroll_y = (int)(topleft_y * factors[i]); @@ -166,7 +166,7 @@ scroll_y %= Painter.ScreenResY; } - surf.Blit(starfield_layers[i], + surf.Blit(starfieldLayers[i], new Rectangle(new Point(0, 0), new Size(Painter.ScreenResX - scroll_x, Painter.ScreenResY - scroll_y)), @@ -176,7 +176,7 @@ if (scroll_x != 0) { - surf.Blit(starfield_layers[i], + surf.Blit(starfieldLayers[i], new Rectangle(new Point(Painter.ScreenResX - scroll_x, 0), new Size(scroll_x, Painter.ScreenResY - scroll_y)), new Rectangle(new Point(0, scroll_y), @@ -185,7 +185,7 @@ if (scroll_y != 0) { - surf.Blit(starfield_layers[i], + surf.Blit(starfieldLayers[i], new Rectangle(new Point(0, Painter.ScreenResY - scroll_y), new Size(Painter.ScreenResX - scroll_x, scroll_y)), new Rectangle(new Point(scroll_x, 0), @@ -194,7 +194,7 @@ if (scroll_x != 0 || scroll_y != 0) { - surf.Blit(starfield_layers[i], + surf.Blit(starfieldLayers[i], new Rectangle(new Point(Painter.ScreenResX - scroll_x, Painter.ScreenResY - scroll_y), new Size(scroll_x, scroll_y)), new Rectangle(new Point(0, 0), @@ -296,18 +296,19 @@ { Spk starfield = (Spk)this.Mpq.GetResource("parallax\\star.spk"); - starfield_layers = new Surface[starfield.Layers.Length]; - for (int i = 0; i < starfield_layers.Length; i++) + starfieldLayers = new Surface[starfield.Layers.Length]; + for (int i = 0; i < starfieldLayers.Length; i++) { - starfield_layers[i] = new Surface(Painter.ScreenResX, Painter.ScreenResY); + starfieldLayers[i] = new Surface(Painter.ScreenResX, Painter.ScreenResY); - starfield_layers[i].TransparentColor = Color.Black; + starfieldLayers[i].TransparentColor = Color.Black; + starfieldLayers[i].Transparent = true; for (int o = 0; o < starfield.Layers[i].Objects.Length; o++) { ParallaxObject obj = starfield.Layers[i].Objects[o]; - starfield_layers[i].Fill(new Rectangle(new Point(obj.X, obj.Y), new Size(2, 2)), + starfieldLayers[i].Fill(new Rectangle(new Point(obj.X, obj.Y), new Size(2, 2)), Color.White); } } Modified: trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs 2007-05-18 19:59:26 UTC (rev 1379) +++ trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs 2007-05-18 20:45:34 UTC (rev 1380) @@ -239,6 +239,7 @@ Surface surf = new Surface(text_width, text_height); surf.TransparentColor = Color.Black; + surf.Transparent = true; /* the draw it */ x = y = 0; Modified: trunk/scsharp/src/SCSharpLib/UI/LabelElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/LabelElement.cs 2007-05-18 19:59:26 UTC (rev 1379) +++ trunk/scsharp/src/SCSharpLib/UI/LabelElement.cs 2007-05-18 20:45:34 UTC (rev 1380) @@ -78,6 +78,7 @@ surf.Blit(textSurf, new Point(x, 0)); surf.TransparentColor = Color.Black /* XXX */; + surf.Transparent = true; return surf; } } Modified: trunk/scsharp/src/SCSharpLib/UI/ListBoxElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ListBoxElement.cs 2007-05-18 19:59:26 UTC (rev 1379) +++ trunk/scsharp/src/SCSharpLib/UI/ListBoxElement.cs 2007-05-18 20:45:34 UTC (rev 1380) @@ -318,6 +318,7 @@ } surf.TransparentColor = Color.Black; /* XXX */ + surf.Transparent = true; return surf; } Modified: trunk/scsharp/src/SCSharpLib/UI/Pcx.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/Pcx.cs 2007-05-18 19:59:26 UTC (rev 1379) +++ trunk/scsharp/src/SCSharpLib/UI/Pcx.cs 2007-05-18 20:45:34 UTC (rev 1380) @@ -50,7 +50,7 @@ ushort ymin; ushort ymax; - bool with_alpha; + bool withAlpha; /// <summary> /// @@ -60,11 +60,13 @@ /// <param name="transparentIndex"></param> public void ReadFromStream(Stream stream, int translucentIndex, int transparentIndex) { - with_alpha = translucentIndex != -1 || transparentIndex != -1; + withAlpha = translucentIndex != -1 || transparentIndex != -1; byte magic = Utilities.ReadByte(stream); if (magic != 0x0A) + { throw new Exception("stream is not a valid .pcx file"); + } /*version =*/ Utilities.ReadByte(stream); @@ -138,14 +140,20 @@ data[idx + 3] = palette[value * 3 + 0]; data[idx + 2] = palette[value * 3 + 1]; data[idx + 1] = palette[value * 3 + 2]; - if (with_alpha) + if (withAlpha) { if (value == translucentIndex) + { data[idx + 0] = 0xd0; + } else if (value == transparentIndex) + { data[idx + 0] = 0x00; + } else + { data[idx + 0] = 0xff; + } } idx += 4; @@ -221,7 +229,7 @@ [CLSCompliant(false)] public ushort Depth { - get { return (ushort)(with_alpha ? 32 : 24); } + get { return (ushort)(withAlpha ? 32 : 24); } } /// <summary> @@ -230,7 +238,7 @@ [CLSCompliant(false)] public ushort Stride { - get { return (ushort)(width * (3 + (with_alpha ? 1 : 0))); } + get { return (ushort)(width * (3 + (withAlpha ? 1 : 0))); } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-18 20:58:32
|
Revision: 1381 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1381&view=rev Author: jendave Date: 2007-05-18 13:58:30 -0700 (Fri, 18 May 2007) Log Message: ----------- minor updates. add myself to authors. clean up the license Modified Paths: -------------- trunk/scsharp/AUTHORS trunk/scsharp/COPYING trunk/scsharp/credits.txt trunk/scsharp/src/SCSharp/SCSharp.cs Modified: trunk/scsharp/AUTHORS =================================================================== --- trunk/scsharp/AUTHORS 2007-05-18 20:45:34 UTC (rev 1380) +++ trunk/scsharp/AUTHORS 2007-05-18 20:58:30 UTC (rev 1381) @@ -1 +1,2 @@ -Chris Toshok <to...@hu...> \ No newline at end of file +Chris Toshok <to...@hu...> +David Hudson <je...@ya...> Modified: trunk/scsharp/COPYING =================================================================== --- trunk/scsharp/COPYING 2007-05-18 20:45:34 UTC (rev 1380) +++ trunk/scsharp/COPYING 2007-05-18 20:58:30 UTC (rev 1381) @@ -1,10 +1,6 @@ -StormLib is released under an unknown (to me) license. It has -multiple copyright holders. - -All of the SCSharp specific code is released under an X11 license. +All of the SCSharp specific code is released under the X11 license. Use it as you see fit. The license text is included below. - // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the Modified: trunk/scsharp/credits.txt =================================================================== --- trunk/scsharp/credits.txt 2007-05-18 20:45:34 UTC (rev 1380) +++ trunk/scsharp/credits.txt 2007-05-18 20:58:30 UTC (rev 1381) @@ -8,6 +8,7 @@ SCSharp Programming Chris Toshok +David Hudson </PAGE> </COMMENT #############################################################> @@ -43,4 +44,4 @@ </SCREENCENTER> Credits for Starcraft Brood War -</PAGE> \ No newline at end of file +</PAGE> Modified: trunk/scsharp/src/SCSharp/SCSharp.cs =================================================================== --- trunk/scsharp/src/SCSharp/SCSharp.cs 2007-05-18 20:45:34 UTC (rev 1380) +++ trunk/scsharp/src/SCSharp/SCSharp.cs 2007-05-18 20:58:30 UTC (rev 1381) @@ -5,7 +5,6 @@ // // (C) 2006 The Hungry Programmers (http://www.hungry.com/) // - // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-18 21:06:20
|
Revision: 1382 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1382&view=rev Author: jendave Date: 2007-05-18 14:06:19 -0700 (Fri, 18 May 2007) Log Message: ----------- fix build order issue for NAnt build. NAnt build still needs work. Prebuild is broken Modified Paths: -------------- trunk/scsharp/prebuild.xml Property Changed: ---------------- trunk/scsharp/ Property changes on: trunk/scsharp ___________________________________________________________________ Name: svn:ignore - SCSharp.build SCSharp.mds SCSharp.sln SCSharp.suo + SCSharp.build SCSharp.mds SCSharp.sln SCSharp.suo *.swp Modified: trunk/scsharp/prebuild.xml =================================================================== --- trunk/scsharp/prebuild.xml 2007-05-18 20:58:30 UTC (rev 1381) +++ trunk/scsharp/prebuild.xml 2007-05-18 21:06:19 UTC (rev 1382) @@ -26,7 +26,7 @@ <Files> <File buildAction="Content">prebuild.xml</File> </Files> - <Project name="SCSharp" path="src/SCSharp" language="C#" type="WinExe" assemblyName="scsharp" rootNamespace="SCSharp" designerFolder="Properties" icon="App.ico"> + <Project name="SCSharpLib" path="src/SCSharpLib" language="C#" type="Library" assemblyName="SCSharpLib" rootNamespace="SCSharp" designerFolder="Properties"> <Configuration name="Debug"> <Options> <CompilerDefines>DEBUG;TRACE;CODE_ANALYSIS</CompilerDefines> @@ -34,7 +34,7 @@ <AllowUnsafe>false</AllowUnsafe> <OutputPath>bin/Debug</OutputPath> <DebugInformation>true</DebugInformation> - <XmlDocFile></XmlDocFile> + <XmlDocFile>SCSharpLib.xml</XmlDocFile> <KeyFile>scsharp.snk</KeyFile> <WarningLevel>4</WarningLevel> <SuppressWarnings>1595</SuppressWarnings> @@ -46,28 +46,26 @@ <OptimizeCode>true</OptimizeCode> <AllowUnsafe>false</AllowUnsafe> <OutputPath>bin/Release</OutputPath> - <XmlDocFile></XmlDocFile> + <DebugInformation>false</DebugInformation> + <XmlDocFile>SCSharpLib.xml</XmlDocFile> <KeyFile>scsharp.snk</KeyFile> - <DebugInformation>false</DebugInformation> <WarningLevel>1</WarningLevel> <SuppressWarnings>1595</SuppressWarnings> </Options> </Configuration> - <Reference name="System" /> + <Reference name="System" /> <Reference name="System.Configuration" /> <Reference name="System.Drawing" /> - <Reference name="SCSharpLib" /> <Reference name="Tao.Sdl" localCopy="true" path="../../lib/net-2.0"/> <Reference name="SdlDotNet" localCopy="true" path="../../lib/net-2.0"/> <Reference name="ICSharpCode.SharpZipLib" localCopy="true" path="../../lib/net-2.0"/> <Files> <File buildAction="EmbeddedResource">App.ico</File> - <File buildAction="Content" copyToOutput="PreserveNewest">App.config</File> <Match buildAction="EmbeddedResource" subType="Designer" pattern="Resources.resx" recurse="true"/> - <Match pattern="*.cs" recurse="true"/> + <Match path="." pattern="*.cs" recurse="true"/> </Files> </Project> - <Project name="SCSharpLib" path="src/SCSharpLib" language="C#" type="Library" assemblyName="SCSharpLib" rootNamespace="SCSharp" designerFolder="Properties"> + <Project name="SCSharp" path="src/SCSharp" language="C#" type="WinExe" assemblyName="scsharp" rootNamespace="SCSharp" designerFolder="Properties" icon="App.ico"> <Configuration name="Debug"> <Options> <CompilerDefines>DEBUG;TRACE;CODE_ANALYSIS</CompilerDefines> @@ -75,7 +73,7 @@ <AllowUnsafe>false</AllowUnsafe> <OutputPath>bin/Debug</OutputPath> <DebugInformation>true</DebugInformation> - <XmlDocFile>SCSharpLib.xml</XmlDocFile> + <XmlDocFile></XmlDocFile> <KeyFile>scsharp.snk</KeyFile> <WarningLevel>4</WarningLevel> <SuppressWarnings>1595</SuppressWarnings> @@ -87,26 +85,28 @@ <OptimizeCode>true</OptimizeCode> <AllowUnsafe>false</AllowUnsafe> <OutputPath>bin/Release</OutputPath> + <XmlDocFile></XmlDocFile> + <KeyFile>scsharp.snk</KeyFile> <DebugInformation>false</DebugInformation> - <XmlDocFile>SCSharpLib.xml</XmlDocFile> - <KeyFile>scsharp.snk</KeyFile> <WarningLevel>1</WarningLevel> <SuppressWarnings>1595</SuppressWarnings> </Options> </Configuration> - <Reference name="System" /> + <Reference name="System" /> <Reference name="System.Configuration" /> <Reference name="System.Drawing" /> + <Reference name="SCSharpLib" localCopy="true"/> <Reference name="Tao.Sdl" localCopy="true" path="../../lib/net-2.0"/> <Reference name="SdlDotNet" localCopy="true" path="../../lib/net-2.0"/> <Reference name="ICSharpCode.SharpZipLib" localCopy="true" path="../../lib/net-2.0"/> <Files> <File buildAction="EmbeddedResource">App.ico</File> + <File buildAction="Content" copyToOutput="PreserveNewest">App.config</File> <Match buildAction="EmbeddedResource" subType="Designer" pattern="Resources.resx" recurse="true"/> - <Match path="." pattern="*.cs" recurse="true"/> + <Match pattern="*.cs" recurse="true"/> </Files> </Project> - <Project name="Tests" path="tests" language="C#" type="Library" assemblyName="SCSharpTests" rootNamespace="SCSharpTests" designerFolder="Properties"> + <Project name="Tests" path="tests" language="C#" type="Library" assemblyName="SCSharpTests" rootNamespace="SCSharpTests" designerFolder="Properties"> <Configuration name="Debug"> <Options> <CompilerDefines>DEBUG;TRACE;CODE_ANALYSIS</CompilerDefines> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-18 21:37:07
|
Revision: 1383 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1383&view=rev Author: jendave Date: 2007-05-18 14:37:04 -0700 (Fri, 18 May 2007) Log Message: ----------- Fix credits Modified Paths: -------------- trunk/scsharp/src/SCSharpLib/UI/CreditsScreen.cs Added Paths: ----------- trunk/scsharp/src/SCSharpLib/UI/Credits.txt Removed Paths: ------------- trunk/scsharp/credits.txt Deleted: trunk/scsharp/credits.txt =================================================================== --- trunk/scsharp/credits.txt 2007-05-18 21:06:19 UTC (rev 1382) +++ trunk/scsharp/credits.txt 2007-05-18 21:37:04 UTC (rev 1383) @@ -1,47 +0,0 @@ -</COMMENT credits for SCSharp> -</FADESPEED 100> - -</COMMENT #############################################################> -</BACKGROUND glue\palmm\backgnd.pcx> -</FONTCOLOR glue\palmm\tfont.pcx> -</SCREENCENTER> -SCSharp Programming - -Chris Toshok -David Hudson -</PAGE> - -</COMMENT #############################################################> -</BACKGROUND glue\palzv\backgnd.pcx> -</FONTCOLOR glue\palmm\tfont.pcx> - -</SCREENLEFT> -Special Thanks To - -Justin Olbrantz -Ladislav Zezula -</PAGE> - -</SCREENLEFT> -Special Thanks To - -The folks at Campaign Creations -</PAGE> - -</SCREENLEFT> -Thanks To - -The Starcraft Modding Community. -</PAGE> - -</SCREENLEFT> -Thanks To - -The Mono Project -The SDL Project -The SdlDotNet Project -</PAGE> - -</SCREENCENTER> -Credits for Starcraft Brood War -</PAGE> Added: trunk/scsharp/src/SCSharpLib/UI/Credits.txt =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/Credits.txt (rev 0) +++ trunk/scsharp/src/SCSharpLib/UI/Credits.txt 2007-05-18 21:37:04 UTC (rev 1383) @@ -0,0 +1,47 @@ +</COMMENT credits for SCSharp> +</FADESPEED 100> + +</COMMENT #############################################################> +</BACKGROUND glue\palmm\backgnd.pcx> +</FONTCOLOR glue\palmm\tfont.pcx> +</SCREENCENTER> +SCSharp Programming + +Chris Toshok +David Hudson +</PAGE> + +</COMMENT #############################################################> +</BACKGROUND glue\palzv\backgnd.pcx> +</FONTCOLOR glue\palmm\tfont.pcx> + +</SCREENLEFT> +Special Thanks To + +Justin Olbrantz +Ladislav Zezula +</PAGE> + +</SCREENLEFT> +Special Thanks To + +The folks at Campaign Creations +</PAGE> + +</SCREENLEFT> +Thanks To + +The Starcraft Modding Community. +</PAGE> + +</SCREENLEFT> +Thanks To + +The Mono Project +The SDL Project +The SdlDotNet Project +</PAGE> + +</SCREENCENTER> +Credits for Starcraft Brood War +</PAGE> Property changes on: trunk/scsharp/src/SCSharpLib/UI/Credits.txt ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/scsharp/src/SCSharpLib/UI/CreditsScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/CreditsScreen.cs 2007-05-18 21:06:19 UTC (rev 1382) +++ trunk/scsharp/src/SCSharpLib/UI/CreditsScreen.cs 2007-05-18 21:37:04 UTC (rev 1383) @@ -59,7 +59,7 @@ /// </summary> protected override void LoadMarkup() { - AddMarkup(Assembly.GetExecutingAssembly().GetManifestResourceStream("credits.txt")); + AddMarkup(Assembly.GetExecutingAssembly().GetManifestResourceStream("SCSharp.UI.Credits.txt")); /* broodwar credits */ if (Game.Instance.IsBroodWar) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-18 19:56:24
|
Revision: 1378 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1378&view=rev Author: jendave Date: 2007-05-18 12:56:21 -0700 (Fri, 18 May 2007) Log Message: ----------- remove generated files Removed Paths: ------------- trunk/scsharp/SCSharp.sln trunk/scsharp/SCSharp.suo trunk/scsharp/scsharp.FxCop trunk/scsharp/src/SCSharp/SCSharp.csproj trunk/scsharp/src/SCSharp/SCSharp.csproj.user trunk/scsharp/src/SCSharp/bin/ trunk/scsharp/src/SCSharp/obj/ trunk/scsharp/src/SCSharpLib/SCSharpLib.csproj trunk/scsharp/src/SCSharpLib/SCSharpLib.csproj.user trunk/scsharp/src/SCSharpLib/SCSharpLib.xml trunk/scsharp/src/SCSharpLib/bin/ trunk/scsharp/src/SCSharpLib/obj/ trunk/scsharp/tests/TestTesult.xml trunk/scsharp/tests/Tests.csproj trunk/scsharp/tests/Tests.csproj.user trunk/scsharp/tests/bin/ trunk/scsharp/tests/obj/ Deleted: trunk/scsharp/SCSharp.sln =================================================================== --- trunk/scsharp/SCSharp.sln 2007-05-18 19:51:25 UTC (rev 1377) +++ trunk/scsharp/SCSharp.sln 2007-05-18 19:56:21 UTC (rev 1378) @@ -1,36 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SCSharpLib", "src\SCSharpLib\SCSharpLib.csproj", "{1A51DB16-582A-4231-98DB-E4622F79D208}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SCSharp", "src\SCSharp\SCSharp.csproj", "{7D4C7304-8496-4F1C-8FDF-9AF647FE199C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "tests\Tests.csproj", "{29C81049-8557-4D06-B187-EF52765DB46E}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{468F1D07-AD17-4CC3-ABD0-2CA268E4E1A6}" - ProjectSection(SolutionItems) = preProject - prebuild.xml = prebuild.xml - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1A51DB16-582A-4231-98DB-E4622F79D208}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1A51DB16-582A-4231-98DB-E4622F79D208}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1A51DB16-582A-4231-98DB-E4622F79D208}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1A51DB16-582A-4231-98DB-E4622F79D208}.Release|Any CPU.Build.0 = Release|Any CPU - {7D4C7304-8496-4F1C-8FDF-9AF647FE199C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7D4C7304-8496-4F1C-8FDF-9AF647FE199C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7D4C7304-8496-4F1C-8FDF-9AF647FE199C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7D4C7304-8496-4F1C-8FDF-9AF647FE199C}.Release|Any CPU.Build.0 = Release|Any CPU - {29C81049-8557-4D06-B187-EF52765DB46E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {29C81049-8557-4D06-B187-EF52765DB46E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {29C81049-8557-4D06-B187-EF52765DB46E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {29C81049-8557-4D06-B187-EF52765DB46E}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal Deleted: trunk/scsharp/SCSharp.suo =================================================================== (Binary files differ) Deleted: trunk/scsharp/scsharp.FxCop =================================================================== --- trunk/scsharp/scsharp.FxCop 2007-05-18 19:51:25 UTC (rev 1377) +++ trunk/scsharp/scsharp.FxCop 2007-05-18 19:56:21 UTC (rev 1378) @@ -1,7068 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<FxCopProject Version="1.35" Name="SCSharp Project"> - <ProjectOptions> - <SharedProject>True</SharedProject> - <Stylesheet Apply="False">http://www.gotdotnet.com/team/fxcop//xsl/1.35/FxCopReport.xsl</Stylesheet> - <SaveMessages> - <Project Status="Active, Excluded" NewOnly="False" /> - <Report Status="Active" NewOnly="False" /> - </SaveMessages> - <ProjectFile Compress="True" DefaultTargetCheck="True" DefaultRuleCheck="True" SaveByRuleGroup="" Deterministic="True" /> - <EnableMultithreadedLoad>True</EnableMultithreadedLoad> - <EnableMultithreadedAnalysis>True</EnableMultithreadedAnalysis> - <SourceLookup>True</SourceLookup> - <AnalysisExceptionsThreshold>10</AnalysisExceptionsThreshold> - <RuleExceptionsThreshold>1</RuleExceptionsThreshold> - <Spelling Locale="en-us" /> - <VersionAware>False</VersionAware> - <OverrideRuleVisibilities>False</OverrideRuleVisibilities> - <CustomDictionaries SearchFxCopDir="True" SearchUserProfile="True" SearchProjectDir="True" /> - <SearchGlobalAssemblyCache>False</SearchGlobalAssemblyCache> - <DeadlockDetectionTimeout>120</DeadlockDetectionTimeout> - </ProjectOptions> - <Targets> - <Target Name="$(ProjectDir)/src/SCSharp/bin/Debug/scsharp.exe" Analyze="True" AnalyzeAllChildren="True" /> - <Target Name="$(ProjectDir)/src/SCSharpLib/bin/Debug/SCSharpLib.dll" Analyze="True" AnalyzeAllChildren="True" /> - </Targets> - <Rules> - <RuleFiles> - <RuleFile Name="$(FxCopDir)\Rules\DesignRules.dll" Enabled="True" AllRulesEnabled="True" /> - <RuleFile Name="$(FxCopDir)\Rules\GlobalizationRules.dll" Enabled="True" AllRulesEnabled="True" /> - <RuleFile Name="$(FxCopDir)\Rules\InteroperabilityRules.dll" Enabled="True" AllRulesEnabled="True" /> - <RuleFile Name="$(FxCopDir)\Rules\MobilityRules.dll" Enabled="True" AllRulesEnabled="True" /> - <RuleFile Name="$(FxCopDir)\Rules\NamingRules.dll" Enabled="True" AllRulesEnabled="True" /> - <RuleFile Name="$(FxCopDir)\Rules\PerformanceRules.dll" Enabled="True" AllRulesEnabled="True" /> - <RuleFile Name="$(FxCopDir)\Rules\PortabilityRules.dll" Enabled="True" AllRulesEnabled="True" /> - <RuleFile Name="$(FxCopDir)\Rules\SecurityRules.dll" Enabled="True" AllRulesEnabled="True" /> - <RuleFile Name="$(FxCopDir)\Rules\UsageRules.dll" Enabled="True" AllRulesEnabled="True" /> - </RuleFiles> - <Groups /> - <Settings /> - </Rules> - <FxCopReport Version="1.35"> - <Namespaces> - <Namespace Name="SCSharp.MpqLib"> - <Messages> - <Message Id="Mpq" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-09 22:39:13Z"> - <Issue Name="Namespace"> - <Item>Mpq</Item> - <Item>SCSharp.MpqLib</Item> - </Issue> - </Message> - </Messages> - </Namespace> - </Namespaces> - <Targets> - <Target Name="$(ProjectDir)/src/SCSharpLib/bin/Debug/SCSharpLib.dll"> - <Modules> - <Module Name="scsharplib.dll"> - <Namespaces> - <Namespace Name="SCSharp.MpqLib"> - <Types> - <Type Name="Bin"> - <Members> - <Member Name="Elements"> - <Messages> - <Message TypeName="PropertiesShouldNotReturnArrays" Category="Microsoft.Performance" CheckId="CA1819" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>Bin.Elements:BinElement[]</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="BinElement"> - <Members> - <Member Name=".ctor(System.Byte[],System.Int32,System.UInt32)"> - <Messages> - <Message Id="0#buf" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Parameter"> - <Item>BinElement.BinElement(Byte[], Int32, UInt32)</Item> - <Item>buf</Item> - <Item>buf</Item> - </Issue> - </Message> - <Message Id="position+10" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>position+10</Item> - <Item>BinElement.BinElement(Byte[], Int32, UInt32)</Item> - </Issue> - </Message> - <Message Id="position+12" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>position+12</Item> - <Item>BinElement.BinElement(Byte[], Int32, UInt32)</Item> - </Issue> - </Message> - <Message Id="position+14" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>position+14</Item> - <Item>BinElement.BinElement(Byte[], Int32, UInt32)</Item> - </Issue> - </Message> - <Message Id="position+20" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>position+20</Item> - <Item>BinElement.BinElement(Byte[], Int32, UInt32)</Item> - </Issue> - </Message> - <Message Id="position+24" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>position+24</Item> - <Item>BinElement.BinElement(Byte[], Int32, UInt32)</Item> - </Issue> - </Message> - <Message Id="position+34" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>position+34</Item> - <Item>BinElement.BinElement(Byte[], Int32, UInt32)</Item> - </Issue> - </Message> - <Message Id="position+4" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>position+4</Item> - <Item>BinElement.BinElement(Byte[], Int32, UInt32)</Item> - </Issue> - </Message> - <Message Id="position+6" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>position+6</Item> - <Item>BinElement.BinElement(Byte[], Int32, UInt32)</Item> - </Issue> - </Message> - <Message Id="position+8" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>position+8</Item> - <Item>BinElement.BinElement(Byte[], Int32, UInt32)</Item> - </Issue> - </Message> - <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>'buf'</Item> - <Item>BinElement.BinElement(Byte[], Int32, UInt32)</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="ToString():System.String"> - <Messages> - <Message Id="System.String.Format(System.String,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>BinElement.ToString():String</Item> - <Item>System.String.Format(System.String,System.Object,System.Object)</Item> - <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="BitStream"> - <Members> - <Member Name="BaseStream"> - <Accessors> - <Accessor Name="get_BaseStream():System.IO.Stream"> - <Messages> - <Message TypeName="AvoidUncalledPrivateCode" Category="Microsoft.Performance" CheckId="CA1811" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>BitStream.get_BaseStream():Stream</Item> - </Issue> - </Message> - </Messages> - </Accessor> - </Accessors> - </Member> - <Member Name="ReadBits(System.Int32):System.Int32"> - <Messages> - <Message Id="System.ArgumentOutOfRangeException.#ctor(System.String,System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>BitStream.ReadBits(Int32):Int32</Item> - <Item>2</Item> - <Item>ArgumentOutOfRangeException.ArgumentOutOfRangeException(String, String)</Item> - <Item>Maximum BitCount is 16</Item> - </Issue> - </Message> - <Message TypeName="InstantiateArgumentExceptionsCorrectly" Category="Microsoft.Usage" CheckId="CA2208" Created="2007-05-10 15:48:01Z"> - <Issue Name="TwoArgumentsFirstShouldBeParameterName"> - <Item>System.ArgumentOutOfRangeException</Item> - <Item>ArgumentOutOfRangeException.ArgumentOutOfRangeException(String, String)</Item> - <Item>BitCount</Item> - <Item>Maximum BitCount is 16</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="Chk"> - <Messages> - <Message Id="Chk" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Type"> - <Item>Chk</Item> - <Item>SCSharp.MpqLib.Chk</Item> - </Issue> - </Message> - </Messages> - <Members> - <Member Name="GetMapString(System.Int32):System.String"> - <Messages> - <Message Id="0#idx" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Parameter"> - <Item>Chk.GetMapString(Int32):String</Item> - <Item>idx</Item> - <Item>idx</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="mapMask"> - <Messages> - <Message Id="Member" TypeName="PreferJaggedArraysOverMultidimensional" Category="Microsoft.Performance" CheckId="CA1814" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>mapMask</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="MapMask"> - <Messages> - <Message Id="Member" TypeName="PreferJaggedArraysOverMultidimensional" Category="Microsoft.Performance" CheckId="CA1814" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>MapMask</Item> - </Issue> - </Message> - <Message TypeName="PropertiesShouldNotReturnArrays" Category="Microsoft.Performance" CheckId="CA1819" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>Chk.MapMask:Byte[,]</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="mapTiles"> - <Messages> - <Message Id="Member" TypeName="PreferJaggedArraysOverMultidimensional" Category="Microsoft.Performance" CheckId="CA1814" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>mapTiles</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="MapTiles"> - <Messages> - <Message Id="Member" TypeName="PreferJaggedArraysOverMultidimensional" Category="Microsoft.Performance" CheckId="CA1814" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>MapTiles</Item> - </Issue> - </Message> - <Message TypeName="PropertiesShouldNotReturnArrays" Category="Microsoft.Performance" CheckId="CA1819" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>Chk.MapTiles:UInt16[,]</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="NumComputerSlots"> - <Messages> - <Message Id="Num" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Member"> - <Item>Num</Item> - <Item>Chk.NumComputerSlots:Int32</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="NumHumanSlots"> - <Messages> - <Message Id="Num" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Member"> - <Item>Num</Item> - <Item>Chk.NumHumanSlots:Int32</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="NumPlayers"> - <Messages> - <Message Id="Num" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Member"> - <Item>Num</Item> - <Item>Chk.NumPlayers:Int32</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="ParseSection(System.String):System.Void"> - <Messages> - <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2007-05-10 15:48:01Z"> - <Issue Name="TooGeneric"> - <Item>Chk.ParseSection(String):Void</Item> - <Item>System.Exception</Item> - </Issue> - </Message> - <Message Id="Body" TypeName="PreferJaggedArraysOverMultidimensional" Category="Microsoft.Performance" CheckId="CA1814" Created="2007-05-10 15:48:01Z"> - <Issue Name="Body"> - <Item>Chk.ParseSection(String):Void</Item> - <Item>System.Byte[,]</Item> - </Issue> - <Issue Name="Body"> - <Item>Chk.ParseSection(String):Void</Item> - <Item>System.UInt16[,]</Item> - </Issue> - </Message> - <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>Chk.ParseSection(String):Void</Item> - <Item>System.String.Format(System.String,System.Object)</Item> - <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="ReadFromStream(System.IO.Stream):System.Void"> - <Messages> - <Message Id="stream_length" TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>Chk.ReadFromStream(Stream):Void</Item> - <Item>stream_length</Item> - <Item>System.Int64</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="Tileset"> - <Messages> - <Message Id="Tileset" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Member"> - <Item>Tileset</Item> - <Item>Chk.Tileset:Tileset</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="Units"> - <Messages> - <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>System.Collections.Generic.List`1<SCSharp.MpqLib.UnitInfo></Item> - <Item>Chk.Units:List`1<SCSharp.MpqLib.UnitInfo></Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="ElementFlags"> - <Messages> - <Message TypeName="IdentifiersShouldNotHaveIncorrectSuffix" Category="Microsoft.Naming" CheckId="CA1711" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>SCSharp.MpqLib.ElementFlags</Item> - <Item>Flags</Item> - </Issue> - </Message> - </Messages> - <Members> - <Member Name="CenterTextHoriz"> - <Messages> - <Message Id="Horiz" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Member"> - <Item>Horiz</Item> - <Item>ElementFlags.CenterTextHoriz</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="CenterTextVert"> - <Messages> - <Message Id="Vert" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Member"> - <Item>Vert</Item> - <Item>ElementFlags.CenterTextVert</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="NoSoundOnMouseOvr"> - <Messages> - <Message Id="Ovr" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Member"> - <Item>Ovr</Item> - <Item>ElementFlags.NoSoundOnMouseOvr</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="ElementType"> - <Messages> - <Message TypeName="MarkEnumsWithFlags" Category="Microsoft.Design" CheckId="CA1027" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>ElementType</Item> - </Issue> - </Message> - </Messages> - </Type> - <Type Name="FlingyDat"> - <Messages> - <Message Id="Flingy" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Type"> - <Item>Flingy</Item> - <Item>SCSharp.MpqLib.FlingyDat</Item> - </Issue> - </Message> - </Messages> - <Members> - <Member Name="GetSpriteId(System.Int32):System.Int32"> - <Messages> - <Message Id="index*2" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>index*2</Item> - <Item>FlingyDat.GetSpriteId(Int32):Int32</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="ReadFromStream(System.IO.Stream):System.Void"> - <Messages> - <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>'stream'</Item> - <Item>FlingyDat.ReadFromStream(Stream):Void</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="Fnt"> - <Messages> - <Message Id="Fnt" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Type"> - <Item>Fnt</Item> - <Item>SCSharp.MpqLib.Fnt</Item> - </Issue> - </Message> - </Messages> - <Members> - <Member Name="DumpGlyph(System.Int32):System.Void"> - <Messages> - <Message Id="0#c" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="ParameterOneLetter"> - <Item>Fnt.DumpGlyph(Int32):Void</Item> - <Item>c</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="GetGlyph(System.Int32):SCSharp.MpqLib.Glyph"> - <Messages> - <Message Id="Body" TypeName="PreferJaggedArraysOverMultidimensional" Category="Microsoft.Performance" CheckId="CA1814" Created="2007-05-10 15:48:01Z"> - <Issue Name="Body"> - <Item>Fnt.GetGlyph(Int32):Glyph</Item> - <Item>System.Byte[,]</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="Item[System.Int32]"> - <Accessors> - <Accessor Name="get_Item(System.Int32):SCSharp.MpqLib.Glyph"> - <Messages> - <Message Id="System.String.Format(System.String,System.Object,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>Fnt.get_Item(Int32):Glyph</Item> - <Item>System.String.Format(System.String,System.Object,System.Object,System.Object)</Item> - <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item> - </Issue> - </Message> - </Messages> - </Accessor> - </Accessors> - </Member> - </Members> - </Type> - <Type Name="Glyph"> - <Members> - <Member Name="bitmap"> - <Messages> - <Message Id="Member" TypeName="PreferJaggedArraysOverMultidimensional" Category="Microsoft.Performance" CheckId="CA1814" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>bitmap</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="Bitmap"> - <Messages> - <Message Id="Member" TypeName="PreferJaggedArraysOverMultidimensional" Category="Microsoft.Performance" CheckId="CA1814" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>Bitmap</Item> - </Issue> - </Message> - <Message TypeName="PropertiesShouldNotReturnArrays" Category="Microsoft.Performance" CheckId="CA1819" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>Glyph.Bitmap:Byte[,]</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="Got"> - <Members> - <Member Name="ReadFromStream(System.IO.Stream):System.Void"> - <Messages> - <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>'stream'</Item> - <Item>Got.ReadFromStream(Stream):Void</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="Grp"> - <Messages> - <Message Id="Grp" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Type"> - <Item>Grp</Item> - <Item>SCSharp.MpqLib.Grp</Item> - </Issue> - </Message> - </Messages> - <Members> - <Member Name="DecodeLine(System.Byte[,],System.Int32,System.Byte,System.UInt16,System.UInt16):System.Void"> - <Messages> - <Message Id="0#" TypeName="PreferJaggedArraysOverMultidimensional" Category="Microsoft.Performance" CheckId="CA1814" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>grid</Item> - </Issue> - </Message> - <Message TypeName="ProvideCorrectArgumentsToFormattingMethods" Category="Microsoft.Usage" CheckId="CA2241" Created="2007-05-10 15:48:01Z"> - <Issue Name="MissingSpecifier"> - <Item>Console.WriteLine(String, Object[]):Void</Item> - <Item>Grp.DecodeLine(Byte[,], Int32, Byte, UInt16, UInt16):Void</Item> - <Item>'stack3'</Item> - <Item>EXCEPTION on line {0}, x = {2}, i = {3}, line length = {2} (line data length = {4}):</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="GetFrame(System.Int32):System.Byte[,]"> - <Messages> - <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2007-05-10 15:48:01Z"> - <Issue Name="TooGeneric"> - <Item>Grp.GetFrame(Int32):Byte[,]</Item> - <Item>System.Exception</Item> - </Issue> - </Message> - <Message Id="Body" TypeName="PreferJaggedArraysOverMultidimensional" Category="Microsoft.Performance" CheckId="CA1814" Created="2007-05-10 15:48:01Z"> - <Issue Name="Body"> - <Item>Grp.GetFrame(Int32):Byte[,]</Item> - <Item>System.Byte[,]</Item> - </Issue> - </Message> - <Message Id="Return" TypeName="PreferJaggedArraysOverMultidimensional" Category="Microsoft.Performance" CheckId="CA1814" Created="2007-05-10 15:48:01Z"> - <Issue Name="Return"> - <Item>Grp.GetFrame(Int32):Byte[,]</Item> - <Item>System.Byte[,]</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="ImagesDat"> - <Members> - <Member Name="GetGrpIndex(System.UInt32):System.UInt16"> - <Messages> - <Message Id="Grp" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Member"> - <Item>Grp</Item> - <Item>ImagesDat.GetGrpIndex(UInt32):UInt16</Item> - </Issue> - </Message> - <Message Id="index*4" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>index*4</Item> - <Item>ImagesDat.GetGrpIndex(UInt32):UInt16</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="GetIScriptIndex(System.UInt32):System.UInt16"> - <Messages> - <Message Id="index*4" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>index*4</Item> - <Item>ImagesDat.GetIScriptIndex(UInt32):UInt16</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="ReadFromStream(System.IO.Stream):System.Void"> - <Messages> - <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>'stream'</Item> - <Item>ImagesDat.ReadFromStream(Stream):Void</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="IMpqResource"> - <Messages> - <Message Id="Mpq" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Type"> - <Item>Mpq</Item> - <Item>SCSharp.MpqLib.IMpqResource</Item> - </Issue> - </Message> - </Messages> - </Type> - <Type Name="InitialUnits"> - <Messages> - <Message TypeName="OnlyFlagsEnumsShouldHavePluralNames" Category="Microsoft.Naming" CheckId="CA1717" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>InitialUnits</Item> - </Issue> - </Message> - </Messages> - </Type> - <Type Name="LinkedNode"> - <Members> - <Member Name=".ctor(System.Int32,System.Int32)"> - <Messages> - <Message Id="0#Val" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Parameter"> - <Item>LinkedNode.LinkedNode(Int32, Int32)</Item> - <Item>Val</Item> - <Item>decompVal</Item> - </Issue> - </Message> - <Message Id="0#decomp" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Parameter"> - <Item>LinkedNode.LinkedNode(Int32, Int32)</Item> - <Item>decomp</Item> - <Item>decompVal</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="Insert(SCSharp.MpqLib.LinkedNode):SCSharp.MpqLib.LinkedNode"> - <Messages> - <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>'other'</Item> - <Item>LinkedNode.Insert(LinkedNode):LinkedNode</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="Prev"> - <Messages> - <Message Id="Prev" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Member"> - <Item>Prev</Item> - <Item>LinkedNode.Prev:LinkedNode</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="MapDataDat"> - <Members> - <Member Name="GetFileIndex(System.UInt32):System.UInt32"> - <Messages> - <Message Id="index*4" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>index*4</Item> - <Item>MapDataDat.GetFileIndex(UInt32):UInt32</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="NumIndices"> - <Messages> - <Message Id="Num" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Member"> - <Item>Num</Item> - <Item>MapDataDat.NumIndices:Int32</Item> - </Issue> - </Message> - <Message Id="Indices" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-05-10 15:48:01Z"> - <Issue Name="Member"> - <Item>Indices</Item> - <Item>NumIndices</Item> - <Item>Indexes</Item> - </Issue> - </Message> - </Messages> - <Accessors> - <Accessor Name="get_NumIndices():System.Int32"> - <Messages> - <Message Id="Indices" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-05-10 15:48:01Z"> - <Issue Name="Member"> - <Item>Indices</Item> - <Item>get_NumIndices</Item> - <Item>Indexes</Item> - </Issue> - </Message> - </Messages> - </Accessor> - </Accessors> - </Member> - <Member Name="ReadFromStream(System.IO.Stream):System.Void"> - <Messages> - <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>'stream'</Item> - <Item>MapDataDat.ReadFromStream(Stream):Void</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="Mpq"> - <Messages> - <Message Id="Mpq" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Type"> - <Item>Mpq</Item> - <Item>SCSharp.MpqLib.Mpq</Item> - </Issue> - </Message> - </Messages> - <Members> - <Member Name="GetResource(System.String):System.Object"> - <Messages> - <Message Id="System.String.ToLower" TypeName="SpecifyCultureInfo" Category="Microsoft.Globalization" CheckId="CA1304" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>Mpq.GetResource(String):Object</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="GetTypeFromResourcePath(System.String):System.Type"> - <Messages> - <Message Id="ext" TypeName="AvoidUnnecessaryStringCreation" Category="Microsoft.Performance" CheckId="CA1807" Created="2007-05-10 15:48:01Z"> - <Issue Name="DuplicateStringCreationLocal"> - <Item>String.ToLower():String</Item> - <Item>ext</Item> - </Issue> - <Issue Name="DuplicateStringCreationLocal"> - <Item>String.ToLower():String</Item> - <Item>ext</Item> - </Issue> - <Issue Name="DuplicateStringCreationLocal"> - <Item>String.ToLower():String</Item> - <Item>ext</Item> - </Issue> - <Issue Name="DuplicateStringCreationLocal"> - <Item>String.ToLower():String</Item> - <Item>ext</Item> - </Issue> - <Issue Name="DuplicateStringCreationLocal"> - <Item>String.ToLower():String</Item> - <Item>ext</Item> - </Issue> - <Issue Name="DuplicateStringCreationLocal"> - <Item>String.ToLower():String</Item> - <Item>ext</Item> - </Issue> - <Issue Name="DuplicateStringCreationLocal"> - <Item>String.ToLower():String</Item> - <Item>ext</Item> - </Issue> - <Issue Name="UseStringCompareLocal"> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>String.op_Equality(String, String):Boolean</Item> - <Item>ext</Item> - </Issue> - <Issue Name="UseStringCompareLocal"> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>String.op_Equality(String, String):Boolean</Item> - <Item>ext</Item> - </Issue> - <Issue Name="UseStringCompareLocal"> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>String.op_Equality(String, String):Boolean</Item> - <Item>ext</Item> - </Issue> - <Issue Name="UseStringCompareLocal"> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>String.op_Equality(String, String):Boolean</Item> - <Item>ext</Item> - </Issue> - <Issue Name="UseStringCompareLocal"> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>String.op_Equality(String, String):Boolean</Item> - <Item>ext</Item> - </Issue> - <Issue Name="UseStringCompareLocal"> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>String.op_Equality(String, String):Boolean</Item> - <Item>ext</Item> - </Issue> - <Issue Name="UseStringCompareLocal"> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>String.op_Equality(String, String):Boolean</Item> - <Item>ext</Item> - </Issue> - <Issue Name="UseStringCompareLocal"> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>String.op_Equality(String, String):Boolean</Item> - <Item>ext</Item> - </Issue> - </Message> - <Message Id="path" TypeName="AvoidUnnecessaryStringCreation" Category="Microsoft.Performance" CheckId="CA1807" Created="2007-05-10 15:48:01Z"> - <Issue Name="DuplicateStringCreationParameter"> - <Item>String.ToLower():String</Item> - <Item>path</Item> - </Issue> - <Issue Name="DuplicateStringCreationParameter"> - <Item>String.ToLower():String</Item> - <Item>path</Item> - </Issue> - <Issue Name="DuplicateStringCreationParameter"> - <Item>String.ToLower():String</Item> - <Item>path</Item> - </Issue> - <Issue Name="DuplicateStringCreationParameter"> - <Item>String.ToLower():String</Item> - <Item>path</Item> - </Issue> - <Issue Name="DuplicateStringCreationParameter"> - <Item>String.ToLower():String</Item> - <Item>path</Item> - </Issue> - <Issue Name="DuplicateStringCreationParameter"> - <Item>String.ToLower():String</Item> - <Item>path</Item> - </Issue> - <Issue Name="DuplicateStringCreationParameter"> - <Item>String.ToLower():String</Item> - <Item>path</Item> - </Issue> - </Message> - <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-05-10 15:48:01Z" FixCategory="Breaking"> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - </Issue> - </Message> - <Message Id="System.String.ToLower" TypeName="SpecifyCultureInfo" Category="Microsoft.Globalization" CheckId="CA1304" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - <Issue> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - </Message> - <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>'path'</Item> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - </Issue> - <Issue> - <Item>'path'</Item> - <Item>Mpq.GetTypeFromResourcePath(String):Type</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="MpqArchive"> - <Messages> - <Message Id="Mpq" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Type"> - <Item>Mpq</Item> - <Item>SCSharp.MpqLib.MpqArchive</Item> - </Issue> - </Message> - </Messages> - <Members> - <Member Name=".cctor()"> - <Messages> - <Message TypeName="InitializeReferenceTypeStaticFieldsInline" Category="Microsoft.Performance" CheckId="CA1810" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>SCSharp.MpqLib.MpqArchive</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name=".ctor(System.String)"> - <Messages> - <Message Id="filename" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2007-05-10 15:48:01Z"> - <Issue Name="ShouldBeCompoundWord"> - <Item>filename</Item> - <Item>parameter</Item> - <Item>filename</Item> - <Item>fileName</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="FileExists(System.String):System.Boolean"> - <Messages> - <Message Id="filename" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2007-05-10 15:48:01Z"> - <Issue Name="ShouldBeCompoundWord"> - <Item>filename</Item> - <Item>parameter</Item> - <Item>filename</Item> - <Item>fileName</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="HashString(System.String,System.Int32):System.UInt32"> - <Messages> - <Message Id="System.Char.ToUpper(System.Char)" TypeName="SpecifyCultureInfo" Category="Microsoft.Globalization" CheckId="CA1304" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>MpqArchive.HashString(String, Int32):UInt32</Item> - <Item>System.Char.ToUpper(System.Char)</Item> - <Item>System.Char.ToUpper(System.Char,System.Globalization.CultureInfo)</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="Init():System.Void"> - <Messages> - <Message Id="System.Exception.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>MpqArchive.Init():Void</Item> - <Item>1</Item> - <Item>Exception.Exception(String)</Item> - <Item>Unable to find MPQ header</Item> - </Issue> - </Message> - <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2007-05-10 15:48:01Z"> - <Issue Name="TooGeneric"> - <Item>MpqArchive.Init():Void</Item> - <Item>System.Exception</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="OpenFile(System.String):SCSharp.MpqLib.MpqStream"> - <Messages> - <Message Id="filename" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2007-05-10 15:48:01Z"> - <Issue Name="ShouldBeCompoundWord"> - <Item>filename</Item> - <Item>parameter</Item> - <Item>filename</Item> - <Item>fileName</Item> - </Issue> - </Message> - <Message Id="System.IO.FileNotFoundException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>MpqArchive.OpenFile(String):MpqStream</Item> - <Item>1</Item> - <Item>FileNotFoundException.FileNotFoundException(String)</Item> - <Item>File not found: __</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="MpqArchiveContainer"> - <Messages> - <Message Id="Mpq" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Type"> - <Item>Mpq</Item> - <Item>SCSharp.MpqLib.MpqArchiveContainer</Item> - </Issue> - </Message> - </Messages> - </Type> - <Type Name="MpqBlock"> - <Members> - <Member Name="Size"> - <Messages> - <Message TypeName="UseLiteralsWhereAppropriate" Category="Microsoft.Performance" CheckId="CA1802" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>Size</Item> - <Item>16</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="MpqContainer"> - <Messages> - <Message Id="Mpq" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Type"> - <Item>Mpq</Item> - <Item>SCSharp.MpqLib.MpqContainer</Item> - </Issue> - </Message> - </Messages> - <Members> - <Member Name="Add(SCSharp.MpqLib.Mpq):System.Void"> - <Messages> - <Message Id="0#mpq" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Parameter"> - <Item>MpqContainer.Add(Mpq):Void</Item> - <Item>mpq</Item> - <Item>mpq</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="Remove(SCSharp.MpqLib.Mpq):System.Void"> - <Messages> - <Message Id="0#mpq" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Parameter"> - <Item>MpqContainer.Remove(Mpq):Void</Item> - <Item>mpq</Item> - <Item>mpq</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="MpqDirectory"> - <Messages> - <Message Id="Mpq" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Type"> - <Item>Mpq</Item> - <Item>SCSharp.MpqLib.MpqDirectory</Item> - </Issue> - </Message> - </Messages> - <Members> - <Member Name="ConvertBackSlashes(System.String):System.String"> - <Messages> - <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-05-10 15:48:01Z" FixCategory="NonBreaking"> - <Issue> - <Item>MpqDirectory.ConvertBackSlashes(String):String</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="GetStreamForResource(System.String):System.IO.Stream"> - <Messages> - <Message Id="System.String.ToLower" TypeName="SpecifyCultureInfo" Category="Microsoft.Globalization" CheckId="CA1304" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>MpqDirectory.GetStreamForResource(String):Stream</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - <Issue> - <Item>MpqDirectory.GetStreamForResource(String):Stream</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="RecurseDirectoryTree(System.String):System.Void"> - <Messages> - <Message Id="System.String.ToLower" TypeName="SpecifyCultureInfo" Category="Microsoft.Globalization" CheckId="CA1304" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>MpqDirectory.RecurseDirectoryTree(String):Void</Item> - <Item>System.String.ToLower</Item> - <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="MpqHash"> - <Members> - <Member Name="IsValid"> - <Accessors> - <Accessor Name="get_IsValid():System.Boolean"> - <Messages> - <Message TypeName="AvoidUncalledPrivateCode" Category="Microsoft.Performance" CheckId="CA1811" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>MpqHash.get_IsValid():Boolean</Item> - </Issue> - </Message> - </Messages> - </Accessor> - </Accessors> - </Member> - <Member Name="Size"> - <Messages> - <Message TypeName="UseLiteralsWhereAppropriate" Category="Microsoft.Performance" CheckId="CA1802" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>Size</Item> - <Item>16</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="MpqHeader"> - <Members> - <Member Name="MpqId"> - <Messages> - <Message TypeName="UseLiteralsWhereAppropriate" Category="Microsoft.Performance" CheckId="CA1802" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>MpqId</Item> - <Item>441536589</Item> - </Issue> - </Message> - </Messages> - </Member> - <Member Name="Size"> - <Messages> - <Message TypeName="UseLiteralsWhereAppropriate" Category="Microsoft.Performance" CheckId="CA1802" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>Size</Item> - <Item>32</Item> - </Issue> - </Message> - </Messages> - </Member> - </Members> - </Type> - <Type Name="MpqHuffman"> - <Messages> - <Message Id="Mpq" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-05-10 15:48:01Z"> - <Issue Name="Type"> - <Item>Mpq</Item> - <Item>SCSharp.MpqLib.MpqHuffman</Item> - </Issue> - </Message> - <Message TypeName="StaticHolderTypesShouldBeSealed" Category="Microsoft.Design" CheckId="CA1052" Created="2007-05-10 15:48:01Z"> - <Issue> - <Item>MpqHuffman</Item> - ... [truncated message content] |
From: <je...@us...> - 2007-05-22 22:14:17
|
Revision: 1388 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1388&view=rev Author: jendave Date: 2007-05-22 15:14:12 -0700 (Tue, 22 May 2007) Log Message: ----------- Many fxcop fixes Modified Paths: -------------- trunk/scsharp/src/SCSharp/Properties/AssemblyInfo.cs trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs trunk/scsharp/src/SCSharpLib/MpqLib/Chk.cs trunk/scsharp/src/SCSharpLib/MpqLib/FlingyDat.cs trunk/scsharp/src/SCSharpLib/MpqLib/Fnt.cs trunk/scsharp/src/SCSharpLib/MpqLib/Got.cs trunk/scsharp/src/SCSharpLib/MpqLib/ImagesDat.cs trunk/scsharp/src/SCSharpLib/MpqLib/LinkedNode.cs trunk/scsharp/src/SCSharpLib/MpqLib/MapDataDat.cs trunk/scsharp/src/SCSharpLib/MpqLib/Mpq.cs trunk/scsharp/src/SCSharpLib/MpqLib/MpqBlock.cs trunk/scsharp/src/SCSharpLib/MpqLib/MpqHash.cs trunk/scsharp/src/SCSharpLib/MpqLib/MpqHeader.cs trunk/scsharp/src/SCSharpLib/MpqLib/MpqHuffman.cs trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs trunk/scsharp/src/SCSharpLib/MpqLib/MpqWavCompression.cs trunk/scsharp/src/SCSharpLib/MpqLib/ParallaxLayer.cs trunk/scsharp/src/SCSharpLib/MpqLib/ParallaxObject.cs trunk/scsharp/src/SCSharpLib/MpqLib/SfxDataDat.cs trunk/scsharp/src/SCSharpLib/MpqLib/SpritesDat.cs trunk/scsharp/src/SCSharpLib/MpqLib/Trigger.cs trunk/scsharp/src/SCSharpLib/MpqLib/TriggerData.cs trunk/scsharp/src/SCSharpLib/MpqLib/UnitInfo.cs trunk/scsharp/src/SCSharpLib/MpqLib/UnitsDat.cs trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs trunk/scsharp/src/SCSharpLib/UI/BriefingRunner.cs trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs trunk/scsharp/src/SCSharpLib/UI/Cinematic.cs trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs trunk/scsharp/src/SCSharpLib/UI/CursorAnimator.cs trunk/scsharp/src/SCSharpLib/UI/FFmpeg.cs trunk/scsharp/src/SCSharpLib/UI/Game.cs trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs trunk/scsharp/src/SCSharpLib/UI/ImageElement.cs trunk/scsharp/src/SCSharpLib/UI/ListBoxElement.cs trunk/scsharp/src/SCSharpLib/UI/LoginScreen.cs trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs trunk/scsharp/src/SCSharpLib/UI/MapRenderer.cs trunk/scsharp/src/SCSharpLib/UI/MarkupScreen.cs trunk/scsharp/src/SCSharpLib/UI/Painter.cs trunk/scsharp/src/SCSharpLib/UI/Pcx.cs trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs trunk/scsharp/src/SCSharpLib/UI/RaceSelectionScreen.cs trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs trunk/scsharp/src/SCSharpLib/UI/Resources.cs trunk/scsharp/src/SCSharpLib/UI/SmackerPlayer.cs trunk/scsharp/src/SCSharpLib/UI/Sprite.cs trunk/scsharp/src/SCSharpLib/UI/SpriteManager.cs trunk/scsharp/src/SCSharpLib/UI/SwooshPainter.cs trunk/scsharp/src/SCSharpLib/UI/TextBoxElement.cs trunk/scsharp/src/SCSharpLib/UI/UIDialog.cs trunk/scsharp/src/SCSharpLib/UI/UIElement.cs trunk/scsharp/src/SCSharpLib/UI/UIPainter.cs trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs trunk/scsharp/src/SCSharpLib/UI/Unit.cs trunk/scsharp/src/SCSharpLib/UI/Utilities.cs trunk/scsharp/tests/FontFoo.cs Modified: trunk/scsharp/src/SCSharp/Properties/AssemblyInfo.cs =================================================================== --- trunk/scsharp/src/SCSharp/Properties/AssemblyInfo.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharp/Properties/AssemblyInfo.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -2,6 +2,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using System.Diagnostics.CodeAnalysis; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -33,3 +34,4 @@ // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] + Modified: trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -39,7 +39,7 @@ /// /// </summary> [Flags] - public enum ElementFlags + public enum SCElement { /// <summary> /// @@ -72,7 +72,7 @@ /// <summary> /// /// </summary> - NoSoundOnMouseOvr = 0x00000080, + NoSoundOnMouseOver = 0x00000080, /// <summary> /// /// </summary> @@ -128,7 +128,7 @@ /// <summary> /// /// </summary> - CenterTextHoriz = 0x00200000, + CenterTextHorizontally = 0x00200000, /// <summary> /// /// </summary> @@ -136,7 +136,7 @@ /// <summary> /// /// </summary> - CenterTextVert = 0x00800000, + CenterTextVertically = 0x00800000, /// <summary> /// /// </summary> @@ -335,12 +335,12 @@ set { textOffset = value; } } - private ElementFlags flags; + private SCElement flags; /// <summary> /// /// </summary> - public ElementFlags Flags + public SCElement Flags { get { return flags; } set { flags = value; } @@ -370,38 +370,38 @@ /// <summary> /// /// </summary> - /// <param name="buf"></param> + /// <param name="buffer"></param> /// <param name="position"></param> /// <param name="streamLength"></param> [CLSCompliant(false)] - public BinElement(byte[] buf, int position, uint streamLength) + public BinElement(byte[] buffer, int position, uint streamLength) { - if (buf == null) + if (buffer == null) { - throw new ArgumentException("buf"); + throw new ArgumentNullException("buf"); } - x1 = Utilities.ReadWord(buf, position + 4); - y1 = Utilities.ReadWord(buf, position + 6); - x2 = Utilities.ReadWord(buf, position + 8); - y2 = Utilities.ReadWord(buf, position + 10); - width = Utilities.ReadWord(buf, position + 12); - height = Utilities.ReadWord(buf, position + 14); - textOffset = Utilities.ReadDWord(buf, position + 20); + x1 = Utilities.ReadWord(buffer, position + 4); + y1 = Utilities.ReadWord(buffer, position + 6); + x2 = Utilities.ReadWord(buffer, position + 8); + y2 = Utilities.ReadWord(buffer, position + 10); + width = Utilities.ReadWord(buffer, position + 12); + height = Utilities.ReadWord(buffer, position + 14); + textOffset = Utilities.ReadDWord(buffer, position + 20); - flags = (ElementFlags)Utilities.ReadDWord(buf, position + 24); - type = (ElementType)buf[position + 34]; + flags = (SCElement)Utilities.ReadDWord(buffer, position + 24); + type = (ElementType)buffer[position + 34]; if (textOffset < streamLength) { uint textLength = 0; - while (buf[textOffset + textLength] != 0) + while (buffer[textOffset + textLength] != 0) { textLength++; } - text = Encoding.ASCII.GetString(buf, (int)textOffset, (int)textLength); + text = Encoding.ASCII.GetString(buffer, (int)textOffset, (int)textLength); - if ((flags & ElementFlags.HasHotkey) == ElementFlags.HasHotkey) + if ((flags & SCElement.HasHotkey) == SCElement.HasHotkey) { hotkey = Encoding.ASCII.GetBytes(new char[] { text[0] })[0]; text = text.Substring(1); @@ -419,7 +419,7 @@ public void DumpFlags() { Console.Write("Flags: "); - foreach (ElementFlags f in Enum.GetValues(typeof(ElementFlags))) + foreach (SCElement f in Enum.GetValues(typeof(SCElement))) { if ((flags & f) == f) { Modified: trunk/scsharp/src/SCSharpLib/MpqLib/Chk.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/Chk.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/Chk.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -30,6 +30,7 @@ using System.IO; using System.Text; using System.Collections.Generic; +using System.Collections.ObjectModel; using SCSharp.UI; @@ -134,24 +135,24 @@ { this.stream = stream; - long stream_length = stream.Length; - byte[] section_name_buf = new byte[4]; - string section_name; + //long stream_length = stream.Length; + byte[] sectionNameBuf = new byte[4]; + string sectionName; sections = new Dictionary<string, SectionData>(); while (true) { - stream.Read(section_name_buf, 0, 4); + stream.Read(sectionNameBuf, 0, 4); SectionData sec_data = new SectionData(); sec_data.DataLength = Utilities.ReadDWord(stream); sec_data.DataPosition = stream.Position; - section_name = Encoding.ASCII.GetString(section_name_buf, 0, 4); + sectionName = Encoding.ASCII.GetString(sectionNameBuf, 0, 4); - sections.Add(section_name, sec_data); + sections.Add(sectionName, sec_data); if (stream.Position + sec_data.DataLength >= stream.Length) { @@ -211,20 +212,20 @@ stream.Read(sec.Buffer, 0, (int)sec.DataLength); } - byte[] section_data = sec.Buffer; + byte[] sectionData = sec.Buffer; if (sectionName == "TYPE") { - scenarioType = Utilities.ReadWord(section_data, 0); + scenarioType = Utilities.ReadWord(sectionData, 0); } else if (sectionName == "ERA ") { - tileSet = (Tileset)Utilities.ReadWord(section_data, 0); + tileSet = (Tileset)Utilities.ReadWord(sectionData, 0); } else if (sectionName == "DIM ") { - width = Utilities.ReadWord(section_data, 0); - height = Utilities.ReadWord(section_data, 2); + width = Utilities.ReadWord(sectionData, 0); + height = Utilities.ReadWord(sectionData, 2); } else if (sectionName == "MTXM") { @@ -234,7 +235,7 @@ { for (x = 0; x < width; x++) { - mapTiles[x, y] = Utilities.ReadWord(section_data, (y * width + x) * 2); + mapTiles[x, y] = Utilities.ReadWord(sectionData, (y * width + x) * 2); } } } @@ -248,14 +249,14 @@ { for (x = 0; x < width; x++) { - mapMask[x, y] = section_data[i++]; + mapMask[x, y] = sectionData[i++]; } } } else if (sectionName == "SPRP") { - int nameStringIndex = Utilities.ReadWord(section_data, 0); - int descriptionStringIndex = Utilities.ReadWord(section_data, 2); + int nameStringIndex = Utilities.ReadWord(sectionData, 0); + int descriptionStringIndex = Utilities.ReadWord(sectionData, 2); Console.WriteLine("mapName = {0}", nameStringIndex); Console.WriteLine("mapDescription = {0}", descriptionStringIndex); @@ -264,7 +265,7 @@ } else if (sectionName == "STR ") { - ReadStrings(section_data); + ReadStrings(sectionData); } else if (sectionName == "OWNR") { @@ -278,11 +279,11 @@ 06 - Human 07 - Neutral */ - if (section_data[i] == 0x05) + if (sectionData[i] == 0x05) { numComputerSlots++; } - else if (section_data[i] == 0x06) + else if (sectionData[i] == 0x06) { numHumanSlots++; } @@ -303,7 +304,7 @@ numPlayers = 0; for (int i = 0; i < 12; i++) { - if (section_data[i] == 0x05) /* user select */ + if (sectionData[i] == 0x05) /* user select */ { numPlayers++; } @@ -311,21 +312,21 @@ } else if (sectionName == "UNIT") { - ReadUnits(section_data); + ReadUnits(sectionData); } else if (sectionName == "MBRF") { briefingData = new TriggerData(); - briefingData.Parse(section_data, true); + briefingData.Parse(sectionData); } //else //Console.WriteLine ("Unhandled Chk section type {0}, length {1}", section_name, section_data.Length); } - List<UnitInfo> units; + Collection<UnitInfo> units; void ReadUnits(byte[] data) { - units = new List<UnitInfo>(); + units = new Collection<UnitInfo>(); MemoryStream stream = new MemoryStream(data); Console.WriteLine("unit section data = {0} bytes long", data.Length); @@ -361,8 +362,8 @@ UnitInfo info = new UnitInfo(); info.UnitId = type; - info.X = x; - info.Y = y; + info.PositionX = x; + info.PositionY = y; info.Player = player; units.Add(info); @@ -566,7 +567,7 @@ /// <summary> /// /// </summary> - public List<UnitInfo> Units + public Collection<UnitInfo> Units { get { Modified: trunk/scsharp/src/SCSharpLib/MpqLib/FlingyDat.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/FlingyDat.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/FlingyDat.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -64,6 +64,11 @@ /// <param name="stream"></param> public void ReadFromStream(Stream stream) { + if (stream == null) + { + throw new ArgumentNullException("stream"); + } + buf = new byte[(int)stream.Length]; stream.Read(buf, 0, buf.Length); Modified: trunk/scsharp/src/SCSharpLib/MpqLib/Fnt.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/Fnt.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/Fnt.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -38,14 +38,14 @@ /// <summary> /// /// </summary> - public class Fnt : IMpqResource + public class SCFont : IMpqResource { Stream stream; /// <summary> /// /// </summary> - public Fnt() + public SCFont() { } @@ -93,14 +93,14 @@ } } - Glyph GetGlyph(int c) + Glyph GetGlyph(int glyphID) { - if (glyphs.ContainsKey(c)) + if (glyphs.ContainsKey(glyphID)) { - return glyphs[c]; + return glyphs[glyphID]; } - stream.Position = offsets[(uint)c]; + stream.Position = offsets[(uint)glyphID]; byte letterWidth = Utilities.ReadByte(stream); byte letterHeight = Utilities.ReadByte(stream); @@ -146,14 +146,14 @@ } } done: - glyphs.Add(c, + glyphs.Add(glyphID, new Glyph(letterWidth, letterHeight, letterXOffset, letterYOffset, bitmap)); - return glyphs[c]; + return glyphs[glyphID]; } /// <summary> @@ -228,10 +228,10 @@ /// <summary> /// /// </summary> - /// <param name="c"></param> - public void DumpGlyph(int c) + /// <param name="glyphID"></param> + public void DumpGlyph(int glyphID) { - Glyph g = GetGlyph(c); + Glyph g = GetGlyph(glyphID); byte[,] bitmap = g.Bitmap; for (int y = g.Height - 1; y >= 0; y--) { Modified: trunk/scsharp/src/SCSharpLib/MpqLib/Got.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/Got.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/Got.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -93,7 +93,7 @@ { if (stream == null) { - throw new ArgumentException("stream"); + throw new ArgumentNullException("stream"); } contents = new byte[stream.Length]; stream.Read(contents, 0, (int)stream.Length); Modified: trunk/scsharp/src/SCSharpLib/MpqLib/ImagesDat.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/ImagesDat.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/ImagesDat.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -63,7 +63,7 @@ { if (stream == null) { - throw new ArgumentException("stream"); + throw new ArgumentNullException("stream"); } buf = new byte[NUM_RECORDS * NUM_FIELDS * 4]; stream.Read(buf, 0, buf.Length); Modified: trunk/scsharp/src/SCSharpLib/MpqLib/LinkedNode.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/LinkedNode.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/LinkedNode.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -86,7 +86,7 @@ /// /// </summary> public LinkedNode Child1 - { get { return child0.prev; } } + { get { return child0.previous; } } private LinkedNode next; @@ -99,25 +99,25 @@ set { next = value; } } - private LinkedNode prev; + private LinkedNode previous; /// <summary> /// /// </summary> - public LinkedNode Prev + public LinkedNode Previous { - get { return prev; } - set { prev = value; } + get { return previous; } + set { previous = value; } } /// <summary> /// /// </summary> - /// <param name="decompVal"></param> + /// <param name="decompressedValue"></param> /// <param name="weight"></param> - public LinkedNode(int decompVal, int weight) + public LinkedNode(int decompressedValue, int weight) { - decompressedValue = decompVal; + this.decompressedValue = decompressedValue; this.weight = weight; } @@ -132,7 +132,7 @@ { if (other == null) { - throw new ArgumentException("other"); + throw new ArgumentNullException("other"); } // 'Next' should have a lower weight // we should return the lower weight @@ -141,25 +141,25 @@ // insert before if (next != null) { - next.prev = other; + next.previous = other; other.next = next; } next = other; - other.prev = this; + other.previous = this; return other; } else { - if (prev == null) + if (previous == null) { // Insert after - other.prev = null; - prev = other; + other.previous = null; + previous = other; other.next = this; } else { - prev.Insert(other); + previous.Insert(other); } } return this; Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MapDataDat.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MapDataDat.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MapDataDat.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -57,7 +57,7 @@ { if (stream == null) { - throw new ArgumentException("stream"); + throw new ArgumentNullException("stream"); } buf = new byte[stream.Length]; stream.Read(buf, 0, buf.Length); Modified: trunk/scsharp/src/SCSharpLib/MpqLib/Mpq.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/Mpq.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/Mpq.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -66,32 +66,33 @@ { if (path == null) { - throw new ArgumentException("path"); + throw new ArgumentNullException("path"); } - string ext = Path.GetExtension(path); - if (ext.ToLower() == ".tbl") + string pathLower = path.ToLower(); + string ext = Path.GetExtension(path).ToLower(); + if (ext == ".tbl") { return typeof(Tbl); } - else if (ext.ToLower() == ".fnt") + else if (ext == ".fnt") { - return typeof(Fnt); + return typeof(SCFont); } - else if (ext.ToLower() == ".got") + else if (ext == ".got") { return typeof(Got); } - else if (ext.ToLower() == ".grp") + else if (ext == ".grp") { return typeof(Grp); } - else if (ext.ToLower() == ".bin") + else if (ext == ".bin") { - if (path.ToLower().EndsWith("aiscript.bin")) /* must come before iscript.bin */ + if (pathLower.EndsWith("aiscript.bin")) /* must come before iscript.bin */ { return null; } - else if (path.ToLower().EndsWith("iscript.bin")) + else if (pathLower.EndsWith("iscript.bin")) { return typeof(ScriptBin); } @@ -100,38 +101,38 @@ return typeof(Bin); } } - else if (ext.ToLower() == ".chk") + else if (ext == ".chk") { return typeof(Chk); } - else if (ext.ToLower() == ".dat") + else if (ext == ".dat") { - if (path.ToLower().EndsWith("flingy.dat")) + if (pathLower.EndsWith("flingy.dat")) { return typeof(FlingyDat); } - else if (path.ToLower().EndsWith("images.dat")) + else if (pathLower.EndsWith("images.dat")) { return typeof(ImagesDat); } - else if (path.ToLower().EndsWith("sfxdata.dat")) + else if (pathLower.EndsWith("sfxdata.dat")) { return typeof(SfxDataDat); } - else if (path.ToLower().EndsWith("sprites.dat")) + else if (pathLower.EndsWith("sprites.dat")) { return typeof(SpritesDat); } - else if (path.ToLower().EndsWith("units.dat")) + else if (pathLower.EndsWith("units.dat")) { return typeof(UnitsDat); } - else if (path.ToLower().EndsWith("mapdata.dat")) + else if (pathLower.EndsWith("mapdata.dat")) { return typeof(MapDataDat); } } - else if (ext.ToLower() == ".spk") + else if (ext == ".spk") { return typeof(Spk); } Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqBlock.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MpqBlock.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqBlock.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -53,7 +53,7 @@ public uint FileSize; public MpqFileFlags Flags; - public static readonly uint Size = 16; + public const uint Size = 16; public MpqBlock(BinaryReader br, uint HeaderOffset) { Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqHash.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MpqHash.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqHash.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -40,7 +40,7 @@ public uint Locale; public uint BlockIndex; - public static readonly uint Size = 16; + public const uint Size = 16; public MpqHash(BinaryReader br) { Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqHeader.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MpqHeader.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqHeader.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -45,8 +45,8 @@ public uint HashTableSize; public uint BlockTableSize; - public static readonly uint MpqId = 0x1a51504d; - public static readonly uint Size = 32; + public const uint MpqId = 0x1a51504d; + public const uint Size = 32; public MpqHeader(BinaryReader br) { Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqHuffman.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MpqHuffman.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqHuffman.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -38,12 +38,8 @@ /// <summary> /// A decompressor for MPQ's huffman compression /// </summary> - public class MpqHuffman + public static class MpqHuffman { - private MpqHuffman() - { - } - private static readonly byte[][] sPrime = { // Compression type 0 @@ -181,7 +177,7 @@ { if (data == null) { - throw new ArgumentException("data"); + throw new ArgumentNullException("data"); } int comptype = data.ReadByte(); @@ -255,12 +251,12 @@ private static LinkedNode BuildTree(LinkedNode tail) { LinkedNode current = tail; - LinkedNode head = null; + //LinkedNode head = null; while (current != null) { LinkedNode child0 = current; - LinkedNode child1 = current.Prev; + LinkedNode child1 = current.Previous; if (child1 == null) { break; @@ -272,8 +268,8 @@ child1.Parent = parent; current.Insert(parent); - head = current; - current = current.Prev.Prev; + //head = current; + current = current.Previous.Previous; } return current; } @@ -281,7 +277,7 @@ private static LinkedNode InsertNode(LinkedNode tail, int decomp) { LinkedNode parent = tail; - LinkedNode result = tail.Prev; // This will be the new tail after the tree is updated + LinkedNode result = tail.Previous; // This will be the new tail after the tree is updated LinkedNode temp = new LinkedNode(parent.DecompressedValue, parent.Weight); temp.Parent = parent; @@ -292,8 +288,8 @@ parent.Child0 = newnode; tail.Next = temp; - temp.Prev = tail; - newnode.Prev = temp; + temp.Previous = tail; + newnode.Previous = temp; temp.Next = newnode; AdjustTree(newnode); @@ -318,7 +314,7 @@ insertpoint = current; while (true) { - prev = insertpoint.Prev; + prev = insertpoint.Previous; if (prev == null) break; if (prev.Weight >= current.Weight) break; insertpoint = prev; @@ -334,30 +330,30 @@ // The following code basicly swaps insertpoint with current // remove insert point - if (insertpoint.Prev != null) + if (insertpoint.Previous != null) { - insertpoint.Prev.Next = insertpoint.Next; + insertpoint.Previous.Next = insertpoint.Next; } - insertpoint.Next.Prev = insertpoint.Prev; + insertpoint.Next.Previous = insertpoint.Previous; // Insert insertpoint after current insertpoint.Next = current.Next; - insertpoint.Prev = current; + insertpoint.Previous = current; if (current.Next != null) { - current.Next.Prev = insertpoint; + current.Next.Previous = insertpoint; } current.Next = insertpoint; // remove current - current.Prev.Next = current.Next; - current.Next.Prev = current.Prev; + current.Previous.Next = current.Next; + current.Next.Previous = current.Previous; // insert current after prev LinkedNode temp = prev.Next; current.Next = temp; - current.Prev = prev; - temp.Prev = current; + current.Previous = prev; + temp.Previous = current; prev.Next = current; // Set up parent/child links Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -95,7 +95,7 @@ mSeed1 = MpqArchive.DetectFileSeed(mBlockPositions, blockpossize); if (mSeed1 == 0) { - throw new Exception("Unable to determine encyption seed"); + throw new Exception("Unable to determine encryption seed"); } } MpqArchive.DecryptBlock(mBlockPositions, mSeed1); @@ -103,20 +103,20 @@ } } - private byte[] LoadBlock(int BlockIndex, int ExpectedLength) + private byte[] LoadBlock(int blockIndex, int expectedLength) { uint offset; int toread; if (mBlock.IsCompressed) { - offset = mBlockPositions[BlockIndex]; - toread = (int)(mBlockPositions[BlockIndex + 1] - offset); + offset = mBlockPositions[blockIndex]; + toread = (int)(mBlockPositions[blockIndex + 1] - offset); } else { - offset = (uint)(BlockIndex * mBlockSize); - toread = ExpectedLength; + offset = (uint)(blockIndex * mBlockSize); + toread = expectedLength; } offset += mBlock.FilePos; @@ -133,18 +133,18 @@ { throw new Exception("Unable to determine encryption key"); } - MpqArchive.DecryptBlock(data, (uint)(mSeed1 + BlockIndex)); + MpqArchive.DecryptBlock(data, (uint)(mSeed1 + blockIndex)); } - if (mBlock.IsCompressed && data.Length != ExpectedLength) + if (mBlock.IsCompressed && data.Length != expectedLength) { if ((mBlock.Flags & MpqFileFlags.CompressedMulti) != 0) { - data = DecompressMulti(data, ExpectedLength); + data = DecompressMulti(data, expectedLength); } else { - data = PKDecompress(new MemoryStream(data), ExpectedLength); + data = PKDecompress(new MemoryStream(data), expectedLength); } } @@ -202,26 +202,26 @@ /// <summary> /// /// </summary> - /// <param name="Offset"></param> - /// <param name="Origin"></param> + /// <param name="offset"></param> + /// <param name="origin"></param> /// <returns></returns> - public override long Seek(long Offset, SeekOrigin Origin) + public override long Seek(long offset, SeekOrigin origin) { long target; - switch (Origin) + switch (origin) { case SeekOrigin.Begin: - target = Offset; + target = offset; break; case SeekOrigin.Current: - target = Position + Offset; + target = Position + offset; break; case SeekOrigin.End: - target = Length + Offset; + target = Length + offset; break; default: - throw new ArgumentException("Origin", "Invalid SeekOrigin"); + throw new ArgumentNullException("Origin", "Invalid SeekOrigin"); } if (target < 0) @@ -241,8 +241,8 @@ /// <summary> /// /// </summary> - /// <param name="Value"></param> - public override void SetLength(long Value) + /// <param name="value"></param> + public override void SetLength(long value) { throw new NotSupportedException("SetLength is not supported"); } @@ -250,35 +250,35 @@ /// <summary> /// /// </summary> - /// <param name="Buffer"></param> - /// <param name="Offset"></param> - /// <param name="Count"></param> + /// <param name="buffer"></param> + /// <param name="offset"></param> + /// <param name="count"></param> /// <returns></returns> - public override int Read(byte[] Buffer, int Offset, int Count) + public override int Read(byte[] buffer, int offset, int count) { - int toread = Count; + int toread = count; int readtotal = 0; while (toread > 0) { - int read = ReadInternal(Buffer, Offset, toread); + int read = ReadInternal(buffer, offset, toread); if (read == 0) break; readtotal += read; - Offset += read; + offset += read; toread -= read; } return readtotal; } - private int ReadInternal(byte[] Buffer, int Offset, int Count) + private int ReadInternal(byte[] buffer, int offset, int count) { BufferData(); int localposition = (int)(mPosition % mBlockSize); - int bytestocopy = Math.Min(mCurrentData.Length - localposition, Count); + int bytestocopy = Math.Min(mCurrentData.Length - localposition, count); if (bytestocopy <= 0) return 0; - Array.Copy(mCurrentData, localposition, Buffer, Offset, bytestocopy); + Array.Copy(mCurrentData, localposition, buffer, offset, bytestocopy); mPosition += bytestocopy; return bytestocopy; @@ -313,10 +313,10 @@ /// <summary> /// /// </summary> - /// <param name="Buffer"></param> - /// <param name="Offset"></param> - /// <param name="Count"></param> - public override void Write(byte[] Buffer, int Offset, int Count) + /// <param name="buffer"></param> + /// <param name="offset"></param> + /// <param name="count"></param> + public override void Write(byte[] buffer, int offset, int count) { throw new NotSupportedException("Writing is not supported"); } @@ -330,16 +330,16 @@ * 80 = IMA ADPCM Stereo * 40 = IMA ADPCM Mono */ - private static byte[] DecompressMulti(byte[] Input, int OutputLength) + private static byte[] DecompressMulti(byte[] input, int outputLength) { - Stream sinput = new MemoryStream(Input); + Stream sinput = new MemoryStream(input); byte comptype = (byte)sinput.ReadByte(); // BZip2 if ((comptype & 0x10) != 0) { - byte[] result = BZip2Decompress(sinput, OutputLength); + byte[] result = BZip2Decompress(sinput); comptype &= 0xEF; if (comptype == 0) { @@ -351,7 +351,7 @@ // PKLib if ((comptype & 8) != 0) { - byte[] result = PKDecompress(sinput, OutputLength); + byte[] result = PKDecompress(sinput, outputLength); comptype &= 0xF7; if (comptype == 0) { @@ -363,7 +363,7 @@ // ZLib if ((comptype & 2) != 0) { - byte[] result = ZlibDecompress(sinput, OutputLength); + byte[] result = ZlibDecompress(sinput, outputLength); comptype &= 0xFD; if (comptype == 0) { @@ -407,28 +407,30 @@ throw new Exception(String.Format("Unhandled compression flags: 0x{0:X}", comptype)); } - private static byte[] BZip2Decompress(Stream Data, int ExpectedLength) + //private static byte[] BZip2Decompress(Stream data, int expectedLength) + + private static byte[] BZip2Decompress(Stream data) { MemoryStream output = new MemoryStream(); - BZip2.Decompress(Data, output); + BZip2.Decompress(data, output); return output.ToArray(); } - private static byte[] PKDecompress(Stream Data, int ExpectedLength) + private static byte[] PKDecompress(Stream data, int expectedLength) { - PKLibDecompress pk = new PKLibDecompress(Data); - return pk.Explode(ExpectedLength); + PKLibDecompress pk = new PKLibDecompress(data); + return pk.Explode(expectedLength); } - private static byte[] ZlibDecompress(Stream Data, int ExpectedLength) + private static byte[] ZlibDecompress(Stream data, int expectedLength) { // This assumes that Zlib won't be used in combination with another compression type - byte[] Output = new byte[ExpectedLength]; - Stream s = new InflaterInputStream(Data); + byte[] Output = new byte[expectedLength]; + Stream s = new InflaterInputStream(data); int Offset = 0; while (true) { - int size = s.Read(Output, Offset, ExpectedLength); + int size = s.Read(Output, Offset, expectedLength); if (size == 0) { break; Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqWavCompression.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MpqWavCompression.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqWavCompression.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -37,11 +37,8 @@ /// <summary> /// An IMA ADPCM decompress for Mpq files /// </summary> - public class MpqWavCompression + public static class MpqWavCompression { - private MpqWavCompression() - { } - private static readonly int[] sLookup = { 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, @@ -74,6 +71,10 @@ /// <returns></returns> public static byte[] Decompress(Stream data, int channelCount) { + if (data == null) + { + throw new ArgumentNullException("data"); + } int[] Array1 = new int[] { 0x2c, 0x2c }; int[] Array2 = new int[channelCount]; Modified: trunk/scsharp/src/SCSharpLib/MpqLib/ParallaxLayer.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/ParallaxLayer.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/ParallaxLayer.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -45,10 +45,10 @@ /// <summary> /// /// </summary> - /// <param name="num_objects"></param> - public ParallaxLayer(int num_objects) + /// <param name="numberOfObjects"></param> + public ParallaxLayer(int numberOfObjects) { - objects = new ParallaxObject[num_objects]; + objects = new ParallaxObject[numberOfObjects]; } /// <summary> Modified: trunk/scsharp/src/SCSharpLib/MpqLib/ParallaxObject.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/ParallaxObject.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/ParallaxObject.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -38,36 +38,47 @@ /// </summary> public class ParallaxObject { - private readonly int x; + private readonly int positionX; /// <summary> /// /// </summary> - public int X + public int PositionX { - get { return x; } + get { return positionX; } } - private readonly int y; + private readonly int positionY; /// <summary> /// /// </summary> - public int Y + public int PositionY { - get { return y; } + get { return positionY; } } + private readonly int offset; + /// <summary> /// /// </summary> - /// <param name="x"></param> - /// <param name="y"></param> + public int Offset + { + get { return offset; } + } + + /// <summary> + /// + /// </summary> + /// <param name="positionX"></param> + /// <param name="positionY"></param> /// <param name="offset"></param> - public ParallaxObject(int x, int y, int offset) + public ParallaxObject(int positionX, int positionY, int offset) { - this.x = x; - this.y = y; + this.positionX = positionX; + this.positionY = positionY; + this.offset = offset; } } } Modified: trunk/scsharp/src/SCSharpLib/MpqLib/SfxDataDat.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/SfxDataDat.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/SfxDataDat.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -62,7 +62,7 @@ { if (stream == null) { - throw new ArgumentException("stream"); + throw new ArgumentNullException("stream"); } buf = new byte[NUM_RECORDS * NUM_FIELDS * 4]; stream.Read(buf, 0, buf.Length); Modified: trunk/scsharp/src/SCSharpLib/MpqLib/SpritesDat.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/SpritesDat.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/SpritesDat.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -84,7 +84,7 @@ { if (stream == null) { - throw new ArgumentException("stream"); + throw new ArgumentNullException("stream"); } int size = 0; for (int i = 0; i < NUM_FIELDS; i++) Modified: trunk/scsharp/src/SCSharpLib/MpqLib/Trigger.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/Trigger.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/Trigger.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -52,7 +52,7 @@ { if (data == null) { - throw new ArgumentException("data"); + throw new ArgumentNullException("data"); } int i; for (i = 0; i < conditions.Length; i++) Modified: trunk/scsharp/src/SCSharpLib/MpqLib/TriggerData.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/TriggerData.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/TriggerData.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -30,9 +30,8 @@ using System.IO; using System.Text; using System.Collections.Generic; +using System.Collections.ObjectModel; - - namespace SCSharp.MpqLib { /// <summary> @@ -45,34 +44,33 @@ /// </summary> public TriggerData() { - triggers = new List<Trigger>(); + triggers = new Collection<Trigger>(); } + //public void Parse(byte[] data, bool briefing) + /// <summary> /// /// </summary> /// <param name="data"></param> - /// <param name="briefing"></param> - public void Parse(byte[] data, bool briefing) + public void Parse(byte[] data) { int offset = 0; while (offset < data.Length) { Trigger t = new Trigger(); - t.Parse(data, ref offset); - triggers.Add(t); } } - List<Trigger> triggers; + Collection<Trigger> triggers; /// <summary> /// /// </summary> - public List<Trigger> Triggers + public Collection<Trigger> Triggers { get { return triggers; } } Modified: trunk/scsharp/src/SCSharpLib/MpqLib/UnitInfo.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/UnitInfo.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/UnitInfo.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -50,25 +50,25 @@ get { return unitId; } set { unitId = value; } } - private int x; + private int positionX; /// <summary> /// /// </summary> - public int X + public int PositionX { - get { return x; } - set { x = value; } + get { return positionX; } + set { positionX = value; } } - private int y; + private int positionY; /// <summary> /// /// </summary> - public int Y + public int PositionY { - get { return y; } - set { y = value; } + get { return positionY; } + set { positionY = value; } } private int player; Modified: trunk/scsharp/src/SCSharpLib/MpqLib/UnitsDat.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/UnitsDat.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/MpqLib/UnitsDat.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -90,7 +90,7 @@ { if (stream == null) { - throw new ArgumentException("stream"); + throw new ArgumentNullException("stream"); } buf = new byte[(int)stream.Length]; @@ -178,7 +178,7 @@ /// <param name="unitId"></param> /// <returns></returns> [CLSCompliant(false)] - public uint GetHitpoints(int unitId) + public uint GetHitPoints(int unitId) { return Utilities.ReadWord(buf, hitpoint_offset + unitId * 2); } Modified: trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -2,6 +2,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using System.Diagnostics.CodeAnalysis; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -33,3 +34,9 @@ // [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "SCSharp.UI.Credits.txt", MessageId = "Toshok")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "SCSharp.UI.Credits.txt", MessageId = "Ladislav")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "SCSharp.UI.Credits.txt", MessageId = "Zezula")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "SCSharp.UI.Credits.txt", MessageId = "Starcraft")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "SCSharp.UI.Credits.txt", MessageId = "Modding")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "SCSharp.UI.Credits.txt", MessageId = "Olbrantz")] Modified: trunk/scsharp/src/SCSharpLib/UI/BriefingRunner.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/BriefingRunner.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/UI/BriefingRunner.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -63,6 +63,10 @@ public BriefingRunner(ReadyRoomScreen screen, Chk scenario, string scenarioPrefix) { + if (scenario == null) + { + throw new ArgumentNullException("scenario"); + } this.screen = screen; this.scenario = scenario; this.prefix = scenarioPrefix; Modified: trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -89,6 +89,10 @@ /// <param name="args"></param> public override void MouseButtonUp(MouseButtonEventArgs args) { + if (args == null) + { + throw new ArgumentNullException("args"); + } if (PointInside(args.X, args.Y)) { OnActivate(); @@ -100,7 +104,7 @@ /// </summary> public override void MouseEnter() { - if (Sensitive && (Flags & ElementFlags.RespondToMouse) == ElementFlags.RespondToMouse) + if (Sensitive && (Flags & SCElement.RespondToMouse) == SCElement.RespondToMouse) { /* highlight the text */ GuiUtil.PlaySound(Mpq, Builtins.MouseoverWav); Modified: trunk/scsharp/src/SCSharpLib/UI/Cinematic.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/Cinematic.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/UI/Cinematic.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -63,6 +63,10 @@ /// <param name="painter"></param> public override void AddToPainter(Painter painter) { + if (painter == null) + { + throw new ArgumentNullException("painter"); + } /* XXX this should be abstracted into Game with the other mouse settings */ Mouse.ShowCursor = false; @@ -75,6 +79,10 @@ /// <param name="painter"></param> public override void RemoveFromPainter(Painter painter) { + if (painter == null) + { + throw new ArgumentNullException("painter"); + } painter.Remove(Layer.Background, VideoPainter); } @@ -113,6 +121,10 @@ /// <param name="args"></param> public override void KeyboardDown(KeyboardEventArgs args) { + if (args == null) + { + throw new ArgumentNullException("args"); + } if (args.Key == Key.Escape || args.Key == Key.Return || args.Key == Key.Space) Modified: trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -42,7 +42,7 @@ /// <summary> /// /// </summary> - public class ComboBoxElement : UIElement + public class ComboBoxElement : UIElement, IDisposable { List<string> items; int cursor = -1; @@ -165,6 +165,10 @@ /// <param name="args"></param> public override void PointerMotion(MouseMotionEventArgs args) { + if (args == null) + { + throw new ArgumentNullException("args"); + } /* if the dropdown is visible, see if we're inside it */ if (!dropdownVisible) { @@ -258,6 +262,18 @@ /// /// </summary> public event ComboBoxSelectionChangedEventHandler SelectionChanged; + + #region IDisposable Members + + /// <summary> + /// + /// </summary> + public void Dispose() + { + throw new Exception("The method or operation is not implemented."); + } + + #endregion } /// <summary> Modified: trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -60,10 +60,10 @@ #if INCLUDE_ALL_NETWORK_OPTIONS const int num_choices = 4; #else - const int num_choices = 1; + const int numChoices = 1; #endif - const int title_startidx = 95; - const int description_startidx = 99; + const int titleStartIdx = 95; + const int descriptionStartIdx = 99; string[] titles; string[] descriptions; @@ -82,8 +82,8 @@ Console.WriteLine("{0}: {1} '{2}'", i, Elements[i].Type, Elements[i].Text); } - titles = new string[num_choices]; - descriptions = new string[num_choices]; + titles = new string[numChoices]; + descriptions = new string[numChoices]; #if INCLUDE_ALL_NETWORK_OPTIONS for (int i = 0; i < num_choices; i ++) { @@ -91,8 +91,8 @@ descriptions[i] = GlobalResources.Instance.GluAllTbl[ description_startidx + i ]; } #else - titles[0] = GlobalResources.Instance.GluAllTbl[title_startidx + 3]; - descriptions[0] = GlobalResources.Instance.GluAllTbl[description_startidx + 3]; + titles[0] = GlobalResources.Instance.GluAllTbl[titleStartIdx + 3]; + descriptions[0] = GlobalResources.Instance.GluAllTbl[descriptionStartIdx + 3]; #endif listbox = (ListBoxElement)Elements[LISTBOX_ELEMENT_INDEX]; @@ -132,6 +132,10 @@ /// <param name="args"></param> public override void KeyboardDown(KeyboardEventArgs args) { + if (args == null) + { + throw new ArgumentNullException("args"); + } if (args.Key == Key.DownArrow || args.Key == Key.UpArrow) { Modified: trunk/scsharp/src/SCSharpLib/UI/CursorAnimator.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/CursorAnimator.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/UI/CursorAnimator.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -63,6 +63,11 @@ /// <param name="palette"></param> public CursorAnimator(Grp grp, byte[] palette) { + if (grp == null) + { + throw new ArgumentNullException("grp"); + } + this.grp = grp; this.x = 100; this.y = 100; @@ -137,6 +142,11 @@ /// <param name="now"></param> public void Paint(Surface surf, DateTime now) { + if (surf == null) + { + throw new ArgumentNullException("surf"); + } + deltaToChange -= now - last; if (deltaToChange < TimeSpan.Zero) { @@ -145,8 +155,8 @@ } last = now; - int draw_x = (int)(x - hotX); - int draw_y = (int)(y - hotY); + int drawX = (int)(x - hotX); + int drawY = (int)(y - hotY); if (currentFrame == grp.FrameCount) { @@ -161,7 +171,7 @@ true); } - surf.Blit(surfaces[currentFrame], new Point(draw_x, draw_y)); + surf.Blit(surfaces[currentFrame], new Point(drawX, drawY)); } } } Modified: trunk/scsharp/src/SCSharpLib/UI/FFmpeg.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/FFmpeg.cs 2007-05-22 16:28:33 UTC (rev 1387) +++ trunk/scsharp/src/SCSharpLib/UI/FFmpeg.cs 2007-05-22 22:14:12 UTC (rev 1388) @@ -41,41 +41,41 @@ /// </summary> public class FFmpeg { - static bool initSucceeded; + //static bool initSucceeded; static FFmpeg() { try { - ffmpeg_init(); - initSucceeded = true; + //... [truncated message content] |
From: <je...@us...> - 2007-05-23 16:44:58
|
Revision: 1389 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1389&view=rev Author: jendave Date: 2007-05-23 09:44:53 -0700 (Wed, 23 May 2007) Log Message: ----------- more fxcop fixes Modified Paths: -------------- trunk/scsharp/src/SCSharpLib/MpqLib/Chk.cs trunk/scsharp/src/SCSharpLib/MpqLib/Grp.cs trunk/scsharp/src/SCSharpLib/MpqLib/MpqArchive.cs trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs trunk/scsharp/src/SCSharpLib/MpqLib/PKLibDecompress.cs trunk/scsharp/src/SCSharpLib/MpqLib/Smk.cs trunk/scsharp/src/SCSharpLib/UI/Cinematic.cs trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs trunk/scsharp/src/SCSharpLib/UI/EntryDialog.cs trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs trunk/scsharp/src/SCSharpLib/UI/Game.cs trunk/scsharp/src/SCSharpLib/UI/GameMenuDialog.cs trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs trunk/scsharp/src/SCSharpLib/UI/HelpDialog.cs trunk/scsharp/src/SCSharpLib/UI/KeystrokeDialog.cs trunk/scsharp/src/SCSharpLib/UI/ListBoxElement.cs trunk/scsharp/src/SCSharpLib/UI/LoadSavedScreen.cs trunk/scsharp/src/SCSharpLib/UI/LoginScreen.cs trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs trunk/scsharp/src/SCSharpLib/UI/ObjectivesDialog.cs trunk/scsharp/src/SCSharpLib/UI/OkCancelDialog.cs trunk/scsharp/src/SCSharpLib/UI/OkDialog.cs trunk/scsharp/src/SCSharpLib/UI/OptionsDialog.cs trunk/scsharp/src/SCSharpLib/UI/Painter.cs trunk/scsharp/src/SCSharpLib/UI/Pcx.cs trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs trunk/scsharp/src/SCSharpLib/UI/RaceSelectionScreen.cs trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs trunk/scsharp/src/SCSharpLib/UI/RestartConfirmationDialog.cs trunk/scsharp/src/SCSharpLib/UI/SmackerPlayer.cs trunk/scsharp/src/SCSharpLib/UI/SoundDialog.cs trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs trunk/scsharp/src/SCSharpLib/UI/Sprite.cs trunk/scsharp/src/SCSharpLib/UI/UIDialog.cs trunk/scsharp/src/SCSharpLib/UI/UIElement.cs trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs trunk/scsharp/src/SCSharpLib/UI/Unit.cs trunk/scsharp/src/SCSharpLib/UI/VideoDialog.cs trunk/scsharp/tests/DumpChk.cs trunk/scsharp/tests/DumpIScript.cs Added Paths: ----------- trunk/scsharp/src/SCSharpLib/MpqLib/SCFont.cs trunk/scsharp/src/SCSharpLib/UI/BoxSelectionChangedEventArgs.cs trunk/scsharp/src/SCSharpLib/UI/GameModeActivateEventArgs.cs trunk/scsharp/src/SCSharpLib/UI/SCException.cs trunk/scsharp/src/SCSharpLib/UI/SCResources.cs Removed Paths: ------------- trunk/scsharp/src/SCSharpLib/MpqLib/Fnt.cs trunk/scsharp/src/SCSharpLib/UI/Resources.cs Modified: trunk/scsharp/src/SCSharpLib/MpqLib/Chk.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/Chk.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/MpqLib/Chk.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -202,7 +202,7 @@ SectionData sec = sections[sectionName]; if (sec == null) { - throw new Exception(String.Format("map file is missing section {0}, cannot load", sectionName)); + throw new SCException(String.Format("map file is missing section {0}, cannot load", sectionName)); } if (sec.Buffer == null) Deleted: trunk/scsharp/src/SCSharpLib/MpqLib/Fnt.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/Fnt.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/MpqLib/Fnt.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -1,254 +0,0 @@ -#region LICENSE -// -// Authors: -// Chris Toshok (to...@hu...) -// -// (C) 2006 The Hungry Programmers (http://www.hungry.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -#endregion LICENSE - -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SCSharp.UI; - -namespace SCSharp.MpqLib -{ - /// <summary> - /// - /// </summary> - public class SCFont : IMpqResource - { - Stream stream; - - /// <summary> - /// - /// </summary> - public SCFont() - { - } - - /// <summary> - /// - /// </summary> - /// <param name="stream"></param> - public void ReadFromStream(Stream stream) - { - this.stream = stream; - ReadFontHeader(); - ReadGlyphOffsets(); - - glyphs = new Dictionary<int, Glyph>(); - } - - void ReadFontHeader() - { - /*uint name =*/ - Utilities.ReadDWord(stream); - - lowIndex = Utilities.ReadByte(stream); - highIndex = Utilities.ReadByte(stream); - - if (lowIndex > highIndex) - { - byte tmp = lowIndex; - lowIndex = highIndex; - highIndex = tmp; - } - maxWidth = Utilities.ReadByte(stream); - maxHeight = Utilities.ReadByte(stream); - /*uint unknown =*/ - Utilities.ReadDWord(stream); - } - - Dictionary<uint, uint> offsets; - - void ReadGlyphOffsets() - { - offsets = new Dictionary<uint, uint>(); - for (uint c = lowIndex; c < highIndex; c++) - { - offsets.Add(c, Utilities.ReadDWord(stream)); - } - } - - Glyph GetGlyph(int glyphID) - { - if (glyphs.ContainsKey(glyphID)) - { - return glyphs[glyphID]; - } - - stream.Position = offsets[(uint)glyphID]; - - byte letterWidth = Utilities.ReadByte(stream); - byte letterHeight = Utilities.ReadByte(stream); - byte letterXOffset = Utilities.ReadByte(stream); - byte letterYOffset = Utilities.ReadByte(stream); - - byte[,] bitmap = new byte[letterHeight, letterWidth]; - - int x, y; - x = letterWidth - 1; - y = letterHeight - 1; - while (true) - { - byte b = Utilities.ReadByte(stream); - int count = (b & 0xF8) >> 3; - byte cmap_entry = (byte)(b & 0x07); - - for (int i = 0; i < count; i++) - { - bitmap[y, x] = 0; - x--; - if (x < 0) - { - x = letterWidth - 1; - y--; - if (y < 0) - { - goto done; - } - } - } - - bitmap[y, x] = (byte)cmap_entry; - x--; - if (x < 0) - { - x = letterWidth - 1; - y--; - if (y < 0) - { - goto done; - } - } - } - done: - glyphs.Add(glyphID, - new Glyph(letterWidth, - letterHeight, - letterXOffset, - letterYOffset, - bitmap)); - - return glyphs[glyphID]; - } - - /// <summary> - /// - /// </summary> - /// <param name="index"></param> - /// <returns></returns> - public Glyph this[int index] - { - get - { - if (index < lowIndex || index > highIndex) - { - throw new ArgumentOutOfRangeException("index", - String.Format("value of {0} out of range of {1}-{2}", index, lowIndex, highIndex)); - } - - return GetGlyph(index); - } - } - - /// <summary> - /// - /// </summary> - public int SpaceSize - { - get { return this[109 - 1].Width; /* 109 = ascii for 'm' */ } - } - - /// <summary> - /// - /// </summary> - public int LineSize - { - get { return maxHeight; } - } - - /// <summary> - /// - /// </summary> - public int MaxWidth - { - get { return maxWidth; } - } - - /// <summary> - /// - /// </summary> - public int MaxHeight - { - get { return maxHeight; } - } - - Dictionary<int, Glyph> glyphs; - byte highIndex; - byte lowIndex; - byte maxWidth; - byte maxHeight; - - /// <summary> - /// - /// </summary> - public void DumpGlyphs() - { - for (int c = lowIndex; c < highIndex; c++) - { - Console.WriteLine("Letter: {0}", c); - DumpGlyph(c); - } - } - - /// <summary> - /// - /// </summary> - /// <param name="glyphID"></param> - public void DumpGlyph(int glyphID) - { - Glyph g = GetGlyph(glyphID); - byte[,] bitmap = g.Bitmap; - for (int y = g.Height - 1; y >= 0; y--) - { - for (int x = g.Width - 1; x >= 0; x--) - { - if (bitmap[y, x] == 0) - { - Console.Write(" "); - } - else - { - Console.Write("#"); - } - } - Console.WriteLine(); - } - Console.WriteLine(); - } - } -} Modified: trunk/scsharp/src/SCSharpLib/MpqLib/Grp.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/Grp.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/MpqLib/Grp.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -103,7 +103,7 @@ if (frame > frameCount || frame < 0) { - throw new Exception(); + throw new SCException(); } if (frameCache.ContainsKey(frame)) Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqArchive.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MpqArchive.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqArchive.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -33,6 +33,8 @@ using System.Collections; using System.IO; +using SCSharp.UI; + namespace SCSharp.MpqLib { /// <summary> @@ -80,7 +82,7 @@ { if (LocateMpqHeader() == false) { - throw new Exception("Unable to find MPQ header"); + throw new SCException("Unable to find MPQ header"); } BinaryReader br = new BinaryReader(mStream); @@ -324,7 +326,7 @@ /// <returns></returns> public override Stream GetStreamForResource(string path) { - throw new Exception("The method or operation is not implemented."); + throw new SCException("The method or operation is not implemented."); } } } Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -34,6 +34,8 @@ using ICSharpCode.SharpZipLib.Zip.Compression.Streams; using ICSharpCode.SharpZipLib.BZip2; +using SCSharp.UI; + namespace SCSharp.MpqLib { /// <summary> @@ -95,7 +97,7 @@ mSeed1 = MpqArchive.DetectFileSeed(mBlockPositions, blockpossize); if (mSeed1 == 0) { - throw new Exception("Unable to determine encryption seed"); + throw new SCException("Unable to determine encryption seed"); } } MpqArchive.DecryptBlock(mBlockPositions, mSeed1); @@ -131,7 +133,7 @@ { if (mSeed1 == 0) { - throw new Exception("Unable to determine encryption key"); + throw new SCException("Unable to determine encryption key"); } MpqArchive.DecryptBlock(data, (uint)(mSeed1 + blockIndex)); } @@ -404,7 +406,7 @@ } sinput = new MemoryStream(result); } - throw new Exception(String.Format("Unhandled compression flags: 0x{0:X}", comptype)); + throw new SCException(String.Format("Unhandled compression flags: 0x{0:X}", comptype)); } //private static byte[] BZip2Decompress(Stream data, int expectedLength) Modified: trunk/scsharp/src/SCSharpLib/MpqLib/PKLibDecompress.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/PKLibDecompress.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/MpqLib/PKLibDecompress.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -32,6 +32,8 @@ using System; using System.IO; +using SCSharp.UI; + namespace SCSharp.MpqLib { enum CompressionType @@ -106,14 +108,14 @@ mCType = (CompressionType)input.ReadByte(); if (mCType != CompressionType.Binary && mCType != CompressionType.Ascii) { - throw new Exception("Invalid compression type: " + mCType); + throw new SCException("Invalid compression type: " + mCType); } mDSizeBits = input.ReadByte(); // This is 6 in test cases if (4 > mDSizeBits || mDSizeBits > 6) { - throw new Exception("Invalid dictionary size: " + mDSizeBits); + throw new SCException("Invalid dictionary size: " + mDSizeBits); } } Added: trunk/scsharp/src/SCSharpLib/MpqLib/SCFont.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/SCFont.cs (rev 0) +++ trunk/scsharp/src/SCSharpLib/MpqLib/SCFont.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -0,0 +1,254 @@ +#region LICENSE +// +// Authors: +// Chris Toshok (to...@hu...) +// +// (C) 2006 The Hungry Programmers (http://www.hungry.com/) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +#endregion LICENSE + +using System; +using System.IO; +using System.Collections.Generic; +using System.Text; + +using SCSharp.UI; + +namespace SCSharp.MpqLib +{ + /// <summary> + /// + /// </summary> + public class SCFont : IMpqResource + { + Stream stream; + + /// <summary> + /// + /// </summary> + public SCFont() + { + } + + /// <summary> + /// + /// </summary> + /// <param name="stream"></param> + public void ReadFromStream(Stream stream) + { + this.stream = stream; + ReadFontHeader(); + ReadGlyphOffsets(); + + glyphs = new Dictionary<int, Glyph>(); + } + + void ReadFontHeader() + { + /*uint name =*/ + Utilities.ReadDWord(stream); + + lowIndex = Utilities.ReadByte(stream); + highIndex = Utilities.ReadByte(stream); + + if (lowIndex > highIndex) + { + byte tmp = lowIndex; + lowIndex = highIndex; + highIndex = tmp; + } + maxWidth = Utilities.ReadByte(stream); + maxHeight = Utilities.ReadByte(stream); + /*uint unknown =*/ + Utilities.ReadDWord(stream); + } + + Dictionary<uint, uint> offsets; + + void ReadGlyphOffsets() + { + offsets = new Dictionary<uint, uint>(); + for (uint c = lowIndex; c < highIndex; c++) + { + offsets.Add(c, Utilities.ReadDWord(stream)); + } + } + + Glyph GetGlyph(int glyphID) + { + if (glyphs.ContainsKey(glyphID)) + { + return glyphs[glyphID]; + } + + stream.Position = offsets[(uint)glyphID]; + + byte letterWidth = Utilities.ReadByte(stream); + byte letterHeight = Utilities.ReadByte(stream); + byte letterXOffset = Utilities.ReadByte(stream); + byte letterYOffset = Utilities.ReadByte(stream); + + byte[,] bitmap = new byte[letterHeight, letterWidth]; + + int x, y; + x = letterWidth - 1; + y = letterHeight - 1; + while (true) + { + byte b = Utilities.ReadByte(stream); + int count = (b & 0xF8) >> 3; + byte cmap_entry = (byte)(b & 0x07); + + for (int i = 0; i < count; i++) + { + bitmap[y, x] = 0; + x--; + if (x < 0) + { + x = letterWidth - 1; + y--; + if (y < 0) + { + goto done; + } + } + } + + bitmap[y, x] = (byte)cmap_entry; + x--; + if (x < 0) + { + x = letterWidth - 1; + y--; + if (y < 0) + { + goto done; + } + } + } + done: + glyphs.Add(glyphID, + new Glyph(letterWidth, + letterHeight, + letterXOffset, + letterYOffset, + bitmap)); + + return glyphs[glyphID]; + } + + /// <summary> + /// + /// </summary> + /// <param name="index"></param> + /// <returns></returns> + public Glyph this[int index] + { + get + { + if (index < lowIndex || index > highIndex) + { + throw new ArgumentOutOfRangeException("index", + String.Format("value of {0} out of range of {1}-{2}", index, lowIndex, highIndex)); + } + + return GetGlyph(index); + } + } + + /// <summary> + /// + /// </summary> + public int SpaceSize + { + get { return this[109 - 1].Width; /* 109 = ascii for 'm' */ } + } + + /// <summary> + /// + /// </summary> + public int LineSize + { + get { return maxHeight; } + } + + /// <summary> + /// + /// </summary> + public int MaxWidth + { + get { return maxWidth; } + } + + /// <summary> + /// + /// </summary> + public int MaxHeight + { + get { return maxHeight; } + } + + Dictionary<int, Glyph> glyphs; + byte highIndex; + byte lowIndex; + byte maxWidth; + byte maxHeight; + + /// <summary> + /// + /// </summary> + public void DumpGlyphs() + { + for (int c = lowIndex; c < highIndex; c++) + { + Console.WriteLine("Letter: {0}", c); + DumpGlyph(c); + } + } + + /// <summary> + /// + /// </summary> + /// <param name="glyphID"></param> + public void DumpGlyph(int glyphID) + { + Glyph g = GetGlyph(glyphID); + byte[,] bitmap = g.Bitmap; + for (int y = g.Height - 1; y >= 0; y--) + { + for (int x = g.Width - 1; x >= 0; x--) + { + if (bitmap[y, x] == 0) + { + Console.Write(" "); + } + else + { + Console.Write("#"); + } + } + Console.WriteLine(); + } + Console.WriteLine(); + } + } +} Property changes on: trunk/scsharp/src/SCSharpLib/MpqLib/SCFont.cs ___________________________________________________________________ Name: svn:mime-type + text/x-csharp Name: svn:eol-style + native Modified: trunk/scsharp/src/SCSharpLib/MpqLib/Smk.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/Smk.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/MpqLib/Smk.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -119,7 +119,7 @@ signature = Utilities.ReadDWord (stream); if (signature != 0x324b4d53 /* SMK2 */ && signature != 0x344b4d53 /* SMK4 */) - throw new Exception ("invalid file"); + throw new SCException ("invalid file"); width = Utilities.ReadDWord (stream); height = Utilities.ReadDWord (stream); frames = Utilities.ReadDWord (stream); @@ -842,7 +842,7 @@ if (current_bit == 0) { current_bit = 8; if (current_byte_index + 1 > buf.Length) - throw new Exception (String.Format ("about to read off end of {0} byte buffer", buf.Length)); + throw new SCException (String.Format ("about to read off end of {0} byte buffer", buf.Length)); current_byte_index++; current_byte = buf[current_byte_index]; } @@ -892,7 +892,7 @@ AssertAtByteBoundary(); if (current_byte_index + length > buf.Length) - throw new Exception (); + throw new SCException (); Array.Copy (buf, current_byte_index, dest, index, length); @@ -906,7 +906,7 @@ public void AssertAtByteBoundary () { if (current_bit != 8) - throw new Exception ("this operation only works on byte boundaries"); + throw new SCException ("this operation only works on byte boundaries"); } int saved_start; @@ -951,7 +951,7 @@ { currentNode = bs.ReadBit() == 0 ? currentNode.branch_0 : currentNode.branch_1; if (currentNode == null) - throw new Exception ("can't advance to child nodes from a leaf node"); + throw new SCException ("can't advance to child nodes from a leaf node"); } public void Reset () @@ -961,7 +961,7 @@ public uint Value { get { - if (!IsLeaf) throw new Exception ("this node is not a leaf"); + if (!IsLeaf) throw new SCException ("this node is not a leaf"); return tree.ReturnNodeValue (currentNode); } } @@ -1090,7 +1090,7 @@ { if (node.value == -1) { /* it's a marker */ - throw new Exception (); + throw new SCException (); } else return (uint)node.value; Added: trunk/scsharp/src/SCSharpLib/UI/BoxSelectionChangedEventArgs.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/BoxSelectionChangedEventArgs.cs (rev 0) +++ trunk/scsharp/src/SCSharpLib/UI/BoxSelectionChangedEventArgs.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -0,0 +1,75 @@ +#region LICENSE +// +// Authors: +// David Hudson (je...@ya...) +// +// (C) 2007 David Hudson +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +#endregion LICENSE + +using System; + +namespace SCSharp.UI +{ + /// <summary> + /// + /// </summary> + public class BoxSelectionChangedEventArgs : EventArgs + { + #region Private fields + + /// <summary> + /// Corrresponding SDL_Event + /// </summary> + int selectedIndex; + + /// <summary> + /// + /// </summary> + public int SelectedIndex + { + get { return selectedIndex; } + set { selectedIndex = value; } + } + + #endregion + + #region Constructors + + /// <summary> + /// Constructor + /// </summary> + public BoxSelectionChangedEventArgs() + { + } + + /// <summary> + /// Constructor + /// </summary> + public BoxSelectionChangedEventArgs(int selectedIndex) + { + this.selectedIndex = selectedIndex; + } + + #endregion + } +} Property changes on: trunk/scsharp/src/SCSharpLib/UI/BoxSelectionChangedEventArgs.cs ___________________________________________________________________ Name: svn:mime-type + text/x-csharp Name: svn:eol-style + native Modified: trunk/scsharp/src/SCSharpLib/UI/Cinematic.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/Cinematic.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/UI/Cinematic.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -106,12 +106,12 @@ /// </summary> public event PlayerEventHandler Finished; - void PlayerFinished() + void PlayerFinished(object sender, EventArgs e) { player = null; if (Finished != null) { - Finished(); + Finished(this, new EventArgs()); } } @@ -130,7 +130,7 @@ || args.Key == Key.Space) { player.Stop(); - PlayerFinished(); + PlayerFinished(this, new EventArgs()); } } } Modified: trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -211,7 +211,7 @@ cursor = selectedItem; if (SelectionChanged != null) { - SelectionChanged(cursor); + SelectionChanged(this, new BoxSelectionChangedEventArgs(cursor)); } ClearSurface(); } @@ -261,7 +261,7 @@ /// <summary> /// /// </summary> - public event ComboBoxSelectionChangedEventHandler SelectionChanged; + public event EventHandler<BoxSelectionChangedEventArgs> SelectionChanged; #region IDisposable Members @@ -270,15 +270,16 @@ /// </summary> public void Dispose() { - throw new Exception("The method or operation is not implemented."); + throw new SCException("The method or operation is not implemented."); } #endregion } - /// <summary> - /// - /// </summary> - /// <param name="selectedIndex"></param> - public delegate void ComboBoxSelectionChangedEventHandler(int selectedIndex); + ///// <summary> + ///// + ///// </summary> + ///// <param name="e"></param> + ///// <param name="sender"></param> + //public delegate void ComboBoxSelectionChangedEventHandler(object sender, BoxSelectionChangedEventArgs e); } Modified: trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -91,8 +91,8 @@ descriptions[i] = GlobalResources.Instance.GluAllTbl[ description_startidx + i ]; } #else - titles[0] = GlobalResources.Instance.GluAllTbl[titleStartIdx + 3]; - descriptions[0] = GlobalResources.Instance.GluAllTbl[descriptionStartIdx + 3]; + titles[0] = GlobalResources.GluAllTbl[titleStartIdx + 3]; + descriptions[0] = GlobalResources.GluAllTbl[descriptionStartIdx + 3]; #endif listbox = (ListBoxElement)Elements[LISTBOX_ELEMENT_INDEX]; @@ -102,28 +102,28 @@ } listbox.SelectedIndex = 0; - HandleSelectionChanged(0); + HandleSelectionChanged(this, new BoxSelectionChangedEventArgs(0)); listbox.SelectionChanged += HandleSelectionChanged; Elements[OK_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { ShowDialog(new OkDialog(this, this.Mpq, "insert battle.net code here")); }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { Game.Instance.SwitchToScreen(UIScreenType.MainMenu); }; } - void HandleSelectionChanged(int selectedIndex) + void HandleSelectionChanged(object sender, BoxSelectionChangedEventArgs e) { - Elements[TITLE_ELEMENT_INDEX].Text = titles[selectedIndex]; - Elements[DESCRIPTION_ELEMENT_INDEX].Text = descriptions[selectedIndex]; + Elements[TITLE_ELEMENT_INDEX].Text = titles[e.SelectedIndex]; + Elements[DESCRIPTION_ELEMENT_INDEX].Text = descriptions[e.SelectedIndex]; } /// <summary> Modified: trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -72,35 +72,44 @@ } Elements[QUITMISSION_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { QuitMissionDialog d = new QuitMissionDialog(this, this.Mpq); - d.Cancel += delegate() { DismissDialog(); }; + d.Cancel += delegate(object sender2, EventArgs args2) + { + DismissDialog(); + }; ShowDialog(d); }; Elements[EXITPROGRAM_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { ExitConfirmationDialog d = new ExitConfirmationDialog(this, this.Mpq); - d.Cancel += delegate() { DismissDialog(); }; + d.Cancel += delegate(object sender2, EventArgs args2) + { + DismissDialog(); + }; ShowDialog(d); }; Elements[RESTARTMISSION_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { RestartConfirmationDialog d = new RestartConfirmationDialog(this, this.Mpq); - d.Cancel += delegate() { DismissDialog(); }; + d.Cancel += delegate(object sender2, EventArgs args2) + { + DismissDialog(); + }; ShowDialog(d); }; Elements[PREVIOUS_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { if (Previous != null) { - Previous(); + Previous(this, new EventArgs()); } }; } Modified: trunk/scsharp/src/SCSharpLib/UI/EntryDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/EntryDialog.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/UI/EntryDialog.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -77,20 +77,20 @@ Elements[TITLE_ELEMENT_INDEX].Text = title; Elements[OK_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { if (Ok != null) { - Ok(); + Ok(this, new EventArgs()); } }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { if (Cancel != null) { - Cancel(); + Cancel(this, new EventArgs()); } }; Modified: trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -70,20 +70,20 @@ } Elements[EXIT_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { if (Exit != null) { - Exit(); + Exit(this, new EventArgs()); } }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { if (Cancel != null) { - Cancel(); + Cancel(this, new EventArgs()); } }; } Modified: trunk/scsharp/src/SCSharpLib/UI/Game.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/Game.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/UI/Game.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -130,9 +130,9 @@ broodatMpq = GetMpq(path); Console.WriteLine("found BrooDat.mpq"); } - catch (Exception e) + catch (SCException e) { - throw new Exception(String.Format("Could not read mpq archive {0}", + throw new SCException(String.Format("Could not read mpq archive {0}", path), e); } } @@ -143,9 +143,9 @@ stardatMpq = GetMpq(path); Console.WriteLine("found StarDat.mpq"); } - catch (Exception e) + catch (SCException e) { - throw new Exception(String.Format("could not read mpq archive {0}", + throw new SCException(String.Format("could not read mpq archive {0}", path), e); } } @@ -154,7 +154,7 @@ if (stardatMpq == null) { - throw new Exception("unable to locate stardat.mpq, please check your StarcraftDirectory configuration setting"); + throw new SCException("unable to locate stardat.mpq, please check your StarcraftDirectory configuration setting"); } if (scCDDir != null) @@ -168,9 +168,9 @@ scInstallExe = GetMpq(path); Console.WriteLine("found SC install.exe"); } - catch (Exception e) + catch (SCException e) { - throw new Exception(String.Format("could not read mpq archive {0}", + throw new SCException(String.Format("could not read mpq archive {0}", path), e); } @@ -189,9 +189,9 @@ bwInstallExe = GetMpq(path); Console.WriteLine("found BW install.exe"); } - catch (Exception e) + catch (SCException e) { - throw new Exception(String.Format("could not read mpq archive {0}", + throw new SCException(String.Format("could not read mpq archive {0}", path), e); } @@ -201,7 +201,7 @@ if (bwInstallExe == null) { - throw new Exception("unable to locate broodwar cd's install.exe, please check your BroodwarCDDirectory configuration setting"); + throw new SCException("unable to locate broodwar cd's install.exe, please check your BroodwarCDDirectory configuration setting"); } if (broodatMpq != null) @@ -265,7 +265,7 @@ { if (bwInstallExe == null) { - throw new Exception("you need the Broodwar CD to play Broodwar games. Please check the BroodwarCDDirectory configuration setting."); + throw new SCException("you need the Broodwar CD to play Broodwar games. Please check the BroodwarCDDirectory configuration setting."); } playingMpq.Add(bwInstallExe); playingMpq.Add(broodatMpq); @@ -275,7 +275,7 @@ { if (scInstallExe == null) { - throw new Exception("you need the Starcraft CD to play original games. Please check the StarcraftCDDirectory configuration setting."); + throw new SCException("you need the Starcraft CD to play original games. Please check the StarcraftCDDirectory configuration setting."); } playingMpq.Add(scInstallExe); playingMpq.Add(stardatMpq); @@ -295,11 +295,11 @@ /// <summary> /// /// </summary> - /// <param name="fullscreen"></param> - public void Startup(bool fullscreen) + /// <param name="fullScreen"></param> + public void Startup(bool fullScreen) { /* create our window and hook up to the events we care about */ - CreateWindow(fullscreen); + CreateWindow(fullScreen); Events.UserEvent += UserEvent; Events.MouseMotion += PointerMotion; @@ -317,7 +317,7 @@ /// <summary> /// /// </summary> - public static void Quit() + public static void Quit(object sender, EventArgs e) { Events.QuitApplication(); } @@ -332,18 +332,18 @@ SwitchToScreen(screen); } - void CreateWindow(bool fullscreen) + void CreateWindow(bool fullScreen) { Video.WindowIcon(); Video.WindowCaption = "SCSharp"; - painter = new Painter(fullscreen, GAME_ANIMATION_TICK); + painter = new Painter(fullScreen, GAME_ANIMATION_TICK); } void UserEvent(object sender, UserEventArgs args) { ReadyEventHandler d = (ReadyEventHandler)args.UserEvent; - d(); + d(this, new EventArgs()); } void PointerMotion(object sender, MouseMotionEventArgs args) @@ -409,11 +409,11 @@ { if (args.Key == Key.Q) { - Quit(); + Quit(this, new EventArgs()); } else if (args.Key == Key.F) { - painter.Fullscreen = !painter.Fullscreen; + painter.FullScreen = !painter.FullScreen; } } #endif @@ -526,7 +526,7 @@ screens[index] = new ConnectionScreen(playingMpq); break; default: - throw new Exception(); + throw new SCException(); } } @@ -549,24 +549,24 @@ get { return installedMpq; } } - void SwitchReady() + void SwitchReady(object sender, EventArgs e) { screenToSwitchTo.Ready -= SwitchReady; SetGameScreen(screenToSwitchTo); screenToSwitchTo = null; } - void GlobalResourcesLoaded() + void GlobalResourcesLoaded(object sender, EventArgs e) { SwitchToScreen(UIScreenType.MainMenu); } - void TitleScreenReady() + void TitleScreenReady(object sender, EventArgs e) { Console.WriteLine("Loading global resources"); - new GlobalResources(stardatMpq, broodatMpq); - GlobalResources.Instance.Ready += GlobalResourcesLoaded; - GlobalResources.Instance.Load(); + GlobalResources.LoadMpq(stardatMpq, broodatMpq); + GlobalResources.Ready += GlobalResourcesLoaded; + GlobalResources.Load(); } } } Modified: trunk/scsharp/src/SCSharpLib/UI/GameMenuDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GameMenuDialog.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/UI/GameMenuDialog.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -77,27 +77,30 @@ } Elements[RETURNTOGAME_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { if (ReturnToGame != null) { - ReturnToGame(); + ReturnToGame(this, new EventArgs()); } }; Elements[MISSIONOBJECTIVES_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { ObjectivesDialog d = new ObjectivesDialog(this, this.Mpq); - d.Previous += delegate() { DismissDialog(); }; + d.Previous += delegate(object sender2, EventArgs args2) + { + DismissDialog(); + }; ShowDialog(d); }; Elements[ENDMISSION_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { EndMissionDialog d = new EndMissionDialog(this, this.Mpq); - d.Previous += delegate() + d.Previous += delegate(object sender2, EventArgs args2) { DismissDialog(); }; @@ -111,10 +114,10 @@ }; Elements[OPTIONS_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { OptionsDialog d = new OptionsDialog(this, this.Mpq); - d.Previous += delegate() + d.Previous += delegate(object sender2, EventArgs args2) { DismissDialog(); }; @@ -122,10 +125,10 @@ }; Elements[HELP_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { HelpDialog d = new HelpDialog(this, this.Mpq); - d.Previous += delegate() + d.Previous += delegate(object sender2, EventArgs args2) { DismissDialog(); }; Added: trunk/scsharp/src/SCSharpLib/UI/GameModeActivateEventArgs.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GameModeActivateEventArgs.cs (rev 0) +++ trunk/scsharp/src/SCSharpLib/UI/GameModeActivateEventArgs.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -0,0 +1,75 @@ +#region LICENSE +// +// Authors: +// David Hudson (je...@ya...) +// +// (C) 2007 David Hudson +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +#endregion LICENSE + +using System; + +namespace SCSharp.UI +{ + /// <summary> + /// + /// </summary> + public class GameModeActivateEventArgs : EventArgs + { + #region Private fields + + /// <summary> + /// + /// </summary> + bool expansion; + + /// <summary> + /// + /// </summary> + public bool Expansion + { + get { return expansion; } + set { expansion = value; } + } + + #endregion + + #region Constructors + + /// <summary> + /// Constructor + /// </summary> + public GameModeActivateEventArgs() + { + } + + /// <summary> + /// Constructor + /// </summary> + public GameModeActivateEventArgs(bool expansion) + { + this.expansion = expansion; + } + + #endregion + } +} Property changes on: trunk/scsharp/src/SCSharpLib/UI/GameModeActivateEventArgs.cs ___________________________________________________________________ Name: svn:mime-type + text/x-csharp Name: svn:eol-style + native Modified: trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -72,27 +72,33 @@ Console.WriteLine("{0}: {1}", i, Elements[i].Text); } - Elements[TITLE_ELEMENT_INDEX].Text = GlobalResources.Instance.BrooDat.GluAllTbl.Strings[172]; + Elements[TITLE_ELEMENT_INDEX].Text = GlobalResources.BrooDat.GluAllTbl.Strings[172]; Elements[ORIGINAL_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { if (Activate != null) - Activate(false); + { + Activate(this, new GameModeActivateEventArgs(false)); + } }; Elements[EXPANSION_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { if (Activate != null) - Activate(true); + { + Activate(this, new GameModeActivateEventArgs(true)); + } }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate() + delegate(object sender, EventArgs args) { if (Cancel != null) - Cancel(); + { + Cancel(this, new EventArgs()); + } }; } @@ -103,12 +109,13 @@ /// <summary> /// /// </summary> - public event GameModeActivateEventHandler Activate; + public event EventHandler<GameModeActivateEventArgs> Activate; } - /// <summary> - /// - /// </summary> - /// <param name="expansion"></param> - public delegate void GameModeActivateEventHandler(bool expansion); + ///// <summary> + ///// + ///// </summary> + ///// <param name="e"></param> + ///// <param name="sender"></param> + //public delegate void GameModeActivateEventHandler(object sender, GameModeActivateEventArgs e); } Modified: trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -616,7 +616,7 @@ case Key.F10: GameMenuDialog d = new GameMenuDialog(this, this.Mpq); - d.ReturnToGame += delegate() + d.ReturnToGame += delegate(object sender2, EventArgs args2) { DismissDialog(); }; Modified: trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs 2007-05-22 22:14:12 UTC (rev 1388) +++ trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs 2007-05-23 16:44:53 UTC (rev 1389) @@ -39,49 +39,67 @@ /// <summary> /// /// </summary> - public class GlobalResources + public static class GlobalResources { - Mpq stardatMpq; - Mpq broodatMpq; + static Mpq starDataMpq; - SCResources starcraftResources; - SCResources broodwarResources; + /// <summary> + /// + /// </summary> + public static Mpq StarDataMpq + { + get { return GlobalResources.starDataMpq; } + set { GlobalResources.starDataMpq = value; } + } + static Mpq broodDataMpq; - static GlobalResources instance; - /// <summary> /// /// </summary> - public static GlobalResources Instance + public static Mpq BroodDataMpq { - get { return instance; } + get { return GlobalResources.broodDataMpq; } + set { GlobalResources.broodDataMpq = value; } } + static SCResources starcraftResources; + static SCResources broodwarResources; + + //static GlobalResources instance; + + ///// <summary> + ///// + ///// </summary> + //public static GlobalResources Instance + //{ + // get { return instance; } + //} + /// <summary> /// /// </summary> - /// <param name="stardatMpq"></param> - /// <param name="broodatMpq"></param> - public GlobalResources(Mpq stardatMpq, Mpq broodatMpq) + /// <param name="starDataMpq"></param> + /// <param name="broodDataMpq"></param> + public static void LoadMpq(Mpq starDataMpq, Mpq broodDataMpq) { - if (instance != null) - { - throw new Exception("There can only be one GlobalResources"); - } + //if (instance != null) + //{ + // throw new SCException("There can only be one GlobalResources"); + //} - this.stardatMpq = stardatMpq; - this.broodatMpq = broodatMpq; + GlobalResources.starDataMpq = starDataMpq; + GlobalResources.broodDataMpq = broodDataMpq; starcraftResources = new SCResources(); broodwarResources = new SCResources(); - instance = this; + //instance = this; } /// <summary> /// /// </summary> - public void Load() + public static void Load() { ThreadPool.QueueUserWorkItem(ResourceLoader); } @@ -89,7 +107,7 @@ /// <summary> /// /// </summary> - public void LoadSingleThreaded() + public static void LoadSingleThreaded() { ResourceLoader(null); } @@ -97,7 +115,7 @@ /// <summary> /// /// </summary> - SCResources Resources + static SCResources Resources { get { return Game.Instance.PlayingBroodWar ? broodwarResources : starcraftResources; } } @@ -105,7 +123,7 @@ /// <summary> /// /// </summary> - public Tbl ImagesTbl + public static Tbl ImagesTbl { get { return Resources.ImagesTbl; } } @@ -113,7 +131,7 @@ /// <summary> /// /// </summary> - public Tbl SfxDataTbl + public static Tbl SfxDataTbl { get { return Resources.SfxDataTbl; } } @@ -121,7 +139,7 @@ /// <summary> /// /// </summary> - public Tbl SpritesTbl + public static Tbl SpritesTbl { get { return Resources.SpritesTbl; } } @@ -129,7 +147,7 @@ /// <summary> /// /// </summary> - public Tbl GluAllTbl + public static Tbl GluAllTbl { get { return Resources.GluAllTbl; } } @@ -137,7 +155,7 @@ /// <summary> /// /// </summary> - public ImagesDat ImagesDat + public static ImagesDat ImagesDat { get { return Resources.ImagesDat; } } @@ -145,7 +163,7 @@ /// <summary> /// /// </summary> - public SpritesDat SpritesDat + public static SpritesDat SpritesDat { get { return Resources.SpritesDat; } } @@ -153,7 +171,7 @@ /// <summary> /// /// </summary> - public SfxDataDat SfxDataDat + public static SfxDataDat SfxDataDat { get { return Resources.SfxDataDat; } } @@ -161,7 +179,7 @@ /// <summary> /// /// </summary> - public ScriptBin IScriptBin + public static ScriptBin IScriptBin { get { return Resources.ScriptBin; } } @@ -169,7 +187,7 @@ /// <summary> /// /// </summary> - public UnitsDat UnitsDat + public static UnitsDat UnitsDat { get { return Resources.UnitsDat; } } @@ -177,7 +195,7 @@ /// <summary> /// /// </summary> - public FlingyDat FlingyDat + public static FlingyDat FlingyDat { get { return Resources.FlingyDat; } } @@ -185,7 +203,7 @@ /// <summary> /// /// </summary> - public MapDataDat MapDataDat + public static MapDataDat MapDataDat { get { return Resources.MapDataDat; } } @@ -193,7 +211,7 @@ /// <summary> /// /// </summary> - public Tbl MapDataTbl + public static Tbl MapDataTbl { get { return Resources.MapDataTbl; } } @@ -201,7 +219,7 @@ /// <summary> /// /// </summary> - public SCResources StarDat + public static SCResources StarDat { get { return starcraftResources; } } @@ -209,42 +227,42 @@ /// <summary> /// /// </summary> - public SCResources BrooDat + public static SCResources BrooDat { get { return broodwarResources; } } - void ResourceLoader(object state) + static void ResourceLoader(object state) { try { - starcraftResources.ImagesTbl = (Tbl)stardatMpq.GetResource(Builtin... [truncated message content] |
From: <je...@us...> - 2007-05-24 18:54:34
|
Revision: 1392 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1392&view=rev Author: jendave Date: 2007-05-24 11:54:29 -0700 (Thu, 24 May 2007) Log Message: ----------- fxcop fixes Modified Paths: -------------- trunk/scsharp/src/SCSharpLib/MpqLib/Chk.cs trunk/scsharp/src/SCSharpLib/MpqLib/MapDataDat.cs trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs trunk/scsharp/src/SCSharpLib/UI/BriefingRunner.cs trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs trunk/scsharp/src/SCSharpLib/UI/CursorAnimator.cs trunk/scsharp/src/SCSharpLib/UI/DialogBoxElement.cs trunk/scsharp/src/SCSharpLib/UI/FFmpeg.cs trunk/scsharp/src/SCSharpLib/UI/Game.cs trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs trunk/scsharp/src/SCSharpLib/UI/ImageElement.cs trunk/scsharp/src/SCSharpLib/UI/LabelElement.cs trunk/scsharp/src/SCSharpLib/UI/ListBoxElement.cs trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs trunk/scsharp/src/SCSharpLib/UI/MapRenderer.cs trunk/scsharp/src/SCSharpLib/UI/MarkupScreen.cs trunk/scsharp/src/SCSharpLib/UI/Painter.cs trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs trunk/scsharp/src/SCSharpLib/UI/SmackerPlayer.cs trunk/scsharp/src/SCSharpLib/UI/Sprite.cs trunk/scsharp/src/SCSharpLib/UI/SpriteManager.cs trunk/scsharp/src/SCSharpLib/UI/TextBoxElement.cs trunk/scsharp/src/SCSharpLib/UI/UIDialog.cs trunk/scsharp/src/SCSharpLib/UI/UIElement.cs trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs trunk/scsharp/src/SCSharpLib/UI/Unit.cs trunk/scsharp/src/SCSharpLib/UI/Utilities.cs trunk/scsharp/tests/DumpChk.cs trunk/scsharp/tests/FontFoo.cs Modified: trunk/scsharp/src/SCSharpLib/MpqLib/Chk.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/Chk.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/MpqLib/Chk.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -39,7 +39,7 @@ /// <summary> /// /// </summary> - public enum Tileset + public enum TileSet { /// <summary> /// @@ -220,7 +220,7 @@ } else if (sectionName == "ERA ") { - tileSet = (Tileset)Utilities.ReadWord(sectionData, 0); + tileSet = (TileSet)Utilities.ReadWord(sectionData, 0); } else if (sectionName == "DIM ") { @@ -269,7 +269,7 @@ } else if (sectionName == "OWNR") { - numPlayers = 0; + numberOfPlayers = 0; for (int i = 0; i < 12; i++) { /* @@ -281,11 +281,11 @@ */ if (sectionData[i] == 0x05) { - numComputerSlots++; + numberOfComputerSlots++; } else if (sectionData[i] == 0x06) { - numHumanSlots++; + numberOfHumanSlots++; } } } @@ -301,12 +301,12 @@ 07 - Inactive 10 - Human */ - numPlayers = 0; + numberOfPlayers = 0; for (int i = 0; i < 12; i++) { if (sectionData[i] == 0x05) /* user select */ { - numPlayers++; + numberOfPlayers++; } } } @@ -404,15 +404,15 @@ /// <summary> /// /// </summary> - /// <param name="idx"></param> + /// <param name="index"></param> /// <returns></returns> - public string GetMapString(int idx) + public string GetMapString(int index) { - if (idx == 0) + if (index == 0) { return ""; } - return strings[idx - 1]; + return strings[index - 1]; } string mapName; @@ -443,11 +443,11 @@ get { return scenarioType; } } - Tileset tileSet; + TileSet tileSet; /// <summary> /// /// </summary> - public Tileset Tileset + public TileSet TileSet { get { return tileSet; } } @@ -521,31 +521,31 @@ } } - int numComputerSlots; + int numberOfComputerSlots; /// <summary> /// /// </summary> - public int NumComputerSlots + public int NumberOfComputerSlots { - get { return numComputerSlots; } + get { return numberOfComputerSlots; } } - int numHumanSlots; + int numberOfHumanSlots; /// <summary> /// /// </summary> - public int NumHumanSlots + public int NumberOfHumanSlots { - get { return numHumanSlots; } + get { return numberOfHumanSlots; } } - int numPlayers; + int numberOfPlayers; /// <summary> /// /// </summary> - public int NumPlayers + public int NumberOfPlayers { - get { return numPlayers; } + get { return numberOfPlayers; } } TriggerData briefingData; Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MapDataDat.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MapDataDat.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MapDataDat.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -77,7 +77,7 @@ /// <summary> /// /// </summary> - public int NumIndexes + public int NumberOfIndexes { get { return buf.Length / 4; } } Modified: trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -71,3 +71,74 @@ [module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GameScreen..ctor(SCSharp.MpqLib.Mpq,System.String,SCSharp.MpqLib.Chk)", MessageId = "0#mpq")] [module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.CreditsScreen..ctor(SCSharp.MpqLib.Mpq)", MessageId = "0#mpq")] [module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.EndMissionDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.MpqLib.UnitsDat.GetFlingyId(System.Int32):System.Byte", MessageId = "Flingy")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.MpqLib.ImagesDat.GetGrpIndex(System.UInt32):System.UInt16", MessageId = "Grp")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.MpqLib.MpqDirectory", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.MpqLib.Grp", MessageId = "Grp")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.MpqLib.SfxDataDat", MessageId = "Sfx")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.MpqLib.MpqArchive", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.MpqLib.TileSet.Ashworld", MessageId = "Ashworld")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.MpqLib.Tbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.MpqLib.Spk", MessageId = "Spk")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.MpqLib.Chk", MessageId = "Chk")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.MpqLib.MpqWavCompression", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.MpqLib.FlingyDat", MessageId = "Flingy")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.UI.ProtossReadyRoomScreen", MessageId = "Protoss")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.ProtossReadyRoomScreen..ctor(SCSharp.MpqLib.Mpq,System.String)", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Unit.FlingyId", MessageId = "Flingy")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Unit.CreateSprite(SCSharp.MpqLib.Mpq,System.Byte[]):SCSharp.UI.Sprite", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.UI.TerranReadyRoomScreen", MessageId = "Terran")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.TerranReadyRoomScreen..ctor(SCSharp.MpqLib.Mpq,System.String)", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.UI.Pcx", MessageId = "Pcx")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Pcx.RgbaData", MessageId = "Rgba")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Pcx.RgbData", MessageId = "Rgb")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.ConnectionScreen..ctor(SCSharp.MpqLib.Mpq)", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.UIElement.Mpq", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.TitleScreen..ctor(SCSharp.MpqLib.Mpq)", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GlobalResources.MapDataTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GlobalResources.BroodDataMpq", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GlobalResources.SfxDataTbl", MessageId = "Sfx")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GlobalResources.SfxDataTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GlobalResources.SfxDataDat", MessageId = "Sfx")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GlobalResources.ImagesTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GlobalResources.StarDataMpq", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GlobalResources.GluAllTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GlobalResources.GluAllTbl", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GlobalResources.SpritesTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GlobalResources.LoadMpq(SCSharp.MpqLib.Mpq,SCSharp.MpqLib.Mpq):System.Void", MessageId = "0#Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GlobalResources.LoadMpq(SCSharp.MpqLib.Mpq,SCSharp.MpqLib.Mpq):System.Void", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GlobalResources.LoadMpq(SCSharp.MpqLib.Mpq,SCSharp.MpqLib.Mpq):System.Void", MessageId = "1#Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GlobalResources.FlingyDat", MessageId = "Flingy")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Sprite.Mpq", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Sprite..ctor(SCSharp.MpqLib.Mpq,System.Int32,System.Byte[],System.Int32,System.Int32)", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.UI.ZergReadyRoomScreen", MessageId = "Zerg")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.UI.FFmpeg", MessageId = "Fmpeg")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.SCResources.MapDataTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.SCResources.SfxDataTbl", MessageId = "Sfx")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.SCResources.SfxDataTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.SCResources.SfxDataDat", MessageId = "Sfx")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.SCResources.ImagesTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.SCResources.FlingyDat", MessageId = "Flingy")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.SCResources.GluAllTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.SCResources.GluAllTbl", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.SCResources.SpritesTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.ReadyRoomScreen.Create(SCSharp.MpqLib.Mpq,System.String):SCSharp.UI.ReadyRoomScreen", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.ReadyRoomScreen..ctor(SCSharp.MpqLib.Mpq,System.String,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.VideoDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.CursorAnimator..ctor(SCSharp.MpqLib.Grp,System.Byte[])", MessageId = "0#grp")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.SmackerPlayer.BlitSurface(SdlDotNet.Graphics.Surface):System.Void", MessageId = "Blit")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.ObjectivesDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.NetworkDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.QuitMissionDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.MarkupScreen..ctor(SCSharp.MpqLib.Mpq)", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Race.Zerg", MessageId = "Zerg")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Race.Terran", MessageId = "Terran")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Race.Protoss", MessageId = "Protoss")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Cinematic..ctor(SCSharp.MpqLib.Mpq,System.String)", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.OptionsDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.ExitConfirmationDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.SpriteManager.CreateSprite(SCSharp.MpqLib.Mpq,System.Int32,System.Byte[],System.Int32,System.Int32):SCSharp.UI.Sprite", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.UIScreen.Mpq", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.UIScreen.ArrowGrpPath", MessageId = "Grp")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.UIScreen..ctor(SCSharp.MpqLib.Mpq,System.String,System.String)", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.UIScreen..ctor(SCSharp.MpqLib.Mpq)", MessageId = "0#mpq")] Modified: trunk/scsharp/src/SCSharpLib/UI/BriefingRunner.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/BriefingRunner.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/BriefingRunner.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -129,7 +129,7 @@ sleepUntil = (int)action.Delay; return; case 2: - GuiUtil.PlaySound(screen.Mpq, prefix + "\\" + scenario.GetMapString((int)action.WavIndex)); + GuiUtility.PlaySound(screen.Mpq, prefix + "\\" + scenario.GetMapString((int)action.WavIndex)); sleepUntil = (int)action.Delay; return; case 3: @@ -151,7 +151,7 @@ Console.WriteLine("Transmission(Text, Slot, Time, Modifier, Wave, WavTime)"); screen.SetTransmissionText(scenario.GetMapString((int)action.TextIndex)); screen.HighlightPortrait((int)action.Group1); - GuiUtil.PlaySound(screen.Mpq, prefix + "\\" + scenario.GetMapString((int)action.WavIndex)); + GuiUtility.PlaySound(screen.Mpq, prefix + "\\" + scenario.GetMapString((int)action.WavIndex)); sleepUntil = (int)action.Delay; return; default: Modified: trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -66,7 +66,7 @@ surf.TransparentColor = Color.Black; /* XXX */ surf.Transparent = true; - Surface textSurf = GuiUtil.ComposeText(Text, Font, Palette, -1, -1, + Surface textSurf = GuiUtility.ComposeText(Text, Font, Palette, -1, -1, Sensitive ? 4 : 24); surf.Blit(textSurf, new Point((surf.Width - textSurf.Width) / 2, @@ -107,7 +107,7 @@ if (Sensitive && (Flags & SCElement.RespondToMouse) == SCElement.RespondToMouse) { /* highlight the text */ - GuiUtil.PlaySound(Mpq, Builtins.MouseoverWav); + GuiUtility.PlaySound(Mpq, Builtins.MouseoverWav); } base.MouseEnter(); } Modified: trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -46,8 +46,8 @@ { List<string> items; int cursor = -1; - Surface dropdownSurface; - bool dropdownVisible; + Surface dropDownSurface; + bool dropDownVisible; int selectedItem; /// <summary> @@ -170,7 +170,7 @@ throw new ArgumentNullException("args"); } /* if the dropdown is visible, see if we're inside it */ - if (!dropdownVisible) + if (!dropDownVisible) { return; } @@ -178,7 +178,7 @@ starcraft doesn't include this check.. should we? args.X >= X1 && args.X < X1 + dropdownSurface.Width && */ - if (args.Y >= Y1 + Height && args.Y < Y1 + Height + dropdownSurface.Height) + if (args.Y >= Y1 + Height && args.Y < Y1 + Height + dropDownSurface.Height) { int new_selected_item = (args.Y - (Y1 + Height)) / Font.LineSize; @@ -192,12 +192,12 @@ void PaintDropdown(Surface surf, DateTime dt) { - surf.Blit(dropdownSurface, new Point(X1, Y1 + Height)); + surf.Blit(dropDownSurface, new Point(X1, Y1 + Height)); } void ShowDropdown() { - dropdownVisible = true; + dropDownVisible = true; selectedItem = cursor; CreateDropdownSurface(); ParentScreen.Painter.Add(Layer.Popup, PaintDropdown); @@ -205,7 +205,7 @@ void HideDropdown() { - dropdownVisible = false; + dropDownVisible = false; if (cursor != selectedItem) { cursor = selectedItem; @@ -230,7 +230,7 @@ if (cursor != -1) { - Surface itemSurface = GuiUtil.ComposeText(items[cursor], Font, Palette, 4); + Surface itemSurface = GuiUtility.ComposeText(items[cursor], Font, Palette, 4); itemSurface.TransparentColor = Color.Black; itemSurface.Transparent = true; @@ -242,18 +242,18 @@ void CreateDropdownSurface() { - dropdownSurface = new Surface(Width, items.Count * Font.LineSize); + dropDownSurface = new Surface(Width, items.Count * Font.LineSize); int y = 0; for (int i = 0; i < items.Count; i++) { - Surface itemSurface = GuiUtil.ComposeText(items[i], Font, Palette, + Surface itemSurface = GuiUtility.ComposeText(items[i], Font, Palette, i == selectedItem ? 4 : 24); itemSurface.TransparentColor = Color.Black; itemSurface.Transparent = true; - dropdownSurface.Blit(itemSurface, new Point(0, y)); + dropDownSurface.Blit(itemSurface, new Point(0, y)); y += itemSurface.Height; } } @@ -265,21 +265,53 @@ #region IDisposable Members + bool disposed; /// <summary> - /// + /// Destroy sprite /// </summary> + /// <param name="disposing">If true, remove all unamanged resources</param> + protected virtual void Dispose(bool disposing) + { + if (!this.disposed) + { + if (disposing) + { + if (this.dropDownSurface != null) + { + this.dropDownSurface.Dispose(); + this.dropDownSurface = null; + } + } + this.disposed = true; + } + } + + /// <summary> + /// Destroy object + /// </summary> public void Dispose() { - throw new SCException("The method or operation is not implemented."); + this.Dispose(true); + GC.SuppressFinalize(this); } + /// <summary> + /// Destroy object + /// </summary> + public void Close() + { + Dispose(); + } + + /// <summary> + /// Destroy object + /// </summary> + ~ComboBoxElement() + { + Dispose(false); + } + + #endregion } - - ///// <summary> - ///// - ///// </summary> - ///// <param name="e"></param> - ///// <param name="sender"></param> - //public delegate void ComboBoxSelectionChangedEventHandler(object sender, BoxSelectionChangedEventArgs e); } Modified: trunk/scsharp/src/SCSharpLib/UI/CursorAnimator.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/CursorAnimator.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/CursorAnimator.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -48,8 +48,8 @@ Surface[] surfaces; - uint x; - uint y; + uint positionX; + uint positionY; uint hotX; uint hotY; @@ -69,8 +69,8 @@ } this.grp = grp; - this.x = 100; - this.y = 100; + this.positionX = 100; + this.positionY = 100; this.palette = palette; surfaces = new Surface[grp.FrameCount]; } @@ -90,31 +90,31 @@ /// <summary> /// /// </summary> - /// <param name="x"></param> - /// <param name="y"></param> + /// <param name="positionX"></param> + /// <param name="positionY"></param> [CLSCompliant(false)] - public void SetPosition(uint x, uint y) + public void SetPosition(uint positionX, uint positionY) { - this.x = x; - this.y = y; + this.positionX = positionX; + this.positionY = positionY; } /// <summary> /// /// </summary> [CLSCompliant(false)] - public uint X + public uint PositionX { - get { return x; } + get { return positionX; } } /// <summary> /// /// </summary> [CLSCompliant(false)] - public uint Y + public uint PositionY { - get { return y; } + get { return positionY; } } /// <summary> @@ -155,8 +155,8 @@ } last = now; - int drawX = (int)(x - hotX); - int drawY = (int)(y - hotY); + int drawX = (int)(positionX - hotX); + int drawY = (int)(positionY - hotY); if (currentFrame == grp.FrameCount) { @@ -165,7 +165,7 @@ if (surfaces[currentFrame] == null) { - surfaces[currentFrame] = GuiUtil.CreateSurfaceFromBitmap(grp.GetFrame(currentFrame), + surfaces[currentFrame] = GuiUtility.CreateSurfaceFromBitmap(grp.GetFrame(currentFrame), grp.Width, grp.Height, palette, true); Modified: trunk/scsharp/src/SCSharpLib/UI/DialogBoxElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/DialogBoxElement.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/DialogBoxElement.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -70,18 +70,18 @@ static void TileRow(Surface surf, Grp grp, byte[] pal, int l, int c, int r, int y) { - Surface lsurf = GuiUtil.CreateSurfaceFromBitmap(grp.GetFrame(l), + Surface lsurf = GuiUtility.CreateSurfaceFromBitmap(grp.GetFrame(l), grp.Width, grp.Height, pal, 41, 0); - Surface csurf = GuiUtil.CreateSurfaceFromBitmap(grp.GetFrame(c), + Surface csurf = GuiUtility.CreateSurfaceFromBitmap(grp.GetFrame(c), grp.Width, grp.Height, pal, 41, 0); - Surface rsurf = GuiUtil.CreateSurfaceFromBitmap(grp.GetFrame(r), + Surface rsurf = GuiUtility.CreateSurfaceFromBitmap(grp.GetFrame(r), grp.Width, grp.Height, pal, 41, 0); Modified: trunk/scsharp/src/SCSharpLib/UI/FFmpeg.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/FFmpeg.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/FFmpeg.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -66,8 +66,8 @@ /// /// </summary> /// <param name="fileName"></param> - /// <param name="buf"></param> - public FFmpeg(string fileName, byte[] buf) + /// <param name="buffer"></param> + public FFmpeg(string fileName, byte[] buffer) { //if (!initSucceeded) //{ @@ -102,9 +102,9 @@ /// <summary> /// /// </summary> - /// <param name="buf"></param> + /// <param name="buffer"></param> /// <returns></returns> - public bool GetNextFrame(byte[] buf) + public bool GetNextFrame(byte[] buffer) { return true; //get_next_frame(handle, buf); } Modified: trunk/scsharp/src/SCSharpLib/UI/Game.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/Game.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/Game.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -107,10 +107,10 @@ /// <summary> /// /// </summary> - /// <param name="starcraftDir"></param> + /// <param name="scProgramDir"></param> /// <param name="scCDDir"></param> /// <param name="bwCDDir"></param> - public Game(string starcraftDir, string scCDDir, string bwCDDir) + public Game(string scProgramDir, string scCDDir, string bwCDDir) { instance = this; @@ -119,9 +119,9 @@ installedMpq = new MpqContainer(); playingMpq = new MpqContainer(); - if (starcraftDir != null) + if (scProgramDir != null) { - foreach (string path in Directory.GetFileSystemEntries(starcraftDir)) + foreach (string path in Directory.GetFileSystemEntries(scProgramDir)) { if (Path.GetFileName(path).ToLower() == "broodat.mpq") { @@ -224,7 +224,7 @@ PlayingBroodWar = (broodatMpq != null); isBroodWar = (broodatMpq != null); - this.rootDir = starcraftDir; + this.rootDir = scProgramDir; } static Mpq GetMpq(string path) Modified: trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -72,7 +72,7 @@ Console.WriteLine("{0}: {1}", i, Elements[i].Text); } - Elements[TITLE_ELEMENT_INDEX].Text = GlobalResources.BrooDat.GluAllTbl.Strings[172]; + Elements[TITLE_ELEMENT_INDEX].Text = GlobalResources.BroodDat.GluAllTbl.Strings[172]; Elements[ORIGINAL_ELEMENT_INDEX].Activate += delegate(object sender, SCEventArgs args) Modified: trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -112,9 +112,9 @@ Got template) : base(mpq) { - this.EffectpalPath = "game\\tblink.pcx"; - this.ArrowgrpPath = "cursor\\arrow.grp"; - this.FontpalPath = "game\\tfontgam.pcx"; + this.EffectPalettePath = "game\\tblink.pcx"; + this.ArrowGrpPath = "cursor\\arrow.grp"; + this.FontPalettePath = "game\\tfontgam.pcx"; //this.scenario_mpq = scenario_mpq; this.scenario = scenario; this.template = template; @@ -132,9 +132,9 @@ Chk scenario) : base(mpq) { - this.EffectpalPath = "game\\tblink.pcx"; - this.ArrowgrpPath = "cursor\\arrow.grp"; - this.FontpalPath = "game\\tfontgam.pcx"; + this.EffectPalettePath = "game\\tblink.pcx"; + this.ArrowGrpPath = "cursor\\arrow.grp"; + this.FontPalettePath = "game\\tfontgam.pcx"; //this.scenario_mpq = scenario_mpq; this.scenario = scenario; ScrollCursors = new CursorAnimator[8]; @@ -247,7 +247,7 @@ painter.Add(Layer.Hud, PaintHud); painter.Add(Layer.Hud, PaintMinimap); - if (scenario.Tileset == Tileset.Platform) + if (scenario.TileSet == TileSet.Platform) { painter.Add(Layer.Background, PaintStarfield); } @@ -271,7 +271,7 @@ painter.Remove(Layer.Hud, PaintHud); painter.Remove(Layer.Hud, PaintMinimap); - if (scenario.Tileset == Tileset.Platform) + if (scenario.TileSet == TileSet.Platform) { painter.Remove(Layer.Background, PaintStarfield); } @@ -297,11 +297,11 @@ pcx.ReadFromStream((Stream)this.Mpq.GetResource("tileset\\badlands\\dark.pcx"), 0, 0); tileset_palette = pcx.Palette; - hud = GuiUtil.SurfaceFromStream((Stream)this.Mpq.GetResource(String.Format(Builtins.GameConsolePcx, + hud = GuiUtility.SurfaceFromStream((Stream)this.Mpq.GetResource(String.Format(Builtins.GameConsolePcx, Utilities.RaceCharLower[(int)Game.Instance.Race])), 254, 0); - if (scenario.Tileset == Tileset.Platform) + if (scenario.TileSet == TileSet.Platform) { Spk starfield = (Spk)this.Mpq.GetResource("parallax\\star.spk"); @@ -340,7 +340,7 @@ for (int i = 0; i < cursornames.Length; i++) { ScrollCursors[i] = new CursorAnimator((Grp)this.Mpq.GetResource(cursornames[i]), - Effectpal.Palette); + EffectPalette.Palette); ScrollCursors[i].SetHotspot(60, 60); } @@ -354,7 +354,7 @@ for (int i = 0; i < magcursornames.Length; i++) { MagCursors[i] = new CursorAnimator((Grp)this.Mpq.GetResource(magcursornames[i]), - Effectpal.Palette); + EffectPalette.Palette); MagCursors[i].SetHotspot(60, 60); } @@ -368,7 +368,7 @@ for (int i = 0; i < targetcursornames.Length; i++) { TargetCursors[i] = new CursorAnimator((Grp)this.Mpq.GetResource(targetcursornames[i]), - Effectpal.Palette); + EffectPalette.Palette); TargetCursors[i].SetHotspot(60, 60); } @@ -399,8 +399,8 @@ CursorAnimator c = Game.Instance.Cursor; - if (c.X + topleft_x > s.TopLeftPosition.X && c.X + topleft_x <= s.TopLeftPosition.X + 100 /* XXX */ - && c.Y + topleft_y > s.TopLeftPosition.Y && c.Y + topleft_y <= s.TopLeftPosition.Y + 100 /* XXX */) + if (c.PositionX + topleft_x > s.TopLeftPosition.X && c.PositionX + topleft_x <= s.TopLeftPosition.X + 100 /* XXX */ + && c.PositionY + topleft_y > s.TopLeftPosition.Y && c.PositionY + topleft_y <= s.TopLeftPosition.Y + 100 /* XXX */) { Game.Instance.Cursor = MagCursors[MAG_CURSOR_G]; unitUnderCursor = u; @@ -677,8 +677,8 @@ protoss nexus = 154 */ Unit unit = new Unit(154); - unit.X = sl.X; - unit.Y = sl.Y; + unit.PositionX = sl.PositionX; + unit.PositionY = sl.PositionY; unit.CreateSprite(this.Mpq, tileset_palette); units.Add(unit); @@ -686,7 +686,7 @@ } /* for now assume the player is at startLocations[0], and center the view there */ - Recenter(startLocations[0].X, startLocations[0].Y); + Recenter(startLocations[0].PositionX, startLocations[0].PositionY); } } } Modified: trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -227,7 +227,7 @@ /// <summary> /// /// </summary> - public static SCResources BrooDat + public static SCResources BroodDat { get { return broodwarResources; } } Modified: trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -54,7 +54,7 @@ /// <summary> /// /// </summary> - public static class GuiUtil + public static class GuiUtility { static SCFont[] fonts; @@ -95,13 +95,13 @@ /// <summary> /// /// </summary> - /// <param name="g"></param> + /// <param name="glyph"></param> /// <param name="palette"></param> /// <param name="offset"></param> /// <returns></returns> - public static Surface RenderGlyph(Glyph g, byte[] palette, int offset) + public static Surface RenderGlyph(Glyph glyph, byte[] palette, int offset) { - if (g == null) + if (glyph == null) { throw new ArgumentNullException("g"); } @@ -109,18 +109,18 @@ { throw new ArgumentNullException("palette"); } - byte[] buf = new byte[g.Width * g.Height * 4]; + byte[] buf = new byte[glyph.Width * glyph.Height * 4]; int i = 0; - for (int y = g.Height - 1; y >= 0; y--) + for (int y = glyph.Height - 1; y >= 0; y--) { - for (int x = g.Width - 1; x >= 0; x--) + for (int x = glyph.Width - 1; x >= 0; x--) { - if (g.Bitmap[y, x] == 0) + if (glyph.Bitmap[y, x] == 0) { buf[i + 0] = 0; } - else if (g.Bitmap[y, x] == 1) + else if (glyph.Bitmap[y, x] == 1) { buf[i + 0] = 255; } @@ -129,9 +129,9 @@ buf[i + 0] = 128; } - buf[i + 1] = palette[(g.Bitmap[y, x] + offset) * 3 + 2]; - buf[i + 2] = palette[(g.Bitmap[y, x] + offset) * 3 + 1]; - buf[i + 3] = palette[(g.Bitmap[y, x] + offset) * 3]; + buf[i + 1] = palette[(glyph.Bitmap[y, x] + offset) * 3 + 2]; + buf[i + 2] = palette[(glyph.Bitmap[y, x] + offset) * 3 + 1]; + buf[i + 3] = palette[(glyph.Bitmap[y, x] + offset) * 3]; if (buf[i + 1] == 252 && buf[i + 2] == 0 && buf[i + 3] == 252) { @@ -142,7 +142,7 @@ } } - return CreateSurfaceFromRgbaData(buf, (ushort)g.Width, (ushort)g.Height, 32, g.Width * 4); + return CreateSurfaceFromRgbaData(buf, (ushort)glyph.Width, (ushort)glyph.Height, 32, glyph.Width * 4); } /// <summary> @@ -550,7 +550,7 @@ /// <returns></returns> public static Surface SurfaceFromStream(Stream stream) { - return GuiUtil.SurfaceFromStream(stream, -1, -1); + return GuiUtility.SurfaceFromStream(stream, -1, -1); } /// <summary> @@ -560,7 +560,7 @@ /// <returns></returns> public static Sound SoundFromStream(Stream stream) { - byte[] buf = GuiUtil.ReadStream(stream); + byte[] buf = GuiUtility.ReadStream(stream); return Mixer.Sound(buf); } @@ -580,7 +580,7 @@ { return; } - Sound s = GuiUtil.SoundFromStream(stream); + Sound s = GuiUtility.SoundFromStream(stream); s.Play(); } @@ -589,8 +589,8 @@ /// </summary> /// <param name="mpq"></param> /// <param name="resourcePath"></param> - /// <param name="numLoops"></param> - public static void PlayMusic(Mpq mpq, string resourcePath, int numLoops) + /// <param name="numberOfLoops"></param> + public static void PlayMusic(Mpq mpq, string resourcePath, int numberOfLoops) { if (mpq == null) { @@ -601,7 +601,7 @@ { return; } - Sound s = GuiUtil.SoundFromStream(stream); + Sound s = GuiUtility.SoundFromStream(stream); s.Play(true); } } Modified: trunk/scsharp/src/SCSharpLib/UI/ImageElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ImageElement.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/ImageElement.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -64,12 +64,12 @@ if ((Flags & SCElement.Translucent) == SCElement.Translucent) { - surface = GuiUtil.SurfaceFromStream((Stream)Mpq.GetResource(Text), + surface = GuiUtility.SurfaceFromStream((Stream)Mpq.GetResource(Text), 254, 0); } else { - surface = GuiUtil.SurfaceFromStream((Stream)Mpq.GetResource(Text)); + surface = GuiUtility.SurfaceFromStream((Stream)Mpq.GetResource(Text)); } // surface.TransparentColor = Color.Black; /* XXX */ Modified: trunk/scsharp/src/SCSharpLib/UI/LabelElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/LabelElement.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/LabelElement.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -62,7 +62,7 @@ /* this is wrong */ Surface surf = new Surface(Width, Height); - Surface textSurf = GuiUtil.ComposeText(Text, Font, Palette, Width, Height, + Surface textSurf = GuiUtility.ComposeText(Text, Font, Palette, Width, Height, Sensitive ? 4 : 24); ; int x = 0; Modified: trunk/scsharp/src/SCSharpLib/UI/ListBoxElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ListBoxElement.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/ListBoxElement.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -308,7 +308,7 @@ { break; } - Surface item_surface = GuiUtil.ComposeText(items[i], Font, Palette, + Surface item_surface = GuiUtility.ComposeText(items[i], Font, Palette, (!selectable || (!selecting && cursor == i) || (selecting && selectionIndex == i)) ? 4 : 24); Modified: trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -72,7 +72,7 @@ try { Game.Instance.PlayingBroodWar = args.Expansion; - GuiUtil.PlaySound(this.Mpq, Builtins.Mousedown2Wav); + GuiUtility.PlaySound(this.Mpq, Builtins.Mousedown2Wav); Game.Instance.SwitchToScreen(nextScreen); } catch (Exception e) @@ -101,7 +101,7 @@ } else { - GuiUtil.PlaySound(this.Mpq, Builtins.Mousedown2Wav); + GuiUtility.PlaySound(this.Mpq, Builtins.Mousedown2Wav); Game.Instance.SwitchToScreen(UIScreenType.LogOn); } }; @@ -115,7 +115,7 @@ } else { - GuiUtil.PlaySound(this.Mpq, Builtins.Mousedown2Wav); + GuiUtility.PlaySound(this.Mpq, Builtins.Mousedown2Wav); Game.Instance.SwitchToScreen(UIScreenType.Connection); } }; Modified: trunk/scsharp/src/SCSharpLib/UI/MapRenderer.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/MapRenderer.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/MapRenderer.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -49,12 +49,13 @@ /// <returns></returns> public static Surface RenderToSurface(Mpq mpq, Chk chk) { - ushort pixelWidth; - ushort pixelHeight; + ushort pixelWidth = 0; + ushort pixelHeight = 0; - byte[] bitmap = RenderToBitmap(mpq, chk, out pixelWidth, out pixelHeight); + //byte[] bitmap = RenderToBitmap(mpq, chk, out pixelWidth, out pixelHeight); + BitmapImage bitmap = RenderToBitmap(mpq, chk, pixelWidth, pixelHeight); - return GuiUtil.CreateSurfaceFromRgbaData(bitmap, pixelWidth, pixelHeight, 32, pixelWidth * 4); + return GuiUtility.CreateSurfaceFromRgbaData(bitmap.Image, bitmap.PixelWidth, bitmap.PixelHeight, 32, bitmap.PixelWidth * 4); } /// <summary> @@ -66,8 +67,10 @@ /// <param name="pixelHeight"></param> /// <returns></returns> [CLSCompliant(false)] - public static byte[] RenderToBitmap(Mpq mpq, Chk chk, out ushort pixelWidth, out ushort pixelHeight) + public static BitmapImage RenderToBitmap(Mpq mpq, Chk chk, ushort pixelWidth, ushort pixelHeight) { + BitmapImage bitmapImage = new BitmapImage(); + //public static byte[] RenderToBitmap(Mpq mpq, Chk chk, out ushort pixelWidth, out ushort pixelHeight) if (chk == null) { throw new ArgumentNullException("chk"); @@ -78,15 +81,15 @@ } ushort[,] mapTiles = chk.MapTiles; - byte[] image = new byte[chk.Width * 32 * chk.Height * 32 * 4]; + bitmapImage.Image = new byte[chk.Width * 32 * chk.Height * 32 * 4]; - pixelWidth = (ushort)(chk.Width * 32); - pixelHeight = (ushort)(chk.Height * 32); + bitmapImage.PixelWidth = (ushort)(chk.Width * 32); + bitmapImage.PixelHeight = (ushort)(chk.Height * 32); - Stream cv5_fs = (Stream)mpq.GetResource(String.Format("tileset\\{0}.cv5", Utilities.TilesetNames[(int)chk.Tileset])); - Stream vx4_fs = (Stream)mpq.GetResource(String.Format("tileset\\{0}.vx4", Utilities.TilesetNames[(int)chk.Tileset])); - Stream vr4_fs = (Stream)mpq.GetResource(String.Format("tileset\\{0}.vr4", Utilities.TilesetNames[(int)chk.Tileset])); - Stream wpe_fs = (Stream)mpq.GetResource(String.Format("tileset\\{0}.wpe", Utilities.TilesetNames[(int)chk.Tileset])); + Stream cv5_fs = (Stream)mpq.GetResource(String.Format("tileset\\{0}.cv5", Utilities.TileSetNames[(int)chk.TileSet])); + Stream vx4_fs = (Stream)mpq.GetResource(String.Format("tileset\\{0}.vx4", Utilities.TileSetNames[(int)chk.TileSet])); + Stream vr4_fs = (Stream)mpq.GetResource(String.Format("tileset\\{0}.vr4", Utilities.TileSetNames[(int)chk.TileSet])); + Stream wpe_fs = (Stream)mpq.GetResource(String.Format("tileset\\{0}.wpe", Utilities.TileSetNames[(int)chk.TileSet])); byte[] cv5 = new byte[cv5_fs.Length]; cv5_fs.Read(cv5, 0, (int)cv5_fs.Length); @@ -134,10 +137,10 @@ byte palette_entry = vr4[minitile_id * 64 + pixel_y * 8 + pixel_x]; - image[0 + 4 * (x + y)] = (byte)(255 - wpe[palette_entry * 4 + 3]); - image[1 + 4 * (x + y)] = wpe[palette_entry * 4 + 2]; - image[2 + 4 * (x + y)] = wpe[palette_entry * 4 + 1]; - image[3 + 4 * (x + y)] = wpe[palette_entry * 4 + 0]; + bitmapImage.Image[0 + 4 * (x + y)] = (byte)(255 - wpe[palette_entry * 4 + 3]); + bitmapImage.Image[1 + 4 * (x + y)] = wpe[palette_entry * 4 + 2]; + bitmapImage.Image[2 + 4 * (x + y)] = wpe[palette_entry * 4 + 1]; + bitmapImage.Image[3 + 4 * (x + y)] = wpe[palette_entry * 4 + 0]; } } else @@ -151,10 +154,10 @@ byte palette_entry = vr4[minitile_id * 64 + pixel_y * 8 + pixel_x]; - image[0 + 4 * (x + y)] = (byte)(255 - wpe[palette_entry * 4 + 3]); - image[1 + 4 * (x + y)] = wpe[palette_entry * 4 + 2]; - image[2 + 4 * (x + y)] = wpe[palette_entry * 4 + 1]; - image[3 + 4 * (x + y)] = wpe[palette_entry * 4 + 0]; + bitmapImage.Image[0 + 4 * (x + y)] = (byte)(255 - wpe[palette_entry * 4 + 3]); + bitmapImage.Image[1 + 4 * (x + y)] = wpe[palette_entry * 4 + 2]; + bitmapImage.Image[2 + 4 * (x + y)] = wpe[palette_entry * 4 + 1]; + bitmapImage.Image[3 + 4 * (x + y)] = wpe[palette_entry * 4 + 0]; } } } @@ -163,7 +166,7 @@ } } - return image; + return bitmapImage; } } } Modified: trunk/scsharp/src/SCSharpLib/UI/MarkupScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/MarkupScreen.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/MarkupScreen.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -98,7 +98,7 @@ /// <param name="background"></param> public MarkupPage(Stream background) { - newBackground = GuiUtil.SurfaceFromStream(background, 254, 0); + newBackground = GuiUtility.SurfaceFromStream(background, 254, 0); } /// <summary> @@ -124,7 +124,7 @@ } else { - lineSurfaces.Add(GuiUtil.ComposeText(l, fnt, pal)); + lineSurfaces.Add(GuiUtility.ComposeText(l, fnt, pal)); } } } @@ -230,13 +230,13 @@ /// <summary> /// /// </summary> - /// <param name="s"></param> - protected void AddMarkup(Stream s) + /// <param name="stream"></param> + protected void AddMarkup(Stream stream) { string l; MarkupPage currentPage = null; - StreamReader sr = new StreamReader(s); + StreamReader sr = new StreamReader(stream); while ((l = sr.ReadLine()) != null) { @@ -305,7 +305,7 @@ pal = pcx.RgbData; Console.WriteLine("loading font"); - fnt = GuiUtil.GetFonts(this.Mpq)[3]; + fnt = GuiUtility.GetFonts(this.Mpq)[3]; Console.WriteLine("loading markup"); LoadMarkup(); Modified: trunk/scsharp/src/SCSharpLib/UI/Painter.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/Painter.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/Painter.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -146,14 +146,14 @@ /// <summary> /// /// </summary> - /// <param name="fullscreen"></param> + /// <param name="fullScreen"></param> /// <param name="millis"></param> - public Painter(bool fullscreen, int millis) + public Painter(bool fullScreen, int millis) { this.millis = millis; - this.fullScreen = fullscreen; - FullScreen = fullscreen; + this.fullScreen = fullScreen; + FullScreen = fullScreen; /* init our list of painter delegates */ layers = new List<PainterCallback>[(int)Layer.Count]; Modified: trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs 2007-05-24 18:54:29 UTC (rev 1392) @@ -294,7 +294,7 @@ (selectedChk == null ? "" : String.Format("{0}", - selectedChk.NumHumanSlots))); + selectedChk.NumberOfHumanSlots))); Elements[MAPPLAYERS1_ELEMENT_INDEX].Text = slotString; Elements[MAPPLAYERS1_ELEMENT_INDEX].Visible = true; @@ -305,7 +305,7 @@ (selectedChk == null ? "" : String.Format("{0}", - selectedChk.NumComputerSlots))); + selectedChk.NumberOfComputerSlots))); Elements[MAPPLAYERS2_ELEMENT_INDEX].Text = slotString; Elements[MAPPLAYERS2_ELEMENT_INDEX].Visible = true; @@ -319,7 +319,7 @@ (selectedChk == null ? "" : String.Format("{0}", - selectedChk.NumPlayers))); + selectedChk.NumberOfPlayers))); Elements[MAPPLAYERS1_ELEMENT_INDEX].Text = numPlayersString; Elements[MAPPLAYERS1_ELEMENT_INDEX].Visible = true; @@ -333,11 +333,11 @@ { if (selectedGot.UseMapSettings) { - if (i >= selectedChk.NumComputerSlots + 1) break; + if (i >= selectedChk.NumberOfComputerSlots + 1) break; } else { - if (i >= selectedChk.NumPlayers) break; + if (i >= selectedChk.NumberOfPlayers) break; } if (i > 0) @@ -399,7 +399,7 @@ (selectedChk == null ? "" : String.Format("{0}", - selectedChk.Tileset))); + selectedChk.TileSet))); Elements[MAPSIZE_ELEMENT_INDEX].Text = mapSizeString; Elements[MAPTILESET_ELEMENT_INDEX].Text = tileSetString; Modified: trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs 2007-05-23 17:45:10 UTC (rev 1391) +++ trunk/scsharp/src... [truncated message content] |
From: <je...@us...> - 2007-05-26 05:48:13
|
Revision: 1403 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1403&view=rev Author: jendave Date: 2007-05-25 22:48:10 -0700 (Fri, 25 May 2007) Log Message: ----------- Fix linux and osx builds Modified Paths: -------------- trunk/scsharp/ChangeLog trunk/scsharp/package.xml trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs Added Paths: ----------- trunk/scsharp/lib/net-2.0/Tao.Sdl.License.txt trunk/scsharp/lib/net-2.0/Tao.Sdl.Readme.txt trunk/scsharp/lib/net-2.0/Tao.Sdl.dll.config trunk/scsharp/lib/net-2.0/osx/ trunk/scsharp/lib/net-2.0/osx/Tao.Sdl.dll.config trunk/scsharp/sdldotnet.icns trunk/scsharp/src/SCSharp/scsharp.sh Modified: trunk/scsharp/ChangeLog =================================================================== --- trunk/scsharp/ChangeLog 2007-05-25 22:00:33 UTC (rev 1402) +++ trunk/scsharp/ChangeLog 2007-05-26 05:48:10 UTC (rev 1403) @@ -1,3 +1,13 @@ +2007-05-25 David Hudson <je...@ya...> + + * SVN: Took 0.0000008 zip file and uploaded it into the SdlDotNet svn tree + at Sourceforge + + * Project: Ran FXCop against everything and made many changes. + Re-organized code and files. + + * Version: bumped to 0.0.9 + 2006-05-29 Chris Toshok <to...@hu...> * Makefile.am (release): fix this target so that it works again. Added: trunk/scsharp/lib/net-2.0/Tao.Sdl.License.txt =================================================================== --- trunk/scsharp/lib/net-2.0/Tao.Sdl.License.txt (rev 0) +++ trunk/scsharp/lib/net-2.0/Tao.Sdl.License.txt 2007-05-26 05:48:10 UTC (rev 1403) @@ -0,0 +1,22 @@ +MIT License +Copyright \xA92003-2005 Tao Framework Team +http://www.taoframework.com +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. Property changes on: trunk/scsharp/lib/net-2.0/Tao.Sdl.License.txt ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/scsharp/lib/net-2.0/Tao.Sdl.Readme.txt =================================================================== --- trunk/scsharp/lib/net-2.0/Tao.Sdl.Readme.txt (rev 0) +++ trunk/scsharp/lib/net-2.0/Tao.Sdl.Readme.txt 2007-05-26 05:48:10 UTC (rev 1403) @@ -0,0 +1,13 @@ +Tao.Sdl 1.2.7.3 +Copyright \xA92003-2005 Tao Framework Team +http://www.taoframework.com +All rights reserved. + +Tao.Sdl is an SDL API binding for .NET, implementing SDL 1.2.7. + + +Change Log: + +1.2.7.0 - April 20, 2004: + Initial release. Special thanks to Dave Hudson for doing most of this + implementation. Property changes on: trunk/scsharp/lib/net-2.0/Tao.Sdl.Readme.txt ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/scsharp/lib/net-2.0/Tao.Sdl.dll.config =================================================================== --- trunk/scsharp/lib/net-2.0/Tao.Sdl.dll.config (rev 0) +++ trunk/scsharp/lib/net-2.0/Tao.Sdl.dll.config 2007-05-26 05:48:10 UTC (rev 1403) @@ -0,0 +1,9 @@ +<configuration> + <dllmap dll="SDL.dll" target="libSDL-1.2.so.0" /> + <dllmap dll="SDL_image.dll" target="libSDL_image-1.2.so.0" /> + <dllmap dll="SDL_mixer.dll" target="libSDL_mixer-1.2.so.0" /> + <dllmap dll="SDL_ttf.dll" target="libSDL_ttf-2.0.so.0" /> + <dllmap dll="SDL_net.dll" target="libSDL_net-1.2.so.0" /> + <dllmap dll="smpeg.dll" target="libsmpeg-0.4.so.0" /> + <dllmap dll="SDL_gfx.dll" target="libSDL_gfx.so.4" /> +</configuration> Added: trunk/scsharp/lib/net-2.0/osx/Tao.Sdl.dll.config =================================================================== --- trunk/scsharp/lib/net-2.0/osx/Tao.Sdl.dll.config (rev 0) +++ trunk/scsharp/lib/net-2.0/osx/Tao.Sdl.dll.config 2007-05-26 05:48:10 UTC (rev 1403) @@ -0,0 +1,9 @@ +<configuration> + <dllmap dll="SDL.dll" target="/Library/Frameworks/SDL.framework/SDL" /> + <dllmap dll="SDL_mixer.dll" target="/Library/Frameworks/SDL_mixer.framework/SDL_mixer" /> + <dllmap dll="SDL_image.dll" target="/Library/Frameworks/SDL_image.framework/SDL_image" /> + <dllmap dll="SDL_ttf.dll" target="/Library/Frameworks/SDL_ttf.framework/SDL_ttf" /> + <dllmap dll="SDL_net.dll" target="/Library/Frameworks/SDL_net.framework/SDL_net" /> + <dllmap dll="smpeg.dll" target="/Library/Frameworks/smpeg.framework/smpeg" /> + <dllmap dll="SDL_gfx.dll" target="/Library/Frameworks/SDL_gfx.framework/SDL_gfx" /> +</configuration> Modified: trunk/scsharp/package.xml =================================================================== --- trunk/scsharp/package.xml 2007-05-25 22:00:33 UTC (rev 1402) +++ trunk/scsharp/package.xml 2007-05-26 05:48:10 UTC (rev 1403) @@ -102,6 +102,11 @@ <include name="**/*.xml"/> </fileset> </copy> + <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${bin.dir}/assemblies" flatten="true"> + <fileset basedir="${project::get-base-directory()}/${src.dir}/SCSharp"> + <include name="**/*.sh" /> + </fileset> + </copy> <if test="${platform::is-unix() and not is-osx}"> <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${bin.dir}/assemblies"> <fileset basedir="${project::get-base-directory()}/${lib.dir}/net-2.0"> @@ -125,9 +130,7 @@ </if> <if test="${is-osx}"> <property name="examples.path" value="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${bin.dir}"/> - <exec program="macpack" commandline="-m:2 -o:${examples.path} -m cocoa -r:${examples.path}/SdlDotNet.dll -r:${examples.path}/SdlDotNet.OpenGl.dll -r:${examples.path}/SdlDotNet.GtkSharp.dll -r:${examples.path}/SdlDotNet.Particles.dll -r:${examples.path}/Tao.Sdl.dll -r:${examples.path}/Tao.Sdl.dll.config -r:${examples.path}/Tao.OpenGl.dll -r:${examples.path}/Tao.OpenGl.dll.config -r:${examples.path}/Tao.FreeGlut.dll -r:${examples.path}/Tao.FreeGlut.dll.config -r:${examples.path}/Tao.Platform.Windows.dll -r:${examples.path}/atk-sharp.dll -r:${examples.path}/gtk-sharp.dll -r:${examples.path}/pango-sharp.dll -r:${examples.path}/glib-sharp.dll -r:${examples.path}/glade-sharp.dll -r:${examples.path}/gdk-sharp.dll -r:${examples.path}/Data -i:tools/logos/sdldotnet.icns -n:SdlDotNetExamples -a:${examples.path}/SdlDotNetExamples.exe" /> - <exec program="macpack" commandline="-m:2 -o:${examples.path} -m cocoa -r:${examples.path}/SdlDotNet.dll -r:${examples.path}/Tao.Sdl.dll -r:${examples.path}/Tao.Sdl.dll.config -r:${examples.path}/Data -i:tools/logos/sdldotnet.icns -n:SharpNes -a:${examples.path}/SharpNes.exe" /> - <exec program="macpack" commandline="-m:2 -o:${examples.path} -m cocoa -r:${examples.path}/SdlDotNet.dll -r:${examples.path}/Tao.Sdl.dll -r:${examples.path}/Tao.Sdl.dll.config -r:${examples.path}/Data -i:tools/logos/sdldotnet.icns -n:CDPlayer -a:${examples.path}/CDPlayer.exe" /> + <exec program="macpack" commandline="-m:2 -o:${examples.path} -m cocoa -r:${examples.path}/SdlDotNet.dll -r:${examples.path}/Tao.Sdl.dll -r:${examples.path}/Tao.Sdl.dll.config -r:${examples.path}/ICSharpCode.SharpZipLib.dll -i:sdldotnet.icns -n:SCSharp -a:${examples.path}/SCSharp.exe" /> </if> </target> Added: trunk/scsharp/sdldotnet.icns =================================================================== (Binary files differ) Property changes on: trunk/scsharp/sdldotnet.icns ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/src/SCSharp/scsharp.sh =================================================================== --- trunk/scsharp/src/SCSharp/scsharp.sh (rev 0) +++ trunk/scsharp/src/SCSharp/scsharp.sh 2007-05-26 05:48:10 UTC (rev 1403) @@ -0,0 +1,2 @@ +#!/bin/sh +exec mono ./SCSharp.exe "$@" Property changes on: trunk/scsharp/src/SCSharp/scsharp.sh ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native Modified: trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs 2007-05-25 22:00:33 UTC (rev 1402) +++ trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs 2007-05-26 05:48:10 UTC (rev 1403) @@ -90,7 +90,7 @@ { base.ResourceLoader(); - Elements[VERSION_ELEMENT_INDEX].Text = "v0.0000004"; + Elements[VERSION_ELEMENT_INDEX].Text = "v0.0.9"; Elements[SINGLEPLAYER_ELEMENT_INDEX].Activate += delegate(object sender, SCEventArgs args) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-25 22:00:41
|
Revision: 1402 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1402&view=rev Author: jendave Date: 2007-05-25 15:00:33 -0700 (Fri, 25 May 2007) Log Message: ----------- Added deps. Fixed build process for windows. Modified Paths: -------------- trunk/scsharp/prebuild.xml Added Paths: ----------- trunk/scsharp/lib/osxdeps/ trunk/scsharp/lib/osxdeps/SDL-1.2.11.dmg trunk/scsharp/lib/osxdeps/SDL-devel-1.2.11-extras.dmg trunk/scsharp/lib/osxdeps/SDL_gfx-2.0.16.dmg trunk/scsharp/lib/osxdeps/SDL_image-1.2.5.dmg trunk/scsharp/lib/osxdeps/SDL_mixer-1.2.7.dmg trunk/scsharp/lib/osxdeps/SDL_net-1.2.6.dmg trunk/scsharp/lib/osxdeps/SDL_ttf-2.0.8.dmg trunk/scsharp/lib/osxdeps/smpeg-0.4.4.dmg trunk/scsharp/lib/win32deps/ trunk/scsharp/lib/win32deps/COPYING trunk/scsharp/lib/win32deps/Readme trunk/scsharp/lib/win32deps/Readme-SDL.txt trunk/scsharp/lib/win32deps/Readme-gfx.txt trunk/scsharp/lib/win32deps/Readme-image.txt trunk/scsharp/lib/win32deps/Readme-smpeg.txt trunk/scsharp/lib/win32deps/Readme-ttf.txt trunk/scsharp/lib/win32deps/SDL.dll trunk/scsharp/lib/win32deps/SDL_gfx.dll trunk/scsharp/lib/win32deps/SDL_image.dll trunk/scsharp/lib/win32deps/SDL_mixer.dll trunk/scsharp/lib/win32deps/SDL_net.dll trunk/scsharp/lib/win32deps/SDL_ttf.dll trunk/scsharp/lib/win32deps/jpeg.dll trunk/scsharp/lib/win32deps/libpng12.dll trunk/scsharp/lib/win32deps/libtiff.dll trunk/scsharp/lib/win32deps/ogg.dll trunk/scsharp/lib/win32deps/readme-mixer.txt trunk/scsharp/lib/win32deps/smpeg.dll trunk/scsharp/lib/win32deps/vorbis.dll trunk/scsharp/lib/win32deps/vorbisfile.dll trunk/scsharp/lib/win32deps/zlib1.dll trunk/scsharp/package-debug.bat trunk/scsharp/package-debug.sh trunk/scsharp/package.bat trunk/scsharp/package.sh trunk/scsharp/package.xml trunk/scsharp/packagemono-debug.bat trunk/scsharp/packagemono.bat Property Changed: ---------------- trunk/scsharp/ Property changes on: trunk/scsharp ___________________________________________________________________ Name: svn:ignore - SCSharp.build SCSharp.mds SCSharp.sln SCSharp.suo *.swp + SCSharp.build SCSharp.mds SCSharp.sln SCSharp.suo *.swp dist Added: trunk/scsharp/lib/osxdeps/SDL-1.2.11.dmg =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/osxdeps/SDL-1.2.11.dmg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/osxdeps/SDL-devel-1.2.11-extras.dmg =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/osxdeps/SDL-devel-1.2.11-extras.dmg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/osxdeps/SDL_gfx-2.0.16.dmg =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/osxdeps/SDL_gfx-2.0.16.dmg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/osxdeps/SDL_image-1.2.5.dmg =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/osxdeps/SDL_image-1.2.5.dmg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/osxdeps/SDL_mixer-1.2.7.dmg =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/osxdeps/SDL_mixer-1.2.7.dmg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/osxdeps/SDL_net-1.2.6.dmg =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/osxdeps/SDL_net-1.2.6.dmg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/osxdeps/SDL_ttf-2.0.8.dmg =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/osxdeps/SDL_ttf-2.0.8.dmg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/osxdeps/smpeg-0.4.4.dmg =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/osxdeps/smpeg-0.4.4.dmg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/win32deps/COPYING =================================================================== --- trunk/scsharp/lib/win32deps/COPYING (rev 0) +++ trunk/scsharp/lib/win32deps/COPYING 2007-05-25 22:00:33 UTC (rev 1402) @@ -0,0 +1,437 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS Added: trunk/scsharp/lib/win32deps/Readme =================================================================== --- trunk/scsharp/lib/win32deps/Readme (rev 0) +++ trunk/scsharp/lib/win32deps/Readme 2007-05-25 22:00:33 UTC (rev 1402) @@ -0,0 +1,6 @@ +SDL 1.2.9 - latest +SDL_image 1.2.4 - latest +SDL_ttf 2.0.7 - latest +SDL_gfx 2.0.13 - latest +SDL_mixer 1.2.6 - lastest +smpeg 0.4.4 - latest, but project appears to be abandoned. Added: trunk/scsharp/lib/win32deps/Readme-SDL.txt =================================================================== --- trunk/scsharp/lib/win32deps/Readme-SDL.txt (rev 0) +++ trunk/scsharp/lib/win32deps/Readme-SDL.txt 2007-05-25 22:00:33 UTC (rev 1402) @@ -0,0 +1,13 @@ + +Please distribute this file with the SDL runtime environment: + +The Simple DirectMedia Layer (SDL for short) is a cross-platfrom library +designed to make it easy to write multi-media software, such as games and +emulators. + +The Simple DirectMedia Layer library source code is available from: +http://www.libsdl.org/ + +This library is distributed under the terms of the GNU LGPL license: +http://www.gnu.org/copyleft/lesser.html + Property changes on: trunk/scsharp/lib/win32deps/Readme-SDL.txt ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/scsharp/lib/win32deps/Readme-gfx.txt =================================================================== --- trunk/scsharp/lib/win32deps/Readme-gfx.txt (rev 0) +++ trunk/scsharp/lib/win32deps/Readme-gfx.txt 2007-05-25 22:00:33 UTC (rev 1402) @@ -0,0 +1,320 @@ + +SDL_gfx - SDL graphics drawing primitives and other support functions +============================================================================= + +Email asc...@ap... to contact the author or better check +author's homepage at http://www.ferzkopp.net for the most up-to-date +contact information. + +This library is licenced under the LGPL, see the file LICENSE for details. + + +Intro +----- + +The SDL_gfx library evolved out of the SDL_gfxPrimitives code which +provided basic drawing routines such as lines, circles or polygons for +SDL Surfaces and adding a couple other useful functions for zooming +images for example and doing basic image processing on byte arrays. + +The current components of the SDL_gfx library are: +- Graphic Primitives (SDL_gfxPrimitves.h) +- Rotozoomer (SDL_rotozoom.h) +- Framerate control (SDL_framerate.h) +- MMX image filters (SDL_imageFilter.h) + +See ./Docs directory for a longer HTML version of this document. + + +Supported Platforms +------------------- + +The library compiles and is tested for a Linux target (gcc compiler) and +a Win32 target (VisualC6/7, xmingw32 cross-compiler). MacOS X target is +reported to work (Project Builder). QNX is reported to build well (see diff). + +When using the cross-compiler (available on the author's homepage), +the build process generates .DLLs. You can use the command line 'LIB.EXE' +tool to generate VC6 compatible .LIB files for linking purposes. + +Other platforms might work but have not been tested by the author. + +See below for build instructions. + + +Notes on Graphics Primitives +---------------------------- + +Care has been taken so that all routines are fully alpha-aware and can +blend any primitive onto the target surface if ALPHA<255. Surface depths +supported are 1,2,3 and 4 bytes per pixel. Surface locking is implemented +in each routine and the library should work well with hardware +accelerated surfaces. + +Currently, The following Anti-Aliased drawing primitives are available: +- AA-line +- AA-polygon +- AA-circle +- AA-ellipse + +[[[ Interface ]]] + +See SDL_gfxPrimitives.h for all the drawing functions. + + +Notes on Rotozoomer +------------------- + +The rotozoom code is not ASSEMBLY quality - but it should be fast enough +even for some realtime effects if the CPU is good or bitmaps small. +With interpolation the routines are typically used for pre-rendering stuff +in higher quality (i.e. smoothing) - that's also a reason why the API differs +from SDL_BlitRect() and creates a new target surface each time rotozoom +is called. The final rendering speed is dependent on the target surface +size as it is beeing xy-scanned when rendering the new surface. + +Note also that the smoothing toggle is dependent on the input surface bit +depth. 8bit surfaces will never be smoothed - only 32bit surfaces will. + +Note that surfaces of other bit depth then 8 and 32 will be converted +on the fly to a 32bit surface using a blit into a temporary surface. This +impacts performance somewhat. + + +[[[ Interface ]]] + +SDL_Surface * rotozoomSurface (SDL_Surface *src, double angle, double zoom, int smooth); + + Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. + 'angle' is the rotation in degrees. 'zoom' a scaling factor. If 'smooth' is 1 + then the destination 32bit surface is anti-aliased. If the surface is not 8bit + or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. + + +SDL_Surface * rotozoomSurfaceXY (SDL_Surface *src, double angle, double zoomx, double zoomy, int smooth); + + Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. + 'angle' is the rotation in degrees. 'zoomx' and 'zoomy' are scaling factors that + can also be negative. In this case the corresponding axis is flipped. If 'smooth' + is 1 then the destination 32bit surface is anti-aliased. If the surface is not 8bit + or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. + + Note: Flipping currently only works with antialiasing turned off. + + +SDL_Surface * zoomSurface (SDL_Surface *src, double zoomx, double zoomy, int smooth); + + Zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. + 'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is 1 + then the destination 32bit surface is anti-aliased. If the surface is not 8bit + or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. + + +Smoothing (interpolation) flags work only on 32bit surfaces: + + #define SMOOTHING_OFF 0 + #define SMOOTHING_ON 1 + + +Notes on framerate functions +---------------------------- + +The framerate functions are used to insert delays into the graphics loop +to maintain a constant framerate. + +The implementation is more sophisticated that the usual + SDL_Delay(1000/FPS); +call since these functions keep track of the desired game time per frame +for a linearly interpolated sequence of future timing points of each frame. +This is done to avoid rounding errors from the inherent instability in the +delay generation and application. + +i.e. the 100th frame of a game running at 50Hz will be accurately +2.00sec after the 1st frame (if the machine can keep up with the drawing). + + +[[[ Interface ]]] + +The functions return 0 or 'value' for sucess and -1 for error. All functions +use a pointer to a framerate-manager variable to operate. + +void SDL_initFramerate(FPSmanager * manager); + + Initialize the framerate manager, set default framerate of 30Hz and + reset delay interpolation. + + +int SDL_setFramerate(FPSmanager * manager, int rate); + + Set a new framerate for the manager and reset delay interpolation. + + +int SDL_getFramerate(FPSmanager * manager); + + Get the currently set framerate of the manager. + + +void SDL_framerateDelay(FPSmanager * manager); + + Generate a delay to accomodate currently set framerate. Call once in the + graphics/rendering loop. If the computer cannot keep up with the rate (i.e. + drawing too slow), the delay is zero and the delay interpolation is reset. + + +Notes on imageFilter functions +------------------------------ + +The imagefilter functions are a collection of MMX optimized routines that +operate on continuous buffers of bytes - typically greyscale images from +framegrabbers and such - performing functions such as image addition and +binarization. All functions (almost .. not the the convolution routines) +have a C implementation that is automatically used on systems without MMX +capabilities. + + +[[[ Interface ]]] + +See the extensive list of routines in SDL_imageFilters.h for info. + + + +Installation and Test +--------------------- + +To compile the library your need the SDL 1.2 installed from source or +installed with the 'devel' RPM package. For example on Mandrake, run: + urpmi libSDL1.2-devel + +The run + ./autogen.sh (optional) + ./configure + make + make install + ldconfig + +to compile and install the library. The default location for the +installation is /usr/local/lib and /usr/local/include. The libary +path might need to be added to the file + /etc/ld.so.conf + +Run the shell script 'nodebug.sh' before make, to patch the makefile +for optimized compilation: + ./autogen.sh (optional) + ./configure + ./nodebug.sh + make + make install + ldconfig + +To create a Windows DLL using VisualC: + unzip -a VisualC6.zip + vcvars32.bat + copy VisualC/makefile + nmake +or + unzip -a VisualC7.zip +and open the project file. + + +To create a Windows DLL using the xmingw32 cross-compiler: + cross-configure + cross-make + cross-make install + + +To build without MMX code enabled (i.e. PPC architecture): + ./configure --disable-mmx + make + make install + + +To build on QNX6, patch first using: + patch -p0 <QNX.diff + + +To build on MacOS X with Project Builder, follow these steps: + * Update your developer tools to the lastest version (December 2002 as + of this revision). + * Install the SDL Developers framework for Mac OS X. + * Download the latest SDL_gfx source distribution and extract the + archive in a convenient location. + * Extract the included OSX-PB.tgz archive into the + top directory of the SDL_gfx distribution (from step 3). This will create a + PB that contains the project files. + * The project has targets for the SDL_gfx framework and the four test + programs. All can be built using the 'deployment' or 'development' build + styles. + + + +Test Programs +------------- + +Change to the ./Test directory and run + ./configure + make +to create several test programs for the libraries functions. This requires +the library to be compiled and installed. + + +See the source code .c files for sample code. + + +Thanks +------ + +Thanks to 'AppWares Development Group' for supporting this project - please +visit http://www.appwares.com for more information. + + +Contributors +------------ + +* Fix for filledbox by Ingo van Lil, inguin at gmx.de - thanks Ingo. + +* Non-alpha line drawing code adapted from routine + by Pete Shinners, pete at shinners.org - thanks Pete. + +* More fixes by Karl Bartel, karlb at gmx.net - thanks Karl. + +* Much testing and suggestions for fixes from Danny van Bruggen, + danny at froukepc.dhs.org - thanks Danny. + +* Original AA-circle/-ellipse code idea from Stephane Magnenat, + nct at wg0.ysagoon.com - thanks Stephane. + +* Faster blending routines contributed by Anders Lindstr\xF6m, + cal at swipnet.se - thanks Anders. + +* New AA-circle/-ellipse code based on ideas from Anders Lindstr\xF6m - + thanks Anders. + +* VisualC makefile contributed by Danny van Bruggen, + danny at froukepc.dhs.org - thanks Danny. + +* VisualC7 project file contributed by James Turk, + jturk at conceptofzero.com - thanks James. + +* Project Builder package contributed by Thomas Tongue, + TTongue at imagiware.com - Thanks Thomas. + +* Fix for filledPolygon contributed by Kentaro Fukuchi + fukuchi at is.titech.ac.jp - Thanks Kentaro. + +* QNX6 patch contributed by Mike Gorchak, + mike at malva.ua - Thanks Mike. + +* Pie idea contributed by Eike Lange, + eike.lange at uni-essen.de - Thanks Eike. + +* Dynamic font setup by Todor Prokopov, + koprok at dir.bg - Thanks Todor. + +* Horizontal/Vertical flipping code by Victor (Haypo) + Stinner, victor.stinner at haypocalc.com - Thanks Victor. + +* OSX build fixes by Michael Wybrow, + mjwybrow at cs.mu.oz.au - Thanks Michael. + +* gcc3.4 build fixes by Dries Verachtert, + dries at ulyssis.org - Thanks Dries. Property changes on: trunk/scsharp/lib/win32deps/Readme-gfx.txt ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/scsharp/lib/win32deps/Readme-image.txt =================================================================== --- trunk/scsharp/lib/win32deps/Readme-image.txt (rev 0) +++ trunk/scsharp/lib/win32deps/Readme-image.txt 2007-05-25 22:00:33 UTC (rev 1402) @@ -0,0 +1,7 @@ +Please include this notice with the runtime environment: + +This library is distributed under the terms of the GNU LGPL license: +http://www.gnu.org/copyleft/lesser.html + +The source is available from the libraries page at the SDL website: +http://www.libsdl.org/ Property changes on: trunk/scsharp/lib/win32deps/Readme-image.txt ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/scsharp/lib/win32deps/Readme-smpeg.txt =================================================================== --- trunk/scsharp/lib/win32deps/Readme-smpeg.txt (rev 0) +++ trunk/scsharp/lib/win32deps/Readme-smpeg.txt 2007-05-25 22:00:33 UTC (rev 1402) @@ -0,0 +1,75 @@ + + SDL MPEG Player Library (SMPEG) + + Version 0.4.4 + September 28, 2000 + + +Written by Karl Robillard and Sam Lantinga, Loki Entertainment Software. +Streaming MPEG support contributed by Vivien Chappelier. + + +SMPEG is a free MPEG1 video player library with sound support. Video playback +is based on the ubiquitous Berkeley MPEG player, mpeg_play v2.2. Audio is +played through a slightly modified mpegsound library, part of Splay v0.8.2. +SMPEG supports MPEG audio (MP3), MPEG-1 video, and MPEG system streams. + +This library is distributed under the GNU Library Public License (LGPL) +version 2. + +plaympeg, gtv, and glmovie are simple video players provided to test the +library. The C library interface is 'documented' in smpeg.h, and the C++ +library interface is spread out over the MPEG*.h files. + +This is a work in progress. Only 16 or 32 bit color depth is supported. +The player will dynamically conver to other color depths, but playback +will be much faster if your display is already set to 16 bit color depth. +Currently it has only been tested on Linux. + + +Requirements: + + * Simple DirectMedia Layer v1.2.0 or newer + http://www.libsdl.org/ + +To make: + + Type 'make all'. This should build libsmpeg.a and plaympeg + +Usage: + + plaympeg [--noaudio] [--novideo] [--double|-2] [--loop|-l] file ... + + +Known Issues: + + The MPEG decoding is a fairly slow and mathematically intensive + process. It could use even further optimization. + + There isn't any synchronization between the audio and video threads, + and system stream timestamps are ignored. The video is synchronized + with audio by using video framerate and elapsed time. They are + are synchronized well enough for short clips, but long movies, or + movies with visual audio cues (like speech) don't look very good. + +Reporting bugs: + + Please report any bugs and/or fixes to sm...@lo.... + + +Looking at the code: + + The functions that should be optimized to improve performance are: + Color16DitherImageMod() (Uses 5ms CPU, called few times) + Twox2Color16DitherImageMod() (Uses 10ms CPU, called few times) + j_rev_dct() (Uses 0.01ms CPU, but called many times) + ParseReconBlock() (Uses 0.01ms CPU, but called many times) + + To improve framerate scheduling, look at timeSync() in video/gdith.cpp + +Links: + + Berkeley MPEG player http://bmrc.berkeley.edu/frame/research/mpeg + Splay http://my.netian.com/~polarb + SDL http://www.devolution.com/~slouken/SDL + Property changes on: trunk/scsharp/lib/win32deps/Readme-smpeg.txt ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/scsharp/lib/win32deps/Readme-ttf.txt =================================================================== --- trunk/scsharp/lib/win32deps/Readme-ttf.txt (rev 0) +++ trunk/scsharp/lib/win32deps/Readme-ttf.txt 2007-05-25 22:00:33 UTC (rev 1402) @@ -0,0 +1,7 @@ +Please include this notice with the runtime environment: + +This library is distributed under the terms of the GNU LGPL license: +http://www.gnu.org/copyleft/lesser.html + +The source is available from the libraries page at the SDL website: +http://www.libsdl.org/ Property changes on: trunk/scsharp/lib/win32deps/Readme-ttf.txt ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/scsharp/lib/win32deps/SDL.dll =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/win32deps/SDL.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/win32deps/SDL_gfx.dll =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/win32deps/SDL_gfx.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/win32deps/SDL_image.dll =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/win32deps/SDL_image.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/win32deps/SDL_mixer.dll =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/win32deps/SDL_mixer.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/win32deps/SDL_net.dll =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/win32deps/SDL_net.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/win32deps/SDL_ttf.dll =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/win32deps/SDL_ttf.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/win32deps/jpeg.dll =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/win32deps/jpeg.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/win32deps/libpng12.dll =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/win32deps/libpng12.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/win32deps/libtiff.dll =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/win32deps/libtiff.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/win32deps/ogg.dll =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/win32deps/ogg.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/win32deps/readme-mixer.txt =================================================================== --- trunk/scsharp/lib/win32deps/readme-mixer.txt (rev 0) +++ trunk/scsharp/lib/win32deps/readme-mixer.txt 2007-05-25 22:00:33 UTC (rev 1402) @@ -0,0 +1,7 @@ +Please include this notice with the runtime environment: + +This library is distributed under the terms of the GNU LGPL license: +http://www.gnu.org/copyleft/lesser.html + +The source is available from the libraries page at the SDL website: +http://www.libsdl.org/ Property changes on: trunk/scsharp/lib/win32deps/readme-mixer.txt ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/scsharp/lib/win32deps/smpeg.dll =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/win32deps/smpeg.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/win32deps/vorbis.dll =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/win32deps/vorbis.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/win32deps/vorbisfile.dll =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/win32deps/vorbisfile.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/lib/win32deps/zlib1.dll =================================================================== (Binary files differ) Property changes on: trunk/scsharp/lib/win32deps/zlib1.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/scsharp/package-debug.bat =================================================================== --- trunk/scsharp/package-debug.bat (rev 0) +++ trunk/scsharp/package-debug.bat 2007-05-25 22:00:33 UTC (rev 1402) @@ -0,0 +1,2 @@ +NAnt.exe -buildfile:package.xml net-2.0 package-debug +pause Property changes on: trunk/scsharp/package-debug.bat ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native Added: trunk/scsharp/package-debug.sh =================================================================== --- trunk/scsharp/package-debug.sh (rev 0) +++ trunk/scsharp/package-debug.sh 2007-05-25 22:00:33 UTC (rev 1402) @@ -0,0 +1,2 @@ +#!/bin/sh +nant -buildfile:package.xml mono-2.0 package-debug Property changes on: trunk/scsharp/package-debug.sh ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native Added: trunk/scsharp/package.bat =================================================================== --- trunk/scsharp/package.bat (rev 0) +++ trunk/scsharp/package.bat 2007-05-25 22:00:33 UTC (rev 1402) @@ -0,0 +1,2 @@ +NAnt.exe -buildfile:package.xml net-2.0 package +pause Property changes on: trunk/scsharp/package.bat ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native Added: trunk/scsharp/package.sh =================================================================== --- trunk/scsharp/package.sh (rev 0) +++ trunk/scsharp/package.sh 2007-05-25 22:00:33 UTC (rev 1402) @@ -0,0 +1,2 @@ +#!/bin/sh +nant -buildfile:package.xml mono-2.0 package Property changes on: trunk/scsharp/package.sh ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native Added: trunk/scsharp/package.xml =================================================================== --- trunk/scsharp/package.xml (rev 0) +++ trunk/scsharp/package.xml 2007-05-25 22:00:33 UTC (rev 1402) @@ -0,0 +1,153 @@ +<?xml version="1.0" ?> +<project name="scsharp" default="package"> + <!-- + Targets: + buildrelease: builds release versions of libraries and examples. + package: creates release zip file for .NET and Mono. + --> + <echo message="Using '${nant.settings.currentframework}' Framework"/> + <echo message="Using '${platform::get-name()}' Platform"/> + + <!-- global project settings --> + <property name="project.config" value="Release" /> + <property name="project.version" value="0.0.9" /> + <property name="src.dir" value="src" /> + <property name="tests.dir" value="tests" /> + <property name="dist.dir" value="dist" /> + <property name="source.dir" value="source" /> + <property name="bin.dir" value="bin" /> + <property name="obj.dir" value="obj" /> + <property name="lib.dir" value="lib" /> + <property name="doc.dir" value="doc" /> + <property name="native.sdl" value="Tao.Sdl"/> + <property name="dmg.dir" value="SCSharp" /> + <property name="is-osx" value="false"/> + + <target name="net-2.0" description="Sets framework to .NET 2.0"> + <property name="nant.settings.currentframework" value="net-2.0" /> + </target> + + <target name="mono-2.0" description="Sets framework to mono 2.0"> + <call target="check-osx" /> + <property name="nant.settings.currentframework" value="mono-2.0" /> + </target> + + <target name="check-osx" description="Checks if running on OSX"> + <if test="${file::exists('/System/Library/Frameworks/Cocoa.framework/Cocoa')}"> + <property name="is-osx" value="true" /> + </if> + </target> + + <target name="clean" description="Clean project"> + <delete dir="${bin.dir}" failonerror="false" /> + <delete dir="${obj.dir}" failonerror="false" /> + <delete dir="${dist.dir}" failonerror="false" /> + <nant buildfile="SCSharp.build" target="clean" /> + </target> + + <target name="package" description="Package" depends="clean"> + <nant buildfile="SCSharp.build" target="${nant.settings.currentframework} package" /> + <call target="copyfiles" /> + <call target="zip" /> + </target> + + <target name="package-debug" description="Package Debug Mode" depends="clean"> + <property name="project.config" value="Debug" /> + <nant buildfile="SCSharp.build" target="${nant.settings.currentframework} clean build-debug" /> + <call target="copyfiles" /> + </target> + + <!-- copy project files --> + <target name="copyfiles"> + <if test="${is-osx}"> + <property name="dist.dir" value="${dist.dir}/${dmg.dir}" /> + </if> + <if test="${project.config=='Release'}"> + <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${source.dir}"> + <fileset> + <include name="**" /> + + <exclude name="**/${obj.dir}/**" /> + <exclude name="**/${bin.dir}/**" /> + <exclude name="**/*j.user" /> + <exclude name="**.suo" /> + <exclude name="**/*.old" /> + <exclude name="**/Makefile" /> + <exclude name="**/*.in" /> + <exclude name="**/*.pc" /> + <exclude name="**/*.stackdump" /> + <exclude name="**/*.lnk" /> + <exclude name="**/config.status" /> + <exclude name="**/config.log" /> + <exclude name="**/aclocal.m4" /> + <exclude name="**/doc/**" /> + <exclude name="**/dist/**" /> + <exclude name="**/autom4te.cache/**" /> + <exclude name="**/Debug/**" /> + <exclude name="**/Release/**" /> + <exclude name="**.swp" /> + <exclude name="**.bak" /> + <exclude name="**.project" /> + </fileset> + </copy> + </if> + + <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${bin.dir}/assemblies" flatten="true"> + <fileset basedir="${project::get-base-directory()}/${src.dir}/SCSharp/${bin.dir}/${project.config}"> + <include name="**/*.exe" /> + <include name="**/*.config" /> + <include name="**/*.sh" /> + <include name="**/*.chm" /> + <include name="**/*.dll"/> + <include name="**/*.xml"/> + </fileset> + </copy> + <if test="${platform::is-unix() and not is-osx}"> + <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${bin.dir}/assemblies"> + <fileset basedir="${project::get-base-directory()}/${lib.dir}/net-2.0"> + <include name="${native.sdl}.dll.config"/> + </fileset> + </copy> + </if> + <if test="${is-osx}"> + <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${bin.dir}/assemblies"> + <fileset basedir="${project::get-base-directory()}/${lib.dir}/net-2.0/osx"> + <include name="${native.sdl}.dll.config"/> + </fileset> + </copy> + </if> + <if test="${platform::is-win32()}"> + <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${bin.dir}/win32deps"> + <fileset basedir="${lib.dir}/win32deps"> + <include name="**"/> + </fileset> + </copy> + </if> + <if test="${is-osx}"> + <property name="examples.path" value="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${bin.dir}"/> + <exec program="macpack" commandline="-m:2 -o:${examples.path} -m cocoa -r:${examples.path}/SdlDotNet.dll -r:${examples.path}/SdlDotNet.OpenGl.dll -r:${examples.path}/SdlDotNet.GtkSharp.dll -r:${examples.path}/SdlDotNet.Particles.dll -r:${examples.path}/Tao.Sdl.dll -r:${examples.path}/Tao.Sdl.dll.config -r:${examples.path}/Tao.OpenGl.dll -r:${examples.path}/Tao.OpenGl.dll.config -r:${examples.path}/Tao.FreeGlut.dll -r:${examples.path}/Tao.FreeGlut.dll.config -r:${examples.path}/Tao.Platform.Windows.dll -r:${examples.path}/atk-sharp.dll -r:${examples.path}/gtk-sharp.dll -r:${examples.path}/pango-sharp.dll -r:${examples.path}/glib-sharp.dll -r:${examples.path}/glade-sharp.dll -r:${examples.path}/gdk-sharp.dll -r:${examples.path}/Data -i:tools/logos/sdldotnet.icns -n:SdlDotNetExamples -a:${examples.path}/SdlDotNetExamples.exe" /> + <exec program="macpack" commandline="-m:2 -o:${examples.path} -m cocoa -r:${examples.path}/SdlDotNet.dll -r:${examples.path}/Tao.Sdl.dll -r:${examples.path}/Tao.Sdl.dll.config -r:${examples.path}/Data -i:tools/logos/sdldotnet.icns -n:SharpNes -a:${examples.path}/SharpNes.exe" /> + <exec program="macpack" commandline="-m:2 -o:${examples.path} -m cocoa -r:${examples.path}/SdlDotNet.dll -r:${examples.path}/Tao.Sdl.dll -r:${examples.path}/Tao.Sdl.dll.config -r:${examples.path}/Data -i:tools/logos/sdldotnet.icns -n:CDPlayer -a:${examples.path}/CDPlayer.exe" /> + </if> + </target> + + <!-- create zip file --> + <target name="zip" description="zip/gzip files"> + <property name="project.zip-path" value="${project::get-base-directory()}/${dist.dir}/${string::to-lower(project::get-name())}-${project.version}"/> + <if test="${platform::is-unix() and not is-osx}"> + <tar destfile="${project.zip-path}.tar.gz" compression="GZip"> + <fileset basedir="${dist.dir}"> + <include name="${project.zip-path}/**" /> + </fileset> + </tar> + </if> + <if test="${platform::is-win32()}"> + <zip zipfile="${project.zip-path}.zip"> + <fileset basedir="${dist.dir}"> + <include name="${project.zip-path}/**" /> + </fileset> + </zip> + </if> + <echo message="Created '${project::get-name()}' packages at ${project.zip-path}" /> + </target> +</project> Added: trunk/scsharp/packagemono-debug.bat =================================================================== --- trunk/scsharp/packagemono-debug.bat (rev 0) +++ trunk/scsharp/packa... [truncated message content] |
From: <je...@us...> - 2007-05-28 08:24:44
|
Revision: 1406 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1406&view=rev Author: jendave Date: 2007-05-28 01:24:42 -0700 (Mon, 28 May 2007) Log Message: ----------- fix background display screen Modified Paths: -------------- trunk/scsharp/src/SCSharpLib/MpqLib/MpqArchiveContainer.cs trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs trunk/scsharp/src/SCSharpLib/UI/GameMenuDialog.cs trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs trunk/scsharp/src/SCSharpLib/UI/HelpDialog.cs trunk/scsharp/src/SCSharpLib/UI/KeystrokeDialog.cs trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs trunk/scsharp/src/SCSharpLib/UI/MarkupScreen.cs trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs trunk/scsharp/src/SCSharpLib/UI/ObjectivesDialog.cs trunk/scsharp/src/SCSharpLib/UI/OptionsDialog.cs trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs trunk/scsharp/src/SCSharpLib/UI/RaceSelectionScreen.cs trunk/scsharp/src/SCSharpLib/UI/RestartConfirmationDialog.cs trunk/scsharp/src/SCSharpLib/UI/SoundDialog.cs trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs trunk/scsharp/src/SCSharpLib/UI/TitleScreen.cs trunk/scsharp/src/SCSharpLib/UI/VideoDialog.cs trunk/scsharp/tests/FontFoo.cs Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqArchiveContainer.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MpqArchiveContainer.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqArchiveContainer.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -65,6 +65,7 @@ } catch (FileNotFoundException) { + Console.WriteLine("File not found: " + path); return null; } } Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -278,14 +278,14 @@ { BufferData(); - int localposition = (int)(mPosition % mBlockSize); - int bytestocopy = Math.Min(mCurrentData.Length - localposition, count); - if (bytestocopy <= 0) return 0; + int localPosition = (int)(mPosition % mBlockSize); + int bytesToCopy = Math.Min(mCurrentData.Length - localPosition, count); + if (bytesToCopy <= 0) return 0; - Array.Copy(mCurrentData, localposition, buffer, offset, bytestocopy); + Array.Copy(mCurrentData, localPosition, buffer, offset, bytesToCopy); - mPosition += bytestocopy; - return bytestocopy; + mPosition += bytesToCopy; + return bytesToCopy; } /// <summary> Modified: trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public EndMissionDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.AbortMenuBin) + : base(parent, mpq, "glue\\palmm", BuiltIns.AbortMenuBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public ExitConfirmationDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.QuitBin) + : base(parent, mpq, "glue\\palmm", BuiltIns.QuitBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/GameMenuDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GameMenuDialog.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/GameMenuDialog.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public GameMenuDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.GameMenuBin) + : base(parent, mpq, "glue\\palmm", BuiltIns.GameMenuBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -48,9 +48,9 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public GameModeDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.GluGameModeBin) + : base(parent, mpq, "glue\\palmm", BuiltIns.GluGameModeBin) { - BackgroundPath = "glue\\Palmm\\retail_ex.pcx"; + BackgroundPath = "glue\\palmm\\retail_ex.pcx"; BackgroundTranslucent = 42; BackgroundTransparent = 0; } Modified: trunk/scsharp/src/SCSharpLib/UI/HelpDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/HelpDialog.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/HelpDialog.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public HelpDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.HelpMenuBin) + : base(parent, mpq, "glue\\palmm", BuiltIns.HelpMenuBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/KeystrokeDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/KeystrokeDialog.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/KeystrokeDialog.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public KeystrokeDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.HelpBin) + : base(parent, mpq, "glue\\palmm", BuiltIns.HelpBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -47,7 +47,7 @@ /// </summary> /// <param name="mpq"></param> public MainMenu(Mpq mpq) - : base(mpq, "glue\\Palmm", BuiltIns.GluMainBin) + : base(mpq, "glue\\palmm", BuiltIns.GluMainBin) { } @@ -75,7 +75,7 @@ GuiUtility.PlaySound(this.Mpq, BuiltIns.MouseDown2Wav); Game.Instance.SwitchToScreen(nextScreen); } - catch (Exception e) + catch (SCException e) { ShowDialog(new OkDialog(this, this.Mpq, e.Message)); } Modified: trunk/scsharp/src/SCSharpLib/UI/MarkupScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/MarkupScreen.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/MarkupScreen.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -118,7 +118,7 @@ lineSurfaces = new List<Surface>(); foreach (string l in lines) { - if (l.Trim().Length != 0) + if (l.Trim().Length == 0) { lineSurfaces.Add(null); } @@ -233,48 +233,48 @@ /// <param name="stream"></param> protected void AddMarkup(Stream stream) { - string l; + string line; MarkupPage currentPage = null; StreamReader sr = new StreamReader(stream); - while ((l = sr.ReadLine()) != null) + while ((line = sr.ReadLine()) != null) { - if (l.StartsWith("</")) + if (line.StartsWith("</")) { - if (l.StartsWith("</PAGE>")) + if (line.StartsWith("</PAGE>")) { currentPage.Layout(); pages.Add(currentPage); currentPage = null; } - else if (l.StartsWith("</SCREENCENTER>")) + else if (line.StartsWith("</SCREENCENTER>")) { currentPage = new MarkupPage(PageLocation.Center, fnt, pal); } - else if (l.StartsWith("</SCREENLEFT>")) + else if (line.StartsWith("</SCREENLEFT>")) { currentPage = new MarkupPage(PageLocation.Left, fnt, pal); } - else if (l.StartsWith("</SCREENLOWERLEFT>")) + else if (line.StartsWith("</SCREENLOWERLEFT>")) { currentPage = new MarkupPage(PageLocation.LowerLeft, fnt, pal); } - else if (l.StartsWith("</SCREENRIGHT>")) + else if (line.StartsWith("</SCREENRIGHT>")) { currentPage = new MarkupPage(PageLocation.Right, fnt, pal); } - else if (l.StartsWith("</SCREENTOP>")) + else if (line.StartsWith("</SCREENTOP>")) { currentPage = new MarkupPage(PageLocation.Top, fnt, pal); } - else if (l.StartsWith("</SCREENBOTTOM>")) + else if (line.StartsWith("</SCREENBOTTOM>")) { currentPage = new MarkupPage(PageLocation.Bottom, fnt, pal); } - else if (l.StartsWith("</BACKGROUND ")) + else if (line.StartsWith("</BACKGROUND ")) { - string bg = l.Substring("</BACKGROUND ".Length); + string bg = line.Substring("</BACKGROUND ".Length); bg = bg.Substring(0, bg.Length - 1); pages.Add(new MarkupPage((Stream)this.Mpq.GetResource(bg))); } @@ -288,7 +288,9 @@ } else if (currentPage != null) - currentPage.AddLine(l); + { + currentPage.AddLine(line); + } } } @@ -298,7 +300,7 @@ protected override void ResourceLoader() { Console.WriteLine("loading font palette"); - Stream palStream = (Stream)this.Mpq.GetResource("glue\\Palmm\\tFont.pcx"); + Stream palStream = (Stream)this.Mpq.GetResource("glue\\palmm\\tfont.pcx"); Pcx pcx = new Pcx(); pcx.ReadFromStream(palStream, -1, -1); Modified: trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public NetworkDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.NetDialogBin) + : base(parent, mpq, "glue\\palmm", BuiltIns.NetDialogBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/ObjectivesDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ObjectivesDialog.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/ObjectivesDialog.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public ObjectivesDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.ObjectDialogBin) + : base(parent, mpq, "glue\\palmm", BuiltIns.ObjectDialogBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/OptionsDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/OptionsDialog.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/OptionsDialog.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public OptionsDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.OptionsBin) + : base(parent, mpq, "glue\\palmm", BuiltIns.OptionsBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public QuitMissionDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.Quit2MenuBin) + : base(parent, mpq, "glue\\palmm", BuiltIns.Quit2MenuBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/RaceSelectionScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/RaceSelectionScreen.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/RaceSelectionScreen.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -1,7 +1,7 @@ #region LICENSE // // Authors: -// Chris Toshok (to...@hu...) +// Chris Toshok (to...@hu...) // // (C) 2006 The Hungry Programmers (http://www.hungry.com/) // @@ -12,10 +12,10 @@ // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: -// +// // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -40,44 +40,44 @@ namespace SCSharp.UI { /// <summary> - /// + /// /// </summary> public class RaceSelectionScreen : UIScreen { /// <summary> - /// + /// /// </summary> /// <param name="mpq"></param> public RaceSelectionScreen(Mpq mpq) : base(mpq, "glue\\PalNl", - Game.Instance.PlayingBroodWar ? BuiltIns.GluExpCampaignBin : BuiltIns.GluCampaignBin) + Game.Instance.PlayingBroodWar ? BuiltIns.GluExpCampaignBin : BuiltIns.GluCampaignBin) { BackgroundPath = null; } - int[] BroodwarCampaigns_MapDataStart = new int[] { - 31, - 40, - 49 - }; + int[] BroodwarCampaignsMapDataStart = new int[] { +31, +40, +49 +}; Race[] BroodWarRaces = new Race[] { - Race.Protoss, - Race.Terran, - Race.Zerg - }; +Race.Protoss, +Race.Terran, +Race.Zerg +}; - int[] StarcraftCampaigns_MapDataStart = new int[] { - 0, - 11, - 21 - }; + int[] StarcraftCampaignsMapDataStart = new int[] { +0, +11, +21 +}; Race[] StarcraftRaces = new Race[] { - Race.Terran, - Race.Zerg, - Race.Protoss - }; +Race.Terran, +Race.Zerg, +Race.Protoss +}; const int LOADSAVED_ELEMENT_INDEX = 3; const int THIRD_CAMPAIGN_ELEMENT_INDEX = 4; @@ -90,7 +90,7 @@ const int THIRD_BUT_SECOND_INCOMPLETE_INDEX = 11; /// <summary> - /// + /// /// </summary> protected override void ResourceLoader() { @@ -100,96 +100,96 @@ Console.WriteLine("{0}: {1} '{2}'", i, Elements[i].Type, Elements[i].Text); Elements[THIRD_CAMPAIGN_ELEMENT_INDEX].MouseEnterEvent += - delegate(object sender, SCEventArgs args) + delegate(object sender, SCEventArgs args) + { + Console.WriteLine("over third campaign element"); + if (true /* XXX this should come from the player's file */) { - Console.WriteLine("over third campaign element"); - if (true /* XXX this should come from the player's file */) - { - Elements[THIRD_BUT_FIRST_INCOMPLETE_INDEX].Visible = true; - } - }; + Elements[THIRD_BUT_FIRST_INCOMPLETE_INDEX].Visible = true; + } + }; Elements[THIRD_CAMPAIGN_ELEMENT_INDEX].MouseLeaveEvent += - delegate(object sender, SCEventArgs args) + delegate(object sender, SCEventArgs args) + { + if (true /* XXX this should come from the player's file */) { - if (true /* XXX this should come from the player's file */) - { - Elements[THIRD_BUT_FIRST_INCOMPLETE_INDEX].Visible = false; - } - }; + Elements[THIRD_BUT_FIRST_INCOMPLETE_INDEX].Visible = false; + } + }; Elements[SECOND_CAMPAIGN_ELEMENT_INDEX].MouseEnterEvent += - delegate(object sender, SCEventArgs args) + delegate(object sender, SCEventArgs args) + { + Console.WriteLine("over second campaign element"); + if (true /* XXX this should come from the player's file */) { - Console.WriteLine("over second campaign element"); - if (true /* XXX this should come from the player's file */) - { - Elements[SECOND_BUT_FIRST_INCOMPLETE_INDEX].Visible = true; - } - }; + Elements[SECOND_BUT_FIRST_INCOMPLETE_INDEX].Visible = true; + } + }; Elements[SECOND_CAMPAIGN_ELEMENT_INDEX].MouseLeaveEvent += - delegate(object sender, SCEventArgs args) + delegate(object sender, SCEventArgs args) + { + if (true /* XXX this should come from the player's file */) { - if (true /* XXX this should come from the player's file */) - { - Elements[SECOND_BUT_FIRST_INCOMPLETE_INDEX].Visible = false; - } - }; + Elements[SECOND_BUT_FIRST_INCOMPLETE_INDEX].Visible = false; + } + }; Elements[FIRST_CAMPAIGN_ELEMENT_INDEX].Activate += - delegate(object sender, SCEventArgs args) - { - SelectCampaign(0); - }; + delegate(object sender, SCEventArgs args) + { + SelectCampaign(0); + }; Elements[SECOND_CAMPAIGN_ELEMENT_INDEX].Activate += - delegate(object sender, SCEventArgs args) - { - SelectCampaign(1); - }; + delegate(object sender, SCEventArgs args) + { + SelectCampaign(1); + }; Elements[THIRD_CAMPAIGN_ELEMENT_INDEX].Activate += - delegate(object sender, SCEventArgs args) - { - SelectCampaign(2); - }; + delegate(object sender, SCEventArgs args) + { + SelectCampaign(2); + }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate(object sender, SCEventArgs args) - { - Game.Instance.SwitchToScreen(UIScreenType.LogOn); - }; + delegate(object sender, SCEventArgs args) + { + Game.Instance.SwitchToScreen(UIScreenType.LogOn); + }; Elements[LOADSAVED_ELEMENT_INDEX].Activate += - delegate(object sender, SCEventArgs args) - { - Game.Instance.SwitchToScreen(new LoadSavedScreen(this.Mpq)); - }; + delegate(object sender, SCEventArgs args) + { + Game.Instance.SwitchToScreen(new LoadSavedScreen(this.Mpq)); + }; Elements[PLAYCUSTOM_ELEMENT_INDEX].Activate += - delegate(object sender, SCEventArgs args) - { - Game.Instance.SwitchToScreen(new PlayCustomScreen(this.Mpq)); - }; + delegate(object sender, SCEventArgs args) + { + Game.Instance.SwitchToScreen(new PlayCustomScreen(this.Mpq)); + }; } void SelectCampaign(int campaign) { - uint mapdata_index; + uint mapdataIndex; string prefix; string markup; Game.Instance.Race = (Game.Instance.PlayingBroodWar ? BroodWarRaces : StarcraftRaces)[campaign]; - mapdata_index = GlobalResources.MapDataDat.GetFileIndex((uint)(Game.Instance.PlayingBroodWar ? BroodwarCampaigns_MapDataStart : StarcraftCampaigns_MapDataStart)[campaign]); + mapdataIndex = GlobalResources.MapDataDat.GetFileIndex((uint)(Game.Instance.PlayingBroodWar ? BroodwarCampaignsMapDataStart : StarcraftCampaignsMapDataStart)[campaign]); - prefix = GlobalResources.MapDataTbl[(int)mapdata_index]; + prefix = GlobalResources.MapDataTbl[(int)mapdataIndex]; markup = String.Format(CultureInfo.CurrentCulture, "rez\\Est{0}{1}{2}.txt", - Utilities.RaceChar[(int)Game.Instance.Race], - prefix.EndsWith("tutorial") ? "0t" : prefix.Substring(prefix.Length - 2), - Game.Instance.PlayingBroodWar ? "x" : ""); + Utilities.RaceChar[(int)Game.Instance.Race], + prefix.EndsWith("tutorial") ? "0t" : prefix.Substring(prefix.Length - 2), + Game.Instance.PlayingBroodWar ? "x" : ""); Game.Instance.SwitchToScreen(new EstablishingShot(markup, prefix, this.Mpq)); } Modified: trunk/scsharp/src/SCSharpLib/UI/RestartConfirmationDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/RestartConfirmationDialog.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/RestartConfirmationDialog.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public RestartConfirmationDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.RestartBin) + : base(parent, mpq, "glue\\palmm", BuiltIns.RestartBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/SoundDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/SoundDialog.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/SoundDialog.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public SoundDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.SoundDialogBin) + : base(parent, mpq, "glue\\palmm", BuiltIns.SoundDialogBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public SpeedDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.SpeedDialogBin) + : base(parent, mpq, "glue\\palmm", BuiltIns.SpeedDialogBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/TitleScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/TitleScreen.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/TitleScreen.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -47,7 +47,7 @@ /// </summary> /// <param name="mpq"></param> public TitleScreen(Mpq mpq) - : base(mpq, "glue\\Palmm", BuiltIns.TitleDialogBin) + : base(mpq, "glue\\palmm", BuiltIns.TitleDialogBin) { BackgroundPath = BuiltIns.TitlePcx; } Modified: trunk/scsharp/src/SCSharpLib/UI/VideoDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/VideoDialog.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/src/SCSharpLib/UI/VideoDialog.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public VideoDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.VideoBin) + : base(parent, mpq, "glue\\palmm", BuiltIns.VideoBin) { BackgroundPath = null; } Modified: trunk/scsharp/tests/FontFoo.cs =================================================================== --- trunk/scsharp/tests/FontFoo.cs 2007-05-26 06:10:28 UTC (rev 1405) +++ trunk/scsharp/tests/FontFoo.cs 2007-05-28 08:24:42 UTC (rev 1406) @@ -67,7 +67,7 @@ SCFont fnt = (SCFont)mpq.GetResource("files\\font\\font16.fnt"); Console.WriteLine("loading font palette"); - Stream palStream = (Stream)mpq.GetResource("glue\\Palmm\\tFont.pcx"); + Stream palStream = (Stream)mpq.GetResource("glue\\palmm\\tfont.pcx"); Pcx pcx1 = new Pcx(); pcx1.ReadFromStream(palStream, -1, -1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-06-01 08:00:37
|
Revision: 1410 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1410&view=rev Author: jendave Date: 2007-06-01 01:00:35 -0700 (Fri, 01 Jun 2007) Log Message: ----------- build fixes Modified Paths: -------------- trunk/scsharp/package.xml Added Paths: ----------- trunk/scsharp/prebuild trunk/scsharp/prebuild.exe Modified: trunk/scsharp/package.xml =================================================================== --- trunk/scsharp/package.xml 2007-05-30 20:18:00 UTC (rev 1409) +++ trunk/scsharp/package.xml 2007-06-01 08:00:35 UTC (rev 1410) @@ -92,7 +92,7 @@ </copy> </if> - <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${bin.dir}/assemblies" flatten="true"> + <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}" flatten="true"> <fileset basedir="${project::get-base-directory()}/${src.dir}/SCSharp/${bin.dir}/${project.config}"> <include name="**/*.exe" /> <include name="**/*.config" /> @@ -102,34 +102,34 @@ <include name="**/*.xml"/> </fileset> </copy> - <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${bin.dir}/assemblies" flatten="true"> + <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}" flatten="true"> <fileset basedir="${project::get-base-directory()}/${src.dir}/SCSharp"> <include name="**/*.sh" /> </fileset> </copy> <if test="${platform::is-unix() and not is-osx}"> - <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${bin.dir}/assemblies"> + <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}"> <fileset basedir="${project::get-base-directory()}/${lib.dir}/net-2.0"> <include name="${native.sdl}.dll.config"/> </fileset> </copy> </if> <if test="${is-osx}"> - <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${bin.dir}/assemblies"> + <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}"> <fileset basedir="${project::get-base-directory()}/${lib.dir}/net-2.0/osx"> <include name="${native.sdl}.dll.config"/> </fileset> </copy> </if> <if test="${platform::is-win32()}"> - <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${bin.dir}/win32deps"> + <copy todir="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/win32deps"> <fileset basedir="${lib.dir}/win32deps"> <include name="**"/> </fileset> </copy> </if> <if test="${is-osx}"> - <property name="examples.path" value="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${bin.dir}/assemblies"/> + <property name="examples.path" value="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}"/> <exec program="macpack" commandline="-m:2 -o:${examples.path} -m cocoa -r:${examples.path}/SdlDotNet.dll -r:${examples.path}/Tao.Sdl.dll -r:${examples.path}/Tao.Sdl.dll.config -r:${examples.path}/ICSharpCode.SharpZipLib.dll -i:sdldotnet.icns -n:SCSharp -a:${examples.path}/SCSharp.exe" /> </if> </target> Added: trunk/scsharp/prebuild =================================================================== --- trunk/scsharp/prebuild (rev 0) +++ trunk/scsharp/prebuild 2007-06-01 08:00:35 UTC (rev 1410) @@ -0,0 +1,2 @@ +#!/bin/sh +exec mono c:/local/lib/prebuild/prebuild.exe "$@" Added: trunk/scsharp/prebuild.exe =================================================================== (Binary files differ) Property changes on: trunk/scsharp/prebuild.exe ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |