-
Notifications
You must be signed in to change notification settings - Fork 0
/
Launcher.pde
74 lines (73 loc) · 1.65 KB
/
Launcher.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import java.util.ArrayDeque;
import java.util.Map;
Engine engine;
Screen screen;
State state;
PImage prev;
long prevtap=millis();
ArrayList<String> chrs=new ArrayList<String>();
int avchr;
PImage bg;
ArrayDeque<Module> modstack=new ArrayDeque<Module>();
HashMap<String,Module> mods=new HashMap<String,Module>();
HashMap<String,PImage> imdata=new HashMap<String,PImage>();
HashMap<String,Float> nvars=new HashMap<String,Float>();
HashMap<String,String> vars=new HashMap<String,String>();
color cbg=0;
void setup() {
opPriority.put("=",0);
opPriority.put("!=",0);
opPriority.put("|",1);
opPriority.put("&",2);
opPriority.put(">",3);
opPriority.put("<",3);
opPriority.put("<=",3);
opPriority.put(">=",3);
opPriority.put("+",4);
opPriority.put("-",4);
opPriority.put("*",5);
opPriority.put("/",5);
opPriority.put("%",5);
nvars.put("PI",PI);
//loadData();
screen=new Menu();
prev=createImage(width,height,RGB);
}
void draw() {
screen.upd();
if (millis()-prevtap<200) {
tint(255,255*50/(millis()-prevtap));
image(prev,0,0);
}
tint(255,255);
textAlign(CENTER,CENTER);
fill(0,120);
noStroke();
rect(20,20,200,80,20);
fill(255,210);
textSize(40);
text("FPS: "+int(frameRate),20,20,200,80);
}
void mousePressed() {
prev=get();
prevtap=millis();
screen.mPressed();
}
@Override
public void onBackPressed() {
screen.bPressed();
}
void setbg(PImage im) {
bg=im;
bg.resize(width,height);
}
/*void loadData() {
for (String name:new File(
sketchPath("")).list()) {
String naml=name.toLowerCase();
if (naml.endsWith(".png")||
naml.endsWith(".jpg")) {
imdata.put(name,loadImage(name));
}
}
}*/