|
From: <je...@us...> - 2007-05-21 06:53:24
|
Revision: 1385
http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1385&view=rev
Author: jendave
Date: 2007-05-20 23:53:22 -0700 (Sun, 20 May 2007)
Log Message:
-----------
Some fxcop changes
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/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/MpqArchive.cs
trunk/scsharp/src/SCSharpLib/MpqLib/MpqDirectory.cs
trunk/scsharp/src/SCSharpLib/MpqLib/MpqHash.cs
trunk/scsharp/src/SCSharpLib/MpqLib/MpqHuffman.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/UnitsDat.cs
trunk/scsharp/src/SCSharpLib/UI/Cinematic.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/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/MainMenu.cs
trunk/scsharp/src/SCSharpLib/UI/MapRenderer.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/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/TitleScreen.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
Modified: trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/MpqLib/BinElement.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -376,6 +376,10 @@
[CLSCompliant(false)]
public BinElement(byte[] buf, int position, uint streamLength)
{
+ if (buf == null)
+ {
+ throw new ArgumentException("buf");
+ }
x1 = Utilities.ReadWord(buf, position + 4);
y1 = Utilities.ReadWord(buf, position + 6);
x2 = Utilities.ReadWord(buf, position + 8);
Modified: trunk/scsharp/src/SCSharpLib/MpqLib/BitStream.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/MpqLib/BitStream.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/MpqLib/BitStream.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -52,16 +52,16 @@
mStream = sourceStream;
}
- /// <summary>
- ///
- /// </summary>
- public Stream BaseStream
- {
- get
- {
- return mStream;
- }
- }
+ ///// <summary>
+ /////
+ ///// </summary>
+ //public Stream BaseStream
+ //{
+ // get
+ // {
+ // return mStream;
+ // }
+ //}
/// <summary>
///
Modified: trunk/scsharp/src/SCSharpLib/MpqLib/Got.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/MpqLib/Got.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/MpqLib/Got.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -91,6 +91,10 @@
/// <param name="stream"></param>
public void ReadFromStream(Stream stream)
{
+ if (stream == null)
+ {
+ throw new ArgumentException("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-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/MpqLib/ImagesDat.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -61,6 +61,10 @@
/// <param name="stream"></param>
public void ReadFromStream(Stream stream)
{
+ if (stream == null)
+ {
+ throw new ArgumentException("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-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/MpqLib/LinkedNode.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -130,6 +130,10 @@
/// <returns></returns>
public LinkedNode Insert(LinkedNode other)
{
+ if (other == null)
+ {
+ throw new ArgumentException("other");
+ }
// 'Next' should have a lower weight
// we should return the lower weight
if (other.weight <= weight)
Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MapDataDat.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/MpqLib/MapDataDat.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/MpqLib/MapDataDat.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -55,6 +55,10 @@
/// <param name="stream"></param>
public void ReadFromStream(Stream stream)
{
+ if (stream == null)
+ {
+ throw new ArgumentException("stream");
+ }
buf = new byte[stream.Length];
stream.Read(buf, 0, buf.Length);
}
@@ -73,7 +77,7 @@
/// <summary>
///
/// </summary>
- public int NumIndices
+ public int NumIndexes
{
get { return buf.Length / 4; }
}
Modified: trunk/scsharp/src/SCSharpLib/MpqLib/Mpq.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/MpqLib/Mpq.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/MpqLib/Mpq.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -62,8 +62,12 @@
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
- protected Type GetTypeFromResourcePath(string path)
+ protected static Type GetTypeFromResourcePath(string path)
{
+ if (path == null)
+ {
+ throw new ArgumentException("path");
+ }
string ext = Path.GetExtension(path);
if (ext.ToLower() == ".tbl")
{
Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqArchive.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/MpqLib/MpqArchive.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqArchive.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -58,11 +58,11 @@
/// <summary>
///
/// </summary>
- /// <param name="filename"></param>
- public MpqArchive(string filename)
+ /// <param name="fileName"></param>
+ public MpqArchive(string fileName)
{
//mFilename = filename;
- mStream = File.Open(filename, FileMode.Open, FileAccess.Read);
+ mStream = File.Open(fileName, FileMode.Open, FileAccess.Read);
Init();
}
@@ -144,19 +144,19 @@
/// <summary>
///
/// </summary>
- /// <param name="filename"></param>
+ /// <param name="fileName"></param>
/// <returns></returns>
- public MpqStream OpenFile(string filename)
+ public MpqStream OpenFile(string fileName)
{
MpqHash hash;
MpqBlock block;
- hash = GetHashEntry(filename);
+ hash = GetHashEntry(fileName);
uint blockindex = hash.BlockIndex;
if (blockindex == uint.MaxValue)
{
- throw new FileNotFoundException("File not found: " + filename);
+ throw new FileNotFoundException("File not found: " + fileName);
}
block = mBlocks[blockindex];
@@ -167,11 +167,11 @@
/// <summary>
///
/// </summary>
- /// <param name="filename"></param>
+ /// <param name="fileName"></param>
/// <returns></returns>
- public bool FileExists(string filename)
+ public bool FileExists(string fileName)
{
- MpqHash hash = GetHashEntry(filename);
+ MpqHash hash = GetHashEntry(fileName);
return (hash.BlockIndex != uint.MaxValue);
}
Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqDirectory.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/MpqLib/MpqDirectory.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqDirectory.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -54,7 +54,7 @@
RecurseDirectoryTree(mpqDirPath);
}
- string ConvertBackSlashes(string path)
+ static string ConvertBackSlashes(string path)
{
while (path.IndexOf('\\') != -1)
path = path.Replace('\\', Path.DirectorySeparatorChar);
Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqHash.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/MpqLib/MpqHash.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqHash.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -50,12 +50,12 @@
BlockIndex = br.ReadUInt32();
}
- public bool IsValid
- {
- get
- {
- return Name1 != uint.MaxValue && Name2 != uint.MaxValue;
- }
- }
+ //public bool IsValid
+ //{
+ // get
+ // {
+ // return Name1 != uint.MaxValue && Name2 != uint.MaxValue;
+ // }
+ //}
}
}
Modified: trunk/scsharp/src/SCSharpLib/MpqLib/MpqHuffman.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/MpqLib/MpqHuffman.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/MpqLib/MpqHuffman.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -179,6 +179,10 @@
/// <returns></returns>
public static byte[] Decompress(Stream data)
{
+ if (data == null)
+ {
+ throw new ArgumentException("data");
+ }
int comptype = data.ReadByte();
if (comptype == 0)
@@ -223,7 +227,7 @@
int bit = input.ReadBits(1);
if (bit == -1)
{
- throw new Exception("Unexpected end of file");
+ throw new EndOfStreamException("Unexpected end of file");
}
node = bit == 0 ? node.Child0 : node.Child1;
Modified: trunk/scsharp/src/SCSharpLib/MpqLib/SfxDataDat.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/MpqLib/SfxDataDat.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/MpqLib/SfxDataDat.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -60,6 +60,10 @@
/// <param name="stream"></param>
public void ReadFromStream(Stream stream)
{
+ if (stream == null)
+ {
+ throw new ArgumentException("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-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/MpqLib/SpritesDat.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -82,6 +82,10 @@
/// <param name="stream"></param>
public void ReadFromStream(Stream stream)
{
+ if (stream == null)
+ {
+ throw new ArgumentException("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-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/MpqLib/Trigger.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -50,6 +50,10 @@
/// <param name="offset"></param>
public void Parse(byte[] data, ref int offset)
{
+ if (data == null)
+ {
+ throw new ArgumentException("data");
+ }
int i;
for (i = 0; i < conditions.Length; i++)
{
Modified: trunk/scsharp/src/SCSharpLib/MpqLib/UnitsDat.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/MpqLib/UnitsDat.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/MpqLib/UnitsDat.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -88,6 +88,10 @@
/// <param name="stream"></param>
public void ReadFromStream(Stream stream)
{
+ if (stream == null)
+ {
+ throw new ArgumentException("stream");
+ }
buf = new byte[(int)stream.Length];
stream.Read(buf, 0, buf.Length);
Modified: trunk/scsharp/src/SCSharpLib/UI/Cinematic.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/Cinematic.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/Cinematic.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -96,7 +96,7 @@
/// <summary>
///
/// </summary>
- public event PlayerEvent Finished;
+ public event PlayerEventHandler Finished;
void PlayerFinished()
{
Modified: trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/ComboBoxElement.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -257,12 +257,12 @@
/// <summary>
///
/// </summary>
- public event ComboBoxSelectionChanged SelectionChanged;
+ public event ComboBoxSelectionChangedEventHandler SelectionChanged;
}
/// <summary>
///
/// </summary>
/// <param name="selectedIndex"></param>
- public delegate void ComboBoxSelectionChanged(int selectedIndex);
+ public delegate void ComboBoxSelectionChangedEventHandler(int selectedIndex);
}
Modified: trunk/scsharp/src/SCSharpLib/UI/CursorAnimator.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/CursorAnimator.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/CursorAnimator.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -76,7 +76,7 @@
/// <param name="hotX"></param>
/// <param name="hotY"></param>
[CLSCompliant(false)]
- public void SetHotSpot(uint hotX, uint hotY)
+ public void SetHotspot(uint hotX, uint hotY)
{
this.hotX = hotX;
this.hotY = hotY;
Modified: trunk/scsharp/src/SCSharpLib/UI/DialogBoxElement.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/DialogBoxElement.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/DialogBoxElement.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -68,7 +68,7 @@
const int TILE_B = 7;
const int TILE_BL = 6;
- void TileRow(Surface surf, Grp grp, byte[] pal, int l, int c, int r, int y)
+ static void TileRow(Surface surf, Grp grp, byte[] pal, int l, int c, int r, int y)
{
Surface lsurf = GuiUtil.CreateSurfaceFromBitmap(grp.GetFrame(l),
grp.Width, grp.Height,
Modified: trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/EndMissionDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -108,6 +108,6 @@
/// <summary>
///
/// </summary>
- public event DialogEvent Previous;
+ public event DialogEventHandler Previous;
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/EntryDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/EntryDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/EntryDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -130,11 +130,11 @@
/// <summary>
///
/// </summary>
- public event DialogEvent Cancel;
+ public event DialogEventHandler Cancel;
/// <summary>
///
/// </summary>
- public event DialogEvent Ok;
+ public event DialogEventHandler Ok;
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/ExitConfirmationDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -91,10 +91,10 @@
/// <summary>
///
/// </summary>
- public event DialogEvent Exit;
+ public event DialogEventHandler Exit;
/// <summary>
///
/// </summary>
- public event DialogEvent Cancel;
+ public event DialogEventHandler Cancel;
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/Game.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/Game.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/Game.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -227,7 +227,7 @@
this.rootDir = starcraftDir;
}
- Mpq GetMpq(string path)
+ static Mpq GetMpq(string path)
{
if (Directory.Exists(path))
{
@@ -317,7 +317,7 @@
/// <summary>
///
/// </summary>
- public void Quit()
+ public static void Quit()
{
Events.QuitApplication();
}
@@ -342,7 +342,7 @@
void UserEvent(object sender, UserEventArgs args)
{
- ReadyDelegate d = (ReadyDelegate)args.UserEvent;
+ ReadyEventHandler d = (ReadyEventHandler)args.UserEvent;
d();
}
Modified: trunk/scsharp/src/SCSharpLib/UI/GameMenuDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/GameMenuDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/GameMenuDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -136,6 +136,6 @@
/// <summary>
///
/// </summary>
- public event DialogEvent ReturnToGame;
+ public event DialogEventHandler ReturnToGame;
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/GameModeDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -99,16 +99,16 @@
/// <summary>
///
/// </summary>
- public event DialogEvent Cancel;
+ public event DialogEventHandler Cancel;
/// <summary>
///
/// </summary>
- public event GameModeActivateDelegate Activate;
+ public event GameModeActivateEventHandler Activate;
}
/// <summary>
///
/// </summary>
/// <param name="expansion"></param>
- public delegate void GameModeActivateDelegate(bool expansion);
+ public delegate void GameModeActivateEventHandler(bool expansion);
}
Modified: trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/GameScreen.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -332,7 +332,7 @@
{
ScrollCursors[i] = new CursorAnimator((Grp)this.Mpq.GetResource(cursornames[i]),
Effectpal.Palette);
- ScrollCursors[i].SetHotSpot(60, 60);
+ ScrollCursors[i].SetHotspot(60, 60);
}
// load the mag cursors
@@ -346,7 +346,7 @@
{
MagCursors[i] = new CursorAnimator((Grp)this.Mpq.GetResource(magcursornames[i]),
Effectpal.Palette);
- MagCursors[i].SetHotSpot(60, 60);
+ MagCursors[i].SetHotspot(60, 60);
}
// load the targeting cursors
@@ -360,7 +360,7 @@
{
TargetCursors[i] = new CursorAnimator((Grp)this.Mpq.GetResource(targetcursornames[i]),
Effectpal.Palette);
- TargetCursors[i].SetHotSpot(60, 60);
+ TargetCursors[i].SetHotspot(60, 60);
}
PlaceInitialUnits();
Modified: trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/GlobalResources.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -248,12 +248,12 @@
}
// notify we're ready to roll
- Events.PushUserEvent(new UserEventArgs(new ReadyDelegate(FinishedLoading)));
+ Events.PushUserEvent(new UserEventArgs(new ReadyEventHandler(FinishedLoading)));
}
catch (SdlException e)
{
Console.WriteLine("Global Resource loader failed: {0}", e);
- Events.PushUserEvent(new UserEventArgs(new ReadyDelegate(Events.QuitApplication)));
+ Events.PushUserEvent(new UserEventArgs(new ReadyEventHandler(Events.QuitApplication)));
}
}
@@ -268,6 +268,6 @@
/// <summary>
///
/// </summary>
- public event ReadyDelegate Ready;
+ public event ReadyEventHandler Ready;
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/GuiUtil.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -49,7 +49,7 @@
/// <summary>
///
/// </summary>
- public delegate void ReadyDelegate();
+ public delegate void ReadyEventHandler();
/// <summary>
///
@@ -133,7 +133,7 @@
}
}
- return CreateSurfaceFromRGBAData(buf, (ushort)g.Width, (ushort)g.Height, 32, g.Width * 4);
+ return CreateSurfaceFromRgbaData(buf, (ushort)g.Width, (ushort)g.Height, 32, g.Width * 4);
}
/// <summary>
@@ -369,7 +369,7 @@
/// <param name="stride"></param>
/// <returns></returns>
[CLSCompliant(false)]
- public static Surface CreateSurfaceFromRGBAData(byte[] data, ushort width, ushort height, int depth, int stride)
+ 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 */
@@ -389,7 +389,7 @@
/// <param name="stride"></param>
/// <returns></returns>
[CLSCompliant(false)]
- public static Surface CreateSurfaceFromRGBData(byte[] data, ushort width, ushort height, int depth, int stride)
+ public static Surface CreateSurfaceFromRgbData(byte[] data, ushort width, ushort height, int depth, int stride)
{
return CreateSurface(data, width, height, depth, stride,
(int)0x00ff0000,
@@ -455,7 +455,7 @@
{
byte[] buf = GetBitmapData(grid, width, height, palette, withAlpha);
- return CreateSurfaceFromRGBAData(buf, width, height, withAlpha ? 32 : 24, width * (3 + (withAlpha ? 1 : 0)));
+ return CreateSurfaceFromRgbaData(buf, width, height, withAlpha ? 32 : 24, width * (3 + (withAlpha ? 1 : 0)));
}
/// <summary>
@@ -473,7 +473,7 @@
{
byte[] buf = GetBitmapData(grid, width, height, palette, translucentIndex, transparentIndex);
- return CreateSurfaceFromRGBAData(buf, width, height, 32, width * 4);
+ return CreateSurfaceFromRgbaData(buf, width, height, 32, width * 4);
}
/// <summary>
@@ -506,7 +506,7 @@
{
Pcx pcx = new Pcx();
pcx.ReadFromStream(stream, translucentIndex, transparentIndex);
- return CreateSurfaceFromRGBAData(pcx.RgbaData, pcx.Width, pcx.Height, pcx.Depth, pcx.Stride);
+ return CreateSurfaceFromRgbaData(pcx.RgbaData, pcx.Width, pcx.Height, pcx.Depth, pcx.Stride);
}
/// <summary>
Modified: trunk/scsharp/src/SCSharpLib/UI/HelpDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/HelpDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/HelpDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -92,6 +92,6 @@
/// <summary>
///
/// </summary>
- public event DialogEvent Previous;
+ public event DialogEventHandler Previous;
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/KeystrokeDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/KeystrokeDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/KeystrokeDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -90,6 +90,6 @@
/// <summary>
///
/// </summary>
- public event DialogEvent Ok;
+ public event DialogEventHandler Ok;
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/ListBoxElement.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/ListBoxElement.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/ListBoxElement.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -326,12 +326,12 @@
/// <summary>
///
/// </summary>
- public event ListBoxSelectionChanged SelectionChanged;
+ public event ListBoxSelectionChangedEventHandler SelectionChanged;
}
/// <summary>
///
/// </summary>
/// <param name="selectedIndex"></param>
- public delegate void ListBoxSelectionChanged(int selectedIndex);
+ public delegate void ListBoxSelectionChangedEventHandler(int selectedIndex);
}
Modified: trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/MainMenu.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -151,7 +151,7 @@
Elements[EXIT_ELEMENT_INDEX].Activate +=
delegate()
{
- Game.Instance.Quit();
+ Game.Quit();
};
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/MapRenderer.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/MapRenderer.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/MapRenderer.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -53,7 +53,7 @@
byte[] bitmap = RenderToBitmap(mpq, chk, out pixel_width, out pixel_height);
- return GuiUtil.CreateSurfaceFromRGBAData(bitmap, pixel_width, pixel_height, 32, pixel_width * 4);
+ return GuiUtil.CreateSurfaceFromRgbaData(bitmap, pixel_width, pixel_height, 32, pixel_width * 4);
}
/// <summary>
Modified: trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/NetworkDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -91,11 +91,11 @@
/// <summary>
///
/// </summary>
- public event DialogEvent Ok;
+ public event DialogEventHandler Ok;
/// <summary>
///
/// </summary>
- public event DialogEvent Cancel;
+ public event DialogEventHandler Cancel;
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/ObjectivesDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/ObjectivesDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/ObjectivesDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -80,6 +80,6 @@
/// <summary>
///
/// </summary>
- public event DialogEvent Previous;
+ public event DialogEventHandler Previous;
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/OkCancelDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/OkCancelDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/OkCancelDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -89,11 +89,11 @@
/// <summary>
///
/// </summary>
- public event DialogEvent Ok;
+ public event DialogEventHandler Ok;
/// <summary>
///
/// </summary>
- public event DialogEvent Cancel;
+ public event DialogEventHandler Cancel;
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/OkDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/OkDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/OkDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -83,6 +83,6 @@
/// <summary>
///
/// </summary>
- public event DialogEvent Ok;
+ public event DialogEventHandler Ok;
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/OptionsDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/OptionsDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/OptionsDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -124,6 +124,6 @@
/// <summary>
///
/// </summary>
- public event DialogEvent Previous;
+ public event DialogEventHandler Previous;
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/PlayCustomScreen.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -91,7 +91,7 @@
ListBoxElement file_listbox;
ComboBoxElement gametype_combo;
- void InitializeRaceCombo(ComboBoxElement combo)
+ static void InitializeRaceCombo(ComboBoxElement combo)
{
combo.AddItem("Zerg"); /* XXX these should all come from some string constant table someplace */
combo.AddItem("Terran");
@@ -99,7 +99,7 @@
combo.AddItem("Random", true);
}
- void InitializePlayerCombo(ComboBoxElement combo)
+ static void InitializePlayerCombo(ComboBoxElement combo)
{
combo.AddItem(GlobalResources.Instance.GluAllTbl.Strings[130]); /* Closed */
combo.AddItem(GlobalResources.Instance.GluAllTbl.Strings[128], true); /* Computer */
Modified: trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/QuitMissionDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -86,6 +86,6 @@
/// <summary>
///
/// </summary>
- public event DialogEvent Cancel;
+ public event DialogEventHandler Cancel;
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/RestartConfirmationDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/RestartConfirmationDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/RestartConfirmationDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -78,6 +78,6 @@
/// <summary>
///
/// </summary>
- public event DialogEvent Cancel;
+ public event DialogEventHandler Cancel;
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/SmackerPlayer.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/SmackerPlayer.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/SmackerPlayer.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -62,15 +62,15 @@
/// <summary>
///
/// </summary>
- /// <param name="filename"></param>
+ /// <param name="fileName"></param>
/// <param name="smkStream"></param>
/// <param name="width"></param>
/// <param name="height"></param>
- public SmackerPlayer(string filename,
+ public SmackerPlayer(string fileName,
Stream smkStream,
int width, int height)
{
- this.filename = filename;
+ this.filename = fileName;
this.width = width;
this.height = height;
@@ -204,7 +204,7 @@
}
finally
{
- Events.PushUserEvent(new UserEventArgs(new ReadyDelegate(EmitFinished)));
+ Events.PushUserEvent(new UserEventArgs(new ReadyEventHandler(EmitFinished)));
}
}
@@ -212,7 +212,7 @@
/// <summary>
///
/// </summary>
- public event PlayerEvent Finished;
+ public event PlayerEventHandler Finished;
void EmitFinished()
{
@@ -226,5 +226,5 @@
/// <summary>
///
/// </summary>
- public delegate void PlayerEvent();
+ public delegate void PlayerEventHandler();
}
Modified: trunk/scsharp/src/SCSharpLib/UI/SoundDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/SoundDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/SoundDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -91,11 +91,11 @@
/// <summary>
///
/// </summary>
- public event DialogEvent Ok;
+ public event DialogEventHandler Ok;
/// <summary>
///
/// </summary>
- public event DialogEvent Cancel;
+ public event DialogEventHandler Cancel;
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/SpeedDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -91,11 +91,11 @@
/// <summary>
///
/// </summary>
- public event DialogEvent Ok;
+ public event DialogEventHandler Ok;
/// <summary>
///
/// </summary>
- public event DialogEvent Cancel;
+ public event DialogEventHandler Cancel;
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/Sprite.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/Sprite.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/Sprite.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -713,7 +713,7 @@
/// <summary>
///
/// </summary>
- LiftOff,
+ Liftoff,
/// <summary>
///
/// </summary>
Modified: trunk/scsharp/src/SCSharpLib/UI/TitleScreen.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/TitleScreen.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/TitleScreen.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -60,7 +60,7 @@
base.ResourceLoader();
Cursor = null; /* clear out the cursor */
- Elements[1].Text = "Copyright © 2006 Chris Toshok. All rights reserved.";
+ Elements[1].Text = "Copyright © 2006-2007 Chris Toshok, David Hudson. All rights reserved.";
Elements[2].Text = "Game assets Copyright © 1998 Blizzard Entertainment. All rights reserved.";
Elements[3].Text = "";
Modified: trunk/scsharp/src/SCSharpLib/UI/UIDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/UIDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/UIDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -226,5 +226,5 @@
///
/// </summary>
//public delegate void DialogEvent(object sender, EventArgs args);
- public delegate void DialogEvent();
+ public delegate void DialogEventHandler();
}
Modified: trunk/scsharp/src/SCSharpLib/UI/UIElement.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/UIElement.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/UIElement.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -270,7 +270,7 @@
/// <summary>
///
/// </summary>
- public event ElementEvent Activate;
+ public event ElementEventHandler Activate;
/// <summary>
///
@@ -286,7 +286,7 @@
/// <summary>
///
/// </summary>
- public event ElementEvent MouseEnterEvent;
+ public event ElementEventHandler MouseEnterEvent;
/// <summary>
///
@@ -300,7 +300,7 @@
/// <summary>
///
/// </summary>
- public event ElementEvent MouseLeaveEvent;
+ public event ElementEventHandler MouseLeaveEvent;
/// <summary>
///
@@ -436,5 +436,5 @@
/// <summary>
///
/// </summary>
- public delegate void ElementEvent();
+ public delegate void ElementEventHandler();
}
Modified: trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/UIScreen.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -294,12 +294,12 @@
try
{
Console.WriteLine("swooshing in");
- Events.PushUserEvent(new UserEventArgs(new ReadyDelegate(RaiseDoneSwooshing)));
+ Events.PushUserEvent(new UserEventArgs(new ReadyEventHandler(RaiseDoneSwooshing)));
}
catch (SdlException e)
{
Console.WriteLine("failed pushing UIScreen.RiseDoneSwooshing: {0}", e);
- Events.PushUserEvent(new UserEventArgs(new ReadyDelegate(Events.QuitApplication)));
+ Events.PushUserEvent(new UserEventArgs(new ReadyEventHandler(Events.QuitApplication)));
}
}
@@ -311,12 +311,12 @@
try
{
Console.WriteLine("swooshing out");
- Events.PushUserEvent(new UserEventArgs(new ReadyDelegate(RaiseDoneSwooshing)));
+ Events.PushUserEvent(new UserEventArgs(new ReadyEventHandler(RaiseDoneSwooshing)));
}
catch (SdlException e)
{
Console.WriteLine("failed pushing UIScreen.RiseDoneSwooshing: {0}", e);
- Events.PushUserEvent(new UserEventArgs(new ReadyDelegate(Events.QuitApplication)));
+ Events.PushUserEvent(new UserEventArgs(new ReadyEventHandler(Events.QuitApplication)));
}
}
@@ -690,17 +690,17 @@
/// <summary>
///
/// </summary>
- public event ReadyDelegate FirstPainted;
+ public event ReadyEventHandler FirstPainted;
/// <summary>
///
/// </summary>
- public event ReadyDelegate DoneSwooshing;
+ public event ReadyEventHandler DoneSwooshing;
/// <summary>
///
/// </summary>
- public event ReadyDelegate Ready;
+ public event ReadyEventHandler Ready;
bool loaded;
@@ -790,7 +790,7 @@
if (arrowgrp != null)
{
cursor = new CursorAnimator(arrowgrp, effectpal.Palette);
- cursor.SetHotSpot(64, 64);
+ cursor.SetHotspot(64, 64);
}
}
}
@@ -868,7 +868,7 @@
void LoadResources()
{
ResourceLoader();
- Events.PushUserEvent(new UserEventArgs(new ReadyDelegate(FinishedLoading)));
+ Events.PushUserEvent(new UserEventArgs(new ReadyEventHandler(FinishedLoading)));
}
/// <summary>
@@ -878,14 +878,14 @@
{
if (loaded)
{
- Events.PushUserEvent(new UserEventArgs(new ReadyDelegate(RaiseReadyEvent)));
+ Events.PushUserEvent(new UserEventArgs(new ReadyEventHandler(RaiseReadyEvent)));
}
else
{
#if MULTI_THREADED
ThreadPool.QueueUserWorkItem (delegate (object state) { LoadResources (); })
#else
- Events.PushUserEvent(new UserEventArgs(new ReadyDelegate(LoadResources)));
+ Events.PushUserEvent(new UserEventArgs(new ReadyEventHandler(LoadResources)));
#endif
}
}
Modified: trunk/scsharp/src/SCSharpLib/UI/VideoDialog.cs
===================================================================
--- trunk/scsharp/src/SCSharpLib/UI/VideoDialog.cs 2007-05-21 06:21:34 UTC (rev 1384)
+++ trunk/scsharp/src/SCSharpLib/UI/VideoDialog.cs 2007-05-21 06:53:22 UTC (rev 1385)
@@ -91,11 +91,11 @@
/// <summary>
///
/// </summary>
- public event DialogEvent Ok;
+ public event DialogEventHandler Ok;
/// <summary>
///
/// </summary>
- public event DialogEvent Cancel;
+ public event DialogEventHandler Cancel;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|