//create a varibable for the jpeg image BImage map; BImage man; //create an array for the number of 'zones' Zone[] zoneArray; //create a player variable Player guide; //variable for rate of speed (player) int ros; //how many zones int numZones; //array to hold different colors color[] colors; //arraya to hold different location parameters float[] xVals; float[] yVals; float[] widths; float[] heights; //array to hold song names String[] tracks; //text stuff BFont font; void setup() { size(320, 240); //map information map = loadImage("map.jpg"); image(map, 0, 0); //player info man = loadImage("man.gif"); image(man, 160, 120); //define speed ros = 2; //font setup font = loadFont("Bauhaus.vlw.gz"); //----zone setup //number of zones numZones = 10; //make an array of colors to color zones colors = new color[10]; colors[0] = color(255, 0, 0, 50); colors[1] = color(0, 255, 0, 50); colors[2] = color(0, 0, 255, 50); colors[3] = color(255, 0, 255, 50); colors[4] = color(0, 150, 0, 50); colors[5] = color(255, 255, 50, 50); colors[6] = color(200, 150, 20, 60); colors[7] = color(0, 50, 0, 50); colors[8] = color(255, 25, 85, 50); colors[9] = color(50, 50, 150, 50); float[] xVals = { 0, 100, 150, 250, 150, 200, 100, 200, 250, 0 }; float[] yVals = { 0, 100, 100, 0, 0, 0, 0, 150, 150, 100 }; float[] widths = { 100, 50, 100, 25, 50, 50, 50, 50, 90, 100 }; float[] heights = { 100, 100, 50, 100, 100, 100, 100, 190, 50 , 50 }; //write album names to an array String[] tracks = {"Kissing the Lipless", "Mine's Not A High Horse", "So Says I", "Young Pilgrims", "Saint Simon", "Fighting In A Sack", "Pink Bullets", "Turn A Square", "Gone For Good", "Those To Come"}; zoneArray = new Zone[numZones]; for (int i=0; i x && (guide.y+20) > y) { active = true; } else { active = false; } } void drawZone() { isActive(); if (active) { fill(255, 255, 255, 60); rect(x, y, w, h); //print(id); fill(255,0,0,255); textFont(font, 24); text("Track: " + id, 0, 235); } else { fill(c); rect(x, y, w, h); } } } class Player { float x, y; void drawPlayer() { image(man, x, y); } }