Mercurial > hg > ristipolku
annotate game/Piece.java @ 91:cc96bc955db6
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 03 Mar 2011 18:02:23 +0200 |
parents | e9fab3c96043 |
children | d5f51370617b |
rev | line source |
---|---|
1 | 1 /* |
2 * Ristipolku | |
3 * (C) Copyright 2011 Matti 'ccr' Hämäläinen <ccr@tnsp.org> | |
4 */ | |
5 package game; | |
6 | |
7 import java.awt.*; | |
7 | 8 import java.awt.geom.*; |
1 | 9 import java.util.*; |
6 | 10 import java.math.*; |
1 | 11 |
12 | |
13 public class Piece | |
14 { | |
32
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
15 public enum RotateDir { LEFT, RIGHT } |
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
16 |
3 | 17 static final int numConnections = 8; |
85
e9fab3c96043
Make piece rotation animation a bit faster.
Matti Hamalainen <ccr@tnsp.org>
parents:
58
diff
changeset
|
18 static final float maxTime = 35.0f; |
9 | 19 |
3 | 20 int currRotation; |
21 int[] connections; | |
40 | 22 boolean[] states; |
32
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
23 PieceType type, prevType; |
1 | 24 |
3 | 25 boolean rotationChanged, rotationActive, |
9 | 26 typeChanged, typeActive, |
40 | 27 stateChanged, stateActive; |
6 | 28 |
91 | 29 float currAngle, newAngle, |
30 rotationTime, rotationSpeed, | |
31 typeTime, throbTime; | |
32 | |
7 | 33 Interpolate lerpRotation; |
1 | 34 |
32
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
35 |
3 | 36 public Piece(PieceType ptype) |
37 { | |
38 // Initialize | |
39 connections = new int[numConnections]; | |
40 | 40 states = new boolean[numConnections]; |
3 | 41 type = ptype; |
1 | 42 |
3 | 43 rotationChanged = false; |
6 | 44 rotationActive = false; |
45 currRotation = 0; | |
46 currAngle = 0; | |
47 | |
3 | 48 typeChanged = false; |
49 typeActive = false; | |
1 | 50 |
32
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
51 throbTime = 0; |
1 | 52 |
53 | |
3 | 54 // Initialize connections between endpoints of the paths inside the piece |
55 for (int i = 0; i < numConnections; i++) | |
56 connections[i] = -1; | |
1 | 57 |
26
3d4cc47df31a
Cleanups, fix piece rendering and rotation.
Matti Hamalainen <ccr@tnsp.org>
parents:
21
diff
changeset
|
58 |
6 | 59 // Randomize connections in the piece |
3 | 60 Random rnd = new Random(); |
61 for (int i = 0; i < numConnections; i++) | |
62 { | |
63 while (connections[i] < 0) | |
64 { | |
65 int tmp = rnd.nextInt(numConnections); | |
26
3d4cc47df31a
Cleanups, fix piece rendering and rotation.
Matti Hamalainen <ccr@tnsp.org>
parents:
21
diff
changeset
|
66 if (tmp != i && connections[tmp] < 0) |
3 | 67 { |
68 connections[i] = tmp; | |
69 connections[tmp] = i; | |
70 } | |
71 } | |
72 } | |
73 } | |
74 | |
75 public Piece() | |
76 { | |
77 this(PieceType.NONE); | |
78 } | |
1 | 79 |
3 | 80 public void setType(PieceType ptype) |
81 { | |
32
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
82 typeChanged = (prevType != ptype); |
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
83 prevType = type; |
3 | 84 type = ptype; |
85 } | |
1 | 86 |
40 | 87 public void clearStates() |
88 { | |
89 for (int i = 0; i < numConnections; i++) | |
90 states[i] = false; | |
91 stateChanged = true; | |
92 } | |
93 | |
94 public int getRotatedPoint(int in) | |
3 | 95 { |
42
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
96 int point = (in - (currRotation * 2)) % 8; |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
97 if (point < 0) point = 8 + point; |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
98 return point; |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
99 } |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
100 |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
101 public int getAntiRotatedPoint(int in) |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
102 { |
40 | 103 int point = (in + (currRotation * 2)) % 8; |
104 if (point < 0) point = 8 + point; | |
105 return point; | |
106 } | |
42
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
107 |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
108 public int getMatchingPoint(int point) |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
109 { |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
110 switch (point) |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
111 { |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
112 case 0: return 5; |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
113 case 1: return 4; |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
114 |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
115 case 2: return 7; |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
116 case 3: return 6; |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
117 |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
118 case 4: return 1; |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
119 case 5: return 0; |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
120 |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
121 case 6: return 3; |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
122 case 7: return 2; |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
123 } |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
124 return -1; |
951a4d669af0
Initially working path solving algorithm.
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
125 } |
37 | 126 |
40 | 127 public void setConnectionState(int point, boolean state) |
128 { | |
129 states[point] = state; | |
130 states[connections[point]] = state; | |
131 stateChanged = true; | |
132 } | |
133 | |
134 public int getConnection(int point) | |
135 { | |
136 return connections[point]; | |
3 | 137 } |
32
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
138 |
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
139 public void rotate(RotateDir dir) |
3 | 140 { |
6 | 141 // Only normal |
142 if (type != PieceType.LOCKED && type != PieceType.ACTIVE) | |
3 | 143 return; |
1 | 144 |
32
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
145 currRotation = (currRotation + (dir == RotateDir.RIGHT ? 1 : -1)) % 4; |
11 | 146 newAngle = (float) ((currRotation * Math.PI) / 2.0f); |
26
3d4cc47df31a
Cleanups, fix piece rendering and rotation.
Matti Hamalainen <ccr@tnsp.org>
parents:
21
diff
changeset
|
147 lerpRotation = new Interpolate(newAngle, currAngle, maxTime); |
3 | 148 rotationChanged = true; |
5 | 149 } |
1 | 150 |
7 | 151 public Point2D getPointCoords(float x, float y, float dim, int index) |
5 | 152 { |
7 | 153 float ox = 0, oy = 0; |
154 float step = dim / 10; | |
1 | 155 |
5 | 156 switch (index) { |
34
6f6c551cc14c
Fix piece connections rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
32
diff
changeset
|
157 // Normal line starting and ending points |
32
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
158 case 0: ox = 3.0f; oy = 0.4f; break; |
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
159 case 1: ox = 7.0f; oy = 0.4f; break; |
39 | 160 |
32
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
161 case 2: ox = 9.6f; oy = 3.0f; break; |
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
162 case 3: ox = 9.6f; oy = 7.0f; break; |
39 | 163 |
32
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
164 case 4: ox = 7.0f; oy = 9.6f; break; |
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
165 case 5: ox = 3.0f; oy = 9.6f; break; |
39 | 166 |
32
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
167 case 6: ox = 0.4f; oy = 7.0f; break; |
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
168 case 7: ox = 0.4f; oy = 3.0f; break; |
1 | 169 |
39 | 170 |
34
6f6c551cc14c
Fix piece connections rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
32
diff
changeset
|
171 // Matching control points for each point above (+8) |
39 | 172 case 8: ox = 3.0f; oy = 2.5f; break; |
173 case 9: ox = 7.0f; oy = 2.5f; break; | |
174 | |
175 case 10: ox = 7.5f; oy = 3.0f; break; | |
176 case 11: ox = 7.5f; oy = 7.0f; break; | |
177 | |
178 case 12: ox = 7.0f; oy = 7.5f; break; | |
179 case 13: ox = 3.0f; oy = 7.5f; break; | |
180 | |
181 case 14: ox = 2.5f; oy = 7.0f; break; | |
182 case 15: ox = 2.5f; oy = 3.0f; break; | |
5 | 183 } |
1 | 184 |
7 | 185 return new Point2D.Float(x + ox * step, y + oy * step); |
5 | 186 } |
32
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
187 |
27 | 188 public PieceType getType() |
189 { | |
190 return type; | |
191 } | |
9 | 192 |
7 | 193 public void animate(float time) |
5 | 194 { |
195 if (rotationChanged) | |
196 { | |
197 rotationTime = time; | |
198 rotationActive = true; | |
7 | 199 rotationChanged = false; |
54 | 200 rotationSpeed = 0.5f; |
201 } | |
202 | |
203 if (typeChanged && type == PieceType.LOCKED) | |
204 { | |
205 rotationSpeed = 1.0f; | |
5 | 206 } |
1 | 207 |
5 | 208 if (rotationActive) |
209 { | |
54 | 210 float t = (time - rotationTime) * rotationSpeed; |
11 | 211 |
9 | 212 if (t < maxTime) |
7 | 213 currAngle = lerpRotation.getValue(t); |
214 else | |
215 { | |
216 currAngle = newAngle; | |
217 rotationActive = false; | |
218 } | |
5 | 219 } |
54 | 220 |
6 | 221 if (typeChanged) |
222 { | |
223 typeTime = time; | |
224 typeActive = true; | |
7 | 225 typeChanged = false; |
6 | 226 } |
227 | |
228 if (typeActive) | |
229 { | |
230 } | |
231 | |
40 | 232 if (stateChanged) |
9 | 233 { |
234 } | |
235 | |
32
e480579cc460
More work on debugging the path resolving.
Matti Hamalainen <ccr@tnsp.org>
parents:
30
diff
changeset
|
236 throbTime = (time % 100) / 100.0f; |
5 | 237 } |
1 | 238 |
7 | 239 public void paint(Graphics2D g, float x, float y, float dim) |
5 | 240 { |
58
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
241 AffineTransform save = g.getTransform(); |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
242 |
45 | 243 // Transform drawing by current angle |
11 | 244 g.rotate(currAngle, x + dim / 2.0f, y + dim / 2.0f); |
1 | 245 |
45 | 246 // Color piece by type |
5 | 247 switch (type) { |
58
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
248 case LOCKED: g.setPaint(new Color(0.3f, 0.8f, 0.3f, 0.35f)); break; |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
249 case ACTIVE: g.setPaint(new Color(0.9f, 0.3f, 0.3f, 0.35f)); break; |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
250 case START: g.setPaint(new Color(1.0f, 0.8f, 0.0f, 0.95f)); break; |
5 | 251 } |
6 | 252 |
7 | 253 g.fill(new RoundRectangle2D.Float(x, y, dim, dim, dim / 10, dim / 10)); |
1 | 254 |
45 | 255 // Start pieces (center piece) do not have border, etc. |
58
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
256 if (type != PieceType.START) |
5 | 257 { |
58
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
258 // Active piece has a throbbing "ghost" border |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
259 if (type == PieceType.ACTIVE) |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
260 { |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
261 float offs1 = throbTime * 10.0f, |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
262 offs2 = throbTime * 20.0f; |
27 | 263 |
58
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
264 g.setPaint(new Color(0.0f, 0.0f, 0.0f, (float) (1.0f - throbTime) )); |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
265 g.setStroke(new BasicStroke(2.0f + throbTime * 2.0f)); |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
266 g.draw(new RoundRectangle2D.Float( |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
267 x - offs1, y - offs1, |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
268 dim + offs2, dim + offs2, |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
269 dim / 10, dim / 10)); |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
270 } |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
271 |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
272 // Draw piece border |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
273 g.setPaint(new Color(0.0f, 0.0f, 0.0f, 0.6f)); |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
274 g.setStroke(new BasicStroke(5.0f)); |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
275 g.draw(new RoundRectangle2D.Float(x, y, dim, dim, dim / 10, dim / 10)); |
1 | 276 |
58
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
277 // Draw the connections |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
278 g.setStroke(new BasicStroke(5.5f)); |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
279 CubicCurve2D curve = new CubicCurve2D.Float(); |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
280 boolean[] drawn = new boolean[numConnections]; |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
281 for (int i = 0; i < numConnections; i++) |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
282 if (!drawn[i]) |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
283 { |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
284 Point2D start, cp1, cp2, end; |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
285 boolean isActive = states[i] || states[connections[i]]; |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
286 |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
287 g.setPaint(isActive ? Color.white : Color.black); |
9 | 288 |
58
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
289 start = getPointCoords(x, y, dim, i); |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
290 end = getPointCoords(x, y, dim, connections[i]); |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
291 cp1 = getPointCoords(x, y, dim, i + 8); |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
292 cp2 = getPointCoords(x, y, dim, connections[i] + 8); |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
293 |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
294 curve.setCurve(start, cp1, cp2, end); |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
295 g.draw(curve); |
34
6f6c551cc14c
Fix piece connections rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
32
diff
changeset
|
296 |
58
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
297 // Mark connection drawn, so we don't overdraw |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
298 drawn[i] = true; |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
299 drawn[connections[i]] = true; |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
300 } |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
301 |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
302 } // !PieceType.START |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
303 |
cde170f2f980
Clean up the piece rendering.
Matti Hamalainen <ccr@tnsp.org>
parents:
54
diff
changeset
|
304 g.setTransform(save); |
5 | 305 } |
1 | 306 } |