Decided to revisit this a bit today, as I'm moving onto a new section of the game and figure it's probably worth figuring out memory issues sooner rather than later...
I've confirmed that DisposeLoad isn't disposing of the MenuBar script in Main.sc (and double-checked the script constants to make sure I didn't get that confused somewhere.
I made sure the latest ScummVM was installed, but get the following when I try to load it:
The game in 'C:\Users\nil_g\Documents\Projects\Games\Sect of Achturan\The Sect
of Achturan\' seems to be an unknown SCI [SCI0, SCI01, SCI10, SCI11, SCI32]
engine game variant.
Please report the following data to the ScummVM team at
https://bugs.scummvm.org/ along with the name of the game you tried to add and
its version, language, etc.:
Matched game IDs: astrochicken, christmas1988, christmas1990, iceman, camelot,
longbow, ecoquest, funseeker, hoyle1, hoyle2, hoyle3, jones, kq1sci, kq4sci,
laurabow, lsl1sci, lsl2, lsl5, cnick-lsl, cnick-kq, cnick-laurabow,
cnick-longbow, cnick-sq, mothergoose256, msastrochicken, pq2, qfg1, qfg2,
sq1sci, sq3, sci-fanmade
{"resource.001", 0, "ae5701f8065566ae0083be1717c9a7d5", 956919},
{"resource.map", 0, "9ada910254421dc90fe7692567b2c799", 1614},
I've seen this issue noted on the forum, although can't find it for the life of me right now, so I'll take another look when I'm a little more together to see if I can get that running.
I've also plugged in the PrintBadMem procedure, but found it's returning as expected when I call it in the title screen/first room, although the menubar is already displaying wrong by then (so I assume it already should be coalescing). The string looks right, so I'm not sure if this tells us anything or if, just as likely, I'm doing something wrong.
I did notice that throughout the game the incorrect characters on display within the Inventory text appear to change. They also changed to a "> " when I added/ran with the PrintBadMem procedure. Perhaps this can help track down where things are occurring?
Because I'm so green at programming, I'm trying to wrap my head around memory population and order. Do include and use statements get substituted during preprocessing or linking? Does this even affect the order of memory population, or am I just wrong altogether? I've started delving a little deeper into coding, but it's still pretty alien to me. I'm sure I can find these answers somewhere else, if it's a lot.
But unfortunately, I'm still struggling to figure out where the issue here might lie. If memory's getting overwritten/corrupted, does the fact that it's only like two or three letters mean that it's just plugging in like 3 bytes where it shouldn't be? Am I wrong in assuming that that means there's probably something screwed up somewhere else, wherever it's expect that memory to be in line with whatever else it's supposed to be doing?
Sigh. Guess I won't give up my day job.