remove 'squares' field from app type, and refactor most functions in common-update.sml to use layer tree instead of squares vector
This commit is contained in:
@@ -23,12 +23,9 @@ struct
|
||||
(windowWidth, windowHeight, canvasWidth, canvasHeight)
|
||||
|
||||
val maxPoints = Int.max (canvasWidth, canvasHeight)
|
||||
val squares = Vector.tabulate (maxPoints, fn _ =>
|
||||
Vector.tabulate (maxPoints, fn _ => {r = 0, g = 0, b = 0, a = 0}))
|
||||
val layerTree = LayerTree.init maxPoints
|
||||
in
|
||||
{ mode = AppType.NORMAL_MODE
|
||||
, squares = squares
|
||||
, canvasWidth = canvasWidth
|
||||
, canvasHeight = canvasHeight
|
||||
, windowWidth = windowWidth
|
||||
|
||||
Reference in New Issue
Block a user