Subversion Repositories HelenOS-historic

Rev

Rev 1528 | Rev 1533 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1528 Rev 1532
Line 157... Line 157...
157
        Cols = ws.ws_col;
157
        Cols = ws.ws_col;
158
    }
158
    }
159
    if (Rows < MINROWS || Cols < MINCOLS) {
159
    if (Rows < MINROWS || Cols < MINCOLS) {
160
        char smallscr[55];
160
        char smallscr[55];
161
 
161
 
162
        (void)snprintf(smallscr, sizeof(smallscr),
162
        snprintf(smallscr, sizeof(smallscr),
163
            "the screen is too small (must be at least %dx%d)",
163
            "the screen is too small (must be at least %dx%d)",
164
            MINROWS, MINCOLS);
164
            MINROWS, MINCOLS);
165
        stop(smallscr);
165
        stop(smallscr);
166
    }
166
    }
167
    isset = 1;
167
    isset = 1;
Line 201... Line 201...
201
    /* always leave cursor after last displayed point */
201
    /* always leave cursor after last displayed point */
202
    curscreen[D_LAST * B_COLS - 1] = -1;
202
    curscreen[D_LAST * B_COLS - 1] = -1;
203
 
203
 
204
    if (score != curscore) {
204
    if (score != curscore) {
205
        moveto(0, 0);
205
        moveto(0, 0);
206
        (void) printf("Score: %d", score);
206
        printf("Score: %d", score);
207
        curscore = score;
207
        curscore = score;
208
    }
208
    }
209
 
209
 
210
    /* draw preview of next pattern */
210
    /* draw preview of next pattern */
211
    if (showpreview && (nextshape != lastshape)) {
211
    if (showpreview && (nextshape != lastshape)) {
Line 249... Line 249...
249
        for (i = 0; i < B_COLS; bp++, sp++, i++) {
249
        for (i = 0; i < B_COLS; bp++, sp++, i++) {
250
            if (*sp == (so = *bp))
250
            if (*sp == (so = *bp))
251
                continue;
251
                continue;
252
            *sp = so;
252
            *sp = so;
253
            if (i != ccol) {
253
            if (i != ccol) {
-
 
254
                if (cur_so) {
-
 
255
                    resume_normal();
-
 
256
                    cur_so = 0;
-
 
257
                }
254
                moveto(RTOD(j), CTOD(i));
258
                moveto(RTOD(j), CTOD(i));
255
            }
259
            }
256
            if (so != cur_so) {
260
            if (so != cur_so) {
257
                if (so)
261
                if (so)
258
                    start_standout();
262
                    start_standout();
259
                else
263
                else
260
                    resume_normal();
264
                    resume_normal();
261
                cur_so = so;
265
                cur_so = so;
262
            }
266
            }
263
            putstr("  ");
267
            putstr("  ");
-
 
268
 
264
            ccol = i + 1;
269
            ccol = i + 1;
265
            /*
270
            /*
266
             * Look ahead a bit, to avoid extra motion if
271
             * Look ahead a bit, to avoid extra motion if
267
             * we will be redrawing the cell after the next.
272
             * we will be redrawing the cell after the next.
268
             * Motion probably takes four or more characters,
273
             * Motion probably takes four or more characters,
Line 279... Line 284...
279
                sp[2] = -1;
284
                sp[2] = -1;
280
                sp[1] = -1;
285
                sp[1] = -1;
281
            }
286
            }
282
        }
287
        }
283
    }
288
    }
-
 
289
    if (cur_so)
284
    resume_normal();
290
        resume_normal();
285
 
-
 
286
    fflush();
291
    fflush();
287
}
292
}
288
 
293
 
289
/*
294
/*
290
 * Write a message (set!=0), or clear the same message (set==0).
295
 * Write a message (set!=0), or clear the same message (set==0).