You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
(8) |
May
(40) |
Jun
(6) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(1) |
Feb
(48) |
Mar
(2) |
Apr
(15) |
May
(7) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(13) |
Sep
|
Oct
|
Nov
(61) |
Dec
|
2010 |
Jan
|
Feb
(22) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(3) |
Oct
|
Nov
(30) |
Dec
(4) |
2011 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
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. |
From: <je...@us...> - 2007-05-30 20:18:02
|
Revision: 1409 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1409&view=rev Author: jendave Date: 2007-05-30 13:18:00 -0700 (Wed, 30 May 2007) Log Message: ----------- update to .NET 2.0. All the enet functionality does not work anymore. Modified Paths: -------------- trunk/Mezzanine/Mezzanine/GameMain.cs trunk/Mezzanine/Mezzanine/Mezzanine.csproj trunk/Mezzanine/Mezzanine.sln trunk/Mezzanine/MezzanineLib/GameInit.cs trunk/Mezzanine/MezzanineLib/MezzanineLib.csproj trunk/Mezzanine/MezzanineLib/Render/RenderGl.cs trunk/Mezzanine/MezzanineLib/Support/Sound.cs trunk/Mezzanine/MezzanineManagedLib/MezzanineManagedLib.vcproj trunk/Mezzanine/MezzanineManagedLib/enet/host.c trunk/Mezzanine/MezzanineManagedLib/enet/include/enet/list.h trunk/Mezzanine/MezzanineManagedLib/enet/list.c trunk/Mezzanine/MezzanineManagedLib/enet/peer.c trunk/Mezzanine/MezzanineManagedLib/enet/protocol.c trunk/Mezzanine/MezzanineManagedLib/src/console.cpp trunk/Mezzanine/MezzanineManagedLib/src/editing.cpp trunk/Mezzanine/MezzanineManagedLib/src/menus.cpp trunk/Mezzanine/MezzanineManagedLib/src/worldio.cpp trunk/Mezzanine/lib/SdlDotNet.dll trunk/Mezzanine/lib/SdlDotNet.xml trunk/Mezzanine/lib/Tao.OpenGl.dll trunk/Mezzanine/lib/Tao.Sdl.dll Added Paths: ----------- trunk/Mezzanine/lib/Tao.OpenGl.License.txt trunk/Mezzanine/lib/Tao.OpenGl.Readme.txt trunk/Mezzanine/lib/Tao.OpenGl.dll.config trunk/Mezzanine/lib/Tao.OpenGl.xml trunk/Mezzanine/lib/Tao.Sdl.License.txt trunk/Mezzanine/lib/Tao.Sdl.dll.config Removed Paths: ------------- trunk/Mezzanine/lib/Tao.OpenGl.ExtensionLoader.dll trunk/Mezzanine/lib/Tao.OpenGl.ExtensionLoader.xml trunk/Mezzanine/lib/Tao.OpenGl.Glu.dll trunk/Mezzanine/lib/Tao.OpenGl.Glu.xml Modified: trunk/Mezzanine/Mezzanine/GameMain.cs =================================================================== --- trunk/Mezzanine/Mezzanine/GameMain.cs 2007-05-30 19:56:49 UTC (rev 1408) +++ trunk/Mezzanine/Mezzanine/GameMain.cs 2007-05-30 20:18:00 UTC (rev 1409) @@ -36,7 +36,10 @@ using System.IO; using Tao.Sdl; using Tao.OpenGl; -using SdlDotNet; +using SdlDotNet.Core; +using SdlDotNet.Input; +using SdlDotNet.Graphics; +using SdlDotNet.Audio; using System.Runtime.InteropServices; using MezzanineLib; @@ -155,7 +158,7 @@ { Video.GrabInput = true; } - Video.SetVideoModeWindowOpenGL(GameInit.ScreenWidth, GameInit.ScreenHeight); + Video.SetVideoMode(GameInit.ScreenWidth, GameInit.ScreenHeight, false, true); MezzanineLib.GameInit.Log("video: misc"); Keyboard.KeyRepeat = false; @@ -212,13 +215,13 @@ MezzanineLib.Bindings.changemap("metl3"); MezzanineLib.GameInit.Log("mainloop"); - Events.KeyboardDown += new KeyboardEventHandler(this.KeyDown); - Events.KeyboardUp += new KeyboardEventHandler(this.KeyUp); - Events.Tick += new TickEventHandler(this.Tick); - Events.Quit += new QuitEventHandler(this.Quit); - Events.MouseMotion += new MouseMotionEventHandler(this.MouseMotion); - Events.MouseButtonUp += new MouseButtonEventHandler(this.MouseButtonUp); - Events.MouseButtonDown += new MouseButtonEventHandler(this.MouseButtonDown); + Events.KeyboardDown += new EventHandler<KeyboardEventArgs>(this.KeyDown); + Events.KeyboardUp += new EventHandler<KeyboardEventArgs>(this.KeyUp); + Events.Tick += new EventHandler<TickEventArgs>(this.Tick); + Events.Quit += new EventHandler<QuitEventArgs>(this.Quit); + Events.MouseMotion += new EventHandler<MouseMotionEventArgs>(this.MouseMotion); + Events.MouseButtonUp += new EventHandler<MouseButtonEventArgs>(this.MouseButtonUp); + Events.MouseButtonDown += new EventHandler<MouseButtonEventArgs>(this.MouseButtonDown); Events.Run(); } private void Tick(object sender, TickEventArgs e) Modified: trunk/Mezzanine/Mezzanine/Mezzanine.csproj =================================================================== --- trunk/Mezzanine/Mezzanine/Mezzanine.csproj 2007-05-30 19:56:49 UTC (rev 1408) +++ trunk/Mezzanine/Mezzanine/Mezzanine.csproj 2007-05-30 20:18:00 UTC (rev 1409) @@ -1,139 +1,122 @@ -<VisualStudioProject> - <CSHARP - ProjectType = "Local" - ProductVersion = "7.10.3077" - SchemaVersion = "2.0" - ProjectGuid = "{456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}" - > - <Build> - <Settings - ApplicationIcon = "App.ico" - AssemblyKeyContainerName = "" - AssemblyName = "Mezzanine" - AssemblyOriginatorKeyFile = "" - DefaultClientScript = "JScript" - DefaultHTMLPageLayout = "Grid" - DefaultTargetSchema = "IE50" - DelaySign = "false" - OutputType = "WinExe" - PreBuildEvent = "" - PostBuildEvent = "" - RootNamespace = "Mezzanine" - RunPostBuildEvent = "OnBuildSuccess" - StartupObject = "Mezzanine.GameMain" - > - <Config - Name = "Debug" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "DEBUG;TRACE" - DocumentationFile = "" - DebugSymbols = "true" - FileAlignment = "4096" - IncrementalBuild = "false" - NoStdLib = "false" - NoWarn = "" - Optimize = "false" - OutputPath = "bin\Debug\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "false" - WarningLevel = "4" - /> - <Config - Name = "Release" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "TRACE" - DocumentationFile = "" - DebugSymbols = "false" - FileAlignment = "4096" - IncrementalBuild = "false" - NoStdLib = "false" - NoWarn = "" - Optimize = "true" - OutputPath = "bin\Release\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "false" - WarningLevel = "4" - /> - </Settings> - <References> - <Reference - Name = "System" - AssemblyName = "System" - HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.dll" - /> - <Reference - Name = "System.Data" - AssemblyName = "System.Data" - HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" - /> - <Reference - Name = "System.XML" - AssemblyName = "System.Xml" - HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" - /> - <Reference - Name = "Tao.OpenGl.Glu" - AssemblyName = "Tao.OpenGl.Glu" - HintPath = "..\lib\Tao.OpenGl.Glu.dll" - /> - <Reference - Name = "Tao.OpenGl" - AssemblyName = "Tao.OpenGl" - HintPath = "..\lib\Tao.OpenGl.dll" - /> - <Reference - Name = "Tao.OpenGl.ExtensionLoader" - AssemblyName = "Tao.OpenGl.ExtensionLoader" - HintPath = "..\lib\Tao.OpenGl.ExtensionLoader.dll" - /> - <Reference - Name = "SdlDotNet" - AssemblyName = "SdlDotNet" - HintPath = "..\lib\SdlDotNet.dll" - /> - <Reference - Name = "MezzanineLib" - Project = "{DF0A7A59-91FA-438C-B859-D35C3963A553}" - Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" - /> - <Reference - Name = "MezzanineManagedLib" - Project = "{7923259E-4B01-4566-9B36-EA5173A0C60C}" - Package = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}" - /> - <Reference - Name = "Tao.Sdl" - AssemblyName = "Tao.Sdl" - HintPath = "..\lib\Tao.Sdl.dll" - /> - </References> - </Build> - <Files> - <Include> - <File - RelPath = "App.ico" - BuildAction = "EmbeddedResource" - /> - <File - RelPath = "AssemblyInfo.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "GameMain.cs" - SubType = "Code" - BuildAction = "Compile" - /> - </Include> - </Files> - </CSHARP> -</VisualStudioProject> - +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectType>Local</ProjectType> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}</ProjectGuid> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ApplicationIcon>App.ico</ApplicationIcon> + <AssemblyKeyContainerName> + </AssemblyKeyContainerName> + <AssemblyName>Mezzanine</AssemblyName> + <AssemblyOriginatorKeyFile> + </AssemblyOriginatorKeyFile> + <DefaultClientScript>JScript</DefaultClientScript> + <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> + <DefaultTargetSchema>IE50</DefaultTargetSchema> + <DelaySign>false</DelaySign> + <OutputType>WinExe</OutputType> + <RootNamespace>Mezzanine</RootNamespace> + <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> + <StartupObject>Mezzanine.GameMain</StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <OutputPath>bin\Debug\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>true</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>false</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>full</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <OutputPath>bin\Release\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>false</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>true</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>none</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <ItemGroup> + <Reference Include="SdlDotNet, Version=6.0.0.0, Culture=neutral, PublicKeyToken=26ad4f7e10c61408, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\lib\SdlDotNet.dll</HintPath> + </Reference> + <Reference Include="System"> + <Name>System</Name> + </Reference> + <Reference Include="System.Data"> + <Name>System.Data</Name> + </Reference> + <Reference Include="System.Xml"> + <Name>System.XML</Name> + </Reference> + <Reference Include="Tao.OpenGl, Version=2.1.0.4, Culture=neutral, PublicKeyToken=1ca010269a4501ef, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\lib\Tao.OpenGl.dll</HintPath> + </Reference> + <Reference Include="Tao.Sdl, Version=1.2.11.1, Culture=neutral, PublicKeyToken=9c7a200e36c0094e, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\lib\Tao.Sdl.dll</HintPath> + </Reference> + <ProjectReference Include="..\MezzanineLib\MezzanineLib.csproj"> + <Name>MezzanineLib</Name> + <Project>{DF0A7A59-91FA-438C-B859-D35C3963A553}</Project> + <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> + </ProjectReference> + <ProjectReference Include="..\MezzanineManagedLib\MezzanineManagedLib.vcproj"> + <Project>{7923259E-4B01-4566-9B36-EA5173A0C60C}</Project> + <Name>MezzanineManagedLib</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="App.ico" /> + <Compile Include="AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="GameMain.cs"> + <SubType>Code</SubType> + </Compile> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent> + </PreBuildEvent> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Modified: trunk/Mezzanine/Mezzanine.sln =================================================================== --- trunk/Mezzanine/Mezzanine.sln 2007-05-30 19:56:49 UTC (rev 1408) +++ trunk/Mezzanine/Mezzanine.sln 2007-05-30 20:18:00 UTC (rev 1409) @@ -1,45 +1,74 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mezzanine", "Mezzanine\Mezzanine.csproj", "{456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MezzanineLib", "MezzanineLib\MezzanineLib.csproj", "{DF0A7A59-91FA-438C-B859-D35C3963A553}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MezzanineManagedLib", "MezzanineManagedLib\MezzanineManagedLib.vcproj", "{7923259E-4B01-4566-9B36-EA5173A0C60C}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Profile = Profile - Release = Release + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|Win32 = Debug|Win32 + Profile|Any CPU = Profile|Any CPU + Profile|Mixed Platforms = Profile|Mixed Platforms + Profile|Win32 = Profile|Win32 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|Win32 = Release|Win32 EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Debug.ActiveCfg = Debug|.NET - {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Debug.Build.0 = Debug|.NET - {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Profile.ActiveCfg = Release|.NET - {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Profile.Build.0 = Release|.NET - {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Release.ActiveCfg = Release|.NET - {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Release.Build.0 = Release|.NET - {DF0A7A59-91FA-438C-B859-D35C3963A553}.Debug.ActiveCfg = Debug|.NET - {DF0A7A59-91FA-438C-B859-D35C3963A553}.Debug.Build.0 = Debug|.NET - {DF0A7A59-91FA-438C-B859-D35C3963A553}.Profile.ActiveCfg = Release|.NET - {DF0A7A59-91FA-438C-B859-D35C3963A553}.Profile.Build.0 = Release|.NET - {DF0A7A59-91FA-438C-B859-D35C3963A553}.Release.ActiveCfg = Release|.NET - {DF0A7A59-91FA-438C-B859-D35C3963A553}.Release.Build.0 = Release|.NET - {7923259E-4B01-4566-9B36-EA5173A0C60C}.Debug.ActiveCfg = Debug|Win32 - {7923259E-4B01-4566-9B36-EA5173A0C60C}.Debug.Build.0 = Debug|Win32 - {7923259E-4B01-4566-9B36-EA5173A0C60C}.Profile.ActiveCfg = Profile|Win32 - {7923259E-4B01-4566-9B36-EA5173A0C60C}.Profile.Build.0 = Profile|Win32 - {7923259E-4B01-4566-9B36-EA5173A0C60C}.Release.ActiveCfg = Release|Win32 - {7923259E-4B01-4566-9B36-EA5173A0C60C}.Release.Build.0 = Release|Win32 + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Debug|Any CPU.Build.0 = Debug|Any CPU + {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Debug|Win32.ActiveCfg = Debug|Any CPU + {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Profile|Any CPU.ActiveCfg = Release|Any CPU + {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Profile|Any CPU.Build.0 = Release|Any CPU + {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Profile|Mixed Platforms.ActiveCfg = Release|Any CPU + {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Profile|Mixed Platforms.Build.0 = Release|Any CPU + {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Profile|Win32.ActiveCfg = Release|Any CPU + {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Release|Any CPU.ActiveCfg = Release|Any CPU + {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Release|Any CPU.Build.0 = Release|Any CPU + {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {456AA9A9-6B2C-4710-97A8-8DC7CB2D7A35}.Release|Win32.ActiveCfg = Release|Any CPU + {DF0A7A59-91FA-438C-B859-D35C3963A553}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DF0A7A59-91FA-438C-B859-D35C3963A553}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DF0A7A59-91FA-438C-B859-D35C3963A553}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {DF0A7A59-91FA-438C-B859-D35C3963A553}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {DF0A7A59-91FA-438C-B859-D35C3963A553}.Debug|Win32.ActiveCfg = Debug|Any CPU + {DF0A7A59-91FA-438C-B859-D35C3963A553}.Profile|Any CPU.ActiveCfg = Release|Any CPU + {DF0A7A59-91FA-438C-B859-D35C3963A553}.Profile|Any CPU.Build.0 = Release|Any CPU + {DF0A7A59-91FA-438C-B859-D35C3963A553}.Profile|Mixed Platforms.ActiveCfg = Release|Any CPU + {DF0A7A59-91FA-438C-B859-D35C3963A553}.Profile|Mixed Platforms.Build.0 = Release|Any CPU + {DF0A7A59-91FA-438C-B859-D35C3963A553}.Profile|Win32.ActiveCfg = Release|Any CPU + {DF0A7A59-91FA-438C-B859-D35C3963A553}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DF0A7A59-91FA-438C-B859-D35C3963A553}.Release|Any CPU.Build.0 = Release|Any CPU + {DF0A7A59-91FA-438C-B859-D35C3963A553}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {DF0A7A59-91FA-438C-B859-D35C3963A553}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {DF0A7A59-91FA-438C-B859-D35C3963A553}.Release|Win32.ActiveCfg = Release|Any CPU + {7923259E-4B01-4566-9B36-EA5173A0C60C}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {7923259E-4B01-4566-9B36-EA5173A0C60C}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {7923259E-4B01-4566-9B36-EA5173A0C60C}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {7923259E-4B01-4566-9B36-EA5173A0C60C}.Debug|Win32.ActiveCfg = Debug|Win32 + {7923259E-4B01-4566-9B36-EA5173A0C60C}.Debug|Win32.Build.0 = Debug|Win32 + {7923259E-4B01-4566-9B36-EA5173A0C60C}.Profile|Any CPU.ActiveCfg = Profile|Win32 + {7923259E-4B01-4566-9B36-EA5173A0C60C}.Profile|Mixed Platforms.ActiveCfg = Profile|Win32 + {7923259E-4B01-4566-9B36-EA5173A0C60C}.Profile|Mixed Platforms.Build.0 = Profile|Win32 + {7923259E-4B01-4566-9B36-EA5173A0C60C}.Profile|Win32.ActiveCfg = Profile|Win32 + {7923259E-4B01-4566-9B36-EA5173A0C60C}.Profile|Win32.Build.0 = Profile|Win32 + {7923259E-4B01-4566-9B36-EA5173A0C60C}.Release|Any CPU.ActiveCfg = Release|Win32 + {7923259E-4B01-4566-9B36-EA5173A0C60C}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {7923259E-4B01-4566-9B36-EA5173A0C60C}.Release|Mixed Platforms.Build.0 = Release|Win32 + {7923259E-4B01-4566-9B36-EA5173A0C60C}.Release|Win32.ActiveCfg = Release|Win32 + {7923259E-4B01-4566-9B36-EA5173A0C60C}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution DPBuild = 5 EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection EndGlobal Modified: trunk/Mezzanine/MezzanineLib/GameInit.cs =================================================================== --- trunk/Mezzanine/MezzanineLib/GameInit.cs 2007-05-30 19:56:49 UTC (rev 1408) +++ trunk/Mezzanine/MezzanineLib/GameInit.cs 2007-05-30 20:18:00 UTC (rev 1409) @@ -34,7 +34,9 @@ using System.IO; using Tao.Sdl; using Tao.OpenGl; -using SdlDotNet; +using SdlDotNet.Input; +using SdlDotNet.Graphics; +using SdlDotNet.Core; using System.Runtime.InteropServices; using MezzanineLib.ClientServer; using MezzanineLib.Render; @@ -525,7 +527,7 @@ //Note that the openGL surface is flip upside down and the bits are reversed. These lines correct that. Surface temp = new Surface(ScreenWidth, ScreenHeight, 24, 0x0000FF, 0x00FF00, 0xFF0000, 0); Gl.glReadPixels(0, 0, ScreenWidth, ScreenHeight, Gl.GL_RGB, Gl.GL_UNSIGNED_BYTE, temp.Pixels); - temp.FlipVertical(); + temp = temp.CreateFlippedVerticalSurface(); temp.SaveBmp("screenshots/screenshot_"+Timer.TicksElapsed.ToString()+".bmp"); temp.Dispose(); } Modified: trunk/Mezzanine/MezzanineLib/MezzanineLib.csproj =================================================================== --- trunk/Mezzanine/MezzanineLib/MezzanineLib.csproj 2007-05-30 19:56:49 UTC (rev 1408) +++ trunk/Mezzanine/MezzanineLib/MezzanineLib.csproj 2007-05-30 20:18:00 UTC (rev 1409) @@ -1,290 +1,213 @@ -<VisualStudioProject> - <CSHARP - ProjectType = "Local" - ProductVersion = "7.10.3077" - SchemaVersion = "2.0" - ProjectGuid = "{DF0A7A59-91FA-438C-B859-D35C3963A553}" - > - <Build> - <Settings - ApplicationIcon = "" - AssemblyKeyContainerName = "" - AssemblyName = "MezzanineLib" - AssemblyOriginatorKeyFile = "" - DefaultClientScript = "JScript" - DefaultHTMLPageLayout = "Grid" - DefaultTargetSchema = "IE50" - DelaySign = "false" - OutputType = "Library" - PreBuildEvent = "" - PostBuildEvent = "" - RootNamespace = "MezzanineLib" - RunPostBuildEvent = "OnBuildSuccess" - StartupObject = "" - > - <Config - Name = "Debug" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "DEBUG;TRACE" - DocumentationFile = "" - DebugSymbols = "true" - FileAlignment = "4096" - IncrementalBuild = "false" - NoStdLib = "false" - NoWarn = "" - Optimize = "false" - OutputPath = "bin\Debug\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "false" - WarningLevel = "4" - /> - <Config - Name = "Release" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "TRACE" - DocumentationFile = "" - DebugSymbols = "false" - FileAlignment = "4096" - IncrementalBuild = "false" - NoStdLib = "false" - NoWarn = "" - Optimize = "true" - OutputPath = "bin\Release\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "false" - WarningLevel = "4" - /> - </Settings> - <References> - <Reference - Name = "System" - AssemblyName = "System" - HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.dll" - /> - <Reference - Name = "System.Data" - AssemblyName = "System.Data" - HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" - /> - <Reference - Name = "System.XML" - AssemblyName = "System.Xml" - HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" - /> - <Reference - Name = "SdlDotNet" - AssemblyName = "SdlDotNet" - HintPath = "..\lib\SdlDotNet.dll" - /> - <Reference - Name = "Tao.OpenGl.ExtensionLoader" - AssemblyName = "Tao.OpenGl.ExtensionLoader" - HintPath = "..\lib\Tao.OpenGl.ExtensionLoader.dll" - /> - <Reference - Name = "Tao.OpenGl.Glu" - AssemblyName = "Tao.OpenGl.Glu" - HintPath = "..\lib\Tao.OpenGl.Glu.dll" - /> - <Reference - Name = "Tao.OpenGl" - AssemblyName = "Tao.OpenGl" - HintPath = "..\lib\Tao.OpenGl.dll" - /> - <Reference - Name = "System.Drawing" - AssemblyName = "System.Drawing" - HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll" - /> - <Reference - Name = "Tao.Sdl" - AssemblyName = "Tao.Sdl" - HintPath = "..\lib\Tao.Sdl.dll" - /> - </References> - </Build> - <Files> - <Include> - <File - RelPath = "AssemblyInfo.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Bindings.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Enumerations.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "GameInit.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ClientServer\Client.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ClientServer\ClientExtras.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ClientServer\ClientGame.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ClientServer\Clients2C.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ClientServer\Server.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ClientServer\ServerBrowser.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ClientServer\ServerMS.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ClientServer\ServerUtil.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Game\Entities.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Game\Monster.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Game\Physics.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Game\SaveGameDemo.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Game\Weapon.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Render\RenderCubes.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Render\RenderExtras.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Render\RenderGl.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Render\RenderMD2.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Render\RenderParticles.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Render\RenderText.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Support\Command.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Support\Console.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Support\Menus.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Support\Sound.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Support\Tools.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "World\Editing.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "World\World.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "World\WorldIO.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "World\WorldLight.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "World\WorldOcull.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "World\WorldRender.cs" - SubType = "Code" - BuildAction = "Compile" - /> - </Include> - </Files> - </CSHARP> -</VisualStudioProject> - +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectType>Local</ProjectType> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{DF0A7A59-91FA-438C-B859-D35C3963A553}</ProjectGuid> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ApplicationIcon> + </ApplicationIcon> + <AssemblyKeyContainerName> + </AssemblyKeyContainerName> + <AssemblyName>MezzanineLib</AssemblyName> + <AssemblyOriginatorKeyFile> + </AssemblyOriginatorKeyFile> + <DefaultClientScript>JScript</DefaultClientScript> + <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> + <DefaultTargetSchema>IE50</DefaultTargetSchema> + <DelaySign>false</DelaySign> + <OutputType>Library</OutputType> + <RootNamespace>MezzanineLib</RootNamespace> + <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> + <StartupObject> + </StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <OutputPath>bin\Debug\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>true</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>false</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>full</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <OutputPath>bin\Release\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>false</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>true</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>none</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <ItemGroup> + <Reference Include="SdlDotNet, Version=6.0.0.0, Culture=neutral, PublicKeyToken=26ad4f7e10c61408, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\lib\SdlDotNet.dll</HintPath> + </Reference> + <Reference Include="System"> + <Name>System</Name> + </Reference> + <Reference Include="System.Data"> + <Name>System.Data</Name> + </Reference> + <Reference Include="System.Drawing"> + <Name>System.Drawing</Name> + </Reference> + <Reference Include="System.Xml"> + <Name>System.XML</Name> + </Reference> + <Reference Include="Tao.OpenGl, Version=2.1.0.4, Culture=neutral, PublicKeyToken=1ca010269a4501ef, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\lib\Tao.OpenGl.dll</HintPath> + </Reference> + <Reference Include="Tao.Sdl, Version=1.2.11.1, Culture=neutral, PublicKeyToken=9c7a200e36c0094e, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\lib\Tao.Sdl.dll</HintPath> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Bindings.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ClientServer\Client.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ClientServer\ClientExtras.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ClientServer\ClientGame.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ClientServer\Clients2C.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ClientServer\Server.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ClientServer\ServerBrowser.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ClientServer\ServerMS.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ClientServer\ServerUtil.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Enumerations.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="GameInit.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Game\Entities.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Game\Monster.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Game\Physics.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Game\SaveGameDemo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Game\Weapon.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Render\RenderCubes.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Render\RenderExtras.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Render\RenderGl.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Render\RenderMD2.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Render\RenderParticles.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Render\RenderText.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Support\Command.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Support\Console.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Support\Menus.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Support\Sound.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Support\Tools.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="World\Editing.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="World\World.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="World\WorldIO.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="World\WorldLight.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="World\WorldOcull.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="World\WorldRender.cs"> + <SubType>Code</SubType> + </Compile> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent> + </PreBuildEvent> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Modified: trunk/Mezzanine/MezzanineLib/Render/RenderGl.cs =================================================================== --- trunk/Mezzanine/MezzanineLib/Render/RenderGl.cs 2007-05-30 19:56:49 UTC (rev 1408) +++ trunk/Mezzanine/MezzanineLib/Render/RenderGl.cs 2007-05-30 20:18:00 UTC (rev 1409) @@ -37,7 +37,7 @@ using System.IO; using Tao.Sdl; using Tao.OpenGl; -using SdlDotNet; +using SdlDotNet.Graphics; using System.Runtime.InteropServices; namespace MezzanineLib.Render @@ -45,7 +45,7 @@ public sealed class RenderGl { static Glu.GLUquadric qsphere; - static int glmaxtexsize = 256; + static int[] glmaxtexsize = { 256 }; static bool hasOverBright = false; static string[] hudGunNames = { @@ -327,12 +327,12 @@ Gl.glCullFace(Gl.GL_FRONT); Gl.glEnable(Gl.GL_CULL_FACE); - IntPtr exts = Gl.glGetString(Gl.GL_EXTENSIONS); + string exts = Gl.glGetString(Gl.GL_EXTENSIONS); //if(strstr(exts, "GL_EXT_texture_env_combine")) hasoverbright = true; //else conoutf("WARNING: cannot use overbright lighting, using old lighting model!"); - Gl.glGetIntegerv(Gl.GL_MAX_TEXTURE_SIZE, out glmaxtexsize); + Gl.glGetIntegerv(Gl.GL_MAX_TEXTURE_SIZE, glmaxtexsize); PurgeTextures(); @@ -540,7 +540,7 @@ Gl.glTexEnvi(Gl.GL_TEXTURE_ENV, Gl.GL_TEXTURE_ENV_MODE, Gl.GL_MODULATE); xs = s.Width; ys = s.Height; - while(xs>glmaxtexsize || ys>glmaxtexsize) + while(xs>glmaxtexsize[0] || ys>glmaxtexsize[0]) { xs /= 2; ys /= 2; Modified: trunk/Mezzanine/MezzanineLib/Support/Sound.cs =================================================================== --- trunk/Mezzanine/MezzanineLib/Support/Sound.cs 2007-05-30 19:56:49 UTC (rev 1408) +++ trunk/Mezzanine/MezzanineLib/Support/Sound.cs 2007-05-30 20:18:00 UTC (rev 1409) @@ -37,7 +37,7 @@ using System.IO; using Tao.Sdl; using Tao.OpenGl; -using SdlDotNet; +using SdlDotNet.Audio; using System.Runtime.InteropServices; namespace MezzanineLib.Support @@ -65,7 +65,7 @@ public static bool noSound = false; static int soundVolume = 255; static int musicVolume = 128; - static SdlDotNet.Music music; + static SdlDotNet.Audio.Music music; static SoundLocation[] soundLocations = new SoundLocation[MAXCHAN]; public static ArrayList samples = new ArrayList(); public static ArrayList snames = new ArrayList(); @@ -98,7 +98,7 @@ { return; } - SdlDotNet.Music.Stop(); + SdlDotNet.Audio.MusicPlayer.Stop(); if(soundVolume!= 0 && musicVolume!=0) { // string soundName = @"packages/" + filename; @@ -126,7 +126,7 @@ public static void CleanSound() { - SdlDotNet.Music.Stop(); + SdlDotNet.Audio.MusicPlayer.Stop(); Mixer.Close(); } @@ -205,11 +205,11 @@ if(samples[n]==null) { - samples[n] = new SdlDotNet.Sound(GameInit.NormalizePath("packages/sounds/" + snames[n] + ".wav")); + samples[n] = new SdlDotNet.Audio.Sound(GameInit.NormalizePath("packages/sounds/" + snames[n] + ".wav")); // if(!samples[n]) { conoutf("failed to load sample: %s", buf); return; }; } - SdlDotNet.Channel channel = ((SdlDotNet.Sound)samples[n]).Play(); + Channel channel = ((SdlDotNet.Audio.Sound)samples[n]).Play(); if(channel.Index<0) { return; Modified: trunk/Mezzanine/MezzanineManagedLib/MezzanineManagedLib.vcproj =================================================================== --- trunk/Mezzanine/MezzanineManagedLib/MezzanineManagedLib.vcproj 2007-05-30 19:56:49 UTC (rev 1408) +++ trunk/Mezzanine/MezzanineManagedLib/MezzanineManagedLib.vcproj 2007-05-30 20:18:00 UTC (rev 1409) @@ -1,45 +1,63 @@ <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" - Version="7.10" + Version="8.00" Name="MezzanineManagedLib" ProjectGUID="{7923259E-4B01-4566-9B36-EA5173A0C60C}" RootNamespace="cube" - SccProjectName="" - SccLocalPath=""> + > <Platforms> <Platform - Name="Win32"/> + Name="Win32" + /> </Platforms> + <ToolFiles> + </ToolFiles> <Configurations> <Configuration Name="Release|Win32" OutputDirectory=".\Release" IntermediateDirectory=".\Release" ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" + ATLMinimizesCRunTimeLibraryUsage="false" CharacterSet="2" - WholeProgramOptimization="TRUE"> + WholeProgramOptimization="1" + > <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Release/cube.tlb" + /> + <Tool Name="VCCLCompilerTool" Optimization="3" - GlobalOptimizations="TRUE" InlineFunctionExpansion="2" - EnableIntrinsicFunctions="TRUE" + EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" - OmitFramePointers="TRUE" - OptimizeForProcessor="2" + OmitFramePointers="true" AdditionalIncludeDirectories=""C:\Documents and Settings\DYYH\My Documents\workspace\tess\include";"C:\Documents and Settings\DYYH\My Documents\workspace\tess\enet\include"" PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE" - StringPooling="TRUE" - MinimalRebuild="FALSE" - ExceptionHandling="FALSE" + StringPooling="true" + MinimalRebuild="false" + ExceptionHandling="0" RuntimeLibrary="0" - BufferSecurityCheck="FALSE" - EnableFunctionLevelLinking="FALSE" - DisableLanguageExtensions="FALSE" - ForceConformanceInForLoopScope="TRUE" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="false" + DisableLanguageExtensions="false" + ForceConformanceInForLoopScope="true" UsePrecompiledHeader="0" PrecompiledHeaderThrough="cube.h" PrecompiledHeaderFile=".\Release/cube.pch" @@ -47,69 +65,96 @@ ObjectFile=".\Release/" ProgramDataBaseFileName=".\Release/" WarningLevel="3" - SuppressStartupBanner="TRUE" - Detect64BitPortabilityProblems="TRUE" + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" DebugInformationFormat="0" - CompileAs="0"/> + CompileAs="0" + /> <Tool - Name="VCCustomBuildTool"/> + Name="VCManagedResourceCompilerTool" + /> <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="2057" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" AdditionalDependencies="odbc32.lib odbccp32.lib zlib.lib opengl32.lib glu32.lib msvcrt.lib SDLmain.lib SDL.lib SDL_image.lib ws2_32.lib winmm.lib SDL_mixer.lib" OutputFile=""C:\Documents and Settings\DYYH\My Documents\workspace\Tess\bin\cube.dll"" LinkIncremental="1" - SuppressStartupBanner="TRUE" + SuppressStartupBanner="true" AdditionalLibraryDirectories=""C:\Documents and Settings\DYYH\My Documents\workspace\Tess\lib"" - IgnoreAllDefaultLibraries="TRUE" - GenerateDebugInformation="TRUE" + IgnoreAllDefaultLibraries="true" + GenerateDebugInformation="true" ProgramDatabaseFile=".\Release/cube.pdb" - GenerateMapFile="TRUE" + GenerateMapFile="true" MapFileName=".\Release/cube.map" - MapExports="TRUE" - MapLines="TRUE" + MapExports="true" SubSystem="1" OptimizeReferences="2" EnableCOMDATFolding="2" - OptimizeForWindows98="1"/> + OptimizeForWindows98="1" + /> <Tool - Name="VCMIDLTool" - TypeLibraryName=".\Release/cube.tlb"/> + Name="VCALinkTool" + /> <Tool - Name="VCPostBuildEventTool"/> + Name="VCManifestTool" + /> <Tool - Name="VCPreBuildEventTool"/> + Name="VCXDCMakeTool" + /> <Tool - Name="VCPreLinkEventTool"/> + Name="VCBscMakeTool" + /> <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="2057"/> + Name="VCFxCopTool" + /> <Tool - Name="VCWebServiceProxyGeneratorTool"/> + Name="VCAppVerifierTool" + /> <Tool - Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool" + /> <Tool - Name="VCWebDeploymentTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + Name="VCPostBuildEventTool" + /> </Configuration> <Configuration Name="Debug|Win32" OutputDirectory="bin\Debug" IntermediateDirectory="obj\Debug" ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" + ATLMinimizesCRunTimeLibraryUsage="false" CharacterSet="0" - ManagedExtensions="TRUE" - WholeProgramOptimization="FALSE"> + ManagedExtensions="4" + > <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Debug/cube.tlb" + /> + <Tool Name="VCCLCompilerTool" Optimization="0" - OptimizeForProcessor="0" AdditionalIncludeDirectories="..\include;enet\include" AdditionalUsingDirectories="" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;ENET_DEBUG" @@ -122,78 +167,105 @@ ObjectFile="./obj/Debug/" ProgramDataBaseFileName="./obj/Debug/" WarningLevel="3" - SuppressStartupBanner="TRUE" - Detect64BitPortabilityProblems="FALSE" + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="false" DebugInformationFormat="3" - CompileAs="0"/> + CompileAs="2" + /> <Tool - Name="VCCustomBuildTool"/> + Name="VCManagedResourceCompilerTool" + /> <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" AdditionalDependencies="odbc32.lib odbccp32.lib zlib.lib opengl32.lib glu32.lib msvcrt.lib SDLmain.lib SDL.lib SDL_image.lib SDL_mixer.lib ws2_32.lib winmm.lib" OutputFile="bin\Debug\MezzanineManagedLib.dll" LinkIncremental="2" - SuppressStartupBanner="TRUE" + SuppressStartupBanner="true" AdditionalLibraryDirectories="..\lib" - IgnoreAllDefaultLibraries="FALSE" + IgnoreAllDefaultLibraries="false" ForceSymbolReferences="__DllMainCRTStartup@12" - GenerateDebugInformation="TRUE" + GenerateDebugInformation="true" ProgramDatabaseFile="bin/Debug/MezzanineManagedLib_debug.pdb" SubSystem="2" - ResourceOnlyDLL="TRUE" - ImportLibrary="./bin/Debug/MezzanineManagedLib.lib"/> + ResourceOnlyDLL="true" + ImportLibrary="./bin/Debug/MezzanineManagedLib.lib" + /> <Tool - Name="VCMIDLTool" - TypeLibraryName=".\Debug/cube.tlb"/> + Name="VCALinkTool" + /> <Tool - Name="VCPostBuildEventTool"/> + Name="VCManifestTool" + /> <Tool - Name="VCPreBuildEventTool"/> + Name="VCXDCMakeTool" + /> <Tool - Name="VCPreLinkEventTool"/> + Name="VCBscMakeTool" + /> <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="1033"/> + Name="VCFxCopTool" + /> <Tool - Name="VCWebServiceProxyGeneratorTool"/> + Name="VCAppVerifierTool" + /> <Tool - Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool" + /> <Tool - Name="VCWebDeploymentTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + Name="VCPostBuildEventTool" + /> </Configuration> <Configuration Name="Profile|Win32" OutputDirectory="Profile" IntermediateDirectory="Profile" ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" + ATLMinimizesCRunTimeLibraryUsage="false" CharacterSet="2" - WholeProgramOptimization="FALSE"> + > <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Release/cube.tlb" + /> + <Tool Name="VCCLCompilerTool" Optimization="2" - GlobalOptimizations="FALSE" InlineFunctionExpansion="2" - EnableIntrinsicFunctions="FALSE" + EnableIntrinsicFunctions="false" FavorSizeOrSpeed="2" - OmitFramePointers="TRUE" - OptimizeForProcessor="2" + OmitFramePointers="true" AdditionalIncludeDirectories=""C:\Documents and Settings\DYYH\My Documents\workspace\tess\include";"C:\Documents and Settings\DYYH\My Documents\workspace\tess\enet\include"" PreprocessorDefinitions="WIN32,NDEBUG,_CONSOLE,USE_ENET" - StringPooling="TRUE" - MinimalRebuild="TRUE" - ExceptionHandling="FALSE" + StringPooling="true" + MinimalRebuild="true" + ExceptionHandling="0" RuntimeLibrary="2" - BufferSecurityCheck="FALSE" - EnableFunctionLevelLinking="FALSE" - ForceConformanceInForLoopScope="TRUE" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="false" + ForceConformanceInForLoopScope="true" UsePrecompiledHeader="0" PrecompiledHeaderFile=".\Release/cube.pch" AssemblerListingLocation=".\Release/" @@ -201,983 +273,1291 @@ ProgramDataBaseFileName=".\Release/" BrowseInformation="1" WarningLevel="3" - SuppressStartupBanner="TRUE" - Detect64BitPortabilityProblems="TRUE" - CompileAs="0"/> + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" + CompileAs="0" + /> <Tool - Name="VCCustomBuildTool"/> + Name="VCManagedResourceCompilerTool" + /> <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="2057" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" AdditionalDependencies="msvcrt.lib zlib.lib opengl32.lib glu32.lib SDLmain.lib SDL.lib SDL_image.lib ws2_32.lib SDL_mixer.lib fmodvc.lib" OutputFile=""C:\Documents and Settings\DYYH\My Documents\workspace\Tess\bin\cube.dll"" LinkIncremental="1" - SuppressStartupBanner="TRUE" + SuppressStartupBanner="true" AdditionalLibraryDirectories=""C:\Documents and Settings\DYYH\My Documents\workspace\Tess\lib"" - IgnoreAllDefaultLibraries="TRUE" - GenerateDebugInformation="TRUE" + IgnoreAllDefaultLibraries="true" + GenerateDebugInformation="true" ProgramDatabaseFile=".\Release/cube.pdb" - GenerateMapFile="TRUE" + GenerateMapFile="true" MapFileName=".\Release/cube.map" - MapExports="TRUE" - MapLines="TRUE" + MapExports="true" SubSystem="1" - OptimizeForWindows98="1"/> + OptimizeForWindows98="1" + /> <Tool - Name="VCMIDLTool" - TypeLibraryName=".\Release/cube.tlb"/> + Name="VCALinkTool" + /> <Tool - Name="VCPostBuildEventTool"/> + Name="VCManifestTool" + /> <Tool - Name="VCPreBuildEventTool"/> + Name="VCXDCMakeTool" + /> <Tool - Name="VCPreLinkEventTool"/> + Name="VCBscMakeTool" + /> <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="2057"/> + Name="VCFxCopTool" + /> <Tool - Name="VCWebServiceProxyGeneratorTool"/> + Name="VCAppVerifierTool" + /> <Tool - Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool" + /> <Tool - Name="VCWebDeploymentTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + Name="VCPostBuildEventTool" + /> </Configuration> </Configurations> <References> <ProjectReference ReferencedProjectIdentifier="{DF0A7A59-91FA-438C-B859-D35C3963A553}" - Name="MezzanineLib"/> + RelativePathToProject=".\MezzanineLib\MezzanineLib.csproj" + /> <AssemblyReference - RelativePath="$(SolutionDir)lib\SdlDotNet.dll"/> + RelativePath="..\lib\SdlDotNet.dll" + AssemblyName="SdlDotNet, Version=6.0.0.0, PublicKeyToken=26ad4f7e10c61408, processorArchitecture=MSIL" + /> <AssemblyReference - RelativePath="$(SolutionDir)lib\Tao.OpenGl.dll"/> + RelativePath="..\lib\Tao.OpenGl.dll" + AssemblyName="Tao.OpenGl, Version=2.1.0.4, PublicKeyToken=1ca010269a4501ef, processorArchitecture=MSIL" + /> <AssemblyReference - RelativePath="$(SolutionDir)lib\Tao.OpenGl.ExtensionLoader.dll"/> - <AssemblyReference - RelativePath="$(SolutionDir)lib\Tao.OpenGl.Glu.dll"/> - <AssemblyReference - RelativePath="$(SolutionDir)lib\Tao.Sdl.dll"/> + RelativePath="..\lib\Tao.Sdl.dll" + AssemblyName="Tao.Sdl, Version=1.2.11.1, PublicKeyToken=9c7a200e36c0094e, processorArchitecture=MSIL" + /> </References> <Files> <Filter Name="headers" - Filter="h;hpp;hxx;hm;inl"> + Filter="h;hpp;hxx;hm;inl" + > <File - RelativePath=".\src\cube.h"> + RelativePath=".\src\cube.h" + > </File> <File - RelativePath=".\src\protos.h"> + RelativePath=".\src\protos.h" + > </File> <File - RelativePath=".\src\tools.h"> + RelativePath=".\src\tools.h" + > </File> <Filter Name="eneth" - Filter=""> + > <File - RelativePath=".\enet\include\enet\callbacks.h"> + RelativePath=".\enet\include\enet\callbacks.h" + > </File> <File - RelativePath=".\enet\include\enet\enet.h"> + RelativePath=".\enet\include\enet\enet.h" + > </File> <File - RelativePath=".\enet\include\enet\list.h"> + RelativePath=".\enet\include\enet\list.h" + > </File> <File - RelativePath=".\enet\include\enet\memory.h"> + RelativePath=".\enet\include\enet\memory.h" + > </File> <File - RelativePath=".\enet\include\enet\protocol.h"> + RelativePath=".\enet\include\enet\protocol.h" + > </File> <File - RelativePath=".\enet\include\enet\time.h"> + RelativePath=".\enet\include\enet\time.h" + > </File> <File - RelativePath=".\enet\include\enet\types.h"> + RelativePath=".\enet\include\enet\types.h" + > </File> <File - RelativePath=".\enet\include\enet\unix.h"> + RelativePath=".\enet\include\enet\unix.h" + > </File> <File - RelativePath=".\enet\include\enet\utility.h"> + RelativePath=".\enet\include\enet\utility.h" + ... [truncated message content] |
From: <je...@us...> - 2007-05-30 19:57:15
|
Revision: 1408 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1408&view=rev Author: jendave Date: 2007-05-30 12:56:49 -0700 (Wed, 30 May 2007) Log Message: ----------- casing changes Modified Paths: -------------- trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs Modified: trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs 2007-05-29 15:34:16 UTC (rev 1407) +++ trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs 2007-05-30 19:56:49 UTC (rev 1408) @@ -75,10 +75,10 @@ { throw new ArgumentNullException("mpq"); } - BackgroundPath = String.Format(CultureInfo.CurrentCulture, "glue\\PalR{0}\\Backgnd.pcx", Utilities.RaceCharLower[(int)Game.Instance.Race]); - FontPalettePath = String.Format(CultureInfo.CurrentCulture, "glue\\PalR{0}\\tFont.pcx", Utilities.RaceCharLower[(int)Game.Instance.Race]); - EffectPalettePath = String.Format(CultureInfo.CurrentCulture, "glue\\PalR{0}\\tEffect.pcx", Utilities.RaceCharLower[(int)Game.Instance.Race]); - ArrowGrpPath = String.Format(CultureInfo.CurrentCulture, "glue\\PalR{0}\\arrow.grp", Utilities.RaceCharLower[(int)Game.Instance.Race]); + BackgroundPath = String.Format(CultureInfo.CurrentCulture, "glue\\palr{0}\\backgnd.pcx", Utilities.RaceCharLower[(int)Game.Instance.Race]); + FontPalettePath = String.Format(CultureInfo.CurrentCulture, "glue\\palr{0}\\tfont.pcx", Utilities.RaceCharLower[(int)Game.Instance.Race]); + EffectPalettePath = String.Format(CultureInfo.CurrentCulture, "glue\\palr{0}\\teffect.pcx", Utilities.RaceCharLower[(int)Game.Instance.Race]); + ArrowGrpPath = String.Format(CultureInfo.CurrentCulture, "glue\\palr{0}\\arrow.grp", Utilities.RaceCharLower[(int)Game.Instance.Race]); this.startElementIndex = startElementIndex; this.cancelElementIndex = cancelElementIndex; Modified: trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs 2007-05-29 15:34:16 UTC (rev 1407) +++ trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs 2007-05-30 19:56:49 UTC (rev 1408) @@ -269,9 +269,9 @@ if (prefix != null) { - backgroundPath = prefix + "\\Backgnd.pcx"; - fontPalettePath = prefix + "\\tFont.pcx"; - effectPalettePath = prefix + "\\tEffect.pcx"; + backgroundPath = prefix + "\\backgnd.pcx"; + fontPalettePath = prefix + "\\tfont.pcx"; + effectPalettePath = prefix + "\\teffect.pcx"; arrowGrpPath = prefix + "\\arrow.grp"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-29 15:34:35
|
Revision: 1407 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1407&view=rev Author: jendave Date: 2007-05-29 08:34:16 -0700 (Tue, 29 May 2007) Log Message: ----------- update to last version for .net 1.1 Modified Paths: -------------- trunk/Mezzanine/lib/SdlDotNet.dll Modified: trunk/Mezzanine/lib/SdlDotNet.dll =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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-05-26 06:10:42
|
Revision: 1405 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1405&view=rev Author: jendave Date: 2007-05-25 23:10:28 -0700 (Fri, 25 May 2007) Log Message: ----------- fix path for macpack Modified Paths: -------------- trunk/scsharp/package.xml Modified: trunk/scsharp/package.xml =================================================================== --- trunk/scsharp/package.xml 2007-05-26 05:52:18 UTC (rev 1404) +++ trunk/scsharp/package.xml 2007-05-26 06:10:28 UTC (rev 1405) @@ -129,7 +129,7 @@ </copy> </if> <if test="${is-osx}"> - <property name="examples.path" value="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${bin.dir}"/> + <property name="examples.path" value="${dist.dir}/${string::to-lower(project::get-name())}-${project.version}/${bin.dir}/assemblies"/> <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> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-26 05:52:21
|
Revision: 1404 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1404&view=rev Author: jendave Date: 2007-05-25 22:52:18 -0700 (Fri, 25 May 2007) Log Message: ----------- update to latest Modified Paths: -------------- trunk/SdlDotNet/tools/Prebuild/prebuild-1.7.xsd trunk/SdlDotNet/tools/Prebuild/prebuild.exe Modified: trunk/SdlDotNet/tools/Prebuild/prebuild-1.7.xsd =================================================================== --- trunk/SdlDotNet/tools/Prebuild/prebuild-1.7.xsd 2007-05-26 05:48:10 UTC (rev 1403) +++ trunk/SdlDotNet/tools/Prebuild/prebuild-1.7.xsd 2007-05-26 05:52:18 UTC (rev 1404) @@ -1,18 +1,17 @@ -<?xml version="1.0" encoding="utf-8" ?> -<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" - xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"> - <xs:annotation> - <xs:documentation> - Copyright (c) 2004-2007 - Matthew Holmes (calefaction at houston . rr . com), - Dan Moorehead (dan05a at gmail . com), - David Hudson (jendave at yahoo dot com), +<?xml version="1.0" encoding="utf-8"?> +<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"> + <xs:annotation> + <xs:documentation> + Copyright (c) 2004-2007 + Matthew Holmes (calefaction at houston . rr . com), + Dan Moorehead (dan05a at gmail . com), + David Hudson (jendave at yahoo dot com), C.J. Adams-Collier (cjac at colliertech dot com) .NET Prebuild is a cross-platform XML-driven pre-build tool which allows developers to easily generate project or make files for major IDE's and .NET development tools including: Visual Studio .NET 2002, - 2003, and 2005, SharpDevelop, MonoDevelop, NAnt and the GNU Autotools. + 2003, and 2005, SharpDevelop, MonoDevelop, NAnt, Xcode and the GNU Autotools. BSD License: @@ -35,234 +34,240 @@ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </xs:documentation> - </xs:annotation> - <xs:element name="Prebuild"> - <xs:complexType> - <xs:sequence> - <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> - <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" /> - </xs:sequence> - <xs:attribute name="version" /> - <xs:attribute name="checkOsVars" /> - </xs:complexType> - </xs:element> - <xs:element name="Process" type="xs:string" /> - <xs:element name="Solution"> - <xs:complexType> - <xs:sequence> - <xs:element ref="Options" minOccurs="0" /> - <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> - <xs:element ref="Files" minOccurs="0" /> - <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" /> - </xs:sequence> - <xs:attribute name="name" type="xs:string" use="required" /> - <xs:attribute name="activeConfig" type="xs:string" default="Debug" /> - <xs:attribute name="path" type="xs:string" default="" /> - <xs:attribute name="version" type="xs:string" default="1.0.0" /> - </xs:complexType> - </xs:element> - <xs:element name="Project"> - <xs:complexType> - <xs:sequence> - <xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> - <xs:element name="Description" type="xs:string" minOccurs="0" maxOccurs="1" /> - <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" /> - <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> - <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded"> - <xs:complexType> - <xs:attribute name="name" type="xs:string" use="required" /> - <xs:attribute name="path" type="xs:string" /> - <xs:attribute name="localCopy" type="xs:boolean" /> - <xs:attribute name="version" type="xs:string" default="1.0.0"/> - </xs:complexType> - </xs:element> - <xs:element ref="Files" /> - </xs:sequence> - <xs:attribute name="name" type="xs:string" use="required" /> - <xs:attribute name="designerFolder" type="xs:string" default="" /> - <xs:attribute name="filterGroups" type="xs:string" default="" /> - <xs:attribute name="path" type="xs:string" default="" /> - <xs:attribute name="icon" type="xs:string" default="" /> - <xs:attribute name="version" type="xs:string" default="1.0.0" /> - <xs:attribute name="language" default="C#"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="C#" /> - <xs:enumeration value="VB.NET" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="type" default="Exe"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="Exe" /> - <xs:enumeration value="WinExe" /> - <xs:enumeration value="Library" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="runtime" default="Microsoft"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="Microsoft" /> - <xs:enumeration value="Mono" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="startupObject" type="xs:string" default="" /> - <xs:attribute name="rootNamespace" type="xs:string" /> - <xs:attribute name="assemblyName" type="xs:string" /> - <xs:attribute name="generateAssemblyInfoFile" type="xs:boolean" default="false"/> + </xs:annotation> + <xs:element name="Prebuild"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" /> + </xs:sequence> + <xs:attribute name="version" /> + <xs:attribute name="checkOsVars" /> </xs:complexType> - </xs:element> - <xs:element name="Configuration"> - <xs:complexType> - <xs:sequence> - <xs:element ref="Options" minOccurs="0" /> - </xs:sequence> - <xs:attribute name="name" type="xs:string" use="required" /> - </xs:complexType> - </xs:element> - <xs:element name="Options"> - <xs:complexType> - <xs:all> - <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> - <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> - <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> - <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> - <xs:element name="PreBuildEvent" type="xs:string" minOccurs="0" /> - <xs:element name="PostBuildEvent" type="xs:string" minOccurs="0" /> - <xs:element name="RunPostBuildEvent" minOccurs="0" default="OnBuildSuccess"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="OnBuildSuccess" /> - <xs:enumeration value="Always" /> - <xs:enumeration value="OnOutputUpdated" /> - </xs:restriction> - </xs:simpleType> - </xs:element> - <xs:element name="RunScript" type="xs:string" minOccurs="0" /> - <xs:element name="PreBuildEventArgs" type="xs:string" minOccurs="0" /> - <xs:element name="PostBuildEventArgs" type="xs:string" minOccurs="0" /> - <xs:element name="WarningLevel" minOccurs="0"> - <xs:simpleType> - <xs:restriction base="xs:integer"> - <xs:minInclusive value="0" /> - <xs:maxInclusive value="4" /> - </xs:restriction> - </xs:simpleType> - </xs:element> - <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> - <xs:element name="SuppressWarnings" type="xs:string" minOccurs="0" /> - <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> - <xs:element name="GenerateDocumentation" type="xs:boolean" minOccurs="0" /> - <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> - <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> - <xs:element name="RegisterComInterop" type="xs:boolean" minOccurs="0" /> - <xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" /> - <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> - <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> - <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> - <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> - <xs:element name="KeyFile" type="xs:string" minOccurs="0" /> - </xs:all> - </xs:complexType> - </xs:element> - <xs:element name="Files"> - <xs:complexType> - <xs:sequence> - <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> - <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="File"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:string"> - <xs:attribute name="resourceName" type="xs:string" default="" /> - <xs:attribute name="buildAction" default="Compile"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="None" /> - <xs:enumeration value="Compile" /> - <xs:enumeration value="Content" /> - <xs:enumeration value="EmbeddedResource" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="subType" default="Code"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="Code" /> - <xs:enumeration value="Component" /> - <xs:enumeration value="Form" /> - <xs:enumeration value="Settings" /> - <xs:enumeration value="UserControl" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="link" type="xs:boolean" /> - <xs:attribute name="copyToOutput" default="Never"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="Never" /> - <xs:enumeration value="Always" /> - <xs:enumeration value="PreserveNewest" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="Match"> - <xs:complexType> - <xs:sequence> - <xs:element ref="Exclude" minOccurs="0" maxOccurs="unbounded" /> - </xs:sequence> - <xs:attribute name="path" type="xs:string" /> - <xs:attribute name="pattern" type="xs:string" use="required" /> - <xs:attribute name="recurse" type="xs:boolean" default="false" /> - <xs:attribute name="useRegex" type="xs:boolean" default="false" /> - <xs:attribute name="buildAction" default="Compile"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="None" /> - <xs:enumeration value="Compile" /> - <xs:enumeration value="Content" /> - <xs:enumeration value="EmbeddedResource" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="resourceName" type="xs:string" default="" /> - <xs:attribute name="subType" default="Code"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="Code" /> - <xs:enumeration value="Component" /> - <xs:enumeration value="Designer" /> - <xs:enumeration value="Form" /> - <xs:enumeration value="Settings" /> - <xs:enumeration value="UserControl" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="link" type="xs:boolean" /> - <xs:attribute name="copyToOutput" default="Never"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="Never" /> - <xs:enumeration value="Always" /> - <xs:enumeration value="PreserveNewest" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:complexType> - </xs:element> - <xs:element name="Exclude"> - <xs:complexType> - <xs:attribute name="name" type="xs:string" use="required" /> - </xs:complexType> - </xs:element> + </xs:element> + <xs:element name="Process" type="xs:string" /> + <xs:element name="Solution"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Options" minOccurs="0" /> + <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> + <xs:element ref="Files" minOccurs="0" /> + <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" /> + </xs:sequence> + <xs:attribute name="name" type="xs:string" use="required" /> + <xs:attribute name="activeConfig" type="xs:string" default="Debug" /> + <xs:attribute name="path" type="xs:string" default="" /> + <xs:attribute name="version" type="xs:string" default="1.0.0" /> + </xs:complexType> + </xs:element> + <xs:element name="Project"> + <xs:complexType> + <xs:sequence> + <xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> + <xs:element name="Description" type="xs:string" minOccurs="0" maxOccurs="1" /> + <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" /> + <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> + <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="name" type="xs:string" use="required" /> + <xs:attribute name="path" type="xs:string" /> + <xs:attribute name="localCopy" type="xs:boolean" /> + <xs:attribute name="version" type="xs:string" /> + </xs:complexType> + </xs:element> + <xs:element ref="Files" /> + </xs:sequence> + <xs:attribute name="name" type="xs:string" use="required" /> + <xs:attribute name="designerFolder" type="xs:string" default="" /> + <xs:attribute name="filterGroups" type="xs:string" default="" /> + <xs:attribute name="path" type="xs:string" default="" /> + <xs:attribute name="icon" type="xs:string" default="" /> + <xs:attribute name="configFile" type="xs:string" default="" /> + <xs:attribute name="version" type="xs:string" default="1.0.0" /> + <xs:attribute name="language" default="C#"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="C#" /> + <xs:enumeration value="VB.NET" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="type" default="Exe"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="Exe" /> + <xs:enumeration value="WinExe" /> + <xs:enumeration value="Library" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="runtime" default="Microsoft"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="Microsoft" /> + <xs:enumeration value="Mono" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="startupObject" type="xs:string" default="" /> + <xs:attribute name="rootNamespace" type="xs:string" /> + <xs:attribute name="assemblyName" type="xs:string" /> + <xs:attribute name="generateAssemblyInfoFile" type="xs:boolean" default="false" /> + </xs:complexType> + </xs:element> + <xs:element name="Configuration"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Options" minOccurs="0" /> + </xs:sequence> + <xs:attribute name="name" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="Options"> + <xs:complexType> + <xs:all> + <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> + <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> + <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> + <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> + <xs:element name="PreBuildEvent" type="xs:string" minOccurs="0" /> + <xs:element name="PostBuildEvent" type="xs:string" minOccurs="0" /> + <xs:element name="RunPostBuildEvent" minOccurs="0" default="OnBuildSuccess"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="OnBuildSuccess" /> + <xs:enumeration value="Always" /> + <xs:enumeration value="OnOutputUpdated" /> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element name="RunScript" type="xs:string" minOccurs="0" /> + <xs:element name="PreBuildEventArgs" type="xs:string" minOccurs="0" /> + <xs:element name="PostBuildEventArgs" type="xs:string" minOccurs="0" /> + <xs:element name="WarningLevel" minOccurs="0"> + <xs:simpleType> + <xs:restriction base="xs:integer"> + <xs:minInclusive value="0" /> + <xs:maxInclusive value="4" /> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> + <xs:element name="SuppressWarnings" type="xs:string" minOccurs="0" /> + <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> + <xs:element name="GenerateDocumentation" type="xs:boolean" minOccurs="0" /> + <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> + <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> + <xs:element name="RegisterComInterop" type="xs:boolean" minOccurs="0" /> + <xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" /> + <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> + <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> + <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> + <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> + <xs:element name="KeyFile" type="xs:string" minOccurs="0" /> + </xs:all> + </xs:complexType> + </xs:element> + <xs:element name="Files"> + <xs:complexType> + <xs:sequence> + <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="File"> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute name="resourceName" type="xs:string" default="" /> + <xs:attribute name="buildAction" default="Compile"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="None" /> + <xs:enumeration value="Compile" /> + <xs:enumeration value="Content" /> + <xs:enumeration value="EmbeddedResource" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="subType" default="Code"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="Code" /> + <xs:enumeration value="Component" /> + <xs:enumeration value="Form" /> + <xs:enumeration value="Settings" /> + <xs:enumeration value="UserControl" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="link" type="xs:boolean" /> + <xs:attribute name="copyToOutput" default="Never"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="Never" /> + <xs:enumeration value="Always" /> + <xs:enumeration value="PreserveNewest" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="preservePath" type="xs:boolean" /> + <xs:attribute name="linkPath" type="xs:string" /> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + <xs:element name="Match"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Exclude" minOccurs="0" maxOccurs="unbounded" /> + </xs:sequence> + <xs:attribute name="path" type="xs:string" /> + <xs:attribute name="pattern" type="xs:string" use="required" /> + <xs:attribute name="recurse" type="xs:boolean" default="false" /> + <xs:attribute name="useRegex" type="xs:boolean" default="false" /> + <xs:attribute name="buildAction" default="Compile"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="None" /> + <xs:enumeration value="Compile" /> + <xs:enumeration value="Content" /> + <xs:enumeration value="EmbeddedResource" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="resourceName" type="xs:string" default="" /> + <xs:attribute name="subType" default="Code"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="Code" /> + <xs:enumeration value="Component" /> + <xs:enumeration value="Designer" /> + <xs:enumeration value="Form" /> + <xs:enumeration value="Settings" /> + <xs:enumeration value="UserControl" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="link" type="xs:boolean" /> + <xs:attribute name="copyToOutput" default="Never"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="Never" /> + <xs:enumeration value="Always" /> + <xs:enumeration value="PreserveNewest" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="preservePath" type="xs:boolean" /> + <xs:attribute name="linkPath" type="xs:string" /> + </xs:complexType> + </xs:element> + <xs:element name="Exclude"> + <xs:complexType> + <xs:attribute name="name" type="xs:string" /> + <xs:attribute name="pattern" type="xs:string" /> + </xs:complexType> + </xs:element> </xs:schema> Modified: trunk/SdlDotNet/tools/Prebuild/prebuild.exe =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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-25 18:57:21
|
Revision: 1401 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1401&view=rev Author: jendave Date: 2007-05-25 11:57:14 -0700 (Fri, 25 May 2007) Log Message: ----------- Specify iformat for fxcop Modified Paths: -------------- trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs trunk/scsharp/src/SCSharpLib/MpqLib/Chk.cs trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs trunk/scsharp/src/SCSharpLib/MpqLib/SCFont.cs trunk/scsharp/src/SCSharpLib/MpqLib/TriggerCondition.cs trunk/scsharp/src/SCSharpLib/UI/Game.cs trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs trunk/scsharp/src/SCSharpLib/UI/MapRenderer.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/UIElement.cs trunk/scsharp/src/SCSharpLib/UI/UIPainter.cs trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs Modified: trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs 2007-05-25 18:44:54 UTC (rev 1400) +++ trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs 2007-05-25 18:57:14 UTC (rev 1401) @@ -30,6 +30,7 @@ using System.IO; using System.Text; using System.Collections.Generic; +using System.Globalization; using SCSharp.UI; @@ -436,7 +437,7 @@ /// <returns></returns> public override string ToString() { - return String.Format("{0} ({1})", type, text); + return String.Format(CultureInfo.CurrentCulture, "{0} ({1})", type, text); } /// <summary> Modified: trunk/scsharp/src/SCSharpLib/MpqLib/Chk.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/Chk.cs 2007-05-25 18:44:54 UTC (rev 1400) +++ trunk/scsharp/src/SCSharpLib/MpqLib/Chk.cs 2007-05-25 18:57:14 UTC (rev 1401) @@ -31,6 +31,7 @@ using System.Text; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Globalization; using SCSharp.UI; @@ -202,7 +203,7 @@ SectionData sec = sections[sectionName]; if (sec == null) { - throw new SCException(String.Format("map file is missing section {0}, cannot load", sectionName)); + throw new SCException(String.Format(CultureInfo.CurrentCulture, "map file is missing section {0}, cannot load", sectionName)); } if (sec.Buffer == null) Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs 2007-05-25 18:44:54 UTC (rev 1400) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs 2007-05-25 18:57:14 UTC (rev 1401) @@ -31,6 +31,8 @@ using System; using System.IO; +using System.Globalization; + using ICSharpCode.SharpZipLib.Zip.Compression.Streams; using ICSharpCode.SharpZipLib.BZip2; @@ -406,7 +408,7 @@ } sinput = new MemoryStream(result); } - throw new SCException(String.Format("Unhandled compression flags: 0x{0:X}", comptype)); + throw new SCException(String.Format(CultureInfo.CurrentCulture, "Unhandled compression flags: 0x{0:X}", comptype)); } //private static byte[] BZip2Decompress(Stream data, int expectedLength) Modified: trunk/scsharp/src/SCSharpLib/MpqLib/SCFont.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/SCFont.cs 2007-05-25 18:44:54 UTC (rev 1400) +++ trunk/scsharp/src/SCSharpLib/MpqLib/SCFont.cs 2007-05-25 18:57:14 UTC (rev 1401) @@ -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 @@ -30,27 +30,28 @@ using System.IO; using System.Collections.Generic; using System.Text; +using System.Globalization; 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) @@ -147,17 +148,17 @@ } done: glyphs.Add(glyphID, - new Glyph(letterWidth, - letterHeight, - letterXOffset, - letterYOffset, - bitmap)); + new Glyph(letterWidth, + letterHeight, + letterXOffset, + letterYOffset, + bitmap)); return glyphs[glyphID]; } /// <summary> - /// + /// /// </summary> /// <param name="index"></param> /// <returns></returns> @@ -168,7 +169,7 @@ if (index < lowIndex || index > highIndex) { throw new ArgumentOutOfRangeException("index", - String.Format("value of {0} out of range of {1}-{2}", index, lowIndex, highIndex)); + String.Format(CultureInfo.CurrentCulture, "value of {0} out of range of {1}-{2}", index, lowIndex, highIndex)); } return GetGlyph(index); @@ -176,7 +177,7 @@ } /// <summary> - /// + /// /// </summary> public int SpaceSize { @@ -184,7 +185,7 @@ } /// <summary> - /// + /// /// </summary> public int LineSize { @@ -192,7 +193,7 @@ } /// <summary> - /// + /// /// </summary> public int MaxWidth { @@ -200,7 +201,7 @@ } /// <summary> - /// + /// /// </summary> public int MaxHeight { @@ -214,7 +215,7 @@ byte maxHeight; /// <summary> - /// + /// /// </summary> public void DumpGlyphs() { @@ -226,7 +227,7 @@ } /// <summary> - /// + /// /// </summary> /// <param name="glyphId"></param> public void DumpGlyph(int glyphId) Modified: trunk/scsharp/src/SCSharpLib/MpqLib/TriggerCondition.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/TriggerCondition.cs 2007-05-25 18:44:54 UTC (rev 1400) +++ trunk/scsharp/src/SCSharpLib/MpqLib/TriggerCondition.cs 2007-05-25 18:57:14 UTC (rev 1401) @@ -30,9 +30,8 @@ using System.IO; using System.Text; using System.Collections.Generic; +using System.Globalization; - - namespace SCSharp.MpqLib { /// <summary> @@ -130,7 +129,7 @@ /// <returns></returns> public override string ToString() { - return String.Format("Trigger{{ Condition={0} }}", Condition); + return String.Format(CultureInfo.CurrentCulture, "Trigger{{ Condition={0} }}", Condition); } } } Modified: trunk/scsharp/src/SCSharpLib/UI/Game.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/Game.cs 2007-05-25 18:44:54 UTC (rev 1400) +++ trunk/scsharp/src/SCSharpLib/UI/Game.cs 2007-05-25 18:57:14 UTC (rev 1401) @@ -133,7 +133,7 @@ } catch (SCException e) { - throw new SCException(String.Format("Could not read mpq archive {0}", + throw new SCException(String.Format(CultureInfo.CurrentCulture, "Could not read mpq archive {0}", path), e); } } @@ -146,7 +146,7 @@ } catch (SCException e) { - throw new SCException(String.Format("could not read mpq archive {0}", + throw new SCException(String.Format(CultureInfo.CurrentCulture, "could not read mpq archive {0}", path), e); } } @@ -171,7 +171,7 @@ } catch (SCException e) { - throw new SCException(String.Format("could not read mpq archive {0}", + throw new SCException(String.Format(CultureInfo.CurrentCulture, "could not read mpq archive {0}", path), e); } @@ -192,7 +192,7 @@ } catch (SCException e) { - throw new SCException(String.Format("could not read mpq archive {0}", + throw new SCException(String.Format(CultureInfo.CurrentCulture, "could not read mpq archive {0}", path), e); } Modified: trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs 2007-05-25 18:44:54 UTC (rev 1400) +++ trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs 2007-05-25 18:57:14 UTC (rev 1401) @@ -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 @@ -32,6 +32,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Drawing; +using System.Globalization; using SdlDotNet.Graphics; using SdlDotNet.Graphics.Primitives; @@ -43,7 +44,7 @@ namespace SCSharp.UI { /// <summary> - /// + /// /// </summary> public class GameScreen : UIScreen { @@ -93,23 +94,23 @@ CursorAnimator[] MagCursors; //byte[] unit_palette; - byte[] tileset_palette; + byte[] tilesetPalette; - // Player[] players; + // Player[] players; List<Unit> units; /// <summary> - /// + /// /// </summary> /// <param name="mpq"></param> /// <param name="scenario_mpq"></param> /// <param name="scenario"></param> /// <param name="template"></param> public GameScreen(Mpq mpq, - Mpq scenario_mpq, - Chk scenario, - Got template) + Mpq scenario_mpq, + Chk scenario, + Got template) : base(mpq) { this.EffectPalettePath = "game\\tblink.pcx"; @@ -122,14 +123,14 @@ } /// <summary> - /// + /// /// </summary> /// <param name="mpq"></param> /// <param name="prefix"></param> /// <param name="scenario"></param> public GameScreen(Mpq mpq, - string prefix, - Chk scenario) + string prefix, + Chk scenario) : base(mpq) { this.EffectPalettePath = "game\\tblink.pcx"; @@ -168,38 +169,38 @@ } surf.Blit(starfieldLayers[i], - new Rectangle(new Point(0, 0), - new Size(Painter.ScreenResX - scroll_x, - Painter.ScreenResY - scroll_y)), - new Rectangle(new Point(scroll_x, scroll_y), - new Size(Painter.ScreenResX - scroll_x, - Painter.ScreenResY - scroll_y))); + new Rectangle(new Point(0, 0), + new Size(Painter.ScreenResX - scroll_x, + Painter.ScreenResY - scroll_y)), + new Rectangle(new Point(scroll_x, scroll_y), + new Size(Painter.ScreenResX - scroll_x, + Painter.ScreenResY - scroll_y))); if (scroll_x != 0) { 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), - new Size(scroll_x, Painter.ScreenResY - scroll_y))); + new Rectangle(new Point(Painter.ScreenResX - scroll_x, 0), + new Size(scroll_x, Painter.ScreenResY - scroll_y)), + new Rectangle(new Point(0, scroll_y), + new Size(scroll_x, Painter.ScreenResY - scroll_y))); } if (scroll_y != 0) { 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), - new Size(Painter.ScreenResX - scroll_x, scroll_y))); + new Rectangle(new Point(0, Painter.ScreenResY - scroll_y), + new Size(Painter.ScreenResX - scroll_x, scroll_y)), + new Rectangle(new Point(scroll_x, 0), + new Size(Painter.ScreenResX - scroll_x, scroll_y))); } if (scroll_x != 0 || scroll_y != 0) { 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), - new Size(scroll_x, scroll_y))); + new Rectangle(new Point(Painter.ScreenResX - scroll_x, Painter.ScreenResY - scroll_y), + new Size(scroll_x, scroll_y)), + new Rectangle(new Point(0, 0), + new Size(scroll_x, scroll_y))); } } } @@ -209,12 +210,12 @@ void PaintMap(Surface surf, DateTime dt) { surf.Blit(map_surf, - new Rectangle(new Point(0, 0), - new Size(Painter.ScreenResX - topleft_x, - Painter.ScreenResY - topleft_y)), - new Rectangle(new Point(topleft_x, topleft_y), - new Size(Painter.ScreenResX, - Painter.ScreenResY))); + new Rectangle(new Point(0, 0), + new Size(Painter.ScreenResX - topleft_x, + Painter.ScreenResY - topleft_y)), + new Rectangle(new Point(topleft_x, topleft_y), + new Size(Painter.ScreenResX, + Painter.ScreenResY))); } void PaintHud(Surface surf, DateTime dt) @@ -225,15 +226,15 @@ void PaintMinimap(Surface surf, DateTime dt) { Rectangle rect = new Rectangle(new Point((int)((float)topleft_x / (float)map_surf.Width * MINIMAP_WIDTH + MINIMAP_X), - (int)((float)topleft_y / (float)map_surf.Height * MINIMAP_HEIGHT + MINIMAP_Y)), - new Size((int)((float)Painter.ScreenResX / (float)map_surf.Width * MINIMAP_WIDTH), - (int)((float)Painter.ScreenResY / (float)map_surf.Height * MINIMAP_HEIGHT))); + (int)((float)topleft_y / (float)map_surf.Height * MINIMAP_HEIGHT + MINIMAP_Y)), + new Size((int)((float)Painter.ScreenResX / (float)map_surf.Width * MINIMAP_WIDTH), + (int)((float)Painter.ScreenResY / (float)map_surf.Height * MINIMAP_HEIGHT))); surf.Draw(new Box(rect.Location, rect.Size), Color.Green); } /// <summary> - /// + /// /// </summary> /// <param name="painter"></param> public override void AddToPainter(Painter painter) @@ -258,7 +259,7 @@ } /// <summary> - /// + /// /// </summary> /// <param name="painter"></param> public override void RemoveFromPainter(Painter painter) @@ -283,7 +284,7 @@ } /// <summary> - /// + /// /// </summary> protected override void ResourceLoader() { @@ -295,11 +296,11 @@ pcx = new Pcx(); pcx.ReadFromStream((Stream)this.Mpq.GetResource("tileset\\badlands\\dark.pcx"), 0, 0); - tileset_palette = pcx.Palette; + tilesetPalette = pcx.Palette; - hud = GuiUtility.SurfaceFromStream((Stream)this.Mpq.GetResource(String.Format(BuiltIns.GameConsolePcx, - Utilities.RaceCharLower[(int)Game.Instance.Race])), - 254, 0); + hud = GuiUtility.SurfaceFromStream((Stream)this.Mpq.GetResource(String.Format(CultureInfo.CurrentCulture, BuiltIns.GameConsolePcx, + Utilities.RaceCharLower[(int)Game.Instance.Race])), + 254, 0); if (scenario.TileSet == TileSet.Platform) { @@ -318,7 +319,7 @@ ParallaxObject obj = starfield.Layers[i].Objects[o]; starfieldLayers[i].Fill(new Rectangle(new Point(obj.PositionX, obj.PositionY), new Size(2, 2)), - Color.White); + Color.White); } } } @@ -327,48 +328,48 @@ // load the cursors we'll show when scrolling with the mouse string[] cursornames = new string[] { - "cursor\\ScrollUL.grp", - "cursor\\ScrollU.grp", - "cursor\\ScrollUR.grp", - "cursor\\ScrollR.grp", - "cursor\\ScrollDR.grp", - "cursor\\ScrollD.grp", - "cursor\\ScrollDL.grp", - "cursor\\ScrollL.grp", - }; +"cursor\\ScrollUL.grp", +"cursor\\ScrollU.grp", +"cursor\\ScrollUR.grp", +"cursor\\ScrollR.grp", +"cursor\\ScrollDR.grp", +"cursor\\ScrollD.grp", +"cursor\\ScrollDL.grp", +"cursor\\ScrollL.grp", +}; ScrollCursors = new CursorAnimator[cursornames.Length]; for (int i = 0; i < cursornames.Length; i++) { ScrollCursors[i] = new CursorAnimator((Grp)this.Mpq.GetResource(cursornames[i]), - EffectPalette.Palette); + EffectPalette.Palette); ScrollCursors[i].SetHotspot(60, 60); } // load the mag cursors string[] magcursornames = new string[] { - "cursor\\MagG.grp", - "cursor\\MagY.grp", - "cursor\\MagR.grp" - }; +"cursor\\MagG.grp", +"cursor\\MagY.grp", +"cursor\\MagR.grp" +}; MagCursors = new CursorAnimator[magcursornames.Length]; for (int i = 0; i < magcursornames.Length; i++) { MagCursors[i] = new CursorAnimator((Grp)this.Mpq.GetResource(magcursornames[i]), - EffectPalette.Palette); + EffectPalette.Palette); MagCursors[i].SetHotspot(60, 60); } // load the targeting cursors string[] targetcursornames = new string[] { - "cursor\\TargG.grp", - "cursor\\TargY.grp", - "cursor\\TargR.grp" - }; +"cursor\\TargG.grp", +"cursor\\TargY.grp", +"cursor\\TargR.grp" +}; TargetCursors = new CursorAnimator[targetcursornames.Length]; for (int i = 0; i < targetcursornames.Length; i++) { TargetCursors[i] = new CursorAnimator((Grp)this.Mpq.GetResource(targetcursornames[i]), - EffectPalette.Palette); + EffectPalette.Palette); TargetCursors[i].SetHotspot(60, 60); } @@ -386,7 +387,7 @@ void UpdateCursor() { - /* are we over a unit? if so, display the mag cursor */ + /* are we over a unit? if so, display the mag cursor */ unitUnderCursor = null; for (int i = 0; i < units.Count; i++) { @@ -400,7 +401,7 @@ CursorAnimator c = Game.Instance.Cursor; 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 */) + && 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; @@ -410,7 +411,7 @@ } /// <summary> - /// + /// /// </summary> /// <param name="surf"></param> /// <param name="dt"></param> @@ -446,7 +447,7 @@ } /// <summary> - /// + /// /// </summary> /// <param name="args"></param> public override void MouseButtonDown(MouseButtonEventArgs args) @@ -456,7 +457,7 @@ throw new ArgumentNullException("args"); } if (args.X > MINIMAP_X && args.X < MINIMAP_X + MINIMAP_WIDTH && - args.Y > MINIMAP_Y && args.Y < MINIMAP_Y + MINIMAP_HEIGHT) + args.Y > MINIMAP_Y && args.Y < MINIMAP_Y + MINIMAP_HEIGHT) { RecenterFromMinimap(args.X, args.Y); buttonDownInMinimap = true; @@ -472,7 +473,7 @@ } /// <summary> - /// + /// /// </summary> /// <param name="args"></param> public override void MouseButtonUp(MouseButtonEventArgs args) @@ -488,7 +489,7 @@ } /// <summary> - /// + /// /// </summary> /// <param name="args"></param> public override void PointerMotion(MouseMotionEventArgs args) @@ -580,7 +581,7 @@ } /// <summary> - /// + /// /// </summary> /// <param name="args"></param> public override void KeyboardUp(KeyboardEventArgs args) @@ -590,19 +591,19 @@ throw new ArgumentNullException("args"); } if (args.Key == Key.RightArrow - || args.Key == Key.LeftArrow) + || args.Key == Key.LeftArrow) { horiz_delta = 0; } else if (args.Key == Key.UpArrow - || args.Key == Key.DownArrow) + || args.Key == Key.DownArrow) { vert_delta = 0; } } /// <summary> - /// + /// /// </summary> /// <param name="args"></param> public override void KeyboardDown(KeyboardEventArgs args) @@ -616,9 +617,9 @@ case Key.F10: GameMenuDialog d = new GameMenuDialog(this, this.Mpq); - d.ReturnToGame += delegate(object sender2, SCEventArgs args2) - { - DismissDialog(); + d.ReturnToGame += delegate(object sender2, SCEventArgs args2) + { + DismissDialog(); }; ShowDialog(d); break; @@ -664,7 +665,7 @@ //players[unitinfo.player].AddUnit (unit); - unit.CreateSprite(this.Mpq, tileset_palette); + unit.CreateSprite(this.Mpq, tilesetPalette); units.Add(unit); } @@ -673,14 +674,14 @@ foreach (Unit sl in startLocations) { /* terran command center = 106, - zerg hatchery = 131, - protoss nexus = 154 */ + zerg hatchery = 131, + protoss nexus = 154 */ Unit unit = new Unit(154); unit.PositionX = sl.PositionX; unit.PositionY = sl.PositionY; - unit.CreateSprite(this.Mpq, tileset_palette); + unit.CreateSprite(this.Mpq, tilesetPalette); units.Add(unit); } } Modified: trunk/scsharp/src/SCSharpLib/UI/MapRenderer.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/MapRenderer.cs 2007-05-25 18:44:54 UTC (rev 1400) +++ trunk/scsharp/src/SCSharpLib/UI/MapRenderer.cs 2007-05-25 18:57:14 UTC (rev 1401) @@ -28,6 +28,7 @@ using System; using System.IO; +using System.Globalization; using SdlDotNet.Graphics; using SCSharp; @@ -86,10 +87,10 @@ 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(CultureInfo.CurrentCulture, "tileset\\{0}.cv5", Utilities.TileSetNames[(int)chk.TileSet])); + Stream vx4_fs = (Stream)mpq.GetResource(String.Format(CultureInfo.CurrentCulture, "tileset\\{0}.vx4", Utilities.TileSetNames[(int)chk.TileSet])); + Stream vr4_fs = (Stream)mpq.GetResource(String.Format(CultureInfo.CurrentCulture, "tileset\\{0}.vr4", Utilities.TileSetNames[(int)chk.TileSet])); + Stream wpe_fs = (Stream)mpq.GetResource(String.Format(CultureInfo.CurrentCulture, "tileset\\{0}.wpe", Utilities.TileSetNames[(int)chk.TileSet])); byte[] cv5 = new byte[cv5_fs.Length]; cv5_fs.Read(cv5, 0, (int)cv5_fs.Length); Modified: trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs 2007-05-25 18:44:54 UTC (rev 1400) +++ trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs 2007-05-25 18:57:14 UTC (rev 1401) @@ -149,7 +149,7 @@ for (int i = 0; i < directories.Length; i++) { - fileListbox.AddItem(String.Format("[{0}]", Path.GetFileName(directories[i]))); + fileListbox.AddItem(String.Format(CultureInfo.CurrentCulture, "[{0}]", Path.GetFileName(directories[i]))); } for (int i = 0; i < files.Length; i++) @@ -294,7 +294,7 @@ slotString = slotString.Replace("%s", (selectedChk == null ? "" - : String.Format("{0}", + : String.Format(CultureInfo.CurrentCulture, "{0}", selectedChk.NumberOfHumanSlots))); Elements[MAPPLAYERS1_ELEMENT_INDEX].Text = slotString; @@ -305,7 +305,7 @@ slotString = slotString.Replace("%s", (selectedChk == null ? "" - : String.Format("{0}", + : String.Format(CultureInfo.CurrentCulture, "{0}", selectedChk.NumberOfComputerSlots))); Elements[MAPPLAYERS2_ELEMENT_INDEX].Text = slotString; @@ -319,7 +319,7 @@ numPlayersString = numPlayersString.Replace("%s", (selectedChk == null ? "" - : String.Format("{0}", + : String.Format(CultureInfo.CurrentCulture, "{0}", selectedChk.NumberOfPlayers))); Elements[MAPPLAYERS1_ELEMENT_INDEX].Text = numPlayersString; @@ -366,7 +366,7 @@ void FileListSelectionChanged(object sender, BoxSelectionChangedEventArgs e) { - string map_path = Path.Combine(curdir, fileListbox.SelectedItem); + string mapPath = Path.Combine(curdir, fileListbox.SelectedItem); if (e.SelectedIndex < directories.Length) { @@ -375,7 +375,7 @@ } else { - selectedScenario = new MpqArchiveContainer(map_path); + selectedScenario = new MpqArchiveContainer(mapPath); selectedChk = (Chk)selectedScenario.GetResource("staredit\\scenario.chk"); } @@ -391,7 +391,7 @@ mapSizeString = mapSizeString.Replace("%s", (selectedChk == null ? "" - : String.Format("{0}x{1}", + : String.Format(CultureInfo.CurrentCulture, "{0}x{1}", selectedChk.Width, selectedChk.Height))); @@ -399,7 +399,7 @@ tileSetString = tileSetString.Replace("%s", (selectedChk == null ? "" - : String.Format("{0}", + : String.Format(CultureInfo.CurrentCulture, "{0}", selectedChk.TileSet))); Elements[MAPSIZE_ELEMENT_INDEX].Text = mapSizeString; Modified: trunk/scsharp/src/SCSharpLib/UI/RaceSelectionScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/RaceSelectionScreen.cs 2007-05-25 18:44:54 UTC (rev 1400) +++ trunk/scsharp/src/SCSharpLib/UI/RaceSelectionScreen.cs 2007-05-25 18:57:14 UTC (rev 1401) @@ -28,13 +28,13 @@ using System; using System.IO; +using System.Drawing; using System.Threading; +using System.Globalization; using SdlDotNet; using SCSharp; -using System.Drawing; - using SCSharp.MpqLib; namespace SCSharp.UI @@ -186,7 +186,7 @@ mapdata_index = GlobalResources.MapDataDat.GetFileIndex((uint)(Game.Instance.PlayingBroodWar ? BroodwarCampaigns_MapDataStart : StarcraftCampaigns_MapDataStart)[campaign]); prefix = GlobalResources.MapDataTbl[(int)mapdata_index]; - markup = String.Format("rez\\Est{0}{1}{2}.txt", + 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" : ""); Modified: trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs 2007-05-25 18:44:54 UTC (rev 1400) +++ trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs 2007-05-25 18:57:14 UTC (rev 1401) @@ -30,6 +30,7 @@ using System.IO; using System.Threading; using System.Drawing; +using System.Globalization; using SdlDotNet.Graphics; using SdlDotNet.Input; @@ -67,17 +68,17 @@ int objectivesElementIndex, int firstPortraitElementIndex) : base(mpq, - String.Format("glue\\Ready{0}", Utilities.RaceChar[(int)Game.Instance.Race]), - String.Format(BuiltIns.GluReadyBin, Utilities.RaceCharLower[(int)Game.Instance.Race])) + String.Format(CultureInfo.CurrentCulture, "glue\\Ready{0}", Utilities.RaceChar[(int)Game.Instance.Race]), + String.Format(CultureInfo.CurrentCulture, BuiltIns.GluReadyBin, Utilities.RaceCharLower[(int)Game.Instance.Race])) { if (mpq == null) { throw new ArgumentNullException("mpq"); } - BackgroundPath = String.Format("glue\\PalR{0}\\Backgnd.pcx", Utilities.RaceCharLower[(int)Game.Instance.Race]); - FontPalettePath = String.Format("glue\\PalR{0}\\tFont.pcx", Utilities.RaceCharLower[(int)Game.Instance.Race]); - EffectPalettePath = String.Format("glue\\PalR{0}\\tEffect.pcx", Utilities.RaceCharLower[(int)Game.Instance.Race]); - ArrowGrpPath = String.Format("glue\\PalR{0}\\arrow.grp", Utilities.RaceCharLower[(int)Game.Instance.Race]); + BackgroundPath = String.Format(CultureInfo.CurrentCulture, "glue\\PalR{0}\\Backgnd.pcx", Utilities.RaceCharLower[(int)Game.Instance.Race]); + FontPalettePath = String.Format(CultureInfo.CurrentCulture, "glue\\PalR{0}\\tFont.pcx", Utilities.RaceCharLower[(int)Game.Instance.Race]); + EffectPalettePath = String.Format(CultureInfo.CurrentCulture, "glue\\PalR{0}\\tEffect.pcx", Utilities.RaceCharLower[(int)Game.Instance.Race]); + ArrowGrpPath = String.Format(CultureInfo.CurrentCulture, "glue\\PalR{0}\\arrow.grp", Utilities.RaceCharLower[(int)Game.Instance.Race]); this.startElementIndex = startElementIndex; this.cancelElementIndex = cancelElementIndex; @@ -212,7 +213,7 @@ EndHighlightPortrait(highlightedPortrait); } - Elements[firstPortraitElementIndex + slot].Background = String.Format("glue\\Ready{0}\\{0}FrameH{1}.pcx", + Elements[firstPortraitElementIndex + slot].Background = String.Format(CultureInfo.CurrentCulture, "glue\\Ready{0}\\{0}FrameH{1}.pcx", Utilities.RaceChar[(int)Game.Instance.Race], slot + 1); highlightedPortrait = slot; @@ -226,7 +227,7 @@ { if (Elements[firstPortraitElementIndex + slot].Visible) { - Elements[firstPortraitElementIndex + slot].Background = String.Format("glue\\Ready{0}\\{0}Frame{1}.pcx", + Elements[firstPortraitElementIndex + slot].Background = String.Format(CultureInfo.CurrentCulture, "glue\\Ready{0}\\{0}Frame{1}.pcx", Utilities.RaceChar[(int)Game.Instance.Race], slot + 1); } @@ -239,7 +240,7 @@ public void ShowPortrait(int slot) { Elements[firstPortraitElementIndex + slot].Visible = true; - Elements[firstPortraitElementIndex + slot].Background = String.Format("glue\\Ready{0}\\{0}Frame{1}.pcx", + Elements[firstPortraitElementIndex + slot].Background = String.Format(CultureInfo.CurrentCulture, "glue\\Ready{0}\\{0}Frame{1}.pcx", Utilities.RaceChar[(int)Game.Instance.Race], slot + 1); } Modified: trunk/scsharp/src/SCSharpLib/UI/UIElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/UIElement.cs 2007-05-25 18:44:54 UTC (rev 1400) +++ trunk/scsharp/src/SCSharpLib/UI/UIElement.cs 2007-05-25 18:57:14 UTC (rev 1401) @@ -31,6 +31,7 @@ using System.IO; using System.Text; using System.Collections.Generic; +using System.Globalization; using SdlDotNet.Graphics; using SdlDotNet.Input; @@ -210,7 +211,7 @@ if (fnt == null) { - throw new SCException(String.Format("null font at index {0}.. bad things are afoot", idx)); + throw new SCException(String.Format(CultureInfo.CurrentCulture, "null font at index {0}.. bad things are afoot", idx)); } } return fnt; Modified: trunk/scsharp/src/SCSharpLib/UI/UIPainter.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/UIPainter.cs 2007-05-25 18:44:54 UTC (rev 1400) +++ trunk/scsharp/src/SCSharpLib/UI/UIPainter.cs 2007-05-25 18:57:14 UTC (rev 1401) @@ -32,6 +32,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; +using System.Globalization; using SdlDotNet.Graphics; using SdlDotNet.Graphics.Primitives; @@ -89,7 +90,7 @@ surf.Draw(new Box(new Point(e.X1, e.Y1), new Size(e.Width - 1, e.Height - 1)), e.Visible ? Color.Green : Color.Yellow); if (e.Text.Length != 0) { - e.Text = i.ToString(); + e.Text = i.ToString(CultureInfo.CurrentCulture); } } } Modified: trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs 2007-05-25 18:44:54 UTC (rev 1400) +++ trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs 2007-05-25 18:57:14 UTC (rev 1401) @@ -32,6 +32,7 @@ using System.Threading; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Globalization; using SdlDotNet.Graphics; using SdlDotNet.Input; @@ -850,7 +851,7 @@ if (bin == null) { - throw new SCException(String.Format("specified file '{0}' does not exist", + throw new SCException(String.Format(CultureInfo.CurrentCulture, "specified file '{0}' does not exist", binFile)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-25 18:44:57
|
Revision: 1400 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1400&view=rev Author: jendave Date: 2007-05-25 11:44:54 -0700 (Fri, 25 May 2007) Log Message: ----------- fix some cultureinfo stuff for fxcop Modified Paths: -------------- trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs trunk/scsharp/src/SCSharpLib/MpqLib/Mpq.cs trunk/scsharp/src/SCSharpLib/MpqLib/MpqArchive.cs trunk/scsharp/src/SCSharpLib/MpqLib/MpqDirectory.cs trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs trunk/scsharp/src/SCSharpLib/UI/BitmapImage.cs trunk/scsharp/src/SCSharpLib/UI/BriefingRunner.cs trunk/scsharp/src/SCSharpLib/UI/BuiltIns.cs trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs trunk/scsharp/src/SCSharpLib/UI/FFmpeg.cs trunk/scsharp/src/SCSharpLib/UI/Game.cs trunk/scsharp/src/SCSharpLib/UI/ImageElement.cs trunk/scsharp/src/SCSharpLib/UI/LogOnScreen.cs trunk/scsharp/src/SCSharpLib/UI/Pcx.cs trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.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/UIElement.cs trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs Modified: trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -39,7 +39,7 @@ /// /// </summary> [Flags] - public enum SCElement + public enum SCElements { /// <summary> /// @@ -335,12 +335,12 @@ set { textOffset = value; } } - private SCElement flags; + private SCElements flags; /// <summary> /// /// </summary> - public SCElement Flags + public SCElements Flags { get { return flags; } set { flags = value; } @@ -388,7 +388,7 @@ height = Utilities.ReadWord(buffer, position + 14); textOffset = Utilities.ReadDWord(buffer, position + 20); - flags = (SCElement)Utilities.ReadDWord(buffer, position + 24); + flags = (SCElements)Utilities.ReadDWord(buffer, position + 24); type = (ElementType)buffer[position + 34]; if (textOffset < streamLength) @@ -401,7 +401,7 @@ text = Encoding.ASCII.GetString(buffer, (int)textOffset, (int)textLength); - if ((flags & SCElement.HasHotkey) == SCElement.HasHotkey) + if ((flags & SCElements.HasHotkey) == SCElements.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 (SCElement f in Enum.GetValues(typeof(SCElement))) + foreach (SCElements f in Enum.GetValues(typeof(SCElements))) { if ((flags & f) == f) { Modified: trunk/scsharp/src/SCSharpLib/MpqLib/Mpq.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/Mpq.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/MpqLib/Mpq.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -31,6 +31,7 @@ using System.Runtime.InteropServices; using System.Text; using System.Collections.Generic; +using System.Globalization; namespace SCSharp.MpqLib { @@ -68,26 +69,26 @@ { throw new ArgumentNullException("path"); } - string pathLower = path.ToLower(); + string pathLower = path.ToLower(CultureInfo.CurrentCulture); //string ext = Path.GetExtension(path).ToLower(); string ext = Path.GetExtension(path); - if (String.Compare(ext, ".tbl", true) == 0) + if (String.Compare(ext, ".tbl", true, CultureInfo.CurrentCulture) == 0) { return typeof(Tbl); } - else if (String.Compare(ext, ".fnt", true) == 0) + else if (String.Compare(ext, ".fnt", true, CultureInfo.CurrentCulture) == 0) { return typeof(SCFont); } - else if (String.Compare(ext, ".got", true) == 0) + else if (String.Compare(ext, ".got", true, CultureInfo.CurrentCulture) == 0) { return typeof(Got); } - else if (String.Compare(ext, ".grp", true) == 0) + else if (String.Compare(ext, ".grp", true, CultureInfo.CurrentCulture) == 0) { return typeof(Grp); } - else if (String.Compare(ext, ".bin", true) == 0) + else if (String.Compare(ext, ".bin", true, CultureInfo.CurrentCulture) == 0) { if (pathLower.EndsWith("aiscript.bin")) /* must come before iscript.bin */ { @@ -102,11 +103,11 @@ return typeof(Bin); } } - else if (String.Compare(ext, ".chk", true) == 0) + else if (String.Compare(ext, ".chk", true, CultureInfo.CurrentCulture) == 0) { return typeof(Chk); } - else if (String.Compare(ext, ".dat", true) == 0) + else if (String.Compare(ext, ".dat", true, CultureInfo.CurrentCulture) == 0) { if (pathLower.EndsWith("flingy.dat")) { @@ -133,7 +134,7 @@ return typeof(MapDataDat); } } - else if (String.Compare(ext, ".spk", true) == 0) + else if (String.Compare(ext, ".spk", true, CultureInfo.CurrentCulture) == 0) { return typeof(Spk); } @@ -175,7 +176,7 @@ res.ReadFromStream(stream); /* don't cache .smk files */ - if (!path.ToLower().EndsWith(".smk")) + if (!path.ToLower(CultureInfo.CurrentCulture).EndsWith(".smk")) { cachedResources[path] = res; } Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqArchive.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MpqArchive.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqArchive.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -32,6 +32,7 @@ using System; using System.Collections; using System.IO; +using System.Globalization; using SCSharp.UI; @@ -50,12 +51,12 @@ private MpqHash[] mHashes; private MpqBlock[] mBlocks; - private static uint[] sStormBuffer; + private static uint[] sStormBuffer = BuildStormBuffer(); - static MpqArchive() - { - sStormBuffer = BuildStormBuffer(); - } + //static MpqArchive() + //{ + // sStormBuffer = BuildStormBuffer(); + //} /// <summary> /// @@ -211,7 +212,7 @@ foreach (char c in input) { - int val = (int)char.ToUpper(c); + int val = (int)char.ToUpper(c, CultureInfo.CurrentCulture); seed1 = sStormBuffer[offset + val] ^ (seed1 + seed2); seed2 = (uint)val + seed1 + seed2 + (seed2 << 5) + 3; } Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqDirectory.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MpqDirectory.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqDirectory.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -31,6 +31,7 @@ using System.Runtime.InteropServices; using System.Text; using System.Collections.Generic; +using System.Globalization; namespace SCSharp.MpqLib { @@ -57,7 +58,9 @@ static string ConvertBackSlashes(string path) { while (path.IndexOf('\\') != -1) + { path = path.Replace('\\', Path.DirectorySeparatorChar); + } return path; } @@ -69,15 +72,15 @@ /// <returns></returns> public override Stream GetStreamForResource(string path) { - string rebased_path = ConvertBackSlashes(Path.Combine(mpqDirPath, path)); + string rebasedPath = ConvertBackSlashes(Path.Combine(mpqDirPath, path)); - if (fileHash.ContainsKey(rebased_path.ToLower())) + if (fileHash.ContainsKey(rebasedPath.ToLower(CultureInfo.CurrentCulture))) { - string real_path = fileHash[rebased_path.ToLower()]; - if (real_path != null) + string realPath = fileHash[rebasedPath.ToLower(CultureInfo.CurrentCulture)]; + if (realPath != null) { - Console.WriteLine("using {0}", real_path); - return File.OpenRead(real_path); + Console.WriteLine("using {0}", realPath); + return File.OpenRead(realPath); } } return null; @@ -89,7 +92,7 @@ foreach (string f in files) { string platform_path = ConvertBackSlashes(f); - fileHash.Add(f.ToLower(), platform_path); + fileHash.Add(f.ToLower(CultureInfo.CurrentCulture), platform_path); } string[] directories = Directory.GetDirectories(path); Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -228,11 +228,11 @@ if (target < 0) { - throw new ArgumentOutOfRangeException("offset", "Attmpted to Seek before the beginning of the stream"); + throw new ArgumentOutOfRangeException("offset", "Attempted to Seek before the beginning of the stream"); } if (target >= Length) { - throw new ArgumentOutOfRangeException("offset", "Attmpted to Seek beyond the end of the stream"); + throw new ArgumentOutOfRangeException("offset", "Attempted to Seek beyond the end of the stream"); } mPosition = target; Modified: trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -198,4 +198,26 @@ [module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.PortDataTbl", MessageId = "Tbl")] [module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.FlingyDat", MessageId = "Flingy")] [module: SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", Scope = "type", Target = "SCSharp.UI.LogOnScreen", MessageId = "OnScreen")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluLogOnBin", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags", Scope = "type", Target = "SCSharp.MpqLib.ElementType")] +[module: SuppressMessage("Microsoft.Usage", "CA2204:LiteralsShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Pcx.ReadFromStream(System.IO.Stream,System.Int32,System.Int32):System.Void", MessageId = "pcx")] +[module: SuppressMessage("Microsoft.Usage", "CA2204:LiteralsShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Game..ctor(System.String,System.String,System.String)", MessageId = "mpq")] +[module: SuppressMessage("Microsoft.Usage", "CA2204:LiteralsShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Game..ctor(System.String,System.String,System.String)", MessageId = "Broodwar")] +[module: SuppressMessage("Microsoft.Usage", "CA2204:LiteralsShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Game..ctor(System.String,System.String,System.String)", MessageId = "broodwar")] +[module: SuppressMessage("Microsoft.Usage", "CA2204:LiteralsShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Game..ctor(System.String,System.String,System.String)", MessageId = "stardat")] +[module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SCSharp.MpqLib.SCFont.GetGlyph(System.Int32):SCSharp.MpqLib.Glyph", MessageId = "Body")] +[module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SCSharp.MpqLib.Glyph.Bitmap", MessageId = "Member")] +[module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SCSharp.MpqLib.Glyph.bitmap", MessageId = "Member")] +[module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SCSharp.MpqLib.Grp.DecodeLine(System.Byte[,],System.Int32,System.Byte,System.UInt16,System.UInt16):System.Void", MessageId = "0#")] +[module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SCSharp.MpqLib.Grp.GetFrame(System.Int32):System.Byte[,]", MessageId = "Body")] +[module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SCSharp.MpqLib.Grp.GetFrame(System.Int32):System.Byte[,]", MessageId = "Return")] +[module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SCSharp.MpqLib.Chk.MapTiles", MessageId = "Member")] +[module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SCSharp.MpqLib.Chk.ParseSection(System.String):System.Void", MessageId = "Body")] +[module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SCSharp.MpqLib.Chk.MapMask", MessageId = "Member")] +[module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SCSharp.MpqLib.Chk.mapTiles", MessageId = "Member")] +[module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SCSharp.MpqLib.Chk.mapMask", MessageId = "Member")] +[module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SCSharp.UI.GuiUtility.CreateSurfaceFromBitmap(System.Byte[,],System.UInt16,System.UInt16,System.Byte[],System.Int32,System.Int32):SdlDotNet.Graphics.Surface", MessageId = "0#")] +[module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SCSharp.UI.GuiUtility.GetBitmapData(System.Byte[,],System.UInt16,System.UInt16,System.Byte[],System.Boolean):System.Byte[]", MessageId = "0#")] +[module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SCSharp.UI.GuiUtility.GetBitmapData(System.Byte[,],System.UInt16,System.UInt16,System.Byte[],System.Int32,System.Int32):System.Byte[]", MessageId = "0#")] +[module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SCSharp.UI.GuiUtility.CreateSurfaceFromBitmap(System.Byte[,],System.UInt16,System.UInt16,System.Byte[],System.Boolean):SdlDotNet.Graphics.Surface", MessageId = "0#")] Modified: trunk/scsharp/src/SCSharpLib/UI/BitmapImage.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/BitmapImage.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/UI/BitmapImage.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -28,6 +28,7 @@ using System; using System.IO; +using System.Globalization; using SdlDotNet.Graphics; using SCSharp; @@ -73,5 +74,63 @@ get { return pixelHeight; } set { pixelHeight = value; } } + + /// <summary> + /// String representation of circle + /// </summary> + /// <returns>string representation of circle</returns> + public override string ToString() + { + return String.Format(CultureInfo.CurrentCulture, "({0},{1}, {2})", this.image, this.pixelHeight, this.PixelWidth); + } + + /// <summary> + /// Equals operator + /// </summary> + /// <param name="obj">Circle to compare</param> + /// <returns>true if circles are equal</returns> + public override bool Equals(object obj) + { + if (obj == null) + { + throw new ArgumentNullException("obj"); + } + if (obj.GetType() != typeof(BitmapImage)) + return false; + + BitmapImage c = (BitmapImage)obj; + return ((this.image == c.image) && (this.pixelHeight == c.pixelHeight) && (this.pixelWidth == c.pixelWidth)); + } + + /// <summary> + /// Equals operator + /// </summary> + /// <param name="c1">Circle to compare</param> + /// <param name="c2">Circle to compare</param> + /// <returns>True if circles are equal</returns> + public static bool operator ==(BitmapImage c1, BitmapImage c2) + { + return ((c1.image == c2.image) && (c1.pixelHeight == c2.pixelHeight) && (c1.pixelWidth == c2.pixelWidth)); + } + + /// <summary> + /// Not equals operator + /// </summary> + /// <param name="c1">Circle to compare</param> + /// <param name="c2">Circle to compare</param> + /// <returns>True if circles are not equal</returns> + public static bool operator !=(BitmapImage c1, BitmapImage c2) + { + return !(c1 == c2); + } + + /// <summary> + /// Hash Code + /// </summary> + /// <returns>Hash code</returns> + public override int GetHashCode() + { + return image.GetHashCode() ^ pixelWidth ^ pixelHeight; + } } } Modified: trunk/scsharp/src/SCSharpLib/UI/BriefingRunner.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/BriefingRunner.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/UI/BriefingRunner.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -94,7 +94,7 @@ /// </summary> /// <param name="sender"></param> /// <param name="e"></param> - public void Tick(object sender, TickEventArgs e) + internal void Tick(object sender, TickEventArgs e) { TriggerAction[] actions = triggerData.Triggers[0].Actions; Modified: trunk/scsharp/src/SCSharpLib/UI/BuiltIns.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/BuiltIns.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/UI/BuiltIns.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -95,7 +95,7 @@ /// <summary> /// /// </summary> - public const string GluLoginBin = "rez\\gluLogin.bin"; + public const string GluLogOnBin = "rez\\gluLogin.bin"; /// <summary> /// /// </summary> Modified: trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -104,7 +104,7 @@ /// </summary> public override void MouseEnter() { - if (Sensitive && (Flags & SCElement.RespondToMouse) == SCElement.RespondToMouse) + if (Sensitive && (Flags & SCElements.RespondToMouse) == SCElements.RespondToMouse) { /* highlight the text */ GuiUtility.PlaySound(Mpq, BuiltIns.MouseOverWav); Modified: trunk/scsharp/src/SCSharpLib/UI/FFmpeg.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/FFmpeg.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/UI/FFmpeg.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -43,24 +43,25 @@ { //static bool initSucceeded; - static FFmpeg() - { - try - { - //ffmpeg_init(); - //initSucceeded = true; - } - catch (DllNotFoundException) - { - //initSucceeded = false; - } - } + //static FFmpeg() + //{ + // try + // { + // //ffmpeg_init(); + // //initSucceeded = true; + // //initSucceeded = false; + // } + // catch (DllNotFoundException) + // { + // //initSucceeded = false; + // } + //} - //GCHandle handle; + GCHandle handle; //string filename; - //byte[] buf; - //int width; - //int height; + //byte[] buffer; + //int width = 0; + //int height = 0; /// <summary> /// @@ -75,7 +76,7 @@ //} //this.filename = fileName; - //this.buf = buf; + //this.buffer = buffer; } /// <summary> @@ -83,7 +84,7 @@ /// </summary> public void Start() { - //handle = start_decoder(filename, buf, buf.Length); + //handle = start_decoder(filename, buffer, buffer.Length); //get_dimensions(handle, out width, out height); } @@ -92,11 +93,11 @@ /// </summary> public void Stop() { - //if (handle.Target != null) - //{ - // //stop_decoder(handle); - // handle.Target = null; - //} + if (handle.Target != null) + { + //stop_decoder(handle); + handle.Target = null; + } } /// <summary> @@ -106,7 +107,7 @@ /// <returns></returns> public bool GetNextFrame(byte[] buffer) { - return true; //get_next_frame(handle, buf); + return true;// get_next_frame(handle, buffer); } /// <summary> @@ -116,7 +117,7 @@ { get { - return 0;// return width; + return 0; //width; } } @@ -127,7 +128,7 @@ { get { - return 0;// return height; + return 0;// height; } } Modified: trunk/scsharp/src/SCSharpLib/UI/Game.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/Game.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/UI/Game.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -29,6 +29,7 @@ using System; using System.IO; using System.Threading; +using System.Globalization; using SdlDotNet.Input; using SdlDotNet.Core; @@ -123,7 +124,7 @@ { foreach (string path in Directory.GetFileSystemEntries(scProgramDir)) { - if (String.Compare(Path.GetFileName(path), "broodat.mpq", true) == 0) + if (String.Compare(Path.GetFileName(path), "broodat.mpq", true, CultureInfo.CurrentCulture) == 0) { try { @@ -136,7 +137,7 @@ path), e); } } - else if (String.Compare(Path.GetFileName(path), "stardat.mpq", true) == 0) + else if (String.Compare(Path.GetFileName(path), "stardat.mpq", true, CultureInfo.CurrentCulture) == 0) { try { @@ -154,14 +155,14 @@ if (stardatMpq == null) { - throw new SCException("unable to locate stardat.mpq, please check your StarcraftDirectory configuration setting"); + throw new SCException("unable to locate stardat.mpq, please check your SCDirectory configuration setting"); } if (scCDDir != null) { foreach (string path in Directory.GetFileSystemEntries(scCDDir)) { - if (String.Compare(Path.GetFileName(path), "install.exe", true) == 0) + if (String.Compare(Path.GetFileName(path), "install.exe", true, CultureInfo.CurrentCulture) == 0) { try { @@ -182,7 +183,7 @@ { foreach (string path in Directory.GetFileSystemEntries(bwCDDir)) { - if (String.Compare(Path.GetFileName(path), "install.exe", true) == 0) + if (String.Compare(Path.GetFileName(path), "install.exe", true, CultureInfo.CurrentCulture) == 0) { try { @@ -318,7 +319,7 @@ /// <summary> /// /// </summary> - public static void Quit(object sender, EventArgs e) + internal static void Quit(object sender, EventArgs e) { Events.QuitApplication(); } Modified: trunk/scsharp/src/SCSharpLib/UI/ImageElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ImageElement.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/UI/ImageElement.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -62,7 +62,7 @@ { Surface surface; - if ((Flags & SCElement.Translucent) == SCElement.Translucent) + if ((Flags & SCElements.Translucent) == SCElements.Translucent) { surface = GuiUtility.SurfaceFromStream((Stream)Mpq.GetResource(Text), 254, 0); Modified: trunk/scsharp/src/SCSharpLib/UI/LogOnScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/LogOnScreen.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/UI/LogOnScreen.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -47,7 +47,7 @@ /// </summary> /// <param name="mpq"></param> public LogOnScreen(Mpq mpq) - : base(mpq, "glue\\PalNl", BuiltIns.GluLoginBin) + : base(mpq, "glue\\PalNl", BuiltIns.GluLogOnBin) { } Modified: trunk/scsharp/src/SCSharpLib/UI/Pcx.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/Pcx.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/UI/Pcx.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -69,7 +69,7 @@ byte magic = Utilities.ReadByte(stream); if (magic != 0x0A) { - throw new SCException("stream is not a valid .pcx file"); + throw new SCException("stream is not a valid PCX file"); } /*version =*/ @@ -99,7 +99,7 @@ stream.Position += 54; if (bpp != 8 || numplanes != 1) - throw new SCException("unsupported .pcx image type"); + throw new SCException("unsupported PCX image type"); width = (ushort)(xmax - xmin + 1); height = (ushort)(ymax - ymin + 1); Modified: trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -31,6 +31,7 @@ using System.Threading; using System.Collections.Generic; using System.Drawing; +using System.Globalization; using SdlDotNet.Input; using SCSharp; @@ -121,7 +122,7 @@ } foreach (string d in dir) { - string dl = Path.GetFileName(d).ToLower(); + string dl = Path.GetFileName(d).ToLower(CultureInfo.CurrentCulture); if (curdir == mapdir) { @@ -153,7 +154,7 @@ for (int i = 0; i < files.Length; i++) { - string lower = files[i].ToLower(); + string lower = files[i].ToLower(CultureInfo.CurrentCulture); if (lower.EndsWith(".scm") || lower.EndsWith(".scx")) { fileListbox.AddItem(Path.GetFileName(files[i])); Modified: trunk/scsharp/src/SCSharpLib/UI/Sprite.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/Sprite.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/UI/Sprite.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -54,7 +54,7 @@ public class Sprite { static Random rng = new Random(Environment.TickCount); - + //static bool showSpriteBorders = ShowSpriteBorders(); ushort imagesEntry; string grpPath; @@ -94,6 +94,7 @@ { showSpriteBorders = Boolean.Parse(sb); } + //return true; } /// <summary> Modified: trunk/scsharp/src/SCSharpLib/UI/SpriteManager.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/SpriteManager.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/UI/SpriteManager.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -47,7 +47,15 @@ /// <summary> /// /// </summary> - public static Collection<Sprite> sprites = new Collection<Sprite>(); + private static Collection<Sprite> sprites = new Collection<Sprite>(); + + /// <summary> + /// + /// </summary> + public static Collection<Sprite> Sprites + { + get { return SpriteManager.sprites; } + } static Painter painter; static Mpq ourMpq; Modified: trunk/scsharp/src/SCSharpLib/UI/TextBoxElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/TextBoxElement.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/UI/TextBoxElement.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -30,6 +30,7 @@ using System.IO; using System.Text; using System.Threading; +using System.Globalization; using SdlDotNet.Input; using SdlDotNet.Graphics; @@ -116,7 +117,7 @@ char cc; if ((args.Mod & (ModifierKeys.RightShift | ModifierKeys.LeftShift)) != 0) { - cc = Char.ToUpper(c); + cc = Char.ToUpper(c, CultureInfo.CurrentCulture); } else { Modified: trunk/scsharp/src/SCSharpLib/UI/UIElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/UIElement.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/UI/UIElement.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -72,7 +72,7 @@ this.y1 = el.Y1; this.palette = palette; this.sensitive = true; - this.visible = (el.Flags & SCElement.Visible) != 0; + this.visible = (el.Flags & SCElements.Visible) != 0; } /// <summary> @@ -189,19 +189,19 @@ { int idx = 2; - if ((Flags & SCElement.FontSmallest) != 0) + if ((Flags & SCElements.FontSmallest) != 0) { idx = 0; } - else if ((Flags & SCElement.FontSmaller) != 0) + else if ((Flags & SCElements.FontSmaller) != 0) { idx = 3; } - else if ((Flags & SCElement.FontLarger) != 0) + else if ((Flags & SCElements.FontLarger) != 0) { idx = 3; } - else if ((Flags & SCElement.FontLargest) != 0) + else if ((Flags & SCElements.FontLargest) != 0) { idx = 4; } @@ -225,7 +225,7 @@ /// <summary> /// /// </summary> - public SCElement Flags { get { return el.Flags; } } + public SCElements Flags { get { return el.Flags; } } /// <summary> /// Modified: trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs 2007-05-25 18:09:24 UTC (rev 1399) +++ trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs 2007-05-25 18:44:54 UTC (rev 1400) @@ -679,10 +679,10 @@ if ((args.Key == e.Hotkey) || (args.Key == Key.Return - && (e.Flags & SCElement.DefaultButton) == SCElement.DefaultButton) + && (e.Flags & SCElements.DefaultButton) == SCElements.DefaultButton) || (args.Key == Key.Escape - && (e.Flags & SCElement.CancelButton) == SCElement.CancelButton)) + && (e.Flags & SCElements.CancelButton) == SCElements.CancelButton)) { ActivateElement(e); return; @@ -759,7 +759,7 @@ /// <summary> /// /// </summary> - protected void RaiseReadyEvent(object sender, EventArgs e) + internal void RaiseReadyEvent(object sender, EventArgs e) { if (Ready != null) { @@ -770,7 +770,7 @@ /// <summary> /// /// </summary> - protected void RaiseDoneSwooshing(object sender, EventArgs e) + internal void RaiseDoneSwooshing(object sender, EventArgs e) { if (DoneSwooshing != null) { @@ -856,50 +856,50 @@ /* convert all the BinElements to UIElements for our subclasses to use */ elements = new Collection<UIElement>(); - foreach (BinElement el in bin.Elements) + foreach (BinElement element in bin.Elements) { // Console.WriteLine ("{0}: {1}", el.text, el.flags); - UIElement ui_el = null; - switch (el.Type) + UIElement uiElement = null; + switch (element.Type) { case ElementType.DialogBox: - ui_el = new DialogBoxElement(this, el, fontPalette.RgbData); + uiElement = new DialogBoxElement(this, element, fontPalette.RgbData); break; case ElementType.Image: - ui_el = new ImageElement(this, el, fontPalette.RgbData); + uiElement = new ImageElement(this, element, fontPalette.RgbData); break; case ElementType.TextBox: - ui_el = new TextBoxElement(this, el, fontPalette.RgbData); + uiElement = new TextBoxElement(this, element, fontPalette.RgbData); break; case ElementType.ListBox: - ui_el = new ListBoxElement(this, el, fontPalette.RgbData); + uiElement = new ListBoxElement(this, element, fontPalette.RgbData); break; case ElementType.ComboBox: - ui_el = new ComboBoxElement(this, el, fontPalette.RgbData); + uiElement = new ComboBoxElement(this, element, fontPalette.RgbData); break; case ElementType.LabelLeftAlign: case ElementType.LabelCenterAlign: case ElementType.LabelRightAlign: - ui_el = new LabelElement(this, el, fontPalette.RgbData); + uiElement = new LabelElement(this, element, fontPalette.RgbData); break; case ElementType.Button: case ElementType.DefaultButton: case ElementType.ButtonWithoutBorder: - ui_el = new ButtonElement(this, el, fontPalette.RgbData); + uiElement = new ButtonElement(this, element, fontPalette.RgbData); break; case ElementType.Slider: case ElementType.OptionButton: case ElementType.CheckBox: - ui_el = new UIElement(this, el, fontPalette.RgbData); + uiElement = new UIElement(this, element, fontPalette.RgbData); break; default: - Console.WriteLine("unhandled case {0}", el.Type); - ui_el = new UIElement(this, el, fontPalette.RgbData); + Console.WriteLine("unhandled case {0}", element.Type); + uiElement = new UIElement(this, element, fontPalette.RgbData); break; } - elements.Add(ui_el); + elements.Add(uiElement); } uiPainter = new UIPainter(elements); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-25 18:09:25
|
Revision: 1399 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1399&view=rev Author: jendave Date: 2007-05-25 11:09:24 -0700 (Fri, 25 May 2007) Log Message: ----------- fxcop fixes. Unneccesary string creation and cast Modified Paths: -------------- trunk/scsharp/src/SCSharpLib/MpqLib/Mpq.cs trunk/scsharp/src/SCSharpLib/UI/Game.cs trunk/scsharp/src/SCSharpLib/UI/GuiUtility.cs Modified: trunk/scsharp/src/SCSharpLib/MpqLib/Mpq.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/Mpq.cs 2007-05-24 19:41:20 UTC (rev 1398) +++ trunk/scsharp/src/SCSharpLib/MpqLib/Mpq.cs 2007-05-25 18:09:24 UTC (rev 1399) @@ -69,24 +69,25 @@ throw new ArgumentNullException("path"); } string pathLower = path.ToLower(); - string ext = Path.GetExtension(path).ToLower(); - if (ext == ".tbl") + //string ext = Path.GetExtension(path).ToLower(); + string ext = Path.GetExtension(path); + if (String.Compare(ext, ".tbl", true) == 0) { return typeof(Tbl); } - else if (ext == ".fnt") + else if (String.Compare(ext, ".fnt", true) == 0) { return typeof(SCFont); } - else if (ext == ".got") + else if (String.Compare(ext, ".got", true) == 0) { return typeof(Got); } - else if (ext == ".grp") + else if (String.Compare(ext, ".grp", true) == 0) { return typeof(Grp); } - else if (ext == ".bin") + else if (String.Compare(ext, ".bin", true) == 0) { if (pathLower.EndsWith("aiscript.bin")) /* must come before iscript.bin */ { @@ -101,11 +102,11 @@ return typeof(Bin); } } - else if (ext == ".chk") + else if (String.Compare(ext, ".chk", true) == 0) { return typeof(Chk); } - else if (ext == ".dat") + else if (String.Compare(ext, ".dat", true) == 0) { if (pathLower.EndsWith("flingy.dat")) { @@ -132,7 +133,7 @@ return typeof(MapDataDat); } } - else if (ext == ".spk") + else if (String.Compare(ext, ".spk", true) == 0) { return typeof(Spk); } Modified: trunk/scsharp/src/SCSharpLib/UI/Game.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/Game.cs 2007-05-24 19:41:20 UTC (rev 1398) +++ trunk/scsharp/src/SCSharpLib/UI/Game.cs 2007-05-25 18:09:24 UTC (rev 1399) @@ -123,7 +123,7 @@ { foreach (string path in Directory.GetFileSystemEntries(scProgramDir)) { - if (Path.GetFileName(path).ToLower() == "broodat.mpq") + if (String.Compare(Path.GetFileName(path), "broodat.mpq", true) == 0) { try { @@ -136,7 +136,7 @@ path), e); } } - else if (Path.GetFileName(path).ToLower() == "stardat.mpq") + else if (String.Compare(Path.GetFileName(path), "stardat.mpq", true) == 0) { try { @@ -161,7 +161,7 @@ { foreach (string path in Directory.GetFileSystemEntries(scCDDir)) { - if (Path.GetFileName(path).ToLower() == "install.exe") + if (String.Compare(Path.GetFileName(path), "install.exe", true) == 0) { try { @@ -182,7 +182,7 @@ { foreach (string path in Directory.GetFileSystemEntries(bwCDDir)) { - if (Path.GetFileName(path).ToLower() == "install.exe") + if (String.Compare(Path.GetFileName(path), "install.exe", true) == 0) { try { @@ -307,6 +307,7 @@ Events.MouseButtonUp += MouseButtonUp; Events.KeyboardUp += KeyboardUp; Events.KeyboardDown += KeyboardDown; + //Events.Quit += Quit; DisplayTitle(); Modified: trunk/scsharp/src/SCSharpLib/UI/GuiUtility.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GuiUtility.cs 2007-05-24 19:41:20 UTC (rev 1398) +++ trunk/scsharp/src/SCSharpLib/UI/GuiUtility.cs 2007-05-25 18:09:24 UTC (rev 1399) @@ -517,9 +517,10 @@ { throw new ArgumentNullException("stream"); } - if (stream is MemoryStream) + MemoryStream newStream = stream as MemoryStream; + if (newStream != null) { - return ((MemoryStream)stream).ToArray(); + return newStream.ToArray(); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-24 19:41:25
|
Revision: 1398 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1398&view=rev Author: jendave Date: 2007-05-24 12:41:20 -0700 (Thu, 24 May 2007) Log Message: ----------- rename Added Paths: ----------- trunk/scsharp/src/SCSharpLib/UI/LogOnScreen.cs Removed Paths: ------------- trunk/scsharp/src/SCSharpLib/UI/LoginScreen.cs Added: trunk/scsharp/src/SCSharpLib/UI/LogOnScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/LogOnScreen.cs (rev 0) +++ trunk/scsharp/src/SCSharpLib/UI/LogOnScreen.cs 2007-05-24 19:41:20 UTC (rev 1398) @@ -0,0 +1,237 @@ +#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.Threading; + +using SdlDotNet.Input; +using SCSharp; +using SCSharp.MpqLib; +using System.Drawing; + +namespace SCSharp.UI +{ + /// <summary> + /// + /// </summary> + public class LogOnScreen : UIScreen, IDisposable + { + /// <summary> + /// + /// </summary> + /// <param name="mpq"></param> + public LogOnScreen(Mpq mpq) + : base(mpq, "glue\\PalNl", BuiltIns.GluLoginBin) + { + } + + const int OK_ELEMENT_INDEX = 4; + const int CANCEL_ELEMENT_INDEX = 5; + const int NEW_ELEMENT_INDEX = 6; + const int DELETE_ELEMENT_INDEX = 7; + const int LISTBOX_ELEMENT_INDEX = 8; + + ListBoxElement listbox; + + string spcdir; + string[] files; + + void PopulateUIFromDir() + { + if (Directory.Exists(spcdir)) + { + files = Directory.GetFiles(spcdir, "*.spc"); + + for (int i = 0; i < files.Length; i++) + { + listbox.AddItem(Path.GetFileNameWithoutExtension(files[i])); + } + + listbox.SelectedIndex = 0; + } + } + + /// <summary> + /// + /// </summary> + protected override void ResourceLoader() + { + base.ResourceLoader(); + + for (int i = 0; i < Elements.Count; i++) + { + Console.WriteLine("{0}: {1} '{2}'", i, Elements[i].Type, Elements[i].Text); + } + + Elements[OK_ELEMENT_INDEX].Activate += + delegate(object sender, SCEventArgs args) + { + if (listbox.SelectedIndex == -1) + { + return; + } + + Game.Instance.SwitchToScreen(new RaceSelectionScreen(this.Mpq)); + }; + + Elements[CANCEL_ELEMENT_INDEX].Activate += + delegate(object sender, SCEventArgs args) + { + Game.Instance.SwitchToScreen(UIScreenType.MainMenu); + }; + + Elements[NEW_ELEMENT_INDEX].Activate += + delegate(object sender, SCEventArgs args) + { + EntryDialog d = new EntryDialog(this, this.Mpq, + GlobalResources.GluAllTbl.Strings[22]); + d.Cancel += delegate(object sender2, SCEventArgs args2) + { + DismissDialog(); + }; + d.Ok += delegate(object sender2, SCEventArgs args2) + { + if (listbox.Contains(d.Value)) + { + NameAlreadyExists(d); + } + else + { + DismissDialog(); + listbox.AddItem(d.Value); + } + }; + ShowDialog(d); + }; + + Elements[DELETE_ELEMENT_INDEX].Activate += + delegate(object sender, SCEventArgs args) + { + OkCancelDialog okd = new OkCancelDialog(this, this.Mpq, + GlobalResources.GluAllTbl.Strings[23]); + okd.Cancel += delegate(object sender2, SCEventArgs args2) + { + DismissDialog(); + }; + okd.Ok += delegate(object sender2, SCEventArgs args2) + { + DismissDialog(); + /* actually delete the file */ + listbox.RemoveAt(listbox.SelectedIndex); + }; + ShowDialog(okd); + }; + + listbox = (ListBoxElement)Elements[LISTBOX_ELEMENT_INDEX]; + + spcdir = Path.Combine(Game.Instance.RootDirectory, "characters"); + + PopulateUIFromDir(); + } + + /// <summary> + /// + /// </summary> + /// <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) + { + listbox.KeyboardDown(args); + } + else + { + base.KeyboardDown(args); + } + } + + void NameAlreadyExists(EntryDialog d) + { + OkDialog okd = new OkDialog(d, this.Mpq, + GlobalResources.GluAllTbl.Strings[24]); + d.ShowDialog(okd); + } + + #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.d != null) + //{ + // this.dropDownSurface.Dispose(); + // this.dropDownSurface = null; + //} + } + this.disposed = true; + } + } + + /// <summary> + /// Destroy object + /// </summary> + public void Dispose() + { + this.Dispose(true); + GC.SuppressFinalize(this); + } + + /// <summary> + /// Destroy object + /// </summary> + public void Close() + { + Dispose(); + } + + /// <summary> + /// Destroy object + /// </summary> + ~LogOnScreen() + { + Dispose(false); + } + + + #endregion + } +} Property changes on: trunk/scsharp/src/SCSharpLib/UI/LogOnScreen.cs ___________________________________________________________________ Name: svn:mime-type + text/x-csharp Name: svn:eol-style + native Deleted: trunk/scsharp/src/SCSharpLib/UI/LoginScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/LoginScreen.cs 2007-05-24 19:40:26 UTC (rev 1397) +++ trunk/scsharp/src/SCSharpLib/UI/LoginScreen.cs 2007-05-24 19:41:20 UTC (rev 1398) @@ -1,237 +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.Threading; - -using SdlDotNet.Input; -using SCSharp; -using SCSharp.MpqLib; -using System.Drawing; - -namespace SCSharp.UI -{ - /// <summary> - /// - /// </summary> - public class LogOnScreen : UIScreen, IDisposable - { - /// <summary> - /// - /// </summary> - /// <param name="mpq"></param> - public LogOnScreen(Mpq mpq) - : base(mpq, "glue\\PalNl", BuiltIns.GluLoginBin) - { - } - - const int OK_ELEMENT_INDEX = 4; - const int CANCEL_ELEMENT_INDEX = 5; - const int NEW_ELEMENT_INDEX = 6; - const int DELETE_ELEMENT_INDEX = 7; - const int LISTBOX_ELEMENT_INDEX = 8; - - ListBoxElement listbox; - - string spcdir; - string[] files; - - void PopulateUIFromDir() - { - if (Directory.Exists(spcdir)) - { - files = Directory.GetFiles(spcdir, "*.spc"); - - for (int i = 0; i < files.Length; i++) - { - listbox.AddItem(Path.GetFileNameWithoutExtension(files[i])); - } - - listbox.SelectedIndex = 0; - } - } - - /// <summary> - /// - /// </summary> - protected override void ResourceLoader() - { - base.ResourceLoader(); - - for (int i = 0; i < Elements.Count; i++) - { - Console.WriteLine("{0}: {1} '{2}'", i, Elements[i].Type, Elements[i].Text); - } - - Elements[OK_ELEMENT_INDEX].Activate += - delegate(object sender, SCEventArgs args) - { - if (listbox.SelectedIndex == -1) - { - return; - } - - Game.Instance.SwitchToScreen(new RaceSelectionScreen(this.Mpq)); - }; - - Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate(object sender, SCEventArgs args) - { - Game.Instance.SwitchToScreen(UIScreenType.MainMenu); - }; - - Elements[NEW_ELEMENT_INDEX].Activate += - delegate(object sender, SCEventArgs args) - { - EntryDialog d = new EntryDialog(this, this.Mpq, - GlobalResources.GluAllTbl.Strings[22]); - d.Cancel += delegate(object sender2, SCEventArgs args2) - { - DismissDialog(); - }; - d.Ok += delegate(object sender2, SCEventArgs args2) - { - if (listbox.Contains(d.Value)) - { - NameAlreadyExists(d); - } - else - { - DismissDialog(); - listbox.AddItem(d.Value); - } - }; - ShowDialog(d); - }; - - Elements[DELETE_ELEMENT_INDEX].Activate += - delegate(object sender, SCEventArgs args) - { - OkCancelDialog okd = new OkCancelDialog(this, this.Mpq, - GlobalResources.GluAllTbl.Strings[23]); - okd.Cancel += delegate(object sender2, SCEventArgs args2) - { - DismissDialog(); - }; - okd.Ok += delegate(object sender2, SCEventArgs args2) - { - DismissDialog(); - /* actually delete the file */ - listbox.RemoveAt(listbox.SelectedIndex); - }; - ShowDialog(okd); - }; - - listbox = (ListBoxElement)Elements[LISTBOX_ELEMENT_INDEX]; - - spcdir = Path.Combine(Game.Instance.RootDirectory, "characters"); - - PopulateUIFromDir(); - } - - /// <summary> - /// - /// </summary> - /// <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) - { - listbox.KeyboardDown(args); - } - else - { - base.KeyboardDown(args); - } - } - - void NameAlreadyExists(EntryDialog d) - { - OkDialog okd = new OkDialog(d, this.Mpq, - GlobalResources.GluAllTbl.Strings[24]); - d.ShowDialog(okd); - } - - #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.d != null) - //{ - // this.dropDownSurface.Dispose(); - // this.dropDownSurface = null; - //} - } - this.disposed = true; - } - } - - /// <summary> - /// Destroy object - /// </summary> - public void Dispose() - { - this.Dispose(true); - GC.SuppressFinalize(this); - } - - /// <summary> - /// Destroy object - /// </summary> - public void Close() - { - Dispose(); - } - - /// <summary> - /// Destroy object - /// </summary> - ~LogOnScreen() - { - Dispose(false); - } - - - #endregion - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-24 19:40:29
|
Revision: 1397 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1397&view=rev Author: jendave Date: 2007-05-24 12:40:26 -0700 (Thu, 24 May 2007) Log Message: ----------- more fxcop fixes Modified Paths: -------------- trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs trunk/scsharp/src/SCSharpLib/MpqLib/BitStream.cs trunk/scsharp/src/SCSharpLib/MpqLib/Got.cs trunk/scsharp/src/SCSharpLib/MpqLib/Grp.cs trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs trunk/scsharp/src/SCSharpLib/MpqLib/SCFont.cs trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs trunk/scsharp/src/SCSharpLib/UI/BuiltIns.cs trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs trunk/scsharp/src/SCSharpLib/UI/CreditsScreen.cs trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs trunk/scsharp/src/SCSharpLib/UI/GuiUtility.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/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/SoundDialog.cs trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs trunk/scsharp/src/SCSharpLib/UI/TitleScreen.cs Modified: trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -378,7 +378,7 @@ { if (buffer == null) { - throw new ArgumentNullException("buf"); + throw new ArgumentNullException("buffer"); } x1 = Utilities.ReadWord(buffer, position + 4); y1 = Utilities.ReadWord(buffer, position + 6); Modified: trunk/scsharp/src/SCSharpLib/MpqLib/BitStream.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/BitStream.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/MpqLib/BitStream.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -72,7 +72,7 @@ { if (bitCount > 16) { - throw new ArgumentOutOfRangeException("BitCount", "Maximum BitCount is 16"); + throw new ArgumentOutOfRangeException("bitCount", "Maximum BitCount is 16"); } if (EnsureBits(bitCount) == false) { Modified: trunk/scsharp/src/SCSharpLib/MpqLib/Got.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/Got.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/MpqLib/Got.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -55,7 +55,7 @@ ///0x54 (unsigned short) - Game type's variable (actual setting rather than just the label as in 0x45) ///0x58 (unsigned long) - Starting mineral ammount /// </summary> - public enum InitialUnits + public enum InitialUnitsSetting { /// <summary> /// @@ -150,9 +150,9 @@ /// <summary> /// /// </summary> - public InitialUnits InitialUnits + public InitialUnitsSetting InitialUnits { - get { return (InitialUnits)contents[0x4d]; } + get { return (InitialUnitsSetting)contents[0x4d]; } } } } Modified: trunk/scsharp/src/SCSharpLib/MpqLib/Grp.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/Grp.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/MpqLib/Grp.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -210,7 +210,7 @@ } catch (IndexOutOfRangeException e) { - Console.WriteLine("EXCEPTION on line {0}, x = {2}, i = {3}, line length = {2} (line data length = {4}):", line, x, lineLength, i, line_data.Length); + Console.WriteLine("EXCEPTION on line {0}, x = {1}, i = {2}, line length = {3} (line data length = {4}):", line, x, lineLength, i, line_data.Length); Console.WriteLine(e.StackTrace); } } Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqStream.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -223,16 +223,16 @@ target = Length + offset; break; default: - throw new ArgumentNullException("Origin", "Invalid SeekOrigin"); + throw new ArgumentNullException("origin", "Invalid SeekOrigin"); } if (target < 0) { - throw new ArgumentOutOfRangeException("Attmpted to Seek before the beginning of the stream"); + throw new ArgumentOutOfRangeException("offset", "Attmpted to Seek before the beginning of the stream"); } if (target >= Length) { - throw new ArgumentOutOfRangeException("Attmpted to Seek beyond the end of the stream"); + throw new ArgumentOutOfRangeException("offset", "Attmpted to Seek beyond the end of the stream"); } mPosition = target; Modified: trunk/scsharp/src/SCSharpLib/MpqLib/SCFont.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/MpqLib/SCFont.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/MpqLib/SCFont.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -228,10 +228,10 @@ /// <summary> /// /// </summary> - /// <param name="glyphID"></param> - public void DumpGlyph(int glyphID) + /// <param name="glyphId"></param> + public void DumpGlyph(int glyphId) { - Glyph g = GetGlyph(glyphID); + Glyph g = GetGlyph(glyphId); byte[,] bitmap = g.Bitmap; for (int y = g.Height - 1; y >= 0; y--) { Modified: trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -159,3 +159,43 @@ [module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.RestartConfirmationDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq)", MessageId = "1#mpq")] [module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.SpeedDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq)", MessageId = "1#mpq")] [module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.PlayCustomScreen..ctor(SCSharp.MpqLib.Mpq)", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.SpritesTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.OrdersTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluCampaignBin", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.WeaponsTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluPEditBin", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.ScoreDPMainPcx", MessageId = "Pcx")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GameConsolePcx", MessageId = "Pcx")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluLoginBin", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluConnectionBin", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluAllTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluAllTbl", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluExpCampaignBin", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.RezCreditListTxt", MessageId = "Rez")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluLoadBin", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluScoreBin", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluReadyBin", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluMainBin", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.HelpTxtTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.ImagesTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluPOkCancelBin", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.FlingyTbl", MessageId = "Flingy")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.FlingyTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.SfxDataDat", MessageId = "Sfx")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.TitlePcx", MessageId = "Pcx")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluGameModeBin", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluCreateBin", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.ScoreVPMainPcx", MessageId = "Pcx")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.MapDataTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.UnitsTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluPOkBin", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.TechDataTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.RezCreditExpTxt", MessageId = "Rez")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.GluCustomBin", MessageId = "Glu")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.UpgradesTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.SfxDataTbl", MessageId = "Sfx")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.SfxDataTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.PortDataTbl", MessageId = "Tbl")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.BuiltIns.FlingyDat", MessageId = "Flingy")] +[module: SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", Scope = "type", Target = "SCSharp.UI.LogOnScreen", MessageId = "OnScreen")] + Modified: trunk/scsharp/src/SCSharpLib/UI/BuiltIns.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/BuiltIns.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/BuiltIns.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -37,7 +37,7 @@ /// <summary> /// /// </summary> - public const string TitleDlgBin = "rez\\titledlg.bin"; + public const string TitleDialogBin = "rez\\titledlg.bin"; #if RELEASE public const string TitlePcx = "glue\\title\\title.pcx"; #else @@ -68,22 +68,22 @@ /// <summary> /// /// </summary> - public const string GluCmpgnBin = "rez\\glucmpgn.bin"; // original + public const string GluCampaignBin = "rez\\glucmpgn.bin"; // original /// <summary> /// /// </summary> - public const string GluExpcmpgnBin = "rez\\gluexpcmpgn.bin"; // broodwar + public const string GluExpCampaignBin = "rez\\gluexpcmpgn.bin"; // broodwar /* Play custom screen */ /// <summary> /// /// </summary> - public const string GluCustmBin = "rez\\gluCustm.bin"; + public const string GluCustomBin = "rez\\gluCustm.bin"; /// <summary> /// /// </summary> - public const string GluCreatBin = "rez\\gluCreat.bin"; + public const string GluCreateBin = "rez\\gluCreat.bin"; /* load saved screen */ /// <summary> @@ -113,13 +113,13 @@ /// <summary> /// /// </summary> - public const string GluRdyBin = "rez\\glurdy{0}.bin"; + public const string GluReadyBin = "rez\\glurdy{0}.bin"; /* Connection screen */ /// <summary> /// /// </summary> - public const string GluConnBin = "rez\\gluConn.bin"; + public const string GluConnectionBin = "rez\\gluConn.bin"; /* Score screen */ /// <summary> @@ -189,11 +189,11 @@ /// <summary> /// /// </summary> - public const string PortdataDat = "arr\\portdata.dat"; + public const string PortDataDat = "arr\\portdata.dat"; /// <summary> /// /// </summary> - public const string PortdataTbl = "arr\\portdata.tbl"; + public const string PortDataTbl = "arr\\portdata.tbl"; /// <summary> /// /// </summary> @@ -247,29 +247,29 @@ /// <summary> /// /// </summary> - public const string MouseoverWav = "sound\\glue\\mouseover.wav"; + public const string MouseOverWav = "sound\\glue\\mouseover.wav"; /// <summary> /// /// </summary> - public const string Mousedown2Wav = "sound\\glue\\mousedown2.wav"; + public const string MouseDown2Wav = "sound\\glue\\mousedown2.wav"; /// <summary> /// /// </summary> - public const string SwishinWav = "sound\\glue\\swishin.wav"; + public const string SwishInWav = "sound\\glue\\swishin.wav"; /// <summary> /// /// </summary> - public const string SwishoutWav = "sound\\glue\\swishout.wav"; + public const string SwishOutWav = "sound\\glue\\swishout.wav"; /* credits */ /// <summary> /// /// </summary> - public const string RezCrdtexpTxt = "rez\\crdt_exp.txt"; + public const string RezCreditExpTxt = "rez\\crdt_exp.txt"; /// <summary> /// /// </summary> - public const string RezCrdtlistTxt = "rez\\crdt_lst.txt"; + public const string RezCreditListTxt = "rez\\crdt_lst.txt"; /* music */ /// <summary> @@ -289,11 +289,11 @@ /// <summary> /// /// </summary> - public const string SndDlgBin = "rez\\snd_dlg.bin"; + public const string SoundDialogBin = "rez\\snd_dlg.bin"; /// <summary> /// /// </summary> - public const string SpdDlgBin = "rez\\spd_dlg.bin"; + public const string SpeedDialogBin = "rez\\spd_dlg.bin"; /// <summary> /// /// </summary> @@ -301,15 +301,15 @@ /// <summary> /// /// </summary> - public const string NetDlgBin = "rez\\netdlg.bin"; + public const string NetDialogBin = "rez\\netdlg.bin"; /// <summary> /// /// </summary> - public const string ObjctDlgBin = "rez\\objctdlg.bin"; + public const string ObjectDialogBin = "rez\\objctdlg.bin"; /// <summary> /// /// </summary> - public const string AbrtMenuBin = "rez\\abrtmenu.bin"; + public const string AbortMenuBin = "rez\\abrtmenu.bin"; /// <summary> /// /// </summary> @@ -321,7 +321,7 @@ /// <summary> /// /// </summary> - public const string Quit2MnuBin = "rez\\quit2mnu.bin"; + public const string Quit2MenuBin = "rez\\quit2mnu.bin"; /// <summary> /// /// </summary> @@ -339,6 +339,6 @@ /// <summary> /// /// </summary> - public const string MinimapBin = "rez\\minimap.bin"; + public const string MiniMapBin = "rez\\minimap.bin"; } } Modified: trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -107,7 +107,7 @@ if (Sensitive && (Flags & SCElement.RespondToMouse) == SCElement.RespondToMouse) { /* highlight the text */ - GuiUtility.PlaySound(Mpq, BuiltIns.MouseoverWav); + GuiUtility.PlaySound(Mpq, BuiltIns.MouseOverWav); } base.MouseEnter(); } Modified: trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -47,7 +47,7 @@ /// </summary> /// <param name="mpq"></param> public ConnectionScreen(Mpq mpq) - : base(mpq, "glue\\PalNl", BuiltIns.GluConnBin) + : base(mpq, "glue\\PalNl", BuiltIns.GluConnectionBin) { } Modified: trunk/scsharp/src/SCSharpLib/UI/CreditsScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/CreditsScreen.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/CreditsScreen.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -64,11 +64,11 @@ /* broodwar credits */ if (Game.Instance.IsBroodWar) { - AddMarkup((Stream)this.Mpq.GetResource(BuiltIns.RezCrdtexpTxt)); + AddMarkup((Stream)this.Mpq.GetResource(BuiltIns.RezCreditExpTxt)); } /* starcraft credits */ - AddMarkup((Stream)this.Mpq.GetResource(BuiltIns.RezCrdtlistTxt)); + AddMarkup((Stream)this.Mpq.GetResource(BuiltIns.RezCreditListTxt)); } /// <summary> Modified: trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public EndMissionDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.AbrtMenuBin) + : base(parent, mpq, "glue\\Palmm", BuiltIns.AbortMenuBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -668,7 +668,7 @@ units.Add(unit); } - if (template != null && (template.InitialUnits != InitialUnits.UseMapSettings)) + if (template != null && (template.InitialUnits != InitialUnitsSetting.UseMapSettings)) { foreach (Unit sl in startLocations) { Modified: trunk/scsharp/src/SCSharpLib/UI/GuiUtility.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GuiUtility.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/GuiUtility.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -103,7 +103,7 @@ { if (glyph == null) { - throw new ArgumentNullException("g"); + throw new ArgumentNullException("glyph"); } if (palette == null) { Modified: trunk/scsharp/src/SCSharpLib/UI/LoginScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/LoginScreen.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/LoginScreen.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -183,16 +183,55 @@ d.ShowDialog(okd); } - #region IDisposable Members + #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.d != 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> + ~LogOnScreen() + { + Dispose(false); + } + + #endregion } } Modified: trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -72,7 +72,7 @@ try { Game.Instance.PlayingBroodWar = args.Expansion; - GuiUtility.PlaySound(this.Mpq, BuiltIns.Mousedown2Wav); + GuiUtility.PlaySound(this.Mpq, BuiltIns.MouseDown2Wav); Game.Instance.SwitchToScreen(nextScreen); } catch (Exception e) @@ -101,7 +101,7 @@ } else { - GuiUtility.PlaySound(this.Mpq, BuiltIns.Mousedown2Wav); + GuiUtility.PlaySound(this.Mpq, BuiltIns.MouseDown2Wav); Game.Instance.SwitchToScreen(UIScreenType.LogOn); } }; @@ -115,7 +115,7 @@ } else { - GuiUtility.PlaySound(this.Mpq, BuiltIns.Mousedown2Wav); + GuiUtility.PlaySound(this.Mpq, BuiltIns.MouseDown2Wav); Game.Instance.SwitchToScreen(UIScreenType.Connection); } }; Modified: trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public NetworkDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.NetDlgBin) + : 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-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/ObjectivesDialog.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public ObjectivesDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.ObjctDlgBin) + : base(parent, mpq, "glue\\Palmm", BuiltIns.ObjectDialogBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -48,7 +48,7 @@ /// </summary> /// <param name="mpq"></param> public PlayCustomScreen(Mpq mpq) - : base(mpq, "glue\\PalNl", BuiltIns.GluCustmBin) + : base(mpq, "glue\\PalNl", BuiltIns.GluCustomBin) { } Modified: trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public QuitMissionDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.Quit2MnuBin) + : 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-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/RaceSelectionScreen.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -50,7 +50,7 @@ /// <param name="mpq"></param> public RaceSelectionScreen(Mpq mpq) : base(mpq, "glue\\PalNl", - Game.Instance.PlayingBroodWar ? BuiltIns.GluExpcmpgnBin : BuiltIns.GluCmpgnBin) + Game.Instance.PlayingBroodWar ? BuiltIns.GluExpCampaignBin : BuiltIns.GluCampaignBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -68,7 +68,7 @@ int firstPortraitElementIndex) : base(mpq, String.Format("glue\\Ready{0}", Utilities.RaceChar[(int)Game.Instance.Race]), - String.Format(BuiltIns.GluRdyBin, Utilities.RaceCharLower[(int)Game.Instance.Race])) + String.Format(BuiltIns.GluReadyBin, Utilities.RaceCharLower[(int)Game.Instance.Race])) { if (mpq == null) { Modified: trunk/scsharp/src/SCSharpLib/UI/SoundDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/SoundDialog.cs 2007-05-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/SoundDialog.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public SoundDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.SndDlgBin) + : 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-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public SpeedDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", BuiltIns.SpdDlgBin) + : 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-24 19:03:55 UTC (rev 1396) +++ trunk/scsharp/src/SCSharpLib/UI/TitleScreen.cs 2007-05-24 19:40:26 UTC (rev 1397) @@ -47,7 +47,7 @@ /// </summary> /// <param name="mpq"></param> public TitleScreen(Mpq mpq) - : base(mpq, "glue\\Palmm", BuiltIns.TitleDlgBin) + : base(mpq, "glue\\Palmm", BuiltIns.TitleDialogBin) { BackgroundPath = BuiltIns.TitlePcx; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-24 19:03:56
|
Revision: 1396 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1396&view=rev Author: jendave Date: 2007-05-24 12:03:55 -0700 (Thu, 24 May 2007) Log Message: ----------- rename Added Paths: ----------- trunk/scsharp/src/SCSharpLib/UI/BuiltIns.cs Added: trunk/scsharp/src/SCSharpLib/UI/BuiltIns.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/BuiltIns.cs (rev 0) +++ trunk/scsharp/src/SCSharpLib/UI/BuiltIns.cs 2007-05-24 19:03:55 UTC (rev 1396) @@ -0,0 +1,344 @@ +#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 + +namespace SCSharp.UI +{ + /// <summary> + /// + /// </summary> + public static class BuiltIns + { + /* title screen */ + /// <summary> + /// + /// </summary> + public const string TitleDlgBin = "rez\\titledlg.bin"; +#if RELEASE + public const string TitlePcx = "glue\\title\\title.pcx"; +#else + /// <summary> + /// + /// </summary> + public const string TitlePcx = "glue\\title\\title-beta.pcx"; +#endif + + /* UI strings */ + /// <summary> + /// + /// </summary> + public const string GluAllTbl = "rez\\gluAll.tbl"; + + /* Main menu */ + /// <summary> + /// + /// </summary> + public const string GluMainBin = "rez\\gluMain.bin"; + + /// <summary> + /// + /// </summary> + public const string GluGameModeBin = "rez\\gluGameMode.bin"; + + /* Campaign screen */ + /// <summary> + /// + /// </summary> + public const string GluCmpgnBin = "rez\\glucmpgn.bin"; // original + /// <summary> + /// + /// </summary> + public const string GluExpcmpgnBin = "rez\\gluexpcmpgn.bin"; // broodwar + + /* Play custom screen */ + /// <summary> + /// + /// </summary> + public const string GluCustmBin = "rez\\gluCustm.bin"; + + /// <summary> + /// + /// </summary> + public const string GluCreatBin = "rez\\gluCreat.bin"; + + /* load saved screen */ + /// <summary> + /// + /// </summary> + public const string GluLoadBin = "rez\\gluLoad.bin"; + + /* Login screen */ + /// <summary> + /// + /// </summary> + public const string GluLoginBin = "rez\\gluLogin.bin"; + /// <summary> + /// + /// </summary> + public const string GluPEditBin = "rez\\gluPEdit.bin"; + /// <summary> + /// + /// </summary> + public const string GluPOkBin = "rez\\gluPOk.bin"; + /// <summary> + /// + /// </summary> + public const string GluPOkCancelBin = "rez\\gluPOkCancel.bin"; + + /* Ready room */ + /// <summary> + /// + /// </summary> + public const string GluRdyBin = "rez\\glurdy{0}.bin"; + + /* Connection screen */ + /// <summary> + /// + /// </summary> + public const string GluConnBin = "rez\\gluConn.bin"; + + /* Score screen */ + /// <summary> + /// + /// </summary> + public const string GluScoreBin = "rez\\gluScore.bin"; + + /// <summary> + /// + /// </summary> + public const string ScoreVPMainPcx = "glue\\score{0}v\\pMain.pcx"; + /// <summary> + /// + /// </summary> + public const string ScoreDPMainPcx = "glue\\score{0}d\\pMain.pcx"; + + /// <summary> + /// + /// </summary> + public const string GameConsolePcx = "game\\{0}console.pcx"; + + /* scripts */ + /// <summary> + /// + /// </summary> + public const string IScriptBin = "scripts\\iscript.bin"; + /// <summary> + /// + /// </summary> + public const string AIScriptBin = "scripts\\aiscript.bin"; + + /* arr files */ + /// <summary> + /// + /// </summary> + public const string FlingyDat = "arr\\flingy.dat"; + /// <summary> + /// + /// </summary> + public const string FlingyTbl = "arr\\flingy.tbl"; + /// <summary> + /// + /// </summary> + public const string ImagesDat = "arr\\images.dat"; + /// <summary> + /// + /// </summary> + public const string ImagesTbl = "arr\\images.tbl"; + //public const string MapdataDat = "arr\\mapdata.dat"; + //public const string MapdataTbl = "arr\\mapdata.tbl"; + /// <summary> + /// + /// </summary> + public const string OrdersDat = "arr\\orders.dat"; + /// <summary> + /// + /// </summary> + public const string OrdersTbl = "arr\\orders.tbl"; + /// <summary> + /// + /// </summary> + public const string MapDataDat = "arr\\mapdata.dat"; + /// <summary> + /// + /// </summary> + public const string MapDataTbl = "arr\\mapdata.tbl"; + /// <summary> + /// + /// </summary> + public const string PortdataDat = "arr\\portdata.dat"; + /// <summary> + /// + /// </summary> + public const string PortdataTbl = "arr\\portdata.tbl"; + /// <summary> + /// + /// </summary> + public const string SfxDataDat = "arr\\sfxdata.dat"; + /// <summary> + /// + /// </summary> + public const string SfxDataTbl = "arr\\sfxdata.tbl"; + /// <summary> + /// + /// </summary> + public const string SpritesDat = "arr\\sprites.dat"; + /// <summary> + /// + /// </summary> + public const string SpritesTbl = "arr\\sprites.tbl"; + /// <summary> + /// + /// </summary> + public const string TechDataDat = "arr\\techdata.dat"; + /// <summary> + /// + /// </summary> + public const string TechDataTbl = "arr\\techdata.tbl"; + /// <summary> + /// + /// </summary> + public const string UnitsDat = "arr\\units.dat"; + /// <summary> + /// + /// </summary> + public const string UnitsTbl = "arr\\units.tbl"; + /// <summary> + /// + /// </summary> + public const string UpgradesDat = "arr\\upgrades.dat"; + /// <summary> + /// + /// </summary> + public const string UpgradesTbl = "arr\\upgrades.tbl"; + /// <summary> + /// + /// </summary> + public const string WeaponsDat = "arr\\weapons.dat"; + /// <summary> + /// + /// </summary> + public const string WeaponsTbl = "arr\\weapons.tbl"; + + /* sounds */ + /// <summary> + /// + /// </summary> + public const string MouseoverWav = "sound\\glue\\mouseover.wav"; + /// <summary> + /// + /// </summary> + public const string Mousedown2Wav = "sound\\glue\\mousedown2.wav"; + /// <summary> + /// + /// </summary> + public const string SwishinWav = "sound\\glue\\swishin.wav"; + /// <summary> + /// + /// </summary> + public const string SwishoutWav = "sound\\glue\\swishout.wav"; + + /* credits */ + /// <summary> + /// + /// </summary> + public const string RezCrdtexpTxt = "rez\\crdt_exp.txt"; + /// <summary> + /// + /// </summary> + public const string RezCrdtlistTxt = "rez\\crdt_lst.txt"; + + /* music */ + /// <summary> + /// + /// </summary> + public const string MusicTitleWav = "music\\title.wav"; + + /* game menus */ + /// <summary> + /// + /// </summary> + public const string GameMenuBin = "rez\\gamemenu.bin"; + /// <summary> + /// + /// </summary> + public const string OptionsBin = "rez\\options.bin"; + /// <summary> + /// + /// </summary> + public const string SndDlgBin = "rez\\snd_dlg.bin"; + /// <summary> + /// + /// </summary> + public const string SpdDlgBin = "rez\\spd_dlg.bin"; + /// <summary> + /// + /// </summary> + public const string VideoBin = "rez\\video.bin"; + /// <summary> + /// + /// </summary> + public const string NetDlgBin = "rez\\netdlg.bin"; + /// <summary> + /// + /// </summary> + public const string ObjctDlgBin = "rez\\objctdlg.bin"; + /// <summary> + /// + /// </summary> + public const string AbrtMenuBin = "rez\\abrtmenu.bin"; + /// <summary> + /// + /// </summary> + public const string RestartBin = "rez\\restart.bin"; + /// <summary> + /// + /// </summary> + public const string QuitBin = "rez\\quit.bin"; + /// <summary> + /// + /// </summary> + public const string Quit2MnuBin = "rez\\quit2mnu.bin"; + /// <summary> + /// + /// </summary> + public const string HelpMenuBin = "rez\\helpmenu.bin"; + /// <summary> + /// + /// </summary> + public const string HelpBin = "rez\\help.bin"; + + /// <summary> + /// + /// </summary> + public const string HelpTxtTbl = "rez\\help_txt.tbl"; + + /// <summary> + /// + /// </summary> + public const string MinimapBin = "rez\\minimap.bin"; + } +} Property changes on: trunk/scsharp/src/SCSharpLib/UI/BuiltIns.cs ___________________________________________________________________ Name: svn:mime-type + text/x-csharp Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-24 19:03:28
|
Revision: 1395 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1395&view=rev Author: jendave Date: 2007-05-24 12:03:26 -0700 (Thu, 24 May 2007) Log Message: ----------- rename Removed Paths: ------------- trunk/scsharp/src/SCSharpLib/UI/Builtins.cs Deleted: trunk/scsharp/src/SCSharpLib/UI/Builtins.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/Builtins.cs 2007-05-24 19:02:43 UTC (rev 1394) +++ trunk/scsharp/src/SCSharpLib/UI/Builtins.cs 2007-05-24 19:03:26 UTC (rev 1395) @@ -1,344 +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 - -namespace SCSharp.UI -{ - /// <summary> - /// - /// </summary> - public static class BuiltIns - { - /* title screen */ - /// <summary> - /// - /// </summary> - public const string TitleDlgBin = "rez\\titledlg.bin"; -#if RELEASE - public const string TitlePcx = "glue\\title\\title.pcx"; -#else - /// <summary> - /// - /// </summary> - public const string TitlePcx = "glue\\title\\title-beta.pcx"; -#endif - - /* UI strings */ - /// <summary> - /// - /// </summary> - public const string GluAllTbl = "rez\\gluAll.tbl"; - - /* Main menu */ - /// <summary> - /// - /// </summary> - public const string GluMainBin = "rez\\gluMain.bin"; - - /// <summary> - /// - /// </summary> - public const string GluGameModeBin = "rez\\gluGameMode.bin"; - - /* Campaign screen */ - /// <summary> - /// - /// </summary> - public const string GluCmpgnBin = "rez\\glucmpgn.bin"; // original - /// <summary> - /// - /// </summary> - public const string GluExpcmpgnBin = "rez\\gluexpcmpgn.bin"; // broodwar - - /* Play custom screen */ - /// <summary> - /// - /// </summary> - public const string GluCustmBin = "rez\\gluCustm.bin"; - - /// <summary> - /// - /// </summary> - public const string GluCreatBin = "rez\\gluCreat.bin"; - - /* load saved screen */ - /// <summary> - /// - /// </summary> - public const string GluLoadBin = "rez\\gluLoad.bin"; - - /* Login screen */ - /// <summary> - /// - /// </summary> - public const string GluLoginBin = "rez\\gluLogin.bin"; - /// <summary> - /// - /// </summary> - public const string GluPEditBin = "rez\\gluPEdit.bin"; - /// <summary> - /// - /// </summary> - public const string GluPOkBin = "rez\\gluPOk.bin"; - /// <summary> - /// - /// </summary> - public const string GluPOkCancelBin = "rez\\gluPOkCancel.bin"; - - /* Ready room */ - /// <summary> - /// - /// </summary> - public const string GluRdyBin = "rez\\glurdy{0}.bin"; - - /* Connection screen */ - /// <summary> - /// - /// </summary> - public const string GluConnBin = "rez\\gluConn.bin"; - - /* Score screen */ - /// <summary> - /// - /// </summary> - public const string GluScoreBin = "rez\\gluScore.bin"; - - /// <summary> - /// - /// </summary> - public const string ScoreVPMainPcx = "glue\\score{0}v\\pMain.pcx"; - /// <summary> - /// - /// </summary> - public const string ScoreDPMainPcx = "glue\\score{0}d\\pMain.pcx"; - - /// <summary> - /// - /// </summary> - public const string GameConsolePcx = "game\\{0}console.pcx"; - - /* scripts */ - /// <summary> - /// - /// </summary> - public const string IScriptBin = "scripts\\iscript.bin"; - /// <summary> - /// - /// </summary> - public const string AIScriptBin = "scripts\\aiscript.bin"; - - /* arr files */ - /// <summary> - /// - /// </summary> - public const string FlingyDat = "arr\\flingy.dat"; - /// <summary> - /// - /// </summary> - public const string FlingyTbl = "arr\\flingy.tbl"; - /// <summary> - /// - /// </summary> - public const string ImagesDat = "arr\\images.dat"; - /// <summary> - /// - /// </summary> - public const string ImagesTbl = "arr\\images.tbl"; - //public const string MapdataDat = "arr\\mapdata.dat"; - //public const string MapdataTbl = "arr\\mapdata.tbl"; - /// <summary> - /// - /// </summary> - public const string OrdersDat = "arr\\orders.dat"; - /// <summary> - /// - /// </summary> - public const string OrdersTbl = "arr\\orders.tbl"; - /// <summary> - /// - /// </summary> - public const string MapDataDat = "arr\\mapdata.dat"; - /// <summary> - /// - /// </summary> - public const string MapDataTbl = "arr\\mapdata.tbl"; - /// <summary> - /// - /// </summary> - public const string PortdataDat = "arr\\portdata.dat"; - /// <summary> - /// - /// </summary> - public const string PortdataTbl = "arr\\portdata.tbl"; - /// <summary> - /// - /// </summary> - public const string SfxDataDat = "arr\\sfxdata.dat"; - /// <summary> - /// - /// </summary> - public const string SfxDataTbl = "arr\\sfxdata.tbl"; - /// <summary> - /// - /// </summary> - public const string SpritesDat = "arr\\sprites.dat"; - /// <summary> - /// - /// </summary> - public const string SpritesTbl = "arr\\sprites.tbl"; - /// <summary> - /// - /// </summary> - public const string TechDataDat = "arr\\techdata.dat"; - /// <summary> - /// - /// </summary> - public const string TechDataTbl = "arr\\techdata.tbl"; - /// <summary> - /// - /// </summary> - public const string UnitsDat = "arr\\units.dat"; - /// <summary> - /// - /// </summary> - public const string UnitsTbl = "arr\\units.tbl"; - /// <summary> - /// - /// </summary> - public const string UpgradesDat = "arr\\upgrades.dat"; - /// <summary> - /// - /// </summary> - public const string UpgradesTbl = "arr\\upgrades.tbl"; - /// <summary> - /// - /// </summary> - public const string WeaponsDat = "arr\\weapons.dat"; - /// <summary> - /// - /// </summary> - public const string WeaponsTbl = "arr\\weapons.tbl"; - - /* sounds */ - /// <summary> - /// - /// </summary> - public const string MouseoverWav = "sound\\glue\\mouseover.wav"; - /// <summary> - /// - /// </summary> - public const string Mousedown2Wav = "sound\\glue\\mousedown2.wav"; - /// <summary> - /// - /// </summary> - public const string SwishinWav = "sound\\glue\\swishin.wav"; - /// <summary> - /// - /// </summary> - public const string SwishoutWav = "sound\\glue\\swishout.wav"; - - /* credits */ - /// <summary> - /// - /// </summary> - public const string RezCrdtexpTxt = "rez\\crdt_exp.txt"; - /// <summary> - /// - /// </summary> - public const string RezCrdtlistTxt = "rez\\crdt_lst.txt"; - - /* music */ - /// <summary> - /// - /// </summary> - public const string MusicTitleWav = "music\\title.wav"; - - /* game menus */ - /// <summary> - /// - /// </summary> - public const string GameMenuBin = "rez\\gamemenu.bin"; - /// <summary> - /// - /// </summary> - public const string OptionsBin = "rez\\options.bin"; - /// <summary> - /// - /// </summary> - public const string SndDlgBin = "rez\\snd_dlg.bin"; - /// <summary> - /// - /// </summary> - public const string SpdDlgBin = "rez\\spd_dlg.bin"; - /// <summary> - /// - /// </summary> - public const string VideoBin = "rez\\video.bin"; - /// <summary> - /// - /// </summary> - public const string NetDlgBin = "rez\\netdlg.bin"; - /// <summary> - /// - /// </summary> - public const string ObjctDlgBin = "rez\\objctdlg.bin"; - /// <summary> - /// - /// </summary> - public const string AbrtMenuBin = "rez\\abrtmenu.bin"; - /// <summary> - /// - /// </summary> - public const string RestartBin = "rez\\restart.bin"; - /// <summary> - /// - /// </summary> - public const string QuitBin = "rez\\quit.bin"; - /// <summary> - /// - /// </summary> - public const string Quit2MnuBin = "rez\\quit2mnu.bin"; - /// <summary> - /// - /// </summary> - public const string HelpMenuBin = "rez\\helpmenu.bin"; - /// <summary> - /// - /// </summary> - public const string HelpBin = "rez\\help.bin"; - - /// <summary> - /// - /// </summary> - public const string HelpTxtTbl = "rez\\help_txt.tbl"; - - /// <summary> - /// - /// </summary> - public const string MinimapBin = "rez\\minimap.bin"; - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-24 19:02:45
|
Revision: 1394 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1394&view=rev Author: jendave Date: 2007-05-24 12:02:43 -0700 (Thu, 24 May 2007) Log Message: ----------- more FXcop fixes Modified Paths: -------------- trunk/scsharp/src/SCSharpLib/UI/Builtins.cs trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs trunk/scsharp/src/SCSharpLib/UI/CreditsScreen.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/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/HelpDialog.cs trunk/scsharp/src/SCSharpLib/UI/KeystrokeDialog.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/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/SoundDialog.cs trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs trunk/scsharp/src/SCSharpLib/UI/TitleScreen.cs trunk/scsharp/src/SCSharpLib/UI/VideoDialog.cs Modified: trunk/scsharp/src/SCSharpLib/UI/Builtins.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/Builtins.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/Builtins.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -31,7 +31,7 @@ /// <summary> /// /// </summary> - public static class Builtins + public static class BuiltIns { /* title screen */ /// <summary> @@ -213,11 +213,11 @@ /// <summary> /// /// </summary> - public const string TechdataDat = "arr\\techdata.dat"; + public const string TechDataDat = "arr\\techdata.dat"; /// <summary> /// /// </summary> - public const string TechdataTbl = "arr\\techdata.tbl"; + public const string TechDataTbl = "arr\\techdata.tbl"; /// <summary> /// /// </summary> Modified: trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/ButtonElement.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -107,7 +107,7 @@ if (Sensitive && (Flags & SCElement.RespondToMouse) == SCElement.RespondToMouse) { /* highlight the text */ - GuiUtility.PlaySound(Mpq, Builtins.MouseoverWav); + GuiUtility.PlaySound(Mpq, BuiltIns.MouseoverWav); } base.MouseEnter(); } Modified: trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -47,7 +47,7 @@ /// </summary> /// <param name="mpq"></param> public ConnectionScreen(Mpq mpq) - : base(mpq, "glue\\PalNl", Builtins.GluConnBin) + : base(mpq, "glue\\PalNl", BuiltIns.GluConnBin) { } Modified: trunk/scsharp/src/SCSharpLib/UI/CreditsScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/CreditsScreen.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/CreditsScreen.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -64,11 +64,11 @@ /* broodwar credits */ if (Game.Instance.IsBroodWar) { - AddMarkup((Stream)this.Mpq.GetResource(Builtins.RezCrdtexpTxt)); + AddMarkup((Stream)this.Mpq.GetResource(BuiltIns.RezCrdtexpTxt)); } /* starcraft credits */ - AddMarkup((Stream)this.Mpq.GetResource(Builtins.RezCrdtlistTxt)); + AddMarkup((Stream)this.Mpq.GetResource(BuiltIns.RezCrdtlistTxt)); } /// <summary> Modified: trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public EndMissionDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", Builtins.AbrtMenuBin) + : base(parent, mpq, "glue\\Palmm", BuiltIns.AbrtMenuBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/EntryDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/EntryDialog.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/EntryDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -52,7 +52,7 @@ /// <param name="mpq"></param> /// <param name="title"></param> public EntryDialog(UIScreen parent, Mpq mpq, string title) - : base(parent, mpq, "glue\\PalNl", Builtins.GluPEditBin) + : base(parent, mpq, "glue\\PalNl", BuiltIns.GluPEditBin) { BackgroundPath = "glue\\PalNl\\pEPopup.pcx"; this.title = title; Modified: trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -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-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/GameMenuDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -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-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -48,7 +48,7 @@ /// <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"; BackgroundTranslucent = 42; Modified: trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -297,7 +297,7 @@ pcx.ReadFromStream((Stream)this.Mpq.GetResource("tileset\\badlands\\dark.pcx"), 0, 0); tileset_palette = pcx.Palette; - hud = GuiUtility.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); Modified: trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -236,33 +236,33 @@ { try { - starcraftResources.ImagesTbl = (Tbl)starDataMpq.GetResource(Builtins.ImagesTbl); - starcraftResources.SfxDataTbl = (Tbl)starDataMpq.GetResource(Builtins.SfxDataTbl); - starcraftResources.SpritesTbl = (Tbl)starDataMpq.GetResource(Builtins.SpritesTbl); - starcraftResources.GluAllTbl = (Tbl)starDataMpq.GetResource(Builtins.GluAllTbl); - starcraftResources.MapDataTbl = (Tbl)starDataMpq.GetResource(Builtins.MapDataTbl); - starcraftResources.ImagesDat = (ImagesDat)starDataMpq.GetResource(Builtins.ImagesDat); - starcraftResources.SfxDataDat = (SfxDataDat)starDataMpq.GetResource(Builtins.SfxDataDat); - starcraftResources.SpritesDat = (SpritesDat)starDataMpq.GetResource(Builtins.SpritesDat); - starcraftResources.ScriptBin = (ScriptBin)starDataMpq.GetResource(Builtins.IScriptBin); - starcraftResources.UnitsDat = (UnitsDat)starDataMpq.GetResource(Builtins.UnitsDat); - starcraftResources.FlingyDat = (FlingyDat)starDataMpq.GetResource(Builtins.FlingyDat); - starcraftResources.MapDataDat = (MapDataDat)starDataMpq.GetResource(Builtins.MapDataDat); + starcraftResources.ImagesTbl = (Tbl)starDataMpq.GetResource(BuiltIns.ImagesTbl); + starcraftResources.SfxDataTbl = (Tbl)starDataMpq.GetResource(BuiltIns.SfxDataTbl); + starcraftResources.SpritesTbl = (Tbl)starDataMpq.GetResource(BuiltIns.SpritesTbl); + starcraftResources.GluAllTbl = (Tbl)starDataMpq.GetResource(BuiltIns.GluAllTbl); + starcraftResources.MapDataTbl = (Tbl)starDataMpq.GetResource(BuiltIns.MapDataTbl); + starcraftResources.ImagesDat = (ImagesDat)starDataMpq.GetResource(BuiltIns.ImagesDat); + starcraftResources.SfxDataDat = (SfxDataDat)starDataMpq.GetResource(BuiltIns.SfxDataDat); + starcraftResources.SpritesDat = (SpritesDat)starDataMpq.GetResource(BuiltIns.SpritesDat); + starcraftResources.ScriptBin = (ScriptBin)starDataMpq.GetResource(BuiltIns.IScriptBin); + starcraftResources.UnitsDat = (UnitsDat)starDataMpq.GetResource(BuiltIns.UnitsDat); + starcraftResources.FlingyDat = (FlingyDat)starDataMpq.GetResource(BuiltIns.FlingyDat); + starcraftResources.MapDataDat = (MapDataDat)starDataMpq.GetResource(BuiltIns.MapDataDat); if (broodDataMpq != null) { - broodwarResources.ImagesTbl = (Tbl)broodDataMpq.GetResource(Builtins.ImagesTbl); - broodwarResources.SfxDataTbl = (Tbl)broodDataMpq.GetResource(Builtins.SfxDataTbl); - broodwarResources.SpritesTbl = (Tbl)broodDataMpq.GetResource(Builtins.SpritesTbl); - broodwarResources.GluAllTbl = (Tbl)broodDataMpq.GetResource(Builtins.GluAllTbl); - broodwarResources.MapDataTbl = (Tbl)broodDataMpq.GetResource(Builtins.MapDataTbl); - broodwarResources.ImagesDat = (ImagesDat)broodDataMpq.GetResource(Builtins.ImagesDat); - broodwarResources.SfxDataDat = (SfxDataDat)broodDataMpq.GetResource(Builtins.SfxDataDat); - broodwarResources.SpritesDat = (SpritesDat)broodDataMpq.GetResource(Builtins.SpritesDat); - broodwarResources.ScriptBin = (ScriptBin)broodDataMpq.GetResource(Builtins.IScriptBin); - broodwarResources.UnitsDat = (UnitsDat)broodDataMpq.GetResource(Builtins.UnitsDat); - broodwarResources.FlingyDat = (FlingyDat)broodDataMpq.GetResource(Builtins.FlingyDat); - broodwarResources.MapDataDat = (MapDataDat)broodDataMpq.GetResource(Builtins.MapDataDat); + broodwarResources.ImagesTbl = (Tbl)broodDataMpq.GetResource(BuiltIns.ImagesTbl); + broodwarResources.SfxDataTbl = (Tbl)broodDataMpq.GetResource(BuiltIns.SfxDataTbl); + broodwarResources.SpritesTbl = (Tbl)broodDataMpq.GetResource(BuiltIns.SpritesTbl); + broodwarResources.GluAllTbl = (Tbl)broodDataMpq.GetResource(BuiltIns.GluAllTbl); + broodwarResources.MapDataTbl = (Tbl)broodDataMpq.GetResource(BuiltIns.MapDataTbl); + broodwarResources.ImagesDat = (ImagesDat)broodDataMpq.GetResource(BuiltIns.ImagesDat); + broodwarResources.SfxDataDat = (SfxDataDat)broodDataMpq.GetResource(BuiltIns.SfxDataDat); + broodwarResources.SpritesDat = (SpritesDat)broodDataMpq.GetResource(BuiltIns.SpritesDat); + broodwarResources.ScriptBin = (ScriptBin)broodDataMpq.GetResource(BuiltIns.IScriptBin); + broodwarResources.UnitsDat = (UnitsDat)broodDataMpq.GetResource(BuiltIns.UnitsDat); + broodwarResources.FlingyDat = (FlingyDat)broodDataMpq.GetResource(BuiltIns.FlingyDat); + broodwarResources.MapDataDat = (MapDataDat)broodDataMpq.GetResource(BuiltIns.MapDataDat); } // notify we're ready to roll Modified: trunk/scsharp/src/SCSharpLib/UI/HelpDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/HelpDialog.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/HelpDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -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-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/KeystrokeDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -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; } @@ -79,7 +79,7 @@ }; ListBoxElement list = (ListBoxElement)Elements[HELPLIST_ELEMENT_INDEX]; - Tbl helpText = (Tbl)this.Mpq.GetResource(Builtins.HelpTxtTbl); + Tbl helpText = (Tbl)this.Mpq.GetResource(BuiltIns.HelpTxtTbl); for (int i = 0; i < helpText.Strings.Length; i++) { Modified: trunk/scsharp/src/SCSharpLib/UI/LoadSavedScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/LoadSavedScreen.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/LoadSavedScreen.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -47,7 +47,7 @@ /// </summary> /// <param name="mpq"></param> public LoadSavedScreen(Mpq mpq) - : base(mpq, "glue\\PalNl", Builtins.GluLoadBin) + : base(mpq, "glue\\PalNl", BuiltIns.GluLoadBin) { } Modified: trunk/scsharp/src/SCSharpLib/UI/LoginScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/LoginScreen.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/LoginScreen.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -47,7 +47,7 @@ /// </summary> /// <param name="mpq"></param> public LogOnScreen(Mpq mpq) - : base(mpq, "glue\\PalNl", Builtins.GluLoginBin) + : base(mpq, "glue\\PalNl", BuiltIns.GluLoginBin) { } Modified: trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -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) { } @@ -72,7 +72,7 @@ try { Game.Instance.PlayingBroodWar = args.Expansion; - GuiUtility.PlaySound(this.Mpq, Builtins.Mousedown2Wav); + GuiUtility.PlaySound(this.Mpq, BuiltIns.Mousedown2Wav); Game.Instance.SwitchToScreen(nextScreen); } catch (Exception e) @@ -101,7 +101,7 @@ } else { - GuiUtility.PlaySound(this.Mpq, Builtins.Mousedown2Wav); + GuiUtility.PlaySound(this.Mpq, BuiltIns.Mousedown2Wav); Game.Instance.SwitchToScreen(UIScreenType.LogOn); } }; @@ -115,7 +115,7 @@ } else { - GuiUtility.PlaySound(this.Mpq, Builtins.Mousedown2Wav); + GuiUtility.PlaySound(this.Mpq, BuiltIns.Mousedown2Wav); Game.Instance.SwitchToScreen(UIScreenType.Connection); } }; Modified: trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public NetworkDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", Builtins.NetDlgBin) + : base(parent, mpq, "glue\\Palmm", BuiltIns.NetDlgBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/ObjectivesDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ObjectivesDialog.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/ObjectivesDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public ObjectivesDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", Builtins.ObjctDlgBin) + : base(parent, mpq, "glue\\Palmm", BuiltIns.ObjctDlgBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/OkCancelDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/OkCancelDialog.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/OkCancelDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -52,7 +52,7 @@ /// <param name="mpq"></param> /// <param name="message"></param> public OkCancelDialog(UIScreen parent, Mpq mpq, string message) - : base(parent, mpq, "glue\\PalNl", Builtins.GluPOkCancelBin) + : base(parent, mpq, "glue\\PalNl", BuiltIns.GluPOkCancelBin) { BackgroundPath = "glue\\PalNl\\pDPopup.pcx"; this.message = message; Modified: trunk/scsharp/src/SCSharpLib/UI/OkDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/OkDialog.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/OkDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -52,7 +52,7 @@ /// <param name="mpq"></param> /// <param name="message"></param> public OkDialog(UIScreen parent, Mpq mpq, string message) - : base(parent, mpq, "glue\\PalNl", Builtins.GluPOkBin) + : base(parent, mpq, "glue\\PalNl", BuiltIns.GluPOkBin) { BackgroundPath = "glue\\PalNl\\pOPopup.pcx"; this.message = message; Modified: trunk/scsharp/src/SCSharpLib/UI/OptionsDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/OptionsDialog.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/OptionsDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -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/PlayCustomScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -48,7 +48,7 @@ /// </summary> /// <param name="mpq"></param> public PlayCustomScreen(Mpq mpq) - : base(mpq, "glue\\PalNl", Builtins.GluCustmBin) + : base(mpq, "glue\\PalNl", BuiltIns.GluCustmBin) { } Modified: trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public QuitMissionDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", Builtins.Quit2MnuBin) + : base(parent, mpq, "glue\\Palmm", BuiltIns.Quit2MnuBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/RaceSelectionScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/RaceSelectionScreen.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/RaceSelectionScreen.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -50,7 +50,7 @@ /// <param name="mpq"></param> public RaceSelectionScreen(Mpq mpq) : base(mpq, "glue\\PalNl", - Game.Instance.PlayingBroodWar ? Builtins.GluExpcmpgnBin : Builtins.GluCmpgnBin) + Game.Instance.PlayingBroodWar ? BuiltIns.GluExpcmpgnBin : BuiltIns.GluCmpgnBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -68,7 +68,7 @@ int firstPortraitElementIndex) : base(mpq, String.Format("glue\\Ready{0}", Utilities.RaceChar[(int)Game.Instance.Race]), - String.Format(Builtins.GluRdyBin, Utilities.RaceCharLower[(int)Game.Instance.Race])) + String.Format(BuiltIns.GluRdyBin, Utilities.RaceCharLower[(int)Game.Instance.Race])) { if (mpq == null) { Modified: trunk/scsharp/src/SCSharpLib/UI/RestartConfirmationDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/RestartConfirmationDialog.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/RestartConfirmationDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -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-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/SoundDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public SoundDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", Builtins.SndDlgBin) + : base(parent, mpq, "glue\\Palmm", BuiltIns.SndDlgBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -49,7 +49,7 @@ /// <param name="parent"></param> /// <param name="mpq"></param> public SpeedDialog(UIScreen parent, Mpq mpq) - : base(parent, mpq, "glue\\Palmm", Builtins.SpdDlgBin) + : base(parent, mpq, "glue\\Palmm", BuiltIns.SpdDlgBin) { BackgroundPath = null; } Modified: trunk/scsharp/src/SCSharpLib/UI/TitleScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/TitleScreen.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/TitleScreen.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -47,9 +47,9 @@ /// </summary> /// <param name="mpq"></param> public TitleScreen(Mpq mpq) - : base(mpq, "glue\\Palmm", Builtins.TitleDlgBin) + : base(mpq, "glue\\Palmm", BuiltIns.TitleDlgBin) { - BackgroundPath = Builtins.TitlePcx; + BackgroundPath = BuiltIns.TitlePcx; } /// <summary> Modified: trunk/scsharp/src/SCSharpLib/UI/VideoDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/VideoDialog.cs 2007-05-24 18:58:18 UTC (rev 1393) +++ trunk/scsharp/src/SCSharpLib/UI/VideoDialog.cs 2007-05-24 19:02:43 UTC (rev 1394) @@ -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; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-24 18:58:21
|
Revision: 1393 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1393&view=rev Author: jendave Date: 2007-05-24 11:58:18 -0700 (Thu, 24 May 2007) Log Message: ----------- fxcop fixes. renamed a file to comply with fxcop. Add a struct to avoid an out param Modified Paths: -------------- trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs Added Paths: ----------- trunk/scsharp/src/SCSharpLib/UI/BitmapImage.cs trunk/scsharp/src/SCSharpLib/UI/GuiUtility.cs Removed Paths: ------------- trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs Modified: trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs 2007-05-24 18:54:29 UTC (rev 1392) +++ trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs 2007-05-24 18:58:18 UTC (rev 1393) @@ -142,3 +142,20 @@ [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")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GuiUtility.CreateSurfaceFromRgbData(System.Byte[],System.UInt16,System.UInt16,System.Int32,System.Int32):SdlDotNet.Graphics.Surface", MessageId = "Rgb")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GuiUtility.PlayMusic(SCSharp.MpqLib.Mpq,System.String,System.Int32):System.Void", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GuiUtility.CreateSurface(System.Byte[],System.UInt16,System.UInt16,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32):SdlDotNet.Graphics.Surface", MessageId = "5#rmask")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GuiUtility.CreateSurface(System.Byte[],System.UInt16,System.UInt16,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32):SdlDotNet.Graphics.Surface", MessageId = "8#amask")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GuiUtility.CreateSurface(System.Byte[],System.UInt16,System.UInt16,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32):SdlDotNet.Graphics.Surface", MessageId = "7#bmask")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GuiUtility.CreateSurface(System.Byte[],System.UInt16,System.UInt16,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32):SdlDotNet.Graphics.Surface", MessageId = "6#gmask")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GuiUtility.CreateSurfaceFromRgbaData(System.Byte[],System.UInt16,System.UInt16,System.Int32,System.Int32):SdlDotNet.Graphics.Surface", MessageId = "Rgba")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GuiUtility.GetFonts(SCSharp.MpqLib.Mpq):SCSharp.MpqLib.SCFont[]", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GuiUtility.PlaySound(SCSharp.MpqLib.Mpq,System.String):System.Void", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.UI.MapRenderer", MessageId = "Renderer")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.MapRenderer.RenderToBitmap(SCSharp.MpqLib.Mpq,SCSharp.MpqLib.Chk,System.UInt16,System.UInt16):SCSharp.UI.BitmapImage", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.MapRenderer.RenderToBitmap(SCSharp.MpqLib.Mpq,SCSharp.MpqLib.Chk,System.UInt16,System.UInt16):SCSharp.UI.BitmapImage", MessageId = "1#chk")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.MapRenderer.RenderToSurface(SCSharp.MpqLib.Mpq,SCSharp.MpqLib.Chk):SdlDotNet.Graphics.Surface", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.MapRenderer.RenderToSurface(SCSharp.MpqLib.Mpq,SCSharp.MpqLib.Chk):SdlDotNet.Graphics.Surface", MessageId = "1#chk")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.RestartConfirmationDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.SpeedDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.PlayCustomScreen..ctor(SCSharp.MpqLib.Mpq)", MessageId = "0#mpq")] Added: trunk/scsharp/src/SCSharpLib/UI/BitmapImage.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/BitmapImage.cs (rev 0) +++ trunk/scsharp/src/SCSharpLib/UI/BitmapImage.cs 2007-05-24 18:58:18 UTC (rev 1393) @@ -0,0 +1,77 @@ +#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 SdlDotNet.Graphics; +using SCSharp; +using SCSharp.MpqLib; + + +namespace SCSharp.UI +{ + /// <summary> + /// + /// </summary> + public struct BitmapImage + { + byte[] image; + + /// <summary> + /// + /// </summary> + public byte[] Image + { + get { return image; } + set { image = value; } + } + ushort pixelWidth; + + /// <summary> + /// + /// </summary> + [CLSCompliant(false)] + public ushort PixelWidth + { + get { return pixelWidth; } + set { pixelWidth = value; } + } + ushort pixelHeight; + + /// <summary> + /// + /// </summary> + [CLSCompliant(false)] + public ushort PixelHeight + { + get { return pixelHeight; } + set { pixelHeight = value; } + } + } +} Property changes on: trunk/scsharp/src/SCSharpLib/UI/BitmapImage.cs ___________________________________________________________________ Name: svn:mime-type + text/x-csharp Name: svn:eol-style + native Deleted: trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs 2007-05-24 18:54:29 UTC (rev 1392) +++ trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs 2007-05-24 18:58:18 UTC (rev 1393) @@ -1,608 +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.Collections; -using System.IO; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Text; - -using System.Drawing; -using System.Drawing.Imaging; -using SdlDotNet.Graphics; -using SdlDotNet.Audio; -using SCSharp; -using SCSharp.MpqLib; - -/* for the surface creation hack below */ -using System.Reflection; -using Tao.Sdl; - -namespace SCSharp.UI -{ - ///// <summary> - ///// - ///// </summary> - //public delegate void ReadyEventHandler(object sender, EventArgs e); - - /// <summary> - /// - /// </summary> - public static class GuiUtility - { - - static SCFont[] fonts; - - static string[] BroodwarFonts = { -"files\\font\\font8.fnt", -"files\\font\\font10.fnt", -"files\\font\\font14.fnt", -"files\\font\\font16.fnt", -"files\\font\\font16x.fnt" -}; - - /// <summary> - /// - /// </summary> - /// <param name="mpq"></param> - /// <returns></returns> - public static SCFont[] GetFonts(Mpq mpq) - { - if (fonts == null) - { - string[] fontList; - fontList = BroodwarFonts; - - fonts = new SCFont[fontList.Length]; - - for (int i = 0; i < fonts.Length; i++) - { - fonts[i] = (SCFont)mpq.GetResource(fontList[i]); - Console.WriteLine("fonts[{0}] = {1}", i, fonts[i] == null ? "null" : "not null"); - } - } - return fonts; - } - - //public static Surface RenderGlyph(Fnt font, Glyph g, byte[] palette, int offset) - - /// <summary> - /// - /// </summary> - /// <param name="glyph"></param> - /// <param name="palette"></param> - /// <param name="offset"></param> - /// <returns></returns> - public static Surface RenderGlyph(Glyph glyph, byte[] palette, int offset) - { - if (glyph == null) - { - throw new ArgumentNullException("g"); - } - if (palette == null) - { - throw new ArgumentNullException("palette"); - } - byte[] buf = new byte[glyph.Width * glyph.Height * 4]; - int i = 0; - - for (int y = glyph.Height - 1; y >= 0; y--) - { - for (int x = glyph.Width - 1; x >= 0; x--) - { - if (glyph.Bitmap[y, x] == 0) - { - buf[i + 0] = 0; - } - else if (glyph.Bitmap[y, x] == 1) - { - buf[i + 0] = 255; - } - else - { - buf[i + 0] = 128; - } - - 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) - { - buf[i + 0] = 0; - } - - i += 4; - } - } - - return CreateSurfaceFromRgbaData(buf, (ushort)glyph.Width, (ushort)glyph.Height, 32, glyph.Width * 4); - } - - /// <summary> - /// - /// </summary> - /// <param name="text"></param> - /// <param name="font"></param> - /// <param name="palette"></param> - /// <returns></returns> - public static Surface ComposeText(string text, SCFont font, byte[] palette) - { - return ComposeText(text, font, palette, -1, -1, 4); - } - - /// <summary> - /// - /// </summary> - /// <param name="text"></param> - /// <param name="font"></param> - /// <param name="palette"></param> - /// <param name="offset"></param> - /// <returns></returns> - public static Surface ComposeText(string text, SCFont font, byte[] palette, int offset) - { - return ComposeText(text, font, palette, -1, -1, offset); - } - - /// <summary> - /// - /// </summary> - /// <param name="text"></param> - /// <param name="font"></param> - /// <param name="palette"></param> - /// <param name="width"></param> - /// <param name="height"></param> - /// <param name="offset"></param> - /// <returns></returns> - public static Surface ComposeText(string text, SCFont font, byte[] palette, int width, int height, - int offset) - { - if (text == null) - { - throw new ArgumentNullException("text"); - } - if (font == null) - { - throw new ArgumentNullException("font"); - } - - int i; - /* create a run of text, for now ignoring any control codes in the string */ - StringBuilder run = new StringBuilder(); - for (i = 0; i < text.Length; i++) - { - if (text[i] == 0x0a /* allow newlines */|| - !Char.IsControl(text[i])) - { - run.Append(text[i]); - } - } - - string rs = run.ToString(); - byte[] r = Encoding.ASCII.GetBytes(rs); - - int x; - int y; - int textHeight; - int textWidth; - - /* measure the text first, optionally wrapping at width */ - textWidth = textHeight = 0; - x = y = 0; - - for (i = 0; i < r.Length; i++) - { - int glyphWidth = 0; - - if (r[i] != 0x0a) /* newline */ - { - if (r[i] == 0x20) /* space */ - { - glyphWidth = font.SpaceSize; - } - else - { - Glyph g = font[r[i] - 1]; - - glyphWidth = g.Width + g.XOffset; - } - } - - if (r[i] == 0x0a || - (width != -1 && x + glyphWidth > width)) - { - if (x > textWidth) - { - textWidth = x; - } - x = 0; - textHeight += font.LineSize; - } - - x += glyphWidth; - } - - if (x > textWidth) - { - textWidth = x; - } - textHeight += font.LineSize; - - Surface surf = new Surface(textWidth, textHeight); - surf.TransparentColor = Color.Black; - surf.Transparent = true; - - /* the draw it */ - x = y = 0; - for (i = 0; i < r.Length; i++) - { - int glyphWidth = 0; - Glyph g = null; - - if (r[i] != 0x0a) /* newline */ - { - if (r[i] == 0x20) /* space */ - { - glyphWidth = font.SpaceSize; - } - else - { - g = font[r[i] - 1]; - glyphWidth = g.Width + g.XOffset; - - Surface gs = RenderGlyph(g, palette, offset); - surf.Blit(gs, new Point(x, y + g.YOffset)); - } - } - - if (r[i] == 0x0a || - x + glyphWidth > textWidth) - { - x = 0; - y += font.LineSize; - } - - x += glyphWidth; - } - - return surf; - } - - /// <summary> - /// - /// </summary> - /// <param name="grid"></param> - /// <param name="width"></param> - /// <param name="height"></param> - /// <param name="palette"></param> - /// <param name="withAlpha"></param> - /// <returns></returns> - [CLSCompliant(false)] - public static byte[] GetBitmapData(byte[,] grid, ushort width, ushort height, byte[] palette, bool withAlpha) - { - if (palette == null) - { - throw new ArgumentNullException("palette"); - } - byte[] buf = new byte[width * height * (3 + (withAlpha ? 1 : 0))]; - int i = 0; - int x; - int y; - - for (y = height - 1; y >= 0; y--) - { - for (x = width - 1; x >= 0; x--) - { - if (withAlpha) - i++; - buf[i++] = palette[grid[y, x] * 3 + 2]; - buf[i++] = palette[grid[y, x] * 3 + 1]; - buf[i++] = palette[grid[y, x] * 3]; - if (withAlpha) - { - if (buf[i - 3] == 0 - && buf[i - 2] == 0 - && buf[i - 1] == 0) - { - buf[i - 4] = 0x00; - } - else - { - buf[i - 4] = 0xff; - } - } - } - } - - return buf; - } - - /// <summary> - /// - /// </summary> - /// <param name="data"></param> - /// <param name="width"></param> - /// <param name="height"></param> - /// <param name="depth"></param> - /// <param name="stride"></param> - /// <param name="rmask"></param> - /// <param name="gmask"></param> - /// <param name="bmask"></param> - /// <param name="amask"></param> - /// <returns></returns> - [CLSCompliant(false)] - public static Surface CreateSurface(byte[] data, ushort width, ushort height, int depth, int stride, - int rmask, int gmask, int bmask, int amask) - { - if (data == null) - { - throw new ArgumentNullException("data"); - } - - /* beware, kind of a gross hack below */ - Surface surf; - - IntPtr blob = Marshal.AllocCoTaskMem(data.Length); - Marshal.Copy(data, 0, blob, data.Length); - - IntPtr handle = Sdl.SDL_CreateRGBSurfaceFrom(blob, - width, height, depth, - stride, - rmask, gmask, bmask, amask); - - surf = (Surface)Activator.CreateInstance(typeof(Surface), - BindingFlags.NonPublic | BindingFlags.Instance, - null, - new object[] { handle }, - null); - - return surf; - } - - /// <summary> - /// - /// </summary> - /// <param name="data"></param> - /// <param name="width"></param> - /// <param name="height"></param> - /// <param name="depth"></param> - /// <param name="stride"></param> - /// <returns></returns> - [CLSCompliant(false)] - public static Surface CreateSurfaceFromRgbaData(byte[] data, ushort width, ushort height, int depth, int stride) - { - return CreateSurface(data, width, height, depth, stride, - /* XXX this needs addressing in Tao.Sdl - these arguments should be uints */ - unchecked((int)0xff000000), - (int)0x00ff0000, - (int)0x0000ff00, - (int)0x000000ff); - } - - /// <summary> - /// - /// </summary> - /// <param name="data"></param> - /// <param name="width"></param> - /// <param name="height"></param> - /// <param name="depth"></param> - /// <param name="stride"></param> - /// <returns></returns> - [CLSCompliant(false)] - public static Surface CreateSurfaceFromRgbData(byte[] data, ushort width, ushort height, int depth, int stride) - { - return CreateSurface(data, width, height, depth, stride, - (int)0x00ff0000, - (int)0x0000ff00, - (int)0x000000ff, - (int)0x00000000); - } - - /// <summary> - /// - /// </summary> - /// <param name="grid"></param> - /// <param name="width"></param> - /// <param name="height"></param> - /// <param name="palette"></param> - /// <param name="translucentIndex"></param> - /// <param name="transparentIndex"></param> - /// <returns></returns> - [CLSCompliant(false)] - public static byte[] GetBitmapData(byte[,] grid, ushort width, ushort height, byte[] palette, int translucentIndex, int transparentIndex) - { - if (palette == null) - { - throw new ArgumentNullException("palette"); - } - byte[] buf = new byte[width * height * 4]; - int i = 0; - int x, y; - - for (y = height - 1; y >= 0; y--) - { - for (x = width - 1; x >= 0; x--) - { - if (grid[y, x] == translucentIndex) - { - buf[i + 0] = 0x05; /* keep this in sync with Pcx.cs */ - } - else if (grid[y, x] == transparentIndex) - { - buf[i + 0] = 0x00; - } - else - { - buf[i + 0] = 0xff; - } - buf[i + 1] = palette[grid[y, x] * 3 + 2]; - buf[i + 2] = palette[grid[y, x] * 3 + 1]; - buf[i + 3] = palette[grid[y, x] * 3 + 0]; - i += 4; - } - } - - return buf; - } - - /// <summary> - /// - /// </summary> - /// <param name="grid"></param> - /// <param name="width"></param> - /// <param name="height"></param> - /// <param name="palette"></param> - /// <param name="withAlpha"></param> - /// <returns></returns> - [CLSCompliant(false)] - public static Surface CreateSurfaceFromBitmap(byte[,] grid, ushort width, ushort height, byte[] palette, bool withAlpha) - { - byte[] buf = GetBitmapData(grid, width, height, palette, withAlpha); - - return CreateSurfaceFromRgbaData(buf, width, height, withAlpha ? 32 : 24, width * (3 + (withAlpha ? 1 : 0))); - } - - /// <summary> - /// - /// </summary> - /// <param name="grid"></param> - /// <param name="width"></param> - /// <param name="height"></param> - /// <param name="palette"></param> - /// <param name="translucentIndex"></param> - /// <param name="transparentIndex"></param> - /// <returns></returns> - [CLSCompliant(false)] - public static Surface CreateSurfaceFromBitmap(byte[,] grid, ushort width, ushort height, byte[] palette, int translucentIndex, int transparentIndex) - { - byte[] buf = GetBitmapData(grid, width, height, palette, translucentIndex, transparentIndex); - - return CreateSurfaceFromRgbaData(buf, width, height, 32, width * 4); - } - - /// <summary> - /// - /// </summary> - /// <param name="stream"></param> - /// <returns></returns> - public static byte[] ReadStream(Stream stream) - { - if (stream == null) - { - throw new ArgumentNullException("stream"); - } - if (stream is MemoryStream) - { - return ((MemoryStream)stream).ToArray(); - } - else - { - byte[] buf = new byte[stream.Length]; - stream.Read(buf, 0, buf.Length); - return buf; - } - } - - /// <summary> - /// - /// </summary> - /// <param name="stream"></param> - /// <param name="translucentIndex"></param> - /// <param name="transparentIndex"></param> - /// <returns></returns> - public static Surface SurfaceFromStream(Stream stream, int translucentIndex, int transparentIndex) - { - Pcx pcx = new Pcx(); - pcx.ReadFromStream(stream, translucentIndex, transparentIndex); - return CreateSurfaceFromRgbaData(pcx.RgbaData, pcx.Width, pcx.Height, pcx.Depth, pcx.Stride); - } - - /// <summary> - /// - /// </summary> - /// <param name="stream"></param> - /// <returns></returns> - public static Surface SurfaceFromStream(Stream stream) - { - return GuiUtility.SurfaceFromStream(stream, -1, -1); - } - - /// <summary> - /// - /// </summary> - /// <param name="stream"></param> - /// <returns></returns> - public static Sound SoundFromStream(Stream stream) - { - byte[] buf = GuiUtility.ReadStream(stream); - return Mixer.Sound(buf); - } - - /// <summary> - /// - /// </summary> - /// <param name="mpq"></param> - /// <param name="resourcePath"></param> - public static void PlaySound(Mpq mpq, string resourcePath) - { - if (mpq == null) - { - throw new ArgumentNullException("mpq"); - } - Stream stream = (Stream)mpq.GetResource(resourcePath); - if (stream == null) - { - return; - } - Sound s = GuiUtility.SoundFromStream(stream); - s.Play(); - } - - /// <summary> - /// - /// </summary> - /// <param name="mpq"></param> - /// <param name="resourcePath"></param> - /// <param name="numberOfLoops"></param> - public static void PlayMusic(Mpq mpq, string resourcePath, int numberOfLoops) - { - if (mpq == null) - { - throw new ArgumentNullException("mpq"); - } - Stream stream = (Stream)mpq.GetResource(resourcePath); - if (stream == null) - { - return; - } - Sound s = GuiUtility.SoundFromStream(stream); - s.Play(true); - } - } -} Added: trunk/scsharp/src/SCSharpLib/UI/GuiUtility.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GuiUtility.cs (rev 0) +++ trunk/scsharp/src/SCSharpLib/UI/GuiUtility.cs 2007-05-24 18:58:18 UTC (rev 1393) @@ -0,0 +1,608 @@ +#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.Collections; +using System.IO; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; + +using System.Drawing; +using System.Drawing.Imaging; +using SdlDotNet.Graphics; +using SdlDotNet.Audio; +using SCSharp; +using SCSharp.MpqLib; + +/* for the surface creation hack below */ +using System.Reflection; +using Tao.Sdl; + +namespace SCSharp.UI +{ + ///// <summary> + ///// + ///// </summary> + //public delegate void ReadyEventHandler(object sender, EventArgs e); + + /// <summary> + /// + /// </summary> + public static class GuiUtility + { + + static SCFont[] fonts; + + static string[] BroodwarFonts = { +"files\\font\\font8.fnt", +"files\\font\\font10.fnt", +"files\\font\\font14.fnt", +"files\\font\\font16.fnt", +"files\\font\\font16x.fnt" +}; + + /// <summary> + /// + /// </summary> + /// <param name="mpq"></param> + /// <returns></returns> + public static SCFont[] GetFonts(Mpq mpq) + { + if (fonts == null) + { + string[] fontList; + fontList = BroodwarFonts; + + fonts = new SCFont[fontList.Length]; + + for (int i = 0; i < fonts.Length; i++) + { + fonts[i] = (SCFont)mpq.GetResource(fontList[i]); + Console.WriteLine("fonts[{0}] = {1}", i, fonts[i] == null ? "null" : "not null"); + } + } + return fonts; + } + + //public static Surface RenderGlyph(Fnt font, Glyph g, byte[] palette, int offset) + + /// <summary> + /// + /// </summary> + /// <param name="glyph"></param> + /// <param name="palette"></param> + /// <param name="offset"></param> + /// <returns></returns> + public static Surface RenderGlyph(Glyph glyph, byte[] palette, int offset) + { + if (glyph == null) + { + throw new ArgumentNullException("g"); + } + if (palette == null) + { + throw new ArgumentNullException("palette"); + } + byte[] buf = new byte[glyph.Width * glyph.Height * 4]; + int i = 0; + + for (int y = glyph.Height - 1; y >= 0; y--) + { + for (int x = glyph.Width - 1; x >= 0; x--) + { + if (glyph.Bitmap[y, x] == 0) + { + buf[i + 0] = 0; + } + else if (glyph.Bitmap[y, x] == 1) + { + buf[i + 0] = 255; + } + else + { + buf[i + 0] = 128; + } + + 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) + { + buf[i + 0] = 0; + } + + i += 4; + } + } + + return CreateSurfaceFromRgbaData(buf, (ushort)glyph.Width, (ushort)glyph.Height, 32, glyph.Width * 4); + } + + /// <summary> + /// + /// </summary> + /// <param name="text"></param> + /// <param name="font"></param> + /// <param name="palette"></param> + /// <returns></returns> + public static Surface ComposeText(string text, SCFont font, byte[] palette) + { + return ComposeText(text, font, palette, -1, -1, 4); + } + + /// <summary> + /// + /// </summary> + /// <param name="text"></param> + /// <param name="font"></param> + /// <param name="palette"></param> + /// <param name="offset"></param> + /// <returns></returns> + public static Surface ComposeText(string text, SCFont font, byte[] palette, int offset) + { + return ComposeText(text, font, palette, -1, -1, offset); + } + + /// <summary> + /// + /// </summary> + /// <param name="text"></param> + /// <param name="font"></param> + /// <param name="palette"></param> + /// <param name="width"></param> + /// <param name="height"></param> + /// <param name="offset"></param> + /// <returns></returns> + public static Surface ComposeText(string text, SCFont font, byte[] palette, int width, int height, + int offset) + { + if (text == null) + { + throw new ArgumentNullException("text"); + } + if (font == null) + { + throw new ArgumentNullException("font"); + } + + int i; + /* create a run of text, for now ignoring any control codes in the string */ + StringBuilder run = new StringBuilder(); + for (i = 0; i < text.Length; i++) + { + if (text[i] == 0x0a /* allow newlines */|| + !Char.IsControl(text[i])) + { + run.Append(text[i]); + } + } + + string rs = run.ToString(); + byte[] r = Encoding.ASCII.GetBytes(rs); + + int x; + int y; + int textHeight; + int textWidth; + + /* measure the text first, optionally wrapping at width */ + textWidth = textHeight = 0; + x = y = 0; + + for (i = 0; i < r.Length; i++) + { + int glyphWidth = 0; + + if (r[i] != 0x0a) /* newline */ + { + if (r[i] == 0x20) /* space */ + { + glyphWidth = font.SpaceSize; + } + else + { + Glyph g = font[r[i] - 1]; + + glyphWidth = g.Width + g.XOffset; + } + } + + if (r[i] == 0x0a || + (width != -1 && x + glyphWidth > width)) + { + if (x > textWidth) + { + textWidth = x; + } + x = 0; + textHeight += font.LineSize; + } + + x += glyphWidth; + } + + if (x > textWidth) + { + textWidth = x; + } + textHeight += font.LineSize; + + Surface surf = new Surface(textWidth, textHeight); + surf.TransparentColor = Color.Black; + surf.Transparent = true; + + /* the draw it */ + x = y = 0; + for (i = 0; i < r.Length; i++) + { + int glyphWidth = 0; + Glyph g = null; + + if (r[i] != 0x0a) /* newline */ + { + if (r[i] == 0x20) /* space */ + { + glyphWidth = font.SpaceSize; + } + else + { + g = font[r[i] - 1]; + glyphWidth = g.Width + g.XOffset; + + Surface gs = RenderGlyph(g, palette, offset); + surf.Blit(gs, new Point(x, y + g.YOffset)); + } + } + + if (r[i] == 0x0a || + x + glyphWidth > textWidth) + { + x = 0; + y += font.LineSize; + } + + x += glyphWidth; + } + + return surf; + } + + /// <summary> + /// + /// </summary> + /// <param name="grid"></param> + /// <param name="width"></param> + /// <param name="height"></param> + /// <param name="palette"></param> + /// <param name="withAlpha"></param> + /// <returns></returns> + [CLSCompliant(false)] + public static byte[] GetBitmapData(byte[,] grid, ushort width, ushort height, byte[] palette, bool withAlpha) + { + if (palette == null) + { + throw new ArgumentNullException("palette"); + } + byte[] buf = new byte[width * height * (3 + (withAlpha ? 1 : 0))]; + int i = 0; + int x; + int y; + + for (y = height - 1; y >= 0; y--) + { + for (x = width - 1; x >= 0; x--) + { + if (withAlpha) + i++; + buf[i++] = palette[grid[y, x] * 3 + 2]; + buf[i++] = palette[grid[y, x] * 3 + 1]; + buf[i++] = palette[grid[y, x] * 3]; + if (withAlpha) + { + if (buf[i - 3] == 0 + && buf[i - 2] == 0 + && buf[i - 1] == 0) + { + buf[i - 4] = 0x00; + } + else + { + buf[i - 4] = 0xff; + } + } + } + } + + return buf; + } + + /// <summary> + /// + /// </summary> + /// <param name="data"></param> + /// <param name="width"></param> + /// <param name="height"></param> + /// <param name="depth"></param> + /// <param name="stride"></param> + /// <param name="rmask"></param> + /// <param name="gmask"></param> + /// <param name="bmask"></param> + /// <param name="amask"></param> + /// <returns></returns> + [CLSCompliant(false)] + public static Surface CreateSurface(byte[] data, ushort width, ushort height, int depth, int stride, + int rmask, int gmask, int bmask, int amask) + { + if (data == null) + { + throw new ArgumentNullException("data"); + } + + /* beware, kind of a gross hack below */ + Surface surf; + + IntPtr blob = Marshal.AllocCoTaskMem(data.Length); + Marshal.Copy(data, 0, blob, data.Length); + + IntPtr handle = Sdl.SDL_CreateRGBSurfaceFrom(blob, + width, height, depth, + stride, + rmask, gmask, bmask, amask); + + surf = (Surface)Activator.CreateInstance(typeof(Surface), + BindingFlags.NonPublic | BindingFlags.Instance, + null, + new object[] { handle }, + null); + + return surf; + } + + /// <summary> + /// + /// </summary> + /// <param name="data"></param> + /// <param name="width"></param> + /// <param name="height"></param> + /// <param name="depth"></param> + /// <param name="stride"></param> + /// <returns></returns> + [CLSCompliant(false)] + public static Surface CreateSurfaceFromRgbaData(byte[] data, ushort width, ushort height, int depth, int stride) + { + return CreateSurface(data, width, height, depth, stride, + /* XXX this needs addressing in Tao.Sdl - these arguments should be uints */ + unchecked((int)0xff000000), + (int)0x00ff0000, + (int)0x0000ff00, + (int)0x000000ff); + } + + /// <summary> + /// + /// </summary> + /// <param name="data"></param> + /// <param name="width"></param> + /// <param name="height"></param> + /// <param name="depth"></param> + /// <param name="stride"></param> + /// <returns></returns> + [CLSCompliant(false)] + public static Surface CreateSurfaceFromRgbData(byte[] data, ushort width, ushort height, int depth, int stride) + { + return CreateSurface(data, width, height, depth, stride, + (int)0x00ff0000, + (int)0x0000ff00, + (int)0x000000ff, + (int)0x00000000); + } + + /// <summary> + /// + /// </summary> + /// <param name="grid"></param> + /// <param name="width"></param> + /// <param name="height"></param> + /// <param name="palette"></param> + /// <param name="translucentIndex"></param> + /// <param name="transparentIndex"></param> + /// <returns></returns> + [CLSCompliant(false)] + public static byte[] GetBitmapData(byte[,] grid, ushort width, ushort height, byte[] palette, int translucentIndex, int transparentIndex) + { + if (palette == null) + { + throw new ArgumentNullException("palette"); + } + byte[] buf = new byte[width * height * 4]; + int i = 0; + int x, y; + + for (y = height - 1; y >= 0; y--) + { + for (x = width - 1; x >= 0; x--) + { + if (grid[y, x] == translucentIndex) + { + buf[i + 0] = 0x05; /* keep this in sync with Pcx.cs */ + } + else if (grid[y, x] == transparentIndex) + { + buf[i + 0] = 0x00; + } + else + { + buf[i + 0] = 0xff; + } + buf[i + 1] = palette[grid[y, x] * 3 + 2]; + buf[i + 2] = palette[grid[y, x] * 3 + 1]; + buf[i + 3] = palette[grid[y, x] * 3 + 0]; + i += 4; + } + } + + return buf; + } + + /// <summary> + /// + /// </summary> + /// <param name="grid"></param> + /// <param name="width"></param> + /// <param name="height"></param> + /// <param name="palette"></param> + /// <param name="withAlpha"></param> + /// <returns></returns> + [CLSCompliant(false)] + public static Surface CreateSurfaceFromBitmap(byte[,] grid, ushort width, ushort height, byte[] palette, bool withAlpha) + { + byte[] buf = GetBitmapData(grid, width, height, palette, withAlpha); + + return CreateSurfaceFromRgbaData(buf, width, height, withAlpha ? 32 : 24, width * (3 + (withAlpha ? 1 : 0))); + } + + /// <summary> + /// + /// </summary> + /// <param name="grid"></param> + /// <param name="width"></param> + /// <param name="height"></param> + /// <param name="palette"></param> + /// <param name="translucentIndex"></param> + /// <param name="transparentIndex"></param> + /// <returns></returns> + [CLSCompliant(false)] + public static Surface CreateSurfaceFromBitmap(byte[,] grid, ushort width, ushort height, byte[] palette, int translucentIndex, int transparentIndex) + { + byte[] buf = GetBitmapData(grid, width, height, palette, translucentIndex, transparentIndex); + + return CreateSurfaceFromRgbaData(buf, width, height, 32, width * 4); + } + + /// <summary> + /// + /// </summary> + /// <param name="stream"></param> + /// <returns></returns> + public static byte[] ReadStream(Stream stream) + { + if (stream == null) + { + throw new ArgumentNullException("stream"); + } + if (stream is MemoryStream) + { + return ((MemoryStream)stream).ToArray(); + } + else + { + byte[] buf = new byte[stream.Length]; + stream.Read(buf, 0, buf.Length); + return buf; + } + } + + /// <summary> + /// + /// </summary> + /// <param name="stream"></param> + /// <param name="translucentIndex"></param> + /// <param name="transparentIndex"></param> + /// <returns></returns> + public static Surface SurfaceFromStream(Stream stream, int translucentIndex, int transparentIndex) + { + Pcx pcx = new Pcx(); + pcx.ReadFromStream(stream, translucentIndex, transparentIndex); + return CreateSurfaceFromRgbaData(pcx.RgbaData, pcx.Width, pcx.Height, pcx.Depth, pcx.Stride); + } + + /// <summary> + /// + /// </summary> + /// <param name="stream"></param> + /// <returns></returns> + public static Surface SurfaceFromStream(Stream stream) + { + return GuiUtility.SurfaceFromStream(stream, -1, -1); + } + + /// <summary> + /// + /// </summary> + /// <param name="stream"></param> + /// <returns></returns> + public static Sound SoundFromStream(Stream stream) + { + byte[] buf = GuiUtility.ReadStream(stream); + return Mixer.Sound(buf); + } + + /// <summary> + /// + /// </summary> + /// <param name="mpq"></param> + /// <param name="resourcePath"></param> + public static void PlaySound(Mpq mpq, string resourcePath) + { + if (mpq == null) + { + throw new ArgumentNullException("mpq"); + } + Stream stream = (Stream)mpq.GetResource(resourcePath); + if (stream == null) + { + return; + } + Sound s = GuiUtility.SoundFromStream(stream); + s.Play(); + } + + /// <summary> + /// + /// </summary> + /// <param name="mpq"></param> + /// <param name="resourcePath"></param> + /// <param name="numberOfLoops"></param> + public static void PlayMusic(Mpq mpq, string resourcePath, int numberOfLoops) + { + if (mpq == null) + { + throw new ArgumentNullException("mpq"); + } + Stream stream = (Stream)mpq.GetResource(resourcePath); + if (stream == null) + { + return; + } + Sound s = GuiUtility.SoundFromStream(stream); + s.Play(true); + } + } +} Property changes on: trunk/scsharp/src/SCSharpLib/UI/GuiUtility.cs ___________________________________________________________________ Name: svn:mime-type + text/x-csharp Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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-23 17:45:14
|
Revision: 1391 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1391&view=rev Author: jendave Date: 2007-05-23 10:45:10 -0700 (Wed, 23 May 2007) Log Message: ----------- More FXCop fixes. Fixed event handling Modified Paths: -------------- trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs trunk/scsharp/src/SCSharpLib/UI/BoxSelectionChangedEventArgs.cs trunk/scsharp/src/SCSharpLib/UI/Cinematic.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/GameModeActivateEventArgs.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/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/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/UIDialog.cs trunk/scsharp/src/SCSharpLib/UI/UIElement.cs trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs trunk/scsharp/src/SCSharpLib/UI/VideoDialog.cs Added Paths: ----------- trunk/scsharp/src/SCSharpLib/UI/SCEventArgs.cs Modified: trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/Properties/AssemblyInfo.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -40,3 +40,34 @@ [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")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "namespace", Target = "SCSharp.MpqLib", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.MpqLib.MpqContainer", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.MpqLib.MpqContainer.Add(SCSharp.MpqLib.Mpq):System.Void", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.MpqLib.MpqContainer.Remove(SCSharp.MpqLib.Mpq):System.Void", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.MpqLib.MpqHuffman", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.MpqLib.MpqStream", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.MpqLib.Mpq", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.MpqLib.MpqArchiveContainer", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "type", Target = "SCSharp.MpqLib.IMpqResource", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.EntryDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq,System.String)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GameMenuDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.UIDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq,System.String,System.String)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GameModeDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.MainMenu..ctor(SCSharp.MpqLib.Mpq)", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Game.PlayingMpq", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.Game.InstalledMpq", MessageId = "Mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.OkDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq,System.String)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.SoundDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.ZergReadyRoomScreen..ctor(SCSharp.MpqLib.Mpq,System.String)", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.RaceSelectionScreen..ctor(SCSharp.MpqLib.Mpq)", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.LoadSavedScreen..ctor(SCSharp.MpqLib.Mpq)", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.HelpDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.LogOnScreen..ctor(SCSharp.MpqLib.Mpq)", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.EstablishingShot..ctor(System.String,System.String,SCSharp.MpqLib.Mpq)", MessageId = "2#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.KeystrokeDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.OkCancelDialog..ctor(SCSharp.UI.UIScreen,SCSharp.MpqLib.Mpq,System.String)", MessageId = "1#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GameScreen..ctor(SCSharp.MpqLib.Mpq,SCSharp.MpqLib.Mpq,SCSharp.MpqLib.Chk,SCSharp.MpqLib.Got)", MessageId = "0#mpq")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "SCSharp.UI.GameScreen..ctor(SCSharp.MpqLib.Mpq,SCSharp.MpqLib.Mpq,SCSharp.MpqLib.Chk,SCSharp.MpqLib.Got)", MessageId = "1#mpq")] +[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")] Modified: trunk/scsharp/src/SCSharpLib/UI/BoxSelectionChangedEventArgs.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/BoxSelectionChangedEventArgs.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/BoxSelectionChangedEventArgs.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -33,7 +33,7 @@ /// <summary> /// /// </summary> - public class BoxSelectionChangedEventArgs : EventArgs + public class BoxSelectionChangedEventArgs : SCEventArgs { #region Private fields @@ -58,7 +58,7 @@ /// <summary> /// Constructor /// </summary> - public BoxSelectionChangedEventArgs() + public BoxSelectionChangedEventArgs() : base() { } Modified: trunk/scsharp/src/SCSharpLib/UI/Cinematic.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/Cinematic.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/Cinematic.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -104,14 +104,14 @@ /// <summary> /// /// </summary> - public event PlayerEventHandler Finished; + public event EventHandler<SCEventArgs> Finished; void PlayerFinished(object sender, EventArgs e) { player = null; if (Finished != null) { - Finished(this, new EventArgs()); + Finished(this, new SCEventArgs()); } } @@ -130,7 +130,7 @@ || args.Key == Key.Space) { player.Stop(); - PlayerFinished(this, new EventArgs()); + PlayerFinished(this, new SCEventArgs()); } } } Modified: trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/ConnectionScreen.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -107,14 +107,14 @@ listbox.SelectionChanged += HandleSelectionChanged; Elements[OK_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { ShowDialog(new OkDialog(this, this.Mpq, "insert battle.net code here")); }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { Game.Instance.SwitchToScreen(UIScreenType.MainMenu); }; Modified: trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -72,10 +72,10 @@ } Elements[QUITMISSION_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { QuitMissionDialog d = new QuitMissionDialog(this, this.Mpq); - d.Cancel += delegate(object sender2, EventArgs args2) + d.Cancel += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; @@ -83,10 +83,10 @@ }; Elements[EXITPROGRAM_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { ExitConfirmationDialog d = new ExitConfirmationDialog(this, this.Mpq); - d.Cancel += delegate(object sender2, EventArgs args2) + d.Cancel += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; @@ -94,10 +94,10 @@ }; Elements[RESTARTMISSION_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { RestartConfirmationDialog d = new RestartConfirmationDialog(this, this.Mpq); - d.Cancel += delegate(object sender2, EventArgs args2) + d.Cancel += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; @@ -105,11 +105,11 @@ }; Elements[PREVIOUS_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Previous != null) { - Previous(this, new EventArgs()); + Previous(this, new SCEventArgs()); } }; } @@ -117,6 +117,6 @@ /// <summary> /// /// </summary> - public event DialogEventHandler Previous; + public event EventHandler<SCEventArgs> Previous; } } Modified: trunk/scsharp/src/SCSharpLib/UI/EntryDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/EntryDialog.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/EntryDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -77,20 +77,20 @@ Elements[TITLE_ELEMENT_INDEX].Text = title; Elements[OK_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Ok != null) { - Ok(this, new EventArgs()); + Ok(this, new SCEventArgs()); } }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Cancel != null) { - Cancel(this, new EventArgs()); + Cancel(this, new SCEventArgs()); } }; @@ -130,11 +130,11 @@ /// <summary> /// /// </summary> - public event DialogEventHandler Cancel; + public event EventHandler<SCEventArgs> Cancel; /// <summary> /// /// </summary> - public event DialogEventHandler Ok; + public event EventHandler<SCEventArgs> Ok; } } Modified: trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -70,20 +70,20 @@ } Elements[EXIT_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Exit != null) { - Exit(this, new EventArgs()); + Exit(this, new SCEventArgs()); } }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Cancel != null) { - Cancel(this, new EventArgs()); + Cancel(this, new SCEventArgs()); } }; } @@ -91,10 +91,10 @@ /// <summary> /// /// </summary> - public event DialogEventHandler Exit; + public event EventHandler<SCEventArgs> Exit; /// <summary> /// /// </summary> - public event DialogEventHandler Cancel; + public event EventHandler<SCEventArgs> Cancel; } } Modified: trunk/scsharp/src/SCSharpLib/UI/Game.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/Game.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/Game.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -342,8 +342,8 @@ void UserEvent(object sender, UserEventArgs args) { - ReadyEventHandler d = (ReadyEventHandler)args.UserEvent; - d(this, new EventArgs()); + EventHandler<SCEventArgs> d = (EventHandler<SCEventArgs>)args.UserEvent; + d(this, new SCEventArgs()); } void PointerMotion(object sender, MouseMotionEventArgs args) @@ -409,7 +409,7 @@ { if (args.Key == Key.Q) { - Quit(this, new EventArgs()); + Quit(this, new SCEventArgs()); } else if (args.Key == Key.F) { Modified: trunk/scsharp/src/SCSharpLib/UI/GameMenuDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GameMenuDialog.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/GameMenuDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -77,19 +77,19 @@ } Elements[RETURNTOGAME_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (ReturnToGame != null) { - ReturnToGame(this, new EventArgs()); + ReturnToGame(this, new SCEventArgs()); } }; Elements[MISSIONOBJECTIVES_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { ObjectivesDialog d = new ObjectivesDialog(this, this.Mpq); - d.Previous += delegate(object sender2, EventArgs args2) + d.Previous += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; @@ -97,10 +97,10 @@ }; Elements[ENDMISSION_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { EndMissionDialog d = new EndMissionDialog(this, this.Mpq); - d.Previous += delegate(object sender2, EventArgs args2) + d.Previous += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; @@ -114,10 +114,10 @@ }; Elements[OPTIONS_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { OptionsDialog d = new OptionsDialog(this, this.Mpq); - d.Previous += delegate(object sender2, EventArgs args2) + d.Previous += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; @@ -125,10 +125,10 @@ }; Elements[HELP_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { HelpDialog d = new HelpDialog(this, this.Mpq); - d.Previous += delegate(object sender2, EventArgs args2) + d.Previous += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; @@ -139,6 +139,6 @@ /// <summary> /// /// </summary> - public event DialogEventHandler ReturnToGame; + public event EventHandler<SCEventArgs> ReturnToGame; } } Modified: trunk/scsharp/src/SCSharpLib/UI/GameModeActivateEventArgs.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GameModeActivateEventArgs.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/GameModeActivateEventArgs.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -33,7 +33,7 @@ /// <summary> /// /// </summary> - public class GameModeActivateEventArgs : EventArgs + public class GameModeActivateEventArgs : SCEventArgs { #region Private fields @@ -58,7 +58,7 @@ /// <summary> /// Constructor /// </summary> - public GameModeActivateEventArgs() + public GameModeActivateEventArgs() : base() { } Modified: trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -75,7 +75,7 @@ Elements[TITLE_ELEMENT_INDEX].Text = GlobalResources.BrooDat.GluAllTbl.Strings[172]; Elements[ORIGINAL_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Activate != null) { @@ -84,7 +84,7 @@ }; Elements[EXPANSION_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Activate != null) { @@ -93,11 +93,11 @@ }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Cancel != null) { - Cancel(this, new EventArgs()); + Cancel(this, new SCEventArgs()); } }; } @@ -105,7 +105,7 @@ /// <summary> /// /// </summary> - public event DialogEventHandler Cancel; + public event EventHandler<SCEventArgs> Cancel; /// <summary> /// /// </summary> Modified: trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -616,7 +616,7 @@ case Key.F10: GameMenuDialog d = new GameMenuDialog(this, this.Mpq); - d.ReturnToGame += delegate(object sender2, EventArgs args2) + d.ReturnToGame += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; Modified: trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -266,12 +266,12 @@ } // notify we're ready to roll - Events.PushUserEvent(new UserEventArgs(new ReadyEventHandler(FinishedLoading))); + Events.PushUserEvent(new UserEventArgs(new EventHandler<SCEventArgs>(FinishedLoading))); } catch (SdlException e) { Console.WriteLine("Global Resource loader failed: {0}", e); - Events.PushUserEvent(new UserEventArgs(new ReadyEventHandler(Game.Quit))); + Events.PushUserEvent(new UserEventArgs(new EventHandler<SCEventArgs>(Game.Quit))); } } @@ -279,13 +279,13 @@ { if (Ready != null) { - Ready(new EventArgs(), new EventArgs()); + Ready(new SCEventArgs(), new SCEventArgs()); } } /// <summary> /// /// </summary> - public static event ReadyEventHandler Ready; + public static event EventHandler<SCEventArgs> Ready; } } Modified: trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -46,10 +46,10 @@ namespace SCSharp.UI { - /// <summary> - /// - /// </summary> - public delegate void ReadyEventHandler(object sender, EventArgs e); + ///// <summary> + ///// + ///// </summary> + //public delegate void ReadyEventHandler(object sender, EventArgs e); /// <summary> /// Modified: trunk/scsharp/src/SCSharpLib/UI/HelpDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/HelpDialog.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/HelpDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -71,19 +71,19 @@ } Elements[PREVIOUS_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Previous != null) { - Previous(this, new EventArgs()); + Previous(this, new SCEventArgs()); } }; Elements[KEYSTROKE_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { KeystrokeDialog d = new KeystrokeDialog(this, this.Mpq); - d.Ok += delegate(object sender2, EventArgs args2) + d.Ok += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; @@ -94,6 +94,6 @@ /// <summary> /// /// </summary> - public event DialogEventHandler Previous; + public event EventHandler<SCEventArgs> Previous; } } Modified: trunk/scsharp/src/SCSharpLib/UI/KeystrokeDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/KeystrokeDialog.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/KeystrokeDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -70,11 +70,11 @@ } Elements[OK_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Ok != null) { - Ok(this, new EventArgs()); + Ok(this, new SCEventArgs()); } }; @@ -90,6 +90,6 @@ /// <summary> /// /// </summary> - public event DialogEventHandler Ok; + public event EventHandler<SCEventArgs> Ok; } } Modified: trunk/scsharp/src/SCSharpLib/UI/LoadSavedScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/LoadSavedScreen.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/LoadSavedScreen.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -69,7 +69,7 @@ } Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { Game.Instance.SwitchToScreen(new RaceSelectionScreen(this.Mpq)); }; Modified: trunk/scsharp/src/SCSharpLib/UI/LoginScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/LoginScreen.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/LoginScreen.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -90,7 +90,7 @@ } Elements[OK_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (listbox.SelectedIndex == -1) { @@ -101,21 +101,21 @@ }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { Game.Instance.SwitchToScreen(UIScreenType.MainMenu); }; Elements[NEW_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { EntryDialog d = new EntryDialog(this, this.Mpq, GlobalResources.GluAllTbl.Strings[22]); - d.Cancel += delegate(object sender2, EventArgs args2) + d.Cancel += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; - d.Ok += delegate(object sender2, EventArgs args2) + d.Ok += delegate(object sender2, SCEventArgs args2) { if (listbox.Contains(d.Value)) { @@ -131,15 +131,15 @@ }; Elements[DELETE_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { OkCancelDialog okd = new OkCancelDialog(this, this.Mpq, GlobalResources.GluAllTbl.Strings[23]); - okd.Cancel += delegate(object sender2, EventArgs args2) + okd.Cancel += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; - okd.Ok += delegate(object sender2, EventArgs args2) + okd.Ok += delegate(object sender2, SCEventArgs args2) { DismissDialog(); /* actually delete the file */ Modified: trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -62,7 +62,7 @@ void ShowGameModeDialog(UIScreenType nextScreen) { GameModeDialog d = new GameModeDialog(this, this.Mpq); - d.Cancel += delegate(object sender, EventArgs args) + d.Cancel += delegate(object sender, SCEventArgs args) { DismissDialog(); }; @@ -93,7 +93,7 @@ Elements[VERSION_ELEMENT_INDEX].Text = "v0.0000004"; Elements[SINGLEPLAYER_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Game.Instance.IsBroodWar) { @@ -107,7 +107,7 @@ }; Elements[MULTIPLAYER_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Game.Instance.IsBroodWar) { @@ -121,7 +121,7 @@ }; Elements[CAMPAIGNEDITOR_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { OkDialog d = new OkDialog(this, this.Mpq, "The campaign editor functionality is not available in SCSharp"); @@ -129,14 +129,14 @@ }; Elements[INTRO_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { Cinematic introScreen = new Cinematic(this.Mpq, Game.Instance.IsBroodWar ? "smk\\starXIntr.smk" : "smk\\starintr.smk"); introScreen.Finished += - delegate(object sender2, EventArgs e2) + delegate(object sender2, SCEventArgs e2) { Game.Instance.SwitchToScreen(this); }; @@ -144,15 +144,15 @@ }; Elements[CREDITS_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { Game.Instance.SwitchToScreen(new CreditsScreen(this.Mpq)); }; Elements[EXIT_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { - Game.Quit(this, new EventArgs()); + Game.Quit(this, new SCEventArgs()); }; } } Modified: trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -70,22 +70,22 @@ } Elements[OK_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Ok != null) { //Ok(); - Ok(this, new EventArgs()); + Ok(this, new SCEventArgs()); } }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Cancel != null) { //Cancel(); - Cancel(this, new EventArgs()); + Cancel(this, new SCEventArgs()); } }; } @@ -93,11 +93,11 @@ /// <summary> /// /// </summary> - public event DialogEventHandler Ok; + public event EventHandler<SCEventArgs> Ok; /// <summary> /// /// </summary> - public event DialogEventHandler Cancel; + public event EventHandler<SCEventArgs> Cancel; } } Modified: trunk/scsharp/src/SCSharpLib/UI/ObjectivesDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ObjectivesDialog.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/ObjectivesDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -67,11 +67,11 @@ Console.WriteLine("{0}: {1} '{2}'", i, Elements[i].Type, Elements[i].Text); Elements[PREVIOUS_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Previous != null) { - Previous(this, new EventArgs()); + Previous(this, new SCEventArgs()); } }; } @@ -79,6 +79,6 @@ /// <summary> /// /// </summary> - public event DialogEventHandler Previous; + public event EventHandler<SCEventArgs> Previous; } } Modified: trunk/scsharp/src/SCSharpLib/UI/OkCancelDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/OkCancelDialog.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/OkCancelDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -72,20 +72,20 @@ Elements[MESSAGE_ELEMENT_INDEX].Text = message; Elements[OK_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Ok != null) { - Ok(this, new EventArgs()); + Ok(this, new SCEventArgs()); } }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Cancel != null) { - Cancel(this, new EventArgs()); + Cancel(this, new SCEventArgs()); } }; } @@ -93,11 +93,11 @@ /// <summary> /// /// </summary> - public event DialogEventHandler Ok; + public event EventHandler<SCEventArgs> Ok; /// <summary> /// /// </summary> - public event DialogEventHandler Cancel; + public event EventHandler<SCEventArgs> Cancel; } } Modified: trunk/scsharp/src/SCSharpLib/UI/OkDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/OkDialog.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/OkDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -71,7 +71,7 @@ Elements[MESSAGE_ELEMENT_INDEX].Text = message; Elements[OK_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Ok == null) { @@ -79,7 +79,7 @@ } else { - Ok(this, new EventArgs()); + Ok(this, new SCEventArgs()); } }; } @@ -87,6 +87,6 @@ /// <summary> /// /// </summary> - public event DialogEventHandler Ok; + public event EventHandler<SCEventArgs> Ok; } } Modified: trunk/scsharp/src/SCSharpLib/UI/OptionsDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/OptionsDialog.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/OptionsDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -68,15 +68,15 @@ base.ResourceLoader(); Elements[SOUND_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { SoundDialog d = new SoundDialog(this, this.Mpq); - //d.Ok += delegate() { DismissDialog(this, new EventArgs()); }; - d.Ok += delegate(object sender2, EventArgs args2) + //d.Ok += delegate() { DismissDialog(this, new SCEventArgs()); }; + d.Ok += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; - d.Cancel += delegate(object sender2, EventArgs args2) + d.Cancel += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; @@ -84,14 +84,14 @@ }; Elements[SPEED_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { SpeedDialog d = new SpeedDialog(this, this.Mpq); - d.Ok += delegate(object sender2, EventArgs args2) + d.Ok += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; - d.Cancel += delegate(object sender2, EventArgs args2) + d.Cancel += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; @@ -99,14 +99,14 @@ }; Elements[VIDEO_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { VideoDialog d = new VideoDialog(this, this.Mpq); - d.Ok += delegate(object sender2, EventArgs args2) + d.Ok += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; - d.Cancel += delegate(object sender2, EventArgs args2) + d.Cancel += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; @@ -114,14 +114,14 @@ }; Elements[NETWORK_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { NetworkDialog d = new NetworkDialog(this, this.Mpq); - d.Ok += delegate(object sender2, EventArgs args2) + d.Ok += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; - d.Cancel += delegate(object sender2, EventArgs args2) + d.Cancel += delegate(object sender2, SCEventArgs args2) { DismissDialog(); }; @@ -129,11 +129,11 @@ }; Elements[PREVIOUS_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Previous != null) { - Previous(this, new EventArgs()); + Previous(this, new SCEventArgs()); } }; @@ -144,6 +144,6 @@ /// <summary> /// /// </summary> - public event DialogEventHandler Previous; + public event EventHandler<SCEventArgs> Previous; } } Modified: trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -237,7 +237,7 @@ gametypeCombo.SelectionChanged += GameTypeSelectionChanged; Elements[OK_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (selectedScenario == null) { @@ -270,7 +270,7 @@ }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { Game.Instance.SwitchToScreen(new RaceSelectionScreen(this.Mpq)); }; Modified: trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -71,18 +71,18 @@ } Elements[QUIT_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { //QuitConfirmationDialog d = new QuitConfirmationDialog(this, mpq); //ShowDialog(d); }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Cancel != null) { - Cancel(this, new EventArgs()); + Cancel(this, new SCEventArgs()); } }; } @@ -90,6 +90,6 @@ /// <summary> /// /// </summary> - public event DialogEventHandler Cancel; + public event EventHandler<SCEventArgs> Cancel; } } Modified: trunk/scsharp/src/SCSharpLib/UI/RaceSelectionScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/RaceSelectionScreen.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/RaceSelectionScreen.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -100,7 +100,7 @@ Console.WriteLine("{0}: {1} '{2}'", i, Elements[i].Type, Elements[i].Text); Elements[THIRD_CAMPAIGN_ELEMENT_INDEX].MouseEnterEvent += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { Console.WriteLine("over third campaign element"); if (true /* XXX this should come from the player's file */) @@ -110,7 +110,7 @@ }; Elements[THIRD_CAMPAIGN_ELEMENT_INDEX].MouseLeaveEvent += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (true /* XXX this should come from the player's file */) { @@ -119,7 +119,7 @@ }; Elements[SECOND_CAMPAIGN_ELEMENT_INDEX].MouseEnterEvent += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { Console.WriteLine("over second campaign element"); if (true /* XXX this should come from the player's file */) @@ -129,7 +129,7 @@ }; Elements[SECOND_CAMPAIGN_ELEMENT_INDEX].MouseLeaveEvent += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (true /* XXX this should come from the player's file */) { @@ -138,38 +138,38 @@ }; Elements[FIRST_CAMPAIGN_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { SelectCampaign(0); }; Elements[SECOND_CAMPAIGN_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { SelectCampaign(1); }; Elements[THIRD_CAMPAIGN_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { SelectCampaign(2); }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { Game.Instance.SwitchToScreen(UIScreenType.LogOn); }; Elements[LOADSAVED_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { Game.Instance.SwitchToScreen(new LoadSavedScreen(this.Mpq)); }; Elements[PLAYCUSTOM_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { Game.Instance.SwitchToScreen(new PlayCustomScreen(this.Mpq)); }; Modified: trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/ReadyRoomScreen.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -121,21 +121,21 @@ } Elements[cancelElementIndex].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { StopBriefing(); Game.Instance.SwitchToScreen(UIScreenType.LogOn); }; Elements[replayElementIndex].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { StopBriefing(); PlayBriefing(); }; Elements[startElementIndex].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { StopBriefing(); Game.Instance.SwitchToScreen(new GameScreen(this.Mpq, scenario_prefix, scenario)); Modified: trunk/scsharp/src/SCSharpLib/UI/RestartConfirmationDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/RestartConfirmationDialog.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/RestartConfirmationDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -70,11 +70,11 @@ } Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Cancel != null) { - Cancel(this, new EventArgs()); + Cancel(this, new SCEventArgs()); } }; } @@ -82,6 +82,6 @@ /// <summary> /// /// </summary> - public event DialogEventHandler Cancel; + public event EventHandler<SCEventArgs> Cancel; } } Added: trunk/scsharp/src/SCSharpLib/UI/SCEventArgs.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/SCEventArgs.cs (rev 0) +++ trunk/scsharp/src/SCSharpLib/UI/SCEventArgs.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -0,0 +1,49 @@ +#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 SCEventArgs : EventArgs + { + #region Constructors + + /// <summary> + /// Constructor + /// </summary> + public SCEventArgs() : base() + { + } + + #endregion + } +} Property changes on: trunk/scsharp/src/SCSharpLib/UI/SCEventArgs.cs ___________________________________________________________________ Name: svn:mime-type + text/x-csharp Name: svn:eol-style + native Modified: trunk/scsharp/src/SCSharpLib/UI/SmackerPlayer.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/SmackerPlayer.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/SmackerPlayer.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -210,7 +210,7 @@ } finally { - Events.PushUserEvent(new UserEventArgs(new ReadyEventHandler(EmitFinished))); + Events.PushUserEvent(new UserEventArgs(new EventHandler<SCEventArgs>(EmitFinished))); } } @@ -218,19 +218,19 @@ /// <summary> /// /// </summary> - public event PlayerEventHandler Finished; + public event EventHandler<SCEventArgs> Finished; void EmitFinished(object sender, EventArgs e) { if (Finished != null) { - Finished(this, new EventArgs()); + Finished(this, new SCEventArgs()); } } } - /// <summary> - /// - /// </summary> - public delegate void PlayerEventHandler(object sender, EventArgs e); + ///// <summary> + ///// + ///// </summary> + //public delegate void PlayerEventHandler(object sender, EventArgs e); } Modified: trunk/scsharp/src/SCSharpLib/UI/SoundDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/SoundDialog.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/SoundDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -68,22 +68,22 @@ Console.WriteLine("{0}: {1} '{2}'", i, Elements[i].Type, Elements[i].Text); Elements[OK_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Ok != null) { - //Ok(this, new EventArgs()); - Ok(this, new EventArgs()); + //Ok(this, new SCEventArgs()); + Ok(this, new SCEventArgs()); } }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Cancel != null) { - //Cancel(this, new EventArgs()); - Cancel(this, new EventArgs()); + //Cancel(this, new SCEventArgs()); + Cancel(this, new SCEventArgs()); } }; } @@ -91,11 +91,11 @@ /// <summary> /// /// </summary> - public event DialogEventHandler Ok; + public event EventHandler<SCEventArgs> Ok; /// <summary> /// /// </summary> - public event DialogEventHandler Cancel; + public event EventHandler<SCEventArgs> Cancel; } } Modified: trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs 2007-05-23 16:47:31 UTC (rev 1390) +++ trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs 2007-05-23 17:45:10 UTC (rev 1391) @@ -68,22 +68,22 @@ Console.WriteLine("{0}: {1} '{2}'", i, Elements[i].Type, Elements[i].Text); Elements[OK_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Ok != null) { - Ok(this, new EventArgs()); - //Ok(this, new EventArgs()); + Ok(this, new SCEventArgs()); + //Ok(this, new SCEventArgs()); } }; Elements[CANCEL_ELEMENT_INDEX].Activate += - delegate(object sender, EventArgs args) + delegate(object sender, SCEventArgs args) { if (Cancel != null) { - Cancel(this, new EventArgs()); - //Cancel(this, new EventArgs()); + Cancel(this, new SCEventArgs()); + //Cancel(this, new SCEventArgs()); } }; } @@ -91,11 +91,11 @@ /// <summary> /// /// </summary> - public event DialogEventHandler Ok; + public event EventHandler<SCEventArgs> Ok; /// <summary> /// /// </summary> - public event DialogEventHandler Cancel; + public event EventHandler<SCEventArgs> Cancel; } } Modified: trunk/scsharp/src/SCSharpLib/UI/UIDialog.cs ========================... [truncated message content] |
From: <je...@us...> - 2007-05-23 16:47:41
|
Revision: 1390 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1390&view=rev Author: jendave Date: 2007-05-23 09:47:31 -0700 (Wed, 23 May 2007) Log Message: ----------- bump version number Modified Paths: -------------- trunk/SdlDotNet/src/Properties/AssemblyInfo.cs Modified: trunk/SdlDotNet/src/Properties/AssemblyInfo.cs =================================================================== --- trunk/SdlDotNet/src/Properties/AssemblyInfo.cs 2007-05-23 16:44:53 UTC (rev 1389) +++ trunk/SdlDotNet/src/Properties/AssemblyInfo.cs 2007-05-23 16:47:31 UTC (rev 1390) @@ -43,9 +43,9 @@ [assembly: AssemblyTrademark("http://cs-sdl.sourceforge.net")] [assembly: AssemblyCulture("")] [assembly: NeutralResourcesLanguageAttribute("en-US")] -[assembly: AssemblyVersion("6.0.0.0")] -[assembly: AssemblyFileVersion("6.0.0.0")] -[assembly: AssemblyInformationalVersion("6.0.0.0")] +[assembly: AssemblyVersion("6.0.1.0")] +[assembly: AssemblyFileVersion("6.0.1.0")] +[assembly: AssemblyInformationalVersion("6.0.1.0")] // // Version information for an assembly consists of the following four values: @@ -101,4 +101,4 @@ [module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SdlDotNet.Graphics.Surface.GetColors(System.Drawing.Rectangle):System.Drawing.Color[,]", MessageId = "Return")] [module: SuppressMessage("Microsoft.Performance", "CA1814:PreferJaggedArraysOverMultidimensional", Scope = "member", Target = "SdlDotNet.Graphics.Surface.SetPixels(System.Drawing.Point,System.Drawing.Color[,]):System.Void", MessageId = "1#")] [module: SuppressMessage("Microsoft.Performance", "CA1805:DoNotInitializeUnnecessarily", Scope = "member", Target = "SdlDotNet.Graphics.MarshalHelper..cctor()")] -[module: SuppressMessage("Microsoft.Performance", "CA1802:UseLiteralsWhereAppropriate", Scope = "member", Target = "SdlDotNet.Graphics.MarshalHelper.offset")] \ No newline at end of file +[module: SuppressMessage("Microsoft.Performance", "CA1802:UseLiteralsWhereAppropriate", Scope = "member", Target = "SdlDotNet.Graphics.MarshalHelper.offset")] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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-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-22 16:28:35
|
Revision: 1387 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1387&view=rev Author: jendave Date: 2007-05-22 09:28:33 -0700 (Tue, 22 May 2007) Log Message: ----------- Remove unused files. Fix obselete warning Modified Paths: -------------- trunk/scsharp/src/SCSharpLib/UI/SmackerPlayer.cs Removed Paths: ------------- trunk/scsharp/src/SCSharpLib/Properties/Settings.Designer.cs trunk/scsharp/src/SCSharpLib/Properties/Settings.settings Deleted: trunk/scsharp/src/SCSharpLib/Properties/Settings.Designer.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/Properties/Settings.Designer.cs 2007-05-22 15:06:40 UTC (rev 1386) +++ trunk/scsharp/src/SCSharpLib/Properties/Settings.Designer.cs 2007-05-22 16:28:33 UTC (rev 1387) @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// This code was generated by a tool. -// Runtime Version:2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace SCSharp.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} Deleted: trunk/scsharp/src/SCSharpLib/Properties/Settings.settings =================================================================== --- trunk/scsharp/src/SCSharpLib/Properties/Settings.settings 2007-05-22 15:06:40 UTC (rev 1386) +++ trunk/scsharp/src/SCSharpLib/Properties/Settings.settings 2007-05-22 16:28:33 UTC (rev 1387) @@ -1,7 +0,0 @@ -<?xml version='1.0' encoding='utf-8'?> -<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> - <Profiles> - <Profile Name="(Default)" /> - </Profiles> - <Settings /> -</SettingsFile> Modified: trunk/scsharp/src/SCSharpLib/UI/SmackerPlayer.cs =================================================================== --- trunk/scsharp/src/SCSharpLib/UI/SmackerPlayer.cs 2007-05-22 15:06:40 UTC (rev 1386) +++ trunk/scsharp/src/SCSharpLib/UI/SmackerPlayer.cs 2007-05-22 16:28:33 UTC (rev 1387) @@ -85,7 +85,8 @@ if (state == State.PAUSED) { state = State.PLAYING; - decoderThread.Resume(); + // TODO This is obselete + //decoderThread.Resume(); } else if (state == State.STOPPED) { @@ -125,7 +126,8 @@ } state = State.PAUSED; - decoderThread.Suspend(); + //TODO this is obselete + //decoderThread.Suspend(); } /// <summary> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2007-05-22 15:06:43
|
Revision: 1386 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1386&view=rev Author: jendave Date: 2007-05-22 08:06:40 -0700 (Tue, 22 May 2007) Log Message: ----------- add mousewheel override to SurfaceControl Modified Paths: -------------- trunk/SdlDotNet/src/Windows/SurfaceControl.cs Modified: trunk/SdlDotNet/src/Windows/SurfaceControl.cs =================================================================== --- trunk/SdlDotNet/src/Windows/SurfaceControl.cs 2007-05-21 06:53:22 UTC (rev 1385) +++ trunk/SdlDotNet/src/Windows/SurfaceControl.cs 2007-05-22 15:06:40 UTC (rev 1386) @@ -192,6 +192,19 @@ } /// <summary> + /// Raises the MouseWheel Event + /// </summary> + /// <param name="e">Contains the event data</param> + protected override void OnMouseWheel(MouseEventArgs e) + { + if (!this.DesignMode) + { + SdlDotNet.Core.Events.Add(new MouseButtonEventArgs(SurfaceControl.ConvertMouseButtons(e), false, (short)e.X, (short)e.Y)); + } + base.OnMouseWheel(e); + } + + /// <summary> /// Raises the MouseMove event /// </summary> /// <param name="e">Contains the event data</param> @@ -260,6 +273,14 @@ { return MouseButton.MiddleButton; } + else if (e.Button == MouseButtons.XButton1) + { + return MouseButton.WheelDown; + } + else if (e.Button == MouseButtons.XButton2) + { + return MouseButton.WheelUp; + } else { return MouseButton.None; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |