[Ohrrpgce] SVN: teeemcee/12572 Improved error checking and handling when loading slice collections

subversion at HamsterRepublic.com subversion at HamsterRepublic.com
Sun Oct 24 18:54:25 PDT 2021


teeemcee
2021-10-24 18:54:22 -0700 (Sun, 24 Oct 2021)
1033
Improved error checking and handling when loading slice collections

SliceLoadFromNode/SliceLoadFromFile now return a bool to tell whether they were
successful, but they try to keep going if they hit an unrecognised slice type
and load the rest of the tree, then return false.

LoadSliceCollection now returns a Slice ptr instead of loading into an existing
slice. Has a new arg return_partially_loaded, which is currently always
YES. Better to try to recover from errors, especially when loading collections
in the slice editor!

This fixes a number of places that checked "if collection = null" to check for
error, which couldn't possibly succeed. And other cleanup to error checking.

I also removed a number of places that tried to set a slice to Fill and then
call RefreshSliceScreenPos before loading a collection into it, which did
nothing (the root slices of current builtin collections are all set to fill
anyway)

Also, converted some debugs into showbugs.

Also, when loading check for Class slices which aren't slSpecial.
---
U   wip/menustuf.rbas
U   wip/plankmenu.bas
U   wip/slices.bas
U   wip/slices.bi



More information about the Ohrrpgce mailing list