Changeset 29854 in osm for applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge
- Timestamp:
- 2013-08-21T03:47:16+02:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/FakeMapView.java ¶
r29210 r29854 25 25 import org.openstreetmap.josm.gui.MapView; 26 26 27 class fake_map_view extends MapView {27 class FakeMapView extends MapView { 28 28 public ProjectionBounds view_bounds; 29 29 public MapView parent; … … 36 36 public double max_east_west; 37 37 38 public fake_map_view(MapView parent, double scale) {38 public FakeMapView(MapView parent, double scale) { 39 39 super(null, null); //TODO MapView constructor contains registering listeners and other code, that probably shouldn't be called in fake map view 40 40 this.parent = parent; -
TabularUnified applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/GameWindow.java ¶
r26299 r29854 62 62 63 63 this.ground = ground; 64 ground_view = new fake_map_view(Main.map.mapView, 0.0000001);64 ground_view = new FakeMapView(Main.map.mapView, 0.0000001); 65 65 66 66 /* Retrieve start position */ … … 474 474 } 475 475 476 protected class sprite_pos implements Comparable { 476 protected class sprite_pos implements Comparable<sprite_pos> { 477 477 double dist; 478 478 … … 483 483 } 484 484 485 public int compareTo(Object x) { 486 sprite_pos other = (sprite_pos) x; 487 return (int) ((other.dist - this.dist) * 1000000.0); 485 public int compareTo(sprite_pos x) { 486 return (int) ((x.dist - this.dist) * 1000000.0); 488 487 } 489 488 } … … 700 699 } 701 700 } 702 protected fake_map_view ground_view;701 protected FakeMapView ground_view; 703 702 } -
TabularUnified applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/WMSRacer.java ¶
r26174 r29854 9 9 10 10 import org.openstreetmap.josm.gui.layer.Layer; 11 import org.openstreetmap.josm.gui.MapView; 11 12 import org.openstreetmap.josm.gui.MapView.LayerChangeListener; 12 13 import org.openstreetmap.josm.gui.MapFrame; … … 95 96 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { 96 97 if (oldFrame != null) 97 oldFrame.mapView.removeLayerChangeListener(this);98 MapView.removeLayerChangeListener(this); 98 99 99 100 driveAction.frame = newFrame; … … 101 102 102 103 if (newFrame != null) 103 newFrame.mapView.addLayerChangeListener(this);104 MapView.addLayerChangeListener(this); 104 105 } 105 106
Note:
See TracChangeset
for help on using the changeset viewer.