diff options
Diffstat (limited to 'tomorrowthegroundGUI')
| -rw-r--r-- | tomorrowthegroundGUI/data/indexmapV1.gif | bin | 0 -> 3233 bytes | |||
| -rw-r--r-- | tomorrowthegroundGUI/tomorrowthegroundGUI.pde | 24 |
2 files changed, 20 insertions, 4 deletions
diff --git a/tomorrowthegroundGUI/data/indexmapV1.gif b/tomorrowthegroundGUI/data/indexmapV1.gif Binary files differnew file mode 100644 index 0000000..3fcc16f --- /dev/null +++ b/tomorrowthegroundGUI/data/indexmapV1.gif diff --git a/tomorrowthegroundGUI/tomorrowthegroundGUI.pde b/tomorrowthegroundGUI/tomorrowthegroundGUI.pde index 0fe919e..b359409 100644 --- a/tomorrowthegroundGUI/tomorrowthegroundGUI.pde +++ b/tomorrowthegroundGUI/tomorrowthegroundGUI.pde @@ -1,15 +1,19 @@ import hypermedia.net.*; -PImage bgmap; +PImage[] bgmaps; +int usemap; UDP udp; int x,y; float lat1,lng1,lat2,lng2,fw,fh; void setup() { - bgmap = loadImage("gentmap.png"); + bgmaps=new PImage[2]; + bgmaps[0] = loadImage("gentmap.png"); + bgmaps[1] = loadImage("indexmapV1.gif"); + usemap=0; size(bgmap.width,bgmap.height); - frameRate(30); + frameRate(15); udp = new UDP(this); x=width/2; y=height/2; @@ -23,7 +27,7 @@ void setup() void draw() { - background(bgmap); + background(bgmaps[usemap]); fill(255); stroke(255,0,0); ellipse(x,y,5,5); @@ -39,3 +43,15 @@ void mouseDragged() udp.send(((fy*fh)+lat2)+","+((fx*fw)+lng1)+"\n","127.0.0.1",5400); } } + +void keyPressed() { + switch(key) { + case '0': + usemap=0; + break; + case '1': + usemap=1; + break; + } +} + |
