-#ifndef SERGEEV
-void getline(char *line, int max) {
-#else /* SERGEEV */
-void cgetline(char *line, int max) {
-#endif /* SERGEEV */
- if (curses) {
-#ifndef SERGEEV
- wgetnstr(stdscr, line, max);
- wrefresh(stdscr);
-#else /* SERGEEV */
- line[0]=max-1;
- cgets(line);
- memmove(line,&line[2],max-3);
-#endif /* SERGEEV */
+/*
+ * Things past this point have policy implications.
+ */
+
+void drawmaps(short l)
+/* hook to be called after moving to redraw maps */
+{
+ if (game.options & OPTION_CURSES) {
+ if (l == 1)
+ sensor();
+ if (l != 2) {
+ setwnd(srscan_window);
+ wmove(curwnd, 0, 0);
+ enqueue("no");
+ srscan(SCAN_FULL);
+ setwnd(report_window);
+ wclear(report_window);
+ wmove(report_window, 0, 0);
+ srscan(SCAN_NO_LEFTSIDE);
+ setwnd(lrscan_window);
+ wclear(lrscan_window);
+ wmove(lrscan_window, 0, 0);
+ enqueue("l");
+ lrscan();
+ }
+ }
+}
+
+void boom(int ii, int jj)
+/* enemy fall down, go boom */
+{
+ if (game.options & OPTION_CURSES) {
+ setwnd(srscan_window);
+ drawmaps(2);
+ wmove(srscan_window, ii*2+3, jj+2);
+ wattron(srscan_window, A_REVERSE);
+ waddch(srscan_window, game.quad[ii][jj]);
+ wrefresh(srscan_window);
+ sound(500);
+ delay(1000);
+ nosound();
+ wmove(srscan_window, ii*2+3, jj+2);
+ wattroff(srscan_window, A_REVERSE);
+ waddch(srscan_window, game.quad[ii][jj]);
+ wrefresh(srscan_window);
+ setwnd(message_window);
+ delay(500);
+ }
+}
+
+void warble(void)
+/* sound and visual effects for teleportation */
+{
+ if (game.options & OPTION_CURSES) {
+ drawmaps(1);
+ setwnd(message_window);
+ sound(50);
+ delay(1000);
+ nosound();
+ } else
+ prouts(" . . . . . ");
+}
+
+void tracktorpedo(int x, int y, int ix, int iy, int wait, int l, int i, int n, int iquad)
+/* torpedo-track animation */
+{
+ if (!game.options & OPTION_CURSES) {
+ if (l == 1) {
+ if (n != 1) {
+ skip(1);
+ proutn("Track for torpedo number %d- ", i);
+ }
+ else {
+ skip(1);
+ proutn("Torpedo track- ");
+ }
+ } else if (l==4 || l==9)
+ skip(1);
+ proutn("%d - %d ", (int)x, (int)y);