parent
aa6c50d2bc
commit
9822a2429f
|
@ -49,7 +49,11 @@ draw-grapheme-on-real-screen: # g: grapheme, x: int, y: int, color: int
|
||||||
{
|
{
|
||||||
73/jump-if-not-CF break/disp8
|
73/jump-if-not-CF break/disp8
|
||||||
(pixel-on-real-screen %eax %edx *(ebp+0x14))
|
(pixel-on-real-screen %eax %edx *(ebp+0x14))
|
||||||
|
eb/jump $draw-grapheme:continue/disp8
|
||||||
}
|
}
|
||||||
|
# otherwise draw a black pixel
|
||||||
|
(pixel-on-real-screen %eax %edx 0)
|
||||||
|
$draw-grapheme:continue:
|
||||||
# --x
|
# --x
|
||||||
48/decrement-eax
|
48/decrement-eax
|
||||||
#
|
#
|
||||||
|
|
|
@ -158,6 +158,20 @@ fn draw-text-wrapping-right-then-down screen: (addr screen), text: (addr array b
|
||||||
return xcurr, ycurr
|
return xcurr, ycurr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn move-cursor-rightward-and-downward screen: (addr screen), xmin: int, xmax: int {
|
||||||
|
var cursor-x/eax: int <- copy 0
|
||||||
|
var cursor-y/ecx: int <- copy 0
|
||||||
|
cursor-x, cursor-y <- cursor-position screen
|
||||||
|
cursor-x <- add 8 # font-width
|
||||||
|
compare cursor-x, xmax
|
||||||
|
{
|
||||||
|
break-if-<
|
||||||
|
cursor-x <- copy xmin
|
||||||
|
cursor-y <- add 0x10 # font-height
|
||||||
|
}
|
||||||
|
set-cursor-position screen, cursor-x, cursor-y
|
||||||
|
}
|
||||||
|
|
||||||
fn draw-text-wrapping-right-then-down-over-full-screen screen: (addr screen), text: (addr array byte), x: int, y: int, color: int -> _/eax: int, _/ecx: int {
|
fn draw-text-wrapping-right-then-down-over-full-screen screen: (addr screen), text: (addr array byte), x: int, y: int, color: int -> _/eax: int, _/ecx: int {
|
||||||
var cursor-x/eax: int <- copy 0
|
var cursor-x/eax: int <- copy 0
|
||||||
var cursor-y/ecx: int <- copy 0
|
var cursor-y/ecx: int <- copy 0
|
||||||
|
|
|
@ -42,12 +42,14 @@ fn check-screen-row-from screen-on-stack: (addr screen), x: int, y: int, expecte
|
||||||
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, msg, 3 # 3=cyan
|
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, msg, 3 # 3=cyan
|
||||||
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ": expected '", 3
|
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ": expected '", 3
|
||||||
draw-grapheme-at-cursor 0, expected-grapheme, 3
|
draw-grapheme-at-cursor 0, expected-grapheme, 3
|
||||||
|
move-cursor-rightward-and-downward 0, 0, 0x400
|
||||||
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "' at (", 3
|
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "' at (", 3
|
||||||
draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0, x, 3
|
draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0, x, 3
|
||||||
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ", ", 3
|
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ", ", 3
|
||||||
draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0, y, 3
|
draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0, y, 3
|
||||||
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ") but observed '", 3
|
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ") but observed '", 3
|
||||||
draw-grapheme-at-cursor 0, g, 3
|
draw-grapheme-at-cursor 0, g, 3
|
||||||
|
move-cursor-rightward-and-downward 0, 0, 0x400
|
||||||
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "'", 3
|
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "'", 3
|
||||||
}
|
}
|
||||||
idx <- increment
|
idx <- increment
|
||||||
|
@ -106,12 +108,14 @@ fn check-screen-row-in-color-from screen-on-stack: (addr screen), fg: int, y: in
|
||||||
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, msg, 3 # 3=cyan
|
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, msg, 3 # 3=cyan
|
||||||
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ": expected '", 3
|
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ": expected '", 3
|
||||||
draw-grapheme-at-cursor 0, expected-grapheme, 3
|
draw-grapheme-at-cursor 0, expected-grapheme, 3
|
||||||
|
move-cursor-rightward-and-downward 0, 0, 0x400
|
||||||
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "' at (", 3
|
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "' at (", 3
|
||||||
draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0, x, 3
|
draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0, x, 3
|
||||||
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ", ", 3
|
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ", ", 3
|
||||||
draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0, y, 3
|
draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0, y, 3
|
||||||
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ") but observed '", 3
|
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ") but observed '", 3
|
||||||
draw-grapheme-at-cursor 0, g, 3
|
draw-grapheme-at-cursor 0, g, 3
|
||||||
|
move-cursor-rightward-and-downward 0, 0, 0x400
|
||||||
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "'", 3
|
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "'", 3
|
||||||
}
|
}
|
||||||
$check-screen-row-in-color-from:compare-colors: {
|
$check-screen-row-in-color-from:compare-colors: {
|
||||||
|
@ -126,6 +130,7 @@ fn check-screen-row-in-color-from screen-on-stack: (addr screen), fg: int, y: in
|
||||||
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, msg, 3 # 3=cyan
|
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, msg, 3 # 3=cyan
|
||||||
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ": expected '", 3
|
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ": expected '", 3
|
||||||
draw-grapheme-at-cursor 0, expected-grapheme, 3
|
draw-grapheme-at-cursor 0, expected-grapheme, 3
|
||||||
|
move-cursor-rightward-and-downward 0, 0, 0x400
|
||||||
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "' at (", 3
|
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "' at (", 3
|
||||||
draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0, x, 3
|
draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0, x, 3
|
||||||
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ", ", 3
|
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ", ", 3
|
||||||
|
|
Loading…
Reference in New Issue