A fork of CSE2 providing support and optimization for running on a Sun Ultra 1.
Find a file
Clownacy 145864cf2d Added sanity checks to the backends
This fixes the Texture backend bug that made the program take forever
to shut down:

The problem was that the font system would try to load a glyph that's
0 pixels wide/tall (likely the space character), which SDL2 didn't
like, so it would fail to allocate the texture, causing
Backend_CreateSurface, and by extension Backend_CreateGlyph, to
return a NULL. Later, upon shutdown, the font system would pass this
NULL to Backend_FreeGlyph, causing NULL pointer dereferences that
make the program take forever to shut down.

Personally, I think passing NULLs to the backend is valid behaviour,
so I've added a bunch of sanity checks to make sure they're never
dereferenced.
2019-07-24 23:34:16 +01:00
assets Now the build output directory is generated completely 2019-06-17 19:13:29 +00:00
bin2h Fix mystery CMake error 2019-06-16 19:33:30 +00:00
DoConfig Fixed DoConfig 2019-06-28 18:51:28 +01:00
external Undid changes to external images 2019-05-02 19:27:30 +02:00
msvc2003 Made Game.cpp ASM-accurate 2019-06-30 03:03:25 +01:00
src Added sanity checks to the backends 2019-07-24 23:34:16 +01:00
.gitattributes Added .gitattributes for normalisation and normalized a few sources files to LF (from CRLF) 2019-05-03 12:27:11 +02:00
.gitignore Now the build output directory is generated completely 2019-06-17 19:13:29 +00:00
CMakeLists.txt Update CMakeLists.txt, the Makefile, and the readme 2019-07-24 20:09:27 +01:00
Makefile Update CMakeLists.txt, the Makefile, and the readme 2019-07-24 20:09:27 +01:00
README.md Update CMakeLists.txt, the Makefile, and the readme 2019-07-24 20:09:27 +01:00
screenshot.png [ImgBot] Optimize images 2019-05-02 11:25:59 +00:00

Cave Story Engine 2

Cave Story Engine 2 is a decompilation of Cave Story, ported from DirectX to SDL2.

Screenshot

Dependencies

Note: with CMake, if these are not found, they will be built locally

  • SDL2
  • FreeType
  • FLTK

Building

CMake

This project primarily uses CMake, allowing it to be built with a range of compilers.

In this folder, create another folder called 'build', then switch to the command-line (Visual Studio users should open the Developer Command Prompt) and cd into it. After that, generate the files for your build system with:

cmake .. -DCMAKE_BUILD_TYPE=Release

You can also add the following flags:

  • -DJAPANESE=ON - Enable the Japanese-language build (instead of the unofficial Aeon Genesis English translation)
  • -DFIX_BUGS=ON - Fix bugs in the game (see src/Bug Fixes.txt)
  • -DNONPORTABLE=ON - Enable bits of code that aren't portable, but are what the original game used
  • -DFORCE_LOCAL_LIBS=ON - Compile the built-in versions of SDL2, FreeType, and FLTK instead of using the system-provided ones
  • -DRENDERER=OpenGL2 - Use the hardware-accelerated OpenGL 2.1 renderer
  • -DRENDERER=Texture - Use the hardware-accelerated SDL2 Texture API renderer (default)
  • -DRENDERER=Surface - Use the software-rendered SDL2 Surface API renderer
  • -DRENDERER=Software - Use a handwritten software renderer

Then compile CSE2 with this command:

cmake --build . --config Release

If you're a Visual Studio user, you can open the generated CSE2.sln file instead.

Once built, the executables and assets can be found in the newly-generated game folder.

Makefile (deprecated)

Note: this requires pkg-config

Run 'make' in this folder, preferably with some of the following settings:

  • RELEASE=1 - Compile a release build (optimised, stripped, etc.)
  • STATIC=1 - Produce a statically-linked executable (good for Windows builds, so you don't need to bundle DLL files)
  • JAPANESE=1 - Enable the Japanese-language build (instead of the unofficial Aeon Genesis English translation)
  • FIX_BUGS=1 - Fix bugs in the game (see src/Bug Fixes.txt)
  • WINDOWS=1 - Enable Windows-only features like a unique file/taskbar icon, and system font loading (needed for the font setting in Config.dat to do anything)
  • RASPBERRY_PI=1 - Enable tweaks to improve performance on Raspberry Pis
  • NONPORTABLE=1 - Enable bits of code that aren't portable, but are what the original game used
  • RENDERER=OpenGL2 - Use the hardware-accelerated OpenGL 2.1 renderer
  • RENDERER=Texture - Use the hardware-accelerated SDL2 Texture API renderer (default)
  • RENDERER=Surface - Use the software-rendered SDL2 Surface API renderer
  • RENDERER=Software - Use a hand-written software renderer

Visual Studio .NET 2003

Project files for Visual Studio .NET 2003 are available in the 'msvc2003' folder.

Visual Studio .NET 2003 was used by Pixel to create the original Doukutsu.exe, so these project files allow us to check the accuracy of the decompilation by comparing the generated assembly code to that of the original executable.

This option is strictly for checking the decompilation's accuracy; CMake should be preferred in all other situations.

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 license for our own code.