+static int cheat_arg = 0;
+static void check_cheat_keys(void)
+{
+ int i;
+
+ if (!kbd_ctrl_pressed)
+ return;
+
+ for (i = 0; i < 10; i++) {
+ if (old_key[KEY_0 + i] == 1) {
+ cheat_arg = cheat_arg * 10 + i;
+ goto ok;
+ }
+ }
+
+ if (old_key[KEY_C] == 1)
+ goto done;
+
+ if (docked)
+ return;
+
+ if (old_key[KEY_S] == 1) {
+ if (cheat_arg < NO_OF_SHIPS) {
+ int un = create_other_ship(cheat_arg);
+ if (un != -1)
+ universe[un].flags |= FLG_TARGET;
+ goto done;
+ }
+ }
+
+ if (old_key[KEY_D] == 1) {
+ game_paused = 0;
+ snd_play_sample (SND_DOCK);
+ dock_player();
+ current_screen = SCR_BREAK_PATTERN;
+ goto done;
+ }
+
+ return;
+done:
+ cheat_arg = 0;
+ok:
+ snd_play_sample(SND_BEEP);
+ return;
+}