CD_f
(List<String> args)
| 101 | * CD_f |
| 102 | */ |
| 103 | private static void CD_f(List<String> args) { |
| 104 | |
| 105 | String command; |
| 106 | |
| 107 | if (args.size() < 2) |
| 108 | return; |
| 109 | |
| 110 | command = args.get(1); |
| 111 | |
| 112 | if (command.equalsIgnoreCase("on")) { |
| 113 | enabled = true; |
| 114 | return; |
| 115 | } |
| 116 | |
| 117 | if (command.equalsIgnoreCase("off")) { |
| 118 | if (playing) |
| 119 | Stop(); |
| 120 | enabled = false; |
| 121 | return; |
| 122 | } |
| 123 | |
| 124 | if (command.equalsIgnoreCase("reset")) { |
| 125 | enabled = true; |
| 126 | if (playing) |
| 127 | Stop(); |
| 128 | |
| 129 | //for (n = 0; n < 100; n++) |
| 130 | // CDAudio.remap[n] = n; |
| 131 | |
| 132 | GetAudioDiskInfo(); |
| 133 | return; |
| 134 | } |
| 135 | |
| 136 | if (command.equalsIgnoreCase("remap")) { |
| 137 | //ret = Cmd.Argc() - 2; |
| 138 | //if (ret <= 0) { |
| 139 | // for (n = 1; n < 100; n++) |
| 140 | // if (remap[n] != n) |
| 141 | // Com_Printf(" %u -> %u\n", n, remap[n]); |
| 142 | // return; |
| 143 | //} |
| 144 | //for (n = 1; n <= ret; n++) |
| 145 | // remap[n] = atoi(Cmd_Argv (n+1)); |
| 146 | return; |
| 147 | } |
| 148 | |
| 149 | if (command.equalsIgnoreCase("close")) { |
| 150 | CloseDoor(); |
| 151 | return; |
| 152 | } |
| 153 | |
| 154 | if (!cdValid) { |
| 155 | GetAudioDiskInfo(); |
| 156 | if (!cdValid) { |
| 157 | Com.Printf("Audio CD (MP3s) No CD in player.\n"); |
| 158 | return; |
| 159 | } |
| 160 | } |