From: Charles G. <cl...@us...> - 2008-12-06 00:34:48
|
This was actually discarded by mailman - will add amuzen to the accepted list. - C ---------- Forwarded message ---------- From: am...@us... To: fre...@li... Date: Sat, 06 Dec 2008 00:29:45 +0000 Subject: SF.net SVN: freetrain:[371] branches/FreeTrainAgate Revision: 371 http://freetrain.svn.sourceforge.net/freetrain/?rev=371&view=rev Author: amuzen Date: 2008-12-06 00:29:44 +0000 (Sat, 06 Dec 2008) Log Message: ----------- Disabled sound and graphics code to get things compile. Modified Paths: -------------- branches/FreeTrainAgate/FreeTrain.userprefs branches/FreeTrainAgate/core/Debug/FreeTrain.Controls.dll branches/FreeTrainAgate/core/Debug/FreeTrain.Controls.dll.mdb branches/FreeTrainAgate/core/FreeTrain.Core.pidb branches/FreeTrainAgate/core/controllers/rail/TrainPlacementController.resources branches/FreeTrainAgate/core/framework/Splash.resources branches/FreeTrainAgate/core/framework/graphics/SurfaceLoaders.cs branches/FreeTrainAgate/core/framework/plugin/PluginListDialog.resources branches/FreeTrainAgate/core/views/map/MapView.cs branches/FreeTrainAgate/core/views/map/PreviewMapWindow.cs branches/FreeTrainAgate/lib/Controls/FreeTrain.Controls.pidb branches/FreeTrainAgate/lib/Controls/bin/Debug/FreeTrain.Controls.dll branches/FreeTrainAgate/lib/Controls/bin/Debug/FreeTrain.Controls.dll.mdb branches/FreeTrainAgate/lib/DirectAudio.net/src/AudioPath.cs branches/FreeTrainAgate/lib/DirectAudio.net/src/BGM.cs branches/FreeTrainAgate/lib/DirectAudio.net/src/DirectAudio.cs branches/FreeTrainAgate/lib/DirectAudio.net/src/Performance.cs branches/FreeTrainAgate/lib/DirectAudio.net/src/Segment.cs branches/FreeTrainAgate/lib/DirectAudio.net/src/SegmentState.cs branches/FreeTrainAgate/lib/DirectDraw.net/DirectDraw.cs branches/FreeTrainAgate/lib/DirectDraw.net/DirectDraw.net.csproj branches/FreeTrainAgate/lib/DirectDraw.net/Surface.cs branches/FreeTrainAgate/lib/DirectDraw.net/Util.cs branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.financial.bank/FreeTrain.Bank.csproj branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.financial.bank/FreeTrain.Bank.pidb branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.financial.stockmarket/FreeTrain.StockMarket.csproj branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.financial.stockmarket/FreeTrain.StockMarket.pidb branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib/src/DummyCars/FreeTrain.DummyCars.csproj branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib/src/DummyCars/FreeTrain.DummyCars.pidb branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib/src/RoadAccessory/FreeTrain.RoadAccessory.csproj branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib/src/RoadAccessory/FreeTrain.RoadAccessory.pidb branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib.fence/FreeTrain.Fence.pidb branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib.generic/FreeTrain.ContribEx.pidb branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib.halfvoxel/FreeTrain.HalfVoxelStructure.csproj branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib.halfvoxel/FreeTrain.HalfVoxelStructure.pidb branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.land.477/FreeTrain.VinylHouse.pidb branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.land.creek.eikichiya/FreeTrain.Creek.Eikichiya.csproj branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.land.creek.eikichiya/FreeTrain.Creek.Eikichiya.pidb branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.land.forest/FreeTrain.Forest.pidb branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.land.ricefield/FreeTrain.RiceField.pidb branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.music.a4mem/FreeTrain.A4MemBGM.pidb branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.rail.electricPole/FreeTrain.ElectricPole.csproj branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.rail.electricPole/FreeTrain.ElectricPole.pidb branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.rail.garage/FreeTrain.TrainGarage.pidb branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.rail.signal/FreeTrain.RailSignal.csproj branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.rail.signal/FreeTrain.RailSignal.pidb branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.soccerStadium/FreeTrain.SoccerStadium.csproj branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.soccerStadium/FreeTrain.SoccerStadium.pidb branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.tc.manual/FreeTrain.ManualTrainController.pidb branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.tc.tat/FreeTrain.TATTrainController.csproj branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.tc.tat/FreeTrain.TATTrainController.pidb branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.terrain.terrace/FreeTrain.Terrace.csproj branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.terrain.terrace/FreeTrain.Terrace.pidb branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.tools.dbgwnd/FreeTrain.DebugWindow.csproj branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.tools.dbgwnd/FreeTrain.DebugWindow.pidb branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.tools.terrainloader/FreeTrain.TerrainLoader.csproj branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.tools.terrainloader/FreeTrain.TerrainLoader.pidb branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.trains.colorTest/FreeTrain.ColorTestTrain.csproj branches/FreeTrainAgate/plugins/org.kohsuke.freetrain.trains.colorTest/FreeTrain.ColorTestTrain.pidb branches/FreeTrainAgate/tools/ColorDiff/Tool.ColorDiff.pidb branches/FreeTrainAgate/tools/Driver/Driver.csproj branches/FreeTrainAgate/tools/Driver/Driver.pidb branches/FreeTrainAgate/tools/GUIDGen/Tool.GUIDGen.pidb branches/FreeTrainAgate/tools/MapConstructionDriver/MapConstructionDriver.csproj branches/FreeTrainAgate/tools/MapConstructionDriver/MapConstructionDriver.pidb branches/FreeTrainAgate/tools/PicturePreviewer/Tool.PicturePreviewer.csproj branches/FreeTrainAgate/tools/PicturePreviewer/Tool.PicturePreviewer.pidb branches/FreeTrainAgate/tools/TrainListBuilder/Tool.TrainListBuilder.csproj branches/FreeTrainAgate/tools/TrainListBuilder/Tool.TrainListBuilder.pidb branches/FreeTrainAgate/tools/XmlCombiner/Tool.XmlCombiner.pidb Modified: branches/FreeTrainAgate/FreeTrain.userprefs =================================================================== --- branches/FreeTrainAgate/FreeTrain.userprefs 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/FreeTrain.userprefs 2008-12-06 00:29:44 UTC (rev 371) @@ -1,115 +1,35 @@ -<UserCombinePreferences version="1.0" filename="/home/charles/Projects/Personal/freetrain/FreeTrain.sln"> +<UserCombinePreferences version="1.0" filename="/home/ari/freetrain/FreeTrain.sln"> <Files> - <File name="Welcome" /> - <File name="core/contributions/common/FixedSizeStructureContribution.cs" line="19" column="65" /> - <File name="core/contributions/common/StructureContribution.cs" line="11" column="31" /> - <File name="core/contributions/land/LandBuilderContribution.cs" line="4" column="7" /> - <File name="core/contributions/structs/VarHeightBuildingContribution.cs" line="12" column="31" /> - <File name="core/contributions/train/ColoredTrainCarImpl.cs" line="8" column="23" /> - <File name="core/contributions/train/TrainCarContribution.cs" line="3" column="18" /> - <File name="core/framework/BGMManager.cs" line="5" column="34" /> - <File name="core/framework/graphics/AlphaBlendSpriteSet.cs" line="7" column="24" /> - <File name="core/framework/graphics/NullSprite.cs" line="3" column="36" /> - <File name="core/framework/graphics/Picture.cs" line="4" column="18" /> - <File name="core/framework/graphics/PreviewDrawer.cs" line="4" column="23" /> - <File name="core/framework/graphics/SimpleSprite.cs" line="5" column="23" /> - <File name="core/framework/MainWindow.cs" line="35" column="30" /> - <File name="core/framework/plugin/Contribution.cs" line="8" column="18" /> - <File name="core/views/map/MapView.cs" line="11" column="36" /> - <File name="core/views/map/PreviewMapWindow.cs" line="11" column="36" /> - <File name="core/views/MapOverlay.cs" line="4" column="23" /> - <File name="core/views/QuarterViewDrawer.cs" line="5" column="28" /> - <File name="core/views/WeatherOverlay.cs" line="3" column="7" /> - <File name="core/world/development/LandValueInspector.cs" line="7" column="28" /> - <File name="core/world/Direction.cs" line="4" column="36" /> - <File name="core/world/DrawContext.cs" line="2" column="22" /> - <File name="core/world/EmptyVoxel.cs" line="2" column="22" /> - <File name="core/world/rail/BridgePierVoxel.cs" line="2" column="22" /> - <File name="core/world/rail/BridgeRail.cs" line="5" column="18" /> - <File name="core/world/rail/FatPlatform.cs" line="4" column="36" /> - <File name="core/world/rail/Platform.cs" line="3" column="22" /> - <File name="core/world/rail/RailPattern.cs" line="8" column="22" /> - <File name="core/world/rail/RailRoad.cs" line="5" column="28" /> - <File name="core/world/rail/StealSupportedRailContributionImpl.cs" line="5" column="18" /> - <File name="core/world/rail/ThinPlatform.cs" line="5" column="18" /> - <File name="core/world/rail/Train.cs" line="4" column="28" /> - <File name="core/world/rail/TunnelRail.cs" line="5" column="18" /> - <File name="core/world/rail/YardRailRoad.cs" line="3" column="22" /> - <File name="core/world/structs/PThreeDimStructure.cs" line="8" column="22" /> - <File name="core/world/structs/Structure.cs" line="5" column="31" /> - <File name="core/world/Voxel.cs" line="3" column="22" /> - <File name="core/world/World.cs" line="17" column="35" /> - <File name="core/contributions/land/Bulldozer.cs" line="4" column="7" /> - <File name="core/contributions/land/RandomLandBuilder.cs" line="4" column="7" /> - <File name="core/contributions/land/StaticLandBuilder.cs" line="4" column="7" /> - <File name="core/contributions/train/AsymTrainCarImpl.cs" line="7" column="23" /> - <File name="core/framework/graphics/Surface.cs" line="9" column="25" /> - <File name="core/world/Traffic.cs" line="4" column="7" /> - <File name="core/world/terrain/MountainVoxel.cs" line="6" column="7" /> - <File name="core/world/structs/ConstructionSite.cs" line="7" column="7" /> - <File name="core/world/Location.cs" line="5" column="7" /> - <File name="core/world/land/LandPropertyVoxel.cs" line="6" column="7" /> - <File name="core/contributions/train/ReverseTrainCarImpl.cs" line="3" column="18" /> - <File name="core/contributions/train/SymTrainCarImpl.cs" line="7" column="7" /> - <File name="core/controllers/land/BulldozeController.cs" line="17" column="7" /> - <File name="core/controllers/land/LandController.cs" line="17" column="7" /> - <File name="core/controllers/land/LandPropertyController.cs" line="14" column="22" /> - <File name="core/controllers/rail/PlatformController.cs" line="15" column="27" /> - <File name="core/controllers/rail/SlopeRailRoadController.cs" line="12" column="27" /> - <File name="core/controllers/rail/TrainPlacementController.cs" line="14" column="30" /> - <File name="core/controllers/structs/StructPlacementController.cs" line="16" column="22" /> - <File name="core/controllers/structs/VarHeightBuildingController.cs" line="14" column="22" /> - <File name="core/framework/AboutDialog.cs" line="7" column="26" /> - <File name="core/framework/ConfigDialog.cs" line="6" column="23" /> - <File name="core/framework/GlobalOptions.cs" line="9" column="22" /> - <File name="core/framework/graphics/ColorMappedSprite.cs" line="3" column="18" /> - <File name="core/framework/graphics/DirectSprite.cs" line="2" column="22" /> - <File name="core/framework/graphics/HueTransformSprite.cs" line="43" column="42" /> + <File name="lib/DirectAudio.net/src/AudioPath.cs" line="26" column="1" /> + <File name="lib/DirectAudio.net/src/Performance.cs" line="95" column="1" /> + <File name="lib/DirectAudio.net/src/Segment.cs" line="97" column="22" /> + <File name="lib/DirectAudio.net/src/BGM.cs" line="44" column="1" /> + <File name="lib/DirectAudio.net/src/SegmentState.cs" line="2" column="1" /> + <File name="lib/DirectAudio.net/src/DirectAudio.cs" line="16" column="1" /> + <File name="lib/DirectDraw.net/DirectDraw.cs" line="61" column="1" /> + <File name="lib/DirectDraw.net/Surface.cs" line="553" column="1" /> + <File name="lib/DirectDraw.net/Util.cs" line="7" column="7" /> + <File name="core/framework/graphics/SurfaceLoaders.cs" line="39" column="1" /> + <File name="core/framework/GlobalOptions.cs" line="94" column="1" /> + <File name="core/framework/ConfigDialog.cs" line="45" column="1" /> + <File name="core/views/map/MapView.cs" line="182" column="1" /> + <File name="core/views/map/PreviewMapWindow.cs" line="108" column="1" /> + <File name="tools/MapConstructionDriver/Driver.cs" line="2" column="26" /> </Files> <Views> <ViewMemento id="ProjectPad"> <Node expanded="True"> - <Node name="FreeTrain.Core" expanded="True"> - <Node name="References" expanded="True" /> - <Node name="contributions" expanded="True"> - <Node name="common" expanded="True" /> - <Node name="land" expanded="True" /> - <Node name="structs" expanded="True" /> - <Node name="train" expanded="True" /> - </Node> - <Node name="controllers" expanded="True"> - <Node name="land" expanded="True" /> - <Node name="rail" expanded="True" /> - <Node name="structs" expanded="True" /> - </Node> - <Node name="framework" expanded="True"> - <Node name="graphics" expanded="True"> - <Node name="HueTransformSprite.cs" selected="True" /> - </Node> - <Node name="plugin" expanded="True" /> - </Node> - <Node name="views" expanded="True"> - <Node name="map" expanded="True" /> - </Node> - <Node name="world" expanded="True"> - <Node name="development" expanded="True" /> - <Node name="land" expanded="True" /> - <Node name="rail" expanded="True" /> - <Node name="structs" expanded="True" /> - <Node name="terrain" expanded="True" /> - </Node> + <Node name="FreeTrain.Creek.Eikichiya" expanded="True"> + <Node name="References" expanded="True" selected="True" /> </Node> </Node> </ViewMemento> <ViewMemento id="ClassPad"> <Node expanded="True" /> </ViewMemento> - <ViewMemento id="MonoDevelop.NUnit.TestPad"> - <Node expanded="True" /> - </ViewMemento> </Views> <Properties> - <Property key="ActiveWindow" value="/home/charles/Projects/Personal/freetrain/core/framework/graphics/HueTransformSprite.cs" /> - <Property key="ActiveConfiguration" value="Debug|Any CPU" /> + <Property key="ActiveWindow" value="/home/ari/freetrain/tools/MapConstructionDriver/Driver.cs" /> + <Property key="ActiveConfiguration" value="Debug|Mixed Platforms" /> </Properties> </UserCombinePreferences> \ No newline at end of file Modified: branches/FreeTrainAgate/core/Debug/FreeTrain.Controls.dll =================================================================== (Binary files differ) Modified: branches/FreeTrainAgate/core/Debug/FreeTrain.Controls.dll.mdb =================================================================== (Binary files differ) Modified: branches/FreeTrainAgate/core/FreeTrain.Core.pidb =================================================================== (Binary files differ) Modified: branches/FreeTrainAgate/core/controllers/rail/TrainPlacementController.resources =================================================================== (Binary files differ) Modified: branches/FreeTrainAgate/core/framework/Splash.resources =================================================================== (Binary files differ) Modified: branches/FreeTrainAgate/core/framework/graphics/SurfaceLoaders.cs =================================================================== --- branches/FreeTrainAgate/core/framework/graphics/SurfaceLoaders.cs 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/core/framework/graphics/SurfaceLoaders.cs 2008-12-06 00:29:44 UTC (rev 371) @@ -61,12 +61,23 @@ this.coreLoader = _core; } +#if windows [DllImport("DirectDraw.AlphaBlend.dll")] private static extern int buildNightImage( DxVBLib.DirectDrawSurface7 surface); - +#else + [DllImport("DirectDraw.AlphaBlend.dll")] + private static extern int buildNightImage( ); +#warning STUB +#endif + public virtual Color load(ref Surface surface) { Color c = coreLoader.load(ref surface); +#if windows buildNightImage(surface.handle); +#else + buildNightImage(); +#warning STUB +#endif return ColorMap.getNightColor(c); } } Modified: branches/FreeTrainAgate/core/framework/plugin/PluginListDialog.resources =================================================================== (Binary files differ) Modified: branches/FreeTrainAgate/core/views/map/MapView.cs =================================================================== --- branches/FreeTrainAgate/core/views/map/MapView.cs 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/core/views/map/MapView.cs 2008-12-06 00:29:44 UTC (rev 371) @@ -175,8 +175,10 @@ weatherOverlay.setSize(this.ClientSize); +#if windows if( ddraw.primarySurface.handle.isLost()!=0 ) // surface is lost PictureManager.onSurfaceLost(this,null); +#endif // drawer.draw( ddraw.primarySurface, PointToScreen(new Point(0,0)) ); weatherOverlay.draw( drawer, ddraw.primarySurface, PointToScreen(new Point(0,0)) ); Modified: branches/FreeTrainAgate/core/views/map/PreviewMapWindow.cs =================================================================== --- branches/FreeTrainAgate/core/views/map/PreviewMapWindow.cs 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/core/views/map/PreviewMapWindow.cs 2008-12-06 00:29:44 UTC (rev 371) @@ -105,8 +105,10 @@ weatherOverlay.setSize(this.ClientSize); +#if windows if( ddraw.primarySurface.handle.isLost()!=0 ) // surface is lost PictureManager.onSurfaceLost(this,null); +#endif // drawer.draw( ddraw.primarySurface, PointToScreen(new Point(0,0)) ); weatherOverlay.draw( drawer, ddraw.primarySurface, PointToScreen(new Point(0,0)) ); Modified: branches/FreeTrainAgate/lib/Controls/FreeTrain.Controls.pidb =================================================================== (Binary files differ) Modified: branches/FreeTrainAgate/lib/Controls/bin/Debug/FreeTrain.Controls.dll =================================================================== (Binary files differ) Modified: branches/FreeTrainAgate/lib/Controls/bin/Debug/FreeTrain.Controls.dll.mdb =================================================================== (Binary files differ) Modified: branches/FreeTrainAgate/lib/DirectAudio.net/src/AudioPath.cs =================================================================== --- branches/FreeTrainAgate/lib/DirectAudio.net/src/AudioPath.cs 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/lib/DirectAudio.net/src/AudioPath.cs 2008-12-06 00:29:44 UTC (rev 371) @@ -1,5 +1,9 @@ using System; +#if windows using DxVBLibA; +#else +using ERY.AgateLib; +#endif namespace org.kohsuke.directaudio { @@ -8,17 +12,28 @@ /// </summary> public class AudioPath : IDisposable { +#if windows internal DirectMusicAudioPath8 handle; +#endif +#if windows internal AudioPath( DirectMusicAudioPath8 handle ) { this.handle = handle; } +#else + internal AudioPath() { +#warning STUB + } +#endif public void Dispose() { +#if windows +#warning STUB if(handle!=null) { System.Runtime.InteropServices.Marshal.ReleaseComObject(handle); } handle = null; +#endif } } } Modified: branches/FreeTrainAgate/lib/DirectAudio.net/src/BGM.cs =================================================================== --- branches/FreeTrainAgate/lib/DirectAudio.net/src/BGM.cs 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/lib/DirectAudio.net/src/BGM.cs 2008-12-06 00:29:44 UTC (rev 371) @@ -2,7 +2,9 @@ using System.Diagnostics; using System.Runtime.InteropServices; using System.Windows.Forms; +#if windows using QuartzTypeLib; +#endif namespace org.kohsuke.directaudio { @@ -27,6 +29,7 @@ } private void releaseObjects() { +#if windows if( filter!=null ) { Marshal.ReleaseComObject(filter); Marshal.ReleaseComObject(mediaPos); @@ -35,38 +38,62 @@ filter = null; mediaPos = null; mediaEvent = null; +#else +#warning STUB +#endif } private void createObjects() { +#if windows filter = new FilgraphManagerClass(); mediaPos = (IMediaPosition)filter; mediaEvent = (IMediaEventEx)filter; mediaEvent.SetNotifyWindow( wnd.Handle.ToInt32(), WM_DS_NOTIFY, DS_NOTIFY_CODE ); +#else +#warning STUB +#endif } +#if windows private FilgraphManager filter; private IMediaPosition mediaPos; private IMediaEventEx mediaEvent; +#else +#warning STUB +#endif /// <summary> Window that receives notification. </summary> private Control wnd; public string fileName { set { +#if windows releaseObjects(); createObjects(); filter.RenderFile(value); +#else +#warning STUB +#endif } } public void run() { +#if windows filter.Run(); +#else +#warning STUB +#endif } public void pause() { +#if windows filter.Pause(); +#else +#warning STUB +#endif } public void stop() { +#if windows filter.Stop(); // int pfs; // try { @@ -75,6 +102,9 @@ // } catch( COMException ) { // Debug.WriteLine("unable to stop the music properly"); // } +#else +#warning STUB +#endif } /// <summary> @@ -82,15 +112,24 @@ /// </summary> public int volume { get { +#if windows double db = ((IBasicAudio)filter).Volume/100.0; // 10^(db/20))*100 return (int)(Math.Pow(10,db/20)*100); +#else +#warning STUB + return 0; +#endif } set { +#if windows // log10(V/100)*20 = (log10(V)-2)*20 int v = value; if(v<=0) v=1; ((IBasicAudio)filter).Volume = (int)((Math.Log10(v)-2)*20*100); +#else +#warning STUB +#endif } } @@ -101,6 +140,7 @@ public bool loop = true; internal void notify() { +#if windows int code,param1,param2; while(true) { @@ -118,6 +158,9 @@ mediaPos.CurrentPosition = 0; } } +#else +#warning STUB +#endif } Modified: branches/FreeTrainAgate/lib/DirectAudio.net/src/DirectAudio.cs =================================================================== --- branches/FreeTrainAgate/lib/DirectAudio.net/src/DirectAudio.cs 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/lib/DirectAudio.net/src/DirectAudio.cs 2008-12-06 00:29:44 UTC (rev 371) @@ -1,5 +1,9 @@ using System; +#if windows using DxVBLibA; +#else +using ERY.AgateLib; +#endif namespace org.kohsuke.directaudio { @@ -8,8 +12,12 @@ /// </summary> internal class DirectAudio { +#if windows internal static readonly DirectX8Class dx = new DirectX8Class(); internal static readonly DirectMusicLoader8 loader = dx.DirectMusicLoaderCreate(); +#else +#warning STUB +#endif } } Modified: branches/FreeTrainAgate/lib/DirectAudio.net/src/Performance.cs =================================================================== --- branches/FreeTrainAgate/lib/DirectAudio.net/src/Performance.cs 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/lib/DirectAudio.net/src/Performance.cs 2008-12-06 00:29:44 UTC (rev 371) @@ -1,7 +1,11 @@ using System; using System.Diagnostics; using System.Windows.Forms; +#if windows using DxVBLibA; +#else +using ERY.AgateLib; +#endif namespace org.kohsuke.directaudio { @@ -10,13 +14,18 @@ /// </summary> public class Performance : IDisposable { +#if windows internal DirectMusicPerformance8 handle; +#else +#warning STUB +#endif /// <summary> /// /// </summary> /// <param name="owner">owner window object</param> public Performance( IWin32Window owner ) { +#if windows handle = DirectAudio.dx.DirectMusicPerformanceCreate(); this.handle = handle; @@ -29,23 +38,35 @@ ref param, ref nullDs8, CONST_DMUSIC_STANDARD_AUDIO_PATH.DMUS_APATH_DYNAMIC_STEREO, 16 ); +#else +#warning STUB +#endif } public void Dispose() { +#if windows if(handle!=null) { handle.CloseDown(); System.Runtime.InteropServices.Marshal.ReleaseComObject(handle); } handle = null; +#else +#warning STUB +#endif } /// <summary> /// Plays the given segment exclusively. /// </summary> public SegmentState playExclusive( Segment seg ) { +#if windows return new SegmentState( this, handle.PlaySegmentEx( seg.handle, 0, 0, null, null ), handle.GetMusicTime()+seg.handle.GetLength() ); +#else +#warning STUB + return new SegmentState( this, 0, 0); +#endif } /// <summary> @@ -59,6 +80,7 @@ /// Plays the given segment after the specified lead time (in milliseconds) /// </summary> public SegmentState play( Segment seg, int leadTime ) { +#if windows if( leadTime!=0 ) leadTime = handle.ClockToMusicTime(leadTime*10*1000 + handle.GetClockTime()); if( leadTime<0 ) @@ -67,13 +89,22 @@ return new SegmentState( this, handle.PlaySegmentEx( seg.handle, CONST_DMUS_SEGF_FLAGS.DMUS_SEGF_SECONDARY, leadTime, null, null ), handle.GetMusicTime()+seg.handle.GetLength()+leadTime ); +#else +#warning STUB + return new SegmentState( this, 0, 0); +#endif } /// <summary> /// Creates an audio path from the properties of the given segment. /// </summary> public AudioPath createAudioPath( Segment seg ) { +#if windows return new AudioPath( handle.CreateAudioPath( seg.handle.GetAudioPathConfig(), true ) ); +#else +#warning STUB + return new AudioPath (); +#endif } } } Modified: branches/FreeTrainAgate/lib/DirectAudio.net/src/Segment.cs =================================================================== --- branches/FreeTrainAgate/lib/DirectAudio.net/src/Segment.cs 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/lib/DirectAudio.net/src/Segment.cs 2008-12-06 00:29:44 UTC (rev 371) @@ -1,5 +1,9 @@ using System; +#if windows using DxVBLibA; +#else +using ERY.AgateLib; +#endif namespace org.kohsuke.directaudio { @@ -8,33 +12,57 @@ /// </summary> public class Segment : IDisposable { +#if windows internal DirectMusicSegment8 handle; +#else +#warning STUB +#endif +#if windows private Segment( DirectMusicSegment8 handle ) { this.handle = handle; } +#else + private Segment() { +#warning STUB + } +#endif public static Segment fromFile( string fileName ) { +#if windows try { return new Segment( DirectAudio.loader.LoadSegment(fileName) ); } catch( Exception e ) { throw new Exception("unable to load music file: "+fileName,e); } +#else +#warning STUB + throw new Exception("unable to load music file: "+fileName); +#endif } public static Segment fromMidiFile( string fileName ) { +#if windows Segment seg = fromFile(fileName); seg.handle.SetStandardMidiFile(); return seg; +#else +#warning STUB + throw new Exception("unable to load music file: "+fileName); +#endif } public void Dispose() { +#if windows if(handle!=null) { System.Runtime.InteropServices.Marshal.ReleaseComObject(handle); } handle = null; +#else +#warning STUB +#endif } @@ -43,26 +71,48 @@ /// Prepares this sound object for the play by the performance object. /// </summary> public void downloadTo( Performance p ) { +#if windows handle.Download( p.handle.GetDefaultAudioPath() ); +#else +#warning STUB +#endif } /// <summary> /// Reverses the effect of the downloadTo method. /// </summary> public void unloadFrom( Performance p ) { +#if windows handle.Unload( p.handle.GetDefaultAudioPath() ); +#else +#warning STUB +#endif } public Segment clone() { +#if windows return new Segment( handle.Clone(0,0) ); +#else +#warning STUB + return new Segment(); +#endif } public int repeats { get { +#if windows return handle.GetRepeats(); +#else +#warning STUB + return 1; +#endif } set { +#if windows handle.SetRepeats(value); +#else +#warning STUB +#endif } } Modified: branches/FreeTrainAgate/lib/DirectAudio.net/src/SegmentState.cs =================================================================== --- branches/FreeTrainAgate/lib/DirectAudio.net/src/SegmentState.cs 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/lib/DirectAudio.net/src/SegmentState.cs 2008-12-06 00:29:44 UTC (rev 371) @@ -1,5 +1,9 @@ using System; +#if windows using DxVBLibA; +#else +using ERY.AgateLib; +#endif namespace org.kohsuke.directaudio { @@ -8,21 +12,32 @@ /// </summary> public class SegmentState { +#if windows internal SegmentState( Performance perf, DirectMusicSegmentState8 state, int endTime ) { this.performance = perf; this.state = state; this.estimatedEndTime = endTime; } +#else + internal SegmentState( Performance perf, int state, int endTime ) { +#warning STUB + } +#endif +#if windows private readonly Performance performance; private readonly DirectMusicSegmentState8 state; private readonly int estimatedEndTime; +#else +#warning STUB +#endif /// <summary> /// Returns true if this segment is still being played. /// </summary> public bool isPlaying { get { +#if windows if( performance.handle.IsPlaying(null,state) ) return true; @@ -36,6 +51,10 @@ // return true; // this will be played in a future return false; +#else +#warning STUB + return false; +#endif } } } Modified: branches/FreeTrainAgate/lib/DirectDraw.net/DirectDraw.cs =================================================================== --- branches/FreeTrainAgate/lib/DirectDraw.net/DirectDraw.cs 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/lib/DirectDraw.net/DirectDraw.cs 2008-12-06 00:29:44 UTC (rev 371) @@ -2,7 +2,11 @@ using System.Drawing; using System.Runtime.InteropServices; using System.Windows.Forms; -using DxVBLib; +#if windows +using DxVBLibA; +#else +using ERY.AgateLib; +#endif using System.Diagnostics; namespace org.kohsuke.directdraw @@ -13,18 +17,28 @@ /// </summary> public class DirectDraw : IDisposable { +#if windows private static CONST_DDSURFACECAPSFLAGS memoryPlace = CONST_DDSURFACECAPSFLAGS.DDSCAPS_SYSTEMMEMORY; +#else +#warning STUB +#endif public static DDSurfaceAllocation SurfeceAllocation { get { +#if windows if((memoryPlace&CONST_DDSURFACECAPSFLAGS.DDSCAPS_VIDEOMEMORY)!=0) return DDSurfaceAllocation.ForceVideoMem; else if((memoryPlace&CONST_DDSURFACECAPSFLAGS.DDSCAPS_SYSTEMMEMORY)!=0) return DDSurfaceAllocation.ForceSystemMem; else return DDSurfaceAllocation.Auto; +#else +#warning STUB + return DDSurfaceAllocation.Auto; +#endif } set { +#if windows switch(value) { case DDSurfaceAllocation.ForceSystemMem: @@ -37,47 +51,81 @@ memoryPlace &= CONST_DDSURFACECAPSFLAGS.DDSCAPS_OFFSCREENPLAIN; break; } +#else +#warning STUB +#endif } } +#if windows protected DirectDraw7 handle; +#else +#warning STUB +#endif public DirectDraw() { +#if windows // initialize DirectDraw DirectX7 dxc = new DirectX7Class(); handle = dxc.DirectDrawCreate(""); handle.SetCooperativeLevel( 0, CONST_DDSCLFLAGS.DDSCL_NORMAL ); // window mode +#else +#warning STUB +#endif } public int totalVideoMemory { get { +#if windows DDSCAPS2 ddcaps = new DDSCAPS2(); ddcaps.lCaps = CONST_DDSURFACECAPSFLAGS.DDSCAPS_VIDEOMEMORY; return handle.GetAvailableTotalMem(ref ddcaps); +#else +#warning STUB + return 0; +#endif } } public int availableVideoMemory { get { +#if windows DDSCAPS2 ddcaps = new DDSCAPS2(); ddcaps.lCaps = CONST_DDSURFACECAPSFLAGS.DDSCAPS_VIDEOMEMORY; return handle.GetFreeMem(ref ddcaps); +#else +#warning STUB + return 0; +#endif } } public string displayModeName { get { +#if windows return GetDisplayModeName(); +#else +#warning STUB + return ""; +#endif } } +#if windows [DllImport("DirectDraw.AlphaBlend.dll")] private static extern string GetDisplayModeName(); +#else +#warning STUB +#endif public virtual void Dispose() { +#if windows handle=null; +#else +#warning STUB +#endif } @@ -85,6 +133,7 @@ /// Creates a blank off-screen surface with the specified size. /// </summary> public Surface createOffscreenSurface( int width, int height ) { +#if windows DDSURFACEDESC2 sd = new DDSURFACEDESC2(); sd.lSize = Marshal.SizeOf(sd); sd.lFlags = CONST_DDSURFACEDESCFLAGS.DDSD_CAPS | @@ -105,6 +154,10 @@ sd.ddsCaps.lCaps |= CONST_DDSURFACECAPSFLAGS.DDSCAPS_SYSTEMMEMORY; return new Surface(handle.CreateSurface( ref sd )); } +#else +#warning STUB + return new Surface(); +#endif } public Surface createOffscreenSurface( Size sz ) { @@ -115,12 +168,18 @@ /// Creates an off-screen surface from an image. /// </summary> public Surface createFromImage( Image img ) { +#if windows Surface s = createOffscreenSurface( img.Size ); using(GDIGraphics g=new GDIGraphics(s)) { // without the size parameter, it doesn't work well with non-standard DPIs. g.graphics.DrawImage( img, new Rectangle( new Point(0,0), img.Size ) ); } return s; +#else +#warning STUB + Surface s = createOffscreenSurface( img.Size ); + return s; +#endif } /// <summary> @@ -154,19 +213,23 @@ public Surface primarySurface { get { return primary; } } public WindowedDirectDraw( Control control ) { - primary = createPrimarySurface(); +#if windows // attach window clipper DirectDrawClipper cp = handle.CreateClipper(0); cp.SetHWnd( control.Handle.ToInt32() ); primary.handle.SetClipper(cp); primary.clipRect = new Rectangle( int.MinValue/2, int.MinValue/2, int.MaxValue, int.MaxValue ); +#else +#warning STUB +#endif } /// <summary> /// Creates the primary surface. /// </summary> private Surface createPrimarySurface() { +#if windows DDSURFACEDESC2 sd= new DDSURFACEDESC2(); @@ -174,6 +237,10 @@ sd.ddsCaps.lCaps = CONST_DDSURFACECAPSFLAGS.DDSCAPS_PRIMARYSURFACE; return new Surface(handle.CreateSurface(ref sd )); +#else +#warning STUB + return new Surface(); +#endif } public override void Dispose() { Modified: branches/FreeTrainAgate/lib/DirectDraw.net/DirectDraw.net.csproj =================================================================== --- branches/FreeTrainAgate/lib/DirectDraw.net/DirectDraw.net.csproj 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/lib/DirectDraw.net/DirectDraw.net.csproj 2008-12-06 00:29:44 UTC (rev 371) @@ -49,6 +49,9 @@ <WarningLevel>4</WarningLevel> <DebugType>full</DebugType> <ErrorReport>prompt</ErrorReport> + <OutputType>Library</OutputType> + <AssemblyName>DirectDraw.net</AssemblyName> + <RootNamespace>DirectDraw.net</RootNamespace> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <OutputPath>bin\Release\</OutputPath> @@ -72,11 +75,15 @@ <WarningLevel>4</WarningLevel> <DebugType>none</DebugType> <ErrorReport>prompt</ErrorReport> + <OutputType>Library</OutputType> + <AssemblyName>DirectDraw.net</AssemblyName> + <RootNamespace>DirectDraw.net</RootNamespace> </PropertyGroup> <ItemGroup> - <Reference Include="Interop.DirectDrawAlphaBlendLib"> + <Reference Include="Interop.DirectDrawAlphaBlendLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> <Name>Interop.DirectDrawAlphaBlendLib</Name> <HintPath>Interop.DirectDrawAlphaBlendLib.DLL</HintPath> + <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="System"> <Name>System</Name> @@ -100,6 +107,38 @@ <Lcid>0</Lcid> <WrapperTool>tlbimp</WrapperTool> </COMReference> + <Reference Include="AgateDrawing, Version=0.2.5.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\..\extlib\AgateDrawing.dll</HintPath> + <SpecificVersion>False</SpecificVersion> + </Reference> + <Reference Include="AgateFMOD, Version=0.2.5.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\..\extlib\AgateFMOD.dll</HintPath> + <SpecificVersion>False</SpecificVersion> + </Reference> + <Reference Include="AgateLib, Version=0.2.5.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\..\extlib\AgateLib.dll</HintPath> + <SpecificVersion>False</SpecificVersion> + </Reference> + <Reference Include="AgateMDX, Version=0.2.5.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\..\extlib\AgateMDX.dll</HintPath> + <SpecificVersion>False</SpecificVersion> + </Reference> + <Reference Include="AgateOTK, Version=0.2.5.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\..\extlib\AgateOTK.dll</HintPath> + <SpecificVersion>False</SpecificVersion> + </Reference> + <Reference Include="OpenTK.OpenGL, Version=0.3.4.1, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\..\extlib\OpenTK.OpenGL.dll</HintPath> + <SpecificVersion>False</SpecificVersion> + </Reference> + <Reference Include="OpenTK.Platform.Windows, Version=0.1.2.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\..\extlib\OpenTK.Platform.Windows.dll</HintPath> + <SpecificVersion>False</SpecificVersion> + </Reference> + <Reference Include="OpenTK.Platform.X11, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\..\extlib\OpenTK.Platform.X11.dll</HintPath> + <SpecificVersion>False</SpecificVersion> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="AssemblyInfo.cs"> @@ -121,5 +160,7 @@ </PreBuildEvent> <PostBuildEvent> </PostBuildEvent> + <ProjectGuid>{C7DA6E56-7BB2-43BC-871C-3B33F0DE038C}</ProjectGuid> + <RootNamespace>DirectDraw.net</RootNamespace> </PropertyGroup> </Project> \ No newline at end of file Modified: branches/FreeTrainAgate/lib/DirectDraw.net/Surface.cs =================================================================== --- branches/FreeTrainAgate/lib/DirectDraw.net/Surface.cs 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/lib/DirectDraw.net/Surface.cs 2008-12-06 00:29:44 UTC (rev 371) @@ -2,9 +2,25 @@ using System.Runtime.InteropServices; using System.Drawing; using System.Diagnostics; -using DxVBLib; +#if windows +using DxVBLibA; +#else +using ERY.AgateLib; +#endif using DirectDrawAlphaBlendLib; +#if window +#else +public class RECT +{ +#warning STUB + public int Left; + public int Top; + public int Right; + public int Bottom; +}; +#endif + namespace org.kohsuke.directdraw { /// <summary> @@ -23,8 +39,12 @@ /// </summary> public class Surface : IDisposable { +#if windows private DirectDrawSurface7 surface; private static AlphaBlender alpha = new AlphaBlenderClass(); +#else +#warning STUB +#endif /// <summary> Bit-width. </summary> private readonly byte widthR,widthB,widthG; @@ -47,8 +67,13 @@ /// Obtain the wrapped DirectDraw interface. /// For advanced use only. /// </summary> +#if windows public DirectDrawSurface7 handle { get { return surface; } } +#else +#warning STUB +#endif +#if windows internal Surface(DirectDrawSurface7 _handle) { this.surface = _handle; @@ -65,6 +90,11 @@ widthG = countBitWidth(pixelFormat.lGBitMask); widthB = countBitWidth(pixelFormat.lBBitMask); } +#else + internal Surface() { +#warning STUB + } +#endif public string displayModeName { get { @@ -122,10 +152,14 @@ public void Dispose() { +#if windows // explicitly release a reference if(surface!=null) System.Runtime.InteropServices.Marshal.ReleaseComObject(surface); surface=null; +#else +#warning STUB +#endif } /// <summary> @@ -135,12 +169,16 @@ /// </summary> /// public void bltFast( int destX, int destY, Surface source, Rectangle srcRect ) { +#if windows RECT srect = Util.toRECT(srcRect); // TODO: clip surface.BltFast( destX, destY, source.handle, ref srect, CONST_DDBLTFASTFLAGS.DDBLTFAST_WAIT | CONST_DDBLTFASTFLAGS.DDBLTFAST_SRCCOLORKEY ); +#else +#warning STUB +#endif } /// <summary> @@ -160,6 +198,7 @@ } private void blt( RECT dst, Surface source, RECT src ) { +#if windows CONST_DDBLTFLAGS flag; flag = CONST_DDBLTFLAGS.DDBLT_WAIT; if( source.hasSourceColorKey ) @@ -168,9 +207,13 @@ Util.clip( ref dst, ref src, clip ); surface.Blt( ref dst, source.handle, ref src, flag ); +#else +#warning STUB +#endif } public void bltAlpha( Point dstPos, Surface source, Point srcPos, Size sz ) { +#if windows RECT dst = Util.toRECT( dstPos, sz ); RECT src = Util.toRECT( srcPos, sz ); Util.clip( ref dst, ref src, clip ); @@ -178,6 +221,9 @@ dst.Left, dst.Top, src.Left, src.Top, src.Right, src.Bottom, source.colorKey ); +#else +#warning STUB +#endif } public void bltAlpha( Point dstPos, Surface source ) { @@ -185,6 +231,7 @@ } public void bltShape( Point dstPos, Surface source, Point srcPos, Size sz, Color fill ) { +#if windows RECT dst = Util.toRECT( dstPos, sz ); RECT src = Util.toRECT( srcPos, sz ); Util.clip( ref dst, ref src, clip ); @@ -194,6 +241,9 @@ src.Left, src.Top, src.Right, src.Bottom, (int)colorToFill(fill), source.colorKey ); +#else +#warning STUB +#endif } public void bltShape( Point dstPos, Surface source, Color fill ) { @@ -216,6 +266,7 @@ Point srcPos, Size sz, Color[] _srcColors, Color[] _dstColors, bool vflip ) { +#if windows RECT dst = Util.toRECT( dstPos, sz ); RECT src = Util.toRECT( srcPos, sz ); @@ -241,10 +292,14 @@ srcColors.Length, source.colorKey, vflip?-1:0 ); +#else +#warning STUB +#endif } public void bltHueTransform( Point dstPos, Surface source, Point srcPos, Size sz, Color R_dest, Color G_dest, Color B_dest ) { +#if windows RECT dst = Util.toRECT( dstPos, sz ); RECT src = Util.toRECT( srcPos, sz ); Util.clip( ref dst, ref src, clip ); @@ -255,6 +310,9 @@ src.Left, src.Top, src.Right, src.Bottom, R_dest.ToArgb(), G_dest.ToArgb(), B_dest.ToArgb(), source.colorKey ); +#else +#warning STUB +#endif } @@ -263,12 +321,20 @@ /// Fills the surface. /// </summary> public void fill( Color c ) { +#if windows surface.BltColorFill( ref clip, (int)colorToFill(c) ); +#else +#warning STUB +#endif } public void fill( Rectangle rect, Color c ) { +#if windows RECT r = Util.intersect( Util.toRECT(rect), clip ); surface.BltColorFill( ref r, (int)colorToFill(c) ); +#else +#warning STUB +#endif } @@ -279,6 +345,7 @@ /// </summary> public Color sourceColorKey { set { +#if windows DDCOLORKEY key = new DDCOLORKEY(); // TODO: how shall I convert Color to this structure? key.high = key.low = colorKey = (int)colorToFill(value); @@ -286,6 +353,9 @@ hasSourceColorKey = true; // TODO: how to remove color key? +#else +#warning STUB +#endif } } @@ -308,6 +378,7 @@ // outrange point will raise an error. int getColorAt( int x, int y ) { +#if windows RECT r = new RECT(); r.Left = x; r.Top = y; @@ -319,26 +390,42 @@ int c = surface.GetLockedPixel(x,y); surface.Unlock(ref r); return c; +#else +#warning STUB + return 0; +#endif } public void drawPolygon( Point p1, Point p2, Point p3, Point p4 ) { +#if windows int hdc = handle.GetDC(); Polygon( hdc, new Point[]{p1,p2,p3,p4}, 4 ); handle.ReleaseDC(hdc); +#else +#warning STUB +#endif } public void drawBox( Rectangle r ) { +#if windows handle.DrawBox( r.Left, r.Top, r.Right, r.Bottom ); +#else +#warning STUB +#endif } /// <summary> /// Tries to recover a lost surface. /// </summary> public void restore() { +#if windows handle.restore(); +#else +#warning STUB +#endif } - +#if windows #region importing external functions [DllImport("gdi32.dll")] private static extern bool Polygon( int hdc, Point[] pts, int nCount ); @@ -351,6 +438,9 @@ int sourceX1, int sourceY1, int sourceX2, int sourceY2, int targetR, int targetG, int targetB, int keyCol ); #endregion +#else +#warning STUB +#endif @@ -370,6 +460,7 @@ /// The caller needs to dispose the bitmap. /// </summary> public Bitmap createBitmap() { +#if windows Bitmap bmp = new Bitmap( size.Width, size.Height ); using( GDIGraphics src = new GDIGraphics(this) ) { using( Graphics dst = Graphics.FromImage(bmp) ) { @@ -381,9 +472,15 @@ } } return bmp; +#else +#warning STUB + Bitmap bmp = new Bitmap( size.Width, size.Height ); + return bmp; +#endif } public void GDICopyBits(Graphics g, Rectangle dst, Rectangle src){ +#if windows using( GDIGraphics gg = new GDIGraphics(this) ) { IntPtr dstHDC = g.GetHdc(); IntPtr srcHDC = gg.graphics.GetHdc(); @@ -392,9 +489,13 @@ g.ReleaseHdc(dstHDC); gg.graphics.ReleaseHdc(srcHDC); } +#else +#warning STUB +#endif } public void GDICopyBits(Graphics g, Rectangle dst, Point src){ +#if windows using( GDIGraphics gg = new GDIGraphics(this) ) { IntPtr dstHDC = g.GetHdc(); IntPtr srcHDC = gg.graphics.GetHdc(); @@ -402,8 +503,12 @@ g.ReleaseHdc(dstHDC); gg.graphics.ReleaseHdc(srcHDC); } +#else +#warning STUB +#endif } +#if windows [DllImport("gdi32.dll")] private static extern bool BitBlt( IntPtr hdcDest, @@ -431,6 +536,9 @@ int nHeightSrc, // コピー元長方形の高さ long dwRop // ラスタオペレーションコード ); +#else +#warning STUB +#endif } @@ -441,18 +549,30 @@ public sealed class GDIGraphics : IDisposable { public readonly Graphics graphics; +#if windows private readonly Surface surface; private readonly int hdc; +#else +#warning STUB +#endif public GDIGraphics( Surface _surface ) { +#if windows this.surface = _surface; this.hdc = surface.handle.GetDC(); graphics = Graphics.FromHdc( new IntPtr(hdc) ); +#else +#warning STUB +#endif } public void Dispose() { +#if windows graphics.Dispose(); surface.handle.ReleaseDC(hdc); +#else +#warning STUB +#endif } } } Modified: branches/FreeTrainAgate/lib/DirectDraw.net/Util.cs =================================================================== --- branches/FreeTrainAgate/lib/DirectDraw.net/Util.cs 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/lib/DirectDraw.net/Util.cs 2008-12-06 00:29:44 UTC (rev 371) @@ -1,6 +1,10 @@ using System; using System.Drawing; -using DxVBLib; +#if windows +using DxVBLibA; +#else +using ERY.AgateLib; +#endif namespace org.kohsuke.directdraw { Modified: branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.financial.bank/FreeTrain.Bank.csproj =================================================================== --- branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.financial.bank/FreeTrain.Bank.csproj 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.financial.bank/FreeTrain.Bank.csproj 2008-12-06 00:29:44 UTC (rev 371) @@ -101,6 +101,10 @@ <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> <Private>False</Private> </ProjectReference> + <Reference Include="MagicLibrary, Version=1.7.4.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\..\extlib\MagicLibrary.DLL</HintPath> + <SpecificVersion>False</SpecificVersion> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="AssemblyInfo.cs"> Modified: branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.financial.bank/FreeTrain.Bank.pidb =================================================================== (Binary files differ) Modified: branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.financial.stockmarket/FreeTrain.StockMarket.csproj =================================================================== --- branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.financial.stockmarket/FreeTrain.StockMarket.csproj 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.financial.stockmarket/FreeTrain.StockMarket.csproj 2008-12-06 00:29:44 UTC (rev 371) @@ -107,6 +107,10 @@ <Reference Include="System.Xml"> <Name>System.XML</Name> </Reference> + <Reference Include="MagicLibrary, Version=1.7.4.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\..\extlib\MagicLibrary.DLL</HintPath> + <SpecificVersion>False</SpecificVersion> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="AssemblyInfo.cs"> Modified: branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.financial.stockmarket/FreeTrain.StockMarket.pidb =================================================================== (Binary files differ) Modified: branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib/src/DummyCars/FreeTrain.DummyCars.csproj =================================================================== --- branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib/src/DummyCars/FreeTrain.DummyCars.csproj 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib/src/DummyCars/FreeTrain.DummyCars.csproj 2008-12-06 00:29:44 UTC (rev 371) @@ -113,6 +113,10 @@ <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> <Private>False</Private> </ProjectReference> + <Reference Include="MagicLibrary, Version=1.7.4.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\..\..\..\extlib\MagicLibrary.DLL</HintPath> + <SpecificVersion>False</SpecificVersion> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="AssemblyInfo.cs"> Modified: branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib/src/DummyCars/FreeTrain.DummyCars.pidb =================================================================== (Binary files differ) Modified: branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib/src/RoadAccessory/FreeTrain.RoadAccessory.csproj =================================================================== --- branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib/src/RoadAccessory/FreeTrain.RoadAccessory.csproj 2008-12-05 15:12:42 UTC (rev 370) +++ branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib/src/RoadAccessory/FreeTrain.RoadAccessory.csproj 2008-12-06 00:29:44 UTC (rev 371) @@ -113,6 +113,10 @@ <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> <Private>False</Private> </ProjectReference> + <Reference Include="MagicLibrary, Version=1.7.4.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\..\..\..\extlib\MagicLibrary.DLL</HintPath> + <SpecificVersion>False</SpecificVersion> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="AssemblyInfo.cs"> Modified: branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib/src/RoadAccessory/FreeTrain.RoadAccessory.pidb =================================================================== (Binary files differ) Modified: branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib.fence/FreeTrain.Fence.pidb =================================================================== (Binary files differ) Modified: branches/FreeTrainAgate/plugins/jp.co.tripod.chiname.lib.generic/FreeTrain.ContribEx.pidb ===================================... [truncated message content] |