Here is a new version of amos.library. It features an improvment of the Bob Clear instruction.
What was wrong with the original?
Good question! Imagine we have a bob that we want to move around the screen. First we decide its location using the Bob instruction, next we reveal it using Bob Draw. Bob Draw basically does two things: first it saves a copy of the area right underneath where the bob is going, then it draws the image. When we later move the bob to a new location, we must first erase it from its previos location using Bob Clear. This instruction does what one would expect it to do; it redraws the previously stored background.
So far there is no problem, and that is because the problem only occurs when the bob moves entirely off screen. What happens when calling Bob Draw in this case is firstly that no new background is saved, and secondly that nothing is being drawn. In this situation it would be fair to assume that Bob Clear also didn't redraw any background either, but surprisingly it does. The background that is redrawn is the last stored from when the bob was on-screen, and it keeps redrawing this until the bob is moved back into the screen. The consequence is that graphics operations in the affected areas will get corrupted. The improved version stops the redrawing while the bob is off the screen.
Nice! However, is this really useful?
Maybe? Certainly I will make good use of it in the tilemap-scrolling platformer I'm making. Bobs regularly move off the screen, and tiles in the background needs redrawing when the screen scrolls. This combination causes corrupted background graphics and a lot of grief finding ways to compensate. Undoubtly the most efficient solution was to fix AMOS, and now that has been done.
The new version of amos.library also contains a minor change in the Limit Bob instruction such that it works as intended. This fix has been done before by others, but not in the latest unofficial version on this forum. The other fixes that were already present includes the must-have Dual Playfield fix and a couple of less significant ones that I'm unfamiliar with.
HOW TO "INSTALL":
First install and upgrade AMOS Pro to verison 2.0. Then download the attachment which consists two files: amos.library and +w.s. Move "amos.library" into the directory "System:Libs/" and installation is complete.
The file +w.s is the modified source code. I had to make changes at several places because I redefined three existing variables to hold additional data. The section at the top describing latest added features has not been updated.