-
Notifications
You must be signed in to change notification settings - Fork 0
/
loadSprites.pde
139 lines (139 loc) · 5.37 KB
/
loadSprites.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
void loadSprites(){
//materials
//base
sprites.put("nonMetalM",new PImage[7]);
for (int i = 6; i >= 0; i--){
sprites.get("nonMetalM")[i] = loadImage("sprites/material/nonMetal/base/"+nf(i,3)+".png");
}
sprites.put("metalM",new PImage[3]);
for (int i = 2; i >= 0; i--){
sprites.get("metalM")[i] = loadImage("sprites/material/metal/base/"+nf(i,3)+".png");
}
//high
sprites.put("metalHighM",new PImage[3]);
for (int i = 2; i >= 0; i--){
sprites.get("metalHighM")[i] = loadImage("sprites/material/metal/highlight/"+nf(i,3)+".png");
}
sprites.put("nonMetalHighM",new PImage[7]);
for (int i = 6; i >= 0; i--){
sprites.get("nonMetalHighM")[i] = loadImage("sprites/material/nonMetal/highlight/"+nf(i,3)+".png");
}
//ores
sprites.put("blockO",new PImage[10]);
for (int i = 9; i >= 0; i--){
sprites.get("blockO")[i] = loadImage("sprites/ore/block/"+nf(i,3)+ ".png");
}
//base
sprites.put("nonMetalO",new PImage[7]);
for (int i = 6; i >= 0; i--){
sprites.get("nonMetalO")[i] = loadImage("sprites/ore/nonMetal/base/"+nf(i,3)+ ".png");
}
sprites.put("metalO",new PImage[3]);
for (int i = 2; i >= 0; i--){
sprites.get("metalO")[i] = loadImage("sprites/ore/metal/base/"+nf(i,3)+ ".png");
}
//highlight
sprites.put("nonMetalHighO",new PImage[7]);
for (int i = 6; i >= 0; i--){
sprites.get("nonMetalHighO")[i] = loadImage("sprites/ore/nonMetal/highlight/"+nf(i,3)+ ".png");
}
sprites.put("metalHighO",new PImage[3]);
for (int i = 2; i >= 0; i--){
sprites.get("metalHighO")[i] = loadImage("sprites/ore/metal/highlight/"+nf(i,3)+ ".png");
}
//tools
//handle
sprites.put("handleT",new PImage[5]);
for (int i = 4; i >= 0; i--){
sprites.get("handleT")[i] = loadImage("sprites/tool/handle/"+nf(i,3)+ ".png");
}
//sword
//base
sprites.put("swordT",new PImage[4]);
for (int i = 3; i >= 0; i--){
sprites.get("swordT")[i] = loadImage("sprites/tool/sword/base/"+nf(i,3)+ ".png");
}
//highlight
sprites.put("swordHighT",new PImage[4]);
for (int i = 3; i >= 0; i--){
sprites.get("swordHighT")[i] = loadImage("sprites/tool/sword/highlight/"+nf(i,3)+ ".png");
}
//pickaxe
//base
sprites.put("pickT",new PImage[4]);
for (int i = 3; i >= 0; i--){
sprites.get("pickT")[i] = loadImage("sprites/tool/pickaxe/base/"+nf(i,3)+ ".png");
}
//highlight
sprites.put("pickHighT",new PImage[4]);
for (int i = 3; i >= 0; i--){
sprites.get("pickHighT")[i] = loadImage("sprites/tool/pickaxe/highlight/"+nf(i,3)+ ".png");
}
//shovel
//base
sprites.put("shovelT",new PImage[4]);
for (int i = 3; i >= 0; i--){
sprites.get("shovelT")[i] = loadImage("sprites/tool/shovel/base/"+nf(i,3)+ ".png");
}
//highlight
sprites.put("shovelHighT",new PImage[4]);
for (int i = 3; i >= 0; i--){
sprites.get("shovelHighT")[i] = loadImage("sprites/tool/shovel/highlight/"+nf(i,3)+ ".png");
}
//axe
//base
sprites.put("axeT",new PImage[4]);
for (int i = 3; i >= 0; i--){
sprites.get("axeT")[i] = loadImage("sprites/tool/axe/base/"+nf(i,3)+ ".png");
}
//highlight
sprites.put("axeHighT",new PImage[4]);
for (int i = 3; i >= 0; i--){
sprites.get("axeHighT")[i] = loadImage("sprites/tool/axe/highlight/"+nf(i,3)+ ".png");
}
//hoe
//base
sprites.put("hoeT",new PImage[4]);
for (int i = 3; i >= 0; i--){
sprites.get("hoeT")[i] = loadImage("sprites/tool/hoe/base/"+nf(i,3)+ ".png");
}
//highlight
sprites.put("hoeHighT",new PImage[4]);
for (int i = 3; i >= 0; i--){
sprites.get("hoeHighT")[i] = loadImage("sprites/tool/hoe/highlight/"+nf(i,3)+ ".png");
}
//blocks
//material block
//base
sprites.put("materialB",new PImage[9]);
for (int i = 8; i >= 0; i--){
sprites.get("materialB")[i] = loadImage("sprites/block/material/base/"+nf(i,3)+ ".png");
}
//highlight
sprites.put("materialHighB",new PImage[9]);
for (int i = 8; i >= 0; i--){
sprites.get("materialHighB")[i] = loadImage("sprites/block/material/highlight/"+nf(i,3)+ ".png");
}
//decor block
//base
sprites.put("decorB",new PImage[14]);
for (int i = 13; i >= 0; i--){
sprites.get("decorB")[i] = loadImage("sprites/block/decor/base/"+nf(i,3)+ ".png");
}
//highlight
sprites.put("decorHighB",new PImage[14]);
for (int i = 13; i >= 0; i--){
sprites.get("decorHighB")[i] = loadImage("sprites/block/decor/highlight/"+nf(i,3)+ ".png");
}
//light block
//base
sprites.put("lightB",new PImage[3]);
for (int i = 2; i >= 0; i--){
sprites.get("lightB")[i] = loadImage("sprites/block/light/base/"+nf(i,3)+ ".png");
}
//highlight
sprites.put("lightHighB",new PImage[3]);
for (int i = 2; i >= 0; i--){
sprites.get("lightHighB")[i] = loadImage("sprites/block/light/highlight/"+nf(i,3)+ ".png");
}
}