1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

readme.md: Minor formatting (#3397)

[ci skip]
This commit is contained in:
Steven Vascellaro
2016-04-23 05:29:14 -04:00
committed by Ted John
parent ffcb01da91
commit aee9a34511

View File

@@ -34,7 +34,7 @@ An open source re-implementation of Roller Coaster Tycoon 2. A construction and
**OpenRCT2** is an attempt to decompile RollerCoaster Tycoon 2 into C. RollerCoaster Tycoon 2 was originally written in MASM and Visual C++ where functions related to interfacing with the operating system were written in C (supposedly 1%), with the rest of the game being written in pure x86 assembly. For an example of this method, OpenTTD was formed through a similar procedure; the original game, Transport Tycoon Deluxe, was decompiled into C which allowed for the addition of thousands of features to the game. RollerCoaster Tycoon 2 uses the third version of Chris Sawyer's engine, which shares some code with Transport Tycoon. This is reflected in the usage of OpenTTD 0.1 code such as the windowing system and graphics rendering. While the version of the engine used in Chris Sawyer's Locomotion is newer, OpenRCT2 is currently targeting the RollerCoaster Tycoon 2 engine to ease the decompilation process. **OpenRCT2** is an attempt to decompile RollerCoaster Tycoon 2 into C. RollerCoaster Tycoon 2 was originally written in MASM and Visual C++ where functions related to interfacing with the operating system were written in C (supposedly 1%), with the rest of the game being written in pure x86 assembly. For an example of this method, OpenTTD was formed through a similar procedure; the original game, Transport Tycoon Deluxe, was decompiled into C which allowed for the addition of thousands of features to the game. RollerCoaster Tycoon 2 uses the third version of Chris Sawyer's engine, which shares some code with Transport Tycoon. This is reflected in the usage of OpenTTD 0.1 code such as the windowing system and graphics rendering. While the version of the engine used in Chris Sawyer's Locomotion is newer, OpenRCT2 is currently targeting the RollerCoaster Tycoon 2 engine to ease the decompilation process.
## 1.2 Decompiling the game ## 1.2 Decompiling the game
In order to decompile the game gradually without introducing new bugs, each procedure in RollerCoaster Tycoon 2 is to be re-written in C on an individual basis. To test the accuracy of the re-written procedures, the decompiled C procedures are compiled into a DLL (```openrct2.dll```) which exports an entry procedure mimicking the ```WinMain``` function in RollerCoaster Tycoon 2. The original executable ```rct2.exe``` has been patched so that ```openrct2.dll``` and ```WinMain``` are in the DLL import table and the ```WinMain``` export procedure in ```openrct2.dll``` is called at the start of the WinMain procedure in ```rct2.exe``` before returning. With this system implemented, starting rct2.exe calls the new DLL as part of its initialization; the DLL can then run all the decompiled code whilst still being able to read / write to the ```rct2.exe``` memory model and run ```rct2.exe``` procedures. In order to decompile the game gradually without introducing new bugs, each procedure in RollerCoaster Tycoon 2 is to be re-written in C on an individual basis. To test the accuracy of the re-written procedures, the decompiled C procedures are compiled into a DLL (```openrct2.dll```) which exports an entry procedure mimicking the ```WinMain``` function in RollerCoaster Tycoon 2. The original executable ```rct2.exe``` has been patched so that ```openrct2.dll``` and ```WinMain``` are in the DLL import table and the ```WinMain``` export procedure in ```openrct2.dll``` is called at the start of the ``WinMain`` procedure in ```rct2.exe``` before returning. With this system implemented, starting ```rct2.exe``` calls the new DLL as part of its initialization; the DLL can then run all the decompiled code whilst still being able to read / write to the ```rct2.exe``` memory model and run ```rct2.exe``` procedures.
The project therefore acts as a patch to RollerCoaster Tycoon 2, allowing each procedure to be gradually implemented while simultaneously adding new features where possible. Until all procedures of the original game are re-written in C, the project must remain a DLL which is called from the patched ```rct2.exe```. The project therefore acts as a patch to RollerCoaster Tycoon 2, allowing each procedure to be gradually implemented while simultaneously adding new features where possible. Until all procedures of the original game are re-written in C, the project must remain a DLL which is called from the patched ```rct2.exe```.
@@ -97,7 +97,7 @@ These PowerShell scripts are stored in ```.\scripts\ps``` and have parameters. O
### Mac OS X: ### Mac OS X:
We support native builds OS X (limited to i386 only for now). We support native builds OS X (limited to i386 only for now).
Make sure that you have [Homebrew](http://brew.sh/) installed and than run the following commands to install all the needed libraries and build openrct2. Make sure that you have [Homebrew](http://brew.sh/) installed and than run the following commands to install all the needed libraries and build OpenRCT2.
``` ```
# Install libraries # Install libraries
./install.sh ./install.sh