fix compile errors after previous commit (which involved reimplementing the quad tree to eliminate the possibility of a class of bugs I was experiencing; the problem was that the quad bounds were being passed recursively in different functions, but the long argument list in these functions made it difficult to see where the mismatch was)

This commit is contained in:
2025-01-27 23:41:59 +00:00
parent 6369be21fa
commit 9b7d7a1396
12 changed files with 264 additions and 333 deletions

View File

@@ -6,13 +6,17 @@ struct
else
let
val {id, x, y, width, height} = Vector.sub (wallVec, pos)
val acc = QuadHelp.insert
(x, y, width, height, id, acc)
val acc = QuadTree.insert (x, y, width, height, id, acc)
in
helpGenerateTree (pos + 1, wallVec, acc)
end
fun generateTree wallVec = helpGenerateTree (0, wallVec, QuadTree.empty)
fun generateTree wallVec =
helpGenerateTree
( 0
, wallVec
, QuadTree.create (Constants.worldWidth, Constants.worldHeight)
)
fun helpGetDrawVecWider
(pos, wallVec, acc, winWidth, winHeight, ratio, yOffset) =