@Override
	public void setTMMoves(List<Integer> moveIndexes) {
		int offset = romEntry.getValue("TMMovesOffset");
		for (int i = 1; i <= 50; i++) {
			rom[offset + (i - 1)] = (byte) moveNumToRomTable[moveIndexes
					.get(i - 1)];
		}

		// Gym Leader TM Moves (RB only)
		if (!romEntry.isYellow) {
			int[] tms = new int[] { 34, 11, 24, 21, 6, 46, 38, 27 };
			int glMovesOffset = romEntry.getValue("GymLeaderMovesTableOffset");
			for (int i = 0; i < tms.length; i++) {
				// Set the special move used by gym (i+1) to
				// the move we just wrote to TM tms[i]
				rom[glMovesOffset + i * 2] = (byte) moveNumToRomTable[moveIndexes
						.get(tms[i] - 1)];
			}
		}

		// TM Text
		String[] moveNames = readMoveNames();
		for (TMTextEntry tte : romEntry.tmTexts) {
			String moveName = moveNames[moveNumToRomTable[moveIndexes
					.get(tte.number - 1)]];
			String text = tte.template.replace("%m", moveName);
			writeFixedLengthScriptString(text, tte.offset,
					lengthOfStringAt(tte.offset));
		}
	}