private void printStruct(Graphics2D g2d, int totalArmor) { int posY = 369; int posX = 270; int[] topColumn = new int[] {posY, posX}; int[] pipShift = new int[] {6, 6}; Vector<int[]> pipPlotter = new Vector<int[]>(132); for (int pos = 1; pos <= 32; pos++) { pipPlotter.add(new int[] {topColumn[0], topColumn[1]}); topColumn[0] += pipShift[0]; if ((pos % 8) == 0) { topColumn[1] += pipShift[1]; pipShift[0] *= -1; topColumn[0] += pipShift[0]; } } int pipSpace = (int) Math.floor(32 / totalArmor); for (int pos = 0; pos < 32; pos += pipSpace) { ImageHelperAero.drawAeroISPip(g2d, pipPlotter.get(pos)[0], pipPlotter.get(pos)[1]); if (--totalArmor <= 0) { return; } } }
private void printLeftArmor(Graphics2D g2d, int totalArmor) { float[] topColumn = new float[] {280, 165}; float[] pipShift = new float[] {7, 7}; float maxColumns = 8; Vector<float[]> pipPlotter = new Vector<float[]>(200); for (int pos = 1; pos <= 200; pos++) { pipPlotter.add(new float[] {topColumn[0], topColumn[1]}); topColumn[0] += pipShift[0]; if ((pos % maxColumns) == 0) { topColumn[1] += pipShift[1]; pipShift[0] *= -1; topColumn[0] += pipShift[0]; } } int pipSpace = 200 / totalArmor; for (int pos = 0; pos < 200; pos += pipSpace) { ImageHelperAero.drawAeroArmorPip(g2d, pipPlotter.get(pos)[0], pipPlotter.get(pos)[1]); if (--totalArmor <= 0) { return; } } }
private void printFrontArmor(Graphics2D g2d, int totalArmor) { float[] topColumn = {370, 105}; float[] pipShift = {7, 7}; float maxColumns = 8; Vector<float[]> pipPlotter = new Vector<float[]>(200); for (int pos = 1; pos <= 200; pos++) { // ImageHelperAero.drawAeroArmorPip(g2d, topColumn[0], // topColumn[1]); pipPlotter.add(new float[] {topColumn[0], topColumn[1]}); topColumn[0] += pipShift[0]; if ((pos % maxColumns) == 0) { topColumn[1] += pipShift[1]; pipShift[0] *= -1; topColumn[0] += pipShift[0]; /* * if (pos > totalArmor - maxColumns) { topColumn[0] += * pipShift[0] ((maxColumns - (totalArmor - pos)) / 2); } else { * topColumn[0] += pipShift[0] / 2; } */ } } int pipSpace = 200 / totalArmor; for (int pos = 0; pos < 200; pos += pipSpace) { ImageHelperAero.drawAeroArmorPip(g2d, pipPlotter.get(pos)[0], pipPlotter.get(pos)[1]); if (--totalArmor <= 0) { return; } } }
private void printWeaponsNEquipment(Graphics2D g2d) { ImageHelperAero.printAeroWeaponsNEquipment(smallCraft, g2d); }
private void printRightArmor(Graphics2D g2d, int totalArmor) { float[] topColumn = new float[] {430f, 325}; float[] pipShift = new float[] {6.3f, 7}; int numberPerRow = 3; int curretNumber = 0; Vector<float[]> pipPlotter = new Vector<float[]>(132); for (int pos = 1; pos < 148; pos++) { pipPlotter.add(new float[] {topColumn[0], topColumn[1]}); topColumn[0] += pipShift[0]; if (++curretNumber == numberPerRow) { topColumn[1] += pipShift[1]; pipShift[0] *= -1; curretNumber = 0; if (pos == 18) { topColumn[0] += pipShift[0] * 2; } else if (pos == 103) { numberPerRow = 13; topColumn[0] += pipShift[0] * 1.5; } else if (pos == 116) { numberPerRow = 12; topColumn[0] += pipShift[0]; } else if (pos == 128) { numberPerRow = 11; topColumn[0] += pipShift[0] * 1.5; } else if (pos == 139) { numberPerRow = 8; topColumn[0] += pipShift[0]; } else if (numberPerRow < 13) { if (numberPerRow == 7) { numberPerRow = 12; topColumn[0] += Math.abs(pipShift[0] * 4); } else if (numberPerRow == 6) { numberPerRow = 9; topColumn[0] -= pipShift[0] * 2; } else if (numberPerRow == 9) { numberPerRow = 14; } else { numberPerRow++; } if (pipShift[0] > 0) { topColumn[0] += pipShift[0]; } } else if (pipShift[0] > 0) { topColumn[0] += pipShift[0] * .8; } else if (pipShift[0] < 0) { topColumn[0] += pipShift[0] * .2; } } } int pipSpace = 148 / totalArmor; for (int pos = 0; pos < 148; pos += pipSpace) { ImageHelperAero.drawAeroArmorPip(g2d, pipPlotter.get(pos)[0], pipPlotter.get(pos)[1]); if (--totalArmor <= 0) { return; } } }