mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 07:14:31 +01:00
Updated Decompiling Tips IDA (markdown)
@@ -165,7 +165,7 @@ edx = RCT2_ADDRESS(RCT2_ADDRESS_RIDE_LIST, rct_ride)[current_ride_index];
|
||||
|
||||
This stores in edx the beginning of data from a ride instance. The ride instance data follows the layout described [here][sv6].
|
||||
|
||||
[sv6]: https://github.com/IntelOrca/OpenRCT2/wiki/SV6-Ride-Structure
|
||||
[sv6]: https://github.com/OpenRCT2/OpenRCT2/wiki/SV6-Ride-Structure
|
||||
|
||||
In general if you see something that is multiplied by 0x260 then its quite likely that it is a ride that is being references as rides are 0x260 bytes. Sprites are 0x100 and instead of multiplied by the number it is normally left shifted by 8 (<<8). This makes it very easy to work out what a loop is iterating over.
|
||||
|
||||
@@ -225,6 +225,6 @@ This is tricky, and note that the addresses in the [Tycoon Technical Depot][ttd]
|
||||
|
||||
You can also read through the code in the OpenRCT2 project, especially the addresses in [src/addresses.h][addresses], which contains a very useful list of important addresses in the game. Most of the functions in the OpenRCT2 C code list the address of the corresponding subroutine in the docstring.
|
||||
|
||||
[addresses]: https://github.com/IntelOrca/OpenRCT2/blob/master/src/addresses.h
|
||||
[addresses]: https://github.com/OpenRCT2/OpenRCT2/blob/master/src/addresses.h
|
||||
|
||||
Another approach is to work backwards from the strings or windows that exist in the game to the subroutines that you want to change. That is, find a string like "Too high for supports!" and try to figure out where it is used in the game, by searching for the hex representation of its ID.
|
||||
Reference in New Issue
Block a user