Sonic 2 Speedometer, Boost Meter, and Ring Finder A Lua script for the Gens Rerecording branch
Posted 06 May 2012 - 04:00 AM
Update: I've completed Sonic 3 and Knuckles compatibility. http://pastebin.com/m5jrzGtD Next, of course, is Sonic 1 compatibility, but the information on S1 seems incomplete compared to S2 and S3&K.
This post has been edited by Dr. D'nar: 06 May 2012 - 04:00 AM
Posted 07 May 2012 - 06:45 PM
The entries in the object respawn table has to be computed by parsing the level's object data. Each entry in object data is 6 bytes long; bit 7 (the most significant bit) of the fifth byte (offset +4 from start of entry) indicates whether or not the object has an entry on object respawn. The first object with an object respawn entry has entry equal to 0; add 1 for each subsequent object. The actual object respawn entry for any given object is at $FFFFFC02 + object respawn entry; if bit 7 is set, the object has been destroyed/collected.