private void calculateScreenPosition(int x, int height, int y) {
		if (x < 128 || y < 128 || x > 13056 || y > 13056) {
			spriteDrawX = -1;
			spriteDrawY = -1;
			return;
		}
		int z = getFloorDrawHeight(plane, y, x) - height;
		x -= cameraPositionX;
		z -= cameraPositionZ;
		y -= cameraPositionY;
		int sineHorizontal = Model.SINE[cameraVerticalRotation];
		int cosineHorizontal = Model.COSINE[cameraVerticalRotation];
		int sineVertical = Model.SINE[cameraHorizontalRotation];
		int cosineVertical = Model.COSINE[cameraHorizontalRotation];
		int temp = y * sineVertical + x * cosineVertical >> 16;
		y = y * cosineVertical - x * sineVertical >> 16;
		x = temp;
		temp = z * cosineHorizontal - y * sineHorizontal >> 16;
		y = z * sineHorizontal + y * cosineHorizontal >> 16;
		z = temp;
		if (y >= 50) {
			spriteDrawX = Rasterizer.centreX + (x << 9) / y;
			spriteDrawY = Rasterizer.centreY + (z << 9) / y;
		} else {
			spriteDrawX = -1;
			spriteDrawY = -1;
		}
	}