annotate game/G.java @ 138:9eb791e2fa17

Optimize board updating logic, so that the old placed tiles need not to be redrawn from scratch on each screen update, as they do not change usually.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 25 Nov 2011 11:04:09 +0200
parents 792bf87886e7
children 56aea6c89203
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
75
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 package game;
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 import java.awt.*;
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 import java.awt.geom.*;
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 import java.awt.event.*;
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 import java.awt.image.*;
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 import java.awt.event.*;
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 import java.awt.font.*;
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 import javax.imageio.*;
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 import javax.swing.*;
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 import java.util.*;
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 import java.io.*;
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 import game.*;
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 import javax.sound.sampled.*;
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 public class G
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 {
130
792bf87886e7 Bump version.
Matti Hamalainen <ccr@tnsp.org>
parents: 114
diff changeset
18 public static final String version = "0.80";
105
75015dfd47ef Move version number info to G.java.
Matti Hamalainen <ccr@tnsp.org>
parents: 76
diff changeset
19
76
43f68fe605de More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 75
diff changeset
20 public static final int numFonts = 4;
75
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 public static Font fonts[];
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 public static FontMetrics metrics[];
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 public static SoundManager smgr;
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 public static Dimension screenDim;
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 public static BufferedImage lautaBG = null, lautaBGScaled = null;
b586ce4f6d97 Large GUI code cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 }