Changeset 29854 in osm for applications/editors/josm/plugins/wms-turbo-challenge2
- Timestamp:
- 2013-08-21T03:47:16+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/wms-turbo-challenge2
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wms-turbo-challenge2/build.xml
r29435 r29854 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <!--3 ** This is a template build file for a JOSM plugin.4 **5 ** Maintaining versions6 ** ====================7 ** See README.template8 **9 ** Usage10 ** =====11 ** Call "ant help" to get possible build targets.12 **13 -->14 2 <project name="wms-turbo-challenge2" default="dist" basedir="."> 15 3 … … 17 5 <property name="commit.message" value="Commit message"/> 18 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 19 <property name="plugin.main.version" value=" 4670"/>7 <property name="plugin.main.version" value="6162"/> 20 8 21 9 <property name="plugin.author" value="Andrzej Zaborowski"/> -
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; -
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 } -
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.