Posted By
Csabo on 2004-02-07 21:42:43
| Re: Savage Island Colors
I got to the bottom of the GET ALL bug. This special command has a completely separate handler. It looks through all the objects in the game, and the ones that are in the same room as the player are processed. What is processing here? Just a sec, first:
Something about all the Scott Adams adventures: the objects that are just 'decoration', (such as Sand, Lake, Wind, or anything that CANNOT be picked up) just have a regular name, ending with a zero byte $00 as an end mark. Any object that CAN be picked up, such as the bottle, will have a name like this: "Bottle of rum/BOTT/". Therefore it always ends with a slash.
In the first 'room' we have Sand, Large stone head, Edge of impenetrable jungle. None can be picked up, right? When the GET ALL command finds an object, the processing starts by printing the object's name. That is, it keeps printing characters until it finds a slash... Ouch! So after "Sand", for example, will be a whole bunch of other object names, until it finally bumps into one which can be picked up. Hence all the garbage.
You could think that by changing the part that checks for the slash to check for a zero byte instead, the problem would be solved. Well, those of you who are actually reading this and feel adventurous can try this: after loading the game, go to YAPE monitor and type >19C7 00. Now try the GET ALL command... Well, the garbage problem is solved, but the game says it picked up all three items, head, jungle and all! Ouch once again... Do anything else for a few moves and watch the game go crazy. Bug city! Didn't these people ever test their stuff???
So after further digging I found something else. There is a table at $5160-$519B. That's one byte for each object in the game. It's only used twice in the whole code. One of those times is when the user types GET ALL... We're getting warmer! If you take a peek at the code at $1995, it reads from that table, and checks if the hightest bit ($80) is on. If it would be, it exludes that object from the GET command, and goes to the next one. But NONE of the objects have their $80 bit set in that table, so that jump NEVER takes place. Bingo.
The colors look pretty good, and I will fix this bug by actually filling out that table the way it was meant to be. Then comes a little testing, and then a release for sure.
|