The rewrite code is very verbose right now. Should be cleaned up where feasible:
[ ] Make helpers functions for repetitive code in Territory.bf and TerrainImporter.bf for creating/loading meshes, textures, and render objects.
[ ] Use Try!() instead of explicit if-else blocks for functions returning a result
[ ] Make an overload of Try!() that takes an additional StringView argument for functions that return that.
[ ] Simplify result of a subfunctions in importers. Don't need them all to return Err(StringView). Can just log any relevant info and return an empty error. Makes the code simpler and lets us use plain Try!()
The rewrite code is very verbose right now. Should be cleaned up where feasible:
Try!()
instead of explicit if-else blocks for functions returning a resultTry!()
that takes an additionalStringView
argument for functions that return that.Err(StringView)
. Can just log any relevant info and return an empty error. Makes the code simpler and lets us use plainTry!()