fix compiler errors related to new buildTextString implementation

This commit is contained in:
2025-09-12 08:13:18 +01:00
parent a2c3df65f7
commit 9ec74380c4

View File

@@ -8,9 +8,9 @@ struct
, charB: Real32.real , charB: Real32.real
(* different colours for char when cursor is on char *) (* different colours for char when cursor is on char *)
, cusorOnCharR: Real32.real , cursorOnCharR: Real32.real
, cusorOnCharG: Real32.real , cursorOnCharG: Real32.real
, cusorOnCharB: Real32.real , cursorOnCharB: Real32.real
, cursorR: Real32.real , cursorR: Real32.real
, cursorG: Real32.real , cursorG: Real32.real
@@ -40,12 +40,12 @@ struct
} }
(* different functions to make vectors of different things we want to draw. *) (* different functions to make vectors of different things we want to draw. *)
fun makeCursor (posX, posY, env: t) = fun makeCursor (posX, posY, env: env_data) =
Rect.lerp Rect.lerp
( Real32.fromInt (posX - 1) ( Real32.fromInt (posX - 1)
, Real32.fromInt posY , Real32.fromInt posY
, #cursorZ env , #cursorZ env
, scale , TC.scale
, #fw env , #fw env
, #fh env , #fh env
, #cursorR env , #cursorR env
@@ -53,26 +53,26 @@ struct
, #cursorB env , #cursorB env
) )
fun makeHighlight (posX, posY, env: t) = fun makeHighlight (posX, posY, env: env_data) =
Rect.lerp Rect.lerp
( Real32.fromInt (posX - 1) ( Real32.fromInt (posX - 1)
, Real32.fromInt posY , Real32.fromInt posY
, #highLightZ env , #highlightZ env
, scale , TC.scale
, #fw env , #fw env
, #fh env , #fh env
, #highLightR env , #highlightR env
, #highLightG env , #highlightG env
, #highLightB env , #highlightB env
) )
fun makeChr (chr, posX, posY, env: t) = fun makeChr (chr, posX, posY, env: env_data) =
CozetteAscii.make CozetteAscii.make
( chr ( chr
, Real32.fromInt posX , Real32.fromInt posX
, Real32.fromInt posY , Real32.fromInt posY
, #charZ env , #charZ env
, scale , TC.scale
, #fw env , #fw env
, #fh env , #fh env
, #charR env , #charR env
@@ -80,13 +80,13 @@ struct
, #charB env , #charB env
) )
fun makeCursorOnChr (chr, posX, posY, env: t) = fun makeCursorOnChr (chr, posX, posY, env: env_data) =
CozetteAscii.make CozetteAscii.make
( chr ( chr
, Real32.fromInt posX , Real32.fromInt posX
, Real32.fromInt posY , Real32.fromInt posY
, #charZ env , #charZ env
, scale , TC.scale
, #fw env , #fw env
, #fh env , #fh env
, #cursorOnCharR env , #cursorOnCharR env
@@ -152,9 +152,9 @@ struct
else else
(* bin search lines *) (* bin search lines *)
let let
val searchPos = BinSearch.equalOrMore (pos + 1, searchList) val searchPos = BinSearch.equalOrMore (pos + 1, #searchList env)
in in
if searchPos = Vector.length lines then if searchPos = Vector.length line then
(* next line is not in this node *) (* next line is not in this node *)
let let
val absIdx = absIdx - pos val absIdx = absIdx - pos
@@ -296,7 +296,7 @@ struct
in makeCursorOnChr (chr, posX, posY, env) :: acc in makeCursorOnChr (chr, posX, posY, env) :: acc
end end
else else
makeCursor (chr, posX, posY, env) :: acc makeCursor (posX, posY, env) :: acc
in in
build build
( pos + 1 ( pos + 1