Start pulling SERGEEV dependencies out of sst.c.
[super-star-trek.git] / sst.c
diff --git a/sst.c b/sst.c
index eb7c8f6cb4303edc7ab08b4b85bbf35c12332adf..c8824af5c8d48fc514cb7e5f129635d2bd2490e4 100644 (file)
--- a/sst.c
+++ b/sst.c
@@ -170,21 +170,6 @@ static void listCommands(int x) {
        if (x) prout("   HELP");
 }
 
-#ifdef SERGEEV
-void setwnd(short wndnum){
-     int cury;
-     cury=wherey()+wnds[curwnd].wndtop-wnds[wndnum].wndtop;
-     if ((curwnd==0)&&(wndnum!=0)) clrscr();
-     window(wnds[wndnum].wndleft, wnds[wndnum].wndtop, wnds[wndnum].wndright, wnds[wndnum].wndbottom);
-     if ((curwnd==wndnum)&&(cury>wnds[wndnum].wndbottom-wnds[wndnum].wndtop+1)){
-        gotoxy(wnds[wndnum].wndright-wnds[wndnum].wndleft+1,wnds[wndnum].wndbottom-wnds[wndnum].wndtop+1);
-       skip(1);
-     }
-     curwnd=wndnum;
-     gotoxy(1,cury);
-}
-#endif /* SERGEEV */
-
 static void helpme(void) {
        int i, j;
        char cmdbuf[32], *cp;
@@ -227,8 +212,11 @@ static void helpme(void) {
        fp = fopen(SSTDOC, "r");
        if (fp == NULL) {
                prout("Spock-  \"Captain, that information is missing from the");
-               prout("   computer. You need to find SST.DOC and put it in the");
-               prout("   current directory.\"");
+               prout("   computer.\"");
+               /*
+                * This used to continue: "You need to find SST.DOC and put 
+                * it in the current directory."
+                */
                return;
        }
        for (;;) {
@@ -258,8 +246,9 @@ static void helpme(void) {
        fclose(fp);
 }
 
+void drawmaps(short l) {
+/* hook to be called after moving to redraw maps */
 #ifdef SERGEEV
-void drawmaps(short l){
      _setcursortype(_NOCURSOR);
      if (l==1) sensor();
      if (l!=2) setwnd(1);
@@ -276,8 +265,8 @@ void drawmaps(short l){
         lrscan();
         _setcursortype(_NORMALCURSOR);
      }
-}
 #endif /* SERGEEV */
+}
 
 static void makemoves(void) {
        int i, hitme;
@@ -286,9 +275,7 @@ static void makemoves(void) {
         setwnd(4);
 #endif /* SERGEEV */
        while (TRUE) { /* command loop */
-#ifdef SERGEEV
                 drawmaps(1);
-#endif /* SERGEEV */
                 while (TRUE)  { /* get a command */
                        hitme = FALSE;
                        justin = 0;