about summary refs log tree commit diff stats
path: root/prototypes/browse/17-file-state-broken/screen-position-state.mu
diff options
context:
space:
mode:
Diffstat (limited to 'prototypes/browse/17-file-state-broken/screen-position-state.mu')
-rw-r--r--prototypes/browse/17-file-state-broken/screen-position-state.mu50
1 files changed, 0 insertions, 50 deletions
diff --git a/prototypes/browse/17-file-state-broken/screen-position-state.mu b/prototypes/browse/17-file-state-broken/screen-position-state.mu
deleted file mode 100644
index e5767de8..00000000
--- a/prototypes/browse/17-file-state-broken/screen-position-state.mu
+++ /dev/null
@@ -1,50 +0,0 @@
-type screen-position-state {
-  nrows: int  # const
-  ncols: int  # const
-  toprow: int
-  botrow: int
-  leftcol: int
-  rightcol: int
-  row: int
-  col: int
-}
-
-fn init-screen-position-state self: (addr screen-position-state), nrows: int, ncols: int {
-  # hardcoded parameters:
-  #   top-margin
-  #   page-margin
-  #   page-width
-  var dest/eax: (addr int) <- copy 0
-  # self->nrows = nrows
-  # self->ncols = ncols
-  # self->toprow = top-margin
-  # self->botrow = nrows
-  # self->leftcol = page-margin
-  # self->rightcol = self->leftcol + page-width
-  # start-drawing(self)
-}
-
-fn start-drawing self: (addr screen-position-state) {
-  # self->row = toprow
-  # self->col = leftcol
-}
-
-fn add-char self: (addr screen-position-state), c: byte {
-  # print c
-  # self->col++
-  # if (self->col > self->rightcol) next-line(self)
-}
-
-fn next-line self: (addr screen-position-state) {
-  # self->row++
-  # if (self->row > self->botrow) next-page(self)
-}
-
-fn next-page self: (addr screen-position-state) {
-  # self->leftcol = self->rightcol + 5
-  # self->rightcol = self->leftcol + page-width
-}
-
-fn done-drawing? self: (addr screen-position-state) -> result/eax: boolean {
-  # self->rightcol >= self->ncols
-}