Inside this document:
Boulders and diamonds which are sitting on top of a brick wall ($02), stationary boulder ($10) or stationary diamond ($14), can roll off.
When a boulder or diamond begins falling or hits an object, it plays the appropriate boulder sound or diamond sound.
The "amoeba slow groth time" is given at offset $01 of the cave data; note that this is the same position as the "magic wall milling time"; it is assumed that both magic wall and amoeba will not coexist in the same cave.
When a boulder or diamond hits a magic wall, regardless of its state, it makes a diamond sound or boulder sound respectively. The magic wall milling time is given by the value at offset $01 in the cave data).
procedure ScanExplosion(in positionType explosionPosition; in explosionType explodeToWhat; in integer explosionStage) # Morph the explosion into the next stage of the explosion. ASSERT((explosionStage >= 0) and (explosionStage <= 4)); # Explosion stages zero to 3 morph into stages 1 to 4 if (explosionStage <= 3) then PlaceExplosion(explosionPosition, explodeToWhat, explosionStage+1); else # Explosion stage 4 morphs into a space or a diamond as appropriate. if (explodeToWhat == explodeToSpace) then PlaceSpace(explosionPosition); else PlaceStationaryDiamond(explosionPosition); endif endif endprocedure ## procedure Explode(in positionType explosionPosition; in explosionType explodeToWhat) # Explode something at the specified position into the specified object type # The spaces prior to and including the current space in the scan sequence # are set to a stage 1 explosion. Explode1Space(GetRelativePosition(explosionPosition, up1left), explodeToWhat, 1); Explode1Space(GetRelativePosition(explosionPosition, up1), explodeToWhat, 1); Explode1Space(GetRelativePosition(explosionPosition, up1right), explodeToWhat, 1); Explode1Space(GetRelativePosition(explosionPosition, left1), explodeToWhat, 1); Explode1Space(explosionPosition, explodeToWhat, 1); # The spaces after the current scan position are set to a stage 0 explosion, # so that they will be a stage 1 explosion by the end of the scan frame. Explode1Space(GetRelativePosition(explosionPosition, right1), explodeToWhat, 0); Explode1Space(GetRelativePosition(explosionPosition, down1left), explodeToWhat, 0); Explode1Space(GetRelativePosition(explosionPosition, down1), explodeToWhat, 0); Explode1Space(GetRelativePosition(explosionPosition, down1right), explodeToWhat, 0); RequestSound(explosionSound); endprocedure ## procedure Explode1Space(in positionType explosionPosition; in explosionType explodeToWhat; in integer explosionStage) # Explode one space to the required stage and type of explosion, checking # whether the object at this space can be exploded first. # Note that if the object that gets exploded happens to be Rockford, then naturally # Rockford will no longer be in existance. However, we don't explicitely check whether # we are exploding Rockford here; his absence will be noticed next scan frame # if we don't come across Rockford at any time during the next scan frame. ASSERT((explosionStage == 0) or (explosionStage == 1)); if (GetObjectAtPosition(explosionPosition) != objSteelWall) then PlaceExplosion(explosionPosition, explodeToWhat, explosionStage); endif endprocedure