From: <je...@us...> - 2008-03-25 22:19:28
|
Revision: 289 http://freetrain.svn.sourceforge.net/freetrain/?rev=289&view=rev Author: jendave Date: 2008-03-25 15:19:30 -0700 (Tue, 25 Mar 2008) Log Message: ----------- lots of re-casing methods Modified Paths: -------------- branches/FreeTrainSDL/Program.cs branches/FreeTrainSDL/core/FreeTrain.Core.csproj branches/FreeTrainSDL/core/contributions/common/FixedSizeStructureContribution.cs branches/FreeTrainSDL/core/contributions/common/FixedSizeStructureController.cs branches/FreeTrainSDL/core/contributions/land/Bulldozer.cs branches/FreeTrainSDL/core/contributions/others/NewWorldDialog.cs branches/FreeTrainSDL/core/contributions/road/AbstractRoadContributionImpl.cs branches/FreeTrainSDL/core/contributions/structs/VarHeightBuildingContribution.cs branches/FreeTrainSDL/core/controllers/AbstractControllerForm.cs branches/FreeTrainSDL/core/controllers/AbstractControllerImpl.cs branches/FreeTrainSDL/core/controllers/AbstractLineController.cs branches/FreeTrainSDL/core/controllers/ControllerHostForm.cs branches/FreeTrainSDL/core/controllers/CubeSelectorController.cs branches/FreeTrainSDL/core/controllers/Disambiguators.cs branches/FreeTrainSDL/core/controllers/LocationStore.cs branches/FreeTrainSDL/core/controllers/ModalController.cs branches/FreeTrainSDL/core/controllers/PointSelectorController.cs branches/FreeTrainSDL/core/controllers/RectSelectorController.cs branches/FreeTrainSDL/core/controllers/land/LandPropertyController.cs branches/FreeTrainSDL/core/controllers/rail/PlatformController.cs branches/FreeTrainSDL/core/controllers/rail/RailRoadController.cs branches/FreeTrainSDL/core/controllers/rail/SlopeRailRoadController.cs branches/FreeTrainSDL/core/controllers/rail/StationPassagewayController.cs branches/FreeTrainSDL/core/controllers/rail/TrainControllerDialog.cs branches/FreeTrainSDL/core/controllers/rail/TrainPlacementController.cs branches/FreeTrainSDL/core/controllers/rail/TrainTrackingWindow.cs branches/FreeTrainSDL/core/controllers/rail/TrainTradingDialog.cs branches/FreeTrainSDL/core/controllers/road/RoadController.cs branches/FreeTrainSDL/core/controllers/structs/FixedSizeStructController.cs branches/FreeTrainSDL/core/controllers/structs/StructPlacementController.cs branches/FreeTrainSDL/core/controllers/structs/VarHeightBuildingController.cs branches/FreeTrainSDL/core/controllers/terrain/MountainController.cs branches/FreeTrainSDL/core/framework/ExternToolsHelper.cs branches/FreeTrainSDL/core/framework/GlobalOptions.cs branches/FreeTrainSDL/core/framework/MainWindow.cs branches/FreeTrainSDL/core/framework/graphics/ColorMappedSprite.cs branches/FreeTrainSDL/core/framework/graphics/HueTransformSprite.cs branches/FreeTrainSDL/core/framework/graphics/Picture.cs branches/FreeTrainSDL/core/framework/graphics/PreviewDrawer.cs branches/FreeTrainSDL/core/framework/sound/RepeatableSoundEffectImpl.cs branches/FreeTrainSDL/core/views/GlobalViewOptions.cs branches/FreeTrainSDL/core/views/MapOverlay.cs branches/FreeTrainSDL/core/views/QuarterViewDrawer.cs branches/FreeTrainSDL/core/views/map/HeightCutWindow.cs branches/FreeTrainSDL/core/views/map/MapView.cs branches/FreeTrainSDL/core/world/Car.cs branches/FreeTrainSDL/core/world/CarState.cs branches/FreeTrainSDL/core/world/Clock.cs branches/FreeTrainSDL/core/world/Cube.cs branches/FreeTrainSDL/core/world/Location.cs branches/FreeTrainSDL/core/world/RRCrossing.cs branches/FreeTrainSDL/core/world/TimeLength.cs branches/FreeTrainSDL/core/world/Traffic.cs branches/FreeTrainSDL/core/world/Voxel.cs branches/FreeTrainSDL/core/world/WorldDefinition.cs branches/FreeTrainSDL/core/world/accounting/AccountGenre.cs branches/FreeTrainSDL/core/world/accounting/AccountManager.cs branches/FreeTrainSDL/core/world/accounting/Debt.cs branches/FreeTrainSDL/core/world/accounting/TransactionHistory.cs branches/FreeTrainSDL/core/world/development/DevelopmentAlgorithm.cs branches/FreeTrainSDL/core/world/development/LandValue.cs branches/FreeTrainSDL/core/world/development/LandValueInspector.cs branches/FreeTrainSDL/core/world/development/ULV.cs branches/FreeTrainSDL/core/world/land/LandPropertyVoxel.cs branches/FreeTrainSDL/core/world/land/LandVoxel.cs branches/FreeTrainSDL/core/world/rail/BridgePierVoxel.cs branches/FreeTrainSDL/core/world/rail/BridgeRail.cs branches/FreeTrainSDL/core/world/rail/FatPlatform.cs branches/FreeTrainSDL/core/world/rail/JunctionRailRoad.cs branches/FreeTrainSDL/core/world/rail/PassagewayRail.cs branches/FreeTrainSDL/core/world/rail/Platform.cs branches/FreeTrainSDL/core/world/rail/RailRoad.cs branches/FreeTrainSDL/core/world/rail/RailStationaryStructure.cs branches/FreeTrainSDL/core/world/rail/SingleRailRoad.cs branches/FreeTrainSDL/core/world/rail/SlopeRailRoad.cs branches/FreeTrainSDL/core/world/rail/SpecialPurposeRailRoad.cs branches/FreeTrainSDL/core/world/rail/Station.cs branches/FreeTrainSDL/core/world/rail/StealSupportedRailContributionImpl.cs branches/FreeTrainSDL/core/world/rail/ThinPlatform.cs branches/FreeTrainSDL/core/world/rail/Train.cs branches/FreeTrainSDL/core/world/rail/TunnelRail.cs branches/FreeTrainSDL/core/world/rail/YardRailRoad.cs branches/FreeTrainSDL/core/world/road/Road.cs branches/FreeTrainSDL/core/world/structs/Commercial.cs branches/FreeTrainSDL/core/world/structs/ConstructionSite.cs branches/FreeTrainSDL/core/world/structs/PThreeDimStructure.cs branches/FreeTrainSDL/core/world/structs/PopulatedStructure.cs branches/FreeTrainSDL/core/world/structs/StationListenerImpl.cs branches/FreeTrainSDL/core/world/structs/Structure.cs branches/FreeTrainSDL/core/world/structs/VarHeightBuilding.cs branches/FreeTrainSDL/core/world/subsidiaries/SubsidiaryCompany.cs branches/FreeTrainSDL/core/world/subsidiaries/SubsidiaryMarket.cs branches/FreeTrainSDL/core/world/terrain/MountainVoxel.cs branches/FreeTrainSDL/plugins/Chiname.DummyCars/ControllerImpl.cs branches/FreeTrainSDL/plugins/Chiname.Generic/MultiSelectorController.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerImpl.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/ControllerForm.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HVControllerImpl.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HVStructure.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HalfVoxelContribution.cs branches/FreeTrainSDL/plugins/Kohsuke.ColorTestTrain/ColorConfigDialog.cs Modified: branches/FreeTrainSDL/Program.cs =================================================================== --- branches/FreeTrainSDL/Program.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/Program.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -116,13 +116,13 @@ controller = MainWindow.mainWindow.currentController; qView.updateScreen(); - if (WorldDefinition.world.satellite == null || - WorldDefinition.world.satellite.surface.w != 150 || - WorldDefinition.world.satellite.surface.h != 150) + if (WorldDefinition.World.Satellite == null || + WorldDefinition.World.Satellite.surface.w != 150 || + WorldDefinition.World.Satellite.surface.h != 150) { - WorldDefinition.world.satellite = new Surface(150, 150, 32); - WorldDefinition.world.satellite.sourceColorKey = Color.Magenta; - WorldDefinition.world.satellite.Fill(Color.FromArgb(222, 195, 132)); + WorldDefinition.World.Satellite = new Surface(150, 150, 32); + WorldDefinition.World.Satellite.sourceColorKey = Color.Magenta; + WorldDefinition.World.Satellite.Fill(Color.FromArgb(222, 195, 132)); } } Application.DoEvents(); @@ -186,7 +186,7 @@ Point ab = qView.fromClientToAB(e.X + ScrollPosition.X, e.Y + ScrollPosition.Y); Location xyz = qView.fromABToXYZ(ab, controller); - if (e.Button == MouseButton.PrimaryButton) controller.onClick(null, xyz, ab); + if (e.Button == MouseButton.PrimaryButton) controller.OnClick(null, xyz, ab); } } } @@ -205,7 +205,7 @@ if (controller != null) { Point ab = qView.fromClientToAB(e.X + ScrollPosition.X, e.Y + ScrollPosition.Y); - controller.onMouseMove(null, qView.fromABToXYZ(ab, controller), ab); + controller.OnMouseMove(null, qView.fromABToXYZ(ab, controller), ab); } oldX = e.X; oldY = e.Y; @@ -216,8 +216,8 @@ { if (qView != null) { - WorldDefinition.world.clock.tick(); - WorldDefinition.world.clock.tick(); + WorldDefinition.World.clock.tick(); + WorldDefinition.World.clock.tick(); sourceRect = new Sdl.SDL_Rect((short)ScrollPosition.X, (short)ScrollPosition.Y, (short)width, (short)height); dst = new Sdl.SDL_Rect(0, 0, (short)width, (short)height); @@ -232,7 +232,7 @@ if (gui != null) { gui.updateGUIElements(width, height); - if (WorldDefinition.world != null) gui.clock_text = WorldDefinition.world.clock.displayString; + if (WorldDefinition.World != null) gui.clock_text = WorldDefinition.World.clock.displayString; gui.drawGUI(width, height, screen.Handle); } screen.Update(); @@ -361,20 +361,20 @@ finalDraw(); Core.init(null, null, null, new ProgressHandler(UpdateMessage), true); world = new WorldDefinition(new Distance(150, 150, 7), 3); - WorldDefinition.world = world; + WorldDefinition.World = world; weatherOverlay = NullWeatherOverlay.theInstance; UpdateMessage("Creating Map...", 0); finalDraw(); - qView = new QuarterViewDrawer(world, new Rectangle(0, 0, world.size.x * 32 - 16, (world.size.y - 2 * world.size.z - 1) * 8)); - qView.offscreenBuffer = new Surface(world.size.x * 32 - 16, (world.size.y - 2 * world.size.z - 1) * 8, screen.CreateCompatibleSurface().Pixels); + qView = new QuarterViewDrawer(world, new Rectangle(0, 0, world.Size.x * 32 - 16, (world.Size.y - 2 * world.Size.z - 1) * 8)); + qView.offscreenBuffer = new Surface(world.Size.x * 32 - 16, (world.Size.y - 2 * world.Size.z - 1) * 8, screen.CreateCompatibleSurface().Pixels); qView.offscreenBuffer.sourceColorKey = Color.Magenta; qView.recreateDrawBuffer(new Size(width, height), true); UpdateMessage("Creating Map...", 100); finalDraw(); - qView.draw(new Rectangle(0, 0, world.size.x * 32 - 16, (world.size.y - 2 * world.size.z - 1) * 8), null); + qView.draw(new Rectangle(0, 0, world.Size.x * 32 - 16, (world.Size.y - 2 * world.Size.z - 1) * 8), null); gui.SHOW_SPLASH = false; Modified: branches/FreeTrainSDL/core/FreeTrain.Core.csproj =================================================================== --- branches/FreeTrainSDL/core/FreeTrain.Core.csproj 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/FreeTrain.Core.csproj 2008-03-25 22:19:30 UTC (rev 289) @@ -262,7 +262,7 @@ <SubType>Form</SubType> </Compile> <Compile Include="controllers\AbstractControllerImpl.cs"> - <SubType>Form</SubType> + <SubType>UserControl</SubType> </Compile> <Compile Include="controllers\AbstractLineController.cs"> <SubType>Form</SubType> Modified: branches/FreeTrainSDL/core/contributions/common/FixedSizeStructureContribution.cs =================================================================== --- branches/FreeTrainSDL/core/contributions/common/FixedSizeStructureContribution.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/contributions/common/FixedSizeStructureContribution.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -112,7 +112,7 @@ /// <param name="baseLoc"></param> public Structure create(Location baseLoc, bool initiallyOwned) { - return create(new WorldLocator(WorldDefinition.world, baseLoc), initiallyOwned); + return create(new WorldLocator(WorldDefinition.World, baseLoc), initiallyOwned); } /// <summary> /// @@ -130,7 +130,7 @@ /// <param name="baseLoc"></param> public void create2(Location baseLoc) { - create(new WorldLocator(WorldDefinition.world, baseLoc), false); + create(new WorldLocator(WorldDefinition.World, baseLoc), false); } /// <summary> @@ -186,7 +186,7 @@ public WorldDefinition CreatePreviewWorld(Size minsizePixel, IDictionary options) { WorldDefinition w = WorldDefinition.CreatePreviewWorld(minsizePixel, size); - Location l = w.toXYZ((w.size.x - size.x + size.y) / 2, w.size.y - size.y - 2, 0); + Location l = w.toXYZ((w.Size.x - size.x + size.y) / 2, w.Size.y - size.y - 2, 0); create(new WorldLocator(w, l), false); return w; } Modified: branches/FreeTrainSDL/core/contributions/common/FixedSizeStructureController.cs =================================================================== --- branches/FreeTrainSDL/core/contributions/common/FixedSizeStructureController.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/contributions/common/FixedSizeStructureController.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -60,7 +60,7 @@ /// <param name="cube"></param> protected override void onSelected(Cube cube) { - if (contrib.canBeBuilt(cube.corner, ControlMode.player)) + if (contrib.canBeBuilt(cube.corner, ControlMode.Player)) { MainWindow.showError("Can not build"); //! MainWindow.showError("設置できません"); @@ -74,7 +74,7 @@ /// <summary> /// /// </summary> - public override void onDetached() + public override void OnDetached() { alphaSprites.Dispose(); } @@ -153,7 +153,7 @@ /// <param name="cube"></param> protected override void onSelected(Cube cube) { - PThreeDimStructure s = WorldDefinition.world.getEntityAt(cube.corner) as PThreeDimStructure; + PThreeDimStructure s = WorldDefinition.World.getEntityAt(cube.corner) as PThreeDimStructure; if (s == null || s.type != contrib) { MainWindow.showError("Wrong type"); Modified: branches/FreeTrainSDL/core/contributions/land/Bulldozer.cs =================================================================== --- branches/FreeTrainSDL/core/contributions/land/Bulldozer.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/contributions/land/Bulldozer.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -54,7 +54,7 @@ public override void create(int x1, int y1, int x2, int y2, int z, bool owned) { bulldoze(new Location(x1, y1, z), new Location(x2, y2, z)); - WorldDefinition.world.onVoxelUpdated(new Cube(x1, y1, z, x2 - x1 + 1, y2 - y1 + 1, 1)); + WorldDefinition.World.onVoxelUpdated(new Cube(x1, y1, z, x2 - x1 + 1, y2 - y1 + 1, 1)); } /// <summary> /// @@ -70,14 +70,14 @@ { // edited by 477 (04/02/14) //if( World.world.isReusable(x,y,z) && World.world[x,y,z]!=null ) - Voxel v = WorldDefinition.world[x, y, z]; + Voxel v = WorldDefinition.World[x, y, z]; if (v != null) { if (v is MountainVoxel) { MountainVoxel mv = v as MountainVoxel; if (mv.isFlattened) - WorldDefinition.world.remove(x, y, z); + WorldDefinition.World.remove(x, y, z); else mv.removeTrees(); } @@ -87,7 +87,7 @@ } else { - WorldDefinition.world.remove(x, y, z); + WorldDefinition.World.remove(x, y, z); } } } Modified: branches/FreeTrainSDL/core/contributions/others/NewWorldDialog.cs =================================================================== --- branches/FreeTrainSDL/core/contributions/others/NewWorldDialog.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/contributions/others/NewWorldDialog.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -228,9 +228,9 @@ int y = int.Parse(sizeY.Text); int z = int.Parse(sizeZ.Text); WorldDefinition w = new WorldDefinition( new Distance(x,y+z*2,z), z/4 ); - w.name = this.name.Text; - if(w.name==null || w.name.Length==0) - w.name = "Terra Incognita"; + w.Name = this.name.Text; + if(w.Name==null || w.Name.Length==0) + w.Name = "Terra Incognita"; //! w.name = "ななしさん"; return w; // TODO: Z dimension Modified: branches/FreeTrainSDL/core/contributions/road/AbstractRoadContributionImpl.cs =================================================================== --- branches/FreeTrainSDL/core/contributions/road/AbstractRoadContributionImpl.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/contributions/road/AbstractRoadContributionImpl.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -72,7 +72,7 @@ while (true) { - if (WorldDefinition.world[here] != null) + if (WorldDefinition.World[here] != null) { TrafficVoxel v = TrafficVoxel.get(here); if (v == null) return false; // occupied @@ -269,7 +269,7 @@ voxel.road = new RoadImpl(contribution, voxel, RoadPattern.get(dirs)); } - WorldDefinition.world.onVoxelUpdated(location); + WorldDefinition.World.onVoxelUpdated(location); } /// <summary> /// Modified: branches/FreeTrainSDL/core/contributions/structs/VarHeightBuildingContribution.cs =================================================================== --- branches/FreeTrainSDL/core/contributions/structs/VarHeightBuildingContribution.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/contributions/structs/VarHeightBuildingContribution.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -179,7 +179,7 @@ public Structure create(Location baseLoc, int height, bool initiallyOwned) { Debug.Assert(canBeBuilt(baseLoc, height)); - return create(new WorldLocator(WorldDefinition.world, baseLoc), height, initiallyOwned); + return create(new WorldLocator(WorldDefinition.World, baseLoc), height, initiallyOwned); } /// <summary> @@ -190,7 +190,7 @@ for (int z = 0; z < height; z++) for (int y = 0; y < size.y; y++) for (int x = 0; x < size.x; x++) - if (WorldDefinition.world[baseLoc.x + x, baseLoc.y + y, baseLoc.z + z] != null) + if (WorldDefinition.World[baseLoc.x + x, baseLoc.y + y, baseLoc.z + z] != null) return false; return true; @@ -271,10 +271,10 @@ { Distance d = new Distance(size.x * 2 + 1, size.y * 2 + 1, maxHeight); WorldDefinition w = WorldDefinition.CreatePreviewWorld(minsizePixel, d); - int v = w.size.y - size.y - 2; - Location l = w.toXYZ((w.size.x - size.x - size.y - 1) / 2, v, 0); + int v = w.Size.y - size.y - 2; + Location l = w.toXYZ((w.Size.x - size.x - size.y - 1) / 2, v, 0); create(new WorldLocator(w, l), maxHeight, false); - l = w.toXYZ((w.size.x) / 2, v, 0); + l = w.toXYZ((w.Size.x) / 2, v, 0); create(new WorldLocator(w, l), minHeight, false); return w; } Modified: branches/FreeTrainSDL/core/controllers/AbstractControllerForm.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/AbstractControllerForm.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/AbstractControllerForm.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -36,7 +36,7 @@ /// </summary> public class AbstractControllerForm : Form { - private Point mouse_offset; + private Point mouseOffset; /// <summary> /// /// </summary> @@ -45,7 +45,7 @@ InitializeComponent(); try { - WorldDefinition.world.viewOptions.OnViewOptionChanged += new OptionChangedHandler(updatePreview); + WorldDefinition.World.viewOptions.OnViewOptionChanged += new OptionChangedHandler(UpdatePreview); } catch (NullReferenceException nre) { @@ -58,7 +58,7 @@ /// <param name="disposing"></param> protected override void Dispose(bool disposing) { - WorldDefinition.world.viewOptions.OnViewOptionChanged -= new OptionChangedHandler(updatePreview); + WorldDefinition.World.viewOptions.OnViewOptionChanged -= new OptionChangedHandler(UpdatePreview); if (disposing && components != null) components.Dispose(); base.Dispose(disposing); @@ -87,7 +87,7 @@ /// <summary> /// /// </summary> - public virtual void updatePreview() { } + public virtual void UpdatePreview() { } /// <summary> /// /// </summary> @@ -192,7 +192,7 @@ /// <param name="e"></param> protected void AbstractControllerForm_MouseDown(object sender, MouseEventArgs e) { - mouse_offset = new Point(-e.X, -e.Y); + mouseOffset = new Point(-e.X, -e.Y); } /// <summary> /// @@ -204,7 +204,7 @@ if (e.Button == MouseButtons.Left) { Point mousePos = Control.MousePosition; - mousePos.Offset(mouse_offset.X, mouse_offset.Y); + mousePos.Offset(mouseOffset.X, mouseOffset.Y); this.Location = mousePos; } } Modified: branches/FreeTrainSDL/core/controllers/AbstractControllerImpl.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/AbstractControllerImpl.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/AbstractControllerImpl.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -42,6 +42,7 @@ public AbstractControllerImpl() { } + /// <summary> /// /// </summary> @@ -96,19 +97,19 @@ /// <summary> /// /// </summary> - public virtual MapOverlay overlay { get { return this as MapOverlay; } } + public virtual MapOverlay Overlay { get { return this as MapOverlay; } } /// <summary> /// /// </summary> - public virtual void onAttached() { } + public virtual void OnAttached() { } /// <summary> /// /// </summary> - public virtual void onDetached() + public virtual void OnDetached() { // redraw the entire surface to erase any left-over from this controller - WorldDefinition.world.onAllVoxelUpdated(); + WorldDefinition.World.onAllVoxelUpdated(); } /// <summary> @@ -117,7 +118,7 @@ /// <param name="source"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public virtual void onClick(MapViewWindow source, Location loc, Point ab) { } + public virtual void OnClick(MapViewWindow source, Location loc, Point ab) { } /// <summary> /// /// @@ -125,14 +126,14 @@ /// <param name="view"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public virtual void onMouseMove(MapViewWindow view, Location loc, Point ab) { } + public virtual void OnMouseMove(MapViewWindow view, Location loc, Point ab) { } /// <summary> /// /// </summary> /// <param name="source"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public virtual void onRightClick(MapViewWindow source, Location loc, Point ab) + public virtual void OnRightClick(MapViewWindow source, Location loc, Point ab) { Close(); // cancel } Modified: branches/FreeTrainSDL/core/controllers/AbstractLineController.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/AbstractLineController.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/AbstractLineController.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -53,7 +53,7 @@ /// <summary> /// /// </summary> - public override void updatePreview() + public override void UpdatePreview() { if (this.picture.Image != null) this.picture.Image.Dispose(); @@ -217,14 +217,14 @@ /// <param name="view"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public override void onMouseMove(MapViewWindow view, Location loc, Point ab) + public override void OnMouseMove(MapViewWindow view, Location loc, Point ab) { if (anchor != UNPLACED && isPlacing && currentPos != loc) { if (currentPos != UNPLACED) - WorldDefinition.world.onVoxelUpdated(Cube.createInclusive(anchor, currentPos)); + WorldDefinition.World.onVoxelUpdated(Cube.createInclusive(anchor, currentPos)); currentPos = align(loc); - WorldDefinition.world.onVoxelUpdated(Cube.createInclusive(anchor, currentPos)); + WorldDefinition.World.onVoxelUpdated(Cube.createInclusive(anchor, currentPos)); } } /// <summary> @@ -233,7 +233,7 @@ /// <param name="source"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public override void onClick(MapViewWindow source, Location loc, Point ab) + public override void OnClick(MapViewWindow source, Location loc, Point ab) { if (anchor == UNPLACED) { @@ -254,7 +254,7 @@ else // remove existing ones type.remove(anchor, loc); - WorldDefinition.world.onVoxelUpdated(Cube.createInclusive(anchor, loc)); + WorldDefinition.World.onVoxelUpdated(Cube.createInclusive(anchor, loc)); } anchor = UNPLACED; } @@ -265,7 +265,7 @@ /// <param name="source"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public override void onRightClick(MapViewWindow source, Location loc, Point ab) + public override void OnRightClick(MapViewWindow source, Location loc, Point ab) { if (anchor == UNPLACED) Close(); // cancel @@ -273,7 +273,7 @@ { // cancel the anchor if (currentPos != UNPLACED) - WorldDefinition.world.onVoxelUpdated(Cube.createInclusive(anchor, currentPos)); + WorldDefinition.World.onVoxelUpdated(Cube.createInclusive(anchor, currentPos)); anchor = UNPLACED; } } @@ -307,7 +307,7 @@ this.buttonPlace.Width = ((this.picture.Left + this.picture.Width)) / 2; this.buttonRemove.Left = (this.buttonPlace.Left + this.buttonPlace.Width); this.buttonRemove.Width = this.buttonPlace.Width; - updatePreview(); + UpdatePreview(); } Modified: branches/FreeTrainSDL/core/controllers/ControllerHostForm.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/ControllerHostForm.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/ControllerHostForm.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -53,7 +53,7 @@ public ControllerHostForm() { InitializeComponent(); - WorldDefinition.world.viewOptions.OnViewOptionChanged += new OptionChangedHandler(updatePreview); + WorldDefinition.World.viewOptions.OnViewOptionChanged += new OptionChangedHandler(updatePreview); siteImpl = new ControllerSiteImpl(this); } /// <summary> @@ -84,7 +84,7 @@ /// <param name="disposing"></param> protected override void Dispose(bool disposing) { - WorldDefinition.world.viewOptions.OnViewOptionChanged -= new OptionChangedHandler(updatePreview); + WorldDefinition.World.viewOptions.OnViewOptionChanged -= new OptionChangedHandler(updatePreview); if (disposing && components != null) components.Dispose(); base.Dispose(disposing); Modified: branches/FreeTrainSDL/core/controllers/CubeSelectorController.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/CubeSelectorController.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/CubeSelectorController.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -83,7 +83,7 @@ /// <summary> /// /// </summary> - public virtual MapOverlay overlay + public virtual MapOverlay Overlay { get { @@ -123,7 +123,7 @@ /// <param name="view"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public virtual void onClick(MapViewWindow view, Location loc, Point ab) + public virtual void OnClick(MapViewWindow view, Location loc, Point ab) { onSelected(Cube.createExclusive(loc, size)); } @@ -133,7 +133,7 @@ /// <param name="source"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public virtual void onRightClick(MapViewWindow source, Location loc, Point ab) + public virtual void OnRightClick(MapViewWindow source, Location loc, Point ab) { onCanceled(); } @@ -143,9 +143,9 @@ /// <param name="view"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public virtual void onMouseMove(MapViewWindow view, Location loc, Point ab) + public virtual void OnMouseMove(MapViewWindow view, Location loc, Point ab) { - WorldDefinition w = WorldDefinition.world; + WorldDefinition w = WorldDefinition.World; if (location != loc) { @@ -159,14 +159,14 @@ /// <summary> /// /// </summary> - public virtual void onAttached() { } + public virtual void OnAttached() { } /// <summary> /// /// </summary> - public virtual void onDetached() + public virtual void OnDetached() { // redraw the entire surface to erase any left-over from this controller - WorldDefinition.world.onAllVoxelUpdated(); + WorldDefinition.World.onAllVoxelUpdated(); } /// <summary> /// Modified: branches/FreeTrainSDL/core/controllers/Disambiguators.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/Disambiguators.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/Disambiguators.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -47,7 +47,7 @@ if (RailRoad.get(loc) != null) return true; // or if we hit the ground - if (WorldDefinition.world.getGroundLevel(loc) >= loc.z) return true; + if (WorldDefinition.World.getGroundLevel(loc) >= loc.z) return true; return false; } @@ -71,7 +71,7 @@ /// <returns></returns> public bool isSelectable(Location loc) { - return loc.z == WorldDefinition.world.getGroundLevel(loc); + return loc.z == WorldDefinition.World.getGroundLevel(loc); } } Modified: branches/FreeTrainSDL/core/controllers/LocationStore.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/LocationStore.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/LocationStore.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -48,10 +48,10 @@ set { if (loc != Location.UNPLACED) - WorldDefinition.world.onVoxelUpdated(loc); + WorldDefinition.World.onVoxelUpdated(loc); loc = value; if (loc != Location.UNPLACED) - WorldDefinition.world.onVoxelUpdated(loc); + WorldDefinition.World.onVoxelUpdated(loc); } } } Modified: branches/FreeTrainSDL/core/controllers/ModalController.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/ModalController.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/ModalController.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -42,31 +42,31 @@ /// <param name="source">sender of the event.</param> /// <param name="loc">(X,Y,Z) location that was clicked</param> /// <param name="ab">(A,B) location that was clicked.</param> - void onClick(MapViewWindow source, Location loc, Point ab); + void OnClick(MapViewWindow source, Location loc, Point ab); /// <summary> /// /// </summary> /// <param name="source"></param> /// <param name="loc"></param> /// <param name="ab"></param> - void onRightClick(MapViewWindow source, Location loc, Point ab); + void OnRightClick(MapViewWindow source, Location loc, Point ab); /// <summary> /// /// </summary> /// <param name="source"></param> /// <param name="loc"></param> /// <param name="ab"></param> - void onMouseMove(MapViewWindow source, Location loc, Point ab); + void OnMouseMove(MapViewWindow source, Location loc, Point ab); /// <summary> /// Called when the controller gets activated. /// </summary> - void onAttached(); + void OnAttached(); /// <summary> /// Called when the controller gets deactivated. /// </summary> - void onDetached(); + void OnDetached(); // /// <summary> // /// Closes the controller. A host uses this method to close @@ -87,6 +87,6 @@ /// <summary> /// If this controller needs to modify the map view, return non-null value. /// </summary> - MapOverlay overlay { get; } + MapOverlay Overlay { get; } } } Modified: branches/FreeTrainSDL/core/controllers/PointSelectorController.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/PointSelectorController.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/PointSelectorController.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -96,17 +96,17 @@ /// <summary> /// /// </summary> - public virtual void onAttached() + public virtual void OnAttached() { } /// <summary> /// /// </summary> - public virtual void onDetached() + public virtual void OnDetached() { // clear the remaining image if (currentPos != Location.UNPLACED) - WorldDefinition.world.onVoxelUpdated(currentPos); + WorldDefinition.World.onVoxelUpdated(currentPos); } /// <summary> /// @@ -114,12 +114,12 @@ /// <param name="source"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public virtual void onMouseMove(MapViewWindow source, Location loc, Point ab) + public virtual void OnMouseMove(MapViewWindow source, Location loc, Point ab) { if (currentPos != Location.UNPLACED) - WorldDefinition.world.onVoxelUpdated(currentPos); + WorldDefinition.World.onVoxelUpdated(currentPos); currentPos = loc; - WorldDefinition.world.onVoxelUpdated(currentPos); + WorldDefinition.World.onVoxelUpdated(currentPos); onSelectionChanged(currentPos); } @@ -129,7 +129,7 @@ /// <param name="source"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public void onRightClick(MapViewWindow source, Location loc, Point ab) + public void OnRightClick(MapViewWindow source, Location loc, Point ab) { close(); } @@ -139,7 +139,7 @@ /// <param name="source"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public void onClick(MapViewWindow source, Location loc, Point ab) + public void OnClick(MapViewWindow source, Location loc, Point ab) { onLocationSelected(loc); } @@ -164,7 +164,7 @@ /// <summary> /// /// </summary> - public virtual MapOverlay overlay + public virtual MapOverlay Overlay { get { Modified: branches/FreeTrainSDL/core/controllers/RectSelectorController.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/RectSelectorController.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/RectSelectorController.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -87,7 +87,7 @@ /// <summary> /// /// </summary> - public virtual MapOverlay overlay + public virtual MapOverlay Overlay { get { @@ -154,7 +154,7 @@ /// <param name="view"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public virtual void onClick(MapViewWindow view, Location loc, Point ab) + public virtual void OnClick(MapViewWindow view, Location loc, Point ab) { if (anchor == UNPLACED) { @@ -172,14 +172,14 @@ /// <param name="source"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public virtual void onRightClick(MapViewWindow source, Location loc, Point ab) + public virtual void OnRightClick(MapViewWindow source, Location loc, Point ab) { if (anchor == UNPLACED) onCanceled(); else { // cancel the anchor - WorldDefinition.world.onAllVoxelUpdated(); + WorldDefinition.World.onAllVoxelUpdated(); anchor = UNPLACED; } } @@ -189,9 +189,9 @@ /// <param name="view"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public virtual void onMouseMove(MapViewWindow view, Location loc, Point ab) + public virtual void OnMouseMove(MapViewWindow view, Location loc, Point ab) { - WorldDefinition w = WorldDefinition.world; + WorldDefinition w = WorldDefinition.World; if (anchor != UNPLACED && currentLoc != loc) { @@ -205,14 +205,14 @@ /// <summary> /// /// </summary> - public virtual void onAttached() { } + public virtual void OnAttached() { } /// <summary> /// /// </summary> - public virtual void onDetached() + public virtual void OnDetached() { // redraw the entire surface to erase any left-over from this controller - WorldDefinition.world.onAllVoxelUpdated(); + WorldDefinition.World.onAllVoxelUpdated(); } /// <summary> /// Modified: branches/FreeTrainSDL/core/controllers/land/LandPropertyController.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/land/LandPropertyController.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/land/LandPropertyController.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -254,19 +254,19 @@ { for (int y = loc1.y; y <= loc2.y; y++) { - Voxel v = WorldDefinition.world[x, y, z]; + Voxel v = WorldDefinition.World[x, y, z]; if (v != null && !v.entity.isOwned && v.entity.isSilentlyReclaimable) { // remove the old structure if possible AccountGenre.Subsidiaries.Spend(v.entity.entityValue); v.entity.remove(); } - v = WorldDefinition.world[x, y, z]; + v = WorldDefinition.World[x, y, z]; if (v == null) { // buy it - AccountGenre.Subsidiaries.Spend(WorldDefinition.world.landValue[new Location(x, y, z)]); + AccountGenre.Subsidiaries.Spend(WorldDefinition.World.landValue[new Location(x, y, z)]); new LandPropertyVoxel(new Location(x, y, z)); } } @@ -288,18 +288,18 @@ { for (int y = loc1.y; y <= loc2.y; y++) { - Voxel v = WorldDefinition.world[x, y, z]; + Voxel v = WorldDefinition.World[x, y, z]; if (v != null && !v.entity.isOwned && v.entity.isSilentlyReclaimable) { // cost for removing this structure if (s.add(v.entity)) r += v.entity.entityValue; } - v = WorldDefinition.world[x, y, z]; + v = WorldDefinition.World[x, y, z]; if (v == null) // cost for the land - r += WorldDefinition.world.landValue[new Location(x, y, z)]; + r += WorldDefinition.World.landValue[new Location(x, y, z)]; } } return r; @@ -317,7 +317,7 @@ { for (int y = loc1.y; y <= loc2.y; y++) { - LandPropertyVoxel v = WorldDefinition.world[x, y, z] as LandPropertyVoxel; + LandPropertyVoxel v = WorldDefinition.World[x, y, z] as LandPropertyVoxel; if (v != null) { AccountGenre.Subsidiaries.Earn(v.landPrice); @@ -341,7 +341,7 @@ { for (int y = loc1.y; y <= loc2.y; y++) { - LandPropertyVoxel v = WorldDefinition.world[x, y, z] as LandPropertyVoxel; + LandPropertyVoxel v = WorldDefinition.World[x, y, z] as LandPropertyVoxel; if (v != null) r += v.landPrice; } Modified: branches/FreeTrainSDL/core/controllers/rail/PlatformController.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/rail/PlatformController.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/rail/PlatformController.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -241,7 +241,7 @@ this.dirS.Left = this.dirE.Left; this.dirS.Top = this.dirN.Top + this.dirN.Height + 5; this.dirW.Top = this.dirS.Top; - updatePreview(); + UpdatePreview(); } private void updatePlatformBox(object sender, PictureBox pic) @@ -287,9 +287,9 @@ /// <param name="view"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public override void onMouseMove(MapViewWindow view, Location loc, Point ab) + public override void OnMouseMove(MapViewWindow view, Location loc, Point ab) { - WorldDefinition w = WorldDefinition.world; + WorldDefinition w = WorldDefinition.World; if (baseLoc != loc) { @@ -319,7 +319,7 @@ loc2 += direction.right90; // for the attached rail road, width is two } } - WorldDefinition.world.onVoxelUpdated(Cube.createExclusive(baseLoc, loc2)); + WorldDefinition.World.onVoxelUpdated(Cube.createExclusive(baseLoc, loc2)); } /// <summary> @@ -328,14 +328,14 @@ /// <param name="view"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public override void onClick(MapViewWindow view, Location loc, Point ab) + public override void OnClick(MapViewWindow view, Location loc, Point ab) { switch (currentMode) { case Mode.Station: if (isPlacing) { - if (!selectedStation.canBeBuilt(loc, ControlMode.player)) + if (!selectedStation.canBeBuilt(loc, ControlMode.Player)) { MainWindow.showError(Translation.GetString("CONSTRUCTION_CANNOT_BUILD")); } @@ -524,7 +524,7 @@ /// <summary> /// /// </summary> - public override void updatePreview() + public override void UpdatePreview() { if (this.currentMode == Mode.Station) onStationChanged(null, null); @@ -546,10 +546,10 @@ /// <summary> /// /// </summary> - public override void onDetached() + public override void OnDetached() { // TODO: update voxels correctly - WorldDefinition.world.onAllVoxelUpdated(); + WorldDefinition.World.onAllVoxelUpdated(); } private void onLengthChanged(object sender, EventArgs e) @@ -629,7 +629,7 @@ } alphaSprites = new AlphaBlendSpriteSet(alphas); - WorldDefinition.world.onAllVoxelUpdated(); // completely redraw the window + WorldDefinition.World.onAllVoxelUpdated(); // completely redraw the window } private void onModeChanged(object sender, System.EventArgs e) Modified: branches/FreeTrainSDL/core/controllers/rail/RailRoadController.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/rail/RailRoadController.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/rail/RailRoadController.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -78,13 +78,13 @@ this.Text = Translation.GetString("CONTROLLER_RAIL_TOOLTIP"); this.lblTitle.Text = Translation.GetString("CONTROLLER_RAIL_TITLE"); - updatePreview(); + UpdatePreview(); } /// <summary> /// /// </summary> - public override void updatePreview() + public override void UpdatePreview() { /*using( PreviewDrawer drawer = new PreviewDrawer( picture.Size, new Size(1,10), 0 ) ) { @@ -136,7 +136,7 @@ /// <param name="source"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public override void onClick(MapViewWindow source, Location loc, Point ab) + public override void OnClick(MapViewWindow source, Location loc, Point ab) { if (anchor == UNPLACED) { @@ -150,12 +150,12 @@ if (isPlacing) { // build new railroads. - if (!SingleRailRoad.build(anchor, loc)) + if (!SingleRailRoad.Build(anchor, loc)) MainWindow.showError(Translation.GetString("CONTROLLER_RAIL_OBSTACLES")); } else // remove existing ones - SingleRailRoad.remove(anchor, loc); + SingleRailRoad.Remove(anchor, loc); } anchor = UNPLACED; } @@ -169,7 +169,7 @@ /// <param name="source"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public override void onRightClick(MapViewWindow source, Location loc, Point ab) + public override void OnRightClick(MapViewWindow source, Location loc, Point ab) { if (anchor == UNPLACED) Close(); // cancel @@ -177,7 +177,7 @@ { // cancel the anchor if (currentPos != UNPLACED) - WorldDefinition.world.onVoxelUpdated(Cube.createInclusive(anchor, currentPos)); + WorldDefinition.World.onVoxelUpdated(Cube.createInclusive(anchor, currentPos)); anchor = UNPLACED; updateDialog(); } @@ -201,30 +201,30 @@ /// <param name="view"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public override void onMouseMove(MapViewWindow view, Location loc, Point ab) + public override void OnMouseMove(MapViewWindow view, Location loc, Point ab) { if (anchor != UNPLACED && isPlacing && currentPos != loc) { // update the screen if (currentPos != UNPLACED) - WorldDefinition.world.onVoxelUpdated(Cube.createInclusive(anchor, currentPos)); + WorldDefinition.World.onVoxelUpdated(Cube.createInclusive(anchor, currentPos)); currentPos = loc; - WorldDefinition.world.onVoxelUpdated(Cube.createInclusive(anchor, currentPos)); + WorldDefinition.World.onVoxelUpdated(Cube.createInclusive(anchor, currentPos)); int cost; - SingleRailRoad.comupteRoute(anchor, currentPos, out cost); + SingleRailRoad.ComputeRoute(anchor, currentPos, out cost); costBox.cost = cost; } if (anchor != UNPLACED && !isPlacing) { - costBox.cost = SingleRailRoad.calcCostOfRemoving(anchor, loc); + costBox.cost = SingleRailRoad.CalcCostOfRemoving(anchor, loc); } } /// <summary> /// /// </summary> - public override void onDetached() + public override void OnDetached() { anchor = UNPLACED; } @@ -270,7 +270,7 @@ if (anchor != UNPLACED && isPlacing) { int cost; - canvas.Tag = SingleRailRoad.comupteRoute(anchor, currentPos, out cost); + canvas.Tag = SingleRailRoad.ComputeRoute(anchor, currentPos, out cost); if (canvas.Tag != null) Debug.WriteLine(((IDictionary)canvas.Tag).Count); } @@ -291,7 +291,7 @@ RailPattern rp = (RailPattern)dic[loc]; if (rp != null) { - for (int j = WorldDefinition.world.getGroundLevel(loc); j < loc.z; j++) + for (int j = WorldDefinition.World.getGroundLevel(loc); j < loc.z; j++) // TODO: ground level handling BridgePierVoxel.defaultSprite.drawAlpha( canvas.surface, Modified: branches/FreeTrainSDL/core/controllers/rail/SlopeRailRoadController.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/rail/SlopeRailRoadController.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/rail/SlopeRailRoadController.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -78,12 +78,12 @@ pictureW.Tag = Direction.get(6); update(pictureN, pictureN); // select N first - updatePreview(); + UpdatePreview(); } /// <summary> /// /// </summary> - public override void updatePreview() + public override void UpdatePreview() { PreviewDrawer drawer; @@ -322,7 +322,7 @@ /// <param name="source"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public override void onClick(MapViewWindow source, Location loc, Point ab) + public override void OnClick(MapViewWindow source, Location loc, Point ab) { if (isPlacing) { @@ -388,7 +388,7 @@ else { // it is always allowed to place it on or under ground - if (WorldDefinition.world.getGroundLevel(loc) >= loc.z) + if (WorldDefinition.World.getGroundLevel(loc) >= loc.z) return true; // if the new rail road is at the edge of existing rail, @@ -418,7 +418,7 @@ /// <param name="source"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public override void onMouseMove(MapViewWindow source, Location loc, Point ab) + public override void OnMouseMove(MapViewWindow source, Location loc, Point ab) { if (lastMouse != loc) { @@ -441,7 +441,7 @@ loc2.y += direction.offsetY * 3; loc2.z++; - WorldDefinition.world.onVoxelUpdated(Cube.createInclusive(lastMouse, loc2)); + WorldDefinition.World.onVoxelUpdated(Cube.createInclusive(lastMouse, loc2)); } /// <summary> @@ -481,7 +481,7 @@ { if (i == 2) loc.z++; - for (int j = WorldDefinition.world.getGroundLevel(loc); j < Z; j++) + for (int j = WorldDefinition.World.getGroundLevel(loc); j < Z; j++) // TODO: ground level handling BridgePierVoxel.defaultSprite.drawAlpha( canvas, view.fromXYZToClient(loc.x, loc.y, j)); Modified: branches/FreeTrainSDL/core/controllers/rail/StationPassagewayController.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/rail/StationPassagewayController.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/rail/StationPassagewayController.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -241,9 +241,9 @@ /// <param name="view"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public override void onMouseMove(MapViewWindow view, Location loc, Point ab) + public override void OnMouseMove(MapViewWindow view, Location loc, Point ab) { - WorldDefinition w = WorldDefinition.world; + WorldDefinition w = WorldDefinition.World; if (isStair) { @@ -267,7 +267,7 @@ /// <param name="view"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public override void onClick(MapViewWindow view, Location loc, Point ab) + public override void OnClick(MapViewWindow view, Location loc, Point ab) { if (isStair) { @@ -313,14 +313,14 @@ /// <param name="source"></param> /// <param name="loc"></param> /// <param name="ab"></param> - public override void onRightClick(MapViewWindow source, Location loc, Point ab) + public override void OnRightClick(MapViewWindow source, Location loc, Point ab) { if (anchor == UNPLACED || isStair) Close(); // cancel else { // cancel the anchor - WorldDefinition.world.onAllVoxelUpdated(); + WorldDefinition.World.onAllVoxelUpdated(); anchor = UNPLACED; } } @@ -393,7 +393,7 @@ if (loc == loc2) { // TODO: correctly updated voxels - WorldDefinition.world.onAllVoxelUpdated(); + WorldDefinition.World.onAllVoxelUpdated(); return; } } @@ -412,7 +412,7 @@ ThinPlatform.RailRoadImpl rr = ThinPlatform.RailRoadImpl.get(loc1); - if (WorldDefinition.world[loc1] == null // unused voxel == can be used in any way + if (WorldDefinition.World[loc1] == null // unused voxel == can be used in any way || (rr != null && Direction.angle(rr.direction, dd) == 2)) { // orthogonal platform. Modified: branches/FreeTrainSDL/core/controllers/rail/TrainControllerDialog.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/rail/TrainControllerDialog.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/rail/TrainControllerDialog.cs 2008-03-25 22:19:30 UTC (rev 289) @@ -69,7 +69,7 @@ // refresh the list list.BeginUpdate(); list.Items.Clear(); - foreach (TrainController tc in WorldDefinition.world.trainControllers) + foreach (TrainController tc in WorldDefinition.World.trainControllers) { if (tc.contribution == null) continue; // those are system controllers list.Items.Add(createListViewItem(tc)); @@ -276,7 +276,7 @@ TrainController tc = contrib.newController( string.Format("New diagram{0}", iota++)); //! string.Format("新しいダイヤグラム{0}",iota++)); - WorldDefinition.world.trainControllers.add(tc); + WorldDefinition.World.trainControllers.add(tc); // update GUI list.Items.Add(createListViewItem(tc)); @@ -302,7 +302,7 @@ { // update data structure // TODO: what will happen to trains that are controlled by this train controller? - WorldDefinition.world.trainControllers.remove(selectedItem); + WorldDefinition.World.trainControllers.remove(selectedItem); // update GUI list.Items.Remove(list.SelectedItems[0]); Modified: branches/FreeTrainSDL/core/controllers/rail/TrainPlacementController.cs =================================================================== --- branches/FreeTrainSDL/core/controllers/rail/TrainPlacementController.cs 2008-03-25 20:30:47 UTC (rev 288) +++ branches/FreeTrainSDL/core/controllers/r... [truncated message content] |