File tree Expand file tree Collapse file tree 2 files changed +27
-8
lines changed Expand file tree Collapse file tree 2 files changed +27
-8
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,9 @@ pair <int, int> _w;
3232void windowsize ()
3333{
3434 _w = getWindow ();
35- WINDOW_X = _w.first - 1 , WINDOW_Y = _w.second ;
36- if (_w.first & 1 ) {WINDOW_X ++, LASTLINE = true ;}
37- else LASTLINE = false ;
35+ WINDOW_X = _w.first - 2 , WINDOW_Y = _w.second ;
36+ // if (_w.first & 1) {WINDOW_X ++, LASTLINE = true;}
37+ // else LASTLINE = false;
3838 if (WINDOW_Y & 1 ) WINDOW_Y --;
3939}
4040
@@ -191,7 +191,10 @@ void update_pos ()
191191 strcat (BOTTOM_RIGHT_INFO, inttochar (x));
192192 strcat (BOTTOM_RIGHT_INFO, " , " );
193193 strcat (BOTTOM_RIGHT_INFO, inttochar (y));
194- strcat (BOTTOM_RIGHT_INFO, " )" );
194+ strcat (BOTTOM_RIGHT_INFO, " ) H" );
195+ strcat (BOTTOM_RIGHT_INFO, inttochar (WINDOW_X));
196+ strcat (BOTTOM_RIGHT_INFO, " W" );
197+ strcat (BOTTOM_RIGHT_INFO, inttochar (WINDOW_Y));
195198}
196199
197200void allinone_protect ()
Original file line number Diff line number Diff line change @@ -97,6 +97,8 @@ inline void print (int i, int j)
9797 }
9898}
9999
100+ bool kline;
101+
100102inline void output ()
101103{
102104 printf (" :) " );
@@ -109,10 +111,20 @@ inline void output ()
109111 {
110112 wstartx = 1 , wendx = n;
111113 wwaitx = (WINDOW_X - n) >> 1 ;
114+ if ((WINDOW_X - n) & 1 )
115+ {
116+ kline = true ;
117+ // wwaitx --;
118+ } else kline = false ;
112119 }
113120 else
114121 {
115- wstartx = x - (WINDOW_X >> 1 ), wendx = WINDOW_X + wstartx - 3 ;
122+ wstartx = x - (WINDOW_X >> 1 ), wendx = WINDOW_X + wstartx - 1 ;
123+ if ((WINDOW_X) & 1 )
124+ {
125+ // kline = true;
126+ } else kline = false ;
127+ kline = false ;
116128 wwaitx = 0 ;
117129 }
118130 if (WINDOW_Y > m)
@@ -150,7 +162,7 @@ inline void output ()
150162 for (int j = 1 ; j <= wwaity; j ++) putchar (' ' );
151163 putchar (' \n ' );
152164 }
153- for (int i = 1 ; i < wwaitx; i ++) {
165+ for (int i = 1 ; i <= wwaitx; i ++) {
154166 for (int j = 1 ; j <= WINDOW_Y; j ++) putchar (' ' );
155167 putchar (' \n ' );
156168 }
@@ -161,8 +173,12 @@ inline void output ()
161173 putchar (' ' );
162174 }
163175 printf (" %s" , BOTTOM_RIGHT_INFO);
164- if (!LASTLINE) putchar (' \n ' );
165- // else for (int i = 1; i < WINDOW_Y; i ++) putchar (' ');
176+ // if (!LASTLINE) putchar ('\n');
177+ if (kline)
178+ {
179+ putchar (' \n ' );
180+ for (int i = 1 ; i < WINDOW_Y; i ++) putchar (' ' );
181+ }
166182}
167183
168184
You can’t perform that action at this time.
0 commit comments