********** TILE COLLISION [KEEN] ********** This section deals with how most sprites interact with tiles, specifically what they do when they 'collide' with a given type of tile. And indeed, what tiles to colide with. When a sprite moves (Or tries to move.) into a tile it checks that tile's properties and then does something. A sprite can check the top, bottom and sides of a tile for blocking, as well as the tile's type before reacting. What it checks depends on its behavior. Sprites can also check the tiles 1 ahead\behind\above\below them. When a sprite checks for something and finds what it wants (A wall, a kill tile, a floor...) then it can do one of four things; it can stop moving, it can cling and wait to fall,it can bounce off or it can perform an action (Spindred land, Keen die...) Note that many behaviors rely on sprite clipping, that is they will do different things with different clippings. (Mostly this involves wether or not the sprite can pass through walls and floors.) See section '16.) Clipping_and_Foreground' to patch this. There are patches that change the code directly, but these are few and best found in other sections, like Speed/height and Sounds. You should only need to perform simple switches here; such as giving dead sprites the Spindred behavior so they will bounce up and down. Your main problem will be if the behavior is 'perform an action' which will change one sprite into another. First here is a list of all the behaviors found in the game, followed by an alphabetical list of each sprite and the behaviors it uses. To patch, simply swap behaviors. #A list of all possible values: $00000000L #Nothing $090B17B5RL #Solid (Default 'blocked by solid stuff collision used by many things) $090B17DCRL #Move l/r and down slopes $090B195ARL #Stunned $0AAF1A9FRL #Keen sit ('Sit in air'; similar to normal Keen) $0AAF1AC6RL #Keen (Blocked by blocking tiles, killed by deadly, etc, complex.) $0AAF1B83RL #Keen walk $0AAF1C6CRL #Keen in air (Fall, hit ground and walls) $0AAF200BRL #Keen pogo (Can break fuses!) $0AAF2145RL #Keen go down poles (If no pole left, fall) $0CCB11A2RL #Keen's shot $0F920119RL #Explosion fragments $0F9200A8RL #Master teleport $0F9216ACRL #Enemy shot $11020188RL #Sparky $11020679RL #Ampton walk (Check for poles and switches too) $11020897RL #Bouncy Slicestar $11020B2FRL #Shelley walk $11020BA1RL #Shelley fall $11C4036ARL #Shikadi mine move $11C4043ERL #Shikadi mine pause $11C4090ERL #Shikadi mine turn $11C40B09RL #Robo red's shoot $11C40C03RL #Spirogrip slam $11C40D86RL #Spindred $11C411B0RL #Mater's shot $11C41248RL #Master's sparks $11C41538RL #Shikadi (Check for poles) $11C4179FRL #Shocksund $11C418CBRL #Shocksund jump $11C41980RL #Shocksund's shot $11C41AC4RL #Sphereful #What Keen uses: ### #Standing and walking ### #Standing %patch $30BE0 $0AAF1AC6RL #Keen #Stand on plats %patch $30BFE $0AAF1AC6RL #Keen #Walking %patch $312CA $0AAF1B83RL #Keen walk %patch $312E8 $0AAF1B83RL #Keen walk %patch $31306 $0AAF1B83RL #Keen walk %patch $31324 $0AAF1B83RL #Keen walk ### #Bored ### #Bored (Looks up) %patch $30C1C $0AAF1AC6RL #Keen #Bored more (Shrug-blink) %patch $30C3A $0AAF1AC6RL #Keen %patch $30C58 $0AAF1AC6RL #Keen %patch $30C76 $0AAF1AC6RL #Keen %patch $30C94 $0AAF1AC6RL #Keen %patch $30CB2 $0AAF1AC6RL #Keen %patch $30CD0 $0AAF1AC6RL #Keen #Reads book %patch $30CEE $0AAF1AC6RL #Keen (Start) %patch $30D0C $0AAF1AC6RL #Keen %patch $30D2A $0AAF1AC6RL #Keen %patch $30D48 $0AAF1AC6RL #Keen %patch $30D66 $0AAF1AC6RL #Keen (Keep reading) %patch $30D84 $0AAF1AC6RL #Keen %patch $30DA2 $0AAF1AC6RL #Keen %patch $30DC0 $0AAF1AC6RL #Keen (Stop reading) %patch $30DDE $0AAF1AC6RL #Keen %patch $30DFC $0AAF1AC6RL #Keen ### #Looking ### #Look up %patch $30E1A $0AAF1AC6RL #Keen %patch $30E38 $0AAF1AC6RL #Keen #Look down %patch $30E56 $0AAF1AC6RL #Keen (Start) %patch $30E74 $0AAF1AC6RL #Keen %patch $30E92 $0AAF1AC6RL #Keen (Keep looking) %patch $30EB0 $0AAF1AC6RL #Keen (Stop) %patch $30ECE $0AAF1A9FRL #Keen sit (Screen moves back) %patch $30EEC $090B17B5RL #Sit (Screen stops moving) ### #Dead ### %patch $30F0A $090B17B5RL #Solid %patch $30F28 $090B17B5RL #Solid ### #Shooting while standing ### #l/r %patch $30F46 $0AAF1AC6RL #Keen %patch $30F64 $0AAF1AC6RL #Keen #Up %patch $30F82 $0AAF1AC6RL #Keen %patch $30FA0 $0AAF1AC6RL #Keen ### #On poles ### #On pole %patch $31126 $0AAF1A9FRL #Keen sit #Moving up %patch $31144 $0AAF1A9FRL #Keen sit %patch $31162 $0AAF1A9FRL #Keen sit %patch $31180 $0AAF1A9FRL #Keen sit #Moving down %patch $3119E $0AAF2145RL #Keen go down poles %patch $311BC $0AAF2145RL #Keen go down poles %patch $311DA $0AAF2145RL #Keen go down poles %patch $311F8 $0AAF2145RL #Keen go down poles #Shoot l/r %patch $31216 $0AAF1A9FRL #Keen sit %patch $31234 $0AAF1A9FRL #Keen sit #Shoot u %patch $31252 $0AAF1A9FRL #Keen sit %patch $31270 $0AAF1A9FRL #Keen sit #Shoot d %patch $3128E $0AAF1A9FRL #Keen sit %patch $312AC $0AAF1A9FRL #Keen sit ### #Pogoing ### %patch $31342 $0AAF200BRL #Keen pogo %patch $31360 $0AAF200BRL #Keen pogo %patch $3137E $0AAF200BRL #Keen pogo ### #Jumping ### #Jumping %patch $3139C $0AAF1C6CRL #Keen in air %patch $313BA $0AAF1C6CRL #Keen in air #Falling %patch $313D8 $0AAF1C6CRL #Keen in air %patch $313F6 $0AAF1C6CRL #Keen in air #Shoot l/r in air %patch $31414 $0AAF1C6CRL #Keen in air %patch $31432 $0AAF1C6CRL #Keen in air %patch $31450 $0AAF1C6CRL #Keen in air #Shoot u %patch $3146E $0AAF1C6CRL #Keen in air %patch $3148C $0AAF1C6CRL #Keen in air %patch $314AA $0AAF1C6CRL #Keen in air #Shoot d %patch $314C8 $0AAF1C6CRL #Keen in air %patch $314E6 $0AAF1C6CRL #Keen in air %patch $31504 $0AAF1C6CRL #Keen in air ### #Misc ### #Flip switches %patch $30FBE $0AAF1AC6RL #Keen %patch $30FDC $0AAF1AC6RL #Keen #Place gem %patch $30FFA $0AAF1AC6RL #Keen %patch $31018 $090B17B5RL #Solid (Open doors) #Enter doors %patch $31036 $090B17B5RL #Solid %patch $31054 $090B17B5RL #Solid %patch $31072 $090B17B5RL #Solid %patch $31090 $090B17B5RL #Solid %patch $310AE $090B17B5RL #Solid %patch $310CC $090B17B5RL #Solid %patch $310EA $090B17B5RL #Solid %patch $31108 $090B17B5RL #Solid #Ledgegripping %patch $31522 $0AAF1A9FRL #Keen sit %patch $31540 $0AAF1A9FRL #Keen sit %patch $3155E $0AAF1A9FRL #Keen sit %patch $3157C $0AAF1A9FRL #Keen sit %patch $3159A $0AAF1A9FRL #Keen sit %patch $315B8 $0AAF1A9FRL #Keen sit %patch $315D6 $0AAF1A9FRL #Keen sit #Keen's shot %patch $3185A $0CCB11A2RL #Keen's shot %patch $31878 $0CCB11A2RL #Keen's shot %patch $31896 $0CCB11A2RL #Keen's shot %patch $318B4 $0CCB11A2RL #Keen's shot #Keen's shot smash %patch $318D2 $090B17B5RL #Solid %patch $318F0 $090B17B5RL #Solid #Opening doors %patch $3190E $00000000L #Nothing %patch $3192C $00000000L #Nothing %patch $3194A $00000000L #Nothing ### #Map Keen ### #Sit %patch $316D2 $090B17B5RL #Solid #Wave %patch $316F0 $090B17B5RL #Solid %patch $3170E $090B17B5RL #Solid %patch $3172C $090B17B5RL #Solid %patch $3174A $090B17B5RL #Solid %patch $31768 $090B17B5RL #Solid %patch $31786 $090B17B5RL #Solid #Moving %patch $317A4 $090B17B5RL #Solid ### #Map K flags ### %patch $317E2 $090B17B5RL #Solid %patch $31800 $090B17B5RL #Solid %patch $3181E $090B17B5RL #Solid %patch $3183C $090B17B5RL #Solid