diff --git a/dotscape b/dotscape index 2381b10..87c74b0 100755 Binary files a/dotscape and b/dotscape differ diff --git a/fcore/quad-tree.sml b/fcore/quad-tree.sml index 61b27ee..506b2c7 100644 --- a/fcore/quad-tree.sml +++ b/fcore/quad-tree.sml @@ -501,7 +501,7 @@ struct fun intToRealString num = let val result = Real.fromInt num - val result = Real.toString result + val result = Real.fmt (StringCvt.FIX (SOME 15)) result in if String.isSubstring "." result then result else result ^ ".0" end @@ -509,7 +509,7 @@ struct fun colToRealString col = let val result = Real.fromInt col / 255.0 - val result = Real.toString result + val result = Real.fmt (StringCvt.FIX (SOME 15)) result in if String.isSubstring "." result then result else result ^ ".0" end diff --git a/green.dsc b/green.dsc index 3b4c9d4..1e0b520 100644 --- a/green.dsc +++ b/green.dsc @@ -1 +1 @@ -50 50 { {0 0 4 4 0 0 0 1 } {0 45 4 50 0 0 0 1 } {45 0 49 4 0 0 0 1 } {45 45 49 50 0 0 0 1 } } +30 30 { {0 0 0 29 0 0 0 1 } {0 0 29 0 0 0 0 1 } {0 29 29 29 0 0 0 1 } {29 0 29 29 0 0 0 1 } } \ No newline at end of file diff --git a/green.sml b/green.sml index f92b84f..7e3d01d 100644 --- a/green.sml +++ b/green.sml @@ -15,59 +15,59 @@ struct fun lerp (xOffset, yOffset, scale, windowWidth, windowHeight) = let val windowWidth = Real32.fromInt windowWidth - val windowHeight = Real32.fromInt windowHeight val halfWidth = windowWidth / 2.0 + val windowHeight = Real32.fromInt windowHeight val halfHeight = windowHeight / 2.0 in #[ -xToNdc (xOffset, 0.0, scale, halfWidth), -yToNdc (yOffset, 4.0, scale, halfHeight), -endXToNdc (xOffset, xToNdc (xOffset, 0.0, scale, halfWidth), 4.0, scale, halfWidth), -yToNdc (yOffset, 4.0, scale, halfHeight), -xToNdc (xOffset, 0.0, scale, halfWidth), -yToNdc (yOffset, 0.0, scale, halfHeight), -xToNdc (xOffset, 0.0, scale, halfWidth), -yToNdc (yOffset, 0.0, scale, halfHeight), -endXToNdc (xOffset, xToNdc (xOffset, 0.0, scale, halfWidth), 4.0, scale, halfWidth), -yToNdc (yOffset, 4.0, scale, halfHeight), -endXToNdc (xOffset, xToNdc (xOffset, 0.0, scale, halfWidth), 4.0, scale, halfWidth), -yToNdc (yOffset, 0.0, scale, halfHeight), -xToNdc (xOffset, 0.0, scale, halfWidth), -yToNdc (yOffset, 50.0, scale, halfHeight), -endXToNdc (xOffset, xToNdc (xOffset, 0.0, scale, halfWidth), 4.0, scale, halfWidth), -yToNdc (yOffset, 50.0, scale, halfHeight), -xToNdc (xOffset, 0.0, scale, halfWidth), -yToNdc (yOffset, 45.0, scale, halfHeight), -xToNdc (xOffset, 0.0, scale, halfWidth), -yToNdc (yOffset, 45.0, scale, halfHeight), -endXToNdc (xOffset, xToNdc (xOffset, 0.0, scale, halfWidth), 4.0, scale, halfWidth), -yToNdc (yOffset, 50.0, scale, halfHeight), -endXToNdc (xOffset, xToNdc (xOffset, 0.0, scale, halfWidth), 4.0, scale, halfWidth), -yToNdc (yOffset, 45.0, scale, halfHeight), -xToNdc (xOffset, 45.0, scale, halfWidth), -yToNdc (yOffset, 4.0, scale, halfHeight), -endXToNdc (xOffset, xToNdc (xOffset, 45.0, scale, halfWidth), 49.0, scale, halfWidth), -yToNdc (yOffset, 4.0, scale, halfHeight), -xToNdc (xOffset, 45.0, scale, halfWidth), -yToNdc (yOffset, 0.0, scale, halfHeight), -xToNdc (xOffset, 45.0, scale, halfWidth), -yToNdc (yOffset, 0.0, scale, halfHeight), -endXToNdc (xOffset, xToNdc (xOffset, 45.0, scale, halfWidth), 49.0, scale, halfWidth), -yToNdc (yOffset, 4.0, scale, halfHeight), -endXToNdc (xOffset, xToNdc (xOffset, 45.0, scale, halfWidth), 49.0, scale, halfWidth), -yToNdc (yOffset, 0.0, scale, halfHeight), -xToNdc (xOffset, 45.0, scale, halfWidth), -yToNdc (yOffset, 50.0, scale, halfHeight), -endXToNdc (xOffset, xToNdc (xOffset, 45.0, scale, halfWidth), 49.0, scale, halfWidth), -yToNdc (yOffset, 50.0, scale, halfHeight), -xToNdc (xOffset, 45.0, scale, halfWidth), -yToNdc (yOffset, 45.0, scale, halfHeight), -xToNdc (xOffset, 45.0, scale, halfWidth), -yToNdc (yOffset, 45.0, scale, halfHeight), -endXToNdc (xOffset, xToNdc (xOffset, 45.0, scale, halfWidth), 49.0, scale, halfWidth), -yToNdc (yOffset, 50.0, scale, halfHeight), -endXToNdc (xOffset, xToNdc (xOffset, 45.0, scale, halfWidth), 49.0, scale, halfWidth), -yToNdc (yOffset, 45.0, scale, halfHeight) +xToNdc (xOffset, 0.000000000000000, scale, halfWidth), +yToNdc (yOffset, 30.000000000000000, scale, halfHeight), +endXToNdc (xOffset, xToNdc (xOffset, 0.000000000000000, scale, halfWidth), 0.000000000000000, scale, halfWidth), +yToNdc (yOffset, 30.000000000000000, scale, halfHeight), +xToNdc (xOffset, 0.000000000000000, scale, halfWidth), +yToNdc (yOffset, 0.000000000000000, scale, halfHeight), +xToNdc (xOffset, 0.000000000000000, scale, halfWidth), +yToNdc (yOffset, 0.000000000000000, scale, halfHeight), +endXToNdc (xOffset, xToNdc (xOffset, 0.000000000000000, scale, halfWidth), 0.000000000000000, scale, halfWidth), +yToNdc (yOffset, 30.000000000000000, scale, halfHeight), +endXToNdc (xOffset, xToNdc (xOffset, 0.000000000000000, scale, halfWidth), 0.000000000000000, scale, halfWidth), +yToNdc (yOffset, 0.000000000000000, scale, halfHeight), +xToNdc (xOffset, 0.000000000000000, scale, halfWidth), +yToNdc (yOffset, 0.000000000000000, scale, halfHeight), +endXToNdc (xOffset, xToNdc (xOffset, 0.000000000000000, scale, halfWidth), 29.000000000000000, scale, halfWidth), +yToNdc (yOffset, 0.000000000000000, scale, halfHeight), +xToNdc (xOffset, 0.000000000000000, scale, halfWidth), +yToNdc (yOffset, 0.000000000000000, scale, halfHeight), +xToNdc (xOffset, 0.000000000000000, scale, halfWidth), +yToNdc (yOffset, 0.000000000000000, scale, halfHeight), +endXToNdc (xOffset, xToNdc (xOffset, 0.000000000000000, scale, halfWidth), 29.000000000000000, scale, halfWidth), +yToNdc (yOffset, 0.000000000000000, scale, halfHeight), +endXToNdc (xOffset, xToNdc (xOffset, 0.000000000000000, scale, halfWidth), 29.000000000000000, scale, halfWidth), +yToNdc (yOffset, 0.000000000000000, scale, halfHeight), +xToNdc (xOffset, 0.000000000000000, scale, halfWidth), +yToNdc (yOffset, 30.000000000000000, scale, halfHeight), +endXToNdc (xOffset, xToNdc (xOffset, 0.000000000000000, scale, halfWidth), 29.000000000000000, scale, halfWidth), +yToNdc (yOffset, 30.000000000000000, scale, halfHeight), +xToNdc (xOffset, 0.000000000000000, scale, halfWidth), +yToNdc (yOffset, 29.000000000000000, scale, halfHeight), +xToNdc (xOffset, 0.000000000000000, scale, halfWidth), +yToNdc (yOffset, 29.000000000000000, scale, halfHeight), +endXToNdc (xOffset, xToNdc (xOffset, 0.000000000000000, scale, halfWidth), 29.000000000000000, scale, halfWidth), +yToNdc (yOffset, 30.000000000000000, scale, halfHeight), +endXToNdc (xOffset, xToNdc (xOffset, 0.000000000000000, scale, halfWidth), 29.000000000000000, scale, halfWidth), +yToNdc (yOffset, 29.000000000000000, scale, halfHeight), +xToNdc (xOffset, 29.000000000000000, scale, halfWidth), +yToNdc (yOffset, 30.000000000000000, scale, halfHeight), +endXToNdc (xOffset, xToNdc (xOffset, 29.000000000000000, scale, halfWidth), 29.000000000000000, scale, halfWidth), +yToNdc (yOffset, 30.000000000000000, scale, halfHeight), +xToNdc (xOffset, 29.000000000000000, scale, halfWidth), +yToNdc (yOffset, 0.000000000000000, scale, halfHeight), +xToNdc (xOffset, 29.000000000000000, scale, halfWidth), +yToNdc (yOffset, 0.000000000000000, scale, halfHeight), +endXToNdc (xOffset, xToNdc (xOffset, 29.000000000000000, scale, halfWidth), 29.000000000000000, scale, halfWidth), +yToNdc (yOffset, 30.000000000000000, scale, halfHeight), +endXToNdc (xOffset, xToNdc (xOffset, 29.000000000000000, scale, halfWidth), 29.000000000000000, scale, halfWidth), +yToNdc (yOffset, 0.000000000000000, scale, halfHeight) ] end end diff --git a/imperative-shell/shell.sml b/imperative-shell/shell.sml index eafa393..a261f96 100644 --- a/imperative-shell/shell.sml +++ b/imperative-shell/shell.sml @@ -8,7 +8,7 @@ struct val _ = Glfw.init () val _ = Glfw.windowHint (Glfw.CONTEXT_VERSION_MAJOR (), 3) val _ = Glfw.windowHint (Glfw.DEPRECATED (), Glfw.FALSE ()) - val _ = Glfw.windowHint (Glfw.SAMPLES (), 4) + val _ = Glfw.windowHint (Glfw.SAMPLES (), 0) val window = Glfw.createWindow (Constants.windowWidth, Constants.windowHeight, "Dotscape")