private void drawFlames() {
		drawingFlames = true;
		try {
			long startTime = System.currentTimeMillis();
			int currentLoop = 0;
			int interval = 20;
			while (currentlyDrawingFlames) {
				flameCycle++;
				calcFlamesPosition();
				calcFlamesPosition();
				doFlamesDrawing();
				if (++currentLoop > 10) {
					long currentTime = System.currentTimeMillis();
					int difference = (int) (currentTime - startTime) / 10
							- interval;
					interval = 40 - difference;
					if (interval < 5)
						interval = 5;
					currentLoop = 0;
					startTime = currentTime;
				}
				try {
					Thread.sleep(interval);
				} catch (Exception _ex) {
				}
			}
		} catch (Exception _ex) {
		}
		drawingFlames = false;
	}