mirror of
https://github.com/RSDKModding/Sonic-Mania-Decompilation.git
synced 2024-11-23 05:49:56 +00:00
FUCK I LITERALLY NEVER PUSHED THESE???
This commit is contained in:
parent
478d45acf9
commit
2b023ba983
98
.github/workflows/build.yml
vendored
98
.github/workflows/build.yml
vendored
@ -1,98 +0,0 @@
|
||||
name: Build RSDKv5
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
# each artifact is like 15MB so we'll start by only doing it manually
|
||||
# on:
|
||||
# push:
|
||||
# branches:
|
||||
# - master
|
||||
|
||||
# TODO: readd with: submodules: recursive once we can
|
||||
|
||||
jobs:
|
||||
v5-windows:
|
||||
runs-on: windows-2022
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW32
|
||||
update: true
|
||||
install: pkg-config make git mingw-w64-i686-gcc mingw-w64-i686-SDL2 mingw-w64-i686-libogg mingw-w64-i686-libvorbis mingw-w64-i686-libtheora
|
||||
- name: Clone theoraplay & tinyxml2
|
||||
run: |
|
||||
git clone https://github.com/icculus/theoraplay dependencies/all/theoraplay
|
||||
git clone https://github.com/leethomason/tinyxml2 dependencies/all/tinyxml2
|
||||
- name: Build RSDKv5
|
||||
run: |
|
||||
windres RSDKv5/RSDKv5.rc -O coff -o RSDKv5/RSDKv5.res
|
||||
make -j8
|
||||
- name: Move artifacts
|
||||
run: |
|
||||
mkdir artifacts
|
||||
mv ./bin/Windows/*.dll ./artifacts
|
||||
mv ./bin/Windows/*.exe ./artifacts
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v1.0.0
|
||||
with:
|
||||
name: v5-windows
|
||||
path: artifacts
|
||||
v5-windows-x64:
|
||||
runs-on: windows-2022
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: true
|
||||
install: pkg-config make git mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2 mingw-w64-x86_64-libogg mingw-w64-x86_64-libvorbis mingw-w64-x86_64-libtheora
|
||||
- name: Clone theoraplay & tinyxml2
|
||||
run: |
|
||||
git clone https://github.com/icculus/theoraplay dependencies/all/theoraplay
|
||||
git clone https://github.com/leethomason/tinyxml2 dependencies/all/tinyxml2
|
||||
- name: Build RSDKv5
|
||||
run: |
|
||||
windres RSDKv5/RSDKv5.rc -O coff -o RSDKv5/RSDKv5.res
|
||||
make -j8
|
||||
- name: Move artifacts
|
||||
run: |
|
||||
mkdir artifacts
|
||||
mv ./bin/Windows/*.dll ./artifacts
|
||||
mv ./bin/Windows/*.exe ./artifacts
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v1.0.0
|
||||
with:
|
||||
name: v5-windows
|
||||
path: artifacts
|
||||
v5-linux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Clone theoraplay & tinyxml2
|
||||
run: |
|
||||
git clone https://github.com/icculus/theoraplay dependencies/all/theoraplay
|
||||
git clone https://github.com/leethomason/tinyxml2 dependencies/all/tinyxml2
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install libogg-dev libvorbis-dev libsdl2-dev libtheora-dev
|
||||
ls ./dependencies/all
|
||||
- name: Build RSDKv5
|
||||
run: make -j8
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: v5-linux
|
||||
path: bin
|
135
Makefile
Normal file
135
Makefile
Normal file
@ -0,0 +1,135 @@
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
PKGCONFIG = pkg-config
|
||||
STRIP ?= strip
|
||||
|
||||
STATIC ?= 1
|
||||
DEBUG ?= 1
|
||||
VERBOSE ?= 0
|
||||
PROFILE ?= 0
|
||||
|
||||
GAME_NAME ?= SonicMania
|
||||
GAME_SUFFIX ?= .so
|
||||
GAME_ALLC ?= 1
|
||||
|
||||
GAME_CFLAGS =
|
||||
GAME_LDFLAGS = -shared
|
||||
GAME_LIBS =
|
||||
|
||||
GAME_PREBUILD =
|
||||
GAME_PRELINK =
|
||||
GAME_POSTLINK =
|
||||
|
||||
DEFINES =
|
||||
|
||||
RSDK_REVISION ?= 2
|
||||
|
||||
# =============================================================================
|
||||
# Detect default platform if not explicitly specified
|
||||
# =============================================================================
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
PLATFORM ?= Windows
|
||||
else
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
PLATFORM ?= Linux
|
||||
endif
|
||||
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
PLATFORM ?= macOS
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
PLATFORM ?= Unknown
|
||||
|
||||
# =============================================================================
|
||||
|
||||
ifneq ("$(wildcard makefiles/$(PLATFORM).cfg)","")
|
||||
include makefiles/$(PLATFORM).cfg
|
||||
endif
|
||||
|
||||
OUTDIR = bin/$(PLATFORM)
|
||||
GAME_OBJDIR = bin/obj/$(PLATFORM)/$(GAME_NAME)
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
CFLAGS ?= $(CXXFLAGS)
|
||||
DEFINES += -DBASE_PATH='"$(BASE_PATH)"'
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
CXXFLAGS += -g
|
||||
CFLAGS += -g
|
||||
STRIP = :
|
||||
else
|
||||
CXXFLAGS += -O3
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifeq ($(STATIC),1)
|
||||
CXXFLAGS += -static
|
||||
CFLAGS += -static
|
||||
endif
|
||||
|
||||
ifeq ($(PROFILE),1)
|
||||
CXXFLAGS += -pg -g -fno-inline-functions -fno-inline-functions-called-once -fno-optimize-sibling-calls -fno-default-inline
|
||||
CFLAGS += -pg -g -fno-inline-functions -fno-inline-functions-called-once -fno-optimize-sibling-calls -fno-default-inline
|
||||
endif
|
||||
|
||||
ifeq ($(VERBOSE),0)
|
||||
CC := @$(CC)
|
||||
CXX := @$(CXX)
|
||||
endif
|
||||
|
||||
DEFINES += -DRETRO_STANDALONE=1
|
||||
DEFINES += -DRETRO_REVISION=$(RSDK_REVISION)
|
||||
|
||||
CFLAGS_ALL += $(CFLAGS) \
|
||||
-fsigned-char
|
||||
|
||||
CXXFLAGS_ALL += $(CXXFLAGS) \
|
||||
-std=c++17 \
|
||||
-fsigned-char \
|
||||
-fpermissive
|
||||
|
||||
LDFLAGS_ALL = $(LDFLAGS)
|
||||
|
||||
GAME_INCLUDES = \
|
||||
-I./$(GAME_NAME)/ \
|
||||
-I./$(GAME_NAME)/Objects/
|
||||
|
||||
GAME_SOURCES = \
|
||||
$(GAME_NAME)/Game
|
||||
|
||||
ifeq ($(GAME_ALLC),1)
|
||||
GAME_SOURCES += $(GAME_NAME)/Objects/All
|
||||
else
|
||||
# execute Game/objectmake.py?
|
||||
include $(GAME_NAME)/Objects.cfg
|
||||
endif
|
||||
|
||||
$(shell mkdir -p $(OUTDIR))
|
||||
|
||||
GAME_OBJECTS += $(addprefix $(GAME_OBJDIR)/, $(addsuffix .o, $(GAME_SOURCES)))
|
||||
GAME_PATH = $(OUTDIR)/$(GAME_NAME)$(GAME_SUFFIX)
|
||||
$(shell mkdir -p $(GAME_OBJDIR))
|
||||
|
||||
$(GAME_OBJDIR)/%.o: $(GAME_PREBUILD) %.c
|
||||
@mkdir -p $(@D)
|
||||
@echo compiling $<...
|
||||
$(CC) -c -fPIC $(CFLAGS_ALL) $(GAME_FLAGS) $(GAME_INCLUDES) $(DEFINES) $< -o $@
|
||||
@echo done $<
|
||||
|
||||
$(GAME_PATH): $(GAME_PRELINK) $(GAME_OBJECTS)
|
||||
@echo linking game...
|
||||
$(CXX) $(CXXFLAGS_ALL) $(LDFLAGS_ALL) $(GAME_LDFLAGS) $(GAME_OBJECTS) $(GAME_LIBS) -o $@
|
||||
$(STRIP) $@
|
||||
@echo done linking game
|
||||
|
||||
all: $(GAME_POSTLINK) $(GAME_PATH)
|
||||
|
||||
clean:
|
||||
rm -rf $(GAME_OBJDIR) && rm -rf $(GAME_PATH)
|
46
README.md
46
README.md
@ -2,17 +2,18 @@
|
||||
+ Without assets from the official releases, this decompilation will not run.
|
||||
|
||||
+ You can get the official release of Sonic Mania (Plus) from:
|
||||
* [Windows, via Steam](https://store.steampowered.com/app/584400/Sonic_Mania/)
|
||||
* [Windows, via the Epic Games Store](https://www.epicgames.com/store/en-US/p/sonic-mania)
|
||||
* [Windows, via Origin](https://www.origin.com/aus/en-us/store/sonic-the-hedgehog/sonic-mania)
|
||||
* [Windows]
|
||||
* [Via Steam](https://store.steampowered.com/app/584400/Sonic_Mania/)
|
||||
* [Via The Epic Games Store](https://www.epicgames.com/store/en-US/p/sonic-mania)
|
||||
* [Via Origin](https://www.origin.com/aus/en-us/store/sonic-the-hedgehog/sonic-mania)
|
||||
* [Switch, via the eShop](https://www.nintendo.com/games/detail/sonic-mania-switch/)
|
||||
* [PS4, via the Store](https://store.playstation.com/en-us/product/UP0177-CUSA07023_00-SONICMANIA000000)
|
||||
* [Xbox One, via the Store](https://www.xbox.com/en-US/games/store/sonic-mania/BXH46NQT9W4Q/0001)
|
||||
|
||||
Even if your platform isn't supported by the official releases, you **must** buy or officially download it for the assets (you don't need to run the official release, you just need the game assets)
|
||||
Even if your platform isn't supported by the official releases, you **must** buy or officially download it for the assets.
|
||||
|
||||
## **DO NOT USE THIS DECOMPILATION PROJECT AS A MEANS TO PIRATE SONIC MANIA.**
|
||||
We do not condone using this project as a means for piracy in any form, this project was made with love and care for the source material and was created for purely educational purposes.
|
||||
We do not condone using this project as a means for piracy in any form. This project was made with love and care for the source material and was created for purely educational purposes, and would not exist without the work of Sega, Headcannon, and Evening Star.
|
||||
|
||||
If you want to transfer your save from the official PC versions, you can just copy your savedata into the folder containing the decompilation!
|
||||
|
||||
@ -21,24 +22,21 @@ If you want to transfer your save from the official PC versions, you can just co
|
||||
* Added support for targeting RSDKv5U rather than standalone RSDKv5
|
||||
* Added all content from all released versions of the game. Including: 1.00 (Console initial release), 1.03 (PC initial release) & 1.06 (Plus update)
|
||||
|
||||
# How to Build
|
||||
Most platforms will heavily encourage you to build it in conjunction with RSDKv5. However, there are some options available for some platforms if you wish to build separately.
|
||||
|
||||
# How to build
|
||||
firstly, follow the steps in [the common dependency readme](./dependencies/all/README.md) to install the common dependencies, then follow the steps for your platform of choice.
|
||||
## Windows
|
||||
Open SonicMania.sln and build the project you wish to build.
|
||||
* Projects ending with `All` use the generated `All.c` file in-place of compiling each object seperately. Use for faster compilation speed.
|
||||
* Adversely, projects without `All` compile each object using their separate source files. Use for JIT-compiling.
|
||||
* The version you choose **must match up** with the RSDKv5 version you run. A v5U executable cannot run a v5 Mania, etc.
|
||||
|
||||
## Windows:
|
||||
- TODO
|
||||
## Linux/Make-like systems
|
||||
The makefile is a trimmed down version of the RSDKv5 makefile that only supports game compilation.
|
||||
By default, unlike the RSDK makefile, this will look for the default game name of `SonicMania` and use it as source and compile as such. Pass `GAME_NAME` to the makefile to change it/
|
||||
|
||||
## Linux:
|
||||
- TODO
|
||||
|
||||
## Mac:
|
||||
- TODO
|
||||
|
||||
## Android:
|
||||
- TODO
|
||||
|
||||
## Other platforms
|
||||
Currently the only supported platforms are the ones listed above, however the codebase has no major dependencies, so anything RSDKv5 can be built for, this can be built for.
|
||||
### Other platforms
|
||||
The only directly supported platforms are those listed above. Since Mania is very easy to build, requiring no dependencies, virtually any platform that can run RSDKv5 can compile Mania easily.
|
||||
|
||||
# FAQ
|
||||
### Q: I found a bug/I have a feature request!
|
||||
@ -47,11 +45,11 @@ A: Submit an issue in the issues tab and we _might_ fix it in the main branch. D
|
||||
### Q: Will you do a decompilation for Sonic CD (2011) and/or Sonic 1/2 (2013)?
|
||||
A: I already have! You can find Sonic CD [here](https://github.com/Rubberduckycooly/Sonic-CD-11-Decompilation) and Sonic 1/2 [here](https://github.com/Rubberduckycooly/Sonic-1-2-2013-Decompilation).
|
||||
|
||||
### Q: Will you do a decompilation for Sonic Origins/Sonic 3?
|
||||
A: No. This is the last decompilation from us. This project took about 1.5 years to do, and doing Sonic 3 would take equally as long, if not longer due to the rest of origins content. We would also like to expand our horizons beyond sonic going forward, and we don't wish to spend forever just playing catchup with sega's official releases.
|
||||
### Q: Will there be a decompilation for Sonic Origins/Sonic 3?
|
||||
A: No. This is the last decompilation from us. This project took about 1.5 years to do, and doing Sonic 3 would take equally as long, if not longer, as Sonic 3 is not only larger in scope, but Origins' hybrid codebase makes it harder to read. We would also like to expand our horizons beyond sonic going forward, and we don't wish to spend forever just playing catchup with Sega's official releases.
|
||||
|
||||
### Q: Do you have anymore decompilation projects in the works?
|
||||
A: Absolutely not. Between the last two and this one, I'm done with decompiling, at least for the time being. Please do not expect any more decompilations from us, Sonic or otherwise!
|
||||
### Q: Are there anymore decompilation projects in the works?
|
||||
A: Absolutely not. Between the last two and this one, we're done with decompiling, at least for the time being. Please do not expect any more decompilations from us, Sonic or otherwise!
|
||||
|
||||
# Special Thanks
|
||||
* [Chuli](https://github.com/MGRich) for general decompilation assistance, helping me fix bugs, tweaking up my sometimes sloppy code and generally being really helpful and fun to work with on this project
|
||||
|
@ -1,19 +1,19 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.32112.339
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SonicMania (All)", "SonicMania\SonicMania_All.vcxproj", "{036106BF-6DD0-4CB5-8F01-67C84F00CD6A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SonicMania", "SonicMania\SonicMania.vcxproj", "{E179BA4D-FEE4-49DC-B5A0-14A7AF1FBB06}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SonicMania (Pre-Plus)", "SonicMania\SonicMania_PrePlus.vcxproj", "{EEE41353-F9F9-491E-A325-85A98CF0B9AB}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SonicMania-All", "SonicMania\SonicMania_All.vcxproj", "{036106BF-6DD0-4CB5-8F01-67C84F00CD6A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SonicMania (v5U - All)", "SonicMania\SonicMania_All_Rev0U.vcxproj", "{7B03B2BA-760F-4438-9F66-DE14E3FE1F0C}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SonicMania-v5U", "SonicMania\SonicMania_Rev0U.vcxproj", "{32D6986C-F062-437C-A8F4-F1E0CD3B8B16}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SonicMania (v5U)", "SonicMania\SonicMania_Rev0U.vcxproj", "{32D6986C-F062-437C-A8F4-F1E0CD3B8B16}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SonicMania-v5U-All", "SonicMania\SonicMania_All_Rev0U.vcxproj", "{7B03B2BA-760F-4438-9F66-DE14E3FE1F0C}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SonicMania (Pre-Plus - All)", "SonicMania\SonicMania_All_PrePlus.vcxproj", "{2982AFB1-8EFD-4861-9E29-BBEABAF2372D}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SonicMania-PrePlus", "SonicMania\SonicMania_PrePlus.vcxproj", "{EEE41353-F9F9-491E-A325-85A98CF0B9AB}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SonicMania-PrePlus-All", "SonicMania\SonicMania_All_PrePlus.vcxproj", "{2982AFB1-8EFD-4861-9E29-BBEABAF2372D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
2
dependencies/RSDKv5
vendored
2
dependencies/RSDKv5
vendored
@ -1 +1 @@
|
||||
Subproject commit abdaba987f2b81654858472ade7ca8649b832b34
|
||||
Subproject commit 64ec98037a203015a53394d429003e7464c1d3a6
|
Loading…
Reference in New Issue
Block a user