+
+/*
+ * 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();
+ setwnd(srscan_window);
+ wmove(curwnd, 0, 0);
+ enqueue("no");
+ srscan(SCAN_FULL);
+ if (l != 2) {
+ 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();
+ }
+ }
+}
+
+static void put_srscan_sym(int x, int y, char sym)
+{
+ wmove(srscan_window, x+1, y*2+2);
+ waddch(srscan_window, sym);
+ wrefresh(srscan_window);
+}
+
+void boom(int ii, int jj)
+/* enemy fall down, go boom */
+{
+ if (game.options & OPTION_CURSES) {
+ drawmaps(2);
+ setwnd(srscan_window);
+ wattron(srscan_window, A_REVERSE);
+ put_srscan_sym(ii, jj, game.quad[ii][jj]);
+ sound(500);
+ delay(1000);
+ nosound();
+ wattroff(srscan_window, A_REVERSE);
+ put_srscan_sym(ii, jj, game.quad[ii][jj]);
+ delay(500);
+ setwnd(message_window);
+ }
+}
+
+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 ix, int iy, int l, int i, int n)
+/* 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 ", ix, iy);
+ } else {
+ if (game.damage[DSRSENS]==0 || condit==IHDOCKED) {
+ if (i != 1 && l == 1) {
+ drawmaps(2);
+ delay(400);
+ }
+ if ((game.quad[ix][iy]==IHDOT)||(game.quad[ix][iy]==IHBLANK)){
+ put_srscan_sym(ix, iy, '+');
+ sound(l*10);
+ delay(100);
+ nosound();
+ put_srscan_sym(ix, iy, game.quad[ix][iy]);
+ }
+ else {
+ wattron(curwnd, A_REVERSE);
+ put_srscan_sym(ix, iy, game.quad[ix][iy]);
+ sound(500);
+ delay(1000);
+ nosound();
+ wattroff(curwnd, A_REVERSE);
+ put_srscan_sym(ix, iy, game.quad[ix][iy]);
+ }
+ } else {
+ proutn("%d - %d ", ix, iy);
+ }
+ }
+}
+
+void makechart(void)
+{
+ if (game.options & OPTION_CURSES) {
+ setwnd(message_window);
+ wclear(message_window);
+ chart(0);
+ }
+}
+
+void setpassword(void)
+{
+ if (!(game.options & OPTION_CURSES)) {
+ while (TRUE) {
+ scan();
+ strcpy(game.passwd, citem);
+ chew();
+ if (*game.passwd != 0) break;
+ proutn("Please type in a secret password-");
+ }
+ } else {
+ int i;
+ for(i=0;i<3;i++) game.passwd[i]=(char)(97+(int)(Rand()*25));
+ game.passwd[3]=0;
+ }
+}
+