Changeset 10569b1 in mainline for console/screenbuffer.c
- Timestamp:
- 2006-06-02T08:44:26Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1180a88e
- Parents:
- df688cd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
console/screenbuffer.c
rdf688cd r10569b1 44 44 field->style = scr->style; 45 45 46 scr->position_x++;47 if (scr->position_x == scr->size_x) {48 scr->position_x = 0;49 scr->position_y++;50 if (scr->position_y == scr->size_y) {51 /* scroll */52 scr->position_y--;53 screenbuffer_clear_line(scr, scr->top_line++);54 }55 }56 57 46 return 1; 58 47 } … … 66 55 scr->size_x = size_x; 67 56 scr->size_y = size_y; 68 scr->position_y = 0;69 scr->position_x = 0;70 57 scr->style.fg_color = DEFAULT_FOREGROUND_COLOR; 71 58 scr->style.bg_color = DEFAULT_BACKGROUND_COLOR; 72 scr->top_line = 0; 59 60 screenbuffer_clear(scr); 61 73 62 return scr; 74 63 } … … 78 67 unsigned int i; 79 68 80 for (i = 0; i < scr->size_x * scr->size_y; i++) {69 for (i = 0; i < (scr->size_x * scr->size_y); i++) { 81 70 scr->buffer[i].character = ' '; 82 71 scr->buffer[i].style = scr->style; … … 114 103 { 115 104 scr->position_x = x % scr->size_x; 116 scr->position_y = (y + scr->top_line)% scr->size_y;105 scr->position_y = y % scr->size_y; 117 106 } 118 107
Note:
See TracChangeset
for help on using the changeset viewer.