Rex
From SMWiki
Rex is a dinosaur foe from Super Mario World.
[edit] General Information
Rexes first appear in the very first level of Super Mario World, where they shuffle slowly forward. They are bipedal purple dinosaurs with orange bellies and tiny red wings on their backs. They wear red boots. They have a single horn growing from their snouts, but this does not prevent Mario from stomping them. Once stomped, a Rex is flattened like an accordian, reduced to half its height. In this shortened state, Rexes move twice as fast. Another stomp will flatten them for good. A spin jump will finish Rex with just one stomp, and unlike other foes, Mario can bounce up after spin jumping a Rex instead of just falling straight through to the ground.
With SMW's Goombas being spherical carryable enemies, it is possible that Rexes were meant to be a Goomba replacement of sorts. Flattening them is deeply satisfying, but they're also vulnerable to virtually any of Mario's other attacks. (Sliding down a hill is an exception, merely flattening them if when sliding downhill and hurting Mario when sliding uphill.)
[edit] Hacking Information
Rexes are sprite AB. They use the blue palette B. Rexes are only useable with the Banzai Bill/Mega Mole sprite set. (SP4=GFX 20) Since it takes two stomps to finish a Rex, a few of them in a line can be used by a skilled player to earn 1-ups.
Rexes were used as a base for many of mikeyk's custom sprites, and there is a full disassembly of their code available which can be used as a starting point for creating other sprites.
[edit] Related ROM Addresses
Rex's Tilemap
0x1984C [FC 00 FC 00 FE 00 00 00 00 00 00 08] Rex tile horizontal displacement table left
0x19858 [04 00 04 00 02 00 00 00 00 00 08 00] Rex tile horizontal displacement table right
0x19864 [?] Rex vertical displacement table
0x19870 [8A AA 8A AC 8A AA 8C 8C A8 A8] Rex's tilemap
0x1987C [?] Rex's tile settings left
0x1987D [?] Rex's tile settings right
Physics
0x19713 [08 F8] Normal Rex walking speed
0x19715 [10 F0] Squished Rex walking speed
Miscellaneous
0x19742 [07] Change to 00 to make all Rexes start small
Health Points
0x197B8 [02] Rex's HP
Sound Effects
0x1983B [7F] Sound effect that plays when a Rex is stomped

