shithub: cstory

Download patch

ref: 20cbb8cc733f10d5156cf8fa6f2e165d0a3fccbb
parent: c8e1e7aa0abd8805536678a9cd520dd6d696b50f
author: Clownacy <Clownacy@users.noreply.github.com>
date: Sat Aug 29 13:03:26 EDT 2020

Unlist the dead branches, and reformat the readme

Now actually readable in a text editor

--- a/README.md
+++ b/README.md
@@ -2,16 +2,12 @@
 
 ## Table of Contents
 
-This repo has multiple branches:
+This repo has two main branches:
 
 Branch | Description
 --------|--------
-[accurate](https://www.github.com/Clownacy/CSE2/tree/accurate) | The main decompilation branch. The code intended to be as close to the original as possible, down to all the bugs and platform-dependencies.
+[accurate](https://www.github.com/Clownacy/CSE2/tree/accurate) | The main decompilation branch. The code is intended to be as close to the original as possible, down to all the bugs and platform-dependencies.
 [portable](https://www.github.com/Clownacy/CSE2/tree/portable) | This branch ports the engine away from WinAPI and DirectX, and addresses numerous portability issues, allowing it to run on other platforms.
-[enhanced-lite](https://www.github.com/Clownacy/CSE2/tree/enhanced-lite) | Based on the `portable` branch, this branch is **intended for modders**, and adds several enhancements and features to the engine.
-[enhanced](https://www.github.com/Clownacy/CSE2/tree/enhanced) | Based on the `enhanced-lite` branch, this branch is **intended for players**, and adds further enhancements and features to the engine.
-[emscripten](https://www.github.com/Clownacy/CSE2/tree/emscripten) | Modifies the engine to build with Emscripten, [allowing it to run in web browsers](http://sonicresearch.org/clownacy/cave.html) (no longer maintained).
-[wii](https://www.github.com/Clownacy/CSE2/tree/wii) | Ports the engine to the Nintendo Wii (no longer maintained).
 
 # CSE2
 
@@ -21,31 +17,58 @@
 
 ## Background
 
-When Pixel made Cave Story, he compiled the original Windows EXE with no optimisations. This left the generated assembly code extremely verbose and easy to read. It also made the code very decompiler-friendly, since the assembly could be mapped directly back to the original C(++) code.
+When Pixel made Cave Story, he compiled the original Windows EXE with no
+optimisations. This left the generated assembly code extremely verbose and easy
+to read. It also made the code very decompiler-friendly, since the assembly
+could be mapped directly back to the original C(++) code.
 
-Technically, this alone made a decompilation feasible, as was the case for [the Super Mario 64 decompilation project](https://github.com/n64decomp/sm64) - however, there was more to be found...
+Technically, this alone made a decompilation feasible, as was the case for [the
+Super Mario 64 decompilation project](https://github.com/n64decomp/sm64) -
+however, there was more to be found...
 
-In 2007, a Linux port of Cave Story was made by Peter Mackay and Simon Parzer. Details about it can be found on [Peter's old blog](https://web.archive.org/web/20070911202919/http://aaiiee.wordpress.com:80/). This port received an update in 2011, including two shiny new executables. What Peter and Simon didn't realise was that they left huge amounts of debugging information in these executables, including the names of every C++ source file, as well as the variables, functions, and structs they contained.
+In 2007, a Linux port of Cave Story was made by Peter Mackay and Simon Parzer.
+Details about it can be found on [Peter's old blog](https://web.archive.org/web/20070911202919/http://aaiiee.wordpress.com:80/).
+This port received an update in 2011, including two shiny new executables. What
+Peter and Simon didn't realise was that they left huge amounts of debugging
+information in these executables, including the names of every C++ source file,
+as well as the variables, functions, and structs they contained.
 
-This was a goldmine of information about not just the game's inner-workings, but its _source code._ This is the same lucky-break [the Diablo decompilation project](https://github.com/diasurgical/devilution) had. With it, much of the game's code was pre-documented and explained _for_ us, saving us the effort of doing it ourselves. In fact, the combination of easy-to-decompile code, and a near-full set of function/variable names, reduced much of the decompilation process to mere copy-paste.
+This was a goldmine of information about not just the game's inner-workings, but
+its _source code._ This is the same lucky-break [the Diablo decompilation project](https://github.com/diasurgical/devilution)
+had. With it, much of the game's code was pre-documented and explained _for_ us,
+saving us the effort of doing it ourselves. In fact, the combination of
+easy-to-decompile code, and a near-full set of function/variable names, reduced
+much of the decompilation process to mere copy-paste.
 
-To top it all off, some of Cave Story's original source code would eventually see the light of day...
+To top it all off, some of Cave Story's original source code would eventually
+see the light of day...
 
-In early 2018, the Organya music engine was [released on GitHub](https://github.com/shbow/organya) by an old friend of Pixel's. On top of providing an insight into Pixel's coding style, this helped with figuring out one of the most complex parts of Cave Story's codebase.
+In early 2018, the Organya music engine was [released on GitHub](https://github.com/shbow/organya)
+by an old friend of Pixel's. On top of providing an insight into Pixel's coding
+style, this helped with figuring out one of the most complex parts of Cave
+Story's codebase.
 
-And... that's it! It's not often that a game this decompilable comes along, so I'm glad that Cave Story was one of them. [Patching a dusty old executable from 2004 has its downsides](https://github.com/Clownacy/Cave-Story-Mod-Loader/blob/master/src/mods/graphics_enhancement/widescreen/patch_camera.c).
+And... that's it! It's not often that a game this decompilable comes along, so
+I'm glad that Cave Story was one of them. [Patching a dusty old executable from 2004 has its downsides](https://github.com/Clownacy/Cave-Story-Mod-Loader/blob/master/src/mods/graphics_enhancement/widescreen/patch_camera.c).
 
 ## Building
 
 ### Visual Studio .NET 2003
 
-Project files for Visual Studio .NET 2003 are available, and can be found in the 'vs2003' folder.
+Project files for Visual Studio .NET 2003 are available, and can be found in the
+'vs2003' folder.
 
-As proven by the original `Doukutsu.exe`'s [Rich Header](http://bytepointer.com/articles/the_microsoft_rich_header.htm), Pixel used Visual Studio .NET 2003 to compile Cave Story. This means these project files allow us to check the accuracy of the decompilation by comparing the generated assembly code to that of the original executable. The tool for this can be found in the 'devilution' folder.
+As proven by the original `Doukutsu.exe`'s [Rich Header](http://bytepointer.com/articles/the_microsoft_rich_header.htm),
+Pixel used Visual Studio .NET 2003 to compile Cave Story. This means these
+project files allow us to check the accuracy of the decompilation by comparing
+the generated assembly code to that of the original executable. The tool for
+this can be found in the 'devilution' folder.
 
 ### CMake (Visual Studio & MinGW-w64)
 
-Switch to the terminal (Visual Studio users should open the [Developer Command Prompt](https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs)) and `cd` into this folder. After that, generate the files for your build system with:
+Switch to the terminal (Visual Studio users should open the [Developer Command Prompt](https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs))
+and `cd` into this folder. After that, generate the files for your build system
+with:
 
 ```
 cmake -B build -DCMAKE_BUILD_TYPE=Release
@@ -71,9 +94,11 @@
 cmake --build build --config Release
 ```
 
-If you're a Visual Studio user, you can open the generated `CSE2.sln` file instead, which can be found in the `build` folder.
+If you're a Visual Studio user, you can open the generated `CSE2.sln` file
+instead, which can be found in the `build` folder.
 
-Once built, the executable can be found in the `game_english`/`game_japanese` folder, depending on the selected language.
+Once built, the executable can be found in the `game_english`/`game_japanese`
+folder, depending on the selected language.
 
 ### Makefile (MinGW-w64) \[deprecated - use CMake instead\]
 
@@ -89,8 +114,11 @@
 
 You can pass your own compiler flags by defining `CXXFLAGS`.
 
-Once built, the executable can be found in the `game_english`/`game_japanese` folder, depending on the selected language.
+Once built, the executable can be found in the `game_english`/`game_japanese`
+folder, depending on the selected language.
 
 ## Licensing
 
-Being a decompilation, the majority of the code in this project belongs to Daisuke "Pixel" Amaya - not us. We've yet to agree on a licence for our own code.
+Being a decompilation, the majority of the code in this project belongs to
+Daisuke "Pixel" Amaya - not us. We've yet to agree on a licence for our own
+code.