diff options
author | Thomas Huth <thuth@linux.vnet.ibm.com> | 2012-01-11 12:21:13 +0100 |
---|---|---|
committer | Thomas Huth <thuth@linux.vnet.ibm.com> | 2012-01-11 12:25:05 +0100 |
commit | 3a88b69f2f88bf427b54ae5f0f76c64e7f1803d8 (patch) | |
tree | 96bb0dd78cb16567ad779d4d11feef736c3c8f0b /slof/fs/fbuffer.fs | |
parent | c1394c3d2a8af1b64dd677f3b572236109fe453d (diff) | |
download | SLOF-3a88b69f2f88bf427b54ae5f0f76c64e7f1803d8.zip SLOF-3a88b69f2f88bf427b54ae5f0f76c64e7f1803d8.tar.gz SLOF-3a88b69f2f88bf427b54ae5f0f76c64e7f1803d8.tar.bz2 |
Fixed problem in framebuffer code when erasing or inserting characters.
When erasing characters or when inserting characters in the middle of a line,
the framebuffer code did not correctly calculate the line width, since it was
not taking the bit depth into account yet.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Diffstat (limited to 'slof/fs/fbuffer.fs')
-rw-r--r-- | slof/fs/fbuffer.fs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/slof/fs/fbuffer.fs b/slof/fs/fbuffer.fs index ebd6af7..b0a467c 100644 --- a/slof/fs/fbuffer.fs +++ b/slof/fs/fbuffer.fs @@ -135,11 +135,14 @@ CREATE bitmap-buffer 400 4 * allot fb8-columns2bytes swap fb8-columns2bytes tuck - over r@ tuck + rot char-height 0 ?DO 3dup rmove - -rot screen-width tuck + -rot + swap rot + -rot screen-width screen-depth * tuck + -rot + swap rot LOOP 3drop r> THEN - char-height 0 ?DO dup 2 pick fb8-erase-block screen-width + LOOP 2drop + char-height 0 ?DO + dup 2 pick fb8-erase-block screen-width screen-depth * + + LOOP + 2drop ; : fb8-delete-characters ( n -- ) @@ -150,11 +153,14 @@ CREATE bitmap-buffer 400 4 * allot fb8-columns2bytes swap fb8-columns2bytes tuck - over r@ + 2dup + r> swap >r rot char-height 0 ?DO 3dup rmove - -rot screen-width tuck + -rot + swap rot + -rot screen-width screen-depth * tuck + -rot + swap rot LOOP 3drop r> over - THEN - char-height 0 ?DO dup 2 pick fb8-erase-block screen-width + LOOP 2drop + char-height 0 ?DO + dup 2 pick fb8-erase-block screen-width screen-depth * + + LOOP + 2drop ; : fb8-reset-screen ( -- ) ( Left as no-op by design ) ; |