Start pulling SERGEEV dependencies out of sst.c.
[super-star-trek.git] / sst.c
diff --git a/sst.c b/sst.c
index 409b489520104737673bfa7bf41782906ee49f94..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;
@@ -261,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);
@@ -279,8 +265,8 @@ void drawmaps(short l){
         lrscan();
         _setcursortype(_NORMALCURSOR);
      }
-}
 #endif /* SERGEEV */
+}
 
 static void makemoves(void) {
        int i, hitme;
@@ -289,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;