Thread: [Agate-svn-commit] SF.net SVN: agate:[1162] trunk (Page 2)
Status: Alpha
Brought to you by:
kanato
|
From: <ka...@us...> - 2009-12-25 05:22:29
|
Revision: 1162
http://agate.svn.sourceforge.net/agate/?rev=1162&view=rev
Author: kanato
Date: 2009-12-25 05:22:19 +0000 (Fri, 25 Dec 2009)
Log Message:
-----------
Update paths for output in release configurations.
Add SoundFormat enum.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/AudioLib/SoundBuffer.cs
trunk/AgateLib/AudioLib/SoundBufferSession.cs
trunk/AgateLib/Drivers/NullSoundImpl.cs
trunk/AgateLib/ImplementationBase/AudioImpl.cs
trunk/Drivers/AgateDrawing/AgateDrawing.csproj
trunk/Drivers/AgateFMOD/FMOD_SoundBufferSession.cs
trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj
trunk/Drivers/AgateOTK/AgateOTK.csproj
trunk/Drivers/AgateSDL/AgateSDL.csproj
trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs
trunk/Drivers/AgateSDL/Audio/SDL_SoundBuffer.cs
trunk/Drivers/AgateSDL/Audio/SDL_SoundBufferSession.cs
trunk/Drivers/AgateSDX/AgateSDX.csproj
trunk/Drivers/AgateSDX/FrameBufferWindow.cs
trunk/Drivers/AgateSDX/SDX_Audio.cs
trunk/Tests/AudioTests/GenerateAudio.cs
trunk/Tests/Tests.csproj
Added Paths:
-----------
trunk/AgateLib/AudioLib/SoundFormat.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/AgateLib/AgateLib.csproj 2009-12-25 05:22:19 UTC (rev 1162)
@@ -56,7 +56,7 @@
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
- <OutputPath>..\Binaries\Release\AgateLib\</OutputPath>
+ <OutputPath>..\Binaries\Release\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -132,6 +132,7 @@
<Compile Include="AppInitParameters.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="AudioLib\SoundFormat.cs" />
<Compile Include="Core.cs">
<SubType>Code</SubType>
</Compile>
Modified: trunk/AgateLib/AudioLib/SoundBuffer.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundBuffer.cs 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/AgateLib/AudioLib/SoundBuffer.cs 2009-12-25 05:22:19 UTC (rev 1162)
@@ -92,19 +92,14 @@
}
/// <summary>
- /// Creates an empty SoundBuffer object.
+ /// Constructs a SoundBuffer object, loading audio data from the passed stream.
/// </summary>
- /// <param name="size">The number of samples in this sound buffer.</param>
- /// <param name="stereo"></param>
- public SoundBuffer(int size)
+ /// <param name="source"></param>
+ public SoundBuffer(Stream source, SoundFormat format)
{
- impl = Audio.Impl.CreateSoundBuffer(size);
+ impl = Audio.Impl.CreateSoundBuffer(source, format);
}
- public SoundBuffer(short[] data)
- {
- impl = Audio.Impl.CreateSoundBuffer(data);
- }
/// <summary>
/// Disposes of the SoundBuffer object, and all SoundBufferSession objects
/// created by this SoundBuffer.
@@ -275,11 +270,6 @@
mSessions.Remove(session);
}
-
- public void Write(short[] source, int srcIndex, int destIndex, int length)
- {
- impl.Write(source, srcIndex, destIndex, length);
- }
}
}
Modified: trunk/AgateLib/AudioLib/SoundBufferSession.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundBufferSession.cs 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/AgateLib/AudioLib/SoundBufferSession.cs 2009-12-25 05:22:19 UTC (rev 1162)
@@ -57,6 +57,8 @@
{
Volume = mSource.Volume;
Pan = mSource.Pan;
+
+ impl.Initialize();
}
/// <summary>
@@ -125,6 +127,12 @@
get { return impl.Pan; }
set { impl.Pan = value; }
}
+
+ public int CurrentLocation
+ {
+ get { return impl.CurrentLocation; }
+ }
+
/// <summary>
/// Returns true if this Session is playing.
/// </summary>
Added: trunk/AgateLib/AudioLib/SoundFormat.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundFormat.cs (rev 0)
+++ trunk/AgateLib/AudioLib/SoundFormat.cs 2009-12-25 05:22:19 UTC (rev 1162)
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.AudioLib
+{
+ public enum SoundFormat
+ {
+ Raw16,
+ Wave,
+ }
+}
Modified: trunk/AgateLib/Drivers/NullSoundImpl.cs
===================================================================
--- trunk/AgateLib/Drivers/NullSoundImpl.cs 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/AgateLib/Drivers/NullSoundImpl.cs 2009-12-25 05:22:19 UTC (rev 1162)
@@ -83,6 +83,15 @@
{
get { return false; }
}
+
+ public override int CurrentLocation
+ {
+ get { return 0; }
+ }
+
+ protected internal override void Initialize()
+ {
+ }
}
public class NullMusicImpl : MusicImpl
{
Modified: trunk/AgateLib/ImplementationBase/AudioImpl.cs
===================================================================
--- trunk/AgateLib/ImplementationBase/AudioImpl.cs 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/AgateLib/ImplementationBase/AudioImpl.cs 2009-12-25 05:22:19 UTC (rev 1162)
@@ -73,6 +73,16 @@
public abstract SoundBufferImpl CreateSoundBuffer(Stream inStream);
/// <summary>
+ /// Creates a SoundBufferImpl object.
+ /// </summary>
+ /// <param name="inStream"></param>
+ /// <returns></returns>
+ public virtual SoundBufferImpl CreateSoundBuffer(Stream inStream, AudioLib.SoundFormat format)
+ {
+ throw new NotImplementedException();
+ }
+
+ /// <summary>
/// This function is called once a frame to allow the Audio driver to update
/// information. There is no need to call base.Update() if overriding this
/// function.
@@ -81,15 +91,6 @@
{
}
- public virtual SoundBufferImpl CreateSoundBuffer(int size)
- {
- throw new NotImplementedException();
- }
-
- public virtual SoundBufferImpl CreateSoundBuffer(short[] data)
- {
- throw new NotImplementedException();
- }
}
/// <summary>
@@ -112,12 +113,6 @@
public virtual bool Loop { get { return false; } set { } }
- public virtual void Write(short[] source, int srcIndex, int destIndex, int length)
- {
- throw new NotImplementedException();
- }
-
-
}
/// <summary>
/// Represents a playback instance.
@@ -139,13 +134,8 @@
/// </summary>
public abstract void Stop();
+ public abstract int CurrentLocation { get; }
- public virtual int BufferPointer
- {
- get { return -1; }
- set { }
- }
-
/// <summary>
/// Gets or sets the volume this audio file is playing at.
/// 0.0 is completely quiet.
@@ -164,6 +154,11 @@
/// Gets whether or not this playback instance is actually playing.
/// </summary>
public abstract bool IsPlaying { get; }
+
+ /// <summary>
+ /// Initializes the SoundBufferSession to begin playing.
+ /// </summary>
+ protected internal abstract void Initialize();
}
/// <summary>
Modified: trunk/Drivers/AgateDrawing/AgateDrawing.csproj
===================================================================
--- trunk/Drivers/AgateDrawing/AgateDrawing.csproj 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/Drivers/AgateDrawing/AgateDrawing.csproj 2009-12-25 05:22:19 UTC (rev 1162)
@@ -57,7 +57,7 @@
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
- <OutputPath>..\..\Binaries\Release\Drivers\</OutputPath>
+ <OutputPath>..\..\Binaries\Release\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
Modified: trunk/Drivers/AgateFMOD/FMOD_SoundBufferSession.cs
===================================================================
--- trunk/Drivers/AgateFMOD/FMOD_SoundBufferSession.cs 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/Drivers/AgateFMOD/FMOD_SoundBufferSession.cs 2009-12-25 05:22:19 UTC (rev 1162)
@@ -44,12 +44,13 @@
mSystem = mAudio.FMODSystem;
mSound = mBuffer.FMODSound;
- //CheckCreateChannel();
- CreateChannel();
-
Volume = mBuffer.Volume;
}
+ protected override void Initialize()
+ {
+ CreateChannel();
+ }
private void CheckFMODResult(FMOD.RESULT result)
{
if (result == FMOD.RESULT.ERR_INVALID_HANDLE)
@@ -141,5 +142,17 @@
return mAudio.IsChannelPlaying(mChannel);
}
}
+
+ public override int CurrentLocation
+ {
+ get
+ {
+ uint pos = 0;
+
+ mChannel.getPosition(ref pos, FMOD.TIMEUNIT.PCMBYTES);
+
+ return (int)pos / 2;
+ }
+ }
}
}
Modified: trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj
===================================================================
--- trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj 2009-12-25 05:22:19 UTC (rev 1162)
@@ -56,7 +56,7 @@
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
- <OutputPath>..\..\Binaries\Release\AgateLib\</OutputPath>
+ <OutputPath>..\..\Binaries\Release\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
Modified: trunk/Drivers/AgateOTK/AgateOTK.csproj
===================================================================
--- trunk/Drivers/AgateOTK/AgateOTK.csproj 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/Drivers/AgateOTK/AgateOTK.csproj 2009-12-25 05:22:19 UTC (rev 1162)
@@ -57,7 +57,7 @@
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
- <OutputPath>..\..\Binaries\Release\Drivers\</OutputPath>
+ <OutputPath>..\..\Binaries\Release\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
Modified: trunk/Drivers/AgateSDL/AgateSDL.csproj
===================================================================
--- trunk/Drivers/AgateSDL/AgateSDL.csproj 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/Drivers/AgateSDL/AgateSDL.csproj 2009-12-25 05:22:19 UTC (rev 1162)
@@ -57,7 +57,7 @@
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
- <OutputPath>..\..\Binaries\Release\Drivers\</OutputPath>
+ <OutputPath>..\..\Binaries\Release\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
Modified: trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs
===================================================================
--- trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs 2009-12-25 05:22:19 UTC (rev 1162)
@@ -76,14 +76,6 @@
{
return new SDL_SoundBuffer(inStream);
}
- public override SoundBufferImpl CreateSoundBuffer(int size)
- {
- return new SDL_SoundBuffer(size);
- }
- public override SoundBufferImpl CreateSoundBuffer(short[] data)
- {
- return new SDL_SoundBuffer(data);
- }
public override SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferImpl buffer)
{
return new SDL_SoundBufferSession((SDL_SoundBuffer)buffer);
Modified: trunk/Drivers/AgateSDL/Audio/SDL_SoundBuffer.cs
===================================================================
--- trunk/Drivers/AgateSDL/Audio/SDL_SoundBuffer.cs 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/Drivers/AgateSDL/Audio/SDL_SoundBuffer.cs 2009-12-25 05:22:19 UTC (rev 1162)
@@ -36,6 +36,7 @@
double mVolume = 1.0;
bool ownRam = false;
IntPtr soundPtr;
+ int samplesPerSec = 22050;
public SDL_SoundBuffer(Stream stream)
{
@@ -50,42 +51,16 @@
{
LoadFromFile(filename);
}
- public SDL_SoundBuffer(int size)
- {
- int bytes = size * 2;
- soundPtr = Marshal.AllocHGlobal(bytes);
- ownRam = true;
- sound = SdlMixer.Mix_QuickLoad_RAW(soundPtr, bytes);
- }
- public SDL_SoundBuffer(short[] data)
- {
- int bytes = data.Length * 2;
- soundPtr = Marshal.AllocHGlobal(bytes);
- ownRam = true;
- Marshal.Copy(data, 0, soundPtr, data.Length);
-
- sound = SdlMixer.Mix_QuickLoad_RAW(soundPtr, bytes);
- }
-
- public override void Write(short[] source, int srcIndex, int destIndex, int length)
+ ~SDL_SoundBuffer()
{
- if (soundPtr == IntPtr.Zero)
- throw new AgateException("Cannot write to audio buffer loaded from a file.");
-
- SdlMixer.Mix_Chunk c =
- (SdlMixer.Mix_Chunk)Marshal.PtrToStructure(sound, typeof(SdlMixer.Mix_Chunk));
-
- unsafe
- {
- Marshal.Copy(source, srcIndex, (IntPtr)(((short*)c.abuf + destIndex)), length);
- }
+ Dispose(false);
}
- ~SDL_SoundBuffer()
+ public int SamplePerSec
{
- Dispose(false);
+ get { return samplesPerSec; }
}
public override void Dispose()
Modified: trunk/Drivers/AgateSDL/Audio/SDL_SoundBufferSession.cs
===================================================================
--- trunk/Drivers/AgateSDL/Audio/SDL_SoundBufferSession.cs 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/Drivers/AgateSDL/Audio/SDL_SoundBufferSession.cs 2009-12-25 05:22:19 UTC (rev 1162)
@@ -18,6 +18,7 @@
//
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
@@ -35,21 +36,32 @@
double volume;
double pan;
bool loop;
+ Stopwatch watch = new Stopwatch();
+ SDL_SoundBuffer buffer;
public SDL_SoundBufferSession(SDL_SoundBuffer buffer)
{
+ this.buffer = buffer;
loop = buffer.Loop;
sound = buffer.SoundChunk;
channel = SdlMixer.Mix_PlayChannel(-1, sound, LoopCount);
volume = buffer.Volume;
+ watch.Reset();
+ watch.Start();
+
}
public override void Dispose()
{
Stop();
}
+ protected override void Initialize()
+ {
+
+ }
+
public override bool IsPlaying
{
get { return SdlMixer.Mix_Playing(channel) != 0; }
@@ -68,6 +80,14 @@
}
}
+ public override int CurrentLocation
+ {
+ get
+ {
+ return (int)(watch.ElapsedMilliseconds / 1000.0 * buffer.SamplePerSec);
+ }
+ }
+
private void SetPanning()
{
byte leftVol = (byte)(pan <= 0 ? 255 : (int)((1.0 - pan) * 255));
@@ -80,6 +100,9 @@
{
SdlMixer.Mix_PlayChannel(channel, sound, LoopCount);
SetPanning();
+
+ watch.Reset();
+ watch.Start();
}
int LoopCount
@@ -97,6 +120,8 @@
public override void Stop()
{
SdlMixer.Mix_Pause(channel);
+
+ watch.Stop();
}
public override double Volume
Modified: trunk/Drivers/AgateSDX/AgateSDX.csproj
===================================================================
--- trunk/Drivers/AgateSDX/AgateSDX.csproj 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/Drivers/AgateSDX/AgateSDX.csproj 2009-12-25 05:22:19 UTC (rev 1162)
@@ -37,7 +37,7 @@
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
- <OutputPath>..\..\Binaries\Debug\Drivers\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -57,7 +57,7 @@
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
- <OutputPath>..\..\Binaries\Release\Drivers\</OutputPath>
+ <OutputPath>..\..\Binaries\Release\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
Modified: trunk/Drivers/AgateSDX/FrameBufferWindow.cs
===================================================================
--- trunk/Drivers/AgateSDX/FrameBufferWindow.cs 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/Drivers/AgateSDX/FrameBufferWindow.cs 2009-12-25 05:22:19 UTC (rev 1162)
@@ -31,8 +31,8 @@
public override void Dispose()
{
mSwap.Dispose();
- mBackBuffer.Dispose();
- mBackDepthStencil.Dispose();
+ //mBackBuffer.Dispose();
+ //mBackDepthStencil.Dispose();
}
public override Size Size
Modified: trunk/Drivers/AgateSDX/SDX_Audio.cs
===================================================================
--- trunk/Drivers/AgateSDX/SDX_Audio.cs 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/Drivers/AgateSDX/SDX_Audio.cs 2009-12-25 05:22:19 UTC (rev 1162)
@@ -59,6 +59,11 @@
{
return new SDX_SoundBuffer(this, inStream);
}
+ public override SoundBufferImpl CreateSoundBuffer(Stream inStream, SoundFormat format)
+ {
+ return new SDX_SoundBuffer(this, inStream, format);
+ }
+
public override MusicImpl CreateMusic(System.IO.Stream musicStream)
{
CheckCoop();
@@ -105,6 +110,8 @@
AudioBuffer mBuffer;
double mVolume;
WaveFormat mFormat;
+ MemoryStream mem;
+ byte[] buffer;
public SDX_SoundBuffer(SDX_Audio audio, Stream inStream)
{
@@ -118,13 +125,51 @@
mBuffer.Flags = BufferFlags.EndOfStream;
mFormat = stream.Format;
+ }
+ public SDX_SoundBuffer(SDX_Audio audio, Stream inStream, SoundFormat format)
+ {
+ mAudio = audio;
+
+ switch (format)
+ {
+ case SoundFormat.Wave:
+ WaveStream stream = new WaveStream(inStream);
+
+ mBuffer = new AudioBuffer();
+ mBuffer.AudioData = stream;
+ mBuffer.AudioBytes = (int)inStream.Length;
+ mBuffer.Flags = BufferFlags.EndOfStream;
+
+ mFormat = stream.Format;
+ break;
+
+ case SoundFormat.Raw16:
+ mBuffer = new AudioBuffer();
+ mBuffer.AudioData = inStream;
+ mBuffer.AudioBytes = (int)inStream.Length;
+ mBuffer.Flags = BufferFlags.EndOfStream;
+
+ mFormat = new WaveFormat();
+ mFormat.BitsPerSample = 16;
+ mFormat.BlockAlignment = 2;
+ mFormat.Channels = 1;
+ mFormat.FormatTag = SlimDX.WaveFormatTag.Pcm;
+ mFormat.SamplesPerSecond = 44100;
+ mFormat.AverageBytesPerSecond =
+ mFormat.SamplesPerSecond * mFormat.BitsPerSample / 8;
+
+ break;
+ }
}
public SDX_SoundBuffer(SDX_Audio audio, string filename)
: this(audio, File.OpenRead(filename))
{
}
+
+ public override bool Loop { get; set; }
+
public override void Dispose()
{
mBuffer.Dispose();
@@ -147,6 +192,7 @@
}
public class SDX_SoundBufferSession : SoundBufferSessionImpl
{
+ SDX_SoundBuffer mSource;
SDX_Audio mAudio;
AudioBuffer mBuffer;
SourceVoice mVoice;
@@ -156,19 +202,36 @@
public SDX_SoundBufferSession(SDX_Audio audio, SDX_SoundBuffer source)
{
mAudio = audio;
+ mSource = source;
mBuffer = source.Buffer;
+ mVolume = source.Volume;
- mVoice = new SourceVoice(mAudio.Device, source.Format);
- mVoice.SubmitSourceBuffer(mBuffer);
- mVoice.Start();
-
- mVolume = source.Volume;
+ Initialize();
}
public override void Dispose()
{
mVoice.Dispose();
}
+ protected override void Initialize()
+ {
+ if (mVoice != null)
+ {
+ mVoice.Stop();
+ mVoice.Dispose();
+ }
+
+ mVoice = new SourceVoice(mAudio.Device, mSource.Format);
+ mVoice.SubmitSourceBuffer(mBuffer);
+ }
+
+ public override int CurrentLocation
+ {
+ get
+ {
+ return mVoice.State.SamplesPlayed;
+ }
+ }
public override void Play()
{
mVoice.Start();
Modified: trunk/Tests/AudioTests/GenerateAudio.cs
===================================================================
--- trunk/Tests/AudioTests/GenerateAudio.cs 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/Tests/AudioTests/GenerateAudio.cs 2009-12-25 05:22:19 UTC (rev 1162)
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
+using System.IO;
using System.Linq;
using System.Text;
using AgateLib;
@@ -37,9 +38,13 @@
int frequency = 100;
FillSoundBuffer(s, frequency);
+
+ byte[] buffer = new byte[s.Length * 2];
+ Buffer.BlockCopy(s, 0, buffer, 0, buffer.Length);
+
+ MemoryStream ms = new MemoryStream(buffer);
+ SoundBuffer buf = new SoundBuffer(ms, SoundFormat.Raw16);
- SoundBuffer buf = new SoundBuffer(s);
-
buf.Loop = true;
SoundBufferSession ses = buf.Play();
@@ -62,8 +67,10 @@
{
frequency += 50;
FillSoundBuffer(s, frequency);
- buf.Write(s, 0, 0, s.Length);
+ Buffer.BlockCopy(s, 0, buffer, 0, buffer.Length);
+ ms.Seek(0, SeekOrigin.Begin);
+ buf.Play();
w.Reset();
w.Start();
}
Modified: trunk/Tests/Tests.csproj
===================================================================
--- trunk/Tests/Tests.csproj 2009-12-25 01:25:18 UTC (rev 1161)
+++ trunk/Tests/Tests.csproj 2009-12-25 05:22:19 UTC (rev 1162)
@@ -56,7 +56,7 @@
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
- <OutputPath>..\Binaries\Release\Tests\</OutputPath>
+ <OutputPath>..\Binaries\Release\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2009-12-25 07:42:25
|
Revision: 1163
http://agate.svn.sourceforge.net/agate/?rev=1163&view=rev
Author: kanato
Date: 2009-12-25 07:42:17 +0000 (Fri, 25 Dec 2009)
Log Message:
-----------
Improvements to SDX audio.
Modified Paths:
--------------
trunk/AgateLib/AudioLib/SoundBufferSession.cs
trunk/AgateLib/AudioLib/SoundFormat.cs
trunk/AgateLib-Windows.sln
trunk/Drivers/AgateSDX/AgateSDX.csproj
trunk/Drivers/AgateSDX/Reporter.cs
trunk/Drivers/AgateSDX/SDX_Input.cs
trunk/Tests/AudioTests/GenerateAudio.cs
Added Paths:
-----------
trunk/Drivers/AgateSDX/XAud2/
trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs
Removed Paths:
-------------
trunk/Drivers/AgateSDX/SDX_Audio.cs
Modified: trunk/AgateLib/AudioLib/SoundBufferSession.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundBufferSession.cs 2009-12-25 05:22:19 UTC (rev 1162)
+++ trunk/AgateLib/AudioLib/SoundBufferSession.cs 2009-12-25 07:42:17 UTC (rev 1163)
@@ -55,10 +55,10 @@
internal void Initialize()
{
+ impl.Initialize();
+
Volume = mSource.Volume;
Pan = mSource.Pan;
-
- impl.Initialize();
}
/// <summary>
Modified: trunk/AgateLib/AudioLib/SoundFormat.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundFormat.cs 2009-12-25 05:22:19 UTC (rev 1162)
+++ trunk/AgateLib/AudioLib/SoundFormat.cs 2009-12-25 07:42:17 UTC (rev 1163)
@@ -5,9 +5,18 @@
namespace AgateLib.AudioLib
{
+ /// <summary>
+ /// Enum describing what format the audio data is in.
+ /// </summary>
public enum SoundFormat
{
- Raw16,
+ /// <summary>
+ /// Raw 16 bit signed PCM data.
+ /// </summary>
+ RawInt16,
+ /// <summary>
+ /// Wav format.
+ /// </summary>
Wave,
}
}
Modified: trunk/AgateLib-Windows.sln
===================================================================
--- trunk/AgateLib-Windows.sln 2009-12-25 05:22:19 UTC (rev 1162)
+++ trunk/AgateLib-Windows.sln 2009-12-25 07:42:17 UTC (rev 1163)
@@ -23,44 +23,149 @@
TODO.txt = TODO.txt
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SlimDX", "..\..\slimdx-read-only\build\SlimDX.vcproj", "{8ECCE443-0440-40F4-A94C-F02E027282C3}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|Mixed Platforms = Debug|Mixed Platforms
+ Debug|Win32 = Debug|Win32
+ Public|Any CPU = Public|Any CPU
+ Public|Mixed Platforms = Public|Mixed Platforms
+ Public|Win32 = Public|Win32
Release|Any CPU = Release|Any CPU
+ Release|Mixed Platforms = Release|Mixed Platforms
+ Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Win32.ActiveCfg = Debug|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|Any CPU.ActiveCfg = Release|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|Mixed Platforms.ActiveCfg = Release|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|Mixed Platforms.Build.0 = Release|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|Win32.ActiveCfg = Release|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Mixed Platforms.Build.0 = Release|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Win32.ActiveCfg = Release|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Win32.ActiveCfg = Debug|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|Any CPU.ActiveCfg = Release|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|Mixed Platforms.ActiveCfg = Release|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|Mixed Platforms.Build.0 = Release|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|Win32.ActiveCfg = Release|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Mixed Platforms.Build.0 = Release|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Win32.ActiveCfg = Release|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Win32.ActiveCfg = Debug|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Public|Any CPU.ActiveCfg = Release|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Public|Mixed Platforms.ActiveCfg = Release|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Public|Mixed Platforms.Build.0 = Release|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Public|Win32.ActiveCfg = Release|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Mixed Platforms.Build.0 = Release|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Win32.ActiveCfg = Release|x86
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Win32.ActiveCfg = Debug|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|Any CPU.ActiveCfg = Release|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|Mixed Platforms.ActiveCfg = Release|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|Mixed Platforms.Build.0 = Release|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|Win32.ActiveCfg = Release|x86
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Any CPU.ActiveCfg = Release|Any CPU
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Any CPU.Build.0 = Release|Any CPU
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Mixed Platforms.Build.0 = Release|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Win32.ActiveCfg = Release|x86
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|Any CPU.ActiveCfg = Release|Any CPU
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|Any CPU.Build.0 = Release|Any CPU
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|Mixed Platforms.Build.0 = Release|Any CPU
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|Win32.ActiveCfg = Release|Any CPU
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|Any CPU.Build.0 = Release|Any CPU
- {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|Win32.ActiveCfg = Release|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Win32.ActiveCfg = Debug|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|Any CPU.ActiveCfg = Release|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|Mixed Platforms.ActiveCfg = Release|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|Mixed Platforms.Build.0 = Release|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|Win32.ActiveCfg = Release|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Mixed Platforms.Build.0 = Release|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Win32.ActiveCfg = Release|x86
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|Win32.ActiveCfg = Debug|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Public|Any CPU.ActiveCfg = Release|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Public|Mixed Platforms.ActiveCfg = Release|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Public|Mixed Platforms.Build.0 = Release|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Public|Win32.ActiveCfg = Release|x86
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|Mixed Platforms.Build.0 = Release|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|Win32.ActiveCfg = Release|x86
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Win32.ActiveCfg = Debug|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|Any CPU.ActiveCfg = Release|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|Mixed Platforms.ActiveCfg = Release|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|Mixed Platforms.Build.0 = Release|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|Win32.ActiveCfg = Release|x86
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Mixed Platforms.Build.0 = Release|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Win32.ActiveCfg = Release|x86
+ {8ECCE443-0440-40F4-A94C-F02E027282C3}.Debug|Any CPU.ActiveCfg = Debug|Win32
+ {8ECCE443-0440-40F4-A94C-F02E027282C3}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {8ECCE443-0440-40F4-A94C-F02E027282C3}.Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {8ECCE443-0440-40F4-A94C-F02E027282C3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8ECCE443-0440-40F4-A94C-F02E027282C3}.Debug|Win32.Build.0 = Debug|Win32
+ {8ECCE443-0440-40F4-A94C-F02E027282C3}.Public|Any CPU.ActiveCfg = Public|Win32
+ {8ECCE443-0440-40F4-A94C-F02E027282C3}.Public|Mixed Platforms.ActiveCfg = Public|Win32
+ {8ECCE443-0440-40F4-A94C-F02E027282C3}.Public|Mixed Platforms.Build.0 = Public|Win32
+ {8ECCE443-0440-40F4-A94C-F02E027282C3}.Public|Win32.ActiveCfg = Public|Win32
+ {8ECCE443-0440-40F4-A94C-F02E027282C3}.Public|Win32.Build.0 = Public|Win32
+ {8ECCE443-0440-40F4-A94C-F02E027282C3}.Release|Any CPU.ActiveCfg = Release|Win32
+ {8ECCE443-0440-40F4-A94C-F02E027282C3}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {8ECCE443-0440-40F4-A94C-F02E027282C3}.Release|Mixed Platforms.Build.0 = Release|Win32
+ {8ECCE443-0440-40F4-A94C-F02E027282C3}.Release|Win32.ActiveCfg = Release|Win32
+ {8ECCE443-0440-40F4-A94C-F02E027282C3}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: trunk/Drivers/AgateSDX/AgateSDX.csproj
===================================================================
--- trunk/Drivers/AgateSDX/AgateSDX.csproj 2009-12-25 05:22:19 UTC (rev 1162)
+++ trunk/Drivers/AgateSDX/AgateSDX.csproj 2009-12-25 07:42:17 UTC (rev 1163)
@@ -66,9 +66,6 @@
</NoWarn>
</PropertyGroup>
<ItemGroup>
- <Reference Include="SlimDX">
- <Name>SlimDX</Name>
- </Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
@@ -117,7 +114,7 @@
<Compile Include="Reporter.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="SDX_Audio.cs">
+ <Compile Include="XAud2\XAudio2_Audio.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="SDX_Display.cs">
@@ -158,6 +155,10 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="..\..\..\..\slimdx-read-only\build\SlimDX.vcproj">
+ <Project>{8ECCE443-0440-40F4-A94C-F02E027282C3}</Project>
+ <Name>SlimDX</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
<Project>{9490B719-829E-43A7-A5FE-8001F8A81759}</Project>
<Name>AgateLib</Name>
Modified: trunk/Drivers/AgateSDX/Reporter.cs
===================================================================
--- trunk/Drivers/AgateSDX/Reporter.cs 2009-12-25 05:22:19 UTC (rev 1162)
+++ trunk/Drivers/AgateSDX/Reporter.cs 2009-12-25 07:42:17 UTC (rev 1163)
@@ -35,8 +35,8 @@
yield return new AgateDriverInfo(
AudioTypeID.XAudio2,
- typeof(SDX_Audio),
- "SlimDX - DirectSound",
+ typeof(XAud2.XAudio2_Audio),
+ "SlimDX - XAudio 2",
100);
yield return new AgateDriverInfo(
Deleted: trunk/Drivers/AgateSDX/SDX_Audio.cs
===================================================================
--- trunk/Drivers/AgateSDX/SDX_Audio.cs 2009-12-25 05:22:19 UTC (rev 1162)
+++ trunk/Drivers/AgateSDX/SDX_Audio.cs 2009-12-25 07:42:17 UTC (rev 1163)
@@ -1,497 +0,0 @@
-// The contents of this file are subject to the Mozilla Public License
-// Version 1.1 (the "License"); you may not use this file except in
-// compliance with the License. You may obtain a copy of the License at
-// http://www.mozilla.org/MPL/
-//
-// Software distributed under the License is distributed on an "AS IS"
-// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-// License for the specific language governing rights and limitations
-// under the License.
-//
-// The Original Code is AgateLib.
-//
-// The Initial Developer of the Original Code is Erik Ylvisaker.
-// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
-// All Rights Reserved.
-//
-// Contributor(s): Erik Ylvisaker
-//
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Text;
-using SlimDX.XAudio2;
-using SlimDX.Multimedia;
-using AgateLib.AudioLib;
-using AgateLib.Drivers;
-using AgateLib.ImplementationBase;
-
-namespace AgateSDX
-{
- public class SDX_Audio : AudioImpl
- {
- XAudio2 mDevice;
-
- public XAudio2 Device
- {
- get { return mDevice; }
- }
-
- public SDX_Audio()
- {
-
- }
-
- public override void Initialize()
- {
- Report("SlimDX XAudio2 driver instantiated for audio.");
-
- mDevice = new XAudio2();
- MasteringVoice masteringVoice = new MasteringVoice(mDevice);
-
- }
- public override void Dispose()
- {
- mDevice.Dispose();
- }
-
- public override SoundBufferImpl CreateSoundBuffer(Stream inStream)
- {
- return new SDX_SoundBuffer(this, inStream);
- }
- public override SoundBufferImpl CreateSoundBuffer(Stream inStream, SoundFormat format)
- {
- return new SDX_SoundBuffer(this, inStream, format);
- }
-
- public override MusicImpl CreateMusic(System.IO.Stream musicStream)
- {
- CheckCoop();
-
- return new SDX_Music(this, musicStream);
- }
- public override MusicImpl CreateMusic(string filename)
- {
- CheckCoop();
-
- return new SDX_Music(this, filename);
- }
- public override SoundBufferImpl CreateSoundBuffer(string filename)
- {
- CheckCoop();
-
- return new SDX_SoundBuffer(this, filename);
- }
- public override SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferImpl buffer)
- {
- CheckCoop();
-
- return new SDX_SoundBufferSession(this, buffer as SDX_SoundBuffer);
- }
-
-
- /// <summary>
- /// hack to make sure the cooperative level is set after a window is created.
- /// Is this necessary with XAudio2?
- /// </summary>
- private void CheckCoop()
- {
- if (System.Windows.Forms.Form.ActiveForm != null)
- {
- //mDSobject.SetCooperativeLevel(System.Windows.Forms.Form.ActiveForm.Handle,
- // CooperativeLevel.Priority);
- }
- }
- }
-
- public class SDX_SoundBuffer : SoundBufferImpl
- {
- SDX_Audio mAudio;
- AudioBuffer mBuffer;
- double mVolume;
- WaveFormat mFormat;
- MemoryStream mem;
- byte[] buffer;
-
- public SDX_SoundBuffer(SDX_Audio audio, Stream inStream)
- {
- mAudio = audio;
-
- WaveStream stream = new WaveStream(inStream);
-
- mBuffer = new AudioBuffer();
- mBuffer.AudioData = stream;
- mBuffer.AudioBytes = (int)inStream.Length;
- mBuffer.Flags = BufferFlags.EndOfStream;
-
- mFormat = stream.Format;
- }
-
- public SDX_SoundBuffer(SDX_Audio audio, Stream inStream, SoundFormat format)
- {
- mAudio = audio;
-
- switch (format)
- {
- case SoundFormat.Wave:
- WaveStream stream = new WaveStream(inStream);
-
- mBuffer = new AudioBuffer();
- mBuffer.AudioData = stream;
- mBuffer.AudioBytes = (int)inStream.Length;
- mBuffer.Flags = BufferFlags.EndOfStream;
-
- mFormat = stream.Format;
- break;
-
- case SoundFormat.Raw16:
- mBuffer = new AudioBuffer();
- mBuffer.AudioData = inStream;
- mBuffer.AudioBytes = (int)inStream.Length;
- mBuffer.Flags = BufferFlags.EndOfStream;
-
- mFormat = new WaveFormat();
- mFormat.BitsPerSample = 16;
- mFormat.BlockAlignment = 2;
- mFormat.Channels = 1;
- mFormat.FormatTag = SlimDX.WaveFormatTag.Pcm;
- mFormat.SamplesPerSecond = 44100;
- mFormat.AverageBytesPerSecond =
- mFormat.SamplesPerSecond * mFormat.BitsPerSample / 8;
-
- break;
- }
- }
- public SDX_SoundBuffer(SDX_Audio audio, string filename)
- : this(audio, File.OpenRead(filename))
- {
-
- }
-
- public override bool Loop { get; set; }
-
- public override void Dispose()
- {
- mBuffer.Dispose();
- }
-
- public AudioBuffer Buffer
- {
- get { return mBuffer; }
- }
- public WaveFormat Format
- {
- get { return mFormat; }
- }
-
- public override double Volume
- {
- get { return mVolume; }
- set { mVolume = value; }
- }
- }
- public class SDX_SoundBufferSession : SoundBufferSessionImpl
- {
- SDX_SoundBuffer mSource;
- SDX_Audio mAudio;
- AudioBuffer mBuffer;
- SourceVoice mVoice;
- double mVolume;
- double mPan;
-
- public SDX_SoundBufferSession(SDX_Audio audio, SDX_SoundBuffer source)
- {
- mAudio = audio;
- mSource = source;
- mBuffer = source.Buffer;
- mVolume = source.Volume;
-
- Initialize();
- }
- public override void Dispose()
- {
- mVoice.Dispose();
- }
-
- protected override void Initialize()
- {
- if (mVoice != null)
- {
- mVoice.Stop();
- mVoice.Dispose();
- }
-
- mVoice = new SourceVoice(mAudio.Device, mSource.Format);
- mVoice.SubmitSourceBuffer(mBuffer);
- }
-
- public override int CurrentLocation
- {
- get
- {
- return mVoice.State.SamplesPlayed;
- }
- }
- public override void Play()
- {
- mVoice.Start();
- }
-
- public override void Stop()
- {
- mVoice.Stop();
- }
-
- public override double Volume
- {
- get { return mVolume; }
- set
- {
- mVoice.Volume = (float)value;
- mVolume = value;
- }
- }
-
- public override bool IsPlaying
- {
- get
- {
- //return mVoice.State.
- return false;
- }
- }
-
- float[] channelVolumes = new float[2];
- public override double Pan
- {
- get { return mPan; }
- set
- {
- mPan = value;
- mVoice.SetChannelVolumes(2, GetChannelVolumes((float)value));
- }
- }
-
- private float[] GetChannelVolumes(float pan)
- {
- if (pan < 0)
- {
- channelVolumes[0] = 1;
- channelVolumes[1] = 1 + pan;
- }
- else
- {
- channelVolumes[0] = 1 - pan;
- channelVolumes[1] = 1;
- }
-
- return channelVolumes;
- }
-
- }
- public class SDX_Music : MusicImpl
- {
- SDX_Audio mAudio;
-
- public SDX_Music(SDX_Audio audio, string filename)
- {
- mAudio = audio;
-
- if (System.IO.Path.GetExtension(filename) == ".mp3")
- throw new Exception("MP3 files cannot be played due to license restrictions.");
-
- //LoadMusic(filename);
- }
-
- public SDX_Music(SDX_Audio audio, Stream infile)
- {
- mAudio = audio;
-
- //string tempfile = Path.GetTempFileName();
- //using (FileStream writer = File.OpenWrite(tempfile))
- //{
- // ReadWriteStream(infile, writer);
- //}
-
- //try
- //{
- // LoadMusic(tempfile);
- //}
- //catch (Microsoft.DirectX.DirectXException e)
- //{
- // throw new AgateLib.AgateException(
- // "Could not load the music file. The file format may be unsupported by DirectX.", e);
- //}
- //finally
- //{
- // File.Delete(tempfile);
- //}
- }
- /*
- private void LoadMusic(string filename)
- {
- mAVAudio = new Microsoft.DirectX.AudioVideoPlayback.Audio(filename);
- mAVAudio.Ending += new EventHandler(mAVAudio_Ending);
- }
-
- private void ReadWriteStream(Stream readStream, Stream writeStream)
- {
- int Length = 256;
- Byte[] buffer = new Byte[Length];
- int bytesRead = readStream.Read(buffer, 0, Length);
- // write the required bytes
- while (bytesRead > 0)
- {
- writeStream.Write(buffer, 0, bytesRead);
- bytesRead = readStream.Read(buffer, 0, Length);
- }
- readStream.Close();
- writeStream.Close();
- }
-
- public override void Dispose()
- {
- mAVAudio.Dispose();
- }
-
-
- protected override void OnSetLoop(bool value)
- {
- if (value == true)
- mAVAudio.Ending += mAVAudio_Ending;
- else
- mAVAudio.Ending -= mAVAudio_Ending;
- }
-
- public override void Play()
- {
- mAVAudio.Play();
- }
-
- public override void Stop()
- {
- mAVAudio.Stop();
- }
-
- /// <summary>
- /// </summary>
- public override double Volume
- {
- get
- {
- try
- {
- /// The DirectX AudioVideoPlayback object takes volume in the range of
- /// -10000 to 0, indicating the number of hundredths of decibels the volume
- /// is attenuated by, so we convert to zero to 1.
-
- double vol = (double)(mAVAudio.Volume + 10000) / 10000;
- // logarithmic volume control
- return Audio.TransformByExp(vol);
- }
- catch (Microsoft.DirectX.DirectXException e)
- {
- System.Diagnostics.Debug.WriteLine("Failed to read volume.");
- System.Diagnostics.Debug.WriteLine(e.Message);
- return 1.0;
- }
- }
- set
- {
- // do a logarithmic volume control
- try
- {
- mAVAudio.Volume = (int)(Audio.TransformByLog(value) * 10000.0 - 10000.0);
- }
- catch (Microsoft.DirectX.DirectXException e)
- {
- System.Diagnostics.Debug.WriteLine("Failed to set volume.");
- System.Diagnostics.Debug.WriteLine(e.Message);
- }
- }
- }
-
-
- void mAVAudio_Ending(object sender, EventArgs e)
- {
- if (IsLooping)
- {
- mAVAudio.CurrentPosition = 0;
- }
- }
-
- public override bool IsPlaying
- {
- get { return mAVAudio.Playing; }
- }
-
- public override double Pan
- {
- get
- {
- return mAVAudio.Balance / (double)10000.0;
- }
- set
- {
- try
- {
- mAVAudio.Balance = (int)(value * 10000.0);
- }
- catch (Microsoft.DirectX.DirectXException e)
- {
- if (e.ErrorCode != -2147220909)
- throw e;
- }
- }
- }
- * */
- public override void Dispose()
- {
- throw new NotImplementedException();
- }
-
- public override bool IsPlaying
- {
- get { throw new NotImplementedException(); }
- }
-
- protected override void OnSetLoop(bool value)
- {
- throw new NotImplementedException();
- }
-
- public override double Pan
- {
- get
- {
- throw new NotImplementedException();
- }
- set
- {
- throw new NotImplementedException();
- }
- }
-
- public override void Play()
- {
- throw new NotImplementedException();
- }
-
- public override void Stop()
- {
- throw new NotImplementedException();
- }
-
- public override double Volume
- {
- get
- {
- throw new NotImplementedException();
- }
- set
- {
- throw new NotImplementedException();
- }
- }
- }
-}
Modified: trunk/Drivers/AgateSDX/SDX_Input.cs
===================================================================
--- trunk/Drivers/AgateSDX/SDX_Input.cs 2009-12-25 05:22:19 UTC (rev 1162)
+++ trunk/Drivers/AgateSDX/SDX_Input.cs 2009-12-25 07:42:17 UTC (rev 1163)
@@ -74,7 +74,7 @@
case DeviceType.Gamepad:
case DeviceType.Joystick:
- Device<JoystickState> d = new Device<JoystickState>(mDIobject, i.InstanceGuid);
+ Joystick d = new Joystick(mDIobject, i.InstanceGuid);
retval.Add(new SDX_Joystick(d));
@@ -92,7 +92,7 @@
/// </summary>
public class SDX_Joystick : JoystickImpl
{
- private Device<JoystickState> mDevice;
+ private Joystick mDevice;
private bool[] mButtons;
private int[] shift = new int[8];
@@ -100,7 +100,7 @@
private double mThreshold;
- public SDX_Joystick(Device<JoystickState> d)
+ public SDX_Joystick(Joystick d)
{
mDevice = d;
mDevice.Acquire();
@@ -117,15 +117,15 @@
public override string Name
{
- get { return mDevice.DeviceInformation.InstanceName; }
+ get { return mDevice.Information.InstanceName; }
}
public override int AxisCount
{
- get { return mDevice.Caps.AxesCount; }
+ get { return mDevice.Capabilities.AxesCount; }
}
public override int ButtonCount
{
- get { return mDevice.Caps.ButtonCount; }
+ get { return mDevice.Capabilities.ButtonCount; }
}
public override bool GetButtonState(int buttonIndex)
Added: trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs
===================================================================
--- trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs (rev 0)
+++ trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs 2009-12-25 07:42:17 UTC (rev 1163)
@@ -0,0 +1,503 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using SlimDX.XAudio2;
+using SlimDX.Multimedia;
+using System.Runtime.InteropServices;
+using AgateLib.AudioLib;
+using AgateLib.Drivers;
+using AgateLib.ImplementationBase;
+
+namespace AgateSDX.XAud2
+{
+ public class XAudio2_Audio : AudioImpl
+ {
+ XAudio2 mDevice;
+ MasteringVoice masteringVoice;
+
+ public XAudio2 Device
+ {
+ get { return mDevice; }
+ }
+
+ public XAudio2_Audio()
+ {
+
+ }
+
+ public override void Initialize()
+ {
+ Report("SlimDX XAudio2 driver instantiated for audio.");
+
+
+ mDevice = new XAudio2();//XAudio2Flags.DebugEngine, ProcessorSpecifier.AnyProcessor);
+ masteringVoice = new MasteringVoice(mDevice);
+
+ }
+ public override void Dispose()
+ {
+ mDevice.Dispose();
+ }
+
+ public override SoundBufferImpl CreateSoundBuffer(Stream inStream)
+ {
+ return new SDX_SoundBuffer(this, inStream);
+ }
+ public override SoundBufferImpl CreateSoundBuffer(Stream inStream, SoundFormat format)
+ {
+ return new SDX_SoundBuffer(this, inStream, format);
+ }
+
+ public override MusicImpl CreateMusic(System.IO.Stream musicStream)
+...
[truncated message content] |
|
From: <ka...@us...> - 2009-12-28 19:44:35
|
Revision: 1165
http://agate.svn.sourceforge.net/agate/?rev=1165&view=rev
Author: kanato
Date: 2009-12-28 19:44:19 +0000 (Mon, 28 Dec 2009)
Log Message:
-----------
Reorganize ImplementationBase into *Lib.ImplementationBase namespaces.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/AudioLib/Music.cs
trunk/AgateLib/AudioLib/SoundFormat.cs
trunk/AgateLib/BitmapFont/BitmapFontImpl.cs
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/DisplayLib/DisplayWindow.cs
trunk/AgateLib/DisplayLib/FontSurface.cs
trunk/AgateLib/DisplayLib/FrameBuffer.cs
trunk/AgateLib/DisplayLib/IndexBuffer.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/ShaderCompiler.cs
trunk/AgateLib/DisplayLib/Surface.cs
trunk/AgateLib/DisplayLib/VertexBuffer.cs
trunk/AgateLib/Drivers/AgateDriverInfo.cs
trunk/AgateLib/Drivers/DriverImplBase.cs
trunk/AgateLib/Drivers/NullInputImpl.cs
trunk/AgateLib/Drivers/NullSoundImpl.cs
trunk/AgateLib/Drivers/Registrar.cs
trunk/AgateLib/InputLib/ImplementationBase/InputImpl.cs
trunk/AgateLib/InputLib/ImplementationBase/JoystickImpl.cs
trunk/AgateLib/InputLib/Joystick.cs
trunk/AgateLib/InputLib/JoystickInput.cs
trunk/AgateLib/Resources/AgateResourceCollection.cs
trunk/AgateLib/Sprites/Sprite.cs
trunk/AgateLib-Windows.sln
trunk/Drivers/AgateDrawing/Drawing_Display.cs
trunk/Drivers/AgateDrawing/Drawing_DisplayWindow.cs
trunk/Drivers/AgateDrawing/Drawing_FontSurface.cs
trunk/Drivers/AgateDrawing/Drawing_FrameBuffer.cs
trunk/Drivers/AgateDrawing/Drawing_Surface.cs
trunk/Drivers/AgateFMOD/FMOD_Audio.cs
trunk/Drivers/AgateFMOD/FMOD_Music.cs
trunk/Drivers/AgateFMOD/FMOD_SoundBuffer.cs
trunk/Drivers/AgateFMOD/FMOD_SoundBufferSession.cs
trunk/Drivers/AgateOTK/AL_Audio.cs
trunk/Drivers/AgateOTK/GL3/FrameBuffer.cs
trunk/Drivers/AgateOTK/GL3/GLVertexBuffer.cs
trunk/Drivers/AgateOTK/GL_Display.cs
trunk/Drivers/AgateOTK/GL_DisplayControl.cs
trunk/Drivers/AgateOTK/GL_FrameBuffer.cs
trunk/Drivers/AgateOTK/GL_GameWindow.cs
trunk/Drivers/AgateOTK/GL_IndexBuffer.cs
trunk/Drivers/AgateOTK/GL_Surface.cs
trunk/Drivers/AgateOTK/Legacy/ArbShaderCompiler.cs
trunk/Drivers/AgateOTK/Legacy/FrameBufferExt.cs
trunk/Drivers/AgateOTK/Legacy/FrameBufferReadPixels.cs
trunk/Drivers/AgateOTK/Legacy/LegacyVertexBuffer.cs
trunk/Drivers/AgateOTK/Shaders/GlslShaderCompiler.cs
trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs
trunk/Drivers/AgateSDL/Audio/SDL_Music.cs
trunk/Drivers/AgateSDL/Audio/SDL_SoundBuffer.cs
trunk/Drivers/AgateSDL/Audio/SDL_SoundBufferSession.cs
trunk/Drivers/AgateSDL/Input/SDL_Input.cs
trunk/Drivers/AgateSDX/FrameBufferSurface.cs
trunk/Drivers/AgateSDX/FrameBufferWindow.cs
trunk/Drivers/AgateSDX/HlslCompiler.cs
trunk/Drivers/AgateSDX/SDX_Display.cs
trunk/Drivers/AgateSDX/SDX_DisplayWindow.cs
trunk/Drivers/AgateSDX/SDX_FrameBuffer.cs
trunk/Drivers/AgateSDX/SDX_IndexBuffer.cs
trunk/Drivers/AgateSDX/SDX_Input.cs
trunk/Drivers/AgateSDX/SDX_Surface.cs
trunk/Drivers/AgateSDX/SDX_VertexBuffer.cs
trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs
trunk/Tests/AudioTests/GenerateAudio.cs
Added Paths:
-----------
trunk/AgateLib/AudioLib/ImplementationBase/
trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs
trunk/AgateLib/AudioLib/ImplementationBase/MusicImpl.cs
trunk/AgateLib/AudioLib/ImplementationBase/SoundBufferImpl.cs
trunk/AgateLib/AudioLib/ImplementationBase/SoundBufferSessionImpl.cs
trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs
trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs
trunk/AgateLib/DisplayLib/ImplementationBase/
trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs
trunk/AgateLib/DisplayLib/ImplementationBase/DisplayWindowImpl.cs
trunk/AgateLib/DisplayLib/ImplementationBase/FontSurfaceImpl.cs
trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs
trunk/AgateLib/DisplayLib/ImplementationBase/IndexBufferImpl.cs
trunk/AgateLib/DisplayLib/ImplementationBase/ShaderCompilerImpl.cs
trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs
trunk/AgateLib/DisplayLib/ImplementationBase/VertexBufferImpl.cs
trunk/AgateLib/InputLib/ImplementationBase/
Removed Paths:
-------------
trunk/AgateLib/ImplementationBase/
trunk/AgateLib/InputLib/ImplementationBase/AudioImpl.cs
trunk/AgateLib/InputLib/ImplementationBase/DisplayImpl.cs
trunk/AgateLib/InputLib/ImplementationBase/DisplayWindowImpl.cs
trunk/AgateLib/InputLib/ImplementationBase/FontSurfaceImpl.cs
trunk/AgateLib/InputLib/ImplementationBase/FrameBufferImpl.cs
trunk/AgateLib/InputLib/ImplementationBase/IndexBufferImpl.cs
trunk/AgateLib/InputLib/ImplementationBase/RenderTargetImpl.cs
trunk/AgateLib/InputLib/ImplementationBase/ShaderCompilerImpl.cs
trunk/AgateLib/InputLib/ImplementationBase/SurfaceImpl.cs
trunk/AgateLib/InputLib/ImplementationBase/VertexBufferImpl.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2009-12-25 08:10:20 UTC (rev 1164)
+++ trunk/AgateLib/AgateLib.csproj 2009-12-28 19:44:19 UTC (rev 1165)
@@ -132,7 +132,12 @@
<Compile Include="AppInitParameters.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="AudioLib\ImplementationBase\MusicImpl.cs" />
+ <Compile Include="AudioLib\ImplementationBase\SoundBufferImpl.cs" />
+ <Compile Include="AudioLib\ImplementationBase\SoundBufferSessionImpl.cs" />
+ <Compile Include="AudioLib\ImplementationBase\StreamingSoundBufferImpl.cs" />
<Compile Include="AudioLib\SoundFormat.cs" />
+ <Compile Include="AudioLib\StreamingSoundBuffer.cs" />
<Compile Include="Core.cs">
<SubType>Code</SubType>
</Compile>
@@ -189,7 +194,7 @@
<Compile Include="IFileProvider.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="ImplementationBase\FrameBufferImpl.cs" />
+ <Compile Include="DisplayLib\ImplementationBase\FrameBufferImpl.cs" />
<Compile Include="Platform.cs" />
<Compile Include="PlatformType.cs" />
<Compile Include="Settings\SettingsGroup.cs" />
@@ -400,39 +405,36 @@
<Compile Include="Geometry\VertexTypes\VertexLayout.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="ImplementationBase\AudioImpl.cs">
+ <Compile Include="AudioLib\ImplementationBase\AudioImpl.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="ImplementationBase\DisplayImpl.cs">
+ <Compile Include="DisplayLib\ImplementationBase\DisplayImpl.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="ImplementationBase\DisplayWindowImpl.cs">
+ <Compile Include="DisplayLib\ImplementationBase\DisplayWindowImpl.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="ImplementationBase\FontSurfaceImpl.cs">
+ <Compile Include="DisplayLib\ImplementationBase\FontSurfaceImpl.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="ImplementationBase\IndexBufferImpl.cs">
+ <Compile Include="DisplayLib\ImplementationBase\IndexBufferImpl.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="ImplementationBase\InputImpl.cs">
+ <Compile Include="InputLib\ImplementationBase\InputImpl.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="ImplementationBase\JoystickImpl.cs">
+ <Compile Include="InputLib\ImplementationBase\JoystickImpl.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="ImplementationBase\RenderTargetImpl.cs">
+ <Compile Include="DisplayLib\ImplementationBase\ShaderCompilerImpl.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="ImplementationBase\ShaderCompilerImpl.cs">
+ <Compile Include="DisplayLib\ImplementationBase\SurfaceImpl.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="ImplementationBase\SurfaceImpl.cs">
+ <Compile Include="DisplayLib\ImplementationBase\VertexBufferImpl.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="ImplementationBase\VertexBufferImpl.cs">
- <SubType>Code</SubType>
- </Compile>
<Compile Include="InputLib\InputEventArgs.cs">
<SubType>Code</SubType>
</Compile>
Added: trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs
===================================================================
--- trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs (rev 0)
+++ trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs 2009-12-28 19:44:19 UTC (rev 1165)
@@ -0,0 +1,97 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using AgateLib.Drivers;
+
+namespace AgateLib.AudioLib.ImplementationBase
+{
+ /// <summary>
+ /// Implements Audio class factory.
+ /// </summary>
+ public abstract class AudioImpl : DriverImplBase
+ {
+ /// <summary>
+ /// Creates a SoundBufferImpl object.
+ /// </summary>
+ /// <param name="filename"></param>
+ /// <returns></returns>
+ public virtual SoundBufferImpl CreateSoundBuffer(string filename)
+ {
+ using (Stream stream = File.OpenRead(filename))
+ {
+ return CreateSoundBuffer(stream);
+ }
+ }
+
+ /// <summary>
+ /// Creates a MusicImpl object.
+ /// </summary>
+ /// <param name="filename"></param>
+ /// <returns></returns>
+ public virtual MusicImpl CreateMusic(string filename)
+ {
+ using (Stream stream = File.OpenRead(filename))
+ {
+ return CreateMusic(stream);
+ }
+ }
+ /// <summary>
+ /// Creates a MusicImpl object.
+ /// </summary>
+ /// <param name="musicStream"></param>
+ /// <returns></returns>
+ public abstract MusicImpl CreateMusic(Stream musicStream);
+ /// <summary>
+ /// Creates a SoundBufferSessionImpl object.
+ /// </summary>
+ /// <param name="buffer"></param>
+ /// <returns></returns>
+ public abstract SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferImpl buffer);
+ /// <summary>
+ /// Creates a SoundBufferImpl object.
+ /// </summary>
+ /// <param name="inStream"></param>
+ /// <returns></returns>
+ public abstract SoundBufferImpl CreateSoundBuffer(Stream inStream);
+
+ /// <summary>
+ /// Creates a SoundBufferImpl object.
+ /// </summary>
+ /// <param name="inStream"></param>
+ /// <returns></returns>
+ public virtual SoundBufferImpl CreateSoundBuffer(Stream inStream, AudioLib.SoundFormat format)
+ {
+ throw new NotImplementedException();
+ }
+
+ /// <summary>
+ /// This function is called once a frame to allow the Audio driver to update
+ /// information. There is no need to call base.Update() if overriding this
+ /// function.
+ /// </summary>
+ public virtual void Update()
+ {
+ }
+
+ }
+
+}
Added: trunk/AgateLib/AudioLib/ImplementationBase/MusicImpl.cs
===================================================================
--- trunk/AgateLib/AudioLib/ImplementationBase/MusicImpl.cs (rev 0)
+++ trunk/AgateLib/AudioLib/ImplementationBase/MusicImpl.cs 2009-12-28 19:44:19 UTC (rev 1165)
@@ -0,0 +1,95 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using AgateLib.AudioLib.ImplementationBase;
+
+namespace AgateLib.AudioLib.ImplementationBase
+{
+
+ /// <summary>
+ /// Class which implements a Music object.
+ /// </summary>
+ public abstract class MusicImpl : IDisposable
+ {
+ private bool mIsLooping = true;
+
+ /// <summary>
+ /// Gets or sets whether or not this Music is looping.
+ /// </summary>
+ public bool IsLooping
+ {
+ get { return mIsLooping; }
+ set
+ {
+ if (mIsLooping != value)
+ {
+ mIsLooping = value;
+
+ OnSetLoop(value);
+ }
+ }
+ }
+
+ /// <summary>
+ /// Function called when IsLooping is set to a new value.
+ /// </summary>
+ /// <param name="value"></param>
+ protected abstract void OnSetLoop(bool value);
+
+ /// <summary>
+ /// Dispose
+ /// </summary>
+ public abstract void Dispose();
+
+ /// <summary>
+ /// Start over at beginning.
+ /// </summary>
+ public abstract void Play();
+ /// <summary>
+ /// Stop playing.
+ /// </summary>
+ public abstract void Stop();
+
+ /// <summary>
+ /// Gets or sets the volume this audio file is playing at.
+ /// 0.0 is completely quiet.
+ /// 0.5 sounds like half maximum volume
+ /// 1.0 is maximum volume.
+ /// </summary>
+ public abstract double Volume { get; set; }
+
+ /// <summary>
+ /// Gets or sets the left-right balance. This may or may not be supported
+ /// by some drivers.
+ /// -1 is entirely in the left speaker,
+ /// 0 is equally in both and,
+ /// 1 is entirely in the right speaker.
+ ///
+ /// If this is unsupported by the driver, don't allow impl.Pan to change from zero.
+ /// </summary>
+ public abstract double Pan { get; set; }
+ /// <summary>
+ /// Gets whether or not it's currently playing.
+ /// </summary>
+ public abstract bool IsPlaying { get; }
+ }
+}
Added: trunk/AgateLib/AudioLib/ImplementationBase/SoundBufferImpl.cs
===================================================================
--- trunk/AgateLib/AudioLib/ImplementationBase/SoundBufferImpl.cs (rev 0)
+++ trunk/AgateLib/AudioLib/ImplementationBase/SoundBufferImpl.cs 2009-12-28 19:44:19 UTC (rev 1165)
@@ -0,0 +1,49 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using AgateLib.AudioLib.ImplementationBase;
+
+namespace AgateLib.AudioLib.ImplementationBase
+{
+
+ /// <summary>
+ /// Implements a SoundBuffer
+ /// </summary>
+ public abstract class SoundBufferImpl : IDisposable
+ {
+ /// <summary>
+ /// Destroys unmanaged resources.
+ /// </summary>
+ public abstract void Dispose();
+
+ /// <summary>
+ /// Gets or sets the volume this audio file is playing at.
+ /// 0.0 is completely quiet.
+ /// 0.5 sounds like half maximum volume
+ /// 1.0 is maximum volume.
+ /// </summary>
+ public abstract double Volume { get; set; }
+
+ public virtual bool Loop { get { return false; } set { } }
+
+ }
+}
Added: trunk/AgateLib/AudioLib/ImplementationBase/SoundBufferSessionImpl.cs
===================================================================
--- trunk/AgateLib/AudioLib/ImplementationBase/SoundBufferSessionImpl.cs (rev 0)
+++ trunk/AgateLib/AudioLib/ImplementationBase/SoundBufferSessionImpl.cs 2009-12-28 19:44:19 UTC (rev 1165)
@@ -0,0 +1,75 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using AgateLib.AudioLib.ImplementationBase;
+
+namespace AgateLib.AudioLib.ImplementationBase
+{
+
+ /// <summary>
+ /// Represents a playback instance.
+ /// </summary>
+ public abstract class SoundBufferSessionImpl : IDisposable
+ {
+ /// <summary>
+ /// Destroyes unmanaged resources.
+ /// </summary>
+ public abstract void Dispose();
+
+ /// <summary>
+ /// Starts at the beginning.
+ /// </summary>
+ public abstract void Play();
+
+ /// <summary>
+ /// Stops.
+ /// </summary>
+ public abstract void Stop();
+
+ public abstract int CurrentLocation { get; }
+
+ /// <summary>
+ /// Gets or sets the volume this audio file is playing at.
+ /// 0.0 is completely quiet.
+ /// 0.5 sounds like half maximum volume
+ /// 1.0 is maximum volume.
+ /// </summary>
+ public abstract double Volume { get; set; }
+ /// <summary>
+ /// Gets or sets the left-right balance.
+ /// -1 is left speaker
+ /// 0 is middle (both)
+ /// 1 is right.
+ /// </summary>
+ public abstract double Pan { get; set; }
+ /// <summary>
+ /// Gets whether or not this playback instance is actually playing.
+ /// </summary>
+ public abstract bool IsPlaying { get; }
+
+ /// <summary>
+ /// Initializes the SoundBufferSession to begin playing.
+ /// </summary>
+ protected internal abstract void Initialize();
+ }
+
+}
Added: trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs
===================================================================
--- trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs (rev 0)
+++ trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs 2009-12-28 19:44:19 UTC (rev 1165)
@@ -0,0 +1,30 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using AgateLib.AudioLib.ImplementationBase;
+
+namespace AgateLib.AudioLib.ImplementationBase
+{
+ class StreamingSoundBufferImpl
+ {
+ }
+}
Modified: trunk/AgateLib/AudioLib/Music.cs
===================================================================
--- trunk/AgateLib/AudioLib/Music.cs 2009-12-25 08:10:20 UTC (rev 1164)
+++ trunk/AgateLib/AudioLib/Music.cs 2009-12-28 19:44:19 UTC (rev 1165)
@@ -21,7 +21,7 @@
using System.IO;
using System.Text;
using AgateLib.Drivers;
-using AgateLib.ImplementationBase;
+using AgateLib.AudioLib.ImplementationBase;
using AgateLib.Utility;
namespace AgateLib.AudioLib
Modified: trunk/AgateLib/AudioLib/SoundFormat.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundFormat.cs 2009-12-25 08:10:20 UTC (rev 1164)
+++ trunk/AgateLib/AudioLib/SoundFormat.cs 2009-12-28 19:44:19 UTC (rev 1165)
@@ -6,17 +6,31 @@
namespace AgateLib.AudioLib
{
/// <summary>
- /// Enum describing what format the audio data is in.
+ /// Class describing what format the raw audio data is in.
/// </summary>
- public enum SoundFormat
+ public class SoundFormat
{
+ public SoundFormat()
+ {
+ BitsPerSample = 16;
+ Channels = 1;
+ SamplingFrequency = 44100;
+ }
+
+ public int BitsPerSample { get; set; }
+ public int Channels { get; set; }
+ public int SamplingFrequency { get; set; }
+
/// <summary>
- /// Raw 16 bit signed PCM data.
+ /// Creates and returns a SoundFormat object
+ /// for a 16-bit, single channel stream at the
+ /// specified sampling frequency.
/// </summary>
- RawInt16,
- /// <summary>
- /// Wav format.
- /// </summary>
- Wave,
+ /// <param name="samplingFrequency">The sampling frequency for the stream.</param>
+ /// <returns></returns>
+ public static SoundFormat Pcm16(int samplingFrequency)
+ {
+ return new SoundFormat { BitsPerSample = 16, Channels = 1, SamplingFrequency = samplingFrequency };
+ }
}
}
Added: trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs
===================================================================
--- trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs (rev 0)
+++ trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs 2009-12-28 19:44:19 UTC (rev 1165)
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace AgateLib.AudioLib
+{
+ public class StreamingSoundBuffer
+ {
+ public StreamingSoundBuffer(Stream input, SoundFormat format)
+ {
+
+ }
+ }
+}
Modified: trunk/AgateLib/BitmapFont/BitmapFontImpl.cs
===================================================================
--- trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2009-12-25 08:10:20 UTC (rev 1164)
+++ trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2009-12-28 19:44:19 UTC (rev 1165)
@@ -22,8 +22,8 @@
using System.Xml;
using AgateLib.DisplayLib;
+using AgateLib.DisplayLib.ImplementationBase;
using AgateLib.Geometry;
-using AgateLib.ImplementationBase;
using AgateLib.Resources;
using AgateLib.DisplayLib.Cache;
Modified: trunk/AgateLib/DisplayLib/Display.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Display.cs 2009-12-25 08:10:20 UTC (rev 1164)
+++ trunk/AgateLib/DisplayLib/Display.cs 2009-12-28 19:44:19 UTC (rev 1165)
@@ -20,11 +20,10 @@
using System.Collections.Generic;
using System.IO;
using System.Text;
-
+using AgateLib.DisplayLib.ImplementationBase;
using AgateLib.DisplayLib.Shaders;
using AgateLib.Drivers;
using AgateLib.Geometry;
-using AgateLib.ImplementationBase;
using AgateLib.Utility;
namespace AgateLib.DisplayLib
Modified: trunk/AgateLib/DisplayLib/DisplayWindow.cs
===================================================================
--- trunk/AgateLib/DisplayLib/DisplayWindow.cs 2009-12-25 08:10:20 UTC (rev 1164)
+++ trunk/AgateLib/DisplayLib/DisplayWindow.cs 2009-12-28 19:44:19 UTC (rev 1165)
@@ -19,9 +19,8 @@
using System;
using System.Collections.Generic;
using System.Text;
-
using AgateLib.Geometry;
-using AgateLib.ImplementationBase;
+using AgateLib.DisplayLib.ImplementationBase;
namespace AgateLib.DisplayLib
{
Modified: trunk/AgateLib/DisplayLib/FontSurface.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FontSurface.cs 2009-12-25 08:10:20 UTC (rev 1164)
+++ trunk/AgateLib/DisplayLib/FontSurface.cs 2009-12-28 19:44:19 UTC (rev 1165)
@@ -22,8 +22,8 @@
using System.Text;
using System.Text.RegularExpressions;
using AgateLib.BitmapFont;
+using AgateLib.DisplayLib.ImplementationBase;
using AgateLib.Geometry;
-using AgateLib.ImplementationBase;
using AgateLib.Resources;
namespace AgateLib.DisplayLib
Modified: trunk/AgateLib/DisplayLib/FrameBuffer.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FrameBuffer.cs 2009-12-25 08:10:20 UTC (rev 1164)
+++ trunk/AgateLib/DisplayLib/FrameBuffer.cs 2009-12-28 19:44:19 UTC (rev 1165)
@@ -3,7 +3,7 @@
using System.Linq;
using System.Text;
using AgateLib.Geometry;
-using AgateLib.ImplementationBase;
+using AgateLib.DisplayLib.ImplementationBase;
namespace AgateLib.DisplayLib
{
Added: trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs (rev 0)
+++ trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs 2009-12-28 19:44:19 UTC (rev 1165)
@@ -0,0 +1,668 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using AgateLib.BitmapFont;
+using AgateLib.DisplayLib;
+using AgateLib.DisplayLib.Shaders;
+using AgateLib.DisplayLib.Shaders.Implementation;
+using AgateLib.Drivers;
+using AgateLib.Geometry;
+using AgateLib.Utility;
+
+namespace AgateLib.DisplayLib.ImplementationBase
+{
+ /// <summary>
+ /// Abstract base class for implementing the Display object.
+ /// </summary>
+ public abstract class DisplayImpl : DriverImplBase
+ {
+ private double mAlphaThreshold = 5.0 / 255.0;
+
+ private FrameBuffer mRenderTarget;
+
+ #region --- Capabilities Reporting ---
+
+ public abstract bool CapsBool(DisplayBoolCaps caps);
+ public abstract Size CapsSize(DisplaySizeCaps displaySizeCaps);
+
+ #endregion
+
+ public abstract IEnumerable<DisplayLib.Shaders.ShaderLanguage> SupportedShaderLanguages { get; }
+
+ private static AgateShader mShader;
+
+ /// <summary>
+ /// Gets or sets the current render target.
+ /// </summary>
+ public FrameBuffer RenderTarget
+ {
+ get
+ {
+ return mRenderTarget;
+ }
+ set
+ {
+ if (value == mRenderTarget)
+ return;
+
+ if (mInFrame)
+ throw new AgateException("Cannot change render target between BeginFrame and EndFrame");
+
+ FrameBuffer old = mRenderTarget;
+ mRenderTarget = value;
+
+ OnRenderTargetChange(old);
+ }
+ }
+
+ /// <summary>
+ /// The pixelformat that created surfaces should use.
+ /// </summary>
+ public abstract PixelFormat DefaultSurfaceFormat { get; }
+
+ /// <summary>
+ /// Event raised when the current render target is changed.
+ /// </summary>
+ /// <param name="oldRenderTarget"></param>
+ protected abstract void OnRenderTargetChange(FrameBuffer oldRenderTarget);
+ /// <summary>
+ /// Event raised when the render target is resized.
+ /// </summary>
+ protected abstract void OnRenderTargetResize();
+
+ ///// <summary>
+ ///// Creates a DisplayWindowImpl derived object.
+ ///// </summary>
+ ///// <param name="title"></param>
+ ///// <param name="clientWidth"></param>
+ ///// <param name="clientHeight"></param>
+ ///// <param name="allowResize"></param>
+ ///// <param name="iconFile"></param>
+ ///// <param name="startFullscreen"></param>
+ ///// <returns></returns>
+ //public abstract DisplayWindowImpl CreateDisplayWindow(string title, int clientWidth, int clientHeight, string iconFile, bool startFullscreen, bool allowResize);
+ ///// <summary>
+ ///// Creates a DisplayWindowImpl derived object.
+ ///// </summary>
+ //public abstract DisplayWindowImpl CreateDisplayWindow(System.Windows.Forms.Control renderTarget);
+
+ /// <summary>
+ /// Creates a DisplayWindowImpl derived object.
+ /// </summary>
+ /// <param name="windowParams"></param>
+ /// <returns></returns>
+ public abstract DisplayWindowImpl CreateDisplayWindow(CreateWindowParams windowParams);
+
+ /// <summary>
+ /// Creates a SurfaceImpl derived object.
+ /// </summary>
+ /// <param name="provider"></param>
+ /// <param name="filename"></param>
+ /// <returns></returns>
+ public virtual SurfaceImpl CreateSurface(IFileProvider provider, string filename)
+ {
+ return CreateSurface(provider.OpenRead(filename));
+ }
+ /// <summary>
+ /// Creates a SurfaceImpl derived object.
+ /// </summary>
+ public abstract SurfaceImpl CreateSurface(string fileName);
+ /// <summary>
+ /// Creates a SurfaceImpl derived object from a stream containing
+ /// the file contents.
+ /// </summary>
...
[truncated message content] |
|
From: <ka...@us...> - 2009-12-28 20:50:40
|
Revision: 1166
http://agate.svn.sourceforge.net/agate/?rev=1166&view=rev
Author: kanato
Date: 2009-12-28 20:50:32 +0000 (Mon, 28 Dec 2009)
Log Message:
-----------
Implement streaming audio in SDX.
Modified Paths:
--------------
trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs
trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs
trunk/AgateLib/AudioLib/SoundBuffer.cs
trunk/AgateLib/AudioLib/SoundFormat.cs
trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs
trunk/Drivers/AgateSDX/AgateSDX.csproj
trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs
trunk/Tests/AudioTests/GenerateAudio.cs
Added Paths:
-----------
trunk/Drivers/AgateSDX/XAud2/XAudio2_Music.cs
trunk/Drivers/AgateSDX/XAud2/XAudio2_SoundBuffer.cs
trunk/Drivers/AgateSDX/XAud2/XAudio2_SoundBufferSession.cs
trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs
Modified: trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs
===================================================================
--- trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs 2009-12-28 19:44:19 UTC (rev 1165)
+++ trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs 2009-12-28 20:50:32 UTC (rev 1166)
@@ -74,13 +74,14 @@
public abstract SoundBufferImpl CreateSoundBuffer(Stream inStream);
/// <summary>
- /// Creates a SoundBufferImpl object.
+ /// Creates a streaming sound buffer.
/// </summary>
- /// <param name="inStream"></param>
+ /// <param name="input"></param>
+ /// <param name="format"></param>
/// <returns></returns>
- public virtual SoundBufferImpl CreateSoundBuffer(Stream inStream, AudioLib.SoundFormat format)
+ public virtual StreamingSoundBufferImpl CreateStreamingSoundBuffer(Stream input, SoundFormat format)
{
- throw new NotImplementedException();
+ throw new NotSupportedException();
}
/// <summary>
@@ -92,6 +93,7 @@
{
}
+
}
}
Modified: trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs
===================================================================
--- trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs 2009-12-28 19:44:19 UTC (rev 1165)
+++ trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs 2009-12-28 20:50:32 UTC (rev 1166)
@@ -24,7 +24,26 @@
namespace AgateLib.AudioLib.ImplementationBase
{
- class StreamingSoundBufferImpl
+ public abstract class StreamingSoundBufferImpl
{
+ /// <summary>
+ /// Starts playing of the sound.
+ /// </summary>
+ public abstract void Play();
+ /// <summary>
+ /// Stops playing of the sound.
+ /// </summary>
+ public abstract void Stop();
+
+ /// <summary>
+ /// Gets or sets a value indicating how many bytes should be read from the
+ /// stream at a time.
+ /// </summary>
+ public abstract int ChunkSize { get; set; }
+
+ /// <summary>
+ /// Gets a value indiciating whether or not audio is playing.
+ /// </summary>
+ public abstract bool IsPlaying { get; }
}
}
Modified: trunk/AgateLib/AudioLib/SoundBuffer.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundBuffer.cs 2009-12-28 19:44:19 UTC (rev 1165)
+++ trunk/AgateLib/AudioLib/SoundBuffer.cs 2009-12-28 20:50:32 UTC (rev 1166)
@@ -92,15 +92,6 @@
}
/// <summary>
- /// Constructs a SoundBuffer object, loading audio data from the passed stream.
- /// </summary>
- /// <param name="source"></param>
- public SoundBuffer(Stream source, SoundFormat format)
- {
- impl = Audio.Impl.CreateSoundBuffer(source, format);
- }
-
- /// <summary>
/// Disposes of the SoundBuffer object, and all SoundBufferSession objects
/// created by this SoundBuffer.
/// </summary>
Modified: trunk/AgateLib/AudioLib/SoundFormat.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundFormat.cs 2009-12-28 19:44:19 UTC (rev 1165)
+++ trunk/AgateLib/AudioLib/SoundFormat.cs 2009-12-28 20:50:32 UTC (rev 1166)
@@ -1,4 +1,22 @@
-using System;
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Modified: trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs
===================================================================
--- trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs 2009-12-28 19:44:19 UTC (rev 1165)
+++ trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs 2009-12-28 20:50:32 UTC (rev 1166)
@@ -1,16 +1,99 @@
-using System;
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
+using AgateLib.AudioLib.ImplementationBase;
namespace AgateLib.AudioLib
{
+ /// <summary>
+ /// Class which streams PCM audio data.
+ /// </summary>
public class StreamingSoundBuffer
{
- public StreamingSoundBuffer(Stream input, SoundFormat format)
+ StreamingSoundBufferImpl impl;
+ Stream stream;
+
+ /// <summary>
+ /// Constructs a StreamingSoundBuffer object.
+ /// </summary>
+ /// <param name="input">The stream from which audio data will be pulled from.</param>
+ /// <param name="format">A SoundFormat object which indicates the PCM format for the data.</param>
+ /// <param name="chunkSize">The size of data that should be read from the stream each time
+ /// new data is required.</param>
+ public StreamingSoundBuffer(Stream input, SoundFormat format, int chunkSize)
{
+ impl = Audio.Impl.CreateStreamingSoundBuffer(input, format);
+ stream = input;
+ ChunkSize = chunkSize;
+ }
+ /// <summary>
+ /// Returns the implementation object for the StreamingSoundBuffer.
+ /// </summary>
+ public StreamingSoundBufferImpl Impl
+ {
+ get { return impl; }
}
+
+ /// <summary>
+ /// Gets the stream which audio data is pulled from.
+ /// </summary>
+ public Stream BaseStream
+ {
+ get { return stream; }
+ }
+
+ /// <summary>
+ /// Starts playing of the sound.
+ /// </summary>
+ public void Play()
+ {
+ impl.Play();
+ }
+ /// <summary>
+ /// Stops playing of the sound.
+ /// </summary>
+ public void Stop()
+ {
+ impl.Stop();
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating how many bytes should be read from the
+ /// stream at a time. This may only be set when the audio is stopped.
+ /// </summary>
+ public int ChunkSize
+ {
+ get { return impl.ChunkSize; }
+ set { impl.ChunkSize = value; }
+ }
+
+ /// <summary>
+ /// Gets a bool indicating whether or not the streaming buffer is playing audio.
+ /// </summary>
+ public bool IsPlaying
+ {
+ get { return impl.IsPlaying; }
+ }
}
}
Modified: trunk/Drivers/AgateSDX/AgateSDX.csproj
===================================================================
--- trunk/Drivers/AgateSDX/AgateSDX.csproj 2009-12-28 19:44:19 UTC (rev 1165)
+++ trunk/Drivers/AgateSDX/AgateSDX.csproj 2009-12-28 20:50:32 UTC (rev 1166)
@@ -150,6 +150,10 @@
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="XAud2\XAudio2_Music.cs" />
+ <Compile Include="XAud2\XAudio2_SoundBuffer.cs" />
+ <Compile Include="XAud2\XAudio2_SoundBufferSession.cs" />
+ <Compile Include="XAud2\XAudio2_StreamingSoundBuffer.cs" />
<EmbeddedResource Include="frmFullScreen.resx">
<SubType>Designer</SubType>
<DependentUpon>frmFullScreen.cs</DependentUpon>
Modified: trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs
===================================================================
--- trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs 2009-12-28 19:44:19 UTC (rev 1165)
+++ trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs 2009-12-28 20:50:32 UTC (rev 1166)
@@ -66,35 +66,38 @@
public override SoundBufferImpl CreateSoundBuffer(Stream inStream)
{
- return new SDX_SoundBuffer(this, inStream);
+ return new XAudio2_SoundBuffer(this, inStream);
}
public override MusicImpl CreateMusic(System.IO.Stream musicStream)
{
CheckCoop();
- return new SDX_Music(this, musicStream);
+ return new XAudio2_Music(this, musicStream);
}
public override MusicImpl CreateMusic(string filename)
{
CheckCoop();
- return new SDX_Music(this, filename);
+ return new XAudio2_Music(this, filename);
}
public override SoundBufferImpl CreateSoundBuffer(string filename)
{
CheckCoop();
- return new SDX_SoundBuffer(this, filename);
+ return new XAudio2_SoundBuffer(this, filename);
}
public override SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferImpl buffer)
{
CheckCoop();
- return new SDX_SoundBufferSession(this, buffer as SDX_SoundBuffer);
+ return new XAudio2_SoundBufferSession(this, buffer as XAudio2_SoundBuffer);
}
+ public override StreamingSoundBufferImpl CreateStreamingSoundBuffer(Stream input, SoundFormat format)
+ {
+ return new XAudio2_StreamingSoundBuffer(this, input, format);
+ }
-
/// <summary>
/// hack to make sure the cooperative level is set after a window is created.
/// Is this necessary with XAudio2?
@@ -109,382 +112,4 @@
}
}
- public class SDX_SoundBuffer : SoundBufferImpl
- {
- XAudio2_Audio mAudio;
- AudioBuffer mBuffer;
- double mVolume;
- WaveFormat mFormat;
- MemoryStream mem;
- byte[] buffer;
-
- public SDX_SoundBuffer(XAudio2_Audio audio, Stream inStream)
- {
- mAudio = audio;
-
- WaveStream stream = new WaveStream(inStream);
-
- mBuffer = new AudioBuffer();
- mBuffer.AudioData = stream;
- mBuffer.AudioBytes = (int)stream.Length;
- mBuffer.Flags = BufferFlags.EndOfStream;
-
- mFormat = stream.Format;
- }
-
- public SDX_SoundBuffer(XAudio2_Audio audio, string filename)
- : this(audio, File.OpenRead(filename))
- {
-
- }
-
- public override bool Loop { get; set; }
-
- public override void Dispose()
- {
- mBuffer.Dispose();
- }
-
- public AudioBuffer Buffer
- {
- get { return mBuffer; }
- }
- public WaveFormat Format
- {
- get { return mFormat; }
- }
-
- public override double Volume
- {
- get { return mVolume; }
- set { mVolume = value; }
- }
- }
- public class SDX_SoundBufferSession : SoundBufferSessionImpl
- {
- SDX_SoundBuffer mSource;
- XAudio2_Audio mAudio;
- AudioBuffer mBuffer;
- SourceVoice mVoice;
- double mVolume;
- double mPan;
- bool mIsPlaying;
- bool mLoop = false;
- bool mDisposing = false;
-
- public SDX_SoundBufferSession(XAudio2_Audio audio, SDX_SoundBuffer source)
- {
- mAudio = audio;
- mSource = source;
- mBuffer = source.Buffer;
- mVolume = source.Volume;
- mLoop = source.Loop;
-
- mVoice = new SourceVoice(mAudio.Device, mSource.Format);
- mVoice.BufferEnd += new EventHandler<ContextEventArgs>(mVoice_BufferEnd);
-
- }
-
- void mVoice_BufferEnd(object sender, ContextEventArgs e)
- {
- if (mDisposing)
- {
- mVoice.Dispose();
- return;
- }
-
- if (mLoop)
- {
- mVoice.SubmitSourceBuffer(mBuffer);
- }
- else
- {
- mIsPlaying = false;
- }
- }
- public override void Dispose()
- {
- mLoop = false;
- mVoice.Stop();
-
- mDisposing = true;
- }
-
- protected override void Initialize()
- {
- mVoice.Stop();
- mVoice.SubmitSourceBuffer(mBuffer);
- }
-
- public override int CurrentLocation
- {
- get
- {
- return (int)mVoice.State.SamplesPlayed;
- }
- }
- public override void Play()
- {
- mVoice.Stop();
- mVoice.Start();
- mIsPlaying = true;
- }
-
- public override void Stop()
- {
- mVoice.Stop();
-
- }
-
- public override double Volume
- {
- get { return mVolume; }
- set
- {
- mVoice.Volume = (float)value;
- mVolume = value;
- }
- }
-
- public override bool IsPlaying
- {
- get
- {
- return mIsPlaying;
- }
- }
-
- float[] channelVolumes = new float[2];
- public override double Pan
- {
- get { return mPan; }
- set
- {
- mPan = value;
- mVoice.SetChannelVolumes(2, GetChannelVolumes((float)value));
- }
- }
-
- private float[] GetChannelVolumes(float pan)
- {
- if (pan < 0)
- {
- channelVolumes[0] = 1;
- channelVolumes[1] = 1 + pan;
- }
- else
- {
- channelVolumes[0] = 1 - pan;
- channelVolumes[1] = 1;
- }
-
- return channelVolumes;
- }
-
- }
- public class SDX_Music : MusicImpl
- {
- XAudio2_Audio mAudio;
-
- public SDX_Music(XAudio2_Audio audio, string filename)
- {
- mAudio = audio;
-
- if (System.IO.Path.GetExtension(filename) == ".mp3")
- throw new Exception("MP3 files cannot be played due to license restrictions.");
-
- //LoadMusic(filename);
- }
-
- public SDX_Music(XAudio2_Audio audio, Stream infile)
- {
- mAudio = audio;
-
- //string tempfile = Path.GetTempFileName();
- //using (FileStream writer = File.OpenWrite(tempfile))
- //{
- // ReadWriteStream(infile, writer);
- //}
-
- //try
- //{
- // LoadMusic(tempfile);
- //}
- //catch (Microsoft.DirectX.DirectXException e)
- //{
- // throw new AgateLib.AgateException(
- // "Could not load the music file. The file format may be unsupported by DirectX.", e);
- //}
- //finally
- //{
- // File.Delete(tempfile);
- //}
- }
- /*
- private void LoadMusic(string filename)
- {
- mAVAudio = new Microsoft.DirectX.AudioVideoPlayback.Audio(filename);
- mAVAudio.Ending += new EventHandler(mAVAudio_Ending);
- }
-
- private void ReadWriteStream(Stream readStream, Stream writeStream)
- {
- int Length = 256;
- Byte[] buffer = new Byte[Length];
- int bytesRead = readStream.Read(buffer, 0, Length);
- // write the required bytes
- while (bytesRead > 0)
- {
- writeStream.Write(buffer, 0, bytesRead);
- bytesRead = readStream.Read(buffer, 0, Length);
- }
- readStream.Close();
- writeStream.Close();
- }
-
- public override void Dispose()
- {
- mAVAudio.Dispose();
- }
-
-
- protected override void OnSetLoop(bool value)
- {
- if (value == true)
- mAVAudio.Ending += mAVAudio_Ending;
- else
- mAVAudio.Ending -= mAVAudio_Ending;
- }
-
- public override void Play()
- {
- mAVAudio.Play();
- }
-
- public override void Stop()
- {
- mAVAudio.Stop();
- }
-
- /// <summary>
- /// </summary>
- public override double Volume
- {
- get
- {
- try
- {
- /// The DirectX AudioVideoPlayback object takes volume in the range of
- /// -10000 to 0, indicating the number of hundredths of decibels the volume
- /// is attenuated by, so we convert to zero to 1.
-
- double vol = (double)(mAVAudio.Volume + 10000) / 10000;
- // logarithmic volume control
- return Audio.TransformByExp(vol);
- }
- catch (Microsoft.DirectX.DirectXException e)
- {
- System.Diagnostics.Debug.WriteLine("Failed to read volume.");
- System.Diagnostics.Debug.WriteLine(e.Message);
- return 1.0;
- }
- }
- set
- {
- // do a logarithmic volume control
- try
- {
- mAVAudio.Volume = (int)(Audio.TransformByLog(value) * 10000.0 - 10000.0);
- }
- catch (Microsoft.DirectX.DirectXException e)
- {
- System.Diagnostics.Debug.WriteLine("Failed to set volume.");
- System.Diagnostics.Debug.WriteLine(e.Message);
- }
- }
- }
-
-
- void mAVAudio_Ending(object sender, EventArgs e)
- {
- if (IsLooping)
- {
- mAVAudio.CurrentPosition = 0;
- }
- }
-
- public override bool IsPlaying
- {
- get { return mAVAudio.Playing; }
- }
-
- public override double Pan
- {
- get
- {
- return mAVAudio.Balance / (double)10000.0;
- }
- set
- {
- try
- {
- mAVAudio.Balance = (int)(value * 10000.0);
- }
- catch (Microsoft.DirectX.DirectXException e)
- {
- if (e.ErrorCode != -2147220909)
- throw e;
- }
- }
- }
- * */
- public override void Dispose()
- {
- throw new NotImplementedException();
- }
-
- public override bool IsPlaying
- {
- get { throw new NotImplementedException(); }
- }
-
- protected override void OnSetLoop(bool value)
- {
- throw new NotImplementedException();
- }
-
- public override double Pan
- {
- get
- {
- throw new NotImplementedException();
- }
- set
- {
- throw new NotImplementedException();
- }
- }
-
- public override void Play()
- {
- throw new NotImplementedException();
- }
-
- public override void Stop()
- {
- throw new NotImplementedException();
- }
-
- public override double Volume
- {
- get
- {
- throw new NotImplementedException();
- }
- set
- {
- throw new NotImplementedException();
- }
- }
- }
}
Added: trunk/Drivers/AgateSDX/XAud2/XAudio2_Music.cs
===================================================================
--- trunk/Drivers/AgateSDX/XAud2/XAudio2_Music.cs (rev 0)
+++ trunk/Drivers/AgateSDX/XAud2/XAudio2_Music.cs 2009-12-28 20:50:32 UTC (rev 1166)
@@ -0,0 +1,238 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Text;
+using AgateLib.AudioLib;
+using AgateLib.AudioLib.ImplementationBase;
+using AgateLib.Drivers;
+using SlimDX.XAudio2;
+using SlimDX.Multimedia;
+
+namespace AgateSDX.XAud2
+{
+
+ public class XAudio2_Music : MusicImpl
+ {
+ XAudio2_Audio mAudio;
+
+ public XAudio2_Music(XAudio2_Audio audio, string filename)
+ {
+ mAudio = audio;
+
+ if (System.IO.Path.GetExtension(filename) == ".mp3")
+ throw new Exception("MP3 files cannot be played due to license restrictions.");
+
+ //LoadMusic(filename);
+ }
+
+ public XAudio2_Music(XAudio2_Audio audio, Stream infile)
+ {
+ mAudio = audio;
+
+ //string tempfile = Path.GetTempFileName();
+ //using (FileStream writer = File.OpenWrite(tempfile))
+ //{
+ // ReadWriteStream(infile, writer);
+ //}
+
+ //try
+ //{
+ // LoadMusic(tempfile);
+ //}
+ //catch (Microsoft.DirectX.DirectXException e)
+ //{
+ // throw new AgateLib.AgateException(
+ // "Could not load the music file. The file format may be unsupported by DirectX.", e);
+ //}
+ //finally
+ //{
+ // File.Delete(tempfile);
+ //}
+ }
+ /*
+ private void LoadMusic(string filename)
+ {
+ mAVAudio = new Microsoft.DirectX.AudioVideoPlayback.Audio(filename);
+ mAVAudio.Ending += new EventHandler(mAVAudio_Ending);
+ }
+
+ private void ReadWriteStream(Stream readStream, Stream writeStream)
+ {
+ int Length = 256;
+ Byte[] buffer = new Byte[Length];
+ int bytesRead = readStream.Read(buffer, 0, Length);
+ // write the required bytes
+ while (bytesRead > 0)
+ {
+ writeStream.Write(buffer, 0, bytesRead);
+ bytesRead = readStream.Read(buffer, 0, Length);
+ }
+ readStream.Close();
+ writeStream.Close();
+ }
+
+ public override void Dispose()
+ {
+ mAVAudio.Dispose();
+ }
+
+
+ protected override void OnSetLoop(bool value)
+ {
+ if (value == true)
+ mAVAudio.Ending += mAVAudio_Ending;
+ else
+ mAVAudio.Ending -= mAVAudio_Ending;
+ }
+
+ public override void Play()
+ {
+ mAVAudio.Play();
+ }
+
+ public override void Stop()
+ {
+ mAVAudio.Stop();
+ }
+
+ /// <summary>
+ /// </summary>
+ public override double Volume
+ {
+ get
+ {
+ try
+ {
+ /// The DirectX AudioVideoPlayback object takes volume in the range of
+ /// -10000 to 0, indicating the number of hundredths of decibels the volume
+ /// is attenuated by, so we convert to zero to 1.
+
+ double vol = (double)(mAVAudio.Volume + 10000) / 10000;
+ // logarithmic volume control
+ return Audio.TransformByExp(vol);
+ }
+ catch (Microsoft.DirectX.DirectXException e)
+ {
+ System.Diagnostics.Debug.WriteLine("Failed to read volume.");
+ System.Diagnostics.Debug.WriteLine(e.Message);
+ return 1.0;
+ }
+ }
+ set
+ {
+ // do a logarithmic volume control
+ try
+ {
+ mAVAudio.Volume = (int)(Audio.TransformByLog(value) * 10000.0 - 10000.0);
+ }
+ catch (Microsoft.DirectX.DirectXException e)
+ {
+ System.Diagnostics.Debug.WriteLine("Failed to set volume.");
+ System.Diagnostics.Debug.WriteLine(e.Message);
+ }
+ }
+ }
+
+
+ void mAVAudio_Ending(object sender, EventArgs e)
+ {
+ if (IsLooping)
+ {
+ mAVAudio.CurrentPosition = 0;
+ }
+ }
+
+ public override bool IsPlaying
+ {
+ get { return mAVAudio.Playing; }
+ }
+
+ public override double Pan
+ {
+ get
+ {
+ return mAVAudio.Balance / (double)10000.0;
+ }
+ set
+ {
+ try
+ {
+ mAVAudio.Balance = (int)(value * 10000.0);
+ }
+ catch (Microsoft.DirectX.DirectXException e)
+ {
+ if (e.ErrorCode != -2147220909)
+ throw e;
+ }
+ }
+ }
+ * */
+ public override void Dispose()
+ {
+ throw new NotImplementedException();
+ }
+
+ public override bool IsPlaying
+ {
+ get { throw new NotImplementedException(); }
+ }
+
+ protected override void OnSetLoop(bool value)
+ {
+ throw new NotImplementedException();
+ }
+
+ public override double Pan
+ {
+ get
+ {
+ throw new NotImplementedException();
+ }
+ set
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ public override void Play()
+ {
+ throw new NotImplementedException();
+ }
+
+ public override void Stop()
+ {
+ throw new NotImplementedException();
+ }
+
+ public override double Volume
+ {
+ get
+ {
+ throw new NotImplementedException();
+ }
+ set
+ {
+ throw new NotImplementedException();
+ }
+ }
+ }
+}
Added: trunk/Drivers/AgateSDX/XAud2/XAudio2_SoundBuffer.cs
===================================================================
--- trunk/Drivers/AgateSDX/XAud2/XAudio2_SoundBuffer.cs (rev 0)
+++ trunk/Drivers/AgateSDX/XAud2/XAudio2_SoundBuffer.cs 2009-12-28 20:50:32 UTC (rev 1166)
@@ -0,0 +1,80 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Text;
+using AgateLib.AudioLib;
+using AgateLib.AudioLib.ImplementationBase;
+using AgateLib.Drivers;
+using SlimDX.XAudio2;
+using SlimDX.Multimedia;
+
+namespace AgateSDX.XAud2
+{
+ public class XAudio2_SoundBuffer : SoundBufferImpl
+ {
+ XAudio2_Audio mAudio;
+ AudioBuffer mBuffer;
+ double mVolume;
+ WaveFormat mFormat;
+
+ public XAudio2_SoundBuffer(XAudio2_Audio audio, Stream inStream)
+ {
+ mAudio = audio;
+
+ WaveStream stream = new WaveStream(inStream);
+
+ mBuffer = new AudioBuffer();
+ mBuffer.AudioData = stream;
+ mBuffer.AudioBytes = (int)stream.Length;
+
+ mFormat = stream.Format;
+ }
+
+ public XAudio2_SoundBuffer(XAudio2_Audio audio, string filename)
+ : this(audio, File.OpenRead(filename))
+ {
+
+ }
+
+ public override bool Loop { get; set; }
+
+ public override void Dispose()
+ {
+ mBuffer.Dispose();
+ }
+
+ public AudioBuffer Buffer
+ {
+ get { return mBuffer; }
+ }
+ public WaveFormat Format
+ {
+ get { return mFormat; }
+ }
+
+ public override double Volume
+ {
+ get { return mVolume; }
+ set { mVolume = value; }
+ }
+ }
+}
Added: trunk/Drivers/AgateSDX/XAud2/XAudio2_SoundBufferSession.cs
===================================================================
--- trunk/Drivers/AgateSDX/XAud2/XAudio2_SoundBufferSession.cs (rev 0)
+++ trunk/Drivers/AgateSDX/XAud2/XAudio2_SoundBufferSession.cs 2009-12-28 20:50:32 UTC (rev 1166)
@@ -0,0 +1,155 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+// License for the specific language governing rights and limitations
+// under the License.
+//
+// The Original Code is AgateLib.
+//
+// The Initial Developer of the Original Code is Erik Ylvisaker.
+// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
+// All Rights Reserved.
+//
+// Contributor(s): Erik Ylvisaker
+//
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Text;
+using AgateLib.AudioLib;
+using AgateLib.AudioLib.ImplementationBase;
+using AgateLib.Drivers;
+using SlimDX.XAudio2;
+using SlimDX.Multimedia;
+
+namespace AgateSDX.XAud2
+{
+
+ public class XAudio2_SoundBufferSession : SoundBufferSessionImpl
+ {
+ XAudio2_SoundBuffer mSource;
+ XAudio2_Audio mAudio;
+ AudioBuffer mBuffer;
+ SourceVoice mVoice;
+ double mVolume;
+ double mPan;
+ bool mIsPlaying;
+ bool mLoop = false;
+ bool mDisposing = false;
+
+ public XAudio2_SoundBufferSession(XAudio2_Audio audio, XAudio2_SoundBuffer source)
+ {
+ mAudio = audio;
+ mSource = source;
+ mBuffer = source.Buffer;
+ mVolume = source.Volume;
+ mLoop = source.Loop;
+
+ mVoice = new SourceVoice(mAudio.Device, mSource.Format);
+ mVoice.BufferEnd += new EventHandler<ContextEventArgs>(mVoice_BufferEnd);
+
+ }
+
+ void mVoice_BufferEnd(object sender, ContextEventArgs e)
+ {
+ if (mDisposing)
+ {
+ mVoice.Dispose();
+ return;
+ }
+
+ if (mLoop)
+ {
+ mVoice.SubmitSourceBuffer(mBuffer);
+ }
+ else
+ {
+ mIsPlaying = false;
+ }
+ }
+ public override void Dispose()
+ {
+ mLoop = false;
+ mVoice.Stop();
+
+ mDisposing = true;
+ }
+
+ protected override void Initialize()
+ {
+ mVoice.Stop();
+ mVoice.SubmitSourceBuffer(mBuffer);
+ }
+
+ public override int CurrentLocation
+ {
+ get
+ {
+ return (int)mVoice.State.SamplesPlayed;
+ }
+ }
+ public override void Play()
+ {
+ mVoice.Stop();
+ mVoice.Start();
+ mIsPlaying = true;
+ }
+
+ public override void Stop()
+ {
+ mVoice.Stop();
+
+ }
+
+ public override double Volume
+ {
+ get { return mVolume; }
+ set
+ {
+ mVoice.Volume = (float)value;
+ mVolume = value;
+ }
+ }
+
+ public override bool IsPlaying
+ {
+ get
+ {
+ return mIsPlaying;
+ }
+ }
+
+ float[] channelVolumes = new float[2];
+ public override double Pan
+ {
+ get { return mPan; }
+ set
+ {
+ mPan = value;
+ mVoice.SetChannelVolumes(2, GetChannelVolumes((float)value));
+ }
+ }
+
+ private float[] GetChannelVolumes(float pan)
+ {
+ if (pan < 0)
+ {
+ channelVolumes[0] = 1;
+ channelVolumes[1] = 1 + pan;
+ }
+ else
+ {
+ channelVolumes[0] = 1 - pan;
+ channelVolumes[1] = 1;
+ }
+
+ return channelVolumes;
+ }
+
+ }
+}
Added: trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs
===================================================================
--- trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs (rev 0)
+++ trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs 2009-12-28 20:50:32 UTC (rev 1166)
@@ -0,0 +1,162 @@
+// The contents of this file are subject to the Mozilla Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or i...
[truncated message content] |
|
From: <ka...@us...> - 2009-12-28 21:42:14
|
Revision: 1167
http://agate.svn.sourceforge.net/agate/?rev=1167&view=rev
Author: kanato
Date: 2009-12-28 21:42:05 +0000 (Mon, 28 Dec 2009)
Log Message:
-----------
Implement disposal and panning of StreamingSoundBuffer.
Modified Paths:
--------------
trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs
trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs
trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs
Modified: trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs
===================================================================
--- trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs 2009-12-28 20:50:32 UTC (rev 1166)
+++ trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs 2009-12-28 21:42:05 UTC (rev 1167)
@@ -45,5 +45,18 @@
/// Gets a value indiciating whether or not audio is playing.
/// </summary>
public abstract bool IsPlaying { get; }
+
+ /// <summary>
+ /// Releases resources.
+ /// </summary>
+ public abstract void Dispose();
+
+ /// <summary>
+ /// Gets or sets the left-right balance.
+ /// -1 is left speaker
+ /// 0 is middle (both)
+ /// 1 is right.
+ /// </summary>
+ public abstract double Pan { get; set; }
}
}
Modified: trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs
===================================================================
--- trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs 2009-12-28 20:50:32 UTC (rev 1166)
+++ trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs 2009-12-28 21:42:05 UTC (rev 1167)
@@ -28,7 +28,7 @@
/// <summary>
/// Class which streams PCM audio data.
/// </summary>
- public class StreamingSoundBuffer
+ public class StreamingSoundBuffer : IDisposable
{
StreamingSoundBufferImpl impl;
Stream stream;
@@ -48,6 +48,14 @@
}
/// <summary>
+ /// Releases resources.
+ /// </summary>
+ public void Dispose()
+ {
+ Impl.Dispose();
+ }
+
+ /// <summary>
/// Returns the implementation object for the StreamingSoundBuffer.
/// </summary>
public StreamingSoundBufferImpl Impl
@@ -95,5 +103,18 @@
{
get { return impl.IsPlaying; }
}
+
+ /// <summary>
+ /// Gets or sets the left-right balance that will be used in new sessions.
+ /// -1 is entirely in the left speaker,
+ /// 0 is equally in both and,
+ /// 1 is entirely in the right speaker.
+ /// </summary>
+ public double Pan
+ {
+ get { return impl.Pan; }
+ set { impl.Pan = value; }
+ }
+
}
}
Modified: trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs
===================================================================
--- trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs 2009-12-28 20:50:32 UTC (rev 1166)
+++ trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs 2009-12-28 21:42:05 UTC (rev 1167)
@@ -39,6 +39,7 @@
BufferData[] buffer;
bool mPlaying;
int mNextData;
+ double mPan;
int mChunkSize;
@@ -77,6 +78,18 @@
}
}
+ public override void Dispose()
+ {
+ try
+ {
+ mVoice.Stop();
+ mVoice.Dispose();
+ }
+ catch
+ {
+
+ }
+ }
void mVoice_BufferEnd(object sender, ContextEventArgs e)
{
ReadAndSubmitNextData();
@@ -158,5 +171,32 @@
{
get { return mPlaying; }
}
+
+ float[] channelVolumes = new float[2];
+ public override double Pan
+ {
+ get { return mPan; }
+ set
+ {
+ mPan = value;
+ mVoice.SetChannelVolumes(2, GetChannelVolumes((float)value));
+ }
+ }
+
+ private float[] GetChannelVolumes(float pan)
+ {
+ if (pan < 0)
+ {
+ channelVolumes[0] = 1;
+ channelVolumes[1] = 1 + pan;
+ }
+ else
+ {
+ channelVolumes[0] = 1 - pan;
+ channelVolumes[1] = 1;
+ }
+
+ return channelVolumes;
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-01-02 18:07:42
|
Revision: 1173
http://agate.svn.sourceforge.net/agate/?rev=1173&view=rev
Author: kanato
Date: 2010-01-02 18:07:36 +0000 (Sat, 02 Jan 2010)
Log Message:
-----------
Make XAudio2 calls run on their own thread.
Change interpretation of ChunkSize to be number of samples.
Modified Paths:
--------------
trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs
trunk/Drivers/AgateSDX/AgateSDX.csproj
trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs
trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs
Modified: trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs
===================================================================
--- trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs 2009-12-31 08:12:05 UTC (rev 1172)
+++ trunk/AgateLib/AudioLib/StreamingSoundBuffer.cs 2010-01-02 18:07:36 UTC (rev 1173)
@@ -38,7 +38,7 @@
/// </summary>
/// <param name="input">The stream from which audio data will be pulled from.</param>
/// <param name="format">A SoundFormat object which indicates the PCM format for the data.</param>
- /// <param name="chunkSize">The size of data that should be read from the stream each time
+ /// <param name="chunkSize">The number of samples from each channel that should be read from the stream each time
/// new data is required.</param>
public StreamingSoundBuffer(Stream input, SoundFormat format, int chunkSize)
{
@@ -87,7 +87,7 @@
}
/// <summary>
- /// Gets or sets a value indicating how many bytes should be read from the
+ /// Gets or sets a value indicating how many samples should be read from the
/// stream at a time. This may only be set when the audio is stopped.
/// </summary>
public int ChunkSize
Modified: trunk/Drivers/AgateSDX/AgateSDX.csproj
===================================================================
--- trunk/Drivers/AgateSDX/AgateSDX.csproj 2009-12-31 08:12:05 UTC (rev 1172)
+++ trunk/Drivers/AgateSDX/AgateSDX.csproj 2010-01-02 18:07:36 UTC (rev 1173)
@@ -1,7 +1,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{EF993B30-D9A9-4962-80BB-6826D39B3465}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -65,6 +65,24 @@
<NoWarn>
</NoWarn>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="SlimDX, Version=2.0.8.42, Culture=neutral, PublicKeyToken=b1b0c32fd1ffe4f9, processorArchitecture=x86" />
<Reference Include="System">
Modified: trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs
===================================================================
--- trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs 2009-12-31 08:12:05 UTC (rev 1172)
+++ trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs 2010-01-02 18:07:36 UTC (rev 1173)
@@ -21,6 +21,7 @@
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
+using System.Threading;
using AgateLib.AudioLib;
using AgateLib.AudioLib.ImplementationBase;
using AgateLib.Drivers;
@@ -33,6 +34,8 @@
{
XAudio2 mDevice;
MasteringVoice masteringVoice;
+ Thread xaudThread;
+ bool stopThread;
public XAudio2 Device
{
@@ -48,20 +51,97 @@
{
Report("SlimDX XAudio2 driver instantiated for audio.");
+ xaudThread = new Thread(Run);
+ xaudThread.Start();
+ }
- mDevice = new XAudio2();//XAudio2Flags.DebugEngine, ProcessorSpecifier.AnyProcessor);
+ public bool InvokeRequired
+ {
+ get
+ {
+ if (Thread.CurrentThread == xaudThread)
+ return false;
+ else
+ return true;
+ }
+ }
+
+ struct invk
+ {
+ public Delegate method;
+ public object[] args;
+ }
+
+ public void BeginInvoke(Delegate method, params object[] args)
+ {
+ invk k = new invk { method = method, args = args };
+
+ lock (invokeMethod)
+ {
+ invokeMethod.Add(k);
+ }
+ }
+
+ List<invk> invokeMethod = new List<invk>();
+
+ void Run(object unused)
+ {
+ mDevice = new XAudio2();
masteringVoice = new MasteringVoice(mDevice);
+ for (; ; )
+ {
+ lock (invokeMethod)
+ {
+ while (invokeMethod.Count > 0)
+ {
+ if (stopThread)
+ break;
+
+ invk k = invokeMethod[0];
+ invokeMethod.RemoveAt(0);
+
+ k.method.DynamicInvoke(k.args);
+
+ }
+ }
+
+ if (stopThread)
+ break;
+
+ Thread.Sleep(1);
+
+ }
+
+ Dispose();
}
+
+
public override void Dispose()
{
+ if (InvokeRequired)
+ {
+ stopThread = true;
+
+ int count = 0;
+
+ while (xaudThread.ThreadState == ThreadState.Running)
+ {
+ Thread.Sleep(10);
+ count++;
+
+ if (count > 20)
+ {
+ xaudThread.Abort();
+ }
+ }
+
+ return;
+ }
+
// hack because there is access violation when XAudio2 shuts down?
- try
- {
- mDevice.Dispose();
- }
- catch
- { }
+ masteringVoice.Dispose();
+ mDevice.Dispose();
}
public override SoundBufferImpl CreateSoundBuffer(Stream inStream)
@@ -71,45 +151,26 @@
public override MusicImpl CreateMusic(System.IO.Stream musicStream)
{
- CheckCoop();
-
return new XAudio2_Music(this, musicStream);
}
public override MusicImpl CreateMusic(string filename)
{
- CheckCoop();
-
return new XAudio2_Music(this, filename);
}
public override SoundBufferImpl CreateSoundBuffer(string filename)
{
- CheckCoop();
-
return new XAudio2_SoundBuffer(this, filename);
}
public override SoundBufferSessionImpl CreateSoundBufferSession(SoundBufferImpl buffer)
{
- CheckCoop();
-
return new XAudio2_SoundBufferSession(this, buffer as XAudio2_SoundBuffer);
}
public override StreamingSoundBufferImpl CreateStreamingSoundBuffer(Stream input, SoundFormat format)
{
return new XAudio2_StreamingSoundBuffer(this, input, format);
}
-
- /// <summary>
- /// hack to make sure the cooperative level is set after a window is created.
- /// Is this necessary with XAudio2?
- /// </summary>
- private void CheckCoop()
- {
- if (System.Windows.Forms.Form.ActiveForm != null)
- {
- //mDSobject.SetCooperativeLevel(System.Windows.Forms.Form.ActiveForm.Handle,
- // CooperativeLevel.Priority);
- }
- }
}
+ public delegate void DisposeDelegate();
+
}
Modified: trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs
===================================================================
--- trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs 2009-12-31 08:12:05 UTC (rev 1172)
+++ trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs 2010-01-02 18:07:36 UTC (rev 1173)
@@ -41,6 +41,7 @@
int mNextData;
double mPan;
BinaryWriter w;
+ bool mIsDisposed;
int mChunkSize;
@@ -53,52 +54,82 @@
public byte[] backing;
}
+ static int count = 0;
+
public XAudio2_StreamingSoundBuffer(XAudio2_Audio audio, Stream input, SoundFormat format)
{
mAudio = audio;
mInput = input;
mFormat = format;
+ Initialize();
+ }
+ public bool InvokeRequired
+ {
+ get { return mAudio.InvokeRequired; }
+ }
+ public void BeginInvoke(Delegate method, params object[] args)
+ {
+ mAudio.BeginInvoke(method, args);
+ }
+
+ private void Initialize()
+ {
+ if (InvokeRequired)
+ {
+ BeginInvoke(new DisposeDelegate(Initialize));
+ return;
+ }
+
xaudFormat = new WaveFormat();
- xaudFormat.BitsPerSample = (short) mFormat.BitsPerSample;
+ xaudFormat.BitsPerSample = (short)mFormat.BitsPerSample;
xaudFormat.Channels = (short)mFormat.Channels;
xaudFormat.BlockAlignment = (short)(mFormat.Channels * mFormat.BitsPerSample / 8);
xaudFormat.FormatTag = WaveFormatTag.Pcm;
- xaudFormat.SamplesPerSecond = format.SamplingFrequency;
+ xaudFormat.SamplesPerSecond = mFormat.SamplingFrequency;
xaudFormat.AverageBytesPerSecond = xaudFormat.BlockAlignment * xaudFormat.SamplesPerSecond;
- mVoice = new SourceVoice(audio.Device, xaudFormat);
+ mVoice = new SourceVoice(mAudio.Device, xaudFormat);
mVoice.BufferEnd += new EventHandler<ContextEventArgs>(mVoice_BufferEnd);
buffer = new BufferData[bufferCount];
for (int i = 0; i < bufferCount; i++)
{
buffer[i] = new BufferData();
+ buffer[i].ms = new MemoryStream();
buffer[i].buffer = new AudioBuffer();
- buffer[i].ms = new MemoryStream();
+ buffer[i].buffer.Flags = BufferFlags.EndOfStream;
}
- string tempFileName = Path.GetTempFileName();
+ string tempFileName = string.Format("xaudio2_buffer{0}.pcm", count);
+ count++;
- w = new BinaryWriter(File.Open(tempFileName + ".pcm", FileMode.Create));
+ w = new BinaryWriter(File.Open(tempFileName, FileMode.Create));
Pan = 0;
}
public override void Dispose()
{
- try
+ if (InvokeRequired)
{
- w.BaseStream.Dispose();
+ BeginInvoke(new DisposeDelegate(Initialize));
+ return;
+ }
- mVoice.Stop();
- mVoice.Dispose();
+ mIsDisposed = true;
+
+ w.BaseStream.Dispose();
+
+ foreach (var b in buffer)
+ {
+ b.buffer.Dispose();
}
- catch
- {
- }
+ mVoice.Stop();
+ mVoice.Dispose();
}
+
void mVoice_BufferEnd(object sender, ContextEventArgs e)
{
ReadAndSubmitNextData();
@@ -106,6 +137,9 @@
private void ReadAndSubmitNextData()
{
+ if (mIsDisposed)
+ return;
+
ReadData(buffer[mNextData]);
SubmitData(buffer[mNextData]);
@@ -117,6 +151,12 @@
public override void Play()
{
+ if (InvokeRequired)
+ {
+ BeginInvoke(new DisposeDelegate(Play));
+ return;
+ }
+
mNextData = 0;
ReadAndSubmitNextData();
ReadAndSubmitNextData();
@@ -127,6 +167,12 @@
public override void Stop()
{
+ if (InvokeRequired)
+ {
+ BeginInvoke(new DisposeDelegate(Stop));
+ return;
+ }
+
mPlaying = false;
mVoice.Stop();
@@ -156,26 +202,36 @@
}
set
{
- if (value <= xaudFormat.BlockAlignment)
- throw new ArgumentOutOfRangeException(string.Format(
- "Chunk size is too small. Must be multiple of {0} but was {1}.",
- xaudFormat.BlockAlignment, value));
+ mChunkSize = value;
- if (value % xaudFormat.BlockAlignment != 0)
- throw new ArgumentException(string.Format(
- "Chunk size {0} was not a multiple of the block alignment {1}.",
- value, xaudFormat.BlockAlignment));
+ ResizeBacking();
- mChunkSize = value;
+ }
+ }
- for (int i = 0; i < buffer.Length; i++)
- {
- buffer[i].backing = new byte[mChunkSize];
- buffer[i].ms = new MemoryStream(buffer[i].backing);
- }
+ int ChunkByteSize
+ {
+ get
+ {
+ return ChunkSize * xaudFormat.BlockAlignment;
}
}
+ private void ResizeBacking()
+ {
+ if (InvokeRequired)
+ {
+ BeginInvoke(new DisposeDelegate(ResizeBacking));
+ return;
+ }
+
+ for (int i = 0; i < buffer.Length; i++)
+ {
+ buffer[i].backing = new byte[ChunkByteSize];
+ buffer[i].ms = new MemoryStream(buffer[i].backing);
+ }
+ }
+
public override bool IsPlaying
{
get { return mPlaying; }
@@ -188,10 +244,21 @@
set
{
mPan = value;
- mVoice.SetChannelVolumes(2, GetChannelVolumes((float)value));
+ ResetChannelVolumes();
}
}
+ private void ResetChannelVolumes()
+ {
+ if (InvokeRequired)
+ {
+ BeginInvoke(new DisposeDelegate(ResetChannelVolumes));
+ return;
+ }
+
+ mVoice.SetChannelVolumes(2, GetChannelVolumes((float)mPan));
+ }
+
private float[] GetChannelVolumes(float pan)
{
if (pan < 0)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-01-02 21:35:45
|
Revision: 1174
http://agate.svn.sourceforge.net/agate/?rev=1174&view=rev
Author: kanato
Date: 2010-01-02 21:35:38 +0000 (Sat, 02 Jan 2010)
Log Message:
-----------
Refactor some XAudio2 threading stuff.
Modified Paths:
--------------
trunk/AgateLib/AudioLib/SoundFormat.cs
trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs
trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs
Modified: trunk/AgateLib/AudioLib/SoundFormat.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundFormat.cs 2010-01-02 18:07:36 UTC (rev 1173)
+++ trunk/AgateLib/AudioLib/SoundFormat.cs 2010-01-02 21:35:38 UTC (rev 1174)
@@ -50,5 +50,17 @@
{
return new SoundFormat { BitsPerSample = 16, Channels = 1, SamplingFrequency = samplingFrequency };
}
+ /// <summary>
+ /// Creates and returns a SoundFormat object
+ /// for a 16-bit, single channel stream at the
+ /// specified sampling frequency.
+ /// </summary>
+ /// <param name="samplingFrequency">The sampling frequency for the stream.</param>
+ /// <param name="channels">Number of channels in the audio stream.</param>
+ /// <returns></returns>
+ public static SoundFormat Pcm16(int samplingFrequency, int channels)
+ {
+ return new SoundFormat { BitsPerSample = 16, Channels = channels, SamplingFrequency = samplingFrequency };
+ }
}
}
Modified: trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs
===================================================================
--- trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs 2010-01-02 18:07:36 UTC (rev 1173)
+++ trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs 2010-01-02 21:35:38 UTC (rev 1174)
@@ -37,6 +37,14 @@
Thread xaudThread;
bool stopThread;
+ List<InvokeData> methodsToInvoke = new List<InvokeData>();
+
+ struct InvokeData
+ {
+ public Delegate method;
+ public object[] args;
+ }
+
public XAudio2 Device
{
get { return mDevice; }
@@ -55,6 +63,8 @@
xaudThread.Start();
}
+ #region --- Threading ---
+
public bool InvokeRequired
{
get
@@ -66,24 +76,25 @@
}
}
- struct invk
- {
- public Delegate method;
- public object[] args;
- }
public void BeginInvoke(Delegate method, params object[] args)
{
- invk k = new invk { method = method, args = args };
+ InvokeData k = new InvokeData { method = method, args = args };
- lock (invokeMethod)
+ lock (methodsToInvoke)
{
- invokeMethod.Add(k);
+ methodsToInvoke.Add(k);
}
}
- List<invk> invokeMethod = new List<invk>();
+ public void Invoke(Delegate method, object[] args)
+ {
+ BeginInvoke(method, args);
+ while (methodsToInvoke.Count > 0)
+ Thread.Sleep(1);
+ }
+
void Run(object unused)
{
mDevice = new XAudio2();
@@ -91,32 +102,34 @@
for (; ; )
{
- lock (invokeMethod)
+ int count = methodsToInvoke.Count;
+
+ for (int i = 0; i < count; i++)
{
- while (invokeMethod.Count > 0)
- {
- if (stopThread)
- break;
+ if (stopThread)
+ break;
- invk k = invokeMethod[0];
- invokeMethod.RemoveAt(0);
+ InvokeData k = methodsToInvoke[i];
- k.method.DynamicInvoke(k.args);
+ k.method.DynamicInvoke(k.args);
+ }
- }
+ lock (methodsToInvoke)
+ {
+ methodsToInvoke.RemoveRange(0, count);
}
if (stopThread)
break;
Thread.Sleep(1);
-
}
Dispose();
}
-
+ #endregion
+
public override void Dispose()
{
if (InvokeRequired)
@@ -139,7 +152,6 @@
return;
}
- // hack because there is access violation when XAudio2 shuts down?
masteringVoice.Dispose();
mDevice.Dispose();
}
@@ -169,6 +181,7 @@
{
return new XAudio2_StreamingSoundBuffer(this, input, format);
}
+
}
public delegate void DisposeDelegate();
Modified: trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs
===================================================================
--- trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs 2010-01-02 18:07:36 UTC (rev 1173)
+++ trunk/Drivers/AgateSDX/XAud2/XAudio2_StreamingSoundBuffer.cs 2010-01-02 21:35:38 UTC (rev 1174)
@@ -20,6 +20,7 @@
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
+using System.Threading;
using System.Text;
using AgateLib.AudioLib;
using AgateLib.AudioLib.ImplementationBase;
@@ -42,6 +43,8 @@
double mPan;
BinaryWriter w;
bool mIsDisposed;
+ bool mReadingData;
+ int thisBufferIndex;
int mChunkSize;
@@ -64,6 +67,9 @@
Initialize();
}
+
+ #region --- Thread safety ---
+
public bool InvokeRequired
{
get { return mAudio.InvokeRequired; }
@@ -72,12 +78,18 @@
{
mAudio.BeginInvoke(method, args);
}
+ void Invoke(Delegate method, params object[] args)
+ {
+ mAudio.Invoke(method, args);
+ }
+ #endregion
+
private void Initialize()
{
if (InvokeRequired)
{
- BeginInvoke(new DisposeDelegate(Initialize));
+ Invoke(new DisposeDelegate(Initialize));
return;
}
@@ -101,6 +113,8 @@
buffer[i].buffer.Flags = BufferFlags.EndOfStream;
}
+ thisBufferIndex = count;
+
string tempFileName = string.Format("xaudio2_buffer{0}.pcm", count);
count++;
@@ -113,40 +127,45 @@
{
if (InvokeRequired)
{
- BeginInvoke(new DisposeDelegate(Initialize));
+ Invoke(new DisposeDelegate(Dispose));
return;
}
+ while (mReadingData)
+ Thread.Sleep(1);
+
mIsDisposed = true;
+ mVoice.FlushSourceBuffers();
+ Thread.Sleep(1);
+ mVoice.Stop();
+
w.BaseStream.Dispose();
+ try
+ {
+ mVoice.Dispose();
+ }
+ catch (Exception e)
+ {
+ System.Diagnostics.Debug.Print("Caught exception {0}.\n{1}", e.GetType(), e.Message);
+ }
+
foreach (var b in buffer)
{
b.buffer.Dispose();
}
- mVoice.Stop();
- mVoice.Dispose();
+
+ System.Diagnostics.Debug.Print("Disposed streaming buffer {0}.", thisBufferIndex);
}
void mVoice_BufferEnd(object sender, ContextEventArgs e)
{
- ReadAndSubmitNextData();
- }
-
- private void ReadAndSubmitNextData()
- {
- if (mIsDisposed)
+ if (IsPlaying == false)
return;
- ReadData(buffer[mNextData]);
- SubmitData(buffer[mNextData]);
-
- mNextData++;
-
- if (mNextData >= bufferCount)
- mNextData = 0;
+ ReadAndSubmitNextData();
}
public override void Play()
@@ -164,7 +183,6 @@
mVoice.Start();
mPlaying = true;
}
-
public override void Stop()
{
if (InvokeRequired)
@@ -178,9 +196,47 @@
mVoice.Stop();
}
+ #region --- Reading Data ---
+
+ int bytesRead = 0;
+
+ private void ReadAndSubmitNextData()
+ {
+ if (mIsDisposed)
+ return;
+
+ if (InvokeRequired)
+ {
+ Invoke(new DisposeDelegate(ReadAndSubmitNextData));
+ return;
+ }
+
+ try
+ {
+ mReadingData = true;
+
+ ReadData(buffer[mNextData]);
+ SubmitData(buffer[mNextData]);
+
+ mNextData++;
+
+ if (mNextData >= bufferCount)
+ mNextData = 0;
+ }
+ finally
+ {
+ mReadingData = false;
+ }
+ }
private void ReadData(BufferData bufferData)
{
+ if (bufferData.backing == null)
+ {
+ ResizeBacking();
+ }
+
int count = mInput.Read(bufferData.backing, 0, bufferData.backing.Length);
+ bytesRead += count;
bufferData.ms.Position = 0;
bufferData.buffer.AudioData = bufferData.ms;
@@ -194,6 +250,8 @@
mVoice.SubmitSourceBuffer(bufferData.buffer);
}
+ #endregion
+
public override int ChunkSize
{
get
@@ -205,7 +263,6 @@
mChunkSize = value;
ResizeBacking();
-
}
}
@@ -220,11 +277,10 @@
{
if (InvokeRequired)
{
- BeginInvoke(new DisposeDelegate(ResizeBacking));
+ Invoke(new DisposeDelegate(ResizeBacking));
return;
}
-
for (int i = 0; i < buffer.Length; i++)
{
buffer[i].backing = new byte[ChunkByteSize];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-01-03 07:28:34
|
Revision: 1175
http://agate.svn.sourceforge.net/agate/?rev=1175&view=rev
Author: kanato
Date: 2010-01-03 07:28:23 +0000 (Sun, 03 Jan 2010)
Log Message:
-----------
Add x86 and x64 solution configurations for AgateLib-Windows.sln.
Modified Paths:
--------------
trunk/AgateLib-Windows.sln
trunk/Drivers/AgateSDX/AgateSDX.csproj
Modified: trunk/AgateLib-Windows.sln
===================================================================
--- trunk/AgateLib-Windows.sln 2010-01-02 21:35:38 UTC (rev 1174)
+++ trunk/AgateLib-Windows.sln 2010-01-03 07:28:23 UTC (rev 1175)
@@ -28,12 +28,18 @@
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
Public|Any CPU = Public|Any CPU
Public|Mixed Platforms = Public|Mixed Platforms
Public|Win32 = Public|Win32
+ Public|x64 = Public|x64
+ Public|x86 = Public|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
@@ -41,114 +47,202 @@
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Mixed Platforms.Build.0 = Debug|x86
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|Win32.ActiveCfg = Debug|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x64.ActiveCfg = Debug|x64
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x64.Build.0 = Debug|x64
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x86.ActiveCfg = Debug|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Debug|x86.Build.0 = Debug|x86
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|Any CPU.ActiveCfg = Release|x86
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|Mixed Platforms.ActiveCfg = Release|x86
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|Mixed Platforms.Build.0 = Release|x86
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|Win32.ActiveCfg = Release|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|x64.ActiveCfg = Release|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|x86.ActiveCfg = Release|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Public|x86.Build.0 = Release|x86
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Any CPU.Build.0 = Release|Any CPU
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Mixed Platforms.ActiveCfg = Release|x86
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Mixed Platforms.Build.0 = Release|x86
{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|Win32.ActiveCfg = Release|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x64.ActiveCfg = Release|x64
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x64.Build.0 = Release|x64
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x86.ActiveCfg = Release|x86
+ {DC687DB2-90A8-484D-AB99-B3D29FDD8D44}.Release|x86.Build.0 = Release|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Mixed Platforms.Build.0 = Debug|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Win32.ActiveCfg = Debug|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x64.ActiveCfg = Debug|x64
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x64.Build.0 = Debug|x64
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x86.ActiveCfg = Debug|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x86.Build.0 = Debug|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|Any CPU.ActiveCfg = Release|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|Mixed Platforms.ActiveCfg = Release|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|Mixed Platforms.Build.0 = Release|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|Win32.ActiveCfg = Release|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|x64.ActiveCfg = Release|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|x86.ActiveCfg = Release|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Public|x86.Build.0 = Release|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Any CPU.Build.0 = Release|Any CPU
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Mixed Platforms.ActiveCfg = Release|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Mixed Platforms.Build.0 = Release|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Win32.ActiveCfg = Release|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x64.ActiveCfg = Release|x64
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x64.Build.0 = Release|x64
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x86.ActiveCfg = Release|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x86.Build.0 = Release|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Mixed Platforms.Build.0 = Debug|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Win32.ActiveCfg = Debug|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x64.ActiveCfg = Debug|x64
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x64.Build.0 = Debug|x64
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x86.ActiveCfg = Debug|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x86.Build.0 = Debug|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Public|Any CPU.ActiveCfg = Release|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Public|Mixed Platforms.ActiveCfg = Release|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Public|Mixed Platforms.Build.0 = Release|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Public|Win32.ActiveCfg = Release|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Public|x64.ActiveCfg = Release|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Public|x86.ActiveCfg = Release|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Public|x86.Build.0 = Release|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Any CPU.Build.0 = Release|Any CPU
{164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Mixed Platforms.ActiveCfg = Release|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Mixed Platforms.Build.0 = Release|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Win32.ActiveCfg = Release|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x64.ActiveCfg = Release|x64
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x64.Build.0 = Release|x64
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x86.ActiveCfg = Release|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x86.Build.0 = Release|x86
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Mixed Platforms.Build.0 = Debug|x86
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Win32.ActiveCfg = Debug|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|x64.ActiveCfg = Debug|x64
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|x64.Build.0 = Debug|x64
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|x86.ActiveCfg = Debug|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|x86.Build.0 = Debug|x86
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|Any CPU.ActiveCfg = Release|x86
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|Mixed Platforms.ActiveCfg = Release|x86
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|Mixed Platforms.Build.0 = Release|x86
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|Win32.ActiveCfg = Release|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|x64.ActiveCfg = Release|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|x86.ActiveCfg = Release|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Public|x86.Build.0 = Release|x86
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Any CPU.ActiveCfg = Release|Any CPU
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Any CPU.Build.0 = Release|Any CPU
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Mixed Platforms.ActiveCfg = Release|x86
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Mixed Platforms.Build.0 = Release|x86
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Win32.ActiveCfg = Release|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|x64.ActiveCfg = Release|x64
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|x64.Build.0 = Release|x64
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|x86.ActiveCfg = Release|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|x86.Build.0 = Release|x86
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|Mixed Platforms.Build.0 = Debug|x86
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|x64.ActiveCfg = Debug|x64
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|x64.Build.0 = Debug|x64
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|x86.ActiveCfg = Debug|x86
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Debug|x86.Build.0 = Debug|x86
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|Any CPU.ActiveCfg = Release|Any CPU
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|Any CPU.Build.0 = Release|Any CPU
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|Mixed Platforms.ActiveCfg = Release|Any CPU
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|Mixed Platforms.Build.0 = Release|Any CPU
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|Win32.ActiveCfg = Release|Any CPU
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|x64.ActiveCfg = Release|x64
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|x64.Build.0 = Release|x64
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Public|x86.ActiveCfg = Release|x64
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|Any CPU.Build.0 = Release|Any CPU
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|Win32.ActiveCfg = Release|Any CPU
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|x64.ActiveCfg = Release|x64
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|x64.Build.0 = Release|x64
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|x86.ActiveCfg = Release|x86
+ {EF993B30-D9A9-4962-80BB-6826D39B3465}.Release|x86.Build.0 = Release|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Mixed Platforms.Build.0 = Debug|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Win32.ActiveCfg = Debug|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x64.ActiveCfg = Debug|x64
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x64.Build.0 = Debug|x64
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.ActiveCfg = Debug|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.Build.0 = Debug|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Public|Any CPU.ActiveCfg = Release|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Public|Mixed Platforms.ActiveCfg = Release|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Public|Mixed Platforms.Build.0 = Release|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Public|Win32.ActiveCfg = Release|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|x64.ActiveCfg = Release|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|x86.ActiveCfg = Release|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Public|x86.Build.0 = Release|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.Build.0 = Release|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Mixed Platforms.ActiveCfg = Release|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Mixed Platforms.Build.0 = Release|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Win32.ActiveCfg = Release|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x64.ActiveCfg = Release|x64
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x64.Build.0 = Release|x64
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.ActiveCfg = Release|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.Build.0 = Release|x86
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|Mixed Platforms.Build.0 = Debug|x86
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|Win32.ActiveCfg = Debug|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|x64.ActiveCfg = Debug|x64
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|x64.Build.0 = Debug|x64
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|x86.ActiveCfg = Debug|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Debug|x86.Build.0 = Debug|x86
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Public|Any CPU.ActiveCfg = Release|x86
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Public|Mixed Platforms.ActiveCfg = Release|x86
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Public|Mixed Platforms.Build.0 = Release|x86
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Public|Win32.ActiveCfg = Release|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Public|x64.ActiveCfg = Release|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Public|x86.ActiveCfg = Release|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Public|x86.Build.0 = Release|x86
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|Any CPU.Build.0 = Release|Any CPU
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|Mixed Platforms.ActiveCfg = Release|x86
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|Mixed Platforms.Build.0 = Release|x86
{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|Win32.ActiveCfg = Release|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|x64.ActiveCfg = Release|x64
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|x64.Build.0 = Release|x64
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|x86.ActiveCfg = Release|x86
+ {424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}.Release|x86.Build.0 = Release|x86
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Mixed Platforms.Build.0 = Debug|x86
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Win32.ActiveCfg = Debug|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|x64.ActiveCfg = Debug|x64
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|x64.Build.0 = Debug|x64
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|x86.ActiveCfg = Debug|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|x86.Build.0 = Debug|x86
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|Any CPU.ActiveCfg = Release|x86
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|Mixed Platforms.ActiveCfg = Release|x86
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|Mixed Platforms.Build.0 = Release|x86
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|Win32.ActiveCfg = Release|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|x64.ActiveCfg = Release|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|x86.ActiveCfg = Release|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Public|x86.Build.0 = Release|x86
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Any CPU.Build.0 = Release|Any CPU
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Mixed Platforms.ActiveCfg = Release|x86
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Mixed Platforms.Build.0 = Release|x86
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Win32.ActiveCfg = Release|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|x64.ActiveCfg = Release|x64
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|x64.Build.0 = Release|x64
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|x86.ActiveCfg = Release|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: trunk/Drivers/AgateSDX/AgateSDX.csproj
===================================================================
--- trunk/Drivers/AgateSDX/AgateSDX.csproj 2010-01-02 21:35:38 UTC (rev 1174)
+++ trunk/Drivers/AgateSDX/AgateSDX.csproj 2010-01-03 07:28:23 UTC (rev 1175)
@@ -83,6 +83,24 @@
<FileAlignment>4096</FileAlignment>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="SlimDX, Version=2.0.8.42, Culture=neutral, PublicKeyToken=b1b0c32fd1ffe4f9, processorArchitecture=x86" />
<Reference Include="System">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-01-08 18:36:50
|
Revision: 1184
http://agate.svn.sourceforge.net/agate/?rev=1184&view=rev
Author: kanato
Date: 2010-01-08 18:36:43 +0000 (Fri, 08 Jan 2010)
Log Message:
-----------
Add x86 and x64 targets to AgateTools solution and projects.
Fix output directories for tools.
Force FontCreator to use AgateDrawing.
Modified Paths:
--------------
trunk/AgateTools.sln
trunk/Tools/FontCreator/FontCreator.cs
trunk/Tools/FontCreator/FontCreator.csproj
trunk/Tools/FontCreator/FontCreatorProgram.cs
trunk/Tools/NotebookLib/NotebookLib/NotebookLib.csproj
trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj
trunk/Tools/ResourceEditor/ResourceEditor.csproj
Modified: trunk/AgateTools.sln
===================================================================
--- trunk/AgateTools.sln 2010-01-08 18:35:23 UTC (rev 1183)
+++ trunk/AgateTools.sln 2010-01-08 18:36:43 UTC (rev 1184)
@@ -24,37 +24,97 @@
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Debug|x64.ActiveCfg = Debug|x64
+ {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Debug|x64.Build.0 = Debug|x64
+ {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Debug|x86.ActiveCfg = Debug|x86
+ {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Debug|x86.Build.0 = Debug|x86
{FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Release|x64.ActiveCfg = Release|x64
+ {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Release|x64.Build.0 = Release|x64
+ {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Release|x86.ActiveCfg = Release|x86
+ {FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}.Release|x86.Build.0 = Release|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x64.ActiveCfg = Debug|x64
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x64.Build.0 = Debug|x64
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x86.ActiveCfg = Debug|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x86.Build.0 = Debug|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x64.ActiveCfg = Release|x64
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x64.Build.0 = Release|x64
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x86.ActiveCfg = Release|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x86.Build.0 = Release|x86
{C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Debug|x64.ActiveCfg = Debug|x64
+ {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Debug|x64.Build.0 = Debug|x64
+ {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Debug|x86.ActiveCfg = Debug|x86
+ {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Debug|x86.Build.0 = Debug|x86
{C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Release|x64.ActiveCfg = Release|x64
+ {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Release|x64.Build.0 = Release|x64
+ {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Release|x86.ActiveCfg = Release|x86
+ {C653C244-F604-4BA4-8822-D04FA9ACEFA5}.Release|x86.Build.0 = Release|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x64.ActiveCfg = Debug|x64
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x64.Build.0 = Debug|x64
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x86.ActiveCfg = Debug|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x86.Build.0 = Debug|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x64.ActiveCfg = Release|x64
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x64.Build.0 = Release|x64
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x86.ActiveCfg = Release|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x86.Build.0 = Release|x86
{A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Debug|x64.ActiveCfg = Debug|x64
+ {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Debug|x64.Build.0 = Debug|x64
+ {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Debug|x86.ActiveCfg = Debug|x86
+ {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Debug|x86.Build.0 = Debug|x86
{A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Release|x64.ActiveCfg = Release|x64
+ {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Release|x64.Build.0 = Release|x64
+ {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Release|x86.ActiveCfg = Release|x86
+ {A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}.Release|x86.Build.0 = Release|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x64.ActiveCfg = Debug|x64
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x64.Build.0 = Debug|x64
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.ActiveCfg = Debug|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.Build.0 = Debug|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x64.ActiveCfg = Release|x64
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x64.Build.0 = Release|x64
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.ActiveCfg = Release|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.Build.0 = Release|x86
{91F57346-B574-4D52-9EB0-AA191B552C94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91F57346-B574-4D52-9EB0-AA191B552C94}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {91F57346-B574-4D52-9EB0-AA191B552C94}.Debug|x64.ActiveCfg = Debug|x64
+ {91F57346-B574-4D52-9EB0-AA191B552C94}.Debug|x64.Build.0 = Debug|x64
+ {91F57346-B574-4D52-9EB0-AA191B552C94}.Debug|x86.ActiveCfg = Debug|x86
+ {91F57346-B574-4D52-9EB0-AA191B552C94}.Debug|x86.Build.0 = Debug|x86
{91F57346-B574-4D52-9EB0-AA191B552C94}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91F57346-B574-4D52-9EB0-AA191B552C94}.Release|Any CPU.Build.0 = Release|Any CPU
+ {91F57346-B574-4D52-9EB0-AA191B552C94}.Release|x64.ActiveCfg = Release|x64
+ {91F57346-B574-4D52-9EB0-AA191B552C94}.Release|x64.Build.0 = Release|x64
+ {91F57346-B574-4D52-9EB0-AA191B552C94}.Release|x86.ActiveCfg = Release|x86
+ {91F57346-B574-4D52-9EB0-AA191B552C94}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: trunk/Tools/FontCreator/FontCreator.cs
===================================================================
--- trunk/Tools/FontCreator/FontCreator.cs 2010-01-08 18:35:23 UTC (rev 1183)
+++ trunk/Tools/FontCreator/FontCreator.cs 2010-01-08 18:36:43 UTC (rev 1184)
@@ -5,8 +5,8 @@
using AgateLib;
using AgateLib.DisplayLib;
+using AgateLib.DisplayLib.ImplementationBase;
using AgateLib.BitmapFont;
-using AgateLib.ImplementationBase;
using AgateLib.Geometry;
using AgateLib.Resources;
Modified: trunk/Tools/FontCreator/FontCreator.csproj
===================================================================
--- trunk/Tools/FontCreator/FontCreator.csproj 2010-01-08 18:35:23 UTC (rev 1183)
+++ trunk/Tools/FontCreator/FontCreator.csproj 2010-01-08 18:36:43 UTC (rev 1184)
@@ -1,7 +1,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A18DEAA1-EB7F-4B4A-B93A-83A2CAD5954A}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -37,7 +37,7 @@
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
- <OutputPath>..\..\Binaries\Debug\Tools\FontCreator\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\FontCreator\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -57,7 +57,7 @@
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
- <OutputPath>..\..\Binaries\Release\Tools\FontCreator\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\FontCreator\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -65,6 +65,38 @@
<NoWarn>
</NoWarn>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>..\..\Binaries\Debug\FontCreator\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>..\..\Binaries\Debug\FontCreator\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>..\..\Binaries\Debug\FontCreator\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>..\..\Binaries\Debug\FontCreator\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Name>System</Name>
@@ -92,6 +124,10 @@
<Project>{9490B719-829E-43A7-A5FE-8001F8A81759}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
+ <ProjectReference Include="..\..\Drivers\AgateDrawing\AgateDrawing.csproj">
+ <Project>{164A785D-924E-40FB-A517-D7E677F3B53A}</Project>
+ <Name>AgateDrawing</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\Drivers\AgateLib.WinForms\AgateLib.WinForms.csproj">
<Name>AgateLib.WinForms</Name>
<Project>{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}</Project>
Modified: trunk/Tools/FontCreator/FontCreatorProgram.cs
===================================================================
--- trunk/Tools/FontCreator/FontCreatorProgram.cs 2010-01-08 18:35:23 UTC (rev 1183)
+++ trunk/Tools/FontCreator/FontCreatorProgram.cs 2010-01-08 18:36:43 UTC (rev 1184)
@@ -22,7 +22,6 @@
Directory.CreateDirectory("./images");
- AgateFileProvider.Assemblies.AddPath("../../Drivers");
AgateFileProvider.Images.AddPath("./images");
using (AgateLib.AgateSetup setup = new AgateLib.AgateSetup(args))
Modified: trunk/Tools/NotebookLib/NotebookLib/NotebookLib.csproj
===================================================================
--- trunk/Tools/NotebookLib/NotebookLib/NotebookLib.csproj 2010-01-08 18:35:23 UTC (rev 1183)
+++ trunk/Tools/NotebookLib/NotebookLib/NotebookLib.csproj 2010-01-08 18:36:43 UTC (rev 1184)
@@ -1,7 +1,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{91F57346-B574-4D52-9EB0-AA191B552C94}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -57,7 +57,7 @@
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
- <OutputPath>..\..\..\Binaries\Release\Libraries\</OutputPath>
+ <OutputPath>..\..\..\Binaries\Debug\Libraries\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -65,6 +65,38 @@
<NoWarn>
</NoWarn>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>..\..\..\Binaries\Debug\Libraries\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>..\..\..\Binaries\Debug\Libraries\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>..\..\..\Binaries\Debug\Libraries\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>..\..\..\Binaries\Debug\Libraries\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Name>System</Name>
Modified: trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj
===================================================================
--- trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj 2010-01-08 18:35:23 UTC (rev 1183)
+++ trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj 2010-01-08 18:36:43 UTC (rev 1184)
@@ -1,7 +1,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{C653C244-F604-4BA4-8822-D04FA9ACEFA5}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -37,7 +37,7 @@
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
- <OutputPath>..\..\Binaries\Debug\Tools\PackedSpriteCreator\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\PackedSpriteCreator\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -57,7 +57,7 @@
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
- <OutputPath>..\..\Binaries\Release\Tools\PackedSpriteCreator\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\PackedSpriteCreator\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -65,6 +65,38 @@
<NoWarn>
</NoWarn>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>..\..\Binaries\Debug\PackedSpriteCreator\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>..\..\Binaries\Debug\PackedSpriteCreator\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>..\..\Binaries\Debug\PackedSpriteCreator\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>..\..\Binaries\Debug\PackedSpriteCreator\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Name>System</Name>
Modified: trunk/Tools/ResourceEditor/ResourceEditor.csproj
===================================================================
--- trunk/Tools/ResourceEditor/ResourceEditor.csproj 2010-01-08 18:35:23 UTC (rev 1183)
+++ trunk/Tools/ResourceEditor/ResourceEditor.csproj 2010-01-08 18:36:43 UTC (rev 1184)
@@ -1,7 +1,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -37,7 +37,7 @@
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
- <OutputPath>..\..\Binaries\Debug\Tools\ResourceEditor\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\ResourceEditor\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -57,7 +57,7 @@
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
- <OutputPath>..\..\Binaries\Release\Tools\ResourceEditor\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\ResourceEditor\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -65,6 +65,38 @@
<NoWarn>
</NoWarn>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>..\..\Binaries\Debug\ResourceEditor\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>..\..\Binaries\Debug\ResourceEditor\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>..\..\Binaries\Debug\ResourceEditor\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>..\..\Binaries\Debug\ResourceEditor\</OutputPath>
+ <DefineConstants>TRACE;</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <FileAlignment>4096</FileAlignment>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Name>System</Name>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-01-25 20:59:02
|
Revision: 1188
http://agate.svn.sourceforge.net/agate/?rev=1188&view=rev
Author: kanato
Date: 2010-01-25 20:58:52 +0000 (Mon, 25 Jan 2010)
Log Message:
-----------
Add writing enums.
Disable gl3 stuff which isn't working yet.
Modified Paths:
--------------
trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs
trunk/Drivers/AgateOTK/GL_Display.cs
trunk/TODO.txt
Modified: trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs
===================================================================
--- trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs 2010-01-24 22:16:52 UTC (rev 1187)
+++ trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs 2010-01-25 20:58:52 UTC (rev 1188)
@@ -189,7 +189,22 @@
WriteImpl(name, value ?? string.Empty, asAttribute);
}
+
/// <summary>
+ /// Writes an enum field to the XML data as an element or an attribute.
+ /// </summary>
+ /// <typeparam name="T">Type of the enum. If this is not an enum type, an exception is thrown</typeparam>
+ /// <param name="name">The name of the XML element used.</param>
+ /// <param name="value">The value to write.</param>
+ /// <param name="asAttribute">Pass true to write the field as an attribute in the parent element.</param>
+ public void WriteEnum<T>(string name, T value, bool asattribute) where T : struct
+ {
+ if (typeof(T).IsEnum == false)
+ throw new XleSerializationException("Type passed is not an enum.");
+
+ WriteImpl(name, value.ToString(), asattribute);
+ }
+ /// <summary>
/// Writes a field to the XML data as an element or an attribute.
/// </summary>
/// <param name="name">The name of the XML element used.</param>
@@ -918,7 +933,34 @@
return int.Parse(element.InnerText);
}
+
/// <summary>
+ /// Reads an enum field from the XML data.
+ /// </summary>
+ /// <typeparam name="T">Type of the enum. If this is not an enum type, an exception is thrown.</typeparam>
+ /// <param name="name">The name of the XML element used.</param>
+ public T ReadEnum<T>(string name) where T : struct
+ {
+ if (typeof(T).IsEnum == false)
+ throw new XleSerializationException("Type passed is not an enum.");
+
+ return (T)Enum.Parse(typeof(T), ReadStringImpl(name, false, string.Empty));
+ }
+ /// <summary>
+ /// Reads an enum field from the XML data.
+ /// </summary>
+ /// <typeparam name="T">Type of the enum. If this is not an enum type, an exception is thrown.</typeparam>
+ /// <param name="name">The name of the XML element used.</param>
+ /// <param name="defaultValue">Value returned if the key is not present in the XML data.</param>
+ public T ReadEnum<T>(string name, T defaultValue) where T : struct
+ {
+ if (typeof(T).IsEnum == false)
+ throw new XleSerializationException("Type passed is not an enum.");
+
+ return (T)Enum.Parse(typeof(T), ReadStringImpl(name, true, defaultValue.ToString()));
+ }
+
+ /// <summary>
/// Reads a double value from the XML data. If the name is not present
/// an XleSerializationException is thrown.
/// </summary>
@@ -1164,6 +1206,8 @@
}
+
+
#endregion
#region --- Dealing with streams ---
Modified: trunk/Drivers/AgateOTK/GL_Display.cs
===================================================================
--- trunk/Drivers/AgateOTK/GL_Display.cs 2010-01-24 22:16:52 UTC (rev 1187)
+++ trunk/Drivers/AgateOTK/GL_Display.cs 2010-01-25 20:58:52 UTC (rev 1188)
@@ -284,6 +284,7 @@
if (mGLVersion >= 3m)
{
//mGL3 = true;
+ mGL3 = false;
mGL3 = false;
mGLVersion = 2.1m;
Modified: trunk/TODO.txt
===================================================================
--- trunk/TODO.txt 2010-01-24 22:16:52 UTC (rev 1187)
+++ trunk/TODO.txt 2010-01-25 20:58:52 UTC (rev 1188)
@@ -23,7 +23,7 @@
Surfaces
D Fix bug with rotation where ScaleWidth or ScaleHeight are less than zero.
Drivers
- * Update AgateOTK to not call GL functions in finalizers.
+ D Update AgateOTK to not call GL functions in finalizers.
Input
* Add support for POV hats on joysticks.
@@ -41,9 +41,9 @@
* GP2X
Medium priority
- * Convert AgateMDX to use SlimDX instead and deprecate the use of AgateMDX.
- * Interface to allow audio to be generated at runtime.
- * Convert AgateOTK to use vertex buffers instead of vertex arrays.
+ D Convert AgateMDX to use SlimDX instead and deprecate the use of AgateMDX.
+ D Interface to allow audio to be generated at runtime.
+ D Convert AgateOTK to use vertex buffers instead of vertex arrays.
Gui
* Document GUI classes
* Develop data-driven skinning system for the GUI
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-01-28 17:19:47
|
Revision: 1193
http://agate.svn.sourceforge.net/agate/?rev=1193&view=rev
Author: kanato
Date: 2010-01-28 17:19:40 +0000 (Thu, 28 Jan 2010)
Log Message:
-----------
Add AudioCapsInfo class and interfaces.
Correct setting of DisplayWindow.Height.
Disable fake window in SDX so that fullscreen works.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/AudioLib/Audio.cs
trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs
trunk/AgateLib/DisplayLib/DisplayWindow.cs
trunk/AgateLib/Drivers/NullSoundImpl.cs
trunk/Drivers/AgateFMOD/FMOD_Audio.cs
trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs
trunk/Drivers/AgateSDX/AgateSDX.csproj
trunk/Drivers/AgateSDX/SDX_Display.cs
trunk/Drivers/AgateSDX/SDX_DisplayWindow.cs
trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Basic2DShader.cs
trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Lighting3D.cs
trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs
trunk/Tests/CoreTests/App.cs
Added Paths:
-----------
trunk/AgateLib/AudioLib/AudioCapsInfo.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2010-01-26 06:53:51 UTC (rev 1192)
+++ trunk/AgateLib/AgateLib.csproj 2010-01-28 17:19:40 UTC (rev 1193)
@@ -132,6 +132,7 @@
<Compile Include="AppInitParameters.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="AudioLib\AudioCapsInfo.cs" />
<Compile Include="AudioLib\ImplementationBase\MusicImpl.cs" />
<Compile Include="AudioLib\ImplementationBase\SoundBufferImpl.cs" />
<Compile Include="AudioLib\ImplementationBase\SoundBufferSessionImpl.cs" />
Modified: trunk/AgateLib/AudioLib/Audio.cs
===================================================================
--- trunk/AgateLib/AudioLib/Audio.cs 2010-01-26 06:53:51 UTC (rev 1192)
+++ trunk/AgateLib/AudioLib/Audio.cs 2010-01-28 17:19:40 UTC (rev 1193)
@@ -33,8 +33,16 @@
public static class Audio
{
private static AudioImpl impl;
+ private static AudioCapsInfo caps = new AudioCapsInfo();
/// <summary>
+ /// Gets the capabilities querying object for the audio subsystem.
+ /// </summary>
+ public static AudioCapsInfo Caps
+ {
+ get { return caps; }
+ }
+ /// <summary>
/// Gets the object which handles all of the actual calls to Audio functions.
/// </summary>
public static AudioImpl Impl
Added: trunk/AgateLib/AudioLib/AudioCapsInfo.cs
===================================================================
--- trunk/AgateLib/AudioLib/AudioCapsInfo.cs (rev 0)
+++ trunk/AgateLib/AudioLib/AudioCapsInfo.cs 2010-01-28 17:19:40 UTC (rev 1193)
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using AgateLib.Geometry;
+
+namespace AgateLib.AudioLib
+{
+ /// <summary>
+ /// Class which can be used to query information about what features are supported
+ /// by the audio driver.
+ /// </summary>
+ public class AudioCapsInfo
+ {
+ internal AudioCapsInfo()
+ { }
+
+ /// <summary>
+ /// Indicates whether or not the application can stream audio to the
+ /// audio system by creating a StreamingSoundBuffer.
+ /// </summary>
+ public bool SupportsStreamingAudio
+ {
+ get { return Audio.Impl.CapsBool(AudioBoolCaps.StreamingSoundBuffer); }
+ }
+ }
+
+ /// <summary>
+ /// Testable boolean capabilities.
+ /// </summary>
+ public enum AudioBoolCaps
+ {
+ /// <summary>
+ /// Indicates whether or not the audio driver supports streaming audio
+ /// generated by the application.
+ /// </summary>
+ StreamingSoundBuffer,
+ }
+}
Modified: trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs
===================================================================
--- trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs 2010-01-26 06:53:51 UTC (rev 1192)
+++ trunk/AgateLib/AudioLib/ImplementationBase/AudioImpl.cs 2010-01-28 17:19:40 UTC (rev 1193)
@@ -94,6 +94,13 @@
}
+ /// <summary>
+ /// This function is called when a Caps property is inspected.
+ /// It should return false for any unknown value.
+ /// </summary>
+ /// <param name="audioBoolCaps"></param>
+ /// <returns></returns>
+ protected internal abstract bool CapsBool(AudioBoolCaps audioBoolCaps);
}
}
Modified: trunk/AgateLib/DisplayLib/DisplayWindow.cs
===================================================================
--- trunk/AgateLib/DisplayLib/DisplayWindow.cs 2010-01-26 06:53:51 UTC (rev 1192)
+++ trunk/AgateLib/DisplayLib/DisplayWindow.cs 2010-01-28 17:19:40 UTC (rev 1193)
@@ -245,7 +245,7 @@
get { return Size.Height; }
set
{
- Size = new Size(Size.Width, Size.Height);
+ Size = new Size(Size.Width, value);
}
}
Modified: trunk/AgateLib/Drivers/NullSoundImpl.cs
===================================================================
--- trunk/AgateLib/Drivers/NullSoundImpl.cs 2010-01-26 06:53:51 UTC (rev 1192)
+++ trunk/AgateLib/Drivers/NullSoundImpl.cs 2010-01-28 17:19:40 UTC (rev 1193)
@@ -168,5 +168,9 @@
return new NullMusicImpl();
}
+ protected internal override bool CapsBool(AgateLib.AudioLib.AudioBoolCaps audioBoolCaps)
+ {
+ return false;
+ }
}
}
Modified: trunk/Drivers/AgateFMOD/FMOD_Audio.cs
===================================================================
--- trunk/Drivers/AgateFMOD/FMOD_Audio.cs 2010-01-26 06:53:51 UTC (rev 1192)
+++ trunk/Drivers/AgateFMOD/FMOD_Audio.cs 2010-01-28 17:19:40 UTC (rev 1193)
@@ -118,6 +118,14 @@
CheckFMODResult(mSystem.update());
}
+ protected override bool CapsBool(AgateLib.AudioLib.AudioBoolCaps audioBoolCaps)
+ {
+ switch (audioBoolCaps)
+ {
+ default:
+ return false;
+ }
+ }
public override MusicImpl CreateMusic(System.IO.Stream musicStream)
{
string filename = SaveStreamToTempFile(musicStream);
Modified: trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs
===================================================================
--- trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs 2010-01-26 06:53:51 UTC (rev 1192)
+++ trunk/Drivers/AgateSDL/Audio/SDL_Audio.cs 2010-01-28 17:19:40 UTC (rev 1193)
@@ -61,6 +61,15 @@
tempfiles.Clear();
}
+ protected override bool CapsBool(AgateLib.AudioLib.AudioBoolCaps audioBoolCaps)
+ {
+ switch (audioBoolCaps)
+ {
+ default:
+ return false;
+ }
+ }
+
public override MusicImpl CreateMusic(string filename)
{
return new SDL_Music(filename);
Modified: trunk/Drivers/AgateSDX/AgateSDX.csproj
===================================================================
--- trunk/Drivers/AgateSDX/AgateSDX.csproj 2010-01-26 06:53:51 UTC (rev 1192)
+++ trunk/Drivers/AgateSDX/AgateSDX.csproj 2010-01-28 17:19:40 UTC (rev 1193)
@@ -1,7 +1,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.21022</ProductVersion>
+ <ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{EF993B30-D9A9-4962-80BB-6826D39B3465}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -205,6 +205,9 @@
<Name>AgateLib.WinForms</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <Folder Include="Shaders\Hlsl\" />
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<PropertyGroup>
<PreBuildEvent>
Modified: trunk/Drivers/AgateSDX/SDX_Display.cs
===================================================================
--- trunk/Drivers/AgateSDX/SDX_Display.cs 2010-01-26 06:53:51 UTC (rev 1192)
+++ trunk/Drivers/AgateSDX/SDX_Display.cs 2010-01-28 17:19:40 UTC (rev 1193)
@@ -89,7 +89,7 @@
{
mDirect3Dobject = new SlimDX.Direct3D9.Direct3D();
- CreateFakeWindow();
+ //CreateFakeWindow();
Report("SlimDX driver instantiated for display.");
@@ -146,8 +146,10 @@
}
catch
{
- mHasDepth = false;
+ mHasDepth = true;
mHasStencil = false;
+
+ SetHaveDepthStencil(Format.D16);
}
//device.DeviceLost += new EventHandler(mDevice_DeviceLost);
@@ -192,8 +194,11 @@
public override void Dispose()
{
- mFakeDisplayWindow.Dispose();
- mFakeWindow.Dispose();
+ if (mFakeWindow != null)
+ {
+ mFakeDisplayWindow.Dispose();
+ mFakeWindow.Dispose();
+ }
mDevice.Dispose();
}
@@ -617,8 +622,8 @@
PresentParameters present = new PresentParameters();
present.BackBufferCount = 1;
- present.AutoDepthStencilFormat = GetDepthFormat(Format.A8R8G8B8);
- present.EnableAutoDepthStencil = true;
+ present.AutoDepthStencilFormat = Format.Unknown;
+ present.EnableAutoDepthStencil = false;
present.DeviceWindowHandle = displayWindow.RenderTarget.Handle;
present.BackBufferWidth = displayWindow.Width;
present.BackBufferHeight = displayWindow.Height;
Modified: trunk/Drivers/AgateSDX/SDX_DisplayWindow.cs
===================================================================
--- trunk/Drivers/AgateSDX/SDX_DisplayWindow.cs 2010-01-26 06:53:51 UTC (rev 1192)
+++ trunk/Drivers/AgateSDX/SDX_DisplayWindow.cs 2010-01-28 17:19:40 UTC (rev 1193)
@@ -296,6 +296,8 @@
frm.Show();
}
+
+ frm.ClientSize = new System.Drawing.Size(mChooseWidth, mChooseHeight);
}
private void CreateWindowedDisplay()
{
Modified: trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Basic2DShader.cs
===================================================================
--- trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Basic2DShader.cs 2010-01-26 06:53:51 UTC (rev 1192)
+++ trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Basic2DShader.cs 2010-01-28 17:19:40 UTC (rev 1193)
@@ -16,7 +16,7 @@
public SDX_FF_Basic2DShader()
{
- mDevice = (AgateLib.DisplayLib.Display.Impl as SDX_Display).D3D_Device.Device;
+
}
public override AgateLib.Geometry.Rectangle CoordinateSystem
@@ -27,6 +27,8 @@
public void Set2DDrawState()
{
+ mDevice = (AgateLib.DisplayLib.Display.Impl as SDX_Display).D3D_Device.Device;
+
mDevice.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha);
mDevice.SetRenderState(RenderState.DestinationBlend, Blend.InverseSourceAlpha);
Modified: trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Lighting3D.cs
===================================================================
--- trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Lighting3D.cs 2010-01-26 06:53:51 UTC (rev 1192)
+++ trunk/Drivers/AgateSDX/Shaders/FixedFunction/SDX_FF_Lighting3D.cs 2010-01-28 17:19:40 UTC (rev 1193)
@@ -22,7 +22,8 @@
public SDX_FF_Lighting3D()
{
mDisplay = (SDX_Display)AgateLib.DisplayLib.Display.Impl;
- mLights = new AgateLib.DisplayLib.Shaders.Light[mDisplay.D3D_Device.Device.Capabilities.MaxActiveLights];
+ //mLights = new AgateLib.DisplayLib.Shaders.Light[mDisplay.D3D_Device.Device.Capabilities.MaxActiveLights];
+ mLights = new AgateLib.DisplayLib.Shaders.Light[8];
}
public override Color AmbientLight
{
Modified: trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs
===================================================================
--- trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs 2010-01-26 06:53:51 UTC (rev 1192)
+++ trunk/Drivers/AgateSDX/XAud2/XAudio2_Audio.cs 2010-01-28 17:19:40 UTC (rev 1193)
@@ -156,6 +156,16 @@
mDevice.Dispose();
}
+ protected override bool CapsBool(AgateLib.AudioLib.AudioBoolCaps audioBoolCaps)
+ {
+ switch (audioBoolCaps)
+ {
+ case AudioBoolCaps.StreamingSoundBuffer:
+ return true;
+ default:
+ return false;
+ }
+ }
public override SoundBufferImpl CreateSoundBuffer(Stream inStream)
{
return new XAudio2_SoundBuffer(this, inStream);
Modified: trunk/Tests/CoreTests/App.cs
===================================================================
--- trunk/Tests/CoreTests/App.cs 2010-01-26 06:53:51 UTC (rev 1192)
+++ trunk/Tests/CoreTests/App.cs 2010-01-28 17:19:40 UTC (rev 1193)
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using AgateLib;
+using AgateLib.InputLib;
namespace Tests.AppTester
{
@@ -17,11 +18,20 @@
initParams.AllowResize = true;
}
+
#region IAgateTest Members
public string Name { get { return "App Tester"; } }
public string Category { get { return "Core"; } }
#endregion
+
+ protected override void Update(double time_ms)
+ {
+ base.Update(time_ms);
+
+ if (Keyboard.Keys[KeyCode.Space])
+ Quit();
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-01-28 17:31:59
|
Revision: 1194
http://agate.svn.sourceforge.net/agate/?rev=1194&view=rev
Author: kanato
Date: 2010-01-28 17:31:52 +0000 (Thu, 28 Jan 2010)
Log Message:
-----------
Fix crash with AgateGame if window is closed during Update method.
Modified Paths:
--------------
trunk/AgateLib/AgateGame.cs
trunk/Drivers/AgateOTK/GL_DisplayControl.cs
Modified: trunk/AgateLib/AgateGame.cs
===================================================================
--- trunk/AgateLib/AgateGame.cs 2010-01-28 17:19:40 UTC (rev 1193)
+++ trunk/AgateLib/AgateGame.cs 2010-01-28 17:31:52 UTC (rev 1194)
@@ -96,10 +96,14 @@
{
Update(Display.DeltaTime);
+ if (MainWindow.IsClosed)
+ break;
+
if (GuiRoot != null)
GuiRoot.DoUpdate();
+
- Display.RenderTarget = mWindow.FrameBuffer;
+ Display.RenderTarget = MainWindow.FrameBuffer;
Display.BeginFrame();
Render();
Modified: trunk/Drivers/AgateOTK/GL_DisplayControl.cs
===================================================================
--- trunk/Drivers/AgateOTK/GL_DisplayControl.cs 2010-01-28 17:19:40 UTC (rev 1193)
+++ trunk/Drivers/AgateOTK/GL_DisplayControl.cs 2010-01-28 17:31:52 UTC (rev 1194)
@@ -347,6 +347,12 @@
{
mDisplay.ProcessEventsEvent -= mDisplay_ProcessEventsEvent;
+ if (mFrameBuffer != null)
+ {
+ mFrameBuffer.Dispose();
+ mFrameBuffer = null;
+ }
+
if (mContext != null)
{
mContext.Dispose();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-01-28 19:14:33
|
Revision: 1196
http://agate.svn.sourceforge.net/agate/?rev=1196&view=rev
Author: kanato
Date: 2010-01-28 19:14:25 +0000 (Thu, 28 Jan 2010)
Log Message:
-----------
Replace OpenTK with version that reports correct window size.
Modified Paths:
--------------
trunk/Drivers/AgateOTK/OpenTK.dll
trunk/Tests/DisplayTests/FullScreen.cs
Modified: trunk/Drivers/AgateOTK/OpenTK.dll
===================================================================
(Binary files differ)
Modified: trunk/Tests/DisplayTests/FullScreen.cs
===================================================================
--- trunk/Tests/DisplayTests/FullScreen.cs 2010-01-28 18:37:38 UTC (rev 1195)
+++ trunk/Tests/DisplayTests/FullScreen.cs 2010-01-28 19:14:25 UTC (rev 1196)
@@ -31,7 +31,8 @@
Surface mySurface = new Surface("jellybean.png");
// Run the program while the window is open.
- while (!(Display.CurrentWindow.IsClosed || Keyboard.Keys[KeyCode.Escape]))
+ while (Display.CurrentWindow.IsClosed == false &&
+ Keyboard.Keys[KeyCode.Escape] == false)
{
Display.BeginFrame();
Display.Clear(Color.DarkGreen);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-01-30 07:54:33
|
Revision: 1200
http://agate.svn.sourceforge.net/agate/?rev=1200&view=rev
Author: kanato
Date: 2010-01-30 07:54:25 +0000 (Sat, 30 Jan 2010)
Log Message:
-----------
Include database editor/code generator into repository.
Modified Paths:
--------------
trunk/AgateLib/Data/AgateDatabase.cs
trunk/AgateLib/Data/Column.cs
trunk/AgateLib/Data/DataHelper.cs
trunk/AgateLib/Data/Row.cs
trunk/AgateLib/Data/TableDictionary.cs
trunk/AgateTools.sln
Added Paths:
-----------
trunk/Tools/AgateDataLib/
trunk/Tools/AgateDataLib/AgateDataLib.csproj
trunk/Tools/AgateDataLib/DatabaseEditor.Designer.cs
trunk/Tools/AgateDataLib/DatabaseEditor.cs
trunk/Tools/AgateDataLib/DatabaseEditor.resx
trunk/Tools/AgateDataLib/DatabaseWriter.cs
trunk/Tools/AgateDataLib/Images/
trunk/Tools/AgateDataLib/Images/NewTable.png
trunk/Tools/AgateDataLib/Images/NewTableLarge.png
trunk/Tools/AgateDataLib/Images/TableHS.png
trunk/Tools/AgateDataLib/Images/TableHSLarge.png
trunk/Tools/AgateDataLib/Properties/
trunk/Tools/AgateDataLib/Properties/AssemblyInfo.cs
trunk/Tools/AgateDataLib/TableEditor.Designer.cs
trunk/Tools/AgateDataLib/TableEditor.cs
trunk/Tools/AgateDataLib/TableEditor.resx
trunk/Tools/AgateDataLib/frmDesignTable.Designer.cs
trunk/Tools/AgateDataLib/frmDesignTable.cs
trunk/Tools/AgateDataLib/frmDesignTable.resx
trunk/Tools/DatabaseEditor/
trunk/Tools/DatabaseEditor/DatabaseEditor.csproj
trunk/Tools/DatabaseEditor/Program.cs
trunk/Tools/DatabaseEditor/Properties/
trunk/Tools/DatabaseEditor/Properties/AssemblyInfo.cs
trunk/Tools/DatabaseEditor/Properties/Resources.Designer.cs
trunk/Tools/DatabaseEditor/Properties/Resources.resx
trunk/Tools/DatabaseEditor/Properties/Settings.Designer.cs
trunk/Tools/DatabaseEditor/Properties/Settings.settings
trunk/Tools/DatabaseEditor/TestData.cs
trunk/Tools/DatabaseEditor/frmCodeGenerator.Designer.cs
trunk/Tools/DatabaseEditor/frmCodeGenerator.cs
trunk/Tools/DatabaseEditor/frmCodeGenerator.resx
trunk/Tools/DatabaseEditor/frmEditor.Designer.cs
trunk/Tools/DatabaseEditor/frmEditor.cs
trunk/Tools/DatabaseEditor/frmEditor.resx
Modified: trunk/AgateLib/Data/AgateDatabase.cs
===================================================================
--- trunk/AgateLib/Data/AgateDatabase.cs 2010-01-28 22:15:12 UTC (rev 1199)
+++ trunk/AgateLib/Data/AgateDatabase.cs 2010-01-30 07:54:25 UTC (rev 1200)
@@ -66,10 +66,10 @@
void IXleSerializable.WriteData(XleSerializationInfo info)
{
info.Write("Version", "0.4.0");
+ info.Write("CodeNamespace", CodeNamespace);
info.Write("Tables", TableList.ToList());
}
-
void IXleSerializable.ReadData(XleSerializationInfo info)
{
string version = info.ReadString("Version");
@@ -78,6 +78,8 @@
{
List<string> tables = info.ReadList<string>("Tables");
mTables.AddUnloadedTable(tables);
+
+ CodeNamespace = info.ReadString("CodeNamespace", null);
}
else
throw new AgateDatabaseException("Unsupported database version.");
@@ -86,6 +88,8 @@
#endregion
+ public string CodeNamespace { get; set; }
+
private IEnumerable<string> TableList
{
get
Modified: trunk/AgateLib/Data/Column.cs
===================================================================
--- trunk/AgateLib/Data/Column.cs 2010-01-28 22:15:12 UTC (rev 1199)
+++ trunk/AgateLib/Data/Column.cs 2010-01-30 07:54:25 UTC (rev 1200)
@@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using AgateLib.Serialization.Xle;
+using System.ComponentModel;
namespace AgateLib.Data
{
@@ -16,7 +17,6 @@
private int nextAutoIncrementValue = 1;
private FieldType fieldType;
-
public Column Clone()
{
Column retval = new Column();
@@ -66,11 +66,23 @@
#endregion
+ [Browsable(false)]
public int NextAutoIncrementValue
{
get { return nextAutoIncrementValue; }
}
+ public string DefaultValue
+ {
+ get
+ {
+ if (FieldType == FieldType.String)
+ return string.Empty;
+
+ return Activator.CreateInstance(FieldTypeDataType).ToString();
+ }
+ }
+
internal void IncrementNextAutoIncrementValue()
{
nextAutoIncrementValue++;
@@ -91,6 +103,14 @@
get { return fieldType; }
set { fieldType = value; }
}
+ [Browsable(false)]
+ public Type FieldTypeDataType
+ {
+ get
+ {
+ return DataHelper.FromFieldType(FieldType);
+ }
+ }
public bool IsPrimaryKey
{
get { return primaryKey; }
Modified: trunk/AgateLib/Data/DataHelper.cs
===================================================================
--- trunk/AgateLib/Data/DataHelper.cs 2010-01-28 22:15:12 UTC (rev 1199)
+++ trunk/AgateLib/Data/DataHelper.cs 2010-01-30 07:54:25 UTC (rev 1200)
@@ -41,7 +41,7 @@
return value;
}
- internal static Type GetType(FieldType fieldType)
+ internal static Type FromFieldType(FieldType fieldType)
{
DataTypeAttribute[] dataType = (DataTypeAttribute[])
typeof(FieldType).GetField(fieldType.ToString()).GetCustomAttributes(typeof(DataTypeAttribute), false);
@@ -53,7 +53,15 @@
internal static bool IsValidIdentifier(string value)
{
- return identifier.IsMatch(value);
+ var match = identifier.Match(value);
+
+ if (match == null || match.Success == false)
+ return false;
+
+ if (match.Index == 0 && match.Length == value.Length)
+ return true;
+
+ return false;
}
internal static string LineType(string line)
Modified: trunk/AgateLib/Data/Row.cs
===================================================================
--- trunk/AgateLib/Data/Row.cs 2010-01-28 22:15:12 UTC (rev 1199)
+++ trunk/AgateLib/Data/Row.cs 2010-01-30 07:54:25 UTC (rev 1200)
@@ -99,7 +99,7 @@
private void ValidateTypeOrThrow(string key, string value)
{
- Convert.ChangeType(value, DataHelper.GetType(parentTable.Columns[key].FieldType));
+ Convert.ChangeType(value, DataHelper.FromFieldType(parentTable.Columns[key].FieldType));
}
internal void ValidateData(Table agateTable)
Modified: trunk/AgateLib/Data/TableDictionary.cs
===================================================================
--- trunk/AgateLib/Data/TableDictionary.cs 2010-01-28 22:15:12 UTC (rev 1199)
+++ trunk/AgateLib/Data/TableDictionary.cs 2010-01-30 07:54:25 UTC (rev 1200)
@@ -67,6 +67,10 @@
return result;
}
}
+ public Table this[int index]
+ {
+ get { return mTables[index]; }
+ }
private void LoadTable(string name)
{
@@ -91,13 +95,12 @@
mUnloadedTables.Clear();
}
- public Table this[int index]
- {
- get { return mTables[index]; }
- }
public void Add(Table tbl)
{
+ if (tbl == null)
+ throw new ArgumentNullException("tbl", "Passed table cannot be null.");
+
if (mTables.Any(x => x.Name == tbl.Name))
throw new ArgumentException("Table " + tbl.Name + " already exists.");
@@ -117,7 +120,17 @@
return "Tables: " + mTables.Count;
}
+ public bool ContainsTable(string name)
+ {
+ if (mUnloadedTables.Any(x => string.Compare(x, name, true) == 0))
+ return true;
+ if (mTables.Any(x => string.Compare(x.Name, name, true) == 0))
+ return true;
+
+ return false;
+ }
+
#region IEnumerable<Table> Members
public IEnumerator<Table> GetEnumerator()
Modified: trunk/AgateTools.sln
===================================================================
--- trunk/AgateTools.sln 2010-01-28 22:15:12 UTC (rev 1199)
+++ trunk/AgateTools.sln 2010-01-30 07:54:25 UTC (rev 1200)
@@ -21,6 +21,10 @@
TODO.txt = TODO.txt
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateDataLib", "Tools\AgateDataLib\AgateDataLib.csproj", "{2F7A686B-2272-4803-9EF9-0B34BA7802DC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DatabaseEditor", "Tools\DatabaseEditor\DatabaseEditor.csproj", "{685E7B82-4609-4ABB-B25B-0DC7C58BD45F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -115,6 +119,30 @@
{91F57346-B574-4D52-9EB0-AA191B552C94}.Release|x64.Build.0 = Release|x64
{91F57346-B574-4D52-9EB0-AA191B552C94}.Release|x86.ActiveCfg = Release|x86
{91F57346-B574-4D52-9EB0-AA191B552C94}.Release|x86.Build.0 = Release|x86
+ {2F7A686B-2272-4803-9EF9-0B34BA7802DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2F7A686B-2272-4803-9EF9-0B34BA7802DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2F7A686B-2272-4803-9EF9-0B34BA7802DC}.Debug|x64.ActiveCfg = Debug|x64
+ {2F7A686B-2272-4803-9EF9-0B34BA7802DC}.Debug|x64.Build.0 = Debug|x64
+ {2F7A686B-2272-4803-9EF9-0B34BA7802DC}.Debug|x86.ActiveCfg = Debug|x86
+ {2F7A686B-2272-4803-9EF9-0B34BA7802DC}.Debug|x86.Build.0 = Debug|x86
+ {2F7A686B-2272-4803-9EF9-0B34BA7802DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2F7A686B-2272-4803-9EF9-0B34BA7802DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2F7A686B-2272-4803-9EF9-0B34BA7802DC}.Release|x64.ActiveCfg = Release|x64
+ {2F7A686B-2272-4803-9EF9-0B34BA7802DC}.Release|x64.Build.0 = Release|x64
+ {2F7A686B-2272-4803-9EF9-0B34BA7802DC}.Release|x86.ActiveCfg = Release|x86
+ {2F7A686B-2272-4803-9EF9-0B34BA7802DC}.Release|x86.Build.0 = Release|x86
+ {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Debug|x64.ActiveCfg = Debug|x64
+ {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Debug|x64.Build.0 = Debug|x64
+ {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Debug|x86.ActiveCfg = Debug|x86
+ {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Debug|x86.Build.0 = Debug|x86
+ {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Release|x64.ActiveCfg = Release|x64
+ {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Release|x64.Build.0 = Release|x64
+ {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Release|x86.ActiveCfg = Release|x86
+ {685E7B82-4609-4ABB-B25B-0DC7C58BD45F}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Property changes on: trunk/Tools/AgateDataLib
___________________________________________________________________
Added: svn:ignore
+ [Bb]in
obj
[Dd]ebug
[Rr]elease
*.user
*.aps
*.eto
Added: trunk/Tools/AgateDataLib/AgateDataLib.csproj
===================================================================
--- trunk/Tools/AgateDataLib/AgateDataLib.csproj (rev 0)
+++ trunk/Tools/AgateDataLib/AgateDataLib.csproj 2010-01-30 07:54:25 UTC (rev 1200)
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{2F7A686B-2272-4803-9EF9-0B34BA7802DC}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>DataLib</RootNamespace>
+ <AssemblyName>DataLib</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ionic.Zip.Reduced, Version=1.9.1.2, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>.\Ionic.Zip.Reduced.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="CodeGenerator.cs" />
+ <Compile Include="DatabaseEditor.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="DatabaseEditor.Designer.cs">
+ <DependentUpon>DatabaseEditor.cs</DependentUpon>
+ </Compile>
+ <Compile Include="DatabaseWriter.cs" />
+ <Compile Include="frmDesignTable.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="frmDesignTable.Designer.cs">
+ <DependentUpon>frmDesignTable.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="TableEditor.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="TableEditor.Designer.cs">
+ <DependentUpon>TableEditor.cs</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\AgateLib\AgateLib.csproj">
+ <Project>{9490B719-829E-43A7-A5FE-8001F8A81759}</Project>
+ <Name>AgateLib</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="DatabaseEditor.resx">
+ <DependentUpon>DatabaseEditor.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="frmDesignTable.resx">
+ <DependentUpon>frmDesignTable.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="TableEditor.resx">
+ <DependentUpon>TableEditor.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Images\NewTable.png" />
+ <Content Include="Images\NewTableLarge.png" />
+ <Content Include="Images\TableHS.png" />
+ <Content Include="Images\TableHSLarge.png" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Added: trunk/Tools/AgateDataLib/DatabaseEditor.Designer.cs
===================================================================
--- trunk/Tools/AgateDataLib/DatabaseEditor.Designer.cs (rev 0)
+++ trunk/Tools/AgateDataLib/DatabaseEditor.Designer.cs 2010-01-30 07:54:25 UTC (rev 1200)
@@ -0,0 +1,226 @@
+namespace AgateDataLib
+{
+ partial class DatabaseEditor
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DatabaseEditor));
+ this.lstTables = new System.Windows.Forms.ListView();
+ this.largeImages = new System.Windows.Forms.ImageList(this.components);
+ this.smallImages = new System.Windows.Forms.ImageList(this.components);
+ this.tabs = new System.Windows.Forms.TabControl();
+ this.tabContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.closeTabToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+ this.lvContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.largeIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.smallIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.listToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.tableContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.renameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.tabContextMenu.SuspendLayout();
+ this.splitContainer1.Panel1.SuspendLayout();
+ this.splitContainer1.Panel2.SuspendLayout();
+ this.splitContainer1.SuspendLayout();
+ this.lvContextMenu.SuspendLayout();
+ this.tableContextMenu.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // lstTables
+ //
+ this.lstTables.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.lstTables.LabelEdit = true;
+ this.lstTables.LargeImageList = this.largeImages;
+ this.lstTables.Location = new System.Drawing.Point(0, 0);
+ this.lstTables.Name = "lstTables";
+ this.lstTables.Size = new System.Drawing.Size(133, 538);
+ this.lstTables.SmallImageList = this.smallImages;
+ this.lstTables.TabIndex = 6;
+ this.lstTables.UseCompatibleStateImageBehavior = false;
+ this.lstTables.View = System.Windows.Forms.View.SmallIcon;
+ this.lstTables.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.lstTables_AfterLabelEdit);
+ this.lstTables.DoubleClick += new System.EventHandler(this.lstTables_DoubleClick);
+ this.lstTables.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lstTables_MouseUp);
+ this.lstTables.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lstTables_MouseDown);
+ this.lstTables.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lstTables_KeyDown);
+ //
+ // largeImages
+ //
+ this.largeImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("largeImages.ImageStream")));
+ this.largeImages.TransparentColor = System.Drawing.Color.Transparent;
+ this.largeImages.Images.SetKeyName(0, "TableHSLarge.png");
+ this.largeImages.Images.SetKeyName(1, "NewTableLarge.png");
+ //
+ // smallImages
+ //
+ this.smallImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("smallImages.ImageStream")));
+ this.smallImages.TransparentColor = System.Drawing.Color.Transparent;
+ this.smallImages.Images.SetKeyName(0, "TableHS.png");
+ this.smallImages.Images.SetKeyName(1, "NewTable.png");
+ //
+ // tabs
+ //
+ this.tabs.ContextMenuStrip = this.tabContextMenu;
+ this.tabs.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tabs.Location = new System.Drawing.Point(0, 0);
+ this.tabs.Name = "tabs";
+ this.tabs.SelectedIndex = 0;
+ this.tabs.Size = new System.Drawing.Size(480, 538);
+ this.tabs.TabIndex = 7;
+ this.tabs.MouseUp += new System.Windows.Forms.MouseEventHandler(this.tabs_MouseUp);
+ //
+ // tabContextMenu
+ //
+ this.tabContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.closeTabToolStripMenuItem});
+ this.tabContextMenu.Name = "tabContextMenu";
+ this.tabContextMenu.Size = new System.Drawing.Size(104, 26);
+ //
+ // closeTabToolStripMenuItem
+ //
+ this.closeTabToolStripMenuItem.Name = "closeTabToolStripMenuItem";
+ this.closeTabToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.closeTabToolStripMenuItem.Text = "Close";
+ this.closeTabToolStripMenuItem.Click += new System.EventHandler(this.closeTabToolStripMenuItem_Click);
+ //
+ // splitContainer1
+ //
+ this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.splitContainer1.Location = new System.Drawing.Point(0, 0);
+ this.splitContainer1.Name = "splitContainer1";
+ //
+ // splitContainer1.Panel1
+ //
+ this.splitContainer1.Panel1.Controls.Add(this.lstTables);
+ //
+ // splitContainer1.Panel2
+ //
+ this.splitContainer1.Panel2.Controls.Add(this.tabs);
+ this.splitContainer1.Size = new System.Drawing.Size(617, 538);
+ this.splitContainer1.SplitterDistance = 133;
+ this.splitContainer1.TabIndex = 8;
+ //
+ // lvContextMenu
+ //
+ this.lvContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.viewToolStripMenuItem});
+ this.lvContextMenu.Name = "lvContextMenu";
+ this.lvContextMenu.Size = new System.Drawing.Size(100, 26);
+ //
+ // viewToolStripMenuItem
+ //
+ this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.largeIconsToolStripMenuItem,
+ this.smallIconsToolStripMenuItem,
+ this.listToolStripMenuItem});
+ this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
+ this.viewToolStripMenuItem.Size = new System.Drawing.Size(99, 22);
+ this.viewToolStripMenuItem.Text = "View";
+ //
+ // largeIconsToolStripMenuItem
+ //
+ this.largeIconsToolStripMenuItem.Name = "largeIconsToolStripMenuItem";
+ this.largeIconsToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
+ this.largeIconsToolStripMenuItem.Text = "Large Icons";
+ this.largeIconsToolStripMenuItem.Click += new System.EventHandler(this.largeIconsToolStripMenuItem_Click);
+ //
+ // smallIconsToolStripMenuItem
+ //
+ this.smallIconsToolStripMenuItem.Checked = true;
+ this.smallIconsToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.smallIconsToolStripMenuItem.Name = "smallIconsToolStripMenuItem";
+ this.smallIconsToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
+ this.smallIconsToolStripMenuItem.Text = "Small Icons";
+ this.smallIconsToolStripMenuItem.Click += new System.EventHandler(this.smallIconsToolStripMenuItem_Click);
+ //
+ // listToolStripMenuItem
+ //
+ this.listToolStripMenuItem.Name = "listToolStripMenuItem";
+ this.listToolStripMenuItem.Size = new System.Drawing.Size(134, 22);
+ this.listToolStripMenuItem.Text = "List";
+ this.listToolStripMenuItem.Click += new System.EventHandler(this.listToolStripMenuItem_Click);
+ //
+ // tableContextMenu
+ //
+ this.tableContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.renameToolStripMenuItem,
+ this.deleteToolStripMenuItem});
+ this.tableContextMenu.Name = "tableContextMenu";
+ this.tableContextMenu.Size = new System.Drawing.Size(127, 48);
+ //
+ // renameToolStripMenuItem
+ //
+ this.renameToolStripMenuItem.Name = "renameToolStripMenuItem";
+ this.renameToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.renameToolStripMenuItem.Text = "Rename...";
+ this.renameToolStripMenuItem.Click += new System.EventHandler(this.renameToolStripMenuItem_Click);
+ //
+ // deleteToolStripMenuItem
+ //
+ this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
+ this.deleteToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.deleteToolStripMenuItem.Text = "Delete";
+ //
+ // DatabaseEditor
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.splitContainer1);
+ this.Name = "DatabaseEditor";
+ this.Size = new System.Drawing.Size(617, 538);
+ this.tabContextMenu.ResumeLayout(false);
+ this.splitContainer1.Panel1.ResumeLayout(false);
+ this.splitContainer1.Panel2.ResumeLayout(false);
+ this.splitContainer1.ResumeLayout(false);
+ this.lvContextMenu.ResumeLayout(false);
+ this.tableContextMenu.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ListView lstTables;
+ private System.Windows.Forms.TabControl tabs;
+ private System.Windows.Forms.SplitContainer splitContainer1;
+ private System.Windows.Forms.ImageList smallImages;
+ private System.Windows.Forms.ImageList largeImages;
+ private System.Windows.Forms.ContextMenuStrip lvContextMenu;
+ private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem largeIconsToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem smallIconsToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem listToolStripMenuItem;
+ private System.Windows.Forms.ContextMenuStrip tableContextMenu;
+ private System.Windows.Forms.ToolStripMenuItem renameToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem;
+ private System.Windows.Forms.ContextMenuStrip tabContextMenu;
+ private System.Windows.Forms.ToolStripMenuItem closeTabToolStripMenuItem;
+ }
+}
Added: trunk/Tools/AgateDataLib/DatabaseEditor.cs
===================================================================
--- trunk/Tools/AgateDataLib/DatabaseEditor.cs (rev 0)
+++ trunk/Tools/AgateDataLib/DatabaseEditor.cs 2010-01-30 07:54:25 UTC (rev 1200)
@@ -0,0 +1,242 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using AgateLib.Data;
+
+namespace AgateDataLib
+{
+ public partial class DatabaseEditor : UserControl
+ {
+ AgateDatabase mDatabase;
+
+ public DatabaseEditor()
+ {
+ InitializeComponent();
+ }
+
+ public AgateDatabase Database
+ {
+ get
+ {
+ return mDatabase;
+ }
+ set
+ {
+ mDatabase = value;
+
+ DatabaseRefresh();
+ }
+ }
+
+ public void DatabaseRefresh()
+ {
+ lstTables.Clear();
+
+ if (Database == null)
+ {
+ tabs.TabPages.Clear();
+
+ return;
+ }
+
+ ListViewItem newTable = new ListViewItem("New Table");
+ newTable.ImageIndex = 1;
+ newTable.Tag = new InvokeDelegate(NewTable);
+
+ lstTables.Items.Add(newTable);
+
+ foreach (var table in Database.Tables)
+ {
+ ListViewItem item = new ListViewItem(table.Name);
+ item.ImageIndex = 0;
+ item.Tag = table;
+
+ lstTables.Items.Add(item);
+ }
+
+ List<TabPage> pagesToRemove = new List<TabPage>();
+
+ foreach (TabPage tab in tabs.TabPages)
+ {
+ TableEditor ed = tab.Controls[0] as TableEditor;
+
+ if (ed == null)
+ continue;
+
+ if (Database.Tables.Contains(ed.AgateTable) == false)
+ {
+ pagesToRemove.Add(tab);
+ }
+ }
+
+ foreach (var tab in pagesToRemove)
+ tabs.TabPages.Remove(tab);
+ }
+
+ private void lstTables_DoubleClick(object sender, EventArgs e)
+ {
+ if (lstTables.SelectedItems.Count == 0)
+ return;
+
+ object obj = lstTables.SelectedItems[0].Tag ;
+ Table table = obj as Table;
+ InvokeDelegate method = obj as InvokeDelegate;
+
+ if (table != null)
+ {
+ OpenTableTab(table);
+ }
+ if (method != null)
+ {
+ method();
+ }
+ }
+
+ private void OpenTableTab(Table table)
+ {
+ foreach (TabPage tab in tabs.TabPages)
+ {
+ Control ctrl = tab.Controls[0];
+
+ if (ctrl is TableEditor)
+ {
+ TableEditor tb = (TableEditor)ctrl;
+
+ if (tb.AgateTable == table)
+ {
+ tabs.SelectedTab = tab;
+ return;
+ }
+ }
+ }
+
+ TabPage page = new TabPage(table.Name);
+
+ TableEditor editor = new TableEditor();
+ editor.Database = Database;
+ editor.AgateTable = table;
+ editor.Dock = DockStyle.Fill;
+
+ page.Controls.Add(editor);
+
+ tabs.TabPages.Add(page);
+ }
+
+ private void NewTable()
+ {
+ MessageBox.Show("Creating new table");
+ }
+
+ private void closeTabToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ TableEditor editor = tabs.SelectedTab.Controls[0]...
[truncated message content] |
|
From: <ka...@us...> - 2010-01-30 08:35:33
|
Revision: 1204
http://agate.svn.sourceforge.net/agate/?rev=1204&view=rev
Author: kanato
Date: 2010-01-30 08:35:27 +0000 (Sat, 30 Jan 2010)
Log Message:
-----------
Update AgateLib project file for renamed database classes.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/Tools/AgateDataLib/DatabaseEditor.cs
trunk/Tools/AgateDataLib/DatabaseWriter.cs
trunk/Tools/AgateDataLib/TableEditor.cs
trunk/Tools/AgateDataLib/frmDesignTable.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2010-01-30 08:33:58 UTC (rev 1203)
+++ trunk/AgateLib/AgateLib.csproj 2010-01-30 08:35:27 UTC (rev 1204)
@@ -143,15 +143,15 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="Data\AgateDatabaseException.cs" />
- <Compile Include="Data\Column.cs" />
+ <Compile Include="Data\AgateColumn.cs" />
<Compile Include="Data\AgateDatabase.cs" />
- <Compile Include="Data\Row.cs" />
- <Compile Include="Data\Table.cs" />
- <Compile Include="Data\ColumnDictionary.cs" />
- <Compile Include="Data\DataHelper.cs" />
+ <Compile Include="Data\AgateRow.cs" />
+ <Compile Include="Data\AgateTable.cs" />
+ <Compile Include="Data\AgateColumnDictionary.cs" />
+ <Compile Include="Data\AgateDataHelper.cs" />
<Compile Include="Data\FieldType.cs" />
- <Compile Include="Data\RowList.cs" />
- <Compile Include="Data\TableDictionary.cs" />
+ <Compile Include="Data\AgateRowList.cs" />
+ <Compile Include="Data\AgateTableDictionary.cs" />
<Compile Include="DisplayLib\FrameBuffer.cs" />
<Compile Include="DisplayLib\Shaders\AgateBuiltInShaders.cs" />
<Compile Include="DisplayLib\Shaders\Basic2DShader.cs" />
Modified: trunk/Tools/AgateDataLib/DatabaseEditor.cs
===================================================================
--- trunk/Tools/AgateDataLib/DatabaseEditor.cs 2010-01-30 08:33:58 UTC (rev 1203)
+++ trunk/Tools/AgateDataLib/DatabaseEditor.cs 2010-01-30 08:35:27 UTC (rev 1204)
@@ -84,7 +84,7 @@
return;
object obj = lstTables.SelectedItems[0].Tag ;
- Table table = obj as Table;
+ AgateTable table = obj as AgateTable;
InvokeDelegate method = obj as InvokeDelegate;
if (table != null)
@@ -97,7 +97,7 @@
}
}
- private void OpenTableTab(Table table)
+ private void OpenTableTab(AgateTable table)
{
foreach (TabPage tab in tabs.TabPages)
{
@@ -186,7 +186,7 @@
menu = lvContextMenu;
else if (lstTables.SelectedItems.Count == 1)
{
- if (lstTables.SelectedItems[0].Tag is Table)
+ if (lstTables.SelectedItems[0].Tag is AgateTable)
{
menu = tableContextMenu;
}
@@ -214,7 +214,7 @@
private void lstTables_AfterLabelEdit(object sender, LabelEditEventArgs e)
{
object obj = lstTables.SelectedItems[0].Tag;
- Table table = obj as Table;
+ AgateTable table = obj as AgateTable;
if (Database.Tables.ContainsTable(e.Label))
{
Modified: trunk/Tools/AgateDataLib/DatabaseWriter.cs
===================================================================
--- trunk/Tools/AgateDataLib/DatabaseWriter.cs 2010-01-30 08:33:58 UTC (rev 1203)
+++ trunk/Tools/AgateDataLib/DatabaseWriter.cs 2010-01-30 08:35:27 UTC (rev 1204)
@@ -62,7 +62,7 @@
ZipEntry catalog = zip.AddEntry("catalog.txt", ms);
// now do each table
- XleSerializer tableSer = new XleSerializer(typeof(Table));
+ XleSerializer tableSer = new XleSerializer(typeof(AgateTable));
foreach (var table in Database.Tables)
{
Modified: trunk/Tools/AgateDataLib/TableEditor.cs
===================================================================
--- trunk/Tools/AgateDataLib/TableEditor.cs 2010-01-30 08:33:58 UTC (rev 1203)
+++ trunk/Tools/AgateDataLib/TableEditor.cs 2010-01-30 08:35:27 UTC (rev 1204)
@@ -12,9 +12,9 @@
public partial class TableEditor : UserControl
{
AgateDatabase mDatabase;
- Table mTable;
+ AgateTable mTable;
- Row mEditingRow;
+ AgateRow mEditingRow;
int mEditingRowIndex = -1;
public TableEditor()
@@ -29,7 +29,7 @@
AgateTable = null;
}
}
- public Table AgateTable
+ public AgateTable AgateTable
{
get { return mTable; }
set
@@ -88,7 +88,7 @@
gridView.RowCount = mTable.Rows.Count + 1;
}
- Column GetColumn(int columnIndex)
+ AgateColumn GetColumn(int columnIndex)
{
return mTable.Columns[columnIndex];
}
@@ -102,7 +102,7 @@
if (e.RowIndex == gridView.RowCount - 1)
return;
- Row row = null;
+ AgateRow row = null;
if (e.RowIndex == mEditingRowIndex)
row = mEditingRow;
@@ -113,7 +113,7 @@
}
private void gridView_CellValuePushed(object sender, DataGridViewCellValueEventArgs e)
{
- Row row = null;
+ AgateRow row = null;
// Store the reference to the row being edited.
if (e.RowIndex < mTable.Rows.Count)
@@ -144,7 +144,7 @@
}
private void gridView_NewRowNeeded(object sender, DataGridViewRowEventArgs e)
{
- mEditingRow = new Row(mTable);
+ mEditingRow = new AgateRow(mTable);
mEditingRowIndex = gridView.Rows.Count - 1;
}
private void gridView_RowValidated(object sender, DataGridViewCellEventArgs e)
@@ -179,7 +179,7 @@
{
// If the user has canceled the edit of a newly created row,
// replace the corresponding Customer object with a new, empty one.
- this.mEditingRow = new Row(mTable);
+ this.mEditingRow = new AgateRow(mTable);
}
else
{
Modified: trunk/Tools/AgateDataLib/frmDesignTable.cs
===================================================================
--- trunk/Tools/AgateDataLib/frmDesignTable.cs 2010-01-30 08:33:58 UTC (rev 1203)
+++ trunk/Tools/AgateDataLib/frmDesignTable.cs 2010-01-30 08:35:27 UTC (rev 1204)
@@ -21,11 +21,11 @@
}
}
- Table mTable;
- Column mColumnInEdit;
+ AgateTable mTable;
+ AgateColumn mColumnInEdit;
int mRowInEdit = -1;
- public Table TheTable
+ public AgateTable TheTable
{
get { return mTable; }
set
@@ -36,7 +36,7 @@
}
}
- internal static void EditColumns(AgateLib.Data.Table mTable)
+ internal static void EditColumns(AgateLib.Data.AgateTable mTable)
{
frmDesignTable d = new frmDesignTable();
@@ -49,7 +49,7 @@
{
if (e.RowIndex == gridColumns.RowCount - 1) return;
- Column col = null;
+ AgateColumn col = null;
if (e.RowIndex == mRowInEdit)
col = mColumnInEdit;
@@ -72,7 +72,7 @@
private void gridColumns_CellValuePushed(object sender, DataGridViewCellValueEventArgs e)
{
- Column col = null;
+ AgateColumn col = null;
if (e.RowIndex < mTable.Columns.Count)
{
@@ -104,7 +104,7 @@
private void gridColumns_NewRowNeeded(object sender, DataGridViewRowEventArgs e)
{
- this.mColumnInEdit = new Column();
+ this.mColumnInEdit = new AgateColumn();
this.mRowInEdit = gridColumns.Rows.Count - 1;
}
@@ -147,7 +147,7 @@
{
// If the user has canceled the edit of a newly created row,
// replace the corresponding Column object with a new, empty one.
- mColumnInEdit = new Column();
+ mColumnInEdit = new AgateColumn();
}
else
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-01-30 18:28:01
|
Revision: 1215
http://agate.svn.sourceforge.net/agate/?rev=1215&view=rev
Author: kanato
Date: 2010-01-30 18:27:53 +0000 (Sat, 30 Jan 2010)
Log Message:
-----------
Add cloning of tables.
Modified Paths:
--------------
trunk/AgateLib/Data/AgateTable.cs
trunk/Tools/DatabaseEditor/DatabaseEditor.Designer.cs
trunk/Tools/DatabaseEditor/DatabaseEditor.cs
trunk/Tools/DatabaseEditor/DatabaseEditor.resx
trunk/Tools/DatabaseEditor/frmEditor.cs
Modified: trunk/AgateLib/Data/AgateTable.cs
===================================================================
--- trunk/AgateLib/Data/AgateTable.cs 2010-01-30 18:20:30 UTC (rev 1214)
+++ trunk/AgateLib/Data/AgateTable.cs 2010-01-30 18:27:53 UTC (rev 1215)
@@ -21,6 +21,20 @@
mRows = new AgateRowList(this);
}
+
+ public AgateTable Clone()
+ {
+ XleSerializer ser = new XleSerializer(typeof(AgateTable));
+
+ MemoryStream ms = new MemoryStream();
+
+ ser.Serialize(ms, this);
+
+ ms.Position = 0;
+
+ return FromStream(ms);
+ }
+
internal static AgateTable FromStream(Stream stream)
{
XleSerializer ser = new XleSerializer(typeof(AgateTable));
@@ -178,5 +192,6 @@
}
}
+
}
}
Modified: trunk/Tools/DatabaseEditor/DatabaseEditor.Designer.cs
===================================================================
--- trunk/Tools/DatabaseEditor/DatabaseEditor.Designer.cs 2010-01-30 18:20:30 UTC (rev 1214)
+++ trunk/Tools/DatabaseEditor/DatabaseEditor.Designer.cs 2010-01-30 18:27:53 UTC (rev 1215)
@@ -44,8 +44,8 @@
this.listToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tableContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.renameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.duplicateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.duplicateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tabContextMenu.SuspendLayout();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -181,10 +181,17 @@
// renameToolStripMenuItem
//
this.renameToolStripMenuItem.Name = "renameToolStripMenuItem";
- this.renameToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
+ this.renameToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.renameToolStripMenuItem.Text = "Rename...";
this.renameToolStripMenuItem.Click += new System.EventHandler(this.renameToolStripMenuItem_Click);
//
+ // duplicateToolStripMenuItem
+ //
+ this.duplicateToolStripMenuItem.Name = "duplicateToolStripMenuItem";
+ this.duplicateToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.duplicateToolStripMenuItem.Text = "Duplicate";
+ this.duplicateToolStripMenuItem.Click += new System.EventHandler(this.duplicateToolStripMenuItem_Click);
+ //
// deleteToolStripMenuItem
//
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
@@ -192,12 +199,6 @@
this.deleteToolStripMenuItem.Text = "Delete";
this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click);
//
- // duplicateToolStripMenuItem
- //
- this.duplicateToolStripMenuItem.Name = "duplicateToolStripMenuItem";
- this.duplicateToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.duplicateToolStripMenuItem.Text = "Duplicate";
- //
// DatabaseEditor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
Modified: trunk/Tools/DatabaseEditor/DatabaseEditor.cs
===================================================================
--- trunk/Tools/DatabaseEditor/DatabaseEditor.cs 2010-01-30 18:20:30 UTC (rev 1214)
+++ trunk/Tools/DatabaseEditor/DatabaseEditor.cs 2010-01-30 18:27:53 UTC (rev 1215)
@@ -265,6 +265,18 @@
}
}
+ private void duplicateToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (lstTables.SelectedItems.Count == 0)
+ return;
+
+ object obj = lstTables.SelectedItems[0].Tag;
+ AgateTable table = obj as AgateTable;
+
+ AgateTable newTable = table.Clone();
+
+ }
+
}
delegate void InvokeDelegate();
Modified: trunk/Tools/DatabaseEditor/DatabaseEditor.resx
===================================================================
--- trunk/Tools/DatabaseEditor/DatabaseEditor.resx 2010-01-30 18:20:30 UTC (rev 1214)
+++ trunk/Tools/DatabaseEditor/DatabaseEditor.resx 2010-01-30 18:27:53 UTC (rev 1215)
@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAs
- DAAAAk1TRnQBSQFMAgEBAgEAASgBAAEoAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ DAAAAk1TRnQBSQFMAgEBAgEAATABAAEwAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABgAMAASADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@@ -188,7 +188,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABs
- CQAAAk1TRnQBSQFMAgEBAgEAATABAAEwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ CQAAAk1TRnQBSQFMAgEBAgEAATgBAAE4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
Modified: trunk/Tools/DatabaseEditor/frmEditor.cs
===================================================================
--- trunk/Tools/DatabaseEditor/frmEditor.cs 2010-01-30 18:20:30 UTC (rev 1214)
+++ trunk/Tools/DatabaseEditor/frmEditor.cs 2010-01-30 18:27:53 UTC (rev 1215)
@@ -6,6 +6,7 @@
using System.Linq;
using System.Text;
using System.Windows.Forms;
+using AgateDataLib;
namespace AgateDatabaseEditor
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-01-31 17:57:19
|
Revision: 1223
http://agate.svn.sourceforge.net/agate/?rev=1223&view=rev
Author: kanato
Date: 2010-01-31 17:57:11 +0000 (Sun, 31 Jan 2010)
Log Message:
-----------
Implement column reordering.
Modified Paths:
--------------
trunk/AgateLib/Data/AgateColumn.cs
trunk/AgateLib/Data/AgateColumnDictionary.cs
trunk/AgateLib/Data/AgateRow.cs
trunk/AgateLib/Data/AgateTable.cs
trunk/Tools/DatabaseEditor/TableEditor.Designer.cs
trunk/Tools/DatabaseEditor/TableEditor.cs
trunk/Tools/DatabaseEditor/frmDesignTable.cs
trunk/Tools/DatabaseEditor/frmEditor.Designer.cs
trunk/Tools/DatabaseEditor/frmEditor.resx
Modified: trunk/AgateLib/Data/AgateColumn.cs
===================================================================
--- trunk/AgateLib/Data/AgateColumn.cs 2010-01-31 09:09:00 UTC (rev 1222)
+++ trunk/AgateLib/Data/AgateColumn.cs 2010-01-31 17:57:11 UTC (rev 1223)
@@ -58,7 +58,6 @@
info.Write("ColumnWidth", mColumnWidth);
}
}
-
void IXleSerializable.ReadData(XleSerializationInfo info)
{
mName = info.ReadString("Name");
@@ -85,6 +84,12 @@
get { return mColumnWidth; }
set { mColumnWidth = value; }
}
+ /// <summary>
+ /// Gets or sets the display index of this column.
+ /// When saved, columns are sorted by their display index.
+ /// </summary>
+ [Browsable(false)]
+ public int DisplayIndex { get; set; }
public string DefaultValue
{
@@ -190,5 +195,10 @@
{
mNextAutoIncrementValue++;
}
+
+ internal void SetNextAutoIncrementValue(int value)
+ {
+ mNextAutoIncrementValue = value;
+ }
}
}
Modified: trunk/AgateLib/Data/AgateColumnDictionary.cs
===================================================================
--- trunk/AgateLib/Data/AgateColumnDictionary.cs 2010-01-31 09:09:00 UTC (rev 1222)
+++ trunk/AgateLib/Data/AgateColumnDictionary.cs 2010-01-31 17:57:11 UTC (rev 1223)
@@ -31,7 +31,7 @@
{
get
{
- var result = mColumns.First(x => x.Name == name);
+ var result = mColumns.FirstOrDefault(x => x.Name == name);
if (result == null)
throw new ArgumentException("Column does not exist.");
@@ -50,12 +50,25 @@
internal void Add(AgateColumn col)
{
+ if (col == null)
+ throw new ArgumentNullException("Cannot add a null column.");
+
if (mColumns.Any(x => x.Name == col.Name))
throw new ArgumentException("Column " + col.Name + " already exists.");
mColumns.Add(col);
}
+ internal void Insert(int newIndex, AgateColumn col)
+ {
+ if (col == null)
+ throw new ArgumentNullException("Cannot add a null column.");
+ if (mColumns.Any(x => x.Name == col.Name))
+ throw new ArgumentException("Column " + col.Name + " already exists.");
+
+ mColumns.Insert(newIndex, col);
+ }
+
public override string ToString()
{
return "Columns: " + mColumns.Count;
@@ -79,6 +92,11 @@
}
}
+ internal void Remove(int index)
+ {
+ mColumns.RemoveAt(index);
+ }
+
#region IEnumerable<AgateColumn> Members
public IEnumerator<AgateColumn> GetEnumerator()
@@ -95,5 +113,12 @@
}
#endregion
+
+
+
+ public void SortByDisplayIndex()
+ {
+ mColumns.Sort((x, y) => x.DisplayIndex.CompareTo(y.DisplayIndex));
+ }
}
}
Modified: trunk/AgateLib/Data/AgateRow.cs
===================================================================
--- trunk/AgateLib/Data/AgateRow.cs 2010-01-31 09:09:00 UTC (rev 1222)
+++ trunk/AgateLib/Data/AgateRow.cs 2010-01-31 17:57:11 UTC (rev 1223)
@@ -7,38 +7,38 @@
{
public class AgateRow
{
- Dictionary<string, string> values = new Dictionary<string, string>();
- AgateTable parentTable;
+ Dictionary<string, string> mValues = new Dictionary<string, string>();
+ AgateTable mParentTable;
public AgateRow(AgateTable parentTable)
{
- this.parentTable = parentTable;
+ this.mParentTable = parentTable;
foreach (var column in parentTable.Columns)
{
- values[column.Name] = null;
+ mValues[column.Name] = null;
}
}
public AgateRow Clone()
{
- AgateRow retval = new AgateRow(parentTable);
+ AgateRow retval = new AgateRow(mParentTable);
- foreach (var value in values)
- retval.values[value.Key] = value.Value;
+ foreach (var value in mValues)
+ retval.mValues[value.Key] = value.Value;
return retval;
}
public AgateTable ParentTable
{
- get { return parentTable; }
+ get { return mParentTable; }
internal set
{
- parentTable = value;
+ mParentTable = value;
- if (parentTable != null)
+ if (mParentTable != null)
{
- ValidateData(parentTable);
+ ValidateData(mParentTable);
}
}
}
@@ -50,31 +50,40 @@
/// <returns></returns>
public string this[AgateColumn column]
{
- get { return values[column.Name]; }
+ get { return mValues[column.Name]; }
set
{
- ValidateTypeOrThrow(column.Name, value);
-
if (column.FieldType == FieldType.AutoNumber)
throw new AgateDatabaseException("Cannot write to autonumber field.");
- values[column.Name] = value;
+ string oldValue = mValues[column.Name];
+ mValues[column.Name] = value;
+
+ try
+ {
+ ValidateTypeOrThrow(column);
+ }
+ catch
+ {
+ mValues[column.Name] = oldValue;
+ throw;
+ }
}
}
public string this[string key]
{
- get { return values[key]; }
+ get { return mValues[key]; }
set
{
- this[parentTable.Columns[key]] = value;
+ this[mParentTable.Columns[key]] = value;
- values[key] = value;
+ mValues[key] = value;
}
}
internal void WriteWithoutValidation(AgateColumn column, string value)
{
- values[column.Name] = value;
+ mValues[column.Name] = value;
}
public override string ToString()
@@ -82,7 +91,7 @@
StringBuilder b = new StringBuilder();
int count = 0;
- foreach (var column in parentTable.Columns)
+ foreach (var column in mParentTable.Columns)
{
string value = AgateDataHelper.FixString(this[column.Name]);
@@ -97,9 +106,31 @@
return b.ToString();
}
- private void ValidateTypeOrThrow(string key, string value)
+ private void ValidateTypeOrThrow(AgateColumn column)
{
- Convert.ChangeType(value, AgateDataHelper.FromFieldType(parentTable.Columns[key].FieldType));
+ if (mValues.ContainsKey(column.Name) == false ||
+ string.IsNullOrEmpty(this[column]))
+ {
+ switch (column.FieldType)
+ {
+ case FieldType.Int16:
+ case FieldType.Int32:
+ case FieldType.SByte:
+ case FieldType.Single:
+ case FieldType.Decimal:
+ case FieldType.Boolean:
+ case FieldType.Byte:
+ case FieldType.DateTime:
+ case FieldType.Double:
+ case FieldType.UInt16:
+ case FieldType.UInt32:
+ case FieldType.String:
+ mValues[column.Name] = column.DefaultValue;
+ break;
+ }
+ }
+
+ Convert.ChangeType(mValues[column.Name], column.FieldTypeDataType);
}
internal void ValidateData(AgateTable agateTable)
@@ -107,22 +138,22 @@
foreach (var column in agateTable.Columns)
{
if (column.FieldType == FieldType.AutoNumber &&
- (values.ContainsKey(column.Name) == false ||
- values[column.Name] == null))
+ (mValues.ContainsKey(column.Name) == false ||
+ mValues[column.Name] == null))
{
int value = column.NextAutoIncrementValue;
column.IncrementNextAutoIncrementValue();
- values[column.Name] = value.ToString();
+ mValues[column.Name] = value.ToString();
}
- if (values.ContainsKey(column.Name))
+ if (mValues.ContainsKey(column.Name))
{
- ValidateTypeOrThrow(column.Name, values[column.Name]);
+ ValidateTypeOrThrow(column);
}
else
{
- values.Add(column.Name, null);
+ mValues.Add(column.Name, null);
}
if (column.PrimaryKey)
@@ -145,10 +176,14 @@
internal void OnColumnNameChange(string oldName, string newName)
{
- string value = values[oldName];
- values[newName] = value;
+ string value = mValues[oldName];
+ mValues[newName] = value;
- values.Remove(oldName);
+ mValues.Remove(oldName);
}
+ internal void OnDeleteColumn(string text)
+ {
+ mValues.Remove(text);
+ }
}
}
Modified: trunk/AgateLib/Data/AgateTable.cs
===================================================================
--- trunk/AgateLib/Data/AgateTable.cs 2010-01-31 09:09:00 UTC (rev 1222)
+++ trunk/AgateLib/Data/AgateTable.cs 2010-01-31 17:57:11 UTC (rev 1223)
@@ -44,6 +44,8 @@
void IXleSerializable.WriteData(XleSerializationInfo info)
{
+ mColumns.SortByDisplayIndex();
+
info.Write("Name", mName);
info.Write("Version", "0.4.0");
info.Write("Columns", mColumns.ColumnList);
@@ -63,6 +65,9 @@
}
else
throw new AgateDatabaseException("Unsupported database version.");
+
+ for (int i = 0; i < mColumns.Count; i++)
+ mColumns[i].DisplayIndex = i;
}
private string RowString()
@@ -143,23 +148,34 @@
get { return mRows; }
}
+
+ internal void Validate()
+ {
+ foreach (var row in mRows)
+ row.ValidateData(this);
+ }
+
public void AddColumn(AgateColumn col)
{
mColumns.Add(col);
+ if (col.FieldType == FieldType.AutoNumber)
+ {
+
+ }
mRows.ForEach(x => x.ValidateData(this));
}
- internal void Validate()
+ public void RemoveColumn(int index)
{
- foreach (var row in mRows)
- row.ValidateData(this);
- }
+ string text = mColumns[index].Name;
+ foreach (var row in Rows)
+ {
+ row.OnDeleteColumn(text);
+ }
- public void RemoveColumn(int index)
- {
- throw new NotImplementedException();
+ mColumns.Remove(index);
}
public void OverwriteColumn(int index, AgateColumn newColumn)
@@ -175,9 +191,17 @@
if (old.FieldType != newColumn.FieldType)
{
+
try
{
Validate();
+
+ if (newColumn.FieldType == FieldType.AutoNumber)
+ {
+ int max = Rows.Max(x => int.Parse(x[newColumn]));
+
+ newColumn.SetNextAutoIncrementValue(max + 1);
+ }
}
catch
{
@@ -193,5 +217,13 @@
}
+
+ public void MoveColumn(int oldIndex, int newIndex)
+ {
+ AgateColumn col = mColumns[oldIndex];
+
+ mColumns.Remove(oldIndex);
+ mColumns.Insert(newIndex, col);
+ }
}
}
Modified: trunk/Tools/DatabaseEditor/TableEditor.Designer.cs
===================================================================
--- trunk/Tools/DatabaseEditor/TableEditor.Designer.cs 2010-01-31 09:09:00 UTC (rev 1222)
+++ trunk/Tools/DatabaseEditor/TableEditor.Designer.cs 2010-01-31 17:57:11 UTC (rev 1223)
@@ -50,6 +50,7 @@
this.gridView.UserDeletingRow += new System.Windows.Forms.DataGridViewRowCancelEventHandler(this.gridView_UserDeletingRow);
this.gridView.CancelRowEdit += new System.Windows.Forms.QuestionEventHandler(this.gridView_CancelRowEdit);
this.gridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.gridView_CellValueNeeded);
+ this.gridView.ColumnDisplayIndexChanged += new System.Windows.Forms.DataGridViewColumnEventHandler(this.gridView_ColumnDisplayIndexChanged);
this.gridView.RowValidated += new System.Windows.Forms.DataGridViewCellEventHandler(this.gridView_RowValidated);
this.gridView.RowDirtyStateNeeded += new System.Windows.Forms.QuestionEventHandler(this.gridView_RowDirtyStateNeeded);
this.gridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.gridView_CellValuePushed);
Modified: trunk/Tools/DatabaseEditor/TableEditor.cs
===================================================================
--- trunk/Tools/DatabaseEditor/TableEditor.cs 2010-01-31 09:09:00 UTC (rev 1222)
+++ trunk/Tools/DatabaseEditor/TableEditor.cs 2010-01-31 17:57:11 UTC (rev 1223)
@@ -66,11 +66,14 @@
return;
}
+ mTable.Columns.SortByDisplayIndex();
+
int index = 0;
foreach (var column in mTable.Columns)
{
DataGridViewColumn col = new DataGridViewColumn();
+ col.Tag = column;
col.Name = column.Name;
col.ReadOnly = column.FieldType == FieldType.AutoNumber;
@@ -161,21 +164,18 @@
}
private void gridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e)
{
- if (e.RowIndex == gridView.RowCount - 1)
- return;
- if (e.RowIndex >= mTable.Rows.Count)
- return;
-
AgateRow row = null;
if (e.RowIndex == mEditingRowIndex)
row = mEditingRow;
- else
+ else if (e.RowIndex >= mTable.Rows.Count)
+ return;
+ else
row = mTable.Rows[e.RowIndex];
string value = row[ColumnName(e.ColumnIndex)];
- if (mTable.Columns[e.ColumnIndex].FieldType == FieldType.Boolean)
+ if (mTable.Columns[ColumnName(e.ColumnIndex)].FieldType == FieldType.Boolean)
{
e.Value = bool.Parse(value);
}
@@ -348,6 +348,15 @@
return null;
}
}
+
+ private void gridView_ColumnDisplayIndexChanged(object sender, DataGridViewColumnEventArgs e)
+ {
+ AgateColumn col = e.Column.Tag as AgateColumn;
+
+ col.DisplayIndex = e.Column.DisplayIndex;
+
+ OnSetDirtyFlag();
+ }
}
public class StatusTextEventArgs : EventArgs
Modified: trunk/Tools/DatabaseEditor/frmDesignTable.cs
===================================================================
--- trunk/Tools/DatabaseEditor/frmDesignTable.cs 2010-01-31 09:09:00 UTC (rev 1222)
+++ trunk/Tools/DatabaseEditor/frmDesignTable.cs 2010-01-31 17:57:11 UTC (rev 1223)
@@ -75,6 +75,8 @@
if (e.RowIndex == mRowInEdit)
col = mColumnInEdit;
+ else if (e.RowIndex >= mTable.Columns.Count)
+ return;
else
col = mTable.Columns[e.RowIndex];
@@ -134,7 +136,8 @@
{
// Save row changes if any were made and release the edited
// Column object if there is one.
- if (e.RowIndex >= mTable.Columns.Count &&
+ if (mColumnInEdit != null &&
+ e.RowIndex >= mTable.Columns.Count &&
e.RowIndex != gridColumns.Rows.Count - 1)
{
// Add the new Column object to the data store.
Modified: trunk/Tools/DatabaseEditor/frmEditor.Designer.cs
===================================================================
--- trunk/Tools/DatabaseEditor/frmEditor.Designer.cs 2010-01-31 09:09:00 UTC (rev 1222)
+++ trunk/Tools/DatabaseEditor/frmEditor.Designer.cs 2010-01-31 17:57:11 UTC (rev 1223)
@@ -74,7 +74,7 @@
this.statusLabel});
this.statusStrip1.Location = new System.Drawing.Point(0, 0);
this.statusStrip1.Name = "statusStrip1";
- this.statusStrip1.Size = new System.Drawing.Size(632, 22);
+ this.statusStrip1.Size = new System.Drawing.Size(862, 22);
this.statusStrip1.TabIndex = 0;
this.statusStrip1.Text = "statusStrip1";
//
@@ -92,7 +92,7 @@
this.toolsToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
- this.menuStrip1.Size = new System.Drawing.Size(632, 24);
+ this.menuStrip1.Size = new System.Drawing.Size(862, 24);
this.menuStrip1.TabIndex = 2;
this.menuStrip1.Text = "menuStrip1";
//
@@ -240,11 +240,11 @@
// toolStripContainer2.ContentPanel
//
this.toolStripContainer2.ContentPanel.Controls.Add(this.databaseEditor1);
- this.toolStripContainer2.ContentPanel.Size = new System.Drawing.Size(632, 480);
+ this.toolStripContainer2.ContentPanel.Size = new System.Drawing.Size(862, 583);
this.toolStripContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.toolStripContainer2.Location = new System.Drawing.Point(0, 0);
this.toolStripContainer2.Name = "toolStripContainer2";
- this.toolStripContainer2.Size = new System.Drawing.Size(632, 551);
+ this.toolStripContainer2.Size = new System.Drawing.Size(862, 654);
this.toolStripContainer2.TabIndex = 6;
this.toolStripContainer2.Text = "toolStripContainer2";
//
@@ -261,7 +261,7 @@
this.databaseEditor1.Dock = System.Windows.Forms.DockStyle.Fill;
this.databaseEditor1.Location = new System.Drawing.Point(0, 0);
this.databaseEditor1.Name = "databaseEditor1";
- this.databaseEditor1.Size = new System.Drawing.Size(632, 480);
+ this.databaseEditor1.Size = new System.Drawing.Size(862, 583);
this.databaseEditor1.TabIndex = 3;
this.databaseEditor1.Visible = false;
this.databaseEditor1.DirtyStateChanged += new System.EventHandler(this.databaseEditor1_DirtyStateChanged);
@@ -280,7 +280,7 @@
this.btnSortDescending});
this.tableToolStrip.Location = new System.Drawing.Point(84, 24);
this.tableToolStrip.Name = "tableToolStrip";
- this.tableToolStrip.Size = new System.Drawing.Size(208, 25);
+ this.tableToolStrip.Size = new System.Drawing.Size(177, 25);
this.tableToolStrip.TabIndex = 10;
this.tableToolStrip.Text = "toolStrip1";
//
@@ -329,7 +329,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(632, 551);
+ this.ClientSize = new System.Drawing.Size(862, 654);
this.Controls.Add(this.toolStripContainer2);
this.MainMenuStrip = this.menuStrip1;
this.Name = "frmEditor";
Modified: trunk/Tools/DatabaseEditor/frmEditor.resx
===================================================================
--- trunk/Tools/DatabaseEditor/frmEditor.resx 2010-01-31 09:09:00 UTC (rev 1222)
+++ trunk/Tools/DatabaseEditor/frmEditor.resx 2010-01-31 17:57:11 UTC (rev 1223)
@@ -187,13 +187,13 @@
<data name="btnSortAscending.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAF8SURBVDhPY2CAAq/6kxIOBfu/WsYsEoOJ4aD/YxX3LDq4
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAF8SURBVDhPY2CAAq/6kxL2Bfu/WsYsEoOJ4aD/YxX3LDq4
yjV7+3+r8GmlZBnglrv1nn3iuofGwT0vSTbAteCgk2v2+u+W8fM1jAM6/1tGzgzAYwimF1wzt592TF53
- yyxs0jSTwOYv5iGTDhJtQGjoKmb7lO0f7bO2SIA0WUTO8DX27/hvFj1di6hAdMnceswstPOHRdjkFGOf
+ yyxs0jSTwKYv5iGTDhJtQGjoKmb7lO0f7bO2SIA0WUTO8DX27/hvFj1di6hAdMnceswstOOHRdjkFGOf
mVzG7u3vQQYY+7dfJMoAAgGGTRozDCZH5K2dHJq+c3pk4dypUQW7Jrp6Xewx0kgh2gWT3QO3gRTPjkgW
n+rh8aJWS+ke0YEIUjjN1RWc+mYGxs6s01f9X6+vFobFgEagmDcQg7zgCsRdKGrmhGc5T3L3/V+np7oK
h+3GUM0gA0DYCUXd1Oj8B12Gai9azXXEQRJTHB21sRi0Bar5GIrctLCs3n57u/8dRhqpIImJHjainYYa
- S7EYAHMFwvYp7r7aDcZKX4rUlL7W6qnMbjJQWVGsJfeqWld5Lg6vVJMR9bi1AACSWoZyM6QFpAAAAABJ
+ S7EYAHMFwvYp7r7a9cZKX4rUlL7W6qnMbjJQWVGsJfeqWld5Lg6vVJMR9bi1AACIXoZusvzemwAAAABJ
RU5ErkJggg==
</value>
</data>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-02-04 05:11:37
|
Revision: 1228
http://agate.svn.sourceforge.net/agate/?rev=1228&view=rev
Author: kanato
Date: 2010-02-04 05:11:30 +0000 (Thu, 04 Feb 2010)
Log Message:
-----------
Add documentation.
Minor refactoring to improve memory performance.
Fix minor bugs in databases.
Begin implementation of transition effects in GUI.
Modified Paths:
--------------
trunk/AgateLib/AgateGame.cs
trunk/AgateLib/AgateSetup.cs
trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs
trunk/AgateLib/AudioLib/SoundBuffer.cs
trunk/AgateLib/AudioLib/SoundFormat.cs
trunk/AgateLib/BitmapFont/BitmapFontImpl.cs
trunk/AgateLib/BitmapFont/BitmapFontOptions.cs
trunk/AgateLib/Core.cs
trunk/AgateLib/Data/AgateColumn.cs
trunk/AgateLib/Data/AgateColumnDictionary.cs
trunk/AgateLib/Data/AgateDatabase.cs
trunk/AgateLib/Data/AgateDatabaseException.cs
trunk/AgateLib/Data/AgateRow.cs
trunk/AgateLib/Data/AgateRowList.cs
trunk/AgateLib/Data/AgateTable.cs
trunk/AgateLib/Data/AgateTableDictionary.cs
trunk/AgateLib/Data/FieldType.cs
trunk/AgateLib/DisplayLib/Cache/FontStateCache.cs
trunk/AgateLib/DisplayLib/Cache/SurfaceStateCache.cs
trunk/AgateLib/DisplayLib/DisplayCapsInfo.cs
trunk/AgateLib/DisplayLib/DisplayWindow.cs
trunk/AgateLib/DisplayLib/FontState.cs
trunk/AgateLib/DisplayLib/FontSurface.cs
trunk/AgateLib/DisplayLib/ISurface.cs
trunk/AgateLib/DisplayLib/ImplementationBase/DisplayImpl.cs
trunk/AgateLib/DisplayLib/ImplementationBase/SurfaceImpl.cs
trunk/AgateLib/DisplayLib/Shaders/AgateBuiltInShaders.cs
trunk/AgateLib/DisplayLib/Shaders/Basic2DShader.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/AgateShaderCompileError.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/AgateShaderImpl.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Basic2DImpl.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/BuiltInShader.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Effect.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting2DImpl.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/Lighting3DImpl.cs
trunk/AgateLib/DisplayLib/Shaders/Implementation/UniformState.cs
trunk/AgateLib/DisplayLib/SurfaceState.cs
trunk/AgateLib/DisplayLib/TextLayout.cs
trunk/AgateLib/DisplayLib/VertexBuffer.cs
trunk/AgateLib/Drivers/AgateDriverInfo.cs
trunk/AgateLib/Drivers/IUserSetSystems.cs
trunk/AgateLib/Drivers/TypeID.cs
trunk/AgateLib/Geometry/Matrix4x4.cs
trunk/AgateLib/Geometry/Vector2.cs
trunk/AgateLib/Geometry/Vector3.cs
trunk/AgateLib/Geometry/Vector4.cs
trunk/AgateLib/Geometry/VertexTypes/VertexLayout.cs
trunk/AgateLib/Gui/Button.cs
trunk/AgateLib/Gui/Cache/WidgetCache.cs
trunk/AgateLib/Gui/CheckBox.cs
trunk/AgateLib/Gui/Container.cs
trunk/AgateLib/Gui/GuiRoot.cs
trunk/AgateLib/Gui/IGuiThemeEngine.cs
trunk/AgateLib/Gui/Layout/BoxLayoutBase.cs
trunk/AgateLib/Gui/Layout/Grid.cs
trunk/AgateLib/Gui/Layout/VerticalBox.cs
trunk/AgateLib/Gui/ListBox.cs
trunk/AgateLib/Gui/RadioButton.cs
trunk/AgateLib/Gui/ScrollBar.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/Mercury.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryButton.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryCheckBox.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryGuiRoot.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryLabel.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryListBox.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryPanel.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScheme.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScrollBar.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryTextBox.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryWidget.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryWindow.cs
trunk/AgateLib/Gui/Widget.cs
trunk/AgateLib/Gui/WidgetList.cs
trunk/AgateLib/InputLib/JoystickInput.cs
trunk/AgateLib/Particles/ParticleEmitter.cs
trunk/AgateLib/Platform.cs
trunk/AgateLib/PlatformType.cs
trunk/AgateLib/Resources/AgateResourceCollection.cs
trunk/AgateLib/Resources/SpriteResource.cs
trunk/AgateLib/Serialization/Xle/CompressionType.cs
trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs
trunk/AgateLib/Settings/SettingsGroup.cs
trunk/AgateLib/Sprites/Sprite.cs
trunk/AgateLib/Utility/ZipFileProvider.cs
trunk/Drivers/AgateDrawing/Drawing_Display.cs
trunk/Drivers/AgateDrawing/Drawing_Reporter.cs
trunk/Drivers/AgateLib.WinForms/FormsInterop.cs
trunk/Drivers/AgateOTK/GL3/GLPrimitiveRenderer.cs
trunk/Drivers/AgateOTK/GL3/GLVertexBuffer.cs
trunk/Drivers/AgateOTK/GL_Display.cs
trunk/Drivers/AgateOTK/Legacy/LegacyPrimitiveRenderer.cs
trunk/Drivers/AgateOTK/PrimitiveRenderer.cs
trunk/Drivers/AgateSDL/Properties/AssemblyInfo.cs
trunk/Drivers/AgateSDX/SDX_Display.cs
trunk/Tests/Tests.csproj
trunk/Tools/DatabaseEditor/frmImportTable.Designer.cs
trunk/Tools/DatabaseEditor/frmImportTable.cs
Modified: trunk/AgateLib/AgateGame.cs
===================================================================
--- trunk/AgateLib/AgateGame.cs 2010-02-01 18:15:54 UTC (rev 1227)
+++ trunk/AgateLib/AgateGame.cs 2010-02-04 05:11:30 UTC (rev 1228)
@@ -244,7 +244,6 @@
/// Override this method to provide a custom splash screen. This method
/// is called before the Initialize method is called.
/// </summary>
- /// <param name="time_ms"></param>
protected virtual void RenderSplashScreen()
{
Display.Clear(Color.White);
@@ -306,7 +305,13 @@
}
+ /// <summary>
+ /// Gets the initial size of the window.
+ /// </summary>
protected virtual Size WindowSize { get { return new Size(800, 600); } }
+ /// <summary>
+ /// Gets whether or not the initial window should be created full screen.
+ /// </summary>
protected virtual bool FullScreen { get { return false; } }
#endregion
@@ -320,6 +325,9 @@
get { return mWindow; }
}
+ /// <summary>
+ /// Gets or sets the GuiRoot object.
+ /// </summary>
public Gui.GuiRoot GuiRoot
{
get { return mGui; }
Modified: trunk/AgateLib/AgateSetup.cs
===================================================================
--- trunk/AgateLib/AgateSetup.cs 2010-02-01 18:15:54 UTC (rev 1227)
+++ trunk/AgateLib/AgateSetup.cs 2010-02-04 05:11:30 UTC (rev 1228)
@@ -77,16 +77,25 @@
private string mCompanyName;
private string mAppName;
+ /// <summary>
+ /// Indicates the display id that is preferred by the user or application.
+ /// </summary>
public DisplayTypeID PreferredDisplay
{
get { return mPreferredDisplay; }
set { mPreferredDisplay = value; }
}
+ /// <summary>
+ /// Indicates the audio id that is preferred by the user or application.
+ /// </summary>
public AudioTypeID PreferredAudio
{
get { return mPreferredAudio; }
set { mPreferredAudio = value; }
}
+ /// <summary>
+ /// Indicates the input id that is preferred by the user or application.
+ /// </summary>
public InputTypeID PreferredInput
{
get { return mPreferredInput; }
@@ -173,7 +182,13 @@
}
}
+ /// <summary>
+ /// Gets or sets the company name.
+ /// </summary>
public string CompanyName { get { return mCompanyName; } set { mCompanyName = value; } }
+ /// <summary>
+ /// Gets or sets the application name.
+ /// </summary>
public string ApplicationName { get { return mAppName; } set { mAppName = value; } }
/// <summary>
Modified: trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs
===================================================================
--- trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs 2010-02-01 18:15:54 UTC (rev 1227)
+++ trunk/AgateLib/AudioLib/ImplementationBase/StreamingSoundBufferImpl.cs 2010-02-04 05:11:30 UTC (rev 1228)
@@ -24,6 +24,9 @@
namespace AgateLib.AudioLib.ImplementationBase
{
+ /// <summary>
+ /// Base class for a StreamingSoundBuffer implementation.
+ /// </summary>
public abstract class StreamingSoundBufferImpl
{
/// <summary>
Modified: trunk/AgateLib/AudioLib/SoundBuffer.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundBuffer.cs 2010-02-01 18:15:54 UTC (rev 1227)
+++ trunk/AgateLib/AudioLib/SoundBuffer.cs 2010-02-04 05:11:30 UTC (rev 1228)
@@ -143,6 +143,10 @@
return sb;
}
+ /// <summary>
+ /// Gets or sets a boolean value indicating whether or not the sound buffer
+ /// should loop when it reaches the end.
+ /// </summary>
public bool Loop
{
get { return impl.Loop; }
Modified: trunk/AgateLib/AudioLib/SoundFormat.cs
===================================================================
--- trunk/AgateLib/AudioLib/SoundFormat.cs 2010-02-01 18:15:54 UTC (rev 1227)
+++ trunk/AgateLib/AudioLib/SoundFormat.cs 2010-02-04 05:11:30 UTC (rev 1228)
@@ -24,10 +24,13 @@
namespace AgateLib.AudioLib
{
/// <summary>
- /// Class describing what format the raw audio data is in.
+ /// Class describing what format the streamed raw audio data is in.
/// </summary>
public class SoundFormat
{
+ /// <summary>
+ /// Constructs a SoundFormat object.
+ /// </summary>
public SoundFormat()
{
BitsPerSample = 16;
@@ -35,8 +38,18 @@
SamplingFrequency = 44100;
}
+ /// <summary>
+ /// The number of bits per sample.
+ /// </summary>
public int BitsPerSample { get; set; }
+ /// <summary>
+ /// The number of channels in the stream. Samples for individual channels should be
+ /// sequential and in order.
+ /// </summary>
public int Channels { get; set; }
+ /// <summary>
+ /// The frequency in Hz of the audio stream.
+ /// </summary>
public int SamplingFrequency { get; set; }
/// <summary>
Modified: trunk/AgateLib/BitmapFont/BitmapFontImpl.cs
===================================================================
--- trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2010-02-01 18:15:54 UTC (rev 1227)
+++ trunk/AgateLib/BitmapFont/BitmapFontImpl.cs 2010-02-04 05:11:30 UTC (rev 1228)
@@ -182,6 +182,13 @@
mAverageCharWidth = total / (double)count;
}
+ /// <summary>
+ /// Measures the string based on how it would be drawn with the
+ /// specified FontState object.
+ /// </summary>
+ /// <param name="state"></param>
+ /// <param name="text"></param>
+ /// <returns></returns>
public override Size MeasureString(FontState state, string text)
{
if (string.IsNullOrEmpty(text))
Modified: trunk/AgateLib/BitmapFont/BitmapFontOptions.cs
===================================================================
--- trunk/AgateLib/BitmapFont/BitmapFontOptions.cs 2010-02-01 18:15:54 UTC (rev 1227)
+++ trunk/AgateLib/BitmapFont/BitmapFontOptions.cs 2010-02-04 05:11:30 UTC (rev 1228)
@@ -81,6 +81,10 @@
}
}
+ /// <summary>
+ /// Returns a string representation of the CharacterRange object.
+ /// </summary>
+ /// <returns></returns>
public override string ToString()
{
return ((int)mStartChar).ToString() + " - " + ((int)mEndChar).ToString();
Modified: trunk/AgateLib/Core.cs
===================================================================
--- trunk/AgateLib/Core.cs 2010-02-01 18:15:54 UTC (rev 1227)
+++ trunk/AgateLib/Core.cs 2010-02-04 05:11:30 UTC (rev 1228)
@@ -99,6 +99,9 @@
private static CrossPlatformDebugLevel mCrossPlatform = CrossPlatformDebugLevel.Comment;
private static System.Diagnostics.Stopwatch mTime = Stopwatch.StartNew();
+ /// <summary>
+ /// Static class which is used to handle all error reports.
+ /// </summary>
public static class ErrorReporting
{
private static string mErrorFile = "errorlog.txt";
Modified: trunk/AgateLib/Data/AgateColumn.cs
===================================================================
--- trunk/AgateLib/Data/AgateColumn.cs 2010-02-01 18:15:54 UTC (rev 1227)
+++ trunk/AgateLib/Data/AgateColumn.cs 2010-02-04 05:11:30 UTC (rev 1228)
@@ -7,6 +7,9 @@
namespace AgateLib.Data
{
+ /// <summary>
+ /// Represents a column in a table.
+ /// </summary>
public class AgateColumn : IXleSerializable
{
private string mName;
@@ -20,6 +23,10 @@
#region --- Construction and Serialization ---
+ /// <summary>
+ /// Creates a deep copy of the AgateColumn object.
+ /// </summary>
+ /// <returns></returns>
public AgateColumn Clone()
{
AgateColumn retval = new AgateColumn();
@@ -73,11 +80,19 @@
#endregion
#region --- Properties ---
+ /// <summary>
+ /// Gets the next value that will be used if this is an
+ /// auto increment field. If this is not an autoincrement
+ /// field, the return value is undefined and meaningless.
+ /// </summary>
[Browsable(false)]
public int NextAutoIncrementValue
{
get { return mNextAutoIncrementValue; }
}
+ /// <summary>
+ /// Gets the width of the column as displayed in the database editor.
+ /// </summary>
[Browsable(false)]
public int ColumnWidth
{
@@ -91,6 +106,9 @@
[Browsable(false)]
public int DisplayIndex { get; set; }
+ /// <summary>
+ /// Gets the default value for the datatype in this column.
+ /// </summary>
public string DefaultValue
{
get
@@ -102,6 +120,9 @@
}
}
+ /// <summary>
+ /// Gets the name of the column.
+ /// </summary>
public string Name
{
get { return mName; }
@@ -112,11 +133,20 @@
mName = value;
}
}
+
+ /// <summary>
+ /// Gets the data type for value in this column.
+ /// </summary>
public FieldType FieldType
{
get { return mFieldType; }
set { mFieldType = value; }
}
+
+ /// <summary>
+ /// Gets the actual Type object that corresponds to the
+ /// FieldType enum.
+ /// </summary>
[Browsable(false)]
public Type FieldTypeDataType
{
@@ -125,27 +155,44 @@
return AgateDataHelper.FromFieldType(FieldType);
}
}
+ /// <summary>
+ /// Gets or sets whether or not this column is the primary key.
+ /// </summary>
public bool PrimaryKey
{
get { return mPrimaryKey; }
set { mPrimaryKey = value; }
}
+ /// <summary>
+ /// Gets or sets whether values entered in this column should be looked
+ /// up in another table.
+ /// </summary>
public string TableLookup
{
get { return mTableLookup; }
set { mTableLookup = value; }
}
+ /// <summary>
+ /// Gets or sets what field is used to display data in another table
+ /// when the table lookup is used.
+ /// </summary>
public string TableDisplayField
{
get { return mLookupField; }
set { mLookupField = value; }
}
+ /// <summary>
+ /// Gets or sets the description of this column. This property is also used
+ /// to comment properties when code is autogenerated.
+ /// </summary>
public string Description
{
get { return mDescription; }
set { mDescription = value; }
}
-
+ /// <summary>
+ /// Gets whether or not the data type for this column is a numeric type.
+ /// </summary>
public bool IsNumeric
{
get
@@ -171,6 +218,10 @@
}
#endregion
+ /// <summary>
+ /// Returns a string representation of the AgateColumn object.
+ /// </summary>
+ /// <returns></returns>
public override string ToString()
{
return "Column: " + Name;
@@ -185,6 +236,11 @@
"Invalid name \"{0}\" supplied. Column name should be a valid C# or VB identifier.", value));
}
+ /// <summary>
+ /// Checks to see if the name is a valid for a column. It must be a valid C# identifier.
+ /// </summary>
+ /// <param name="value"></param>
+ /// <returns></returns>
public static bool IsValidColumnName(string value)
{
return AgateDataHelper.IsValidIdentifier(value);
Modified: trunk/AgateLib/Data/AgateColumnDictionary.cs
===================================================================
--- trunk/AgateLib/Data/AgateColumnDictionary.cs 2010-02-01 18:15:54 UTC (rev 1227)
+++ trunk/AgateLib/Data/AgateColumnDictionary.cs 2010-02-04 05:11:30 UTC (rev 1228)
@@ -6,6 +6,9 @@
namespace AgateLib.Data
{
+ /// <summary>
+ /// Container class for columns in an AgateTable object.
+ /// </summary>
public class AgateColumnDictionary : IEnumerable<AgateColumn>
{
AgateTable mParentTable;
@@ -27,6 +30,11 @@
set { mParentTable = value; }
}
+ /// <summary>
+ /// Gets a column by the specified name.
+ /// </summary>
+ /// <param name="name">Name of the column to get.</param>
+ /// <returns></returns>
public AgateColumn this[string name]
{
get
@@ -39,6 +47,11 @@
return result;
}
}
+ /// <summary>
+ /// Gets a column by its numerical index.
+ /// </summary>
+ /// <param name="index">Index of the column to get.</param>
+ /// <returns></returns>
public AgateColumn this[int index]
{
get { return mColumns[index]; }
@@ -69,6 +82,10 @@
mColumns.Insert(newIndex, col);
}
+ /// <summary>
+ /// Returns a string representation of the AgateColumnDictionary object.
+ /// </summary>
+ /// <returns></returns>
public override string ToString()
{
return "Columns: " + mColumns.Count;
@@ -79,11 +96,18 @@
get { return mColumns; }
}
+ /// <summary>
+ /// Returns the number of columns in the AgateColumnDictionary.
+ /// </summary>
public int Count
{
get { return mColumns.Count; }
}
+ /// <summary>
+ /// Gets the column which acts as the primary key for the table.
+ /// If no column is marked as the primary key, null is returned.
+ /// </summary>
public AgateColumn PrimaryKeyColumn
{
get
@@ -97,15 +121,19 @@
mColumns.RemoveAt(index);
}
- #region IEnumerable<AgateColumn> Members
+ #region --- IEnumerable<AgateColumn> Members ---
+ /// <summary>
+ /// Enumerates the columns.
+ /// </summary>
+ /// <returns></returns>
public IEnumerator<AgateColumn> GetEnumerator()
{
return mColumns.GetEnumerator();
}
#endregion
- #region IEnumerable Members
+ #region --- IEnumerable Members ---
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
@@ -115,7 +143,9 @@
#endregion
-
+ /// <summary>
+ /// Sorts the columns by their display index.
+ /// </summary>
public void SortByDisplayIndex()
{
mColumns.Sort((x, y) => x.DisplayIndex.CompareTo(y.DisplayIndex));
Modified: trunk/AgateLib/Data/AgateDatabase.cs
===================================================================
--- trunk/AgateLib/Data/AgateDatabase.cs 2010-02-01 18:15:54 UTC (rev 1227)
+++ trunk/AgateLib/Data/AgateDatabase.cs 2010-02-04 05:11:30 UTC (rev 1228)
@@ -24,10 +24,18 @@
{
private AgateTableDictionary mTables;
+ /// <summary>
+ /// Constructs a new AgateDatabase object.
+ /// </summary>
public AgateDatabase()
{
mTables = new AgateTableDictionary(this);
}
+ /// <summary>
+ /// Loads an AgateDatabase object from a file on disk.
+ /// </summary>
+ /// <param name="filename"></param>
+ /// <returns></returns>
public static AgateDatabase FromFile(string filename)
{
AgateDatabase db = ReadDatabase(new AgateLib.Utility.ZipFileProvider(filename));
@@ -35,17 +43,24 @@
return db;
}
+ /// <summary>
+ /// Loads an AgateDatabase object from the specified file provider.
+ /// </summary>
+ /// <param name="provider"></param>
+ /// <returns></returns>
public static AgateDatabase FromProvider(IFileProvider provider)
{
return ReadDatabase(provider);
}
+ /// <summary>
+ /// Destroys an AgateDatabase object.
+ /// </summary>
public void Dispose()
{
((IDisposable)mTables).Dispose();
}
-
private static AgateDatabase ReadDatabase(IFileProvider provider)
{
XleSerializer ser = new XleSerializer(typeof(AgateDatabase));
@@ -60,7 +75,6 @@
}
}
-
#region IXleSerializable Members
void IXleSerializable.WriteData(XleSerializationInfo info)
@@ -88,6 +102,10 @@
#endregion
+ /// <summary>
+ /// Gets or sets the namespace that is used when code is generated
+ /// from the AgateDatabase.
+ /// </summary>
public string CodeNamespace { get; set; }
private IEnumerable<string> TableList
@@ -118,6 +136,10 @@
get { return mTables; }
}
+ /// <summary>
+ /// Gets the text that goes into catalog.txt in the database archive.
+ /// </summary>
+ /// <returns></returns>
public string CatalogString()
{
StringBuilder b = new StringBuilder();
Modified: trunk/AgateLib/Data/AgateDatabaseException.cs
===================================================================
--- trunk/AgateLib/Data/AgateDatabaseException.cs 2010-02-01 18:15:54 UTC (rev 1227)
+++ trunk/AgateLib/Data/AgateDatabaseException.cs 2010-02-04 05:11:30 UTC (rev 1228)
@@ -5,6 +5,9 @@
namespace AgateLib.Data
{
+ /// <summary>
+ /// Exception which is thrown if there is an error when working with the database.
+ /// </summary>
[global::System.Serializable]
public class AgateDatabaseException : AgateException
{
@@ -15,12 +18,42 @@
// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp
//
- public AgateDatabaseException() { ErrorCount = 1; }
- public AgateDatabaseException(string message) : base(message) { ErrorCount = 1; }
- public AgateDatabaseException(string message, Exception inner) : base(message, inner) { ErrorCount = 1; }
+ /// <summary>
+ /// Constructs a database exception.
+ /// </summary>
+ public AgateDatabaseException()
+ {
+ ErrorCount = 1;
+ }
+ /// <summary>
+ /// Constructs a database exception.
+ /// </summary>
+ /// <param name="message"></param>
+ public AgateDatabaseException(string message)
+ : base(message)
+ {
+ ErrorCount = 1;
+ }
+ /// <summary>
+ /// Constructs a database exception.
+ /// </summary>
+ /// <param name="message"></param>
+ /// <param name="inner"></param>
+ public AgateDatabaseException(string message, Exception inner)
+ : base(message, inner)
+ {
+ ErrorCount = 1;
+ }
+ /// <summary>
+ /// Constructs a database exception.
+ /// </summary>
+ /// <param name="format"></param>
+ /// <param name="args"></param>
public AgateDatabaseException(string format, params object[] args)
: base(format, args)
- { ErrorCount = 1; }
+ {
+ ErrorCount = 1;
+ }
internal AgateDatabaseException(int errorCount, string message)
: base(message)
{
@@ -32,6 +65,11 @@
ErrorCount = errorCount;
}
+ /// <summary>
+ /// Constructs a database exception.
+ /// </summary>
+ /// <param name="info"></param>
+ /// <param name="context"></param>
protected AgateDatabaseException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
Modified: trunk/AgateLib/Data/AgateRow.cs
===================================================================
--- trunk/AgateLib/Data/AgateRow.cs 2010-02-01 18:15:54 UTC (rev 1227)
+++ trunk/AgateLib/Data/AgateRow.cs 2010-02-04 05:11:30 UTC (rev 1228)
@@ -5,11 +5,22 @@
namespace AgateLib.Data
{
+ /// <summary>
+ /// Class which contains a row of data in a table of an AgateDatabase object.
+ /// Data added to this class is validated against the data types for the columns
+ /// in the table.
+ /// </summary>
public class AgateRow
{
Dictionary<string, string> mValues = new Dictionary<string, string>();
AgateTable mParentTable;
+ /// <summary>
+ /// Constructs a new AgateRow object representing a single instance
+ /// of the data.
+ /// </summary>
+ /// <param name="parentTable">The table into which the row will be added.
+ /// This is required to validate data that gets added to the row.</param>
public AgateRow(AgateTable parentTable)
{
this.mParentTable = parentTable;
@@ -20,6 +31,10 @@
}
}
+ /// <summary>
+ /// Creates a deep copy of the AgateRow object.
+ /// </summary>
+ /// <returns></returns>
public AgateRow Clone()
{
AgateRow retval = new AgateRow(mParentTable);
@@ -29,6 +44,9 @@
return retval;
}
+ /// <summary>
+ /// Gets the AgateTable object that this row belongs to or will be added to.
+ /// </summary>
public AgateTable ParentTable
{
get { return mParentTable; }
@@ -44,9 +62,9 @@
}
/// <summary>
- /// Shortcut for this[column.Name].
+ /// Gets or sets the field value for this row for the specified column.
/// </summary>
- /// <param name="column"></param>
+ /// <param name="column">The column which indexes the data.</param>
/// <returns></returns>
public string this[AgateColumn column]
{
@@ -70,14 +88,19 @@
}
}
}
- public string this[string key]
+ /// <summary>
+ /// Gets or sets the field value for this row for the specified column.
+ /// </summary>
+ /// <param name="column">The name of the column which indexes the data.</param>
+ /// <returns></returns>
+ public string this[string column]
{
- get { return mValues[key]; }
+ get { return mValues[column]; }
set
{
- this[mParentTable.Columns[key]] = value;
+ this[mParentTable.Columns[column]] = value;
- mValues[key] = value;
+ mValues[column] = value;
}
}
@@ -86,6 +109,10 @@
mValues[column.Name] = value;
}
+ /// <summary>
+ /// Gets a string representation of the row.
+ /// </summary>
+ /// <returns></returns>
public override string ToString()
{
StringBuilder b = new StringBuilder();
Modified: trunk/AgateLib/Data/AgateRowList.cs
===================================================================
--- trunk/AgateLib/Data/AgateRowList.cs 2010-02-01 18:15:54 UTC (rev 1227)
+++ trunk/AgateLib/Data/AgateRowList.cs 2010-02-04 05:11:30 UTC (rev 1228)
@@ -6,7 +6,10 @@
namespace AgateLib.Data
{
- public class AgateRowList : IList<AgateRow>
+ /// <summary>
+ /// Container class for AgateRow objects in a table.
+ /// </summary>
+ public class AgateRowList : IList<AgateRow>
{
AgateTable mParentTable;
List<AgateRow> mRows = new List<AgateRow>();
@@ -28,11 +31,19 @@
set { mParentTable = value; }
}
-
+ /// <summary>
+ /// Performs the specified action for each row in the list.
+ /// </summary>
+ /// <param name="action">The System.Action<T> delegate to perform on
+ /// each row.</param>
public void ForEach(Action<AgateRow> action)
{
mRows.ForEach(action);
}
+ /// <summary>
+ /// Sorts rows in descending order for the specified column.
+ /// </summary>
+ /// <param name="col">The column whose data is to be sorted on.</param>
public void SortDescending(AgateColumn col)
{
if (col.IsNumeric)
@@ -44,6 +55,10 @@
mRows.Sort((x, y) => -x[col].CompareTo(y[col]));
}
}
+ /// <summary>
+ /// Sorts rows in ascending order for the specified column.
+ /// </summary>
+ /// <param name="col">The column whose data is to be sorted on.</param>
public void SortAscending(AgateColumn col)
{
if (col.IsNumeric)
@@ -56,18 +71,31 @@
}
}
+ /// <summary>
+ /// Returns a string representation of the AgateRowList object.
+ /// </summary>
+ /// <returns></returns>
public override string ToString()
{
return "Rows: " + mRows.Count;
}
- #region IList<AgateRow> Members
+ #region --- IList<AgateRow> Members ---
+ /// <summary>
+ /// Gets the index of the specified row.
+ /// </summary>
+ /// <param name="item"></param>
+ /// <returns></returns>
public int IndexOf(AgateRow item)
{
return mRows.IndexOf(item);
}
-
+ /// <summary>
+ /// Inserts a new row into the table.
+ /// </summary>
+ /// <param name="index"></param>
+ /// <param name="item"></param>
public void Insert(int index, AgateRow item)
{
item.ValidateData(mParentTable);
@@ -75,19 +103,25 @@
mRows.Insert(index, item);
}
-
+ /// <summary>
+ /// Removes a row by its index.
+ /// </summary>
+ /// <param name="index"></param>
public void RemoveAt(int index)
{
this[index].ParentTable = null;
mRows.RemoveAt(index);
}
-
+ /// <summary>
+ /// Gets or sets a row by its index.
+ /// The data in the row is validated when setting. An exception
+ /// is thrown if the data validation fails.
+ /// </summary>
+ /// <param name="index">Index of the row.</param>
+ /// <returns></returns>
public AgateRow this[int index]
{
- get
- {
- return mRows[index];
- }
+ get { return mRows[index]; }
set
{
AgateRow old = mRows[index];
@@ -110,8 +144,12 @@
#endregion
- #region ICollection<AgateRow> Members
+ #region --- ICollection<AgateRow> Members ---
+ /// <summary>
+ /// Adds a row to the AgateRowList.
+ /// </summary>
+ /// <param name="row"></param>
public void Add(AgateRow row)
{
if (row == null)
@@ -122,50 +160,66 @@
mRows.Add(row);
}
-
+ /// <summary>
+ /// Removes all the rows.
+ /// </summary>
public void Clear()
{
mRows.Clear();
}
-
+ /// <summary>
+ /// Returns true if the specified row is in the table.
+ /// </summary>
+ /// <param name="item"></param>
+ /// <returns></returns>
public bool Contains(AgateRow item)
{
return mRows.Contains(item);
}
- public void CopyTo(AgateRow[] array, int arrayIndex)
+ void ICollection<AgateRow>.CopyTo(AgateRow[] array, int arrayIndex)
{
mRows.CopyTo(array, arrayIndex);
}
+ /// <summary>
+ /// Gets the number of rows in the table.
+ /// </summary>
public int Count
{
get { return mRows.Count; }
}
- public bool IsReadOnly
+ bool ICollection<AgateRow>.IsReadOnly
{
get { return false; }
}
+ /// <summary>
+ /// Removes a row from the table.
+ /// </summary>
+ /// <param name="item"></param>
+ /// <returns></returns>
public bool Remove(AgateRow item)
{
return mRows.Remove(item);
}
#endregion
+ #region --- IEnumerable<AgateRow> Members ---
- #region IEnumerable<AgateRow> Members
-
+ /// <summary>
+ /// Enumerates the rows.
+ /// </summary>
+ /// <returns></returns>
public IEnumerator<AgateRow> GetEnumerator()
{
return mRows.GetEnumerator();
}
#endregion
+ #region --- IEnumerable Members ---
- #region IEnumerable Members
-
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return GetEnumerator();
Modified: trunk/AgateLib/Data/AgateTable.cs
======================================...
[truncated message content] |
|
From: <ka...@us...> - 2010-02-18 22:34:30
|
Revision: 1234
http://agate.svn.sourceforge.net/agate/?rev=1234&view=rev
Author: kanato
Date: 2010-02-18 22:34:23 +0000 (Thu, 18 Feb 2010)
Log Message:
-----------
Reorganize GUI theming and add preliminary Venus code.
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/Geometry/Rectangle.cs
trunk/AgateLib/Gui/Container.cs
trunk/AgateLib/Gui/GuiRoot.cs
trunk/AgateLib/Gui/IGuiThemeEngine.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/Cache/ScrollBarCache.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/Mercury.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryButton.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryCheckBox.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryGuiRoot.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryLabel.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryListBox.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryPanel.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScheme.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScrollBar.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryTextBox.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryWidget.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryWindow.cs
trunk/AgateLib/Gui/Widget.cs
trunk/AgateLib/Serialization/Xle/XleSerializationInfo.cs
trunk/Tests/Tests.csproj
Added Paths:
-----------
trunk/AgateLib/Gui/ThemeEngines/Venus/
trunk/AgateLib/Gui/ThemeEngines/Venus/CssData.cs
trunk/AgateLib/Gui/ThemeEngines/Venus/Venus.cs
trunk/AgateLib/Gui/ThemeEngines/Venus/VenusScheme.cs
trunk/AgateLib/Gui/ThemeEngines/Venus/VenusTheme.cs
trunk/AgateLib/Gui/ThemeEngines/Venus/VenusThemeDictionary.cs
trunk/AgateLib/Gui/ThemeEngines/Venus/WidgetStyle.cs
trunk/AgateLib/Gui/WidgetRenderer.cs
trunk/Tests/Data/CssTest.css
trunk/Tests/GuiTests/CssParserTest.cs
Removed Paths:
-------------
trunk/AgateLib/Gui/Cache/WidgetCache.cs
trunk/AgateLib/Gui/ThemeEngines/Mercury/Cache/TextBoxCache.cs
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/AgateLib.csproj 2010-02-18 22:34:23 UTC (rev 1234)
@@ -1,7 +1,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.21022</ProductVersion>
+ <ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{9490B719-829E-43A7-A5FE-8001F8A81759}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -167,7 +167,7 @@
<Compile Include="Geometry\VertexTypes\PositionTextureColorNormal.cs" />
<Compile Include="Gui\AgateGuiException.cs" />
<Compile Include="Gui\Button.cs" />
- <Compile Include="Gui\Cache\WidgetCache.cs" />
+ <Compile Include="Gui\WidgetRenderer.cs" />
<Compile Include="Gui\CheckBox.cs" />
<Compile Include="Gui\ComboBox.cs" />
<Compile Include="Gui\Container.cs" />
@@ -185,7 +185,6 @@
<Compile Include="Gui\RadioButton.cs" />
<Compile Include="Gui\TextBox.cs" />
<Compile Include="Gui\ThemeEngines\Mercury\Cache\ScrollBarCache.cs" />
- <Compile Include="Gui\ThemeEngines\Mercury\Cache\TextBoxCache.cs" />
<Compile Include="Gui\ThemeEngines\Mercury\Mercury.cs" />
<Compile Include="Gui\ThemeEngines\Mercury\MercuryButton.cs" />
<Compile Include="Gui\ThemeEngines\Mercury\MercuryCheckBox.cs" />
@@ -199,6 +198,12 @@
<Compile Include="Gui\ThemeEngines\Mercury\MercuryScrollBar.cs" />
<Compile Include="Gui\ThemeEngines\Mercury\MercuryTextBox.cs" />
<Compile Include="Gui\ThemeEngines\Mercury\MercuryWindow.cs" />
+ <Compile Include="Gui\ThemeEngines\Venus\CssData.cs" />
+ <Compile Include="Gui\ThemeEngines\Venus\Venus.cs" />
+ <Compile Include="Gui\ThemeEngines\Venus\VenusScheme.cs" />
+ <Compile Include="Gui\ThemeEngines\Venus\VenusTheme.cs" />
+ <Compile Include="Gui\ThemeEngines\Venus\VenusThemeDictionary.cs" />
+ <Compile Include="Gui\ThemeEngines\Venus\WidgetStyle.cs" />
<Compile Include="Gui\Widget.cs" />
<Compile Include="Gui\WidgetList.cs" />
<Compile Include="Gui\Window.cs" />
@@ -622,6 +627,9 @@
<None Include="InternalResources\Fonts.zip" />
<None Include="InternalResources\images.tar.gz" />
</ItemGroup>
+ <ItemGroup>
+ <Folder Include="Gui\Cache\" />
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<PropertyGroup>
<PreBuildEvent>
Modified: trunk/AgateLib/Geometry/Rectangle.cs
===================================================================
--- trunk/AgateLib/Geometry/Rectangle.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Geometry/Rectangle.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -191,9 +191,9 @@
return false;
if (pt.Y < Top)
return false;
- if (pt.X > Right)
+ if (pt.X >= Right)
return false;
- if (pt.Y > Bottom)
+ if (pt.Y >= Bottom)
return false;
return true;
@@ -470,5 +470,19 @@
}
+ /// <summary>
+ /// Returns a rectangle which has the two specified points as corners.
+ /// </summary>
+ /// <param name="a"></param>
+ /// <param name="b"></param>
+ /// <returns></returns>
+ public static Rectangle FromPoints(Point a, Point b)
+ {
+ return new Rectangle(
+ Math.Min(a.X, b.X),
+ Math.Min(a.Y, b.Y),
+ Math.Abs(a.X - b.X),
+ Math.Abs(a.Y - b.Y));
+ }
}
}
\ No newline at end of file
Deleted: trunk/AgateLib/Gui/Cache/WidgetCache.cs
===================================================================
--- trunk/AgateLib/Gui/Cache/WidgetCache.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Gui/Cache/WidgetCache.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -1,75 +0,0 @@
-// The contents of this file are subject to the Mozilla Public License
-// Version 1.1 (the "License"); you may not use this file except in
-// compliance with the License. You may obtain a copy of the License at
-// http://www.mozilla.org/MPL/
-//
-// Software distributed under the License is distributed on an "AS IS"
-// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-// License for the specific language governing rights and limitations
-// under the License.
-//
-// The Original Code is AgateLib.
-//
-// The Initial Developer of the Original Code is Erik Ylvisaker.
-// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
-// All Rights Reserved.
-//
-// Contributor(s): Erik Ylvisaker
-//
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using AgateLib.Geometry;
-
-namespace AgateLib.Gui.Cache
-{
- /// <summary>
- /// Base class for a cache object used by widgets.
- /// </summary>
- public class WidgetCache
- {
- RectangleF mDisplayRect;
-
- /// <summary>
- /// Constructs a widget cache object.
- /// </summary>
- public WidgetCache()
- {
- Dirty = true;
- }
-
- /// <summary>
- /// Indicates whether or not the cache is dirty and needs to be recalculated.
- /// </summary>
- public bool Dirty { get; set; }
-
- public RectangleF DisplayRect { get{return mDisplayRect; }
- set { mDisplayRect = value; }
- }
- public SizeF DisplaySize
- {
- get { return mDisplayRect.Size; }
- set { mDisplayRect.Size = value; }
- }
- public PointF DisplayLocation
- {
- get { return mDisplayRect.Location; }
- set { mDisplayRect.Location = value; }
- }
-
- public float DisplayWidth
- {
- get { return mDisplayRect.Width; }
- set { mDisplayRect.Width = value; }
- }
- public float DisplayHeight
- {
- get { return mDisplayRect.Height; }
- set { mDisplayRect.Height = value; }
- }
-
- public bool DisplayVisible { get; set; }
- public float DisplayAlpha { get; set; }
- }
-}
Modified: trunk/AgateLib/Gui/Container.cs
===================================================================
--- trunk/AgateLib/Gui/Container.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Gui/Container.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -279,6 +279,16 @@
return Layout.CanMoveFocus(this, currentFocus, direction);
}
+
+ public override void RecreateRenderer()
+ {
+ base.RecreateRenderer();
+
+ foreach (var w in Children)
+ {
+ w.RecreateRenderer();
+ }
+ }
}
public enum Direction
Modified: trunk/AgateLib/Gui/GuiRoot.cs
===================================================================
--- trunk/AgateLib/Gui/GuiRoot.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Gui/GuiRoot.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -45,7 +45,7 @@
Name = "root";
Layout = new Layout.Grid();
- themeEngine = new ThemeEngines.Mercury.Mercury();
+ ThemeEngine = new ThemeEngines.Mercury.Mercury();
}
/// <summary>
/// Constructs a GuiRoot object and uses the specified theme engine.
@@ -85,6 +85,8 @@
throw new ArgumentNullException("RenderEngine must not be null.");
themeEngine = value;
+
+ RecreateRenderer();
}
}
/// <summary>
Modified: trunk/AgateLib/Gui/IGuiThemeEngine.cs
===================================================================
--- trunk/AgateLib/Gui/IGuiThemeEngine.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Gui/IGuiThemeEngine.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -111,5 +111,7 @@
/// </summary>
/// <param name="widget"></param>
void WidgetNeedsUpdate(Widget widget);
+
+ WidgetRenderer CreateRenderer(Widget widget);
}
}
Modified: trunk/AgateLib/Gui/ThemeEngines/Mercury/Cache/ScrollBarCache.cs
===================================================================
--- trunk/AgateLib/Gui/ThemeEngines/Mercury/Cache/ScrollBarCache.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Gui/ThemeEngines/Mercury/Cache/ScrollBarCache.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -21,25 +21,9 @@
using System.Linq;
using System.Text;
using AgateLib.Geometry;
-using AgateLib.Gui.Cache;
+
namespace AgateLib.Gui.ThemeEngines.Mercury.Cache
{
- class ScrollBarCache : WidgetCache
- {
- public bool DownInDecrease { get; set; }
- public bool DownInIncrease { get; set; }
- public bool DownInPageDecrease { get; set; }
- public bool DownInPageIncrease { get; set; }
- public bool MouseInDecrease { get; set; }
- public bool MouseInIncrease { get; set; }
- public bool MouseInPageDecrease { get; set; }
- public bool MouseInPageIncrease { get; set; }
-
- public double LastUpdate { get; set; }
-
- public bool DraggingThumb { get; set; }
- public Point ThumbGrabSpot { get; set; }
- }
}
Deleted: trunk/AgateLib/Gui/ThemeEngines/Mercury/Cache/TextBoxCache.cs
===================================================================
--- trunk/AgateLib/Gui/ThemeEngines/Mercury/Cache/TextBoxCache.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Gui/ThemeEngines/Mercury/Cache/TextBoxCache.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -1,44 +0,0 @@
-// The contents of this file are subject to the Mozilla Public License
-// Version 1.1 (the "License"); you may not use this file except in
-// compliance with the License. You may obtain a copy of the License at
-// http://www.mozilla.org/MPL/
-//
-// Software distributed under the License is distributed on an "AS IS"
-// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-// License for the specific language governing rights and limitations
-// under the License.
-//
-// The Original Code is AgateLib.
-//
-// The Initial Developer of the Original Code is Erik Ylvisaker.
-// Portions created by Erik Ylvisaker are Copyright (C) 2006-2009.
-// All Rights Reserved.
-//
-// Contributor(s): Erik Ylvisaker
-//
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using AgateLib.DisplayLib;
-using AgateLib.Geometry;
-
-namespace AgateLib.Gui.ThemeEngines.Mercury.Cache
-{
- class TextBoxCache : Gui.Cache.WidgetCache
- {
- public FrameBuffer TextBoxFrameBuffer { get; set; }
- public Surface TextBoxSurface
- {
- get
- {
- if (TextBoxFrameBuffer == null)
- return null;
- else
- return TextBoxFrameBuffer.RenderTarget;
- }
- }
-
- public Point Origin;
- }
-}
Modified: trunk/AgateLib/Gui/ThemeEngines/Mercury/Mercury.cs
===================================================================
--- trunk/AgateLib/Gui/ThemeEngines/Mercury/Mercury.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Gui/ThemeEngines/Mercury/Mercury.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -23,7 +23,6 @@
using System.Diagnostics;
using AgateLib.DisplayLib;
using AgateLib.Geometry;
-using AgateLib.Gui.ThemeEngines.Mercury.Cache;
namespace AgateLib.Gui.ThemeEngines.Mercury
{
@@ -49,8 +48,20 @@
public Mercury(MercuryScheme scheme)
{
this.Scheme = scheme;
+
+ mRendererMap.Add(typeof(TextBox), typeof(MercuryTextBox));
+ mRendererMap.Add(typeof(CheckBox), typeof(MercuryCheckBox));
+ mRendererMap.Add(typeof(RadioButton), typeof(MercuryCheckBox));
+ mRendererMap.Add(typeof(Button), typeof(MercuryButton));
+ mRendererMap.Add(typeof(GuiRoot), typeof(MercuryGuiRoot));
+ mRendererMap.Add(typeof(Label), typeof(MercuryLabel));
+ mRendererMap.Add(typeof(Panel), typeof(MercuryPanel));
+ mRendererMap.Add(typeof(Window), typeof(MercuryWindow));
+
+
}
+
/// <summary>
/// Gets or sets the parameters used to draw widgets.
/// </summary>
@@ -78,6 +89,12 @@
}
#endregion
+ Dictionary<Type, Type> mRendererMap = new Dictionary<Type, Type>();
+
+ public WidgetRenderer CreateRenderer(Widget widget)
+ {
+ return (WidgetRenderer)Activator.CreateInstance(mRendererMap[widget.GetType()], this.Scheme, widget);
+ }
#region --- Interface Dispatchers ---
/// <summary>
@@ -253,5 +270,7 @@
return Scheme.Themer(widget).ClientArea(widget);
}
+
+
}
}
\ No newline at end of file
Modified: trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryButton.cs
===================================================================
--- trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryButton.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryButton.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -22,7 +22,6 @@
using System.Text;
using AgateLib.DisplayLib;
using AgateLib.Geometry;
-using AgateLib.Gui.Cache;
namespace AgateLib.Gui.ThemeEngines.Mercury
{
@@ -40,9 +39,21 @@
public Surface Focus { get; set; }
public int TextPadding { get; set; }
- public MercuryButton(MercuryScheme scheme)
- : base(scheme)
- { }
+ public MercuryButton(MercuryScheme scheme, Widget widget)
+ : base(scheme, widget)
+ {
+ if (scheme.Button != null)
+ {
+ StretchRegion = scheme.Button.StretchRegion;
+ Image = scheme.Button.Image;
+ Default = scheme.Button.Default;
+ Pressed = scheme.Button.Pressed;
+ Disabled = scheme.Button.Disabled;
+ Hover = scheme.Button.Hover;
+ Focus = scheme.Button.Focus;
+ TextPadding = scheme.Button.TextPadding;
+ }
+ }
public override void DrawWidget(Widget w)
{
@@ -51,7 +62,6 @@
public void DrawButton(Button button)
{
Surface image = Image;
- WidgetCache c = GetButtonCache(button);
bool isDefault = button.IsDefaultButton;
@@ -63,7 +73,7 @@
image = Default;
Point location = button.PointToScreen(Point.Empty);
- Size size = new Size((int)c.DisplayWidth, (int)c.DisplayHeight);
+ Size size = new Size((int)DisplayWidth, (int)DisplayHeight);
DrawStretchImage(location, size,
image, StretchRegion);
@@ -100,19 +110,6 @@
button.Text);
}
- private WidgetCache GetButtonCache(Button button)
- {
- if (button.Cache == null)
- {
- button.Cache = new WidgetCache();
-
- button.Cache.DisplayLocation = (PointF)button.Location;
- button.Cache.DisplaySize = (SizeF)button.Size;
- }
-
- return button.Cache;
- }
-
public override Size MinSize(Widget w)
{
return CalcMinButtonSize((Button)w);
Modified: trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryCheckBox.cs
===================================================================
--- trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryCheckBox.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryCheckBox.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -22,7 +22,6 @@
using System.Text;
using AgateLib.DisplayLib;
using AgateLib.Geometry;
-using AgateLib.Gui.Cache;
namespace AgateLib.Gui.ThemeEngines.Mercury
{
@@ -37,12 +36,27 @@
public Surface Hover { get; set; }
public Surface Focus { get; set; }
public int Spacing { get; set; }
-
- public MercuryCheckBox(MercuryScheme scheme)
- : base(scheme)
+
+ public MercuryCheckBox(MercuryScheme scheme, Widget widget)
+ : base(scheme, widget)
{
Spacing = 5;
Margin = 2;
+
+ MercuryCheckBox src = scheme.CheckBox;
+
+ if (widget is RadioButton)
+ src = scheme.RadioButton;
+
+ if (src != null)
+ {
+ Image = src.Image;
+ Disabled = src.Disabled;
+ Check = src.Check;
+ Hover = src.Hover;
+ Focus = src.Focus;
+ Spacing = src.Spacing;
+ }
}
public override void DrawWidget(Widget w)
@@ -61,10 +75,9 @@
else
surf = Image;
- WidgetCache c = GetOrCreateCache(checkbox);
Point destPoint = checkbox.PointToScreen(
- Origin.Calc(OriginAlignment.CenterLeft, (Size)c.DisplaySize));
+ Origin.Calc(OriginAlignment.CenterLeft, (Size)DisplaySize));
surf.DisplayAlignment = OriginAlignment.CenterLeft;
surf.Draw(destPoint);
Modified: trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryGuiRoot.cs
===================================================================
--- trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryGuiRoot.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryGuiRoot.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -32,8 +32,8 @@
/// Constructs a MercuryGuiRoot object.
/// </summary>
/// <param name="scheme"></param>
- public MercuryGuiRoot(MercuryScheme scheme)
- : base(scheme)
+ public MercuryGuiRoot(MercuryScheme scheme, Widget widget)
+ : base(scheme, widget)
{ }
/// <summary>
Modified: trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryLabel.cs
===================================================================
--- trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryLabel.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryLabel.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -34,8 +34,8 @@
/// Constructs a MercuryLabel object.
/// </summary>
/// <param name="scheme"></param>
- public MercuryLabel(MercuryScheme scheme)
- : base(scheme)
+ public MercuryLabel(MercuryScheme scheme, Widget widget)
+ : base(scheme, widget)
{ }
/// <summary>
Modified: trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryListBox.cs
===================================================================
--- trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryListBox.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryListBox.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -36,8 +36,8 @@
public Surface Focus { get; set; }
public Rectangle StretchRegion { get; set; }
- public MercuryListBox(MercuryScheme scheme)
- :base(scheme)
+ public MercuryListBox(MercuryScheme scheme, Widget widget)
+ : base(scheme, widget)
{
Margin = 3;
}
Modified: trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryPanel.cs
===================================================================
--- trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryPanel.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryPanel.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -32,8 +32,8 @@
/// Constructs a MercuryPanel object.
/// </summary>
/// <param name="scheme"></param>
- public MercuryPanel(MercuryScheme scheme)
- : base(scheme)
+ public MercuryPanel(MercuryScheme scheme, Widget widget)
+ : base(scheme, widget)
{ }
/// <summary>
/// Does nothing.
Modified: trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScheme.cs
===================================================================
--- trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScheme.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScheme.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -52,15 +52,15 @@
private MercuryScheme()
{
- mLabel = new MercuryLabel(this);
- mWindow = new MercuryWindow(this);
- mButton = new MercuryButton(this);
- mCheckBox = new MercuryCheckBox(this);
- mRadioButton = new MercuryCheckBox(this);
- mTextBox = new MercuryTextBox(this);
- mListBox = new MercuryListBox(this);
- mVScroll = new MercuryScrollBar(this);
- mHScroll = new MercuryScrollBar(this);
+ mLabel = new MercuryLabel(this, null);
+ mWindow = new MercuryWindow(this, null);
+ mButton = new MercuryButton(this, null);
+ mCheckBox = new MercuryCheckBox(this, null);
+ mRadioButton = new MercuryCheckBox(this, null);
+ mTextBox = new MercuryTextBox(this, null);
+ mListBox = new MercuryListBox(this, null);
+ mVScroll = new MercuryScrollBar(this, null);
+ mHScroll = new MercuryScrollBar(this, null);
mDispatch.Add(typeof(Label), mLabel);
mDispatch.Add(typeof(Window), mWindow);
@@ -71,9 +71,8 @@
mDispatch.Add(typeof(ListBox), mListBox);
mDispatch.Add(typeof(VerticalScrollBar), mVScroll);
mDispatch.Add(typeof(HorizontalScrollBar), mHScroll);
- mDispatch.Add(typeof(Panel), new MercuryPanel(this));
- mDispatch.Add(typeof(GuiRoot), new MercuryGuiRoot(this));
-
+ mDispatch.Add(typeof(Panel), new MercuryPanel(this, null));
+ mDispatch.Add(typeof(GuiRoot), new MercuryGuiRoot(this, null));
}
public MercuryWidget Themer(Widget w)
Modified: trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScrollBar.cs
===================================================================
--- trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScrollBar.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryScrollBar.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -25,8 +25,6 @@
namespace AgateLib.Gui.ThemeEngines.Mercury
{
- using Cache;
-
/// <summary>
/// Class which draws scroll bars for the Mercury theme engine.
/// </summary>
@@ -53,10 +51,25 @@
public Rectangle BarStretchRegion { get; set; }
public Rectangle ThumbStretchRegion { get; set; }
+ public bool DownInDecrease { get; set; }
+ public bool DownInIncrease { get; set; }
+ public bool DownInPageDecrease { get; set; }
+ public bool DownInPageIncrease { get; set; }
+
+ public bool MouseInDecrease { get; set; }
+ public bool MouseInIncrease { get; set; }
+ public bool MouseInPageDecrease { get; set; }
+ public bool MouseInPageIncrease { get; set; }
+
+ public double LastUpdate { get; set; }
+
+ public bool DraggingThumb { get; set; }
+ public Point ThumbGrabSpot { get; set; }
+
public int FixedBarSize { get; set; }
- public MercuryScrollBar(MercuryScheme scheme)
- : base(scheme)
+ public MercuryScrollBar(MercuryScheme scheme, Widget widget)
+ : base(scheme, widget)
{
FixedBarSize = 16;
}
@@ -81,13 +94,11 @@
DrawStretchImage(barLoc, sz, Bar, BarStretchRegion);
- var cache = GetCache(scrollBar);
-
if (Mercury.DebugOutlines)
{
DrawRect(scrollBar, PageDecreaseRegion(scrollBar), Color.LightGreen);
DrawRect(scrollBar, PageIncreaseRegion(scrollBar), Color.Green);
- DrawRect(scrollBar, ThumbRegion(scrollBar), cache.DraggingThumb ? Color.LightBlue: Color.Blue);
+ DrawRect(scrollBar, ThumbRegion(scrollBar), DraggingThumb ? Color.LightBlue: Color.Blue);
}
}
@@ -144,41 +155,38 @@
}
void UpdateScrollBar(ScrollBar bar)
{
- var cache = GetCache(bar);
-
- if (cache.LastUpdate + 0.1 > Timing.TotalSeconds)
+ if (LastUpdate + 0.1 > Timing.TotalSeconds)
return;
UpdateMouseLocation(bar, bar.PointToClient(AgateLib.InputLib.Mouse.Position));
- if (cache.DownInDecrease && cache.MouseInDecrease)
+ if (DownInDecrease && MouseInDecrease)
SafeMoveScrollBar(bar, -bar.SmallChange);
- if (cache.DownInIncrease && cache.MouseInIncrease)
+ if (DownInIncrease && MouseInIncrease)
SafeMoveScrollBar(bar, bar.SmallChange);
- if (cache.DownInPageDecrease && cache.MouseInPageDecrease)
+ if (DownInPageDecrease && MouseInPageDecrease)
SafeMoveScrollBar(bar, -bar.LargeChange);
- if (cache.DownInPageIncrease && cache.MouseInPageIncrease)
+ if (DownInPageIncrease && MouseInPageIncrease)
SafeMoveScrollBar(bar, bar.LargeChange);
- cache.LastUpdate = Timing.TotalSeconds;
+ LastUpdate = Timing.TotalSeconds;
}
private void UpdateMouseLocation(ScrollBar scrollBar, Point clientLocation)
{
- var cache = GetCache(scrollBar);
- cache.MouseInDecrease = false;
- cache.MouseInIncrease = false;
- cache.MouseInPageDecrease = false;
- cache.MouseInPageIncrease = false;
+ MouseInDecrease = false;
+ MouseInIncrease = false;
+ MouseInPageDecrease = false;
+ MouseInPageIncrease = false;
if (DecreaseRegion(scrollBar).Contains(clientLocation))
- cache.MouseInDecrease = true;
+ MouseInDecrease = true;
else if (IncreaseRegion(scrollBar).Contains(clientLocation))
- cache.MouseInIncrease = true;
+ MouseInIncrease = true;
else if (PageDecreaseRegion(scrollBar).Contains(clientLocation))
- cache.MouseInPageDecrease = true;
+ MouseInPageDecrease = true;
else if (PageIncreaseRegion(scrollBar).Contains(clientLocation))
- cache.MouseInPageIncrease = true;
+ MouseInPageIncrease = true;
}
private void SafeMoveScrollBar(ScrollBar scrollBar, int change)
@@ -196,46 +204,37 @@
return newValue;
}
- ScrollBarCache GetCache(ScrollBar bar)
- {
- if (bar.Cache == null)
- bar.Cache = new ScrollBarCache();
-
- return (ScrollBarCache)bar.Cache;
- }
-
public void MouseDownInScrollBar(ScrollBar scrollBar, Point clientLocation)
{
- var cache = GetCache(scrollBar);
Rectangle thumb = ThumbRegion(scrollBar);
- cache.LastUpdate = Timing.TotalSeconds + 0.25;
+ LastUpdate = Timing.TotalSeconds + 0.25;
Scheme.RegisterUpdater(this, scrollBar);
if (DecreaseRegion(scrollBar).Contains(clientLocation))
{
- cache.DownInDecrease = true;
+ DownInDecrease = true;
SafeMoveScrollBar(scrollBar, -scrollBar.SmallChange);
}
else if (IncreaseRegion(scrollBar).Contains(clientLocation))
{
- cache.DownInIncrease = true;
+ DownInIncrease = true;
SafeMoveScrollBar(scrollBar, scrollBar.SmallChange);
}
else if (thumb.Contains(clientLocation))
{
- cache.DraggingThumb = true;
- cache.ThumbGrabSpot = new Point(clientLocation.X - thumb.X, clientLocation.Y - thumb.Y);
+ DraggingThumb = true;
+ ThumbGrabSpot = new Point(clientLocation.X - thumb.X, clientLocation.Y - thumb.Y);
}
else if (PageDecreaseRegion(scrollBar).Contains(clientLocation))
{
- cache.DownInPageDecrease = true;
+ DownInPageDecrease = true;
SafeMoveScrollBar(scrollBar, -scrollBar.LargeChange);
}
else if (PageIncreaseRegion(scrollBar).Contains(clientLocation))
{
- cache.DownInPageIncrease = true;
+ DownInPageIncrease = true;
SafeMoveScrollBar(scrollBar, scrollBar.LargeChange);
}
@@ -243,13 +242,12 @@
}
public void MouseMoveInScrollBar(ScrollBar scrollBar, Point clientLocation)
{
- var cache = GetCache(scrollBar);
UpdateMouseLocation(scrollBar, clientLocation);
- if (cache.DraggingThumb)
+ if (DraggingThumb)
{
- Point newThumbPos = new Point(clientLocation.X - cache.ThumbGrabSpot.X,
- clientLocation.Y - cache.ThumbGrabSpot.Y);
+ Point newThumbPos = new Point(clientLocation.X - ThumbGrabSpot.X,
+ clientLocation.Y - ThumbGrabSpot.Y);
int newThumbStart = scrollBar is VerticalScrollBar ? newThumbPos.Y : newThumbPos.X;
int thumbSize = ThumbSize(scrollBar);
@@ -266,13 +264,11 @@
}
public void MouseUpInScrollBar(ScrollBar scrollBar, Point clientLocation)
{
- var cache = GetCache(scrollBar);
-
- cache.DownInDecrease = false;
- cache.DownInIncrease = false;
- cache.DownInPageDecrease = false;
- cache.DownInPageIncrease = false;
- cache.DraggingThumb = false;
+ DownInDecrease = false;
+ DownInIncrease = false;
+ DownInPageDecrease = false;
+ DownInPageIncrease = false;
+ DraggingThumb = false;
Scheme.RemoveUpdater(this, scrollBar);
}
Modified: trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryTextBox.cs
===================================================================
--- trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryTextBox.cs 2010-02-12 03:40:11 UTC (rev 1233)
+++ trunk/AgateLib/Gui/ThemeEngines/Mercury/MercuryTextBox.cs 2010-02-18 22:34:23 UTC (rev 1234)
@@ -25,8 +25,6 @@
namespace AgateLib.Gui.ThemeEngines.Mercury
{
- using Cache;
-
/// <summary>
/// Class which draws text boxes for the Mercury theme engine.
/// </summary>
@@ -38,13 +36,39 @@
public Surface Focus { get; set; }
public Rectangle StretchRegion { get; set; }
- public MercuryTextBox(MercuryScheme scheme)
- : base(scheme)
+ public MercuryTextBox(MercuryScheme scheme, Widget widget)
+ : base(scheme, widget)
{
Margin = 3;
+
+ if (scheme.TextBox != null)
+ {
+ Image = scheme.TextBox.Image;
+ Disabled = scheme.TextBox.Disabled;
+ Hover = scheme.TextBox.Hover;
+ Focus = scheme.TextBox.Focus;
+ StretchRegion = scheme.TextBox.StretchRegion;
+ }
}
+ #region --- Cache ---
+ public FrameBuffer TextBoxFrameBuffer { get; set; }
+ public Surface TextBoxSurface
+ {
+ get
+ {
+ if (TextBoxFrameBuffer == null)
+ return null;
+ else
+ return TextBoxFrameBuffer.RenderTarget;
+ }
+ }
+
+ public Point Origin;
+
+ #endregion
+
public void MouseDownInTextBox(TextBox textBox, Point clientLocation)
{
textBox.MoveInsertionPoint(
@@ -63,26 +87,9 @@
{
}
- public override AgateLib.Gui.Cache.WidgetCache GetOrCreateCache(Widget w)
- {
- return GetTextBoxCache((TextBox)w);
- }
- private TextBoxCache GetTextBoxCache(TextBox textBox)
- {
- i...
[truncated message content] |
|
From: <ka...@us...> - 2010-02-22 05:33:51
|
Revision: 1238
http://agate.svn.sourceforge.net/agate/?rev=1238&view=rev
Author: kanato
Date: 2010-02-22 05:33:44 +0000 (Mon, 22 Feb 2010)
Log Message:
-----------
Complete loading of new gui theme from resource file.
Modified Paths:
--------------
trunk/AgateLib/Gui/ThemeEngines/Venus/Venus.cs
trunk/AgateLib/IFileProvider.cs
trunk/AgateLib/Resources/AgateResourceCollection.cs
trunk/AgateLib/Utility/FileProviderList.cs
trunk/AgateLib/Utility/FileSystemProvider.cs
trunk/AgateLib/Utility/TgzFileProvider.cs
trunk/AgateLib/Utility/ZipFileProvider.cs
trunk/Drivers/AgateOTK/GL_Surface.cs
trunk/TODO.txt
trunk/Tests/Data/CssTest.css
trunk/Tests/Shaders/Hlsl.cs
trunk/Tests/Tests.csproj
trunk/Tests/frmLauncher.Designer.cs
trunk/Tests/frmLauncher.cs
Added Paths:
-----------
trunk/Tests/Data/gui.zip
trunk/Tests/GuiTests/Buttons.cs
trunk/Tests/ResourceTests/
trunk/Tests/ResourceTests/Res040.cs
Modified: trunk/AgateLib/Gui/ThemeEngines/Venus/Venus.cs
===================================================================
--- trunk/AgateLib/Gui/ThemeEngines/Venus/Venus.cs 2010-02-21 22:46:35 UTC (rev 1237)
+++ trunk/AgateLib/Gui/ThemeEngines/Venus/Venus.cs 2010-02-22 05:33:44 UTC (rev 1238)
@@ -4,6 +4,7 @@
using System.IO;
using System.Text;
using AgateLib.Geometry;
+using AgateLib.Resources;
namespace AgateLib.Gui.ThemeEngines.Venus
{
@@ -13,7 +14,30 @@
{
}
+ public Venus(AgateResourceCollection resources)
+ {
+ if (resources.GuiThemes.Count == 0)
+ throw new AgateGuiException("The specified resource collection does not contain GuiTheme resource.");
+ FileProvider = resources.FileProvider;
+
+ string filename = resources.GuiThemes[0].CssFile;
+
+ LoadCss(FileProvider.ReadAllText(filename));
+
+ }
+ public Venus(AgateResourceCollection resources, string guiThemeName)
+ {
+ FileProvider = resources.FileProvider;
+
+ string filename = resources.GuiThemes[guiThemeName].CssFile;
+
+ LoadCss(FileProvider.ReadAllText(filename));
+
+ }
+
+ public IFileProvider FileProvider { get; set; }
+
public void LoadCss(string text)
{
CssData d = new CssData();
Modified: trunk/AgateLib/IFileProvider.cs
===================================================================
--- trunk/AgateLib/IFileProvider.cs 2010-02-21 22:46:35 UTC (rev 1237)
+++ trunk/AgateLib/IFileProvider.cs 2010-02-22 05:33:44 UTC (rev 1238)
@@ -32,7 +32,7 @@
/// Opens the specified file returning a stream. Throws
/// FileNotFoundException if the file does not exist.
/// </summary>
- /// <param name="filename"></param>
+ /// <param name="filename">The path and filename of the file to read from.</param>
/// <returns></returns>
Stream OpenRead(string filename);
/// <summary>
@@ -56,5 +56,11 @@
/// <param name="searchPattern"></param>
/// <returns></returns>
IEnumerable<string> GetAllFiles(string searchPattern);
+ /// <summary>
+ /// Returns a string containing the entire contents of the specified file.
+ /// </summary>
+ /// <param name="filename">The path and filename of the file to read from.</param>
+ /// <returns></returns>
+ string ReadAllText(string filename);
}
}
Modified: trunk/AgateLib/Resources/AgateResourceCollection.cs
===================================================================
--- trunk/AgateLib/Resources/AgateResourceCollection.cs 2010-02-21 22:46:35 UTC (rev 1237)
+++ trunk/AgateLib/Resources/AgateResourceCollection.cs 2010-02-22 05:33:44 UTC (rev 1238)
@@ -19,6 +19,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
+using System.Linq;
using System.Text;
using System.Xml;
using System.IO;
@@ -37,13 +38,15 @@
Dictionary<string, AgateResource> mStore = new Dictionary<string, AgateResource>();
List<ImageResource> mImages = new List<ImageResource>();
+ List<GuiThemeResource> mGuiThemes = new List<GuiThemeResource>();
const string mStringTableKey = "Strings";
bool mOwnFileProvider;
IFileProvider mFileProvider;
SurfaceResourceList mSurfaceAccessor;
-
+ GuiThemeResourceList mGuiThemeAccessor;
+
public class SurfaceResourceList
{
AgateResourceCollection mResources;
@@ -59,23 +62,60 @@
{
foreach (var img in mResources.mImages)
{
- foreach (var surface in img.Surfaces)
- {
- if (surface.Name == key)
- return surface;
- }
+ var retval = img.Surfaces.FirstOrDefault(x => x.Name == key);
+
+ if (retval != null)
+ return retval;
}
-
+
throw new AgateResourceException("Could not find the surface resource {0}.", key);
}
}
+
+ public int Count
+ {
+ get { return mResources.mImages.Count; }
+ }
}
+ public class GuiThemeResourceList
+ {
+ AgateResourceCollection mResources;
+
+ internal GuiThemeResourceList(AgateResourceCollection resources)
+ {
+ mResources = resources;
+ }
+
+ public GuiThemeResource this[string key]
+ {
+ get
+ {
+ var retval = mResources.mGuiThemes.FirstOrDefault(x => x.Name == key);
+
+ if (retval == null)
+ throw new AgateResourceException("Could not find the gui theme resource {0}.", key);
+
+ return retval;
+ }
+ }
+ public GuiThemeResource this[int index]
+ {
+ get { return mResources.mGuiThemes[index]; }
+ }
+ public int Count
+ {
+ get { return mResources.mGuiThemes.Count; }
+ }
+ }
+
/// <summary>
/// Constructs a new AgateResourceCollection object.
/// </summary>
public AgateResourceCollection()
{
mSurfaceAccessor = new SurfaceResourceList(this);
+ mGuiThemeAccessor = new GuiThemeResourceList(this);
+
this.mStore.Add(mStringTableKey, new StringTable());
}
/// <summary>
@@ -100,6 +140,7 @@
public AgateResourceCollection(IFileProvider fileProvider, string filename)
{
mSurfaceAccessor = new SurfaceResourceList(this);
+ mGuiThemeAccessor = new GuiThemeResourceList(this);
FileProvider = fileProvider;
RootDirectory = Path.GetDirectoryName(filename);
@@ -176,6 +217,13 @@
}
}
/// <summary>
+ /// Gets the list of GuiThemeResource objects.
+ /// </summary>
+ public GuiThemeResourceList GuiThemes
+ {
+ get { return mGuiThemeAccessor; }
+ }
+ /// <summary>
/// Enumerates through the DisplayWindowResources contained in this group of resources.
/// </summary>
public IEnumerable<DisplayWindowResource> DisplayWindows
@@ -219,6 +267,10 @@
mImages.Add(img);
}
+ else if (item is GuiThemeResource)
+ {
+ mGuiThemes.Add((GuiThemeResource)item);
+ }
else
mStore.Add(item.Name, item);
}
Modified: trunk/AgateLib/Utility/FileProviderList.cs
===================================================================
--- trunk/AgateLib/Utility/FileProviderList.cs 2010-02-21 22:46:35 UTC (rev 1237)
+++ trunk/AgateLib/Utility/FileProviderList.cs 2010-02-22 05:33:44 UTC (rev 1238)
@@ -258,6 +258,17 @@
#endregion
+ /// <summary>
+ /// Returns a string containing all the text in the specified file.
+ /// </summary>
+ /// <param name="filename">The name of the file to read from.</param>
+ /// <returns></returns>
+ public string ReadAllText(string filename)
+ {
+ Stream s = OpenRead(filename);
+ return new StreamReader(s).ReadToEnd();
+ }
+
}
}
Modified: trunk/AgateLib/Utility/FileSystemProvider.cs
===================================================================
--- trunk/AgateLib/Utility/FileSystemProvider.cs 2010-02-21 22:46:35 UTC (rev 1237)
+++ trunk/AgateLib/Utility/FileSystemProvider.cs 2010-02-22 05:33:44 UTC (rev 1238)
@@ -227,5 +227,18 @@
{
return string.Format("FileSystemProvider: {0}", mPath);
}
+
+ /// <summary>
+ /// Returns a string containing all the text in the specified file.
+ /// </summary>
+ /// <param name="filename">The name of the file to read from.</param>
+ /// <returns></returns>
+ public string ReadAllText(string filename)
+ {
+ Stream s = OpenRead(filename);
+
+ return new StreamReader(s).ReadToEnd();
+ }
+
}
}
Modified: trunk/AgateLib/Utility/TgzFileProvider.cs
===================================================================
--- trunk/AgateLib/Utility/TgzFileProvider.cs 2010-02-21 22:46:35 UTC (rev 1237)
+++ trunk/AgateLib/Utility/TgzFileProvider.cs 2010-02-22 05:33:44 UTC (rev 1238)
@@ -271,6 +271,17 @@
}
}
}
+ /// <summary>
+ /// Returns a string containing all the text in the specified file.
+ /// </summary>
+ /// <param name="filename">The name of the file to read from.</param>
+ /// <returns></returns>
+ public string ReadAllText(string filename)
+ {
+ Stream s = OpenRead(filename);
+ return new StreamReader(s).ReadToEnd();
+ }
+
}
}
\ No newline at end of file
Modified: trunk/AgateLib/Utility/ZipFileProvider.cs
===================================================================
--- trunk/AgateLib/Utility/ZipFileProvider.cs 2010-02-21 22:46:35 UTC (rev 1237)
+++ trunk/AgateLib/Utility/ZipFileProvider.cs 2010-02-22 05:33:44 UTC (rev 1238)
@@ -321,7 +321,18 @@
}
#endregion
+ /// <summary>
+ /// Returns a string containing all the text in the specified file.
+ /// </summary>
+ /// <param name="filename">The name of the file to read from.</param>
+ /// <returns></returns>
+ public string ReadAllText(string filename)
+ {
+ Stream s = OpenRead(filename);
+ return new StreamReader(s).ReadToEnd();
+ }
+
}
enum ZipStorageType
Modified: trunk/Drivers/AgateOTK/GL_Surface.cs
===================================================================
--- trunk/Drivers/AgateOTK/GL_Surface.cs 2010-02-21 22:46:35 UTC (rev 1237)
+++ trunk/Drivers/AgateOTK/GL_Surface.cs 2010-02-22 05:33:44 UTC (rev 1238)
@@ -130,7 +130,6 @@
mTextureSize = textureSize;
mTexCoord = GetTextureCoords(mSourceRect);
-
}
private void AddTextureRef(int textureID)
Modified: trunk/TODO.txt
===================================================================
--- trunk/TODO.txt 2010-02-21 22:46:35 UTC (rev 1237)
+++ trunk/TODO.txt 2010-02-22 05:33:44 UTC (rev 1238)
@@ -11,6 +11,8 @@
Implement better Platform.HasWriteAccessToAppDirectory method.
Test ClipRects with AgateOTK
Test if GL_GameWindow is viable.
+ Remove old resource code so that surface and sprites are loaded only as subelements
+ of the Image tag.
Goals for 0.3.2
--------------------------------
Modified: trunk/Tests/Data/CssTest.css
===================================================================
--- trunk/Tests/Data/CssTest.css 2010-02-21 22:46:35 UTC (rev 1237)
+++ trunk/Tests/Data/CssTest.css 2010-02-22 05:33:44 UTC (rev 1238)
@@ -1,7 +1,45 @@
window
{
- background-image: url('test.png');
+ background-image: Window;
background-color: #000000;
background-repeat: no-repeat;
+}
+
+button
+{
+ background-image: Button;
+ bg-image-stretch-left: 5;
+ bg-image-stretch-right: 5;
+ bg-image-stretch-top: 5;
+ bg-image-stretch-bottom: 5;
+ text-color: white;
+ align: center;
+ vertical-align: center;
+}
+
+button:default
+{
+ background-image: ButtonDefault;
+}
+
+button:pressed
+{
+ background-image: ButtonPressed;
+}
+
+button:hover
+{
+ overlay-image: ButtonHover;
+}
+
+button:focus
+{
+ overlay-image: ButtonFocus;
+}
+
+button:disabled
+{
+ overlay-image: ButtonDisabled;
+ text-color: gray;
}
\ No newline at end of file
Copied: trunk/Tests/Data/gui.zip (from rev 1234, trunk/Tests/Data/dogs.zip)
===================================================================
(Binary files differ)
Copied: trunk/Tests/GuiTests/Buttons.cs (from rev 1234, trunk/Tests/GuiTests/Textboxes.cs)
===================================================================
--- trunk/Tests/GuiTests/Buttons.cs (rev 0)
+++ trunk/Tests/GuiTests/Buttons.cs 2010-02-22 05:33:44 UTC (rev 1238)
@@ -0,0 +1,65 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using AgateLib;
+using AgateLib.DisplayLib;
+using AgateLib.Geometry;
+using AgateLib.Gui;
+using AgateLib.Resources;
+
+namespace Tests.GuiTests
+{
+ class Buttons : AgateGame, IAgateTest
+ {
+ #region IAgateTest Members
+
+ public string Name
+ {
+ get { return "Buttons"; }
+ }
+
+ public string Category
+ {
+ get { return "Gui"; }
+ }
+
+ public void Main(string[] args)
+ {
+ Run(args);
+ }
+
+ #endregion
+
+ protected override void AdjustAppInitParameters(ref AppInitParameters initParams)
+ {
+ initParams.ShowSplashScreen = false;
+ }
+ protected override void Initialize()
+ {
+ AgateResourceCollection resources = AgateResourceCollection.FromZipArchive("Data/gui.zip");
+
+ this.GuiRoot = new GuiRoot();
+ this.GuiRoot.ThemeEngine = new AgateLib.Gui.ThemeEngines.Venus.Venus(resources);
+
+ Window wind = new Window("Buttons test");
+ wind.Size = new AgateLib.Geometry.Size(320, 240);
+
+ Button b = new Button();
+ b.Text = "Press me";
+
+ Button c = new Button();
+ c.Text = "No, press me!";
+
+ wind.Children.Add(b);
+ wind.Children.Add(c);
+
+ this.GuiRoot.Children.Add(wind);
+ }
+
+ protected override void Render()
+ {
+ Display.Clear(Color.Maroon);
+ }
+ }
+}
\ No newline at end of file
Copied: trunk/Tests/ResourceTests/Res040.cs (from rev 1234, trunk/Tests/CoreTests/App.cs)
===================================================================
--- trunk/Tests/ResourceTests/Res040.cs (rev 0)
+++ trunk/Tests/ResourceTests/Res040.cs 2010-02-22 05:33:44 UTC (rev 1238)
@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using AgateLib;
+using AgateLib.DisplayLib;
+using AgateLib.InputLib;
+using AgateLib.Resources;
+
+namespace Tests.ResourceTests
+{
+ class Resources040: AgateGame, IAgateTest
+ {
+ public void Main(string[] args)
+ {
+ Run(args);
+ }
+
+ protected override void AdjustAppInitParameters(ref AppInitParameters initParams)
+ {
+ initParams.AllowResize = true;
+ }
+
+ public string Name { get { return "Resources 0.4.0"; } }
+ public string Category { get { return "Resources"; } }
+
+ AgateResourceCollection resources;
+ Surface btn;
+
+ protected override void Initialize()
+ {
+ resources = AgateResourceCollection.FromZipArchive("Data/gui.zip");
+
+ btn = new Surface(resources, "Button");
+ }
+
+ protected override void Update(double time_ms)
+ {
+ base.Update(time_ms);
+
+ if (Keyboard.Keys[KeyCode.Space])
+ Quit();
+ }
+
+ protected override void Render()
+ {
+ btn.Draw(5, 5);
+ }
+ }
+}
Modified: trunk/Tests/Shaders/Hlsl.cs
===================================================================
--- trunk/Tests/Shaders/Hlsl.cs 2010-02-21 22:46:35 UTC (rev 1237)
+++ trunk/Tests/Shaders/Hlsl.cs 2010-02-22 05:33:44 UTC (rev 1238)
@@ -11,7 +11,7 @@
using AgateLib.Geometry;
using AgateLib.InputLib;
-namespace Tests.Display3D.Glsl
+namespace Tests.Shaders
{
public class Hlsl: IAgateTest
{
Modified: trunk/Tests/Tests.csproj
===================================================================
--- trunk/Tests/Tests.csproj 2010-02-21 22:46:35 UTC (rev 1237)
+++ trunk/Tests/Tests.csproj 2010-02-22 05:33:44 UTC (rev 1238)
@@ -2,7 +2,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -146,10 +146,12 @@
<DependentUpon>frmLauncher.cs</DependentUpon>
<SubType>Code</SubType>
</Compile>
+ <Compile Include="GuiTests\Buttons.cs" />
<Compile Include="GuiTests\Listboxes.cs" />
<Compile Include="GuiTests\RenderGui.cs" />
<Compile Include="GuiTests\ScrollBars.cs" />
<Compile Include="GuiTests\Textboxes.cs" />
+ <Compile Include="GuiTests\Transitions.cs" />
<Compile Include="IAgateTest.cs">
<SubType>Code</SubType>
</Compile>
@@ -220,6 +222,7 @@
<Compile Include="DisplayTests\Interpolation.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="ResourceTests\Res040.cs" />
<Compile Include="Shaders\CoordinateSystem.cs">
<SubType>Code</SubType>
</Compile>
@@ -457,6 +460,9 @@
<None Include="Data\boxsprite.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
+ <None Include="Data\gui.zip">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </None>
<None Include="Data\dogs.tar.gz">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Modified: trunk/Tests/frmLauncher.Designer.cs
===================================================================
--- trunk/Tests/frmLauncher.Designer.cs 2010-02-21 22:46:35 UTC (rev 1237)
+++ trunk/Tests/frmLauncher.Designer.cs 2010-02-22 05:33:44 UTC (rev 1238)
@@ -41,17 +41,17 @@
this.lstTests.Location = new System.Drawing.Point(12, 12);
this.lstTests.MultiColumn = true;
this.lstTests.Name = "lstTests";
- this.lstTests.Size = new System.Drawing.Size(439, 368);
+ this.lstTests.Size = new System.Drawing.Size(513, 368);
this.lstTests.TabIndex = 0;
this.lstTests.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.lstTests_DrawItem);
- this.lstTests.MeasureItem += new System.Windows.Forms.MeasureItemEventHandler(this.lstTests_MeasureItem);
this.lstTests.DoubleClick += new System.EventHandler(this.lstTests_DoubleClick);
+ this.lstTests.KeyUp += new System.Windows.Forms.KeyEventHandler(this.lstTests_KeyUp);
//
// frmLauncher
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(463, 406);
+ this.ClientSize = new System.Drawing.Size(537, 391);
this.Controls.Add(this.lstTests);
this.Name = "frmLauncher";
this.Text = "AgateLib Test Launcher";
Modified: trunk/Tests/frmLauncher.cs
===================================================================
--- trunk/Tests/frmLauncher.cs 2010-02-21 22:46:35 UTC (rev 1237)
+++ trunk/Tests/frmLauncher.cs 2010-02-22 05:33:44 UTC (rev 1238)
@@ -89,6 +89,18 @@
LaunchTest(t);
}
+ private void lstTests_KeyUp(object sender, KeyEventArgs e)
+ {
+ if (e.KeyCode == Keys.Enter)
+ {
+ TestInfo t = lstTests.SelectedItem as TestInfo;
+ if (t == null)
+ return;
+
+ LaunchTest(t);
+ }
+ }
+
private void LaunchTest(TestInfo m)
{
IAgateTest obj = (IAgateTest)Activator.CreateInstance(m.Class);
@@ -155,11 +167,7 @@
e.DrawFocusRectangle();
}
- private void lstTests_MeasureItem(object sender, MeasureItemEventArgs e)
- {
- }
-
}
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-02-25 23:56:41
|
Revision: 1239
http://agate.svn.sourceforge.net/agate/?rev=1239&view=rev
Author: kanato
Date: 2010-02-25 23:56:35 +0000 (Thu, 25 Feb 2010)
Log Message:
-----------
Added HasDepthBuffer and HasStencilBuffer properties to FrameBuffer.
Modified Paths:
--------------
trunk/AgateLib/DisplayLib/FrameBuffer.cs
trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs
trunk/Drivers/AgateDrawing/Drawing_FrameBuffer.cs
trunk/Drivers/AgateOTK/ContextFB.cs
trunk/Drivers/AgateOTK/GL3/FrameBuffer.cs
trunk/Drivers/AgateOTK/GL_Display.cs
trunk/Drivers/AgateOTK/GL_DisplayControl.cs
trunk/Drivers/AgateOTK/GL_FrameBuffer.cs
trunk/Drivers/AgateOTK/GL_GameWindow.cs
trunk/Drivers/AgateOTK/Legacy/FrameBufferExt.cs
trunk/Drivers/AgateSDX/AgateSDX.csproj
trunk/Drivers/AgateSDX/FrameBufferSurface.cs
trunk/Drivers/AgateSDX/FrameBufferWindow.cs
trunk/Drivers/AgateSDX/SDX_Display.cs
trunk/Drivers/AgateSDX/SDX_FrameBuffer.cs
Modified: trunk/AgateLib/DisplayLib/FrameBuffer.cs
===================================================================
--- trunk/AgateLib/DisplayLib/FrameBuffer.cs 2010-02-22 05:33:44 UTC (rev 1238)
+++ trunk/AgateLib/DisplayLib/FrameBuffer.cs 2010-02-25 23:56:35 UTC (rev 1239)
@@ -83,6 +83,20 @@
{
get { return Impl.Height; }
}
+ /// <summary>
+ /// Gets whether or not the frame buffer has a depth buffer.
+ /// </summary>
+ public bool HasDepthBuffer
+ {
+ get { return Impl.HasDepthBuffer; }
+ }
+ /// <summary>
+ /// Gets whether or not the frame buffer has a stencil buffer.
+ /// </summary>
+ public bool HasStencilBuffer
+ {
+ get { return Impl.HasStencilBuffer; }
+ }
/// <summary>
/// Returns true if the RenderTarget property is readable, and this surface that is
Modified: trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs
===================================================================
--- trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs 2010-02-22 05:33:44 UTC (rev 1238)
+++ trunk/AgateLib/DisplayLib/ImplementationBase/FrameBufferImpl.cs 2010-02-25 23:56:35 UTC (rev 1239)
@@ -58,6 +58,15 @@
public abstract void EndRender();
/// <summary>
+ /// Gets whether or not the frame buffer has a depth buffer.
+ /// </summary>
+ public abstract bool HasDepthBuffer { get; }
+ /// <summary>
+ /// Gets whether or not the frame buffer has a stencil buffer.
+ /// </summary>
+ public abstract bool HasStencilBuffer { get; }
+
+ /// <summary>
/// Return true to indicate that the back buffer can be read and used as a texture.
/// </summary>
public virtual bool CanAccessRenderTarget
Modified: trunk/Drivers/AgateDrawing/Drawing_FrameBuffer.cs
===================================================================
--- trunk/Drivers/AgateDrawing/Drawing_FrameBuffer.cs 2010-02-22 05:33:44 UTC (rev 1238)
+++ trunk/Drivers/AgateDrawing/Drawing_FrameBuffer.cs 2010-02-25 23:56:35 UTC (rev 1239)
@@ -22,9 +22,17 @@
backBuffer = bmp;
}
+ public override bool HasDepthBuffer
+ {
+ get { return false; }
+ }
+ public override bool HasStencilBuffer
+ {
+ get { return false; }
+ }
public override void Dispose()
{
- throw new NotImplementedException();
+ backBuffer.Dispose();
}
public override Size Size
Modified: trunk/Drivers/AgateOTK/ContextFB.cs
===================================================================
--- trunk/Drivers/AgateOTK/ContextFB.cs 2010-02-22 05:33:44 UTC (rev 1238)
+++ trunk/Drivers/AgateOTK/ContextFB.cs 2010-02-25 23:56:35 UTC (rev 1239)
@@ -15,11 +15,15 @@
IWindowInfo mWindowInfo;
Size mSize;
- public ContextFB(IGraphicsContext context, IWindowInfo window, Size size)
+ public ContextFB(IGraphicsContext context, IWindowInfo window, Size size,
+ bool depthBuffer, bool stencilBuffer)
{
mContext = context;
mWindowInfo = window;
mSize = size;
+
+ mHasDepth = depthBuffer;
+ mHasStencil = stencilBuffer;
}
public override void Dispose()
Modified: trunk/Drivers/AgateOTK/GL3/FrameBuffer.cs
===================================================================
--- trunk/Drivers/AgateOTK/GL3/FrameBuffer.cs 2010-02-22 05:33:44 UTC (rev 1238)
+++ trunk/Drivers/AgateOTK/GL3/FrameBuffer.cs 2010-02-25 23:56:35 UTC (rev 1239)
@@ -61,6 +61,8 @@
"Could not complete framebuffer object.");
}
+ mHasDepth = true;
+ mHasStencil = true;
}
public override SurfaceImpl RenderTarget
Modified: trunk/Drivers/AgateOTK/GL_Display.cs
===================================================================
--- trunk/Drivers/AgateOTK/GL_Display.cs 2010-02-22 05:33:44 UTC (rev 1238)
+++ trunk/Drivers/AgateOTK/GL_Display.cs 2010-02-25 23:56:35 UTC (rev 1239)
@@ -221,7 +221,13 @@
DrawBuffer.Flush();
GL.ClearColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
- GL.Clear(ClearBufferMask.DepthBufferBit | ClearBufferMask.ColorBufferBit | ClearBufferMask.StencilBufferBit);
+
+ ClearBufferMask mask = ClearBufferMask.ColorBufferBit;
+
+ mask |= RenderTarget.HasDepthBuffer ? ClearBufferMask.DepthBufferBit : 0;
+ mask |= RenderTarget.HasStencilBuffer ? ClearBufferMask.StencilBufferBit : 0;
+
+ GL.Clear(mask);
}
public override void Clear(Color color, Rectangle dest)
{
Modified: trunk/Drivers/AgateOTK/GL_DisplayControl.cs
===================================================================
--- trunk/Drivers/AgateOTK/GL_DisplayControl.cs 2010-02-22 05:33:44 UTC (rev 1238)
+++ trunk/Drivers/AgateOTK/GL_DisplayControl.cs 2010-02-25 23:56:35 UTC (rev 1239)
@@ -225,7 +225,7 @@
mContext.MakeCurrent(mWindowInfo);
(mContext as IGraphicsContextInternal).LoadAll();
- mFrameBuffer = new ContextFB(mContext, mWindowInfo, this.Size);
+ mFrameBuffer = new ContextFB(mContext, mWindowInfo, this.Size, true, false);
}
private IWindowInfo CreateWindowInfo(GraphicsMode mode)
Modified: trunk/Drivers/AgateOTK/GL_FrameBuffer.cs
===================================================================
--- trunk/Drivers/AgateOTK/GL_FrameBuffer.cs 2010-02-22 05:33:44 UTC (rev 1238)
+++ trunk/Drivers/AgateOTK/GL_FrameBuffer.cs 2010-02-25 23:56:35 UTC (rev 1239)
@@ -11,6 +11,8 @@
abstract class GL_FrameBuffer: FrameBufferImpl
{
GLDrawBuffer mDrawBuffer;
+ protected bool mHasDepth;
+ protected bool mHasStencil;
public GL_FrameBuffer()
{
@@ -20,11 +22,14 @@
public GLDrawBuffer DrawBuffer { get { return mDrawBuffer; } }
public abstract void MakeCurrent();
- // TODO: fix this hack and remove these interface members.
- [Obsolete]
- public void HideCursor() { throw new NotImplementedException(); }
- [Obsolete]
- public void ShowCursor() { throw new NotImplementedException(); }
+ public override bool HasDepthBuffer
+ {
+ get { return mHasDepth; }
+ }
+ public override bool HasStencilBuffer
+ {
+ get { return mHasStencil; }
+ }
}
}
Modified: trunk/Drivers/AgateOTK/GL_GameWindow.cs
===================================================================
--- trunk/Drivers/AgateOTK/GL_GameWindow.cs 2010-02-22 05:33:44 UTC (rev 1238)
+++ trunk/Drivers/AgateOTK/GL_GameWindow.cs 2010-02-25 23:56:35 UTC (rev 1239)
@@ -197,7 +197,7 @@
CreateWindowedDisplay();
mFrameBuffer = new ContextFB(mWindow.Context, mWindow.WindowInfo,
- new Size(mWindow.ClientSize.Width, mWindow.ClientSize.Height ));
+ new Size(mWindow.ClientSize.Width, mWindow.ClientSize.Height), true, false);
mDisplay = Display.Impl as GL_Display;
Modified: trunk/Drivers/AgateOTK/Legacy/FrameBufferExt.cs
===================================================================
--- trunk/Drivers/AgateOTK/Legacy/FrameBufferExt.cs 2010-02-22 05:33:44 UTC (rev 1238)
+++ trunk/Drivers/AgateOTK/Legacy/FrameBufferExt.cs 2010-02-25 23:56:35 UTC (rev 1239)
@@ -135,6 +135,8 @@
"Could not complete framebuffer object.");
}
+ mHasDepth = depth;
+ mHasStencil = stencil;
}
public override SurfaceImpl RenderTarget
Modified: trunk/Drivers/AgateSDX/AgateSDX.csproj
===================================================================
--- trunk/Drivers/AgateSDX/AgateSDX.csproj 2010-02-22 05:33:44 UTC (rev 1238)
+++ trunk/Drivers/AgateSDX/AgateSDX.csproj 2010-02-25 23:56:35 UTC (rev 1239)
@@ -1,7 +1,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{EF993B30-D9A9-4962-80BB-6826D39B3465}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -67,7 +67,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x86\Debug\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -75,7 +75,7 @@
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
- <OutputPath>bin\x86\Release\</OutputPath>
+ <OutputPath>..\..\Binaries\Release\</OutputPath>
<DefineConstants>TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -85,7 +85,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x64\Debug\</OutputPath>
+ <OutputPath>..\..\Binaries\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -93,7 +93,7 @@
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
- <OutputPath>bin\x64\Release\</OutputPath>
+ <OutputPath>..\..\Binaries\Release\</OutputPath>
<DefineConstants>TRACE;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Modified: trunk/Drivers/AgateSDX/FrameBufferSurface.cs
===================================================================
--- trunk/Drivers/AgateSDX/FrameBufferSurface.cs 2010-02-22 05:33:44 UTC (rev 1238)
+++ trunk/Drivers/AgateSDX/FrameBufferSurface.cs 2010-02-25 23:56:35 UTC (rev 1239)
@@ -19,7 +19,9 @@
SDX_Surface mAgateSurface;
Direct3D.Texture mTexture;
Direct3D.Surface mRenderTarget;
-
+ bool mHasDepth;
+ bool mHasStencil;
+
public FrameBufferSurface(Size size)
{
mDisplay = Display.Impl as SDX_Display;
@@ -44,6 +46,7 @@
mAgateSurface = new SDX_Surface(new AgateLib.Utility.Ref<Texture>(mTexture),
new Rectangle(Point.Empty, Size));
+ //SetHasDepthStencil(
}
public override void Dispose()
Modified: trunk/Drivers/AgateSDX/FrameBufferWindow.cs
===================================================================
--- trunk/Drivers/AgateSDX/FrameBufferWindow.cs 2010-02-22 05:33:44 UTC (rev 1238)
+++ trunk/Drivers/AgateSDX/FrameBufferWindow.cs 2010-02-25 23:56:35 UTC (rev 1239)
@@ -26,6 +26,11 @@
mSwap = swap;
mBackBuffer = backBuffer;
mBackDepthStencil = backDepthStencil;
+
+ if (mBackDepthStencil != null)
+ {
+ SetHasDepthStencil(mBackDepthStencil.Description.Format);
+ }
}
public override void Dispose()
Modified: trunk/Drivers/AgateSDX/SDX_Display.cs
===================================================================
--- trunk/Drivers/AgateSDX/SDX_Display.cs 2010-02-22 05:33:44 UTC (rev 1238)
+++ trunk/Drivers/AgateSDX/SDX_Display.cs 2010-02-25 23:56:35 UTC (rev 1239)
@@ -377,8 +377,8 @@
{
ClearFlags retval = ClearFlags.Target;
- if (mHasDepth) retval |= ClearFlags.ZBuffer;
- if (mHasStencil) retval |= ClearFlags.Stencil;
+ retval |= RenderTarget.HasDepthBuffer ? ClearFlags.ZBuffer : 0;
+ retval |= RenderTarget.HasStencilBuffer ? ClearFlags.Stencil : 0;
return retval;
}
Modified: trunk/Drivers/AgateSDX/SDX_FrameBuffer.cs
===================================================================
--- trunk/Drivers/AgateSDX/SDX_FrameBuffer.cs 2010-02-22 05:33:44 UTC (rev 1238)
+++ trunk/Drivers/AgateSDX/SDX_FrameBuffer.cs 2010-02-25 23:56:35 UTC (rev 1239)
@@ -5,10 +5,49 @@
using AgateLib.DisplayLib;
using AgateLib.Geometry;
using AgateLib.DisplayLib.ImplementationBase;
+using SlimDX.Direct3D9;
namespace AgateSDX
{
public abstract class SDX_FrameBuffer: FrameBufferImpl
{
+ bool mHasDepth;
+ bool mHasStencil;
+
+ protected void SetHasDepthStencil(Format fmt)
+ {
+ switch (fmt)
+ {
+ case Format.D16:
+ case Format.D16Lockable:
+ case Format.D24X8:
+ case Format.D32:
+ case Format.D32Lockable:
+ case Format.D32SingleLockable:
+ mHasDepth = true;
+ break;
+
+ case Format.D15S1:
+ case Format.D24S8:
+ case Format.D24SingleS8:
+ case Format.D24X4S4:
+ mHasDepth = true;
+ mHasStencil = true;
+ break;
+
+ case Format.S8Lockable:
+ mHasStencil = true;
+ break;
+ }
+ }
+
+ public override bool HasDepthBuffer
+ {
+ get { return mHasDepth; }
+ }
+ public override bool HasStencilBuffer
+ {
+ get { return mHasStencil; }
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-08-03 06:10:38
|
Revision: 1240
http://agate.svn.sourceforge.net/agate/?rev=1240&view=rev
Author: kanato
Date: 2010-08-03 06:10:32 +0000 (Tue, 03 Aug 2010)
Log Message:
-----------
Display: add some documentation
Vector2: add multiplication overload
Tests: Add Prerendered.cs test.
Modified Paths:
--------------
trunk/AgateLib/DisplayLib/Display.cs
trunk/AgateLib/Geometry/Vector2.cs
trunk/Tests/Tests.csproj
Added Paths:
-----------
trunk/Tests/DisplayTests/Prerendered.cs
Modified: trunk/AgateLib/DisplayLib/Display.cs
===================================================================
--- trunk/AgateLib/DisplayLib/Display.cs 2010-02-25 23:56:35 UTC (rev 1239)
+++ trunk/AgateLib/DisplayLib/Display.cs 2010-08-03 06:10:32 UTC (rev 1240)
@@ -441,8 +441,11 @@
/// <summary>
/// When using Direct3D or OpenGL, calls to Surface.Draw are cached to be sent to
/// the 3D API all as a batch. Calling Display.FlushDrawBuffer forces all cached
- /// vertices to be sent to the rendering system. You should not need to call this
- /// function in normal operation of your application.
+ /// vertices to be sent to the rendering system. This method should only be called
+ /// between BeginFrame..EndFrame. You should not need to call this
+ /// function in normal operation of your application. If you find that this is necessary
+ /// for proper functioning of your program, there is probably a bug in AgateLib somewhere,
+ /// and please report it at http://www.agatelib.org/
/// </summary>
public static void FlushDrawBuffer()
{
Modified: trunk/AgateLib/Geometry/Vector2.cs
===================================================================
--- trunk/AgateLib/Geometry/Vector2.cs 2010-02-25 23:56:35 UTC (rev 1239)
+++ trunk/AgateLib/Geometry/Vector2.cs 2010-08-03 06:10:32 UTC (rev 1240)
@@ -155,6 +155,16 @@
return new Vector2(a.X * b, a.Y * b);
}
/// <summary>
+ /// Scales a vector by a scalar floating point value.
+ /// </summary>
+ /// <param name="a"></param>
+ /// <param name="b"></param>
+ /// <returns></returns>
+ public static Vector2 operator *(float b, Vector2 a)
+ {
+ return new Vector2(a.X * b, a.Y * b);
+ }
+ /// <summary>
/// Divides a vector's components by a floating point value.
/// </summary>
/// <param name="a"></param>
Copied: trunk/Tests/DisplayTests/Prerendered.cs (from rev 1234, trunk/Tests/DisplayTests/FullScreen.cs)
===================================================================
--- trunk/Tests/DisplayTests/Prerendered.cs (rev 0)
+++ trunk/Tests/DisplayTests/Prerendered.cs 2010-08-03 06:10:32 UTC (rev 1240)
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using AgateLib;
+using AgateLib.DisplayLib;
+using AgateLib.Geometry;
+using AgateLib.InputLib;
+
+namespace Tests.DisplayTests
+{
+ class PrerenderedTest : IAgateTest
+ {
+ public string Name
+ {
+ get { return "Prerendering"; }
+ }
+
+ public string Category
+ {
+ get { return "Display"; }
+ }
+
+ public void Main(string[] args)
+ {
+ AgateSetup AS = new AgateSetup();
+
+ AS.AskUser = true;
+ AS.Initialize(true, false, true);
+ if (AS.WasCanceled)
+ return;
+
+ DisplayWindow MainWindow = DisplayWindow.CreateWindowed ("Test", 800, 600);
+ FrameBuffer myBuffer = new FrameBuffer(200,35);
+ FontSurface font = FontSurface.AgateSans10;
+
+ Display.RenderTarget = myBuffer;
+ Display.BeginFrame();
+
+ Display.Clear(Color.Blue);
+ font.Color = Color.Red;
+ font.DrawText(3,3 , "HELLO WORLD");
+
+ Display.EndFrame();
+ Display.FlushDrawBuffer();
+ Display.RenderTarget = MainWindow.FrameBuffer;
+
+
+ while (MainWindow.IsClosed == false)
+ {
+ Display.BeginFrame();
+ Display.Clear(Color.Black);
+
+ myBuffer.RenderTarget.Draw(35,35);
+
+ Display.EndFrame();
+
+ Core.KeepAlive();
+ }
+ }
+
+ }
+}
\ No newline at end of file
Modified: trunk/Tests/Tests.csproj
===================================================================
--- trunk/Tests/Tests.csproj 2010-02-25 23:56:35 UTC (rev 1239)
+++ trunk/Tests/Tests.csproj 2010-08-03 06:10:32 UTC (rev 1240)
@@ -137,6 +137,7 @@
<DependentUpon>frmCapabilities.cs</DependentUpon>
</Compile>
<Compile Include="DisplayTests\ClipRect.cs" />
+ <Compile Include="DisplayTests\Prerendered.cs" />
<Compile Include="Fonts\Builtin.cs" />
<Compile Include="Fonts\Kerning.cs" />
<Compile Include="frmLauncher.cs">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-11-02 02:57:42
|
Revision: 1242
http://agate.svn.sourceforge.net/agate/?rev=1242&view=rev
Author: kanato
Date: 2010-11-02 02:57:33 +0000 (Tue, 02 Nov 2010)
Log Message:
-----------
Upgrade to Visual Studio 2010
Modified Paths:
--------------
trunk/AgateLib/AgateLib.csproj
trunk/AgateLib/InternalResources/DataResources.Designer.cs
trunk/AgateLib-Windows.sln
trunk/AgateLib.sln
trunk/AgateTools.sln
trunk/Drivers/AgateDrawing/AgateDrawing.csproj
trunk/Drivers/AgateFMOD/AgateFMOD.csproj
trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj
trunk/Drivers/AgateLib.WinForms/Icons.Designer.cs
trunk/Drivers/AgateOTK/AgateOTK.csproj
trunk/Drivers/AgateOTK/GL3/Shaders/ShaderSources.Designer.cs
trunk/Drivers/AgateSDL/AgateSDL.csproj
trunk/Drivers/AgateSDX/AgateSDX.csproj
trunk/Examples/BallBuster.Net/BallBuster.Net.csproj
trunk/Examples/BallBuster.Net/Properties/Resources.Designer.cs
trunk/Examples/BallBuster.Net/Properties/Settings.Designer.cs
trunk/Examples/Pong/Pong.csproj
trunk/Examples/Pong/Pong.csproj.user
trunk/Examples/Pong/Properties/Resources.Designer.cs
trunk/Examples/Pong/Properties/Settings.Designer.cs
trunk/Examples/ShootTheTraps/ShootTheTraps.csproj
trunk/Examples.sln
trunk/Tests/Tests.csproj
trunk/Tools/AgateDataLib/AgateDataLib.csproj
trunk/Tools/DatabaseEditor/DatabaseEditor.csproj
trunk/Tools/DatabaseEditor/Properties/Resources.Designer.cs
trunk/Tools/DatabaseEditor/Properties/Settings.Designer.cs
trunk/Tools/FontCreator/FontCreator.csproj
trunk/Tools/FontCreator/Properties/Resources.Designer.cs
trunk/Tools/FontCreator/Properties/Settings.Designer.cs
trunk/Tools/NotebookLib/NotebookLib/NotebookLib.csproj
trunk/Tools/NotebookLib/NotebookLib/Properties/Resources.Designer.cs
trunk/Tools/PackedSpriteCreator/PackedSpriteCreator.csproj
trunk/Tools/PackedSpriteCreator/Properties/Resources.Designer.cs
trunk/Tools/ResourceEditor/Properties/Resources.Designer.cs
trunk/Tools/ResourceEditor/ResourceEditor.csproj
Modified: trunk/AgateLib/AgateLib.csproj
===================================================================
--- trunk/AgateLib/AgateLib.csproj 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/AgateLib/AgateLib.csproj 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,4 +1,5 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>9.0.21022</ProductVersion>
@@ -24,6 +25,8 @@
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
@@ -482,6 +485,8 @@
<Compile Include="InternalResources\DataResources.Designer.cs">
<DependentUpon>DataResources.resx</DependentUpon>
<SubType>Code</SubType>
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
</Compile>
<Compile Include="Meshes\Loaders\OBJFileRepresentation.cs">
<SubType>Code</SubType>
Modified: trunk/AgateLib/InternalResources/DataResources.Designer.cs
===================================================================
--- trunk/AgateLib/InternalResources/DataResources.Designer.cs 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/AgateLib/InternalResources/DataResources.Designer.cs 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.3053
+// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -19,7 +19,7 @@
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class DataResources {
Modified: trunk/AgateLib-Windows.sln
===================================================================
--- trunk/AgateLib-Windows.sln 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/AgateLib-Windows.sln 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,5 +1,12 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{6AFA2E43-361A-4AA6-83D9-6DE946C1F0B6}"
+ ProjectSection(SolutionItems) = preProject
+ ChangeLog.txt = ChangeLog.txt
+ ReleaseNotes.txt = ReleaseNotes.txt
+ TODO.txt = TODO.txt
+ EndProjectSection
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.WinForms", "Drivers\AgateLib.WinForms\AgateLib.WinForms.csproj", "{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}"
@@ -16,13 +23,6 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateOTK", "Drivers\AgateOTK\AgateOTK.csproj", "{9E095F03-BA3F-4EAD-A905-2A2647CE4405}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{6AFA2E43-361A-4AA6-83D9-6DE946C1F0B6}"
- ProjectSection(SolutionItems) = preProject
- ChangeLog.txt = ChangeLog.txt
- ReleaseNotes.txt = ReleaseNotes.txt
- TODO.txt = TODO.txt
- EndProjectSection
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Modified: trunk/AgateLib.sln
===================================================================
--- trunk/AgateLib.sln 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/AgateLib.sln 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,5 +1,12 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{0CE8B58F-922D-40A6-92E6-2F6913A97049}"
+ ProjectSection(SolutionItems) = preProject
+ ChangeLog.txt = ChangeLog.txt
+ ReleaseNotes.txt = ReleaseNotes.txt
+ TODO.txt = TODO.txt
+ EndProjectSection
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{DC687DB2-90A8-484D-AB99-B3D29FDD8D44}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateSDL", "Drivers\AgateSDL\AgateSDL.csproj", "{00C7FA95-98F4-43D9-9B63-34122B1DB003}"
@@ -14,13 +21,6 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateFMOD", "Drivers\AgateFMOD\AgateFMOD.csproj", "{424C08A9-6CC6-4FFF-B782-CBD58BC42FCA}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{0CE8B58F-922D-40A6-92E6-2F6913A97049}"
- ProjectSection(SolutionItems) = preProject
- ChangeLog.txt = ChangeLog.txt
- ReleaseNotes.txt = ReleaseNotes.txt
- TODO.txt = TODO.txt
- EndProjectSection
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Modified: trunk/AgateTools.sln
===================================================================
--- trunk/AgateTools.sln 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/AgateTools.sln 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,5 +1,12 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{4B147B99-8BC3-4B78-938A-1035B16A8D1B}"
+ ProjectSection(SolutionItems) = preProject
+ ChangeLog.txt = ChangeLog.txt
+ ReleaseNotes.txt = ReleaseNotes.txt
+ TODO.txt = TODO.txt
+ EndProjectSection
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEditor", "Tools\ResourceEditor\ResourceEditor.csproj", "{FAB0D7E5-E6AF-4B29-BFE1-6545D6C22621}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateLib.WinForms", "Drivers\AgateLib.WinForms\AgateLib.WinForms.csproj", "{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}"
@@ -14,13 +21,6 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotebookLib", "Tools\NotebookLib\NotebookLib\NotebookLib.csproj", "{91F57346-B574-4D52-9EB0-AA191B552C94}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{4B147B99-8BC3-4B78-938A-1035B16A8D1B}"
- ProjectSection(SolutionItems) = preProject
- ChangeLog.txt = ChangeLog.txt
- ReleaseNotes.txt = ReleaseNotes.txt
- TODO.txt = TODO.txt
- EndProjectSection
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgateDataLib", "Tools\AgateDataLib\AgateDataLib.csproj", "{2F7A686B-2272-4803-9EF9-0B34BA7802DC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DatabaseEditor", "Tools\DatabaseEditor\DatabaseEditor.csproj", "{685E7B82-4609-4ABB-B25B-0DC7C58BD45F}"
Modified: trunk/Drivers/AgateDrawing/AgateDrawing.csproj
===================================================================
--- trunk/Drivers/AgateDrawing/AgateDrawing.csproj 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/Drivers/AgateDrawing/AgateDrawing.csproj 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,4 +1,5 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>9.0.30729</ProductVersion>
@@ -24,6 +25,8 @@
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
Modified: trunk/Drivers/AgateFMOD/AgateFMOD.csproj
===================================================================
--- trunk/Drivers/AgateFMOD/AgateFMOD.csproj 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/Drivers/AgateFMOD/AgateFMOD.csproj 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,4 +1,5 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>9.0.21022</ProductVersion>
@@ -24,6 +25,8 @@
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
Modified: trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj
===================================================================
--- trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/Drivers/AgateLib.WinForms/AgateLib.WinForms.csproj 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,4 +1,5 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>9.0.30729</ProductVersion>
@@ -24,6 +25,8 @@
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@@ -153,6 +156,8 @@
<Compile Include="Icons.Designer.cs">
<DependentUpon>Icons.resx</DependentUpon>
<SubType>Code</SubType>
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
</Compile>
<Compile Include="SetSystemsForm.cs">
<SubType>Form</SubType>
Modified: trunk/Drivers/AgateLib.WinForms/Icons.Designer.cs
===================================================================
--- trunk/Drivers/AgateLib.WinForms/Icons.Designer.cs 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/Drivers/AgateLib.WinForms/Icons.Designer.cs 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,99 +1,84 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.1434
+// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
-namespace AgateLib.WinForms
-{
- using System;
-
-
- /// <summary>
- /// A strongly-typed resource class, for looking up localized strings, etc.
- /// </summary>
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Icons
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Icons()
- {
- }
-
- /// <summary>
- /// Returns the cached ResourceManager instance used by this class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if (object.ReferenceEquals(resourceMan, null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AgateLib.WinForms.Icons", typeof(Icons).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- /// <summary>
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
-
- internal static System.Drawing.Icon AgateLib
- {
- get
- {
- object obj = ResourceManager.GetObject("AgateLib", resourceCulture);
- return ((System.Drawing.Icon)(obj));
- }
- }
-
- internal static System.Drawing.Icon AgateLib_mono
- {
- get
- {
- object obj = ResourceManager.GetObject("AgateLib_mono", resourceCulture);
- return ((System.Drawing.Icon)(obj));
- }
- }
-
- internal static byte[] blankcursor
- {
- get
- {
- object obj = ResourceManager.GetObject("blankcursor", resourceCulture);
- return ((byte[])(obj));
- }
- }
- }
+namespace AgateLib.WinForms {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Icons {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Icons() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AgateLib.WinForms.Icons", typeof(Icons).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ internal static System.Drawing.Icon AgateLib {
+ get {
+ object obj = ResourceManager.GetObject("AgateLib", resourceCulture);
+ return ((System.Drawing.Icon)(obj));
+ }
+ }
+
+ internal static System.Drawing.Icon AgateLib_mono {
+ get {
+ object obj = ResourceManager.GetObject("AgateLib_mono", resourceCulture);
+ return ((System.Drawing.Icon)(obj));
+ }
+ }
+
+ internal static byte[] blankcursor {
+ get {
+ object obj = ResourceManager.GetObject("blankcursor", resourceCulture);
+ return ((byte[])(obj));
+ }
+ }
+ }
}
Modified: trunk/Drivers/AgateOTK/AgateOTK.csproj
===================================================================
--- trunk/Drivers/AgateOTK/AgateOTK.csproj 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/Drivers/AgateOTK/AgateOTK.csproj 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,4 +1,5 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>9.0.21022</ProductVersion>
@@ -24,6 +25,8 @@
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
Modified: trunk/Drivers/AgateOTK/GL3/Shaders/ShaderSources.Designer.cs
===================================================================
--- trunk/Drivers/AgateOTK/GL3/Shaders/ShaderSources.Designer.cs 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/Drivers/AgateOTK/GL3/Shaders/ShaderSources.Designer.cs 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.4927
+// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -19,7 +19,7 @@
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class ShaderSources {
@@ -63,17 +63,18 @@
/// <summary>
/// Looks up a localized string similar to #version 140
///
- ///in vec2 texture;
- ///in int color;
- ///
///uniform sampler2D texture;
///
+ ///in vec4 colorVal;
+ ///in vec2 texCoordVal;
+ ///
+ ///out vec4 color;
+ ///
///void main()
///{
- /// vec4 pos = vec4(position, 1);
- ///
- /// gl_Position = transform * pos;
- ///}.
+ /// color = texture2D(texture, texCoordVal);
+ ///}
+ ///.
/// </summary>
internal static string Basic2D_pixel {
get {
@@ -85,17 +86,24 @@
/// Looks up a localized string similar to #version 140
///
///in vec3 position;
- ///inout vec2 texture;
- ///inout int color;
+ ///in vec4 color;
+ ///in vec2 texCoord;
///
///uniform mat4x4 transform;
///
+ ///out vec4 colorVal;
+ ///out vec2 texCoordVal;
+ ///
///void main()
///{
/// vec4 pos = vec4(position, 1);
///
+ /// colorVal = color;
+ /// texCoordVal = texCoord;
+ ///
/// gl_Position = transform * pos;
- ///}.
+ ///}
+ ///.
/// </summary>
internal static string Basic2D_vert {
get {
Modified: trunk/Drivers/AgateSDL/AgateSDL.csproj
===================================================================
--- trunk/Drivers/AgateSDL/AgateSDL.csproj 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/Drivers/AgateSDL/AgateSDL.csproj 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,4 +1,5 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>9.0.21022</ProductVersion>
@@ -24,6 +25,8 @@
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
Modified: trunk/Drivers/AgateSDX/AgateSDX.csproj
===================================================================
--- trunk/Drivers/AgateSDX/AgateSDX.csproj 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/Drivers/AgateSDX/AgateSDX.csproj 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,4 +1,5 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>9.0.21022</ProductVersion>
@@ -24,6 +25,8 @@
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
Modified: trunk/Examples/BallBuster.Net/BallBuster.Net.csproj
===================================================================
--- trunk/Examples/BallBuster.Net/BallBuster.Net.csproj 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/Examples/BallBuster.Net/BallBuster.Net.csproj 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,4 +1,5 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -11,7 +12,7 @@
<AssemblyName>BallBuster.Net</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
+ <OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<PublishUrl>publish\</PublishUrl>
Modified: trunk/Examples/BallBuster.Net/Properties/Resources.Designer.cs
===================================================================
--- trunk/Examples/BallBuster.Net/Properties/Resources.Designer.cs 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/Examples/BallBuster.Net/Properties/Resources.Designer.cs 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.1433
+// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -19,7 +19,7 @@
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
Modified: trunk/Examples/BallBuster.Net/Properties/Settings.Designer.cs
===================================================================
--- trunk/Examples/BallBuster.Net/Properties/Settings.Designer.cs 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/Examples/BallBuster.Net/Properties/Settings.Designer.cs 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.1433
+// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -12,7 +12,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
Modified: trunk/Examples/Pong/Pong.csproj
===================================================================
--- trunk/Examples/Pong/Pong.csproj 2010-08-22 16:25:40 UTC (rev 1241)
+++ trunk/Examples/Pong/Pong.csproj 2010-11-02 02:57:33 UTC (rev 1242)
@@ -1,4 +1,5 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -11,7 +12,7 @@
<AssemblyName>Pong</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
+ <OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
Modified: trunk/Examples/Pong/Pong.csproj.user
===================================================================
--- trunk/Examples/Pong/Pong.csproj.user 2010-08...
[truncated message content] |
|
From: <ka...@us...> - 2010-12-23 18:57:05
|
Revision: 1251
http://agate.svn.sourceforge.net/agate/?rev=1251&view=rev
Author: kanato
Date: 2010-12-23 18:56:59 +0000 (Thu, 23 Dec 2010)
Log Message:
-----------
Add CPU configurations to examples.
Modified Paths:
--------------
trunk/Examples/BallBuster.Net/BallBuster.Net.csproj
trunk/Examples/Pong/Pong.csproj
trunk/Examples/ShootTheTraps/ShootTheTraps.csproj
trunk/Examples.sln
Removed Paths:
-------------
trunk/Examples/Pong/Pong.csproj.user
Modified: trunk/Examples/BallBuster.Net/BallBuster.Net.csproj
===================================================================
--- trunk/Examples/BallBuster.Net/BallBuster.Net.csproj 2010-12-23 18:56:05 UTC (rev 1250)
+++ trunk/Examples/BallBuster.Net/BallBuster.Net.csproj 2010-12-23 18:56:59 UTC (rev 1251)
@@ -49,6 +49,42 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>out\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
+ <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>out\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
Modified: trunk/Examples/Pong/Pong.csproj
===================================================================
--- trunk/Examples/Pong/Pong.csproj 2010-12-23 18:56:05 UTC (rev 1250)
+++ trunk/Examples/Pong/Pong.csproj 2010-12-23 18:56:59 UTC (rev 1251)
@@ -34,6 +34,46 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
+ <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+ <CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
+ <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+ <CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
Deleted: trunk/Examples/Pong/Pong.csproj.user
===================================================================
--- trunk/Examples/Pong/Pong.csproj.user 2010-12-23 18:56:05 UTC (rev 1250)
+++ trunk/Examples/Pong/Pong.csproj.user 2010-12-23 18:56:59 UTC (rev 1251)
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <StartArguments>--choose</StartArguments>
- </PropertyGroup>
-</Project>
\ No newline at end of file
Modified: trunk/Examples/ShootTheTraps/ShootTheTraps.csproj
===================================================================
--- trunk/Examples/ShootTheTraps/ShootTheTraps.csproj 2010-12-23 18:56:05 UTC (rev 1250)
+++ trunk/Examples/ShootTheTraps/ShootTheTraps.csproj 2010-12-23 18:56:59 UTC (rev 1251)
@@ -34,6 +34,42 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
+ <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+ <CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
Modified: trunk/Examples.sln
===================================================================
--- trunk/Examples.sln 2010-12-23 18:56:05 UTC (rev 1250)
+++ trunk/Examples.sln 2010-12-23 18:56:59 UTC (rev 1251)
@@ -20,41 +20,109 @@
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|x64.ActiveCfg = Debug|x64
+ {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|x64.Build.0 = Debug|x64
+ {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|x86.ActiveCfg = Debug|x86
+ {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Debug|x86.Build.0 = Debug|x86
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|x64.ActiveCfg = Release|x64
+ {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|x64.Build.0 = Release|x64
+ {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|x86.ActiveCfg = Release|x86
+ {DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}.Release|x86.Build.0 = Release|x86
{50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|x64.ActiveCfg = Debug|x64
+ {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|x64.Build.0 = Debug|x64
+ {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|x86.ActiveCfg = Debug|x86
+ {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Debug|x86.Build.0 = Debug|x86
{50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|x64.ActiveCfg = Release|x64
+ {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|x64.Build.0 = Release|x64
+ {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|x86.ActiveCfg = Release|x86
+ {50743D1B-A19E-42F1-842F-65FAD6D168C3}.Release|x86.Build.0 = Release|x86
{436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|x64.ActiveCfg = Debug|x64
+ {436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|x64.Build.0 = Debug|x64
+ {436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|x86.ActiveCfg = Debug|x86
+ {436641C4-846C-42D0-8E8F-95F70E211D22}.Debug|x86.Build.0 = Debug|x86
{436641C4-846C-42D0-8E8F-95F70E211D22}.Release|Any CPU.ActiveCfg = Release|Any CPU
{436641C4-846C-42D0-8E8F-95F70E211D22}.Release|Any CPU.Build.0 = Release|Any CPU
+ {436641C4-846C-42D0-8E8F-95F70E211D22}.Release|x64.ActiveCfg = Release|x64
+ {436641C4-846C-42D0-8E8F-95F70E211D22}.Release|x64.Build.0 = Release|x64
+ {436641C4-846C-42D0-8E8F-95F70E211D22}.Release|x86.ActiveCfg = Release|x86
+ {436641C4-846C-42D0-8E8F-95F70E211D22}.Release|x86.Build.0 = Release|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x64.ActiveCfg = Debug|x64
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x64.Build.0 = Debug|x64
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x86.ActiveCfg = Debug|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Debug|x86.Build.0 = Debug|x86
{164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{164A785D-924E-40FB-A517-D7E677F3B53A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x64.ActiveCfg = Release|x64
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x64.Build.0 = Release|x64
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x86.ActiveCfg = Release|x86
+ {164A785D-924E-40FB-A517-D7E677F3B53A}.Release|x86.Build.0 = Release|x86
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|x64.ActiveCfg = Debug|x64
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|x64.Build.0 = Debug|x64
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|x86.ActiveCfg = Debug|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Debug|x86.Build.0 = Debug|x86
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|x64.ActiveCfg = Release|x64
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|x64.Build.0 = Release|x64
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|x86.ActiveCfg = Release|x86
+ {9E095F03-BA3F-4EAD-A905-2A2647CE4405}.Release|x86.Build.0 = Release|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x64.ActiveCfg = Debug|x64
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x64.Build.0 = Debug|x64
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.ActiveCfg = Debug|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Debug|x86.Build.0 = Debug|x86
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9490B719-829E-43A7-A5FE-8001F8A81759}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x64.ActiveCfg = Release|x64
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x64.Build.0 = Release|x64
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.ActiveCfg = Release|x86
+ {9490B719-829E-43A7-A5FE-8001F8A81759}.Release|x86.Build.0 = Release|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x64.ActiveCfg = Debug|x64
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x64.Build.0 = Debug|x64
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x86.ActiveCfg = Debug|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Debug|x86.Build.0 = Debug|x86
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x64.ActiveCfg = Release|x64
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x64.Build.0 = Release|x64
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x86.ActiveCfg = Release|x86
+ {BEF6D67B-4C84-4D3E-8047-6DB2C8754D77}.Release|x86.Build.0 = Release|x86
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|x64.ActiveCfg = Debug|x64
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|x64.Build.0 = Debug|x64
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|x86.ActiveCfg = Debug|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Debug|x86.Build.0 = Debug|x86
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Any CPU.ActiveCfg = Release|Any CPU
{00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|Any CPU.Build.0 = Release|Any CPU
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|x64.ActiveCfg = Release|x64
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|x64.Build.0 = Release|x64
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|x86.ActiveCfg = Release|x86
+ {00C7FA95-98F4-43D9-9B63-34122B1DB003}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-12-27 01:21:40
|
Revision: 1260
http://agate.svn.sourceforge.net/agate/?rev=1260&view=rev
Author: kanato
Date: 2010-12-27 01:21:34 +0000 (Mon, 27 Dec 2010)
Log Message:
-----------
Fix output path for BallBuster.net.
Modified Paths:
--------------
trunk/Examples/BallBuster.Net/BallBuster.Net.csproj
trunk/Examples.sln
Modified: trunk/Examples/BallBuster.Net/BallBuster.Net.csproj
===================================================================
--- trunk/Examples/BallBuster.Net/BallBuster.Net.csproj 2010-12-26 07:25:40 UTC (rev 1259)
+++ trunk/Examples/BallBuster.Net/BallBuster.Net.csproj 2010-12-27 01:21:34 UTC (rev 1260)
@@ -59,7 +59,7 @@
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
- <OutputPath>bin\x64\Release\</OutputPath>
+ <OutputPath>out\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
@@ -78,7 +78,7 @@
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
- <OutputPath>bin\x86\Release\</OutputPath>
+ <OutputPath>out\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
Modified: trunk/Examples.sln
===================================================================
--- trunk/Examples.sln 2010-12-26 07:25:40 UTC (rev 1259)
+++ trunk/Examples.sln 2010-12-27 01:21:34 UTC (rev 1260)
@@ -1,6 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
+# SharpDevelop 4.0.0.7043
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BallBuster.Net", "Examples\BallBuster.Net\BallBuster.Net.csproj", "{DD3CF4AA-02CC-4881-AFB1-6F10DFA1F8AF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShootTheTraps", "Examples\ShootTheTraps\ShootTheTraps.csproj", "{50743D1B-A19E-42F1-842F-65FAD6D168C3}"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|