********** CLIPPING AND FOREGROUND ********** This section covers how sprites interact with tiles in a level; clipping is given to sprites when they are created and can be changed occasionally, say if they are shot. Clipping alteration is pretty simple; it can take values between 0-2; and 'foreground behavior' controlls whether a sprite appears in front of Keen or behind him and such. (Values between 0-3) Sprites will pass through tiles if their clipping is set to 0, but will hit them if it is 2. If it is 1 then they will hit tiles, but will not be pushed out of them if they get 'inside' by accident. However you will notice most sprites aren't given a clipping at all, this is because they use standard 'look for walls' code and so don't actually need clipping as such. The forground behavior is either 0 (Go behind everything) 2 (Go in front of Keen and tiles) or 3 (Go in front of everything, including foreground tiles.) Foreground affects only sprite-tile interaction, a sprite that is spawned first will appear in front of one spawned later, no matter what foreground property it has. (Sprites on the top left of a level are spawned before those lower or right of them.) Some sprite collision properties are incompatible with some clippings. For example sprites (The ones in the Well of Wishes) cannot have clipping = 2 or you will get a 'fullcliptowall' error. This happens when a sprite wants to do something to a tile because of its collision type, but the clipping forbids it. If this happens, just change the collision type (Section 14) Following is a list of sprites complete with their clipping, followed by a list of sprites and their foreground behavior values. #Clipping behaviors: %patch $7623 $0000W #No clipping cheat on ($01 disables) %patch $763A $0001W #No clipping cheat off ($00 to disable) %patch $8A4B $0001W #Keen on map %patch $AF8A $0002W #Keen related and unknown %patch $B921 $0000W #Keen on pole (Can move through solid 'pole goes through' tiles) %patch $C094 $0000W #Turn clipping off while Keen TRAVELS BETWEEN doors %patch $C0A8 $0001W #Standing Keen after he's emerged from a door %patch $C342 $0000W #Door sprite when opening %patch $C6B0 $0001W #After jumping off a pole %patch $C757 $0001W #After turning on a pole (At pole top turning can make Keen fall off!) %patch $C896 $0001W #Dropping off pole bottom %patch $C98F $0001W #Keen after letting go of a ledge he's gripping %patch $CBA9 $0001W #Keen AFTER climbing up from ledgegripping %patch $CC23 $0000W #Dead Keen %patch $D039 $0000W #Item got points %patch $D0E3 $0000W #Item got points %patch $D65B $0000W #Keen climbs up from ledgegripping left %patch $D732 $0000W #Keen climbs up from ledgegripping right %patch $D90B $0000W #Miragia %patch $DE0E $0000W #Keen riding Foot on map (Can now be blocked by tiles!) %patch $E111 $0000W #Map Keen after Foot drops him off %patch $E302 $0000W #K flag landing (Move through map tiles) %patch $E364 $0000W #K flag flipping (Move through map tiles) %patch $F622 $0002W #Keen swimming (Well of Wishes) %patch $F685 $0000W #Keen swimming bubbles %patch $FC3C $0000W #Items %patch $FCA2 $0000W #Lifewater drop burst %patch $10247 $0002W #Bird after starting flying from grond %patch $102E6 $0001W #Stunned bird %patch $10396 $0002W #Bird default %patch $10496 $0001W #Bird landing backup (If $00 cannot land, only fly) %patch $104C3 $0001W #Bird landing (If $00, will not land but will move through ground) %patch $10B4D $0000W #Cloud Lightening %patch $1193E $0000W #Droppable Platform %patch $11DAE $0000W #Smirky stolen tiles spark %patch $120D3 $0002W #Dopefish %patch $1236C $0000W #Dopefish big bubble %patch $12402 $0000W #Stuff eaten by Dopefish (Keen or Schoolfish) %patch $12456 $0000W #Dopefish chomping (No clipping while doing this) %patch $124E5 $0002W #Schoolfish %patch $125A2 $0000W #Sprite %patch $12887 $0000W #Dart shooter #Forground behaviors: %patch $CFFB $0003W #Item tiles got %patch $FC41 $0002W #Item sprites %patch $FCA7 $0003W #Lifewater drop burst %patch $FD02 $0001W #Council Member %patch $FD9C $0002W #Poison slug %patch $FE49 $0000W #Poison Slug slime %patch $FEE3 $0000W #Mad Mushroom %patch $FFFB $0002W #Egg %patch $10058 $0002W #Hatched Bird %patch $1052C $0000W #Arachnut %patch $10605 $0000W #Skypest %patch $10824 $0000W #Wormouth %patch $109E0 $0002W #Cloud %patch $10BB9 $0002W #Berkeloid %patch $10ED0 $0002W #Inchworm %patch $10F4A $0000W #Foot %patch $1100F $0003W #Foot puff 1 %patch $11043 $0003W #Foot puff 2 %patch $11077 $0003W #Foot puff 3 %patch $110A8 $0003W #Foot puff 4 %patch $11108 $0000W #Bounder %patch $112E6 $0002W #Lick %patch $114C9 $0000W #Moving Platforms %patch $1191A $0000W #Drop Platform %patch $11A4C $0003W #Smirky %patch $11CB0 $0003W #Smirky stolen items spark %patch $11DA9 $0003W #Smirky stolen tiles spark %patch $11E85 $0003W #Mimrock %patch $120CE $0002W #Dopefish %patch $12362 $0003W #Dopefish big bubble %patch $124EA $0000W #Schoolfish %patch $1259D $0000W #Sprite %patch $12684 $0000W #Sprite shot %patch $1272A $0000W #Mines %patch $127F3 $0000W #Lindsey