- Timestamp:
- 2006-06-01T21:51:35Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- da0c91e7
- Parents:
- 3993b3d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fb/fb.c
r3993b3d rc1d2c9d 269 269 270 270 /** Invert character at given position */ 271 static void invert_char(int vp,unsigned int col, unsigned int row)271 static void invert_char(int vp,unsigned int row, unsigned int col) 272 272 { 273 273 unsigned int x; … … 334 334 viewports[i].fgcolor = DEFAULT_FGCOLOR; 335 335 336 viewports[i].cur_col = 0; 337 viewports[i].cur_row = 0; 338 viewports[i].cursor_active = 0; 339 336 340 viewports[i].initialized = 1; 337 341 … … 416 420 } 417 421 418 static void draw_char(int vp, char c, unsigned int col, unsigned int row)422 static void draw_char(int vp, char c, unsigned int row, unsigned int col) 419 423 { 420 424 viewport_t *vport = &viewports[vp]; 421 425 422 426 if (vport->cursor_active && (vport->cur_col != col || vport->cur_row != row)) 423 invert_char(vp, vport->cur_ col,vport->cur_row);424 425 draw_glyph(vp, c, col, row);426 427 if (vport->cursor_active) {428 vport->cur_col++;429 if (vport->cur_col>= vport->cols) { 430 vport->cur_col = 0;431 vport->cur_row++;432 if (vport->cur_row >= vport->rows)433 vport->cur_row--;434 }435 invert_char(vp, vport->cur_col,vport->cur_row);427 invert_char(vp, vport->cur_row, vport->cur_col); 428 429 draw_glyph(vp, c, row, col); 430 431 vport->cur_col = col; 432 vport->cur_row = row; 433 434 vport->cur_col++; 435 if (vport->cur_col>= vport->cols) { 436 vport->cur_col = 0; 437 vport->cur_row++; 438 if (vport->cur_row >= vport->rows) 439 vport->cur_row--; 436 440 } 441 if (vport->cursor_active) 442 invert_char(vp, vport->cur_row, vport->cur_col); 437 443 } 438 444 … … 481 487 clear_port(vp); 482 488 if (vport->cursor_active) 483 invert_char(vp, vport->cur_ col,vport->cur_row);489 invert_char(vp, vport->cur_row, vport->cur_col); 484 490 retval = 0; 485 491 break; … … 493 499 retval = 0; 494 500 if (viewports[vp].cursor_active) { 495 invert_char(vp, vport->cur_ col,vport->cur_row);496 invert_char(vp, col, row);501 invert_char(vp, vport->cur_row, vport->cur_col); 502 invert_char(vp, row, col); 497 503 } 498 504 vport->cur_col = col; … … 506 512 507 513 vport->cursor_active = i; 508 invert_char(vp, vport->cur_ col,vport->cur_row);514 invert_char(vp, vport->cur_row, vport->cur_col); 509 515 break; 510 516 case FB_GET_CSIZE: … … 518 524 } 519 525 if (vport->cursor_active) 520 invert_char(vp, vport->cur_ col,vport->cur_row);526 invert_char(vp, vport->cur_row, vport->cur_col); 521 527 scroll_port(vp, i); 522 528 if (vport->cursor_active) 523 invert_char(vp, vport->cur_ col,vport->cur_row);529 invert_char(vp, vport->cur_row, vport->cur_col); 524 530 retval = 0; 525 531 break;
Note:
See TracChangeset
for help on using the changeset viewer.