├── .clang-format ├── .github └── workflows │ └── switch.yml ├── .gitignore ├── .gitmodules ├── Android.mk ├── LICENSE.md ├── Makefile ├── Makefile.msys2 ├── Makefile_cfgs └── Platforms │ ├── Linux.cfg │ ├── Switch.cfg │ ├── Unknown.cfg │ ├── WiiU.cfg │ └── Windows.cfg ├── README.md ├── RSDKv4 ios.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── WorkspaceSettings.xcsettings │ └── xcuserdata │ │ └── rubberduckycooly.xcuserdatad │ │ └── WorkspaceSettings.xcsettings └── xcshareddata │ └── xcschemes │ └── RSDKv4.xcscheme ├── RSDKv4.SDL1.sln ├── RSDKv4.UWP.sln ├── RSDKv4.sln ├── RSDKv4.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── WorkspaceSettings.xcsettings │ └── xcuserdata │ │ └── rubberduckycooly.xcuserdatad │ │ └── WorkspaceSettings.xcsettings └── xcshareddata │ └── xcschemes │ └── RSDKv4.xcscheme ├── RSDKv4 ├── Animation.cpp ├── Animation.hpp ├── Audio.cpp ├── Audio.hpp ├── Collision.cpp ├── Collision.hpp ├── Debug.cpp ├── Debug.hpp ├── Drawing.cpp ├── Drawing.hpp ├── Ini.cpp ├── Ini.hpp ├── Input.cpp ├── Input.hpp ├── Math.cpp ├── Math.hpp ├── ModAPI.cpp ├── ModAPI.hpp ├── NativeObjects │ ├── AboutScreen.cpp │ ├── AboutScreen.hpp │ ├── AchievementDisplay.cpp │ ├── AchievementDisplay.hpp │ ├── AchievementsButton.cpp │ ├── AchievementsButton.hpp │ ├── AchievementsMenu.cpp │ ├── AchievementsMenu.hpp │ ├── All.cpp │ ├── BackButton.cpp │ ├── BackButton.hpp │ ├── CWSplash.cpp │ ├── CWSplash.hpp │ ├── CreditText.cpp │ ├── CreditText.hpp │ ├── DialogPanel.cpp │ ├── DialogPanel.hpp │ ├── FadeScreen.cpp │ ├── FadeScreen.hpp │ ├── InstructionsScreen.cpp │ ├── InstructionsScreen.hpp │ ├── LeaderboardsButton.cpp │ ├── LeaderboardsButton.hpp │ ├── MenuBG.cpp │ ├── MenuBG.hpp │ ├── MenuControl.cpp │ ├── MenuControl.hpp │ ├── ModInfoButton.cpp │ ├── ModInfoButton.hpp │ ├── ModsButton.cpp │ ├── ModsButton.hpp │ ├── ModsMenu.cpp │ ├── ModsMenu.hpp │ ├── MultiplayerButton.cpp │ ├── MultiplayerButton.hpp │ ├── MultiplayerHandler.cpp │ ├── MultiplayerHandler.hpp │ ├── MultiplayerScreen.cpp │ ├── MultiplayerScreen.hpp │ ├── NativeObjects.hpp │ ├── OptionsButton.cpp │ ├── OptionsButton.hpp │ ├── OptionsMenu.cpp │ ├── OptionsMenu.hpp │ ├── PauseMenu.cpp │ ├── PauseMenu.hpp │ ├── PlayerSelectScreen.cpp │ ├── PlayerSelectScreen.hpp │ ├── PushButton.cpp │ ├── PushButton.hpp │ ├── RecordsScreen.cpp │ ├── RecordsScreen.hpp │ ├── RetroGameLoop.cpp │ ├── RetroGameLoop.hpp │ ├── SaveSelect.cpp │ ├── SaveSelect.hpp │ ├── SegaIDButton.cpp │ ├── SegaIDButton.hpp │ ├── SegaSplash.cpp │ ├── SegaSplash.hpp │ ├── SettingsScreen.cpp │ ├── SettingsScreen.hpp │ ├── StaffCredits.cpp │ ├── StaffCredits.hpp │ ├── StartGameButton.cpp │ ├── StartGameButton.hpp │ ├── SubMenuButton.cpp │ ├── SubMenuButton.hpp │ ├── TextLabel.cpp │ ├── TextLabel.hpp │ ├── TimeAttack.cpp │ ├── TimeAttack.hpp │ ├── TimeAttackButton.cpp │ ├── TimeAttackButton.hpp │ ├── TitleScreen.cpp │ ├── TitleScreen.hpp │ ├── VirtualDPad.cpp │ ├── VirtualDPad.hpp │ ├── VirtualDPadM.cpp │ ├── VirtualDPadM.hpp │ ├── ZoneButton.cpp │ └── ZoneButton.hpp ├── Networking.cpp ├── Networking.hpp ├── Object.cpp ├── Object.hpp ├── Palette.cpp ├── Palette.hpp ├── RSDKv4 Decomp Icon.ico ├── RSDKv4.SDL1.vcxproj ├── RSDKv4.SDL1.vcxproj.filters ├── RSDKv4.rc ├── RSDKv4.vcxproj ├── RSDKv4.vcxproj.filters ├── Reader.cpp ├── Reader.hpp ├── Renderer.cpp ├── Renderer.hpp ├── RetroEngine.cpp ├── RetroEngine.hpp ├── Scene.cpp ├── Scene.hpp ├── Scene3D.cpp ├── Scene3D.hpp ├── Script.cpp ├── Script.hpp ├── Sprite.cpp ├── Sprite.hpp ├── String.cpp ├── String.hpp ├── Text.cpp ├── Text.hpp ├── Userdata.cpp ├── Userdata.hpp ├── fcaseopen.c ├── fcaseopen.h ├── main.cpp └── resource.h ├── Server ├── Makefile ├── Makefile.msys2 ├── Server.cpp ├── Server.vcxproj └── Server.vcxproj.filters ├── Sonic1Decomp.UWP ├── Assets │ ├── LargeTile.scale-100.png │ ├── LargeTile.scale-125.png │ ├── LargeTile.scale-150.png │ ├── LargeTile.scale-200.png │ ├── LargeTile.scale-400.png │ ├── SmallTile.scale-100.png │ ├── SmallTile.scale-125.png │ ├── SmallTile.scale-150.png │ ├── SmallTile.scale-200.png │ ├── SmallTile.scale-400.png │ ├── SplashScreen.scale-100.png │ ├── SplashScreen.scale-125.png │ ├── SplashScreen.scale-150.png │ ├── SplashScreen.scale-200.png │ ├── SplashScreen.scale-400.png │ ├── Square150x150Logo.scale-100.png │ ├── Square150x150Logo.scale-125.png │ ├── Square150x150Logo.scale-150.png │ ├── Square150x150Logo.scale-200.png │ ├── Square150x150Logo.scale-400.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-16.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-24.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-256.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-32.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-48.png │ ├── Square44x44Logo.altform-unplated_targetsize-16.png │ ├── Square44x44Logo.altform-unplated_targetsize-24.png │ ├── Square44x44Logo.altform-unplated_targetsize-256.png │ ├── Square44x44Logo.altform-unplated_targetsize-32.png │ ├── Square44x44Logo.altform-unplated_targetsize-48.png │ ├── Square44x44Logo.scale-100.png │ ├── Square44x44Logo.scale-125.png │ ├── Square44x44Logo.scale-150.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.scale-400.png │ ├── Square44x44Logo.targetsize-16.png │ ├── Square44x44Logo.targetsize-24.png │ ├── Square44x44Logo.targetsize-256.png │ ├── Square44x44Logo.targetsize-32.png │ ├── Square44x44Logo.targetsize-48.png │ ├── StoreLogo.scale-100.png │ ├── StoreLogo.scale-125.png │ ├── StoreLogo.scale-150.png │ ├── StoreLogo.scale-200.png │ ├── StoreLogo.scale-400.png │ ├── WideTile.scale-100.png │ ├── WideTile.scale-125.png │ ├── WideTile.scale-150.png │ ├── WideTile.scale-200.png │ └── WideTile.scale-400.png ├── Package.appxmanifest ├── PropertySheet.props ├── Sonic1Decomp.UWP.vcxproj ├── Sonic1Decomp.UWP.vcxproj.filters └── packages.config ├── Sonic2Decomp.UWP ├── Assets │ ├── LargeTile.scale-100.png │ ├── LargeTile.scale-125.png │ ├── LargeTile.scale-150.png │ ├── LargeTile.scale-200.png │ ├── LargeTile.scale-400.png │ ├── SmallTile.scale-100.png │ ├── SmallTile.scale-125.png │ ├── SmallTile.scale-150.png │ ├── SmallTile.scale-200.png │ ├── SmallTile.scale-400.png │ ├── SplashScreen.scale-100.png │ ├── SplashScreen.scale-125.png │ ├── SplashScreen.scale-150.png │ ├── SplashScreen.scale-200.png │ ├── SplashScreen.scale-400.png │ ├── Square150x150Logo.scale-100.png │ ├── Square150x150Logo.scale-125.png │ ├── Square150x150Logo.scale-150.png │ ├── Square150x150Logo.scale-200.png │ ├── Square150x150Logo.scale-400.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-16.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-24.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-256.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-32.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-48.png │ ├── Square44x44Logo.altform-unplated_targetsize-16.png │ ├── Square44x44Logo.altform-unplated_targetsize-256.png │ ├── Square44x44Logo.altform-unplated_targetsize-32.png │ ├── Square44x44Logo.altform-unplated_targetsize-48.png │ ├── Square44x44Logo.scale-100.png │ ├── Square44x44Logo.scale-125.png │ ├── Square44x44Logo.scale-150.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.scale-400.png │ ├── Square44x44Logo.targetsize-16.png │ ├── Square44x44Logo.targetsize-24.png │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── Square44x44Logo.targetsize-256.png │ ├── Square44x44Logo.targetsize-32.png │ ├── Square44x44Logo.targetsize-48.png │ ├── StoreLogo.scale-100.png │ ├── StoreLogo.scale-125.png │ ├── StoreLogo.scale-150.png │ ├── StoreLogo.scale-200.png │ ├── StoreLogo.scale-400.png │ ├── WideTile.scale-100.png │ ├── WideTile.scale-125.png │ ├── WideTile.scale-150.png │ ├── WideTile.scale-200.png │ └── WideTile.scale-400.png ├── Package.appxmanifest ├── PropertySheet.props ├── Sonic12Decomp.UWP.vcxproj.filters ├── Sonic2Decomp.UWP.vcxproj ├── Sonic2Decomp.UWP.vcxproj.filters └── packages.config ├── android ├── app │ ├── build.gradle │ ├── jni │ │ ├── Android.mk │ │ ├── Application.mk │ │ ├── CMakeLists.txt │ │ ├── SDL │ │ └── src │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ ├── com │ │ │ └── decomp │ │ │ │ └── rsdkv4 │ │ │ │ └── RSDKv4.java │ │ └── org │ │ │ └── libsdl │ │ │ └── app │ │ │ ├── HIDDevice.java │ │ │ ├── HIDDeviceBLESteamController.java │ │ │ ├── HIDDeviceManager.java │ │ │ ├── HIDDeviceUSB.java │ │ │ ├── SDL.java │ │ │ ├── SDLActivity.java │ │ │ ├── SDLAudioManager.java │ │ │ └── SDLControllerManager.java │ │ └── res │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── values-v27 │ │ └── styles.xml │ │ └── values │ │ ├── colors.xml │ │ ├── ic_launcher_background.xml │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── dependencies ├── all │ └── dependencies.txt ├── android │ ├── config_types.h │ └── dependencies.txt ├── ios │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ └── LaunchScreen.storyboard │ ├── Default.png │ └── dependencies.txt ├── mac │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── RSDKv4 Decomp Icon-1024.png │ │ │ ├── RSDKv4 Decomp Icon-128.png │ │ │ ├── RSDKv4 Decomp Icon-16.png │ │ │ ├── RSDKv4 Decomp Icon-256.png │ │ │ ├── RSDKv4 Decomp Icon-257.png │ │ │ ├── RSDKv4 Decomp Icon-32.png │ │ │ ├── RSDKv4 Decomp Icon-33.png │ │ │ ├── RSDKv4 Decomp Icon-512.png │ │ │ ├── RSDKv4 Decomp Icon-513.png │ │ │ └── RSDKv4 Decomp Icon-64.png │ │ └── Contents.json │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Info.plist │ ├── RSDKv4.entitlements │ ├── cocoaHelpers.hpp │ ├── cocoaHelpers.mm │ ├── dependencies.txt │ └── icons │ │ ├── RSDKv4 Decomp Icon-1024.png │ │ ├── RSDKv4 Decomp Icon-128.png │ │ ├── RSDKv4 Decomp Icon-16.png │ │ ├── RSDKv4 Decomp Icon-256.png │ │ ├── RSDKv4 Decomp Icon-32.png │ │ ├── RSDKv4 Decomp Icon-512.png │ │ └── RSDKv4 Decomp Icon-64.png ├── windows-uwp │ ├── WinRTIncludes.hpp │ └── dependencies.txt └── windows │ └── dependencies.txt ├── flatpak ├── README.md ├── com.sega.Sonic1.appdata.xml ├── com.sega.Sonic1.desktop ├── com.sega.Sonic1.json ├── com.sega.Sonic1.png ├── com.sega.Sonic2.appdata.xml ├── com.sega.Sonic2.desktop ├── com.sega.Sonic2.json └── com.sega.Sonic2.png ├── header.png ├── icon_s1.jpg ├── icon_s2.jpg └── props ├── winactions.props └── winactions_x64.props /.clang-format: -------------------------------------------------------------------------------- 1 | IndentWidth: 4 2 | Language: Cpp 3 | AlignAfterOpenBracket: Align 4 | SortIncludes: false 5 | ColumnLimit: 150 6 | PointerAlignment: Right 7 | AccessModifierOffset: -4 8 | AllowShortFunctionsOnASingleLine: All 9 | AllowShortCaseLabelsOnASingleLine: true 10 | #AllowShortLambdasOnASingleLine: All 11 | AllowShortLoopsOnASingleLine: true 12 | BinPackArguments: true 13 | BinPackParameters: true 14 | SpaceAfterCStyleCast: false 15 | BreakBeforeBraces: Attach 16 | BreakBeforeTernaryOperators: true 17 | BreakBeforeBinaryOperators: NonAssignment 18 | Cpp11BracedListStyle: false 19 | IndentCaseLabels: true 20 | AlignTrailingComments: true 21 | AlignOperands: true 22 | AlignConsecutiveAssignments: true 23 | AlignConsecutiveDeclarations: false 24 | AlignConsecutiveMacros: true 25 | UseTab: Never 26 | BreakBeforeBraces: Custom 27 | BraceWrapping: 28 | AfterClass: true 29 | AfterControlStatement: false 30 | AfterEnum: false 31 | AfterFunction: true 32 | AfterNamespace: true 33 | AfterObjCDeclaration: false 34 | AfterStruct: false 35 | AfterUnion: false 36 | BeforeCatch: false 37 | BeforeElse: true 38 | IndentBraces: false 39 | -------------------------------------------------------------------------------- /.github/workflows/switch.yml: -------------------------------------------------------------------------------- 1 | name: Nintendo Switch 2 | 3 | on: 4 | push: 5 | branches: [ main, 1.2.0 ] 6 | pull_request: 7 | branches: [ main, 1.2.0 ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-20.04 12 | container: devkitpro/devkita64:20200730 13 | steps: 14 | - name: Checkout repo 15 | uses: actions/checkout@v1 16 | with: 17 | submodules: true 18 | - name: make clean 19 | run: make PLATFORM=Switch clean 20 | - name: make 21 | run: make PLATFORM=Switch 22 | - name: Create directory structure 23 | run: | 24 | mkdir -p bin/Switch/sd/switch/s12013 25 | mv bin/Switch/s12013.nro bin/Switch/sd/switch/s12013/ 26 | mkdir -p bin/Switch/sd/switch/s22013 27 | mv bin/Switch/s22013.nro bin/Switch/sd/switch/s22013/ 28 | - name: Upload artifacts 29 | uses: actions/upload-artifact@v2 30 | with: 31 | path: bin/Switch/sd 32 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "dependencies/all/tinyxml2"] 2 | path = dependencies/all/tinyxml2 3 | url = https://github.com/leethomason/tinyxml2 4 | [submodule "dependencies/all/stb-image"] 5 | path = dependencies/all/stb-image 6 | url = https://github.com/nothings/stb 7 | -------------------------------------------------------------------------------- /Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | OGG_DIR := dependencies/android/libogg 4 | VORBIS_DIR := dependencies/android/libvorbis 5 | OGG_DIR := dependencies/android/libogg 6 | TXML_DIR := dependencies/all/tinyxml2 7 | ASIO_DIR := dependencies/all/asio/include 8 | STBIMG_DIR := dependencies/all/stb-image 9 | 10 | OGG_INCLUDES := $(LOCAL_PATH)/$(OGG_DIR)/include 11 | VORBIS_INCLUDES := $(LOCAL_PATH)/$(VORBIS_DIR)/include \ 12 | $(LOCAL_PATH)/$(VORBIS_DIR)/lib 13 | 14 | ###################################################################### 15 | # OGG 16 | include $(CLEAR_VARS) 17 | 18 | LOCAL_ARM_MODE := arm 19 | LOCAL_MODULE := libogg 20 | LOCAL_CFLAGS := -ffast-math -fsigned-char -O2 -fPIC -DPIC \ 21 | -DBYTE_ORDER=LITTLE_ENDIAN -D_ARM_ASSEM_ 22 | 23 | LOCAL_C_INCLUDES := $(OGG_INCLUDES) 24 | 25 | WILDCARD_SETUP := \ 26 | $(wildcard $(LOCAL_PATH)/$(OGG_DIR)/src/*.c) 27 | 28 | 29 | LOCAL_SRC_FILES := \ 30 | $(subst jni/src/, , $(WILDCARD_SETUP)) 31 | 32 | include $(BUILD_STATIC_LIBRARY) 33 | 34 | ###################################################################### 35 | # VORBIS 36 | include $(CLEAR_VARS) 37 | 38 | LOCAL_ARM_MODE := arm 39 | LOCAL_MODULE := libvorbis 40 | LOCAL_CFLAGS := -ffast-math -fsigned-char -O2 -fPIC -DPIC \ 41 | -DBYTE_ORDER=LITTLE_ENDIAN -D_ARM_ASSEM_ 42 | 43 | LOCAL_C_INCLUDES := $(OGG_INCLUDES) $(VORBIS_INCLUDES) 44 | 45 | WILDCARD_SETUP := \ 46 | $(wildcard $(LOCAL_PATH)/$(VORBIS_DIR)/lib/*.c) 47 | FILTERED := $(filter-out $(LOCAL_PATH)/$(VORBIS_DIR)/lib/psytune.c, $(WILDCARD_SETUP)) 48 | 49 | LOCAL_SRC_FILES := \ 50 | $(subst jni/src/, , $(FILTERED)) 51 | 52 | include $(BUILD_STATIC_LIBRARY) 53 | 54 | ###################################################################### 55 | 56 | include $(CLEAR_VARS) 57 | 58 | LOCAL_MODULE := main 59 | 60 | SDL_PATH := ../SDL 61 | 62 | LOCAL_CFLAGS := -fexceptions 63 | 64 | LOCAL_C_INCLUDES := \ 65 | $(LOCAL_PATH)/RSDKv4 \ 66 | $(LOCAL_PATH)/RSDKv4/NativeObjects \ 67 | $(LOCAL_PATH)/$(SDL_PATH)/include \ 68 | $(LOCAL_PATH)/dependencies/all \ 69 | $(LOCAL_PATH)/$(VORBIS_DIR)/include \ 70 | $(LOCAL_PATH)/$(OGG_DIR)/include \ 71 | $(LOCAL_PATH)/$(TXML_DIR) \ 72 | $(LOCAL_PATH)/$(STBIMG_DIR) \ 73 | $(LOCAL_PATH)/$(ASIO_DIR) 74 | 75 | 76 | WILDCARD_SETUP := \ 77 | $(wildcard $(LOCAL_PATH)/RSDKv4/*.cpp) \ 78 | $(LOCAL_PATH)/RSDKv4/NativeObjects/All.cpp \ 79 | $(wildcard $(LOCAL_PATH)/dependencies/all/stb-image/*.cpp) \ 80 | $(wildcard $(LOCAL_PATH)/dependencies/all/tinyxml2/*.cpp) 81 | 82 | LOCAL_SRC_FILES := $(subst jni/src/, , $(WILDCARD_SETUP)) 83 | 84 | LOCAL_SHARED_LIBRARIES := SDL2 libogg libvorbis 85 | 86 | LOCAL_LDLIBS := -lGLESv1_CM -llog 87 | 88 | include $(BUILD_SHARED_LIBRARY) 89 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # RSDKv3/v4 DECOMPILATION SOURCE CODE LICENSE v1 2 | 3 | The code in this repository is a decompilation of RSDK (Retro-Engine) version 3 or 4. 4 | There is original code in this repo, but most of the code is to be functionally the same as the version of RSDK this repo specifies. 5 | 6 | 7 | This code is provided as-is, that is to say, without liability or warranty. 8 | Original authors of RSDK and authors of the decompilation are not held responsible for any damages or other claims said. 9 | 10 | You may copy, modify, contribute, and distribute, for public or private use, **as long as the following are followed:** 11 | - You may not use the decompilation for commercial (any sort of profit) use. 12 | - You must clearly specify that the decompilation and original code are not yours: the developers of both must be credited. 13 | - You may not distribute assets used to run the game not directly provided by the repository (other than unique, modded assets). 14 | - This license must be in all modified copies of source code, and all forks must follow this license. 15 | 16 | Original RSDK author: Christian "Taxman" Whitehead 17 | 18 | Decompilation authors: Rubberduckycooly and RMGRich 19 | -------------------------------------------------------------------------------- /Makefile_cfgs/Platforms/Linux.cfg: -------------------------------------------------------------------------------- 1 | STATIC = 0 2 | LIBS += -lm -ldl -lpthread -------------------------------------------------------------------------------- /Makefile_cfgs/Platforms/Switch.cfg: -------------------------------------------------------------------------------- 1 | STATIC = 1 2 | 3 | include $(DEVKITPRO)/libnx/switch_rules 4 | PKGCONFIG = $(DEVKITPRO)/portlibs/switch/bin/aarch64-none-elf-pkg-config 5 | STRIP = $(DEVKITPRO)/devkitA64/bin/aarch64-none-elf-strip 6 | NACPTOOL=$(DEVKITPRO)/tools/bin/nacptool 7 | 8 | CFLAGS += -DARM -march=armv8-a -mtune=cortex-a57 -mtp=soft \ 9 | -D__SWITCH__ -fPIE -Wl,--allow-multiple-definition -specs=$(DEVKITPRO)/libnx/switch.specs -mlittle-endian 10 | LDFLAGS += -L$(LIBNX)/lib 11 | LIBS += -lnx 12 | INCLUDES += -I$(LIBNX)/include -I$(PORTLIBS)/include/GLFW -I$(PORTLIBS)/include 13 | 14 | ifdef NXLINK 15 | DEFINES += -DENABLE_NXLINK 16 | endif 17 | 18 | CFLAGS += `$(PKGCONFIG) --cflags libglad egl glesv1_cm` 19 | LIBS += `$(PKGCONFIG) --libs-only-l libglad egl glesv1_cm` 20 | LIBPATHS += `$(PKGCONFIG) --libs-only-L libglad egl glesv1_cm` 21 | 22 | SUFFIX = .elf 23 | PKGSUFFIX = .nro 24 | 25 | $(OUTDIR)/s12013.nro: $(OUTDIR)/$(NAME)$(SUFFIX) 26 | @echo -n "Building S1 nro..." 27 | @$(NACPTOOL) --create "Sonic 1 (2013)" "SEGA, Rubberduckycooly, heyjoeway" "1.3.0" $(OUTDIR)/details_s1.nacp 28 | @elf2nro $< $@ --icon=./icon_s1.jpg --nacp=$(OUTDIR)/details_s1.nacp 29 | @echo " Done!" 30 | 31 | $(OUTDIR)/s22013.nro: $(OUTDIR)/$(NAME)$(SUFFIX) 32 | @echo -n "Building S2 nro..." 33 | @$(NACPTOOL) --create "Sonic 2 (2013)" "SEGA, Rubberduckycooly, heyjoeway" "1.3.0" $(OUTDIR)/details_s2.nacp 34 | @elf2nro $< $@ --icon=./icon_s2.jpg --nacp=$(OUTDIR)/details_s2.nacp 35 | @echo " Done!" 36 | 37 | $(OUTDIR)/$(NAME)$(PKGSUFFIX): $(OUTDIR)/$(NAME)$(SUFFIX) $(OUTDIR)/s12013.nro $(OUTDIR)/s22013.nro 38 | @echo -n "Building nro..." 39 | @$(NACPTOOL) --create "Sonic 1/2 (2013)" "SEGA, Rubberduckycooly, heyjoeway" "1.3.0" $(OUTDIR)/details.nacp 40 | @elf2nro $< $@ --nacp=$(OUTDIR)/details.nacp 41 | @echo " Done!" -------------------------------------------------------------------------------- /Makefile_cfgs/Platforms/Unknown.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Makefile_cfgs/Platforms/Unknown.cfg -------------------------------------------------------------------------------- /Makefile_cfgs/Platforms/WiiU.cfg: -------------------------------------------------------------------------------- 1 | STATIC = 1 2 | 3 | ifeq ($(strip $(DEVKITPPC)),) 4 | $(error "Please set DEVKITPPC in your environment. export DEVKITPPC=devkitPPC") 5 | endif 6 | ifeq ($(strip $(DEVKITPRO)),) 7 | $(error "Please set DEVKITPRO in your environment. export DEVKITPRO=devkitPRO") 8 | endif 9 | export PATH := $(DEVKITPPC)/bin:$(PORTLIBS)/bin:$(PATH) 10 | export LIBOGC_INC := $(DEVKITPRO)/libogc/include 11 | export LIBOGC_LIB := $(DEVKITPRO)/libogc/lib/wii 12 | export PORTLIBS := $(DEVKITPRO)/portlibs/ppc 13 | 14 | PREFIX := powerpc-eabi- 15 | 16 | export AS := $(PREFIX)as 17 | export CC := $(PREFIX)gcc 18 | export CXX := $(PREFIX)g++ 19 | export AR := $(PREFIX)ar 20 | export OBJCOPY := $(PREFIX)objcopy 21 | 22 | PKGCONFIG = $(DEVKITPRO)/portlibs/wiiu/bin/powerpc-eabi-pkg-config 23 | 24 | CFLAGS += -std=gnu11 -mrvl -mcpu=750 -meabi -mhard-float -ffast-math \ 25 | -O3 -Wall -Wextra -Wno-unused-parameter -Wno-strict-aliasing 26 | # DEFINES += -DHAVE_ALLOCA_H 27 | LIBS += -L$(DEVKITPPC)/lib -L$(DEVKITPPC)/lib/gcc/powerpc-eabi/4.8.2 28 | INCLUDES += -I$(LIBOGC_INC) -I$(DEVKITPRO)/portlibs/wiiu/include/SDL2 -I$(PORTLIBS)/include -I$(DEVKITPRO)/portlibs/wiiu/include -I$(DEVKITPPC)/lib/gcc/powerpc-eabi/4.8.2 29 | 30 | SUFFIX = .elf -------------------------------------------------------------------------------- /Makefile_cfgs/Platforms/Windows.cfg: -------------------------------------------------------------------------------- 1 | #LIBS += -lshlwapi 2 | #OBJECTS += $(OBJDIR)/icon.o 3 | SUFFIX = .exe 4 | STATIC ?= 1 5 | 6 | ifeq ($(DEBUG),1) 7 | LIBS += -mconsole 8 | else 9 | LIBS += -mwindows 10 | endif 11 | 12 | #Compile the Windows icon file into an object 13 | #$(OBJDIR)/icon.o: src/icon.rc src/md.ico 14 | # @mkdir -p $(@D) 15 | # @windres $< $@ -------------------------------------------------------------------------------- /RSDKv4 ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RSDKv4 ios.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /RSDKv4 ios.xcodeproj/project.xcworkspace/xcuserdata/rubberduckycooly.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildLocationStyle 6 | UseAppPreferences 7 | CustomBuildLocationType 8 | RelativeToDerivedData 9 | DerivedDataCustomLocation 10 | build/ios 11 | DerivedDataLocationStyle 12 | WorkspaceRelativePath 13 | IssueFilterStyle 14 | ShowActiveSchemeOnly 15 | LiveSourceIssuesEnabled 16 | 17 | ShowSharedSchemesAutomaticallyEnabled 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /RSDKv4 ios.xcodeproj/xcshareddata/xcschemes/RSDKv4.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /RSDKv4.SDL1.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29806.167 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RSDKv4.SDL1", "RSDKv4\RSDKv4.SDL1.vcxproj", "{BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Server", "Server\Server.vcxproj", "{59F9197E-0BA1-4C10-8840-94BB28CBB942}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|x64 = Debug|x64 13 | Debug|x86 = Debug|x86 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug|x64.ActiveCfg = Debug|x64 19 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug|x64.Build.0 = Debug|x64 20 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug|x86.ActiveCfg = Debug|Win32 21 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug|x86.Build.0 = Debug|Win32 22 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release|x64.ActiveCfg = Release|x64 23 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release|x64.Build.0 = Release|x64 24 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release|x86.ActiveCfg = Release|Win32 25 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release|x86.Build.0 = Release|Win32 26 | {59F9197E-0BA1-4C10-8840-94BB28CBB942}.Debug|x64.ActiveCfg = Debug|x64 27 | {59F9197E-0BA1-4C10-8840-94BB28CBB942}.Debug|x64.Build.0 = Debug|x64 28 | {59F9197E-0BA1-4C10-8840-94BB28CBB942}.Debug|x86.ActiveCfg = Debug|Win32 29 | {59F9197E-0BA1-4C10-8840-94BB28CBB942}.Debug|x86.Build.0 = Debug|Win32 30 | {59F9197E-0BA1-4C10-8840-94BB28CBB942}.Release|x64.ActiveCfg = Release|x64 31 | {59F9197E-0BA1-4C10-8840-94BB28CBB942}.Release|x64.Build.0 = Release|x64 32 | {59F9197E-0BA1-4C10-8840-94BB28CBB942}.Release|x86.ActiveCfg = Release|Win32 33 | {59F9197E-0BA1-4C10-8840-94BB28CBB942}.Release|x86.Build.0 = Release|Win32 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | GlobalSection(ExtensibilityGlobals) = postSolution 39 | SolutionGuid = {CEEC6B21-D41E-4C5C-8B97-9FAAD7974615} 40 | EndGlobalSection 41 | EndGlobal 42 | -------------------------------------------------------------------------------- /RSDKv4.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29806.167 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RSDKv4", "RSDKv4\RSDKv4.vcxproj", "{BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Server", "Server\Server.vcxproj", "{59F9197E-0BA1-4C10-8840-94BB28CBB942}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|x64 = Debug|x64 13 | Debug|x86 = Debug|x86 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug|x64.ActiveCfg = Debug|x64 19 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug|x64.Build.0 = Debug|x64 20 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug|x86.ActiveCfg = Debug|Win32 21 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug|x86.Build.0 = Debug|Win32 22 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release|x64.ActiveCfg = Release|x64 23 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release|x64.Build.0 = Release|x64 24 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release|x86.ActiveCfg = Release|Win32 25 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release|x86.Build.0 = Release|Win32 26 | {59F9197E-0BA1-4C10-8840-94BB28CBB942}.Debug|x64.ActiveCfg = Debug|x64 27 | {59F9197E-0BA1-4C10-8840-94BB28CBB942}.Debug|x64.Build.0 = Debug|x64 28 | {59F9197E-0BA1-4C10-8840-94BB28CBB942}.Debug|x86.ActiveCfg = Debug|Win32 29 | {59F9197E-0BA1-4C10-8840-94BB28CBB942}.Debug|x86.Build.0 = Debug|Win32 30 | {59F9197E-0BA1-4C10-8840-94BB28CBB942}.Release|x64.ActiveCfg = Release|x64 31 | {59F9197E-0BA1-4C10-8840-94BB28CBB942}.Release|x64.Build.0 = Release|x64 32 | {59F9197E-0BA1-4C10-8840-94BB28CBB942}.Release|x86.ActiveCfg = Release|Win32 33 | {59F9197E-0BA1-4C10-8840-94BB28CBB942}.Release|x86.Build.0 = Release|Win32 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | GlobalSection(ExtensibilityGlobals) = postSolution 39 | SolutionGuid = {CEEC6B21-D41E-4C5C-8B97-9FAAD7974615} 40 | EndGlobalSection 41 | EndGlobal 42 | -------------------------------------------------------------------------------- /RSDKv4.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RSDKv4.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /RSDKv4.xcodeproj/project.xcworkspace/xcuserdata/rubberduckycooly.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildLocationStyle 6 | CustomLocation 7 | CustomBuildIntermediatesPath 8 | build/mac/intermediates.noindex 9 | CustomBuildLocationType 10 | RelativeToWorkspace 11 | CustomBuildProductsPath 12 | build/mac/ 13 | DerivedDataCustomLocation 14 | build/mac 15 | DerivedDataLocationStyle 16 | WorkspaceRelativePath 17 | IssueFilterStyle 18 | ShowActiveSchemeOnly 19 | LiveSourceIssuesEnabled 20 | 21 | ShowSharedSchemesAutomaticallyEnabled 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /RSDKv4.xcodeproj/xcshareddata/xcschemes/RSDKv4.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /RSDKv4/Animation.hpp: -------------------------------------------------------------------------------- 1 | #ifndef ANIMATION_H 2 | #define ANIMATION_H 3 | 4 | #define ANIFILE_COUNT (0x100) 5 | #define ANIMATION_COUNT (0x400) 6 | #define SPRITEFRAME_COUNT (0x1000) 7 | 8 | #define HITBOX_COUNT (0x20) 9 | #define HITBOX_DIR_COUNT (0x8) 10 | 11 | enum AnimrotationFlags { ROTFLAG_NONE, ROTFLAG_FULL, ROTFLAG_45DEG, ROTFLAG_STATICFRAMES }; 12 | 13 | struct AnimationFile { 14 | char fileName[0x20]; 15 | int animCount; 16 | int aniListOffset; 17 | int hitboxListOffset; 18 | }; 19 | 20 | struct SpriteAnimation { 21 | char name[16]; 22 | byte frameCount; 23 | byte speed; 24 | byte loopPoint; 25 | byte rotationFlag; 26 | int frameListOffset; 27 | }; 28 | 29 | struct SpriteFrame { 30 | int sprX; 31 | int sprY; 32 | int width; 33 | int height; 34 | int pivotX; 35 | int pivotY; 36 | byte sheetID; 37 | byte hitboxID; 38 | }; 39 | 40 | struct Hitbox { 41 | sbyte left[HITBOX_DIR_COUNT]; 42 | sbyte top[HITBOX_DIR_COUNT]; 43 | sbyte right[HITBOX_DIR_COUNT]; 44 | sbyte bottom[HITBOX_DIR_COUNT]; 45 | }; 46 | 47 | extern AnimationFile animationFileList[ANIFILE_COUNT]; 48 | extern int animationFileCount; 49 | 50 | extern SpriteFrame scriptFrames[SPRITEFRAME_COUNT]; 51 | extern int scriptFrameCount; 52 | 53 | extern SpriteFrame animFrames[SPRITEFRAME_COUNT]; 54 | extern int animFrameCount; 55 | extern SpriteAnimation animationList[ANIMATION_COUNT]; 56 | extern int animationCount; 57 | extern Hitbox hitboxList[HITBOX_COUNT]; 58 | extern int hitboxCount; 59 | 60 | void LoadAnimationFile(char *FilePath); 61 | void ClearAnimationData(); 62 | 63 | AnimationFile *AddAnimationFile(char *FilePath); 64 | 65 | inline AnimationFile *GetDefaultAnimationRef() { return &animationFileList[0]; } 66 | 67 | void ProcessObjectAnimation(void *objScr, void *ent); 68 | 69 | #endif // !ANIMATION_H 70 | -------------------------------------------------------------------------------- /RSDKv4/Ini.hpp: -------------------------------------------------------------------------------- 1 | #ifndef INI_H 2 | #define INI_H 3 | 4 | #include 5 | 6 | class IniParser 7 | { 8 | public: 9 | enum ItemType { 10 | INI_ITEM_STRING, 11 | INI_ITEM_INT, 12 | INI_ITEM_FLOAT, 13 | INI_ITEM_BOOL, 14 | INI_ITEM_COMMENT, 15 | }; 16 | 17 | struct ConfigItem { 18 | ConfigItem() 19 | { 20 | sprintf(section, "%s", ""); 21 | sprintf(key, "%s", ""); 22 | sprintf(value, "%s", ""); 23 | hasSection = false; 24 | type = INI_ITEM_STRING; 25 | } 26 | char section[0x20]; 27 | bool hasSection = false; 28 | char key[0x40]; 29 | char value[0x100]; 30 | byte type = INI_ITEM_STRING; 31 | }; 32 | 33 | IniParser() { items.clear(); } 34 | IniParser(const char *filename, bool addPath = true); 35 | 36 | int GetString(const char *section, const char *key, char *dest); 37 | int GetInteger(const char *section, const char *key, int *dest); 38 | int GetFloat(const char *section, const char *key, float *dest); 39 | int GetBool(const char *section, const char *key, bool *dest); 40 | int SetString(const char *section, const char *key, char *value); 41 | int SetInteger(const char *section, const char *key, int value); 42 | int SetFloat(const char *section, const char *key, float value); 43 | int SetBool(const char *section, const char *key, bool value); 44 | int SetComment(const char *section, const char *key, const char *comment); 45 | void Write(const char *filename, bool addPath = true); 46 | 47 | std::vector items; 48 | }; 49 | #endif // !INI_H 50 | -------------------------------------------------------------------------------- /RSDKv4/Math.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | #include 3 | #include 4 | 5 | int sinValM7[0x200]; 6 | int cosValM7[0x200]; 7 | 8 | int sinVal512[0x200]; 9 | int cosVal512[0x200]; 10 | 11 | int sinVal256[0x100]; 12 | int cosVal256[0x100]; 13 | 14 | byte atanVal256[0x100 * 0x100]; 15 | 16 | void CalculateTrigAngles() 17 | { 18 | srand(time(NULL)); 19 | 20 | for (int i = 0; i < 0x200; ++i) { 21 | sinValM7[i] = (sin((i / 256.0) * M_PI) * 4096.0); 22 | cosValM7[i] = (cos((i / 256.0) * M_PI) * 4096.0); 23 | } 24 | 25 | cosValM7[0] = 0x1000; 26 | cosValM7[128] = 0; 27 | cosValM7[256] = -0x1000; 28 | cosValM7[384] = 0; 29 | sinValM7[0] = 0; 30 | sinValM7[128] = 0x1000; 31 | sinValM7[256] = 0; 32 | sinValM7[384] = -0x1000; 33 | 34 | for (int i = 0; i < 0x200; ++i) { 35 | sinVal512[i] = (sinf((i / 256.0) * M_PI) * 512.0); 36 | cosVal512[i] = (cosf((i / 256.0) * M_PI) * 512.0); 37 | } 38 | 39 | cosVal512[0] = 0x200; 40 | cosVal512[128] = 0; 41 | cosVal512[256] = -0x200; 42 | cosVal512[384] = 0; 43 | sinVal512[0] = 0; 44 | sinVal512[128] = 0x200; 45 | sinVal512[256] = 0; 46 | sinVal512[384] = -0x200; 47 | 48 | for (int i = 0; i < 0x100; i++) { 49 | sinVal256[i] = (sinVal512[i * 2] >> 1); 50 | cosVal256[i] = (cosVal512[i * 2] >> 1); 51 | } 52 | 53 | for (int Y = 0; Y < 0x100; ++Y) { 54 | byte *ATan = (byte *)&atanVal256[Y]; 55 | for (int X = 0; X < 0x100; ++X) { 56 | float angle = atan2f(Y, X); 57 | *ATan = (angle * 40.743664f); 58 | ATan += 0x100; 59 | } 60 | } 61 | } 62 | 63 | byte ArcTanLookup(int X, int Y) 64 | { 65 | int x = 0; 66 | int y = 0; 67 | 68 | x = abs(X); 69 | y = abs(Y); 70 | 71 | if (x <= y) { 72 | while (y > 0xFF) { 73 | x >>= 4; 74 | y >>= 4; 75 | } 76 | } 77 | else { 78 | while (x > 0xFF) { 79 | x >>= 4; 80 | y >>= 4; 81 | } 82 | } 83 | if (X <= 0) { 84 | if (Y <= 0) 85 | return atanVal256[(x << 8) + y] + -0x80; 86 | else 87 | return -0x80 - atanVal256[(x << 8) + y]; 88 | } 89 | else if (Y <= 0) 90 | return -atanVal256[(x << 8) + y]; 91 | else 92 | return atanVal256[(x << 8) + y]; 93 | } 94 | -------------------------------------------------------------------------------- /RSDKv4/Math.hpp: -------------------------------------------------------------------------------- 1 | #ifndef MATH_H 2 | #define MATH_H 3 | 4 | #ifndef M_PI 5 | #define M_PI 3.14159265358979323846264338327950288 6 | #endif 7 | 8 | #undef M_PI_2 9 | #define M_PI_2 (M_PI * 2.0) 10 | 11 | #undef M_PI_H 12 | #define M_PI_H (M_PI * 0.5) 13 | 14 | #define MEM_ZERO(x) memset(&(x), 0, sizeof((x))) 15 | #define MEM_ZEROP(x) memset((x), 0, sizeof(*(x))) 16 | 17 | extern int sinValM7[0x200]; 18 | extern int cosValM7[0x200]; 19 | 20 | extern int sinVal512[0x200]; 21 | extern int cosVal512[0x200]; 22 | 23 | extern int sinVal256[0x100]; 24 | extern int cosVal256[0x100]; 25 | 26 | extern byte atanVal256[0x100 * 0x100]; 27 | 28 | // Setup Angles 29 | void CalculateTrigAngles(); 30 | 31 | inline int sin512(int angle) 32 | { 33 | if (angle < 0) 34 | angle = 0x200 - angle; 35 | angle &= 0x1FF; 36 | return sinVal512[angle]; 37 | } 38 | 39 | inline int cos512(int angle) 40 | { 41 | if (angle < 0) 42 | angle = 0x200 - angle; 43 | angle &= 0x1FF; 44 | return cosVal512[angle]; 45 | } 46 | 47 | inline int sin256(int angle) 48 | { 49 | if (angle < 0) 50 | angle = 0x100 - angle; 51 | angle &= 0xFF; 52 | return sinVal256[angle]; 53 | } 54 | 55 | inline int cos256(int angle) 56 | { 57 | if (angle < 0) 58 | angle = 0x100 - angle; 59 | angle &= 0xFF; 60 | return cosVal256[angle]; 61 | } 62 | 63 | // Get Arc Tan value 64 | byte ArcTanLookup(int X, int Y); 65 | 66 | inline double DegreesToRad(float degrees) { return (M_PI / 180) * degrees; } 67 | 68 | #endif // !MATH_H 69 | -------------------------------------------------------------------------------- /RSDKv4/ModAPI.hpp: -------------------------------------------------------------------------------- 1 | #ifndef MOD_API_H 2 | #define MOD_API_H 3 | 4 | // These are still needed even if RETRO_USE_MOD_LOADER isn't defined 5 | extern bool redirectSave; 6 | extern char modsPath[0x100]; 7 | extern char savePath[0x100]; 8 | 9 | #if RETRO_USE_MOD_LOADER 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #define PLAYER_MAX (0x10) 16 | 17 | struct ModInfo { 18 | std::string name; 19 | std::string desc; 20 | std::string author; 21 | std::string version; 22 | std::map fileMap; 23 | std::string folder; 24 | bool useScripts; 25 | bool skipStartMenu; 26 | bool disableFocusPause; 27 | bool redirectSave; 28 | std::string savePath; 29 | bool active; 30 | }; 31 | 32 | extern std::vector modList; 33 | extern int activeMod; 34 | 35 | extern char modsPath[0x100]; 36 | 37 | extern bool redirectSave; 38 | 39 | extern char modTypeNames[OBJECT_COUNT][0x40]; 40 | extern char modScriptPaths[OBJECT_COUNT][0x40]; 41 | extern byte modScriptFlags[OBJECT_COUNT]; 42 | extern byte modObjCount; 43 | 44 | extern char playerNames[PLAYER_MAX][0x20]; 45 | extern byte playerCount; 46 | 47 | inline void SetActiveMod(int id) { activeMod = id; } 48 | 49 | void initMods(); 50 | bool loadMod(ModInfo *info, std::string modsPath, std::string folder, bool active); 51 | void scanModFolder(ModInfo *info); 52 | void saveMods(); 53 | 54 | int OpenModMenu(); 55 | 56 | void RefreshEngine(); 57 | void GetModCount(); 58 | void GetModName(int *textMenu, int *highlight, uint *id, int *unused); 59 | void GetModDescription(int *textMenu, int *highlight, uint *id, int *unused); 60 | void GetModAuthor(int *textMenu, int *highlight, uint *id, int *unused); 61 | void GetModVersion(int *textMenu, int *highlight, uint *id, int *unused); 62 | void GetModActive(uint *id, int *unused); 63 | void SetModActive(uint *id, int *active); 64 | 65 | #endif 66 | 67 | #if RETRO_USE_MOD_LOADER || !RETRO_USE_ORIGINAL_CODE 68 | extern char savePath[0x100]; 69 | int GetSceneID(byte listID, const char *sceneName); 70 | #endif 71 | 72 | #endif -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/AboutScreen.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_ABOUTSCREEN_H 2 | #define NATIVE_ABOUTSCREEN_H 3 | 4 | enum AboutMenuButtons { ABOUT_BTN_PRIVACY, ABOUT_BTN_TERMS, ABOUT_BTN_COUNT }; 5 | enum AboutMenuStates { ABOUT_STATE_ENTER, ABOUT_STATE_MAIN, ABOUT_STATE_ACTION, ABOUT_STATE_EXIT }; 6 | 7 | struct NativeEntity_AboutScreen : NativeEntityBase { 8 | int state; 9 | int field_14; 10 | float timer; 11 | float rotationY; 12 | float scale; 13 | NativeEntity_OptionsMenu *optionsMenu; 14 | NativeEntity_TextLabel *label; 15 | MeshInfo *meshPanel; 16 | MeshInfo *meshBox; 17 | MeshAnimator animator; 18 | MatrixF renderMatrix; 19 | MatrixF matrixTemp; 20 | MatrixF renderMatrix2; 21 | byte textureArrows; 22 | byte backPressed; 23 | int arrowAlpha; 24 | ushort gameTitle[16]; 25 | ushort versionNameText[16]; 26 | ushort versionText[16]; 27 | NativeEntity_PushButton *buttons[ABOUT_BTN_COUNT]; 28 | int selectedButton; 29 | }; 30 | 31 | void AboutScreen_Create(void *objPtr); 32 | void AboutScreen_Main(void *objPtr); 33 | 34 | #endif // !NATIVE_ABOUTSCREEN_H 35 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/AchievementDisplay.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | #if !RETRO_USE_ORIGINAL_CODE 4 | void AchievementDisplay_Create(void *objPtr) 5 | { 6 | RSDK_THIS(AchievementDisplay); 7 | entity->z = 160.0; 8 | entity->alpha = 0xFF; 9 | entity->state = ACHDISP_STATE_LOCKED; 10 | } 11 | void AchievementDisplay_Main(void *objPtr) 12 | { 13 | RSDK_THIS(AchievementDisplay); 14 | 15 | if (entity->useRenderMatrix) { 16 | NewRenderState(); 17 | SetRenderMatrix(&entity->renderMatrix); 18 | } 19 | 20 | float width = GetTextWidth(entity->achievementText, entity->fontID, entity->scale); 21 | float height = GetTextHeight(entity->achievementText, entity->fontID, entity->scale) + fontList[entity->fontID].lineHeight * entity->scale; 22 | 23 | switch (entity->state) { 24 | case ACHDISP_STATE_LOCKED: // locked 25 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 26 | 27 | // RenderRectClipped(entity->x, entity->y + 16.0f, entity->z, 224.0f, 80.0f, 0x00, 0x00, 0x00, 0xC0); 28 | 29 | RenderRectClipped(entity->x, entity->y + 16.0f, entity->z, 4.0f, 80.0f, 0xFF, 0x00, 0x00, 0xC0); 30 | RenderRectClipped(entity->x + 220.0f, entity->y + 16.0f, entity->z, 4.0f, 80.0f, 0xFF, 0x00, 0x00, 0xC0); 31 | RenderRectClipped(entity->x + 4.0f, entity->y + 16.0f, entity->z, 216.0f, 4.0f, 0xFF, 0x00, 0x00, 0xC0); 32 | RenderRectClipped(entity->x + 4.0f, entity->y - 60.0f, entity->z, 216.0f, 4.0f, 0xFF, 0x00, 0x00, 0xC0); 33 | 34 | RenderTextClipped(entity->achievementText, entity->fontID, entity->x + (224.0f - width) / 2, entity->y, entity->z, entity->scale, 35 | entity->alpha); 36 | RenderTextClipped(entity->descriptionText, entity->fontID, entity->x + 8.0f, entity->y - height, entity->z, entity->scale * 0.75, 37 | entity->alpha); 38 | break; 39 | case ACHDISP_STATE_UNLOCKED: // unlocked 40 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 41 | 42 | // RenderRectClipped(entity->x, entity->y + 16.0f, entity->z, 224.0f, 80.0f, 0x00, 0x00, 0x00, 0xC0); 43 | 44 | RenderRectClipped(entity->x, entity->y + 16.0f, entity->z, 4.0f, 80.0f, 0x00, 0xFF, 0x00, 0xC0); 45 | RenderRectClipped(entity->x + 220.0f, entity->y + 16.0f, entity->z, 4.0f, 80.0f, 0x00, 0xFF, 0x00, 0xC0); 46 | RenderRectClipped(entity->x + 4.0f, entity->y + 16.0f, entity->z, 216.0f, 4.0f, 0x00, 0xFF, 0x00, 0xC0); 47 | RenderRectClipped(entity->x + 4.0f, entity->y - 60.0f, entity->z, 216.0f, 4.0f, 0x00, 0xFF, 0x00, 0xC0); 48 | 49 | RenderTextClipped(entity->achievementText, entity->fontID, entity->x + (224.0f - width) / 2, entity->y, entity->z, entity->scale, 50 | entity->alpha); 51 | RenderTextClipped(entity->descriptionText, entity->fontID, entity->x + 8.0f, entity->y - height, entity->z, entity->scale * 0.75, 52 | entity->alpha); 53 | break; 54 | } 55 | 56 | if (entity->useRenderMatrix) { 57 | NewRenderState(); 58 | SetRenderMatrix(NULL); 59 | } 60 | } 61 | #endif 62 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/AchievementDisplay.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_ACHIEVEMENTDISPLAY_H 2 | #define NATIVE_ACHIEVEMENTDISPLAY_H 3 | 4 | #if !RETRO_USE_ORIGINAL_CODE 5 | enum AchievementDisplayStates { ACHDISP_STATE_LOCKED, ACHDISP_STATE_UNLOCKED }; 6 | 7 | struct NativeEntity_AchievementDisplay : NativeEntityBase { 8 | float x; 9 | float y; 10 | float z; 11 | float textWidth; 12 | float timer; 13 | float scale; 14 | int alpha; 15 | int fontID; 16 | ushort achievementText[0x40]; 17 | ushort descriptionText[0x80]; 18 | int state; 19 | byte useRenderMatrix; 20 | MatrixF renderMatrix; 21 | }; 22 | 23 | void AchievementDisplay_Create(void *objPtr); 24 | void AchievementDisplay_Main(void *objPtr); 25 | #endif 26 | 27 | #endif // !NATIVE_ACHIEVEMENTDISPLAY_H 28 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/AchievementsButton.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | void AchievementsButton_Create(void *objPtr) 4 | { 5 | RSDK_THIS(AchievementsButton); 6 | entity->textureCircle = LoadTexture("Data/Game/Menu/Circle.png", TEXFMT_RGBA4444); 7 | 8 | int texture = LoadTexture("Data/Game/Menu/Intro.png", TEXFMT_RGBA4444); 9 | entity->meshAchievements = LoadMesh("Data/Game/Models/Achievements.bin", texture); 10 | entity->x = 0.0; 11 | entity->y = 16.0; 12 | entity->z = 160.0; 13 | entity->r = 0xFF; 14 | entity->g = 0xFF; 15 | entity->b = 0x00; 16 | entity->labelPtr = CREATE_ENTITY(TextLabel); 17 | entity->labelPtr->fontID = FONT_HEADING; 18 | entity->labelPtr->scale = 0.15; 19 | entity->labelPtr->alpha = 0; 20 | entity->labelPtr->state = TEXTLABEL_STATE_IDLE; 21 | SetStringToFont(entity->labelPtr->text, strAchievements, FONT_HEADING); 22 | entity->labelPtr->alignPtr(entity->labelPtr, ALIGN_CENTER); 23 | } 24 | void AchievementsButton_Main(void *objPtr) 25 | { 26 | RSDK_THIS(AchievementsButton); 27 | 28 | if (entity->visible) { 29 | if (entity->scale < 0.2) { 30 | entity->scale += ((0.25 - entity->scale) / ((60.0 * Engine.deltaTime) * 16.0)); 31 | if (entity->scale > 0.2) 32 | entity->scale = 0.2; 33 | } 34 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 35 | SetRenderVertexColor(entity->r, entity->g, entity->b); 36 | RenderImage(entity->x, entity->y, entity->z, entity->scale, entity->scale, 256.0, 256.0, 512.0, 512.0, 0.0, 0.0, 255, entity->textureCircle); 37 | SetRenderVertexColor(0xFF, 0xFF, 0xFF); 38 | SetRenderBlendMode(RENDER_BLEND_NONE); 39 | 40 | entity->angle -= Engine.deltaTime; 41 | if (entity->angle < -M_PI_2) 42 | entity->angle += M_PI_2; 43 | 44 | NewRenderState(); 45 | matrixRotateXYZF(&entity->renderMatrix, 0.0, entity->angle, 0.0); 46 | matrixTranslateXYZF(&entity->matrixTemp, entity->x, entity->y, entity->z - 8.0); 47 | matrixMultiplyF(&entity->renderMatrix, &entity->matrixTemp); 48 | SetRenderMatrix(&entity->renderMatrix); 49 | RenderMesh(entity->meshAchievements, MESH_NORMALS, true); 50 | SetRenderMatrix(NULL); 51 | 52 | NativeEntity_TextLabel *label = entity->labelPtr; 53 | label->x = entity->x; 54 | label->y = entity->y - 72.0; 55 | label->z = entity->z; 56 | if (label->x <= -8.0 || label->x >= 8.0) { 57 | if (label->alpha > 0) 58 | label->alpha -= 8; 59 | } 60 | else { 61 | if (label->alpha < 0x100) 62 | label->alpha += 8; 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/AchievementsButton.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_ACHIEVEMENTSBUTTON_H 2 | #define NATIVE_ACHIEVEMENTSBUTTON_H 3 | 4 | struct NativeEntity_AchievementsButton : NativeEntityBase { 5 | int field_10; 6 | byte visible; 7 | int field_18; 8 | int field_1C; 9 | float x; 10 | float y; 11 | float z; 12 | MeshInfo *meshAchievements; 13 | float angle; 14 | float scale; 15 | byte textureCircle; 16 | byte r; 17 | byte g; 18 | byte b; 19 | MatrixF renderMatrix; 20 | MatrixF matrixTemp; 21 | NativeEntity_TextLabel *labelPtr; 22 | }; 23 | 24 | void AchievementsButton_Create(void *objPtr); 25 | void AchievementsButton_Main(void *objPtr); 26 | 27 | #endif // !NATIVE_ACHIEVEMENTSBUTTON_H 28 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/AchievementsMenu.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_ACHIEVEMENTSMENU_H 2 | #define NATIVE_ACHIEVEMENTSMENU_H 3 | 4 | #if !RETRO_USE_ORIGINAL_CODE 5 | struct NativeEntity_AchievementsMenu : NativeEntityBase { 6 | NativeEntity_TextLabel *label; 7 | NativeEntity_AchievementDisplay *displays[5]; 8 | MeshInfo *meshPanel; 9 | MatrixF renderMatrix; 10 | MatrixF matrixTemp; 11 | float scale; 12 | byte textureArrows; 13 | byte backPressed; 14 | int arrowAlpha; 15 | int state; 16 | float timer; 17 | }; 18 | 19 | void AchievementsMenu_Create(void *objPtr); 20 | void AchievementsMenu_Main(void *objPtr); 21 | #endif 22 | 23 | #endif // !NATIVE_ACHIEVEMENTSMENU_H 24 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/All.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | #include "MenuBG.cpp" 4 | #include "TextLabel.cpp" 5 | #include "PushButton.cpp" 6 | #include "SubMenuButton.cpp" 7 | #include "DialogPanel.cpp" 8 | #include "FadeScreen.cpp" 9 | #include "VirtualDPad.cpp" 10 | #include "VirtualDPadM.cpp" 11 | #include "SettingsScreen.cpp" 12 | #include "RetroGameLoop.cpp" 13 | #include "PauseMenu.cpp" 14 | #include "SegaSplash.cpp" 15 | #include "CWSplash.cpp" 16 | #include "TitleScreen.cpp" 17 | #include "StartGameButton.cpp" 18 | #include "TimeAttackButton.cpp" 19 | #include "AchievementsButton.cpp" 20 | #include "MultiplayerButton.cpp" 21 | #include "LeaderboardsButton.cpp" 22 | #if RETRO_USE_MOD_LOADER 23 | #include "ModsButton.cpp" 24 | #include "ModInfoButton.cpp" 25 | #include "ModsMenu.cpp" 26 | #endif 27 | #include "OptionsButton.cpp" 28 | #include "BackButton.cpp" 29 | #include "SegaIDButton.cpp" 30 | #include "MenuControl.cpp" 31 | #include "SaveSelect.cpp" 32 | #include "PlayerSelectScreen.cpp" 33 | #include "ZoneButton.cpp" 34 | #include "RecordsScreen.cpp" 35 | #include "TimeAttack.cpp" 36 | #if !RETRO_USE_ORIGINAL_CODE 37 | #include "AchievementDisplay.cpp" 38 | #include "AchievementsMenu.cpp" 39 | #endif 40 | #include "InstructionsScreen.cpp" 41 | #include "AboutScreen.cpp" 42 | #include "CreditText.cpp" 43 | #include "StaffCredits.cpp" 44 | #include "OptionsMenu.cpp" 45 | #if RETRO_USE_NETWORKING 46 | #include "MultiplayerHandler.cpp" 47 | #include "MultiplayerScreen.cpp" 48 | #endif -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/BackButton.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | void BackButton_Create(void *objPtr) 4 | { 5 | RSDK_THIS(BackButton); 6 | entity->textureCircle = LoadTexture("Data/Game/Menu/Circle.png", TEXFMT_RGBA4444); 7 | 8 | int texture = LoadTexture("Data/Game/Menu/Intro.png", TEXFMT_RGBA4444); 9 | entity->meshBack = LoadMesh("Data/Game/Models/BackArrow.bin", texture); 10 | entity->x = 0.0; 11 | entity->y = 16.0; 12 | entity->z = 160.0; 13 | entity->r = 0xFF; 14 | entity->g = 0xFF; 15 | entity->b = 0x00; 16 | } 17 | void BackButton_Main(void *objPtr) 18 | { 19 | RSDK_THIS(BackButton); 20 | 21 | if (entity->visible) { 22 | if (entity->scale < 0.2) { 23 | entity->scale += ((0.25 - entity->scale) / ((60.0 * Engine.deltaTime) * 16.0)); 24 | if (entity->scale > 0.2) 25 | entity->scale = 0.2; 26 | } 27 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 28 | SetRenderVertexColor(entity->r, entity->g, entity->b); 29 | RenderImage(entity->x, entity->y, entity->z, entity->scale, entity->scale, 256.0, 256.0, 512.0, 512.0, 0.0, 0.0, 255, entity->textureCircle); 30 | SetRenderVertexColor(0xFF, 0xFF, 0xFF); 31 | SetRenderBlendMode(RENDER_BLEND_NONE); 32 | 33 | entity->angle -= (Engine.deltaTime + Engine.deltaTime); 34 | if (entity->angle < -M_PI_2) 35 | entity->angle += M_PI_2; 36 | 37 | NewRenderState(); 38 | matrixScaleXYZF(&entity->renderMatrix, (cosf(entity->angle) * 0.35) + 1.25, (sinf(entity->angle) * 0.35) + 1.25, 1.0); 39 | matrixTranslateXYZF(&entity->matrixTemp, entity->x, entity->y, entity->z - 8.0); 40 | matrixMultiplyF(&entity->renderMatrix, &entity->matrixTemp); 41 | SetRenderMatrix(&entity->renderMatrix); 42 | RenderMesh(entity->meshBack, MESH_NORMALS, true); 43 | SetRenderMatrix(NULL); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/BackButton.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_BACKBUTTON_H 2 | #define NATIVE_BACKBUTTON_H 3 | 4 | struct NativeEntity_BackButton : NativeEntityBase { 5 | int field_10; 6 | byte visible; 7 | int field_18; 8 | int field_1C; 9 | float x; 10 | float y; 11 | float z; 12 | MeshInfo *meshBack; 13 | float angle; 14 | float scale; 15 | byte textureCircle; 16 | byte r; 17 | byte g; 18 | byte b; 19 | MatrixF renderMatrix; 20 | MatrixF matrixTemp; 21 | }; 22 | 23 | void BackButton_Create(void *objPtr); 24 | void BackButton_Main(void *objPtr); 25 | 26 | #endif // !NATIVE_BACKBUTTON_H 27 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/CWSplash.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | void CWSplash_Create(void *objPtr) 4 | { 5 | RSDK_THIS(CWSplash); 6 | entity->state = CWSPLASH_STATE_ENTER; 7 | entity->rectAlpha = 320.0; 8 | entity->textureID = LoadTexture("Data/Game/Menu/CWLogo.png", TEXFMT_RGBA8888); 9 | } 10 | void CWSplash_Main(void *objPtr) 11 | { 12 | RSDK_THIS(CWSplash); 13 | 14 | switch (entity->state) { 15 | case CWSPLASH_STATE_ENTER: 16 | entity->rectAlpha -= 300.0 * Engine.deltaTime; 17 | if (entity->rectAlpha < -320.0) 18 | entity->state = CWSPLASH_STATE_EXIT; 19 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 20 | RenderRect(-SCREEN_CENTERX_F, SCREEN_CENTERY_F, 160.0, SCREEN_XSIZE_F, SCREEN_YSIZE_F, 0xFF, 0x90, 0x00, 0xFF); 21 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 22 | RenderImage(0.0, 0.0, 160.0, 0.25, 0.25, 512.0, 256.0, 1024.0, 512.0, 0.0, 0.0, 255, entity->textureID); 23 | RenderRect(-SCREEN_CENTERX_F, SCREEN_CENTERY_F, 160.0, SCREEN_XSIZE_F, SCREEN_YSIZE_F, 0, 0, 0, entity->rectAlpha); 24 | break; 25 | case CWSPLASH_STATE_EXIT: 26 | entity->rectAlpha += 300.0 * Engine.deltaTime; 27 | if (entity->rectAlpha > 512.0) 28 | entity->state = CWSPLASH_STATE_SPAWNTITLE; 29 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 30 | RenderRect(-SCREEN_CENTERX_F, SCREEN_CENTERY_F, 160.0, SCREEN_XSIZE_F, SCREEN_YSIZE_F, 0xFF, 0x90, 0x00, 0xFF); 31 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 32 | RenderImage(0.0, 0.0, 160.0, 0.25, 0.25, 512.0, 256.0, 1024.0, 512.0, 0.0, 0.0, 255, entity->textureID); 33 | RenderRect(-SCREEN_CENTERX_F, SCREEN_CENTERY_F, 160.0, SCREEN_XSIZE_F, SCREEN_YSIZE_F, 0, 0, 0, entity->rectAlpha); 34 | break; 35 | case CWSPLASH_STATE_SPAWNTITLE: ResetNativeObject(entity, TitleScreen_Create, TitleScreen_Main); break; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/CWSplash.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_CWSPLASH_H 2 | #define NATIVE_CWSPLASH_H 3 | 4 | enum CWSplashStates { CWSPLASH_STATE_ENTER, CWSPLASH_STATE_EXIT, CWSPLASH_STATE_SPAWNTITLE }; 5 | 6 | struct NativeEntity_CWSplash : NativeEntityBase { 7 | CWSplashStates state; 8 | float rectAlpha; 9 | byte textureID; 10 | }; 11 | 12 | void CWSplash_Create(void *objPtr); 13 | void CWSplash_Main(void *objPtr); 14 | 15 | #endif // !NATIVE_CWSPLASH_H 16 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/CreditText.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | void CreditText_Create(void *objPtr) 4 | { 5 | RSDK_THIS(CreditText); 6 | entity->alpha = 255; 7 | entity->state = CREDITTEXT_STATE_SETUP; 8 | entity->textureID = LoadTexture("Data/Game/Menu/DevLogos.png", TEXFMT_RGBA8888); 9 | } 10 | void CreditText_Main(void *objPtr) 11 | { 12 | RSDK_THIS(CreditText); 13 | 14 | if (entity->useRenderMatrix) { 15 | NewRenderState(); 16 | SetRenderMatrix(&entity->renderMatrix); 17 | } 18 | 19 | switch (entity->state) { 20 | case CREDITTEXT_STATE_SETUP: 21 | entity->state = CREDITTEXT_STATE_DISPLAY; 22 | entity->alignOffset = GetTextWidth(entity->text, entity->fontID, entity->scale) * 0.5; 23 | // Fallthrough 24 | default: 25 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 26 | SetRenderVertexColor((entity->colour >> 16) & 0xFF, (entity->colour >> 8) & 0xFF, entity->colour & 0xFF); 27 | RenderTextClipped(entity->text, entity->fontID, entity->textX - entity->alignOffset, entity->textY, entity->textZ, entity->scale, 28 | entity->alpha); 29 | SetRenderVertexColor(0xFF, 0xFF, 0xFF); 30 | break; 31 | case CREDITTEXT_STATE_IMAGE: 32 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 33 | RenderImageClipped(-64.0, entity->textY, entity->textZ, 0.35, 0.35, 157.0, 77.0, 314.0, 154.0, 2.0, 2.0, 255, entity->textureID); 34 | RenderImageClipped(64.0, entity->textY, entity->textZ, 0.35, 0.35, 92.0, 92.0, 184.0, 184.0, 320.0, 2.0, 255, entity->textureID); 35 | break; 36 | } 37 | 38 | if (entity->useRenderMatrix) { 39 | NewRenderState(); 40 | SetRenderMatrix(NULL); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/CreditText.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_CREDITTEXT_H 2 | #define NATIVE_CREDITTEXT_H 3 | 4 | enum CreditTextStates { CREDITTEXT_STATE_DISPLAY, CREDITTEXT_STATE_SETUP = 3, CREDITTEXT_STATE_IMAGE }; 5 | enum CreditTextTypes { CREDITS_TYPE_TEXT1, CREDITS_TYPE_TEXT2, CREDITS_TYPE_TEXT3, CREDITS_TYPE_LOGO }; 6 | 7 | struct NativeEntity_CreditText : NativeEntityBase { 8 | float textX; 9 | float textY; 10 | float textZ; 11 | float alignOffset; 12 | float scale; 13 | int alpha; 14 | int fontID; 15 | ushort text[64]; 16 | CreditTextStates state; 17 | byte useRenderMatrix; 18 | MatrixF renderMatrix; 19 | uint colour; 20 | byte textureID; 21 | }; 22 | 23 | void CreditText_Create(void *objPtr); 24 | void CreditText_Main(void *objPtr); 25 | 26 | #endif // !NATIVE_CREDITTEXT_H 27 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/DialogPanel.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_DIALOGPANEL_H 2 | #define NATIVE_DIALOGPANEL_H 3 | 4 | enum DialogPanelTypes { 5 | DLGTYPE_OK = 1, 6 | DLGTYPE_YESNO = 2, 7 | }; 8 | 9 | enum DialogPanelSelections { 10 | DLG_YES = 1, 11 | DLG_NO, 12 | DLG_OK, 13 | }; 14 | 15 | enum DialogPanelStates { 16 | DIALOGPANEL_STATE_SETUP, 17 | DIALOGPANEL_STATE_ENTER, 18 | DIALOGPANEL_STATE_MAIN, 19 | DIALOGPANEL_STATE_ACTION, 20 | DIALOGPANEL_STATE_EXIT, 21 | DIALOGPANEL_STATE_IDLE 22 | }; 23 | 24 | struct NativeEntity_DialogPanel : NativeEntityBase { 25 | DialogPanelStates state; 26 | int buttonCount; 27 | float stateTimer; 28 | int field_1C; //?? 29 | float buttonScale; 30 | MeshInfo *panelMesh; 31 | MatrixF buttonMatrix; 32 | MatrixF buttonMult; 33 | NativeEntity_PushButton *buttons[2]; 34 | int buttonSelected; 35 | int selection; 36 | ushort text[128]; 37 | float textX; 38 | float textY; 39 | float scale; 40 | }; 41 | 42 | void DialogPanel_Create(void *objPtr); 43 | void DialogPanel_Main(void *objPtr); 44 | 45 | #endif // !NATIVE_DIALOGPANEL_H 46 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/FadeScreen.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_FADESCREEN_H 2 | #define NATIVE_FADESCREEN_H 3 | 4 | enum FadeScreenStates { 5 | FADESCREEN_STATE_MENUFADEIN, 6 | FADESCREEN_STATE_FADEOUT, 7 | FADESCREEN_STATE_GAMEFADEOUT, 8 | #if !RETRO_USE_ORIGINAL_CODE 9 | FADESCREEN_STATE_FADEIN, 10 | FADESCREEN_STATE_FADEIN_CLEAR 11 | #endif 12 | }; 13 | 14 | struct NativeEntity_FadeScreen : NativeEntityBase { 15 | FadeScreenStates state; 16 | float timer; 17 | float fadeSpeed; 18 | float delay; 19 | byte fadeR; 20 | byte fadeG; 21 | byte fadeB; 22 | int fadeA; 23 | }; 24 | 25 | void FadeScreen_Create(void *objPtr); 26 | void FadeScreen_Main(void *objPtr); 27 | 28 | #endif // !NATIVE_FADESCREEN_H 29 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/InstructionsScreen.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_INSTRUCTIONSSCREEN_H 2 | #define NATIVE_INSTRUCTIONSSCREEN_H 3 | 4 | enum InstructionsScreenStates { 5 | INSTRUCTIONSCREEN_STATE_ENTER, 6 | INSTRUCTIONSCREEN_STATE_MAIN, 7 | INSTRUCTIONSCREEN_STATE_FLIP, 8 | INSTRUCTIONSCREEN_STATE_FINISHFLIP, 9 | INSTRUCTIONSCREEN_STATE_EXIT 10 | }; 11 | enum InstructionsScreenInputStates { 12 | INSTRUCTIONSCREEN_STATEINPUT_CHECKPRESS, 13 | INSTRUCTIONSCREEN_STATEINPUT_HANDLEMOVEMENT, 14 | INSTRUCTIONSCREEN_STATEINPUT_HANDLESCROLL, 15 | INSTRUCTIONSCREEN_STATEINPUT_HANDLESWIPE 16 | }; 17 | 18 | struct NativeEntity_InstructionsScreen : NativeEntityBase { 19 | InstructionsScreenStates state; 20 | int pageID; 21 | int shownPage; 22 | float field_1C; 23 | float rotationY; 24 | float scale; 25 | NativeEntity_OptionsMenu *optionsMenu; 26 | NativeEntity_TextLabel *labelPtr; 27 | MeshInfo *meshPanel; 28 | MatrixF renderMatrix; 29 | MatrixF matrixTemp; 30 | byte textureArrows; 31 | byte textureHelp; 32 | byte textureDPad; 33 | byte touchedBack; 34 | byte touchedPrev; 35 | byte touchedNext; 36 | int arrowAlpha; 37 | InstructionsScreenInputStates stateInput; 38 | float textY; 39 | float textHeight; 40 | float field_CC; 41 | float field_D0; 42 | float field_D4; 43 | float field_D8; 44 | float lastTouchX; 45 | byte field_E0; 46 | byte flipRight; 47 | ushort pageIDText[8]; 48 | }; 49 | 50 | void InstructionsScreen_Create(void *objPtr); 51 | void InstructionsScreen_Main(void *objPtr); 52 | 53 | #endif // !NATIVE_INSTRUCTIONSSCREEN_H 54 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/LeaderboardsButton.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | void LeaderboardsButton_Create(void *objPtr) 4 | { 5 | RSDK_THIS(LeaderboardsButton); 6 | entity->textureCircle = LoadTexture("Data/Game/Menu/Circle.png", TEXFMT_RGBA4444); 7 | 8 | int texture = LoadTexture("Data/Game/Menu/Intro.png", TEXFMT_RGBA4444); 9 | entity->meshLeaderboards = LoadMesh("Data/Game/Models/Leaderboards.bin", texture); 10 | entity->x = 0.0; 11 | entity->y = 16.0; 12 | entity->z = 160.0; 13 | entity->r = 0xFF; 14 | entity->g = 0xFF; 15 | entity->b = 0x00; 16 | entity->labelPtr = CREATE_ENTITY(TextLabel); 17 | entity->labelPtr->fontID = FONT_HEADING; 18 | entity->labelPtr->scale = 0.15; 19 | entity->labelPtr->alpha = 0; 20 | entity->labelPtr->state = TEXTLABEL_STATE_IDLE; 21 | SetStringToFont(entity->labelPtr->text, strLeaderboards, FONT_HEADING); 22 | entity->labelPtr->alignPtr(entity->labelPtr, ALIGN_CENTER); 23 | } 24 | void LeaderboardsButton_Main(void *objPtr) 25 | { 26 | RSDK_THIS(LeaderboardsButton); 27 | 28 | if (entity->visible) { 29 | if (entity->scale < 0.2) { 30 | entity->scale += ((0.25 - entity->scale) / ((60.0 * Engine.deltaTime) * 16.0)); 31 | if (entity->scale > 0.2) 32 | entity->scale = 0.2; 33 | } 34 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 35 | SetRenderVertexColor(entity->r, entity->g, entity->b); 36 | RenderImage(entity->x, entity->y, entity->z, entity->scale, entity->scale, 256.0, 256.0, 512.0, 512.0, 0.0, 0.0, 255, entity->textureCircle); 37 | SetRenderVertexColor(0xFF, 0xFF, 0xFF); 38 | SetRenderBlendMode(RENDER_BLEND_NONE); 39 | 40 | entity->angle -= Engine.deltaTime; 41 | if (entity->angle < -M_PI_2) 42 | entity->angle += M_PI_2; 43 | 44 | NewRenderState(); 45 | matrixRotateXYZF(&entity->renderMatrix, 0.0, entity->angle, 0.0); 46 | matrixTranslateXYZF(&entity->matrixTemp, entity->x, entity->y, entity->z - 8.0); 47 | matrixMultiplyF(&entity->renderMatrix, &entity->matrixTemp); 48 | SetRenderMatrix(&entity->renderMatrix); 49 | RenderMesh(entity->meshLeaderboards, MESH_NORMALS, true); 50 | SetRenderMatrix(NULL); 51 | 52 | NativeEntity_TextLabel *label = entity->labelPtr; 53 | label->x = entity->x; 54 | label->y = entity->y - 72.0; 55 | label->z = entity->z; 56 | if (label->x <= -8.0 || label->x >= 8.0) { 57 | if (label->alpha > 0) 58 | label->alpha -= 8; 59 | } 60 | else if (label->alpha < 0x100) 61 | label->alpha += 8; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/LeaderboardsButton.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_LEADERBOARDSBUTTON_H 2 | #define NATIVE_LEADERBOARDSBUTTON_H 3 | 4 | struct NativeEntity_LeaderboardsButton : NativeEntityBase { 5 | int field_10; 6 | byte visible; 7 | int field_18; 8 | int field_1C; 9 | float x; 10 | float y; 11 | float z; 12 | MeshInfo *meshLeaderboards; 13 | float angle; 14 | float scale; 15 | byte textureCircle; 16 | byte r; 17 | byte g; 18 | byte b; 19 | MatrixF renderMatrix; 20 | MatrixF matrixTemp; 21 | NativeEntity_TextLabel *labelPtr; 22 | }; 23 | 24 | void LeaderboardsButton_Create(void *objPtr); 25 | void LeaderboardsButton_Main(void *objPtr); 26 | 27 | #endif // !NATIVE_LEADERBOARDSBUTTON_H 28 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/MenuBG.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_MENUBG_H 2 | #define NATIVE_MENUBG_H 3 | 4 | struct NativeEntity_MenuBG : NativeEntityBase { 5 | int isFading; 6 | float fadeTimer; 7 | float circle1Rot; 8 | float circle2Rot; 9 | float Ztrans1; 10 | float Ztrans2; 11 | float ZtransRender; 12 | MeshInfo *bgCircle1; 13 | MeshInfo *bgCircle2; 14 | MeshInfo *bgLines; 15 | MeshAnimator animator; 16 | byte textureID; 17 | byte fadeR; 18 | byte fadeG; 19 | byte fadeB; 20 | int alpha; 21 | MatrixF renderMatrix; 22 | MatrixF matrixTemp; 23 | MatrixF circle1; 24 | MatrixF circle2; 25 | }; 26 | 27 | void MenuBG_Create(void *objPtr); 28 | void MenuBG_Main(void *objPtr); 29 | 30 | #endif // !NATIVE_NENTITY_H 31 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/MenuControl.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_MENUCONTROL_H 2 | #define NATIVE_MENUCONTROL_H 3 | 4 | enum MenuButtonIDs { BUTTON_STARTGAME = 1, BUTTON_TIMEATTACK, BUTTON_MULTIPLAYER, BUTTON_ACHIEVEMENTS, BUTTON_LEADERBOARDS, BUTTON_OPTIONS }; 5 | 6 | enum MenuControlStates { 7 | MENUCONTROL_STATE_MAIN, 8 | MENUCONTROL_STATE_ACTION, 9 | MENUCONTROL_STATE_NONE, 10 | MENUCONTROL_STATE_ENTERSUBMENU, 11 | MENUCONTROL_STATE_SUBMENU, 12 | MENUCONTROL_STATE_EXITSUBMENU, 13 | MENUCONTROL_STATE_DIALOGWAIT 14 | }; 15 | enum MenuControlInputStates { 16 | MENUCONTROL_STATEINPUT_CHECKTOUCH, 17 | MENUCONTROL_STATEINPUT_HANDLEDRAG, 18 | MENUCONTROL_STATEINPUT_HANDLEMOVEMENT, 19 | MENUCONTROL_STATEINPUT_MOVE, 20 | MENUCONTROL_STATEINPUT_HANDLERELEASE 21 | }; 22 | 23 | struct NativeEntity_MenuControl : NativeEntityBase { 24 | MenuControlStates state; 25 | float timer; 26 | float float18; 27 | float float1C; 28 | float float20; 29 | float float24; 30 | float float28; 31 | float float2C; 32 | float float30; 33 | int buttonCount; 34 | NativeEntity_AchievementsButton *buttons[8]; 35 | NativeEntity_BackButton *backButton; 36 | char buttonFlags[8]; 37 | byte buttonID; 38 | MenuControlInputStates stateInput; 39 | float field_6C; 40 | float field_70; 41 | float field_74; 42 | float field_78; 43 | float touchX2; 44 | NativeEntity_SegaIDButton *segaIDButton; 45 | int field_84; 46 | NativeEntity_DialogPanel *dialog; 47 | int dialogTimer; 48 | }; 49 | 50 | void MenuControl_Create(void *objPtr); 51 | void MenuControl_Main(void *objPtr); 52 | 53 | #endif // !NATIVE_NENTITY_H 54 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/ModInfoButton.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | #if RETRO_USE_MOD_LOADER 4 | void ModInfoButton_Create(void *objPtr) { RSDK_THIS(ModInfoButton); } 5 | void ModInfoButton_Main(void *objPtr) { RSDK_THIS(ModInfoButton); } 6 | #endif 7 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/ModInfoButton.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_MODINFOBUTTON_H 2 | #define NATIVE_MODINFOBUTTON_H 3 | 4 | #if RETRO_USE_MOD_LOADER 5 | struct NativeEntity_ModInfoButton : NativeEntityBase { 6 | }; 7 | 8 | void ModInfoButton_Create(void *objPtr); 9 | void ModInfoButton_Main(void *objPtr); 10 | #endif 11 | 12 | #endif // !NATIVE_MODINFOBUTTON_H 13 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/ModsButton.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | #if RETRO_USE_MOD_LOADER 4 | void ModsButton_Create(void *objPtr) 5 | { 6 | RSDK_THIS(ModsButton); 7 | entity->textureCircle = LoadTexture("Data/Game/Menu/Circle.png", TEXFMT_RGBA4444); 8 | 9 | int texture = LoadTexture("Data/Game/Menu/Intro.png", TEXFMT_RGBA4444); 10 | entity->meshMods = LoadMesh("Data/Game/Models/Options.bin", texture); 11 | entity->x = 0.0; 12 | entity->y = 16.0; 13 | entity->z = 160.0; 14 | entity->r = 0xFF; 15 | entity->g = 0xFF; 16 | entity->b = 0x00; 17 | entity->labelPtr = CREATE_ENTITY(TextLabel); 18 | entity->labelPtr->fontID = FONT_HEADING; 19 | entity->labelPtr->scale = 0.15; 20 | entity->labelPtr->alpha = 0; 21 | entity->labelPtr->state = TEXTLABEL_STATE_IDLE; 22 | SetStringToFont8(entity->labelPtr->text, "MODS", FONT_HEADING); 23 | entity->labelPtr->alignPtr(entity->labelPtr, ALIGN_CENTER); 24 | } 25 | void ModsButton_Main(void *objPtr) 26 | { 27 | RSDK_THIS(ModsButton); 28 | 29 | if (entity->visible) { 30 | if (entity->scale < 0.2) { 31 | entity->scale += ((0.25 - entity->scale) / ((60.0 * Engine.deltaTime) * 16.0)); 32 | if (entity->scale > 0.2) 33 | entity->scale = 0.2; 34 | } 35 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 36 | SetRenderVertexColor(entity->r, entity->g, entity->b); 37 | RenderImage(entity->x, entity->y, entity->z, entity->scale, entity->scale, 256.0, 256.0, 512.0, 512.0, 0.0, 0.0, 255, entity->textureCircle); 38 | SetRenderVertexColor(0xFF, 0xFF, 0xFF); 39 | SetRenderBlendMode(RENDER_BLEND_NONE); 40 | 41 | entity->angle -= Engine.deltaTime; 42 | if (entity->angle < -M_PI_2) 43 | entity->angle += M_PI_2; 44 | 45 | NewRenderState(); 46 | matrixRotateXYZF(&entity->renderMatrix, 0.0, 0.0, entity->angle); 47 | matrixTranslateXYZF(&entity->matrixTemp, entity->x, entity->y, entity->z - 8.0); 48 | matrixMultiplyF(&entity->renderMatrix, &entity->matrixTemp); 49 | SetRenderMatrix(&entity->renderMatrix); 50 | RenderMesh(entity->meshMods, MESH_NORMALS, true); 51 | SetRenderMatrix(NULL); 52 | 53 | NativeEntity_TextLabel *label = entity->labelPtr; 54 | label->x = entity->x; 55 | label->y = entity->y - 72.0; 56 | label->z = entity->z; 57 | if (label->x <= -8.0 || label->x >= 8.0) { 58 | if (label->alpha > 0) 59 | label->alpha -= 8; 60 | } 61 | else if (label->alpha < 0x100) 62 | label->alpha += 8; 63 | } 64 | } 65 | #endif -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/ModsButton.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_MODSBUTTON_H 2 | #define NATIVE_MODSBUTTON_H 3 | 4 | #if RETRO_USE_MOD_LOADER 5 | struct NativeEntity_ModsButton : NativeEntityBase { 6 | int field_10; 7 | byte visible; 8 | int field_18; 9 | int field_1C; 10 | float x; 11 | float y; 12 | float z; 13 | MeshInfo *meshMods; 14 | float angle; 15 | float scale; 16 | byte textureCircle; 17 | byte r; 18 | byte g; 19 | byte b; 20 | MatrixF renderMatrix; 21 | MatrixF matrixTemp; 22 | NativeEntity_TextLabel *labelPtr; 23 | byte prevRegion; 24 | }; 25 | 26 | void ModsButton_Create(void *objPtr); 27 | void ModsButton_Main(void *objPtr); 28 | #endif 29 | 30 | #endif // !NATIVE_MODSBUTTON_H 31 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/ModsMenu.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | #if RETRO_USE_MOD_LOADER 4 | void ModsMenu_Create(void *objPtr) { RSDK_THIS(ModsMenu); } 5 | void ModsMenu_Main(void *objPtr) { RSDK_THIS(ModsMenu); } 6 | #endif -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/ModsMenu.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_MODSMENU_H 2 | #define NATIVE_MODSMENU_H 3 | 4 | #if RETRO_USE_MOD_LOADER 5 | struct NativeEntity_ModsMenu : NativeEntityBase { 6 | }; 7 | 8 | void ModsMenu_Create(void *objPtr); 9 | void ModsMenu_Main(void *objPtr); 10 | #endif 11 | 12 | #endif // !NATIVE_MODSMENU_H 13 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/MultiplayerButton.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_VSBUTTON_H 2 | #define NATIVE_VSBUTTON_H 3 | 4 | struct NativeEntity_MultiplayerButton : NativeEntityBase { 5 | int field_10; 6 | byte visible; 7 | int field_18; 8 | int field_1C; 9 | float x; 10 | float y; 11 | float z; 12 | MeshInfo *meshVS; 13 | float angle; 14 | float scale; 15 | byte textureCircle; 16 | byte r; 17 | byte g; 18 | byte b; 19 | MatrixF renderMatrix; 20 | MatrixF matrixTemp; 21 | NativeEntity_TextLabel *labelPtr; 22 | #if RETRO_USE_NETWORKING 23 | float connectTimer; 24 | #endif 25 | }; 26 | 27 | void MultiplayerButton_Create(void *objPtr); 28 | void MultiplayerButton_Main(void *objPtr); 29 | 30 | #endif // !NATIVE_VSBUTTON_H 31 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/MultiplayerHandler.hpp: -------------------------------------------------------------------------------- 1 | 2 | #ifndef NATIVE_MULTIPLAYERHANDLER_H 3 | #define NATIVE_MULTIPLAYERHANDLER_H 4 | 5 | #if !RETRO_USE_ORIGINAL_CODE && RETRO_USE_NETWORKING 6 | struct NativeEntity_MultiplayerHandler : NativeEntityBase { 7 | int state; 8 | float timer; 9 | NativeEntity_TextLabel *pingLabel; 10 | NativeEntity_DialogPanel *errorPanel; 11 | NativeEntity_FadeScreen *fade; 12 | }; 13 | 14 | void MultiplayerHandler_Create(void *objPtr); 15 | void MultiplayerHandler_Main(void *objPtr); 16 | #endif 17 | 18 | #endif // !NATIVE_MULTIPLAYERHANDLER_H -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/MultiplayerScreen.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_MULTIPLAYERSCREEN_H 2 | #define NATIVE_MULTIPLAYERSCREEN_H 3 | 4 | #if !RETRO_USE_ORIGINAL_CODE && RETRO_USE_NETWORKING 5 | enum MultiplayerScreenStates { 6 | MULTIPLAYERSCREEN_STATE_ENTER, 7 | MULTIPLAYERSCREEN_STATE_MAIN, 8 | MULTIPLAYERSCREEN_STATE_ACTION, 9 | MULTIPLAYERSCREEN_STATE_EXIT, 10 | MULTIPLAYERSCREEN_STATE_FLIP, 11 | MULTIPLAYERSCREEN_STATE_HOSTSCR, 12 | MULTIPLAYERSCREEN_STATE_JOINSCR, 13 | MULTIPLAYERSCREEN_STATE_STARTGAME, 14 | MULTIPLAYERSCREEN_STATE_DIALOGWAIT, 15 | }; 16 | enum MultiplayerScreenDrawStates { 17 | MULTIPLAYERSCREEN_STATEDRAW_NONE = -1, 18 | MULTIPLAYERSCREEN_STATEDRAW_MAIN, 19 | MULTIPLAYERSCREEN_STATEDRAW_HOST, 20 | MULTIPLAYERSCREEN_STATEDRAW_JOIN 21 | }; 22 | 23 | enum MultiplayerScreenButton { 24 | MULTIPLAYERSCREEN_BUTTON_HOST, 25 | MULTIPLAYERSCREEN_BUTTON_JOIN, 26 | MULTIPLAYERSCREEN_BUTTON_COPY, 27 | MULTIPLAYERSCREEN_BUTTON_JOINROOM, 28 | MULTIPLAYERSCREEN_BUTTON_PASTE, 29 | MULTIPLAYERSCREEN_BUTTON_COUNT, 30 | }; 31 | 32 | struct NativeEntity_MultiplayerScreen : NativeEntityBase { 33 | MultiplayerScreenStates state; 34 | MultiplayerScreenStates nextState; 35 | MultiplayerScreenDrawStates stateDraw; 36 | MultiplayerScreenDrawStates nextStateDraw; 37 | float timer; 38 | float scale; 39 | NativeEntity_MenuBG *bg; 40 | NativeEntity_TextLabel *label; 41 | NativeEntity_DialogPanel *dialog; 42 | MeshInfo *meshPanel; 43 | MeshAnimator animator; 44 | MatrixF renderMatrix; 45 | MatrixF matrixTemp; 46 | MatrixF matrix3; 47 | byte textureArrows; 48 | byte backPressed; 49 | int arrowAlpha; 50 | sbyte touchedUpID; 51 | sbyte touchedDownID; 52 | NativeEntity_PushButton *buttons[MULTIPLAYERSCREEN_BUTTON_COUNT]; 53 | int selectedButton; 54 | byte flipDir; 55 | float rotationY; 56 | NativeEntity_TextLabel *codeLabel[3]; 57 | int roomCode; 58 | NativeEntity_TextLabel *enterCodeLabel[8]; 59 | NativeEntity_TextLabel *enterCodeSlider[2]; 60 | }; 61 | 62 | void MultiplayerScreen_Create(void *objPtr); 63 | void MultiplayerScreen_Main(void *objPtr); 64 | #endif 65 | 66 | #endif // !NATIVE_MULTIPLAYERSCREEN_H 67 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/NativeObjects.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_OBJECTS_H 2 | #define NATIVE_OBJECTS_H 3 | 4 | #define RSDK_THIS(type) NativeEntity_##type *entity = (NativeEntity_##type *)objPtr 5 | #define CREATE_ENTITY(type) ((NativeEntity_##type *)CreateNativeObject(type##_Create, type##_Main)) 6 | 7 | extern bool usePhysicalControls; 8 | extern byte timeAttackTex; 9 | extern ushort helpText[0x1000]; 10 | 11 | #include "MenuBG.hpp" 12 | #include "TextLabel.hpp" 13 | #include "PushButton.hpp" 14 | #include "SubMenuButton.hpp" 15 | #include "DialogPanel.hpp" 16 | #include "FadeScreen.hpp" 17 | #include "VirtualDPad.hpp" 18 | #include "VirtualDPadM.hpp" 19 | #include "SettingsScreen.hpp" 20 | #include "RetroGameLoop.hpp" 21 | #include "PauseMenu.hpp" 22 | #include "SegaSplash.hpp" 23 | #include "CWSplash.hpp" 24 | #include "TitleScreen.hpp" 25 | #include "StartGameButton.hpp" 26 | #include "TimeAttackButton.hpp" 27 | #include "AchievementsButton.hpp" 28 | #include "MultiplayerButton.hpp" 29 | #include "LeaderboardsButton.hpp" 30 | #if RETRO_USE_MOD_LOADER 31 | #include "ModsButton.hpp" 32 | #include "ModInfoButton.hpp" 33 | #include "ModsMenu.hpp" 34 | #endif 35 | #include "OptionsButton.hpp" 36 | #include "BackButton.hpp" 37 | #include "SegaIDButton.hpp" 38 | #include "MenuControl.hpp" 39 | #include "SaveSelect.hpp" 40 | #include "PlayerSelectScreen.hpp" 41 | #include "ZoneButton.hpp" 42 | #include "RecordsScreen.hpp" 43 | #include "TimeAttack.hpp" 44 | #if !RETRO_USE_ORIGINAL_CODE 45 | #include "AchievementDisplay.hpp" 46 | #include "AchievementsMenu.hpp" 47 | #endif 48 | #include "InstructionsScreen.hpp" 49 | #include "AboutScreen.hpp" 50 | #include "CreditText.hpp" 51 | #include "StaffCredits.hpp" 52 | #include "OptionsMenu.hpp" 53 | #if RETRO_USE_NETWORKING 54 | #include "MultiplayerHandler.hpp" 55 | #include "MultiplayerScreen.hpp" 56 | #endif 57 | 58 | #endif // !NATIVE_OBJECTS_H -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/OptionsButton.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | void OptionsButton_Create(void *objPtr) 4 | { 5 | RSDK_THIS(OptionsButton); 6 | entity->textureCircle = LoadTexture("Data/Game/Menu/Circle.png", TEXFMT_RGBA4444); 7 | 8 | int texture = LoadTexture("Data/Game/Menu/Intro.png", TEXFMT_RGBA4444); 9 | entity->meshOptions = LoadMesh("Data/Game/Models/Options.bin", texture); 10 | entity->x = 0.0; 11 | entity->y = 16.0; 12 | entity->z = 160.0; 13 | entity->r = 0xFF; 14 | entity->g = 0xFF; 15 | entity->b = 0x00; 16 | entity->labelPtr = CREATE_ENTITY(TextLabel); 17 | entity->labelPtr->fontID = FONT_HEADING; 18 | entity->labelPtr->scale = 0.15; 19 | entity->labelPtr->alpha = 0; 20 | entity->labelPtr->state = TEXTLABEL_STATE_IDLE; 21 | SetStringToFont(entity->labelPtr->text, strHelpAndOptions, FONT_HEADING); 22 | entity->labelPtr->alignPtr(entity->labelPtr, ALIGN_CENTER); 23 | } 24 | void OptionsButton_Main(void *objPtr) 25 | { 26 | RSDK_THIS(OptionsButton); 27 | 28 | if (entity->visible) { 29 | if (entity->scale < 0.2) { 30 | entity->scale += ((0.25 - entity->scale) / ((60.0 * Engine.deltaTime) * 16.0)); 31 | if (entity->scale > 0.2) 32 | entity->scale = 0.2; 33 | } 34 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 35 | SetRenderVertexColor(entity->r, entity->g, entity->b); 36 | RenderImage(entity->x, entity->y, entity->z, entity->scale, entity->scale, 256.0, 256.0, 512.0, 512.0, 0.0, 0.0, 255, entity->textureCircle); 37 | SetRenderVertexColor(0xFF, 0xFF, 0xFF); 38 | SetRenderBlendMode(RENDER_BLEND_NONE); 39 | 40 | entity->angle -= Engine.deltaTime; 41 | if (entity->angle < -M_PI_2) 42 | entity->angle += M_PI_2; 43 | 44 | NewRenderState(); 45 | matrixRotateXYZF(&entity->renderMatrix, 0.0, 0.0, entity->angle); 46 | matrixTranslateXYZF(&entity->matrix2, entity->x, entity->y, entity->z - 8.0); 47 | matrixMultiplyF(&entity->renderMatrix, &entity->matrix2); 48 | SetRenderMatrix(&entity->renderMatrix); 49 | RenderMesh(entity->meshOptions, MESH_NORMALS, true); 50 | SetRenderMatrix(NULL); 51 | 52 | NativeEntity_TextLabel *label = entity->labelPtr; 53 | label->x = entity->x; 54 | label->y = entity->y - 72.0; 55 | label->z = entity->z; 56 | if (label->x <= -8.0 || label->x >= 8.0) { 57 | if (label->alpha > 0) 58 | label->alpha -= 8; 59 | } 60 | else if (label->alpha < 0x100) 61 | label->alpha += 8; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/OptionsButton.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_OPTIONSBUTTON_H 2 | #define NATIVE_OPTIONSBUTTON_H 3 | 4 | struct NativeEntity_OptionsButton : NativeEntityBase { 5 | int field_10; 6 | byte visible; 7 | int field_18; 8 | int field_1C; 9 | float x; 10 | float y; 11 | float z; 12 | MeshInfo *meshOptions; 13 | float angle; 14 | float scale; 15 | byte textureCircle; 16 | byte r; 17 | byte g; 18 | byte b; 19 | MatrixF renderMatrix; 20 | MatrixF matrix2; 21 | NativeEntity_TextLabel *labelPtr; 22 | }; 23 | 24 | void OptionsButton_Create(void *objPtr); 25 | void OptionsButton_Main(void *objPtr); 26 | 27 | #endif // !NATIVE_OPTIONSBUTTON_H 28 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/OptionsMenu.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_OPTIONSMENU_H 2 | #define NATIVE_OPTIONSMENU_H 3 | 4 | enum OptionsMenuStates { 5 | OPTIONSMENU_STATE_SETUP, 6 | OPTIONSMENU_STATE_ENTER, 7 | OPTIONSMENU_STATE_MAIN, 8 | OPTIONSMENU_STATE_EXIT, 9 | OPTIONSMENU_STATE_ACTION, 10 | OPTIONSMENU_STATE_ENTERSUBMENU, 11 | OPTIONSMENU_STATE_SUBMENU, 12 | OPTIONSMENU_STATE_EXITSUBMENU 13 | }; 14 | 15 | enum OptionsMenuButtons { 16 | OPTIONSMENU_BUTTON_INSTRUCTIONS, 17 | OPTIONSMENU_BUTTON_SETTINGS, 18 | OPTIONSMENU_BUTTON_ABOUT, 19 | OPTIONSMENU_BUTTON_CREDITS, 20 | OPTIONSMENU_BUTTON_COUNT, 21 | }; 22 | 23 | struct NativeEntity_OptionsMenu : NativeEntityBase { 24 | OptionsMenuStates state; 25 | float timer; 26 | int field_18; 27 | NativeEntity_MenuControl *menuControl; 28 | NativeEntity_InstructionsScreen *instructionsScreen; 29 | NativeEntity_SettingsScreen *settingsScreen; 30 | NativeEntity_AboutScreen *aboutScreen; 31 | NativeEntity_StaffCredits *staffCredits; 32 | NativeEntity_TextLabel *labelPtr; 33 | float labelRotateY; 34 | float float38; 35 | float field_3C; 36 | MatrixF matrix1; 37 | NativeEntity_SubMenuButton *buttons[OPTIONSMENU_BUTTON_COUNT]; 38 | float buttonRotateY[OPTIONSMENU_BUTTON_COUNT]; 39 | int selectedButton; 40 | float field_A4[OPTIONSMENU_BUTTON_COUNT]; 41 | float field_B4[OPTIONSMENU_BUTTON_COUNT]; 42 | }; 43 | 44 | void OptionsMenu_Create(void *objPtr); 45 | void OptionsMenu_Main(void *objPtr); 46 | 47 | #endif // !NATIVE_OPTIONSMENU_H 48 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/PauseMenu.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_PAUSEMENU_H 2 | #define NATIVE_PAUSEMENU_H 3 | 4 | enum PauseMenuButtons { 5 | PMB_CONTINUE, 6 | PMB_RESTART, 7 | PMB_SETTINGS, 8 | PMB_EXIT, 9 | #if !RETRO_USE_ORIGINAL_CODE 10 | PMB_DEVMENU, 11 | #endif 12 | PMB_COUNT 13 | }; 14 | 15 | enum PauseMenuStates { 16 | PAUSEMENU_STATE_SETUP, 17 | PAUSEMENU_STATE_ENTER, 18 | PAUSEMENU_STATE_MAIN, 19 | PAUSEMENU_STATE_CONTINUE, 20 | PAUSEMENU_STATE_ACTION, 21 | PAUSEMENU_STATE_ENTERSUBMENU, 22 | PAUSEMENU_STATE_SUBMENU, 23 | PAUSEMENU_STATE_EXITSUBMENU, 24 | PAUSEMENU_STATE_RESTART, 25 | PAUSEMENU_STATE_EXIT, 26 | #if !RETRO_USE_ORIGINAL_CODE 27 | PAUSEMENU_STATE_DEVMENU, 28 | #endif 29 | }; 30 | 31 | struct NativeEntity_PauseMenu : NativeEntityBase { 32 | PauseMenuStates state; 33 | float timer; 34 | float float18; 35 | NativeEntity_RetroGameLoop *retroGameLoop; 36 | NativeEntity_SettingsScreen *settingsScreen; 37 | NativeEntity_TextLabel *label; 38 | float renderRot; 39 | float renderRotMax; 40 | float rotInc; 41 | MatrixF matrixTemp; 42 | MatrixF matrix; 43 | NativeEntity_SubMenuButton *buttons[PMB_COUNT]; 44 | int buttonSelected; 45 | float buttonRot[PMB_COUNT]; 46 | float rotMax[PMB_COUNT]; 47 | float buttonRotY[PMB_COUNT]; 48 | NativeEntity_DialogPanel *dialog; 49 | int dwordFC; 50 | float buttonX; 51 | float matrixX; 52 | float width; 53 | float matrixY; 54 | float matrixZ; 55 | float rotationY; 56 | float rotYOff; 57 | byte textureCircle; 58 | byte textureDPad; 59 | float dpadX; 60 | float dpadXSpecial; 61 | float dpadY; 62 | int unusedAlpha; 63 | byte makeSound; 64 | byte miniPauseDisabled; 65 | #if !RETRO_USE_ORIGINAL_CODE 66 | NativeEntity_FadeScreen *devMenuFade; 67 | #endif 68 | }; 69 | 70 | void PauseMenu_Create(void *objPtr); 71 | void PauseMenu_Main(void *objPtr); 72 | 73 | // added by me rmg 74 | void PauseMenu_Render(void *objPtr); 75 | void PauseMenu_CheckTouch(void *objPtr); 76 | 77 | #endif // NATIVE_PAUSEMENU_H -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/PlayerSelectScreen.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_PLAYERSELECTSCREEN_H 2 | #define NATIVE_PLAYERSELECTSCREEN_H 3 | 4 | enum PlayerSelectScreenStates { 5 | PLAYERSELECTSCREEN_STATE_ENTER, 6 | PLAYERSELECTSCREEN_STATE_MAIN, 7 | PLAYERSELECTSCREEN_STATE_ACTION, 8 | PLAYERSELECTSCREEN_STATE_IDLE, 9 | PLAYERSELECTSCREEN_STATE_EXIT 10 | }; 11 | 12 | struct NativeEntity_PlayerSelectScreen : NativeEntityBase { 13 | PlayerSelectScreenStates state; 14 | float timer; 15 | float timer2; 16 | int field_1C; 17 | float scale; 18 | NativeEntity_SaveSelect *saveSel; 19 | NativeEntity_TextLabel *labelPtr; 20 | MeshInfo *meshPanel; 21 | MatrixF matrix1; 22 | MatrixF matrixTemp; 23 | byte textureArrows; 24 | byte texturePlayerSel; 25 | byte backPressed; 26 | int alpha; 27 | ushort textSonic[8]; 28 | ushort textTails[24]; 29 | ushort textKnux[16]; 30 | float sonicX; 31 | float tailsX; 32 | float knuxX; 33 | int playerID; 34 | byte flag; 35 | int field_129; 36 | }; 37 | 38 | void PlayerSelectScreen_Create(void *objPtr); 39 | void PlayerSelectScreen_Main(void *objPtr); 40 | 41 | #endif // !NATIVE_PLAYERSELECTSCREEN_H 42 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/PushButton.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_PUSHBUTTON_H 2 | #define NATIVE_PUSHBUTTON_H 3 | 4 | enum PushButtonStates { PUSHBUTTON_STATE_UNSELECTED, PUSHBUTTON_STATE_SELECTED, PUSHBUTTON_STATE_FLASHING, PUSHBUTTON_STATE_SCALED }; 5 | 6 | struct NativeEntity_PushButton : NativeEntityBase { 7 | float x; 8 | float y; 9 | float z; 10 | int state; 11 | float textWidth; 12 | float xOff; 13 | float yOff; 14 | float stateTimer; 15 | float flashTimer; 16 | float scale; 17 | float textScale; 18 | int alpha; 19 | int textColour; 20 | int textColourSelected; 21 | int bgColour; 22 | int bgColourSelected; 23 | byte symbolsTex; 24 | ushort text[64]; 25 | byte useRenderMatrix; 26 | MatrixF renderMatrix; 27 | }; 28 | 29 | void PushButton_Create(void *objPtr); 30 | void PushButton_Main(void *objPtr); 31 | 32 | #endif // !NATIVE_PUSHBUTTON_H 33 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/RecordsScreen.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_RECORDSSCREEN_H 2 | #define NATIVE_RECORDSSCREEN_H 3 | 4 | enum RecordsScreenStates { 5 | RECORDSSCREEN_STATE_SETUP = -1, 6 | RECORDSSCREEN_STATE_ENTER, 7 | RECORDSSCREEN_STATE_MAIN, 8 | RECORDSSCREEN_STATE_FLIP, 9 | RECORDSSCREEN_STATE_FINISHFLIP, 10 | RECORDSSCREEN_STATE_EXIT, 11 | RECORDSSCREEN_STATE_LOADSTAGE, 12 | RECORDSSCREEN_STATE_SHOWRESULTS, 13 | RECORDSSCREEN_STATE_EXITRESULTS 14 | }; 15 | 16 | enum RecordsScreenButtons { RECORDSSCREEN_BUTTON_PLAY, RECORDSSCREEN_BUTTON_NEXTACT }; 17 | 18 | struct NativeEntity_RecordsScreen : NativeEntityBase { 19 | RecordsScreenStates state; 20 | int zoneID; 21 | int actID; 22 | int actCount; 23 | int taResultID; 24 | int rank; 25 | float field_28; 26 | float field_2C; 27 | float rotationY; 28 | float scale; 29 | NativeEntityBase *timeAttack; 30 | NativeEntity_TextLabel *labelPtr; 31 | MeshInfo *meshPanel; 32 | MatrixF renderMatrix; 33 | MatrixF matrixTemp; 34 | byte textureArrows; 35 | byte textureTimeAttack; 36 | float timeAttackU; 37 | float timeAttackV; 38 | int recordOffset; 39 | float field_D4; 40 | ushort textRecords[16]; 41 | int field_F8; 42 | int field_FC; 43 | int field_100; 44 | int field_104; 45 | int field_108; 46 | int field_10C; 47 | int field_110; 48 | int field_114; 49 | ushort rank1st[16]; 50 | ushort rank2nd[16]; 51 | ushort rank3rd[16]; 52 | NativeEntity_PushButton *buttons[2]; 53 | int selectedButton; 54 | byte backPressed; 55 | byte prevActPressed; 56 | byte nextActPressed; 57 | byte field_187; 58 | int buttonAlpha; 59 | float field_18C; 60 | byte field_190; 61 | byte flipRight; 62 | }; 63 | 64 | void RecordsScreen_Create(void *objPtr); 65 | void RecordsScreen_Main(void *objPtr); 66 | 67 | #endif // !NATIVE_RECORDSSCREEN_H 68 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/RetroGameLoop.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_RETROGAMELOOP_H 2 | #define NATIVE_RETROGAMELOOP_H 3 | 4 | struct NativeEntity_RetroGameLoop : NativeEntityBase { 5 | // Nothin lol 6 | }; 7 | 8 | void RetroGameLoop_Create(void *objPtr); 9 | void RetroGameLoop_Main(void *objPtr); 10 | 11 | #endif // !NATIVE_RETROGAMELOOP_H 12 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/SaveSelect.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_SAVESELECT_H 2 | #define NATIVE_SAVESELECT_H 3 | 4 | enum SaveSelectPlayerIDs { 5 | SAVESEL_NONE, 6 | SAVESEL_SONIC, 7 | SAVESEL_ST, 8 | SAVESEL_TAILS, 9 | SAVESEL_KNUX, 10 | }; 11 | 12 | enum SaveSelectStates { 13 | SAVESELECT_STATE_SETUP, 14 | SAVESELECT_STATE_ENTER, 15 | SAVESELECT_STATE_MAIN, 16 | SAVESELECT_STATE_EXIT, 17 | SAVESELECT_STATE_LOADSAVE, 18 | SAVESELECT_STATE_ENTERSUBMENU, 19 | SAVESELECT_STATE_SUBMENU, 20 | SAVESELECT_STATE_EXITSUBMENU, 21 | SAVESELECT_STATE_MAIN_DELETING, 22 | SAVESELECT_STATE_DELSETUP, 23 | SAVESELECT_STATE_DIALOGWAIT, 24 | }; 25 | 26 | enum SaveSelectButtons { 27 | SAVESELECT_BUTTON_NOSAVE, 28 | SAVESELECT_BUTTON_SAVE1, 29 | SAVESELECT_BUTTON_SAVE2, 30 | SAVESELECT_BUTTON_SAVE3, 31 | SAVESELECT_BUTTON_SAVE4, 32 | SAVESELECT_BUTTON_COUNT, 33 | }; 34 | 35 | struct NativeEntity_SaveSelect : NativeEntityBase { 36 | SaveSelectStates state; 37 | float timer; 38 | int field_18; 39 | NativeEntity_MenuControl *menuControl; 40 | void *playerSelect; 41 | NativeEntity_TextLabel *labelPtr; 42 | float deleteRotateY; 43 | float field_2C; 44 | float field_30; 45 | MatrixF matrix1; 46 | NativeEntity_SubMenuButton *saveButtons[SAVESELECT_BUTTON_COUNT]; 47 | NativeEntity_PushButton *delButton; 48 | NativeEntity_DialogPanel *dialog; 49 | byte deleteEnabled; 50 | int selectedButton; 51 | float rotateY[SAVESELECT_BUTTON_COUNT]; 52 | float field_AC[SAVESELECT_BUTTON_COUNT]; 53 | float field_C0[SAVESELECT_BUTTON_COUNT]; 54 | }; 55 | 56 | void SaveSelect_Create(void *objPtr); 57 | void SaveSelect_Main(void *objPtr); 58 | 59 | #endif // !NATIVE_SAVESELECT_H 60 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/SegaIDButton.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | void SegaIDButton_Create(void *objPtr) 4 | { 5 | RSDK_THIS(SegaIDButton); 6 | entity->z = 160.0; 7 | entity->state = SEGAIDBUTTON_STATE_IDLE; 8 | entity->textureID = LoadTexture("Data/Game/Menu/SegaID.png", TEXFMT_RGBA8888); 9 | } 10 | void SegaIDButton_Main(void *objPtr) 11 | { 12 | RSDK_THIS(SegaIDButton); 13 | if (entity->useRenderMatrix) 14 | SetRenderMatrix(&entity->renderMatrix); 15 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 16 | 17 | switch (entity->state) { 18 | case SEGAIDBUTTON_STATE_IDLE: 19 | RenderImage(entity->x, entity->y, entity->z, 0.25, 0.25, 64.0, 64.0, 128.0, 128.0, entity->texX, 0.0, entity->alpha, entity->textureID); 20 | break; 21 | case SEGAIDBUTTON_STATE_PRESSED: 22 | RenderImage(entity->x, entity->y, entity->z, 0.3, 0.3, 64.0, 64.0, 128.0, 128.0, entity->texX, 0.0, entity->alpha, entity->textureID); 23 | break; 24 | } 25 | SetRenderVertexColor(0xFF, 0xFF, 0xFF); 26 | NewRenderState(); 27 | if (entity->useRenderMatrix) 28 | SetRenderMatrix(NULL); 29 | } 30 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/SegaIDButton.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_SEGAIDBUTTON_H 2 | #define NATIVE_SEGAIDBUTTON_H 3 | 4 | enum SegaIDButtonStates { SEGAIDBUTTON_STATE_IDLE, SEGAIDBUTTON_STATE_PRESSED }; 5 | 6 | struct NativeEntity_SegaIDButton : NativeEntityBase { 7 | float x; 8 | float y; 9 | float z; 10 | float texX; 11 | SegaIDButtonStates state; 12 | int alpha; 13 | int field_28; 14 | int field_2C; 15 | byte textureID; 16 | byte useRenderMatrix; 17 | MatrixF renderMatrix; 18 | }; 19 | 20 | void SegaIDButton_Create(void *objPtr); 21 | void SegaIDButton_Main(void *objPtr); 22 | 23 | #endif // !NATIVE_SEGAIDBUTTON_H 24 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/SegaSplash.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_SEGASPLASH_H 2 | #define NATIVE_SEGASPLASH_H 3 | 4 | enum SegaSplashStates { SEGAPLASH_STATE_ENTER, SEGAPLASH_STATE_EXIT, SEGAPLASH_STATE_SPAWNCWSPLASH }; 5 | 6 | struct NativeEntity_SegaSplash : NativeEntityBase { 7 | SegaSplashStates state; 8 | float rectAlpha; 9 | byte textureID; 10 | }; 11 | 12 | void SegaSplash_Create(void *objPtr); 13 | void SegaSplash_Main(void *objPtr); 14 | 15 | #endif // !NATIVE_SEGASPLASH_H 16 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/SettingsScreen.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_SETTINGSSCREEN_H 2 | #define NATIVE_SETTINGSSCREEN_H 3 | 4 | struct NativeEntity_OptionsMenu; 5 | 6 | enum SettingsScreenStates { 7 | SETTINGSSCREEN_STATE_ENTER, 8 | SETTINGSSCREEN_STATE_MAIN, 9 | SETTINGSSCREEN_STATE_ENTERCTRLS, 10 | SETTINGSSCREEN_STATE_FLIP_CTRLSTOUCH, 11 | SETTINGSSCREEN_STATE_FINISHFLIP_CTRLSTOUCH, 12 | SETTINGSSCREEN_STATE_CTRLS_TOUCH, 13 | SETTINGSSCREEN_STATE_EXIT, 14 | SETTINGSSCREEN_STATE_FLIP_CTRLS, 15 | SETTINGSSCREEN_STATE_FINISHFLIP_CTRLS, 16 | SETTINGSSCREEN_STATE_CTRLS, 17 | }; 18 | 19 | enum SettingsScreenDrawStates { 20 | SETTINGSSCREEN_STATEDRAW_MAIN, 21 | SETTINGSSCREEN_STATEDRAW_CONFIGDPAD, 22 | SETTINGSSCREEN_STATEDRAW_CONTROLLER, 23 | }; 24 | 25 | enum SettingsScreenButtons { 26 | SETTINGSSCREEN_BTN_MUSUP, 27 | SETTINGSSCREEN_BTN_MUSDOWN, 28 | SETTINGSSCREEN_BTN_SFXUP, 29 | SETTINGSSCREEN_BTN_SFXDOWN, 30 | SETTINGSSCREEN_BTN_SDON, 31 | SETTINGSSCREEN_BTN_SDOFF, 32 | SETTINGSSCREEN_BTN_JP, 33 | SETTINGSSCREEN_BTN_US, 34 | SETTINGSSCREEN_BTN_EU, 35 | SETTINGSSCREEN_BTN_CTRLS, 36 | SETTINGSSCREEN_BTN_COUNT, 37 | }; 38 | 39 | enum SettingsScreenSelections { 40 | SETTINGSSCREEN_SEL_NONE, 41 | SETTINGSSCREEN_SEL_MUSVOL, 42 | SETTINGSSCREEN_SEL_SFXVOL, 43 | SETTINGSSCREEN_SEL_SPINDASH, 44 | SETTINGSSCREEN_SEL_REGION, 45 | SETTINGSSCREEN_SEL_CONTROLS, 46 | }; 47 | 48 | enum SettingScreenControlModes { 49 | CTRLS_PHYSICAL, 50 | CTRLS_TOUCH, 51 | CTRLS_MOGA, 52 | CTRLS_MOGAPRO, 53 | }; 54 | 55 | struct NativeEntity_SettingsScreen : NativeEntityBase { 56 | SettingsScreenStates state; 57 | SettingsScreenDrawStates stateDraw; 58 | float timer; 59 | float buttonRotY; 60 | float buttonMatScale; 61 | NativeEntity_OptionsMenu *optionsMenu; 62 | byte isPauseMenu; 63 | NativeEntity_TextLabel *label; 64 | MeshInfo *panelMesh; 65 | MatrixF buttonMatrix; 66 | MatrixF tempMatrix; 67 | byte arrowsTex; 68 | byte controllerTex; 69 | byte backPressed; 70 | int alpha; 71 | ushort sfxText[32]; 72 | ushort musicText[32]; 73 | ushort spindashText[32]; 74 | ushort boxArtText[24]; 75 | NativeEntity_PushButton *buttons[SETTINGSSCREEN_BTN_COUNT]; 76 | int selected; 77 | NativeEntity_VirtualDPad *virtualDPad; 78 | }; 79 | 80 | void SettingsScreen_Create(void *objPtr); 81 | void SettingsScreen_Main(void *objPtr); 82 | 83 | #endif // !NATIVE_SETTINGSSCREEN_H 84 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/StaffCredits.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_STAFFCREDITS_H 2 | #define NATIVE_STAFFCREDITS_H 3 | 4 | #define StaffCredits_CreditsCount (0x10) 5 | 6 | enum StaffCreditsStates { STAFFCREDITS_STATE_ENTER, STAFFCREDITS_STATE_SCROLL, STAFFCREDITS_STATE_EXIT }; 7 | 8 | struct NativeEntity_StaffCredits : NativeEntityBase { 9 | StaffCreditsStates state; 10 | int field_14; 11 | float timer; 12 | int field_1C; 13 | float scale; 14 | NativeEntityBase *optionsMenu; 15 | NativeEntity_TextLabel *labelPtr; 16 | MeshInfo *meshPanel; 17 | MatrixF renderMatrix; 18 | MatrixF matrix2; 19 | byte textureArrows; 20 | byte useRenderMatrix; 21 | int alpha; 22 | NativeEntity_CreditText *creditText[StaffCredits_CreditsCount]; 23 | int creditsTextID; 24 | byte latestTextID; 25 | }; 26 | 27 | void StaffCredits_Create(void *objPtr); 28 | void StaffCredits_Main(void *objPtr); 29 | 30 | #endif // !NATIVE_STAFFCREDITS_H 31 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/StartGameButton.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_STARTGAMEBUTTON_H 2 | #define NATIVE_STARTGAMEBUTTON_H 3 | 4 | struct NativeEntity_StartGameButton : NativeEntityBase { 5 | int field_10; 6 | byte visible; 7 | int field_18; 8 | int field_1C; 9 | float x; 10 | float y; 11 | float z; 12 | MeshInfo *meshCart; 13 | float angle; 14 | float scale; 15 | byte textureCircle; 16 | byte r; 17 | byte g; 18 | byte b; 19 | MatrixF renderMatrix; 20 | MatrixF matrixTemp; 21 | NativeEntity_TextLabel *labelPtr; 22 | byte prevRegion; 23 | }; 24 | 25 | void StartGameButton_Create(void *objPtr); 26 | void StartGameButton_Main(void *objPtr); 27 | 28 | #endif // !NATIVE_STARTGAMEBUTTON_H 29 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/SubMenuButton.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_SUBMENUBUTTON_H 2 | #define NATIVE_SUBMENUBUTTON_H 3 | 4 | enum SubMenuButtonStates { 5 | SUBMENUBUTTON_STATE_IDLE, 6 | SUBMENUBUTTON_STATE_FLASHING1, 7 | SUBMENUBUTTON_STATE_FLASHING2, 8 | SUBMENUBUTTON_STATE_SAVEBUTTON_UNSELECTED, 9 | SUBMENUBUTTON_STATE_SAVEBUTTON_SELECTED 10 | }; 11 | 12 | struct NativeEntity_SubMenuButton : NativeEntityBase { 13 | float matX; 14 | float matY; 15 | float matZ; 16 | int state; 17 | float matXOff; 18 | float textY; 19 | float afterFlashTimer; 20 | float flashTimer; 21 | float scale; 22 | int alpha; 23 | byte r; 24 | byte g; 25 | byte b; 26 | ushort text[64]; 27 | MeshInfo *meshButton; 28 | MeshInfo *meshButtonH; 29 | byte useMatrix; 30 | MatrixF matrix; 31 | MatrixF renderMatrix; 32 | byte symbol; 33 | byte flags; 34 | byte textureSymbols; 35 | byte useMeshH; 36 | }; 37 | 38 | void SubMenuButton_Create(void *objPtr); 39 | void SubMenuButton_Main(void *objPtr); 40 | 41 | #endif // !NATIVE_SUBMENUBUTTON_H 42 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/TextLabel.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | void TextLabel_Create(void *objPtr) 4 | { 5 | RSDK_THIS(TextLabel); 6 | entity->z = 160.0; 7 | entity->alpha = 0xFF; 8 | entity->state = TEXTLABEL_STATE_IDLE; 9 | entity->alignPtr = TextLabel_Align; 10 | } 11 | void TextLabel_Main(void *objPtr) 12 | { 13 | RSDK_THIS(TextLabel); 14 | 15 | if (entity->useRenderMatrix) { 16 | NewRenderState(); 17 | SetRenderMatrix(&entity->renderMatrix); 18 | } 19 | 20 | #if !RETRO_USE_ORIGINAL_CODE 21 | if (entity->useColours) 22 | SetRenderVertexColor(entity->r, entity->g, entity->b); 23 | #endif 24 | 25 | switch (entity->state) { 26 | default: break; 27 | case TEXTLABEL_STATE_NONE: break; 28 | case TEXTLABEL_STATE_IDLE: 29 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 30 | RenderText(entity->text, entity->fontID, entity->x - entity->alignOffset, entity->y, entity->z, entity->scale, entity->alpha); 31 | break; 32 | case TEXTLABEL_STATE_BLINK: 33 | entity->timer += Engine.deltaTime; 34 | if (entity->timer > 1.0f) 35 | entity->timer -= 1.0f; 36 | 37 | if (entity->timer > 0.5) { 38 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 39 | RenderText(entity->text, entity->fontID, entity->x - entity->alignOffset, entity->y, entity->z, entity->scale, entity->alpha); 40 | } 41 | break; 42 | case TEXTLABEL_STATE_BLINK_FAST: 43 | entity->timer += Engine.deltaTime; 44 | if (entity->timer > 0.1f) 45 | entity->timer -= 0.1f; 46 | 47 | if (entity->timer > 0.05) { 48 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 49 | RenderText(entity->text, entity->fontID, entity->x - entity->alignOffset, entity->y, entity->z, entity->scale, entity->alpha); 50 | } 51 | break; 52 | } 53 | 54 | #if !RETRO_USE_ORIGINAL_CODE 55 | if (entity->useColours) 56 | SetRenderVertexColor(0xFF, 0xFF, 0xFF); 57 | #endif 58 | 59 | if (entity->useRenderMatrix) { 60 | NewRenderState(); 61 | SetRenderMatrix(NULL); 62 | } 63 | } 64 | 65 | void TextLabel_Align(NativeEntity_TextLabel *label, TextAlignments align) 66 | { 67 | switch (align) { 68 | default: 69 | case ALIGN_LEFT: label->alignOffset = 0.0; break; 70 | case ALIGN_CENTER: label->alignOffset = GetTextWidth(label->text, label->fontID, label->scale) * 0.5; break; 71 | case ALIGN_RIGHT: label->alignOffset = GetTextWidth(label->text, label->fontID, label->scale); break; 72 | } 73 | } -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/TextLabel.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_TEXTLABEL_H 2 | #define NATIVE_TEXTLABEL_H 3 | 4 | enum TextLabelStates { TEXTLABEL_STATE_NONE = -1, TEXTLABEL_STATE_IDLE, TEXTLABEL_STATE_BLINK, TEXTLABEL_STATE_BLINK_FAST }; 5 | 6 | struct NativeEntity_TextLabel : NativeEntityBase { 7 | float x; 8 | float y; 9 | float z; 10 | float alignOffset; 11 | float timer; 12 | float scale; 13 | int alpha; 14 | int fontID; 15 | ushort text[64]; 16 | TextLabelStates state; 17 | byte useRenderMatrix; 18 | MatrixF renderMatrix; 19 | void (*alignPtr)(NativeEntity_TextLabel *, TextAlignments); 20 | 21 | #if !RETRO_USE_ORIGINAL_CODE 22 | byte useColours; 23 | byte r; 24 | byte g; 25 | byte b; 26 | #endif 27 | }; 28 | 29 | void TextLabel_Create(void *objPtr); 30 | void TextLabel_Main(void *objPtr); 31 | 32 | void TextLabel_Align(NativeEntity_TextLabel *label, TextAlignments align); 33 | 34 | #endif // !NATIVE_TEXTLABEL_H 35 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/TimeAttack.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_TIMEATTACK_H 2 | #define NATIVE_TIMEATTACK_H 3 | 4 | enum TimeAttackStates { 5 | TIMEATTACK_STATE_SETUP, 6 | TIMEATTACK_STATE_ENTER, 7 | TIMEATTACK_STATE_MAIN, 8 | TIMEATTACK_STATE_PAGECHANGE, 9 | TIMEATTACK_STATE_ACTION, 10 | TIMEATTACK_STATE_ENTERSUBMENU, 11 | TIMEATTACK_STATE_SUBMENU, 12 | TIMEATTACK_STATE_EXITSUBMENU, 13 | TIMEATTACK_STATE_EXIT, 14 | }; 15 | 16 | struct NativeEntity_TimeAttack : NativeEntityBase { 17 | TimeAttackStates state; 18 | float timer; 19 | int field_18; 20 | NativeEntity_MenuControl *menuControl; 21 | NativeEntity_TextLabel *labelPtr; 22 | float float24; 23 | float float28; 24 | float float2C; 25 | NativeEntity_RecordsScreen *recordsScreen; 26 | NativeEntity_SubMenuButton *button; 27 | int totalTime; 28 | float float3C; 29 | float float40; 30 | float float44; 31 | MatrixF matrixTemp; 32 | MatrixF matrix1; 33 | MatrixF matrixTouch; 34 | NativeEntity_ZoneButton *zoneButtons[16]; 35 | int zoneID; 36 | int storedZoneID; 37 | float y; 38 | float float134; 39 | int textureArrows; 40 | int pagePrevPressed; 41 | int pageNextPressed; 42 | int pagePrevAlpha; 43 | int pageNextAlpha; 44 | float float144; 45 | int byte148; 46 | sbyte pageID; 47 | }; 48 | 49 | extern int timeAttack_ZoneCount; 50 | extern int timeAttack_ActCount; 51 | 52 | void TimeAttack_Create(void *objPtr); 53 | void TimeAttack_Main(void *objPtr); 54 | 55 | #endif // !NATIVE_TIMEATTACK_H 56 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/TimeAttackButton.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | void TimeAttackButton_Create(void *objPtr) 4 | { 5 | RSDK_THIS(TimeAttackButton); 6 | entity->textureCircle = LoadTexture("Data/Game/Menu/Circle.png", TEXFMT_RGBA4444); 7 | 8 | int texture = LoadTexture("Data/Game/Menu/Intro.png", TEXFMT_RGBA4444); 9 | entity->meshTimeAttack = LoadMesh("Data/Game/Models/TimeAttack.bin", texture); 10 | SetMeshAnimation(entity->meshTimeAttack, &entity->animator, 0, 16, 0.0); 11 | entity->animator.loopAnimation = true; 12 | entity->x = 0.0; 13 | entity->y = 16.0; 14 | entity->z = 160.0; 15 | entity->r = 0xFF; 16 | entity->g = 0xFF; 17 | entity->b = 0x00; 18 | entity->labelPtr = CREATE_ENTITY(TextLabel); 19 | entity->labelPtr->fontID = FONT_HEADING; 20 | entity->labelPtr->scale = 0.15; 21 | entity->labelPtr->alpha = 0; 22 | entity->labelPtr->state = TEXTLABEL_STATE_IDLE; 23 | SetStringToFont(entity->labelPtr->text, strTimeAttack, FONT_HEADING); 24 | entity->labelPtr->alignPtr(entity->labelPtr, ALIGN_CENTER); 25 | } 26 | void TimeAttackButton_Main(void *objPtr) 27 | { 28 | RSDK_THIS(TimeAttackButton); 29 | 30 | if (entity->visible) { 31 | if (entity->scale < 0.2) { 32 | entity->scale += ((0.25 - entity->scale) / ((60.0 * Engine.deltaTime) * 16.0)); 33 | if (entity->scale > 0.2) 34 | entity->scale = 0.2; 35 | } 36 | SetRenderBlendMode(RENDER_BLEND_ALPHA); 37 | SetRenderVertexColor(entity->r, entity->g, entity->b); 38 | RenderImage(entity->x, entity->y, entity->z, entity->scale, entity->scale, 256.0, 256.0, 512.0, 512.0, 0.0, 0.0, 255, entity->textureCircle); 39 | SetRenderVertexColor(0xFF, 0xFF, 0xFF); 40 | SetRenderBlendMode(RENDER_BLEND_NONE); 41 | 42 | entity->angle -= Engine.deltaTime; 43 | if (entity->angle < -M_PI_2) 44 | entity->angle += M_PI_2; 45 | 46 | entity->animator.animationSpeed = Engine.deltaTime * 16.0; 47 | AnimateMesh(entity->meshTimeAttack, &entity->animator); 48 | 49 | NewRenderState(); 50 | matrixRotateXYZF(&entity->renderMatrix, 0.0, sinf(entity->angle) * 0.5, 0.0); 51 | matrixTranslateXYZF(&entity->matrixTemp, entity->x, entity->y, entity->z - 8.0); 52 | matrixMultiplyF(&entity->renderMatrix, &entity->matrixTemp); 53 | SetRenderMatrix(&entity->renderMatrix); 54 | RenderMesh(entity->meshTimeAttack, MESH_NORMALS, true); 55 | SetRenderMatrix(NULL); 56 | 57 | NativeEntity_TextLabel *label = entity->labelPtr; 58 | label->x = entity->x; 59 | label->y = entity->y - 72.0; 60 | label->z = entity->z; 61 | if (label->x <= -8.0 || label->x >= 8.0) { 62 | if (label->alpha > 0) 63 | label->alpha -= 8; 64 | } 65 | else if (label->alpha < 0x100) 66 | label->alpha += 8; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/TimeAttackButton.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_TIMEATTACKBUTTON_H 2 | #define NATIVE_TIMEATTACKBUTTON_H 3 | 4 | struct NativeEntity_TimeAttackButton : NativeEntityBase { 5 | int field_10; 6 | byte visible; 7 | int field_18; 8 | int field_1C; 9 | float x; 10 | float y; 11 | float z; 12 | MeshInfo *meshTimeAttack; 13 | float angle; 14 | float scale; 15 | byte textureCircle; 16 | byte r; 17 | byte g; 18 | byte b; 19 | MatrixF renderMatrix; 20 | MatrixF matrixTemp; 21 | NativeEntity_TextLabel *labelPtr; 22 | MeshAnimator animator; 23 | }; 24 | 25 | void TimeAttackButton_Create(void *objPtr); 26 | void TimeAttackButton_Main(void *objPtr); 27 | 28 | #endif // !NATIVE_TIMEATTACKBUTTON_H 29 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/TitleScreen.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_TITLESCREEN_H 2 | #define NATIVE_TITLESCREEN_H 3 | 4 | enum FontIDs { FONT_HEADING, FONT_LABEL, FONT_TEXT }; 5 | enum RegionIDs { REGION_JP, REGION_US, REGION_EU }; 6 | 7 | enum TitleScreenStates { 8 | TITLESCREEN_STATE_SETUP, 9 | TITLESCREEN_STATE_ENTERINTRO, 10 | TITLESCREEN_STATE_INTRO, 11 | TITLESCREEN_STATE_ENTERBOX, 12 | TITLESCREEN_STATE_TITLE, 13 | TITLESCREEN_STATE_EXITTITLE, 14 | TITLESCREEN_STATE_EXIT 15 | }; 16 | 17 | struct NativeEntity_TitleScreen : NativeEntityBase { 18 | TitleScreenStates state; 19 | float introRectAlpha; 20 | NativeEntity_TextLabel *labelPtr; 21 | MeshInfo *introMesh; 22 | MeshInfo *boxMesh; 23 | MeshInfo *cartMesh; 24 | MeshAnimator meshAnimator; 25 | float rectY; 26 | float field_3C; 27 | float meshScale; 28 | float rotationY; 29 | float x; 30 | float field_4C; 31 | float field_50; 32 | float rotationZ; 33 | float matrixY; 34 | float matrixZ; 35 | MatrixF renderMatrix; 36 | MatrixF renderMatrix2; 37 | MatrixF matrixTemp; 38 | byte logoTextureID; 39 | byte introTextureID; 40 | int logoAlpha; 41 | int skipButtonAlpha; 42 | int field_12C; 43 | byte field_130; 44 | }; 45 | 46 | void TitleScreen_Create(void *objPtr); 47 | void TitleScreen_Main(void *objPtr); 48 | 49 | #endif // !NATIVE_TITLESCREEN_H 50 | -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/VirtualDPad.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_VIRTUALDPAD_H 2 | #define NATIVE_VIRTUALDPAD_H 3 | 4 | struct NativeEntity_VirtualDPad : NativeEntityBase { 5 | byte textureID; 6 | float moveX; 7 | float moveY; 8 | float pivotX; 9 | float pivotY; 10 | float offsetX; 11 | float offsetY; 12 | float jumpX; 13 | float jumpY; 14 | float moveSize; 15 | float jumpSize; 16 | float pressedSize; 17 | int alpha; 18 | float pauseX; 19 | float pauseX_S; 20 | float pauseY; 21 | int pauseAlpha; 22 | float relativeX; 23 | float relativeY; 24 | sbyte moveFinger; 25 | sbyte jumpFinger; 26 | int useTouchControls; 27 | int usePhysicalControls; 28 | int vsMode; 29 | byte editMode; 30 | }; 31 | 32 | void VirtualDPad_Create(void *objPtr); 33 | void VirtualDPad_Main(void *objPtr); 34 | 35 | #endif //! NATIVE_VIRTUALDPAD_H -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/VirtualDPadM.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_VIRTUALDPADM_H 2 | #define NATIVE_VIRTUALDPADM_H 3 | 4 | struct NativeEntity_VirtualDPadM : NativeEntityBase { 5 | byte textureID; 6 | float moveX; 7 | float moveY; 8 | float jumpX; 9 | float jumpY; 10 | float moveSize; 11 | float jumpSize; 12 | int alpha; 13 | float pauseX; 14 | float pauseX_S; 15 | float pauseY; 16 | int pauseAlpha; 17 | }; 18 | 19 | void VirtualDPadM_Create(void *objPtr); 20 | void VirtualDPadM_Main(void *objPtr); 21 | 22 | #endif //! NATIVE_VIRTUALDPAD_H -------------------------------------------------------------------------------- /RSDKv4/NativeObjects/ZoneButton.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_ZONEBUTTON_H 2 | #define NATIVE_ZONEBUTTON_H 3 | 4 | enum ZoneButtonStates { ZONEBUTTON_STATE_UNSELECTED, ZONEBUTTON_STATE_SELECTED, ZONEBUTTON_STATE_FLASHING }; 5 | 6 | struct NativeEntity_ZoneButton : NativeEntityBase { 7 | float x; 8 | float y; 9 | float z; 10 | float texX; 11 | float texY; 12 | float angle; 13 | float angleSpeed; 14 | byte unlocked; 15 | float textWidth; 16 | ZoneButtonStates state; 17 | float float38; 18 | float timer; 19 | uint textColour; 20 | uint textSelectedColour; 21 | uint bgColour; 22 | uint bgColourSelected; 23 | byte textureIntro; 24 | byte textureSymbols; 25 | ushort zoneText[32]; 26 | ushort timeText[32]; 27 | byte useRenderMatrix; 28 | MatrixF renderMatrix; 29 | }; 30 | 31 | void ZoneButton_Create(void *objPtr); 32 | void ZoneButton_Main(void *objPtr); 33 | 34 | #endif // !NATIVE_ZONEBUTTON_H 35 | -------------------------------------------------------------------------------- /RSDKv4/Networking.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NETWORKING_H 2 | #define NETWORKING_H 3 | 4 | struct MultiplayerData { 5 | int type; 6 | int data[0x1FF]; 7 | }; 8 | 9 | #if RETRO_USE_NETWORKING 10 | #include 11 | #include 12 | 13 | extern char networkHost[64]; 14 | extern char networkGame[16]; 15 | extern int networkPort; 16 | 17 | extern float lastPing; 18 | extern int dcError; 19 | extern bool waitingForPing; 20 | 21 | struct ServerPacket { 22 | byte header; 23 | uint64_t code; 24 | uint roomcode; 25 | union { 26 | unsigned char bytes[0x1000]; 27 | MultiplayerData multiData; 28 | } data; 29 | }; 30 | 31 | class NetworkSession; 32 | 33 | extern std::shared_ptr session; 34 | 35 | void initNetwork(); 36 | void runNetwork(); 37 | void sendData(); 38 | void disconnectNetwork(bool finalClose = false); 39 | void sendServerPacket(ServerPacket &send); 40 | int getRoomCode(); 41 | void setRoomCode(int code); 42 | #endif 43 | 44 | void SetNetworkGameName(int *a1, const char *name); 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /RSDKv4/RSDKv4 Decomp Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/RSDKv4/RSDKv4 Decomp Icon.ico -------------------------------------------------------------------------------- /RSDKv4/Scene3D.hpp: -------------------------------------------------------------------------------- 1 | #ifndef DRAWING3D_H 2 | #define DRAWING3D_H 3 | 4 | #define VERTEXBUFFER_SIZE (0x1000) 5 | #define FACEBUFFER_SIZE (0x400) 6 | 7 | enum FaceFlags { 8 | FACE_FLAG_TEXTURED_3D = 0, 9 | FACE_FLAG_TEXTURED_2D = 1, 10 | FACE_FLAG_COLOURED_3D = 2, 11 | FACE_FLAG_COLOURED_2D = 3, 12 | FACE_FLAG_FADED = 4, 13 | FACE_FLAG_TEXTURED_C = 5, 14 | FACE_FLAG_TEXTURED_D = 6, 15 | FACE_FLAG_3DSPRITE = 7 16 | }; 17 | 18 | enum MatrixTypes { 19 | MAT_WORLD = 0, 20 | MAT_VIEW = 1, 21 | MAT_TEMP = 2, 22 | }; 23 | 24 | struct Matrix { 25 | int values[4][4]; 26 | }; 27 | 28 | struct Vertex { 29 | int x; 30 | int y; 31 | int z; 32 | int u; 33 | int v; 34 | }; 35 | 36 | struct Face { 37 | int a; 38 | int b; 39 | int c; 40 | int d; 41 | uint colour; 42 | int flag; 43 | }; 44 | 45 | struct DrawListEntry3D { 46 | int faceID; 47 | int depth; 48 | }; 49 | 50 | extern int vertexCount; 51 | extern int faceCount; 52 | 53 | extern Matrix matFinal; 54 | extern Matrix matWorld; 55 | extern Matrix matView; 56 | extern Matrix matTemp; 57 | 58 | extern Face faceBuffer[FACEBUFFER_SIZE]; 59 | extern Vertex vertexBuffer[VERTEXBUFFER_SIZE]; 60 | extern Vertex vertexBufferT[VERTEXBUFFER_SIZE]; 61 | 62 | extern DrawListEntry3D drawList3D[FACEBUFFER_SIZE]; 63 | 64 | extern int projectionX; 65 | extern int projectionY; 66 | extern int fogColour; 67 | extern int fogStrength; 68 | 69 | extern int faceLineStart[SCREEN_YSIZE]; 70 | extern int faceLineEnd[SCREEN_YSIZE]; 71 | extern int faceLineStartU[SCREEN_YSIZE]; 72 | extern int faceLineEndU[SCREEN_YSIZE]; 73 | extern int faceLineStartV[SCREEN_YSIZE]; 74 | extern int faceLineEndV[SCREEN_YSIZE]; 75 | 76 | void setIdentityMatrix(Matrix *matrix); 77 | void matrixMultiply(Matrix *matrixA, Matrix *matrixB); 78 | void matrixTranslateXYZ(Matrix *Matrix, int XPos, int YPos, int ZPos); 79 | void matrixScaleXYZ(Matrix *matrix, int scaleX, int scaleY, int scaleZ); 80 | void matrixRotateX(Matrix *matrix, int rotationX); 81 | void matrixRotateY(Matrix *matrix, int rotationY); 82 | void matrixRotateZ(Matrix *matrix, int rotationZ); 83 | void matrixRotateXYZ(Matrix *matrix, short rotationX, short rotationY, short rotationZ); 84 | void matrixInverse(Matrix *matrix); 85 | void transformVertexBuffer(); 86 | void transformVertices(Matrix *matrix, int startIndex, int endIndex); 87 | void sort3DDrawList(); 88 | void draw3DScene(int spriteSheetID); 89 | 90 | void processScanEdge(Vertex *vertA, Vertex *vertB); 91 | void processScanEdgeUV(Vertex *vertA, Vertex *vertB); 92 | 93 | #endif // !DRAWING3D_H 94 | -------------------------------------------------------------------------------- /RSDKv4/Sprite.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SPRITE_H 2 | #define SPRITE_H 3 | 4 | int AddGraphicsFile(const char *filePath); 5 | void RemoveGraphicsFile(const char *filePath, int sheetID); 6 | 7 | int LoadBMPFile(const char *filePath, byte sheetID); 8 | int LoadGIFFile(const char *filePath, byte sheetID); 9 | int LoadPVRFile(const char *filePath, byte sheetID); 10 | 11 | void ReadGifPictureData(int width, int height, bool interlaced, byte *gfxData, int offset); 12 | 13 | #endif // !SPRITE_H 14 | -------------------------------------------------------------------------------- /RSDKv4/Text.hpp: -------------------------------------------------------------------------------- 1 | #ifndef TEXTSYSTEM_H 2 | #define TEXTSYSTEM_H 3 | 4 | #define TEXTDATA_COUNT (0x2800) 5 | #define TEXTENTRY_COUNT (0x200) 6 | #define TEXTMENU_COUNT (0x2) 7 | 8 | #define FONTLIST_CHAR_COUNT (0x1000) 9 | #define FONTLIST_COUNT (0x4) 10 | 11 | enum TextInfoTypes { TEXTINFO_TEXTDATA = 0, TEXTINFO_TEXTSIZE = 1, TEXTINFO_ROWCOUNT = 2 }; 12 | 13 | struct TextMenu { 14 | ushort textData[TEXTDATA_COUNT]; 15 | int entryStart[TEXTENTRY_COUNT]; 16 | int entrySize[TEXTENTRY_COUNT]; 17 | byte entryHighlight[TEXTENTRY_COUNT]; 18 | int textDataPos; 19 | int selection1; 20 | int selection2; 21 | ushort rowCount; 22 | ushort visibleRowCount; 23 | ushort visibleRowOffset; 24 | byte alignment; 25 | byte selectionCount; 26 | sbyte timer; 27 | }; 28 | 29 | #if RETRO_REV01 30 | #define FONTCHAR_COUNT (0x400) 31 | 32 | struct FontCharacter { 33 | int id; 34 | short srcX; 35 | short srcY; 36 | short width; 37 | short height; 38 | short pivotX; 39 | short pivotY; 40 | short xAdvance; 41 | }; 42 | #endif 43 | 44 | struct BitmapFontCharacter { 45 | ushort id; 46 | float x; 47 | float y; 48 | float width; 49 | float height; 50 | float xOffset; 51 | float yOffset; 52 | float xAdvance; 53 | ushort textureID; 54 | }; 55 | 56 | struct BitmapFont { 57 | BitmapFontCharacter characters[FONTLIST_CHAR_COUNT]; 58 | ushort count; 59 | float lineHeight; 60 | float base; 61 | }; 62 | 63 | enum TextMenuAlignments { 64 | MENU_ALIGN_LEFT, 65 | MENU_ALIGN_RIGHT, 66 | MENU_ALIGN_CENTER, 67 | }; 68 | 69 | extern TextMenu gameMenu[TEXTMENU_COUNT]; 70 | extern int textMenuSurfaceNo; 71 | 72 | extern char playerListText[0x80][0x20]; 73 | 74 | extern BitmapFont fontList[FONTLIST_COUNT]; 75 | 76 | #if RETRO_REV01 77 | extern FontCharacter fontCharacterList[FONTCHAR_COUNT]; 78 | 79 | void LoadFontFile(const char *filePath); 80 | #endif 81 | 82 | void LoadTextFile(TextMenu *menu, const char *filePath, byte mapCode); 83 | void LoadConfigListText(TextMenu *menu, int listNo); 84 | 85 | void SetupTextMenu(TextMenu *menu, int rowCount); 86 | void AddTextMenuEntry(TextMenu *menu, const char *text); 87 | void AddTextMenuEntryW(TextMenu *menu, const ushort *text); 88 | void SetTextMenuEntry(TextMenu *menu, const char *text, int rowID); 89 | void SetTextMenuEntryW(TextMenu *menu, const ushort *text, int rowID); 90 | void EditTextMenuEntry(TextMenu *menu, const char *text, int rowID); 91 | 92 | void LoadBitmapFont(const char *filePath, int index, char textureID); 93 | void ResetBitmapFonts(); 94 | float GetTextWidth(ushort *text, int fontID, float scaleX); 95 | float GetTextHeight(ushort *text, int fontID, float scaleY); 96 | void SetStringToFont(ushort *text, ushort *string, int fontID); 97 | void SetStringToFont8(ushort *text, const char *string, int fontID); 98 | void AddTimeStringToFont(ushort *text, int time, int fontID); 99 | 100 | #endif // !TEXTSYSTEM_H 101 | -------------------------------------------------------------------------------- /RSDKv4/fcaseopen.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009 Keith Bauer 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | */ 22 | 23 | #ifndef fcaseopen_h 24 | #define fcaseopen_h 25 | 26 | #include 27 | 28 | #if defined(__cplusplus) 29 | extern "C" { 30 | #endif 31 | 32 | extern FILE *fcaseopen(char const *path, char const *mode); 33 | 34 | extern void casechdir(char const *path); 35 | 36 | #if defined(__cplusplus) 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /RSDKv4/main.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | #ifdef NXLINK 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | static int s_nxlinkSock = -1; 14 | 15 | static void initNxLink() 16 | { 17 | if (R_FAILED(socketInitializeDefault())) 18 | return; 19 | 20 | s_nxlinkSock = nxlinkStdio(); 21 | if (s_nxlinkSock >= 0) 22 | printf("printf output now goes to nxlink server\n"); 23 | else 24 | socketExit(); 25 | } 26 | #endif 27 | 28 | int main(int argc, char *argv[]) 29 | { 30 | #ifdef NXLINK 31 | initNxLink(); 32 | #endif 33 | 34 | for (int i = 0; i < argc; ++i) { 35 | if (StrComp(argv[i], "UsingCWD")) 36 | usingCWD = true; 37 | } 38 | 39 | SDL_SetHint(SDL_HINT_WINRT_HANDLE_BACK_BUTTON, "1"); 40 | Engine.Init(); 41 | Engine.Run(); 42 | 43 | #ifdef NXLINK 44 | socketExit(); 45 | #endif 46 | 47 | return 0; 48 | } 49 | 50 | #if RETRO_PLATFORM == RETRO_UWP 51 | int __stdcall wWinMain(HINSTANCE, HINSTANCE, PWSTR, int) { return SDL_WinRTRunApp(main, NULL); } 52 | #endif 53 | -------------------------------------------------------------------------------- /RSDKv4/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by RSDKv4.rc 4 | // 5 | #define IDI_ICON1 102 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 104 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /Server/Makefile: -------------------------------------------------------------------------------- 1 | CXXFLAGS_ALL = $(CXXFLAGS) \ 2 | -DBASE_PATH='"$(BASE_PATH)"' \ 3 | -I../dependencies/all/asio/include/ 4 | 5 | LDFLAGS_ALL = $(LDFLAGS) 6 | LIBS_ALL = -pthread $(LIBS) 7 | 8 | SOURCES = Server.cpp 9 | 10 | objects/%.o: % 11 | mkdir -p $(@D) 12 | $(CXX) $(CXXFLAGS_ALL) -std=c++17 $^ -o $@ -c 13 | 14 | Server: $(SOURCES:%=objects/%.o) 15 | mkdir -p $(@D) 16 | $(CXX) $(CXXFLAGS_ALL) $(LDFLAGS_ALL) $^ -o $@ $(LIBS_ALL) 17 | 18 | clean: 19 | rm -r -f Server && rm -r -f objects 20 | -------------------------------------------------------------------------------- /Server/Makefile.msys2: -------------------------------------------------------------------------------- 1 | CXXFLAGS_ALL = $(CXXFLAGS) \ 2 | -DBASE_PATH='"$(BASE_PATH)"' \ 3 | -I../dependencies/all/asio/include/ 4 | 5 | LDFLAGS_ALL = $(LDFLAGS) 6 | LIBS_ALL = -lws2_32 -lwsock32 -pthread $(LIBS) 7 | 8 | SOURCES = Server.cpp 9 | 10 | objects/%.o: % 11 | mkdir -p $(@D) 12 | $(CXX) $(CXXFLAGS_ALL) -std=c++17 $^ -o $@ -c 13 | 14 | Server: $(SOURCES:%=objects/%.o) 15 | mkdir -p $(@D) 16 | $(CXX) $(CXXFLAGS_ALL) $(LDFLAGS_ALL) $^ -o $@ $(LIBS_ALL) 17 | 18 | clean: 19 | rm -r -f Server && rm -r -f objects 20 | -------------------------------------------------------------------------------- /Server/Server.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/LargeTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/LargeTile.scale-100.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/LargeTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/LargeTile.scale-125.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/LargeTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/LargeTile.scale-150.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/LargeTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/LargeTile.scale-200.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/LargeTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/LargeTile.scale-400.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SmallTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/SmallTile.scale-100.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SmallTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/SmallTile.scale-125.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SmallTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/SmallTile.scale-150.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SmallTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/SmallTile.scale-200.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SmallTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/SmallTile.scale-400.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SplashScreen.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/SplashScreen.scale-125.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SplashScreen.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/SplashScreen.scale-150.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-125.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-150.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-24.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-32.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-125.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-150.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-400.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-16.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-24.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-256.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-32.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-48.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/StoreLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/StoreLogo.scale-125.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/StoreLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/StoreLogo.scale-150.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/StoreLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/StoreLogo.scale-200.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/StoreLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/StoreLogo.scale-400.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/WideTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/WideTile.scale-100.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/WideTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/WideTile.scale-125.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/WideTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/WideTile.scale-150.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/WideTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/WideTile.scale-200.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/WideTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic1Decomp.UWP/Assets/WideTile.scale-400.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 7 | 8 | 9 | Sonic the Hedgehog 10 | SEGA 11 | Assets\StoreLogo.png 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/PropertySheet.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/LargeTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/LargeTile.scale-100.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/LargeTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/LargeTile.scale-125.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/LargeTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/LargeTile.scale-150.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/LargeTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/LargeTile.scale-200.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/LargeTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/LargeTile.scale-400.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SmallTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/SmallTile.scale-100.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SmallTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/SmallTile.scale-125.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SmallTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/SmallTile.scale-150.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SmallTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/SmallTile.scale-200.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SmallTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/SmallTile.scale-400.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SplashScreen.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/SplashScreen.scale-125.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SplashScreen.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/SplashScreen.scale-150.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-125.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-150.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-32.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-125.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-150.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-400.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-16.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-24.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-256.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-32.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-48.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/StoreLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/StoreLogo.scale-125.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/StoreLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/StoreLogo.scale-150.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/StoreLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/StoreLogo.scale-200.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/StoreLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/StoreLogo.scale-400.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/WideTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/WideTile.scale-100.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/WideTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/WideTile.scale-125.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/WideTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/WideTile.scale-150.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/WideTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/WideTile.scale-200.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/WideTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/Sonic2Decomp.UWP/Assets/WideTile.scale-400.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 7 | 8 | 9 | Sonic the Hedgehog 2 10 | SEGA 11 | Assets\StoreLogo.png 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/PropertySheet.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY') 2 | def buildAsApplication = !buildAsLibrary 3 | if (buildAsApplication) { 4 | apply plugin: 'com.android.application' 5 | } 6 | else { 7 | apply plugin: 'com.android.library' 8 | } 9 | 10 | android { 11 | ndkVersion "22.1.7171670" 12 | compileSdkVersion 29 13 | defaultConfig { 14 | if (buildAsApplication) { 15 | applicationId "com.decomp.rsdkv4" 16 | } 17 | minSdkVersion 23 18 | targetSdkVersion 29 19 | versionCode 1 20 | versionName "1.0" 21 | externalNativeBuild { 22 | ndkBuild { 23 | arguments "APP_PLATFORM=android-23" 24 | abiFilters = [] 25 | abiFilters.addAll(ABIFILTERS.split(';').collect{it as String}) 26 | } 27 | //cmake { 28 | // arguments "-DANDROID_APP_PLATFORM=android-16", "-DANDROID_STL=c++_static" 29 | // // abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' 30 | // abiFilters 'arm64-v8a' 31 | //} 32 | } 33 | } 34 | buildTypes { 35 | release { 36 | minifyEnabled false 37 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 38 | } 39 | } 40 | if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) { 41 | sourceSets.main { 42 | jniLibs.srcDir 'libs' 43 | } 44 | externalNativeBuild { 45 | ndkBuild { 46 | path 'jni/Android.mk' 47 | } 48 | //cmake { 49 | // path 'jni/CMakeLists.txt' 50 | //} 51 | } 52 | 53 | } 54 | lintOptions { 55 | abortOnError false 56 | } 57 | 58 | if (buildAsLibrary) { 59 | libraryVariants.all { variant -> 60 | variant.outputs.each { output -> 61 | def outputFile = output.outputFile 62 | if (outputFile != null && outputFile.name.endsWith(".aar")) { 63 | def fileName = "com.decomp.rsdkv4.aar" 64 | output.outputFile = new File(outputFile.parent, fileName) 65 | } 66 | } 67 | } 68 | } 69 | } 70 | 71 | dependencies { 72 | implementation fileTree(include: ['*.jar'], dir: 'libs') 73 | } 74 | -------------------------------------------------------------------------------- /android/app/jni/Android.mk: -------------------------------------------------------------------------------- 1 | include $(call all-subdir-makefiles) 2 | -------------------------------------------------------------------------------- /android/app/jni/Application.mk: -------------------------------------------------------------------------------- 1 | 2 | # Uncomment this if you're using STL in your project 3 | # You can find more information here: 4 | # https://developer.android.com/ndk/guides/cpp-support 5 | APP_STL := c++_shared 6 | 7 | APP_ABI := armeabi-v7a arm64-v8a x86 x86_64 8 | 9 | # Min runtime API level 10 | APP_PLATFORM=android-23 11 | -------------------------------------------------------------------------------- /android/app/jni/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.6) 2 | 3 | project(GAME) 4 | 5 | # armeabi-v7a requires cpufeatures library 6 | # include(AndroidNdkModules) 7 | # android_ndk_import_module_cpufeatures() 8 | 9 | 10 | # SDL sources are in a subfolder named "SDL" 11 | add_subdirectory(SDL) 12 | 13 | # Compilation of companion libraries 14 | #add_subdirectory(SDL_image) 15 | #add_subdirectory(SDL_mixer) 16 | #add_subdirectory(SDL_ttf) 17 | 18 | # Your game and its CMakeLists.txt are in a subfolder named "src" 19 | add_subdirectory(src) 20 | 21 | -------------------------------------------------------------------------------- /android/app/jni/SDL: -------------------------------------------------------------------------------- 1 | ../../../dependencies/android/SDL -------------------------------------------------------------------------------- /android/app/jni/src: -------------------------------------------------------------------------------- 1 | ../../.. -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in [sdk]/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/decomp/rsdkv4/RSDKv4.java: -------------------------------------------------------------------------------- 1 | package com.decomp.rsdkv4; 2 | 3 | import android.Manifest; 4 | import android.content.Context; 5 | import android.os.Environment; 6 | 7 | import java.io.File; 8 | 9 | import org.libsdl.app.*; 10 | 11 | 12 | public class RSDKv4 extends SDLActivity { 13 | @Override 14 | protected void onStart() { 15 | super.onStart(); 16 | getBasePath(); 17 | } 18 | 19 | @Override 20 | public void onWindowFocusChanged(boolean hasFocus) { 21 | super.onWindowFocusChanged(hasFocus); 22 | if (hasFocus) { 23 | SDLActivity.mCurrentNativeState = SDLActivity.NativeState.PAUSED; 24 | SDLActivity.mNextNativeState = SDLActivity.NativeState.RESUMED; 25 | } 26 | else { 27 | SDLActivity.mCurrentNativeState = SDLActivity.NativeState.RESUMED; 28 | SDLActivity.mNextNativeState = SDLActivity.NativeState.PAUSED; 29 | } 30 | 31 | SDLActivity.handleNativeState(); 32 | } 33 | 34 | public String getBasePath() { 35 | Context c = getApplicationContext(); 36 | requestPermissions(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE}, 0); 37 | String p = Environment.getExternalStorageDirectory().getAbsolutePath() + "/RSDK/v4"; 38 | //getExternalStorageDirectory is deprecated. I do not care. 39 | new File(p).mkdirs(); 40 | return p + "/"; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /android/app/src/main/java/org/libsdl/app/HIDDevice.java: -------------------------------------------------------------------------------- 1 | package org.libsdl.app; 2 | 3 | import android.hardware.usb.UsbDevice; 4 | 5 | interface HIDDevice 6 | { 7 | public int getId(); 8 | public int getVendorId(); 9 | public int getProductId(); 10 | public String getSerialNumber(); 11 | public int getVersion(); 12 | public String getManufacturerName(); 13 | public String getProductName(); 14 | public UsbDevice getDevice(); 15 | public boolean open(); 16 | public int sendFeatureReport(byte[] report); 17 | public int sendOutputReport(byte[] report); 18 | public boolean getFeatureReport(byte[] report); 19 | public void setFrozen(boolean frozen); 20 | public void close(); 21 | public void shutdown(); 22 | } 23 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-v27/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #231F20 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | RSDKv4 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | google() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.0-alpha05' 10 | 11 | // NOTE: Do not place your application dependencies here; they belong 12 | // in the individual module build.gradle files 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | jcenter() 19 | google() 20 | } 21 | } 22 | 23 | 24 | task clean(type: Delete) { 25 | delete rootProject.buildDir 26 | } 27 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | ABIFILTERS=armeabi-v7a;arm64-v8a;x86;x86_64 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Aug 03 23:47:29 CDT 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-rc-1-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /dependencies/all/dependencies.txt: -------------------------------------------------------------------------------- 1 | asio: download https://think-async.com/Asio/ 2 | download the latest release and unzip it in "./asio/" 3 | 4 | stb-image: download https://github.com/nothings/stb 5 | download the source code and unzip it in "./stb-image/" 6 | 7 | tinyxml2: download https://github.com/leethomason/tinyxml2/releases 8 | download the source code of the latest release and unzip it in "./tinyxml2/" -------------------------------------------------------------------------------- /dependencies/android/config_types.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_TYPES_H__ 2 | #define __CONFIG_TYPES_H__ 3 | 4 | #include 5 | typedef int16_t ogg_int16_t; 6 | typedef uint16_t ogg_uint16_t; 7 | typedef int32_t ogg_int32_t; 8 | typedef uint32_t ogg_uint32_t; 9 | typedef int64_t ogg_int64_t; 10 | typedef uint64_t ogg_uint64_t; 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /dependencies/android/dependencies.txt: -------------------------------------------------------------------------------- 1 | SDL2: https://www.libsdl.org/download-2.0.php 2 | Download the source code and unzip it in "./SDL/". 3 | 4 | libogg: https://xiph.org/downloads/ (libogg) 5 | Download libogg and unzip it in "./libogg/". 6 | 7 | libvorbis: https://xiph.org/downloads/ (libvorbis) 8 | Download libvorbis and unzip it in "./libvorbis/". 9 | -------------------------------------------------------------------------------- /dependencies/ios/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /dependencies/ios/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /dependencies/ios/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /dependencies/ios/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/ios/Default.png -------------------------------------------------------------------------------- /dependencies/ios/dependencies.txt: -------------------------------------------------------------------------------- 1 | SDL2: https://www.libsdl.org/download-2.0.php 2 | Download the source for the latest SDL2 version and open the Xcode project in Xcode/, from there you need to build the "Framework-iOS" target to a generic iOS device, then place the built frameworks (hidapi.framework & SDL2.framework) in "./SDL2/" 3 | NOTE: you will need to create a project to build libSDL2Main.a manually, otherwise there will be "undefined references to _main" errors in the main Xcode project 4 | 5 | libogg: https://xiph.org/downloads/ (libogg) 6 | Download the source and create an Xcode project to build the library as a framework, once the framework is built (Ogg.framework), place it in ./ 7 | 8 | libvorbis: https://xiph.org/downloads/ (libvorbis) 9 | Download the source and create an Xcode project to build the library as a framework, once the framework is built (vorbis.framework), place it in ./ -------------------------------------------------------------------------------- /dependencies/mac/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "RSDKv4 Decomp Icon-16.png", 5 | "idiom" : "mac", 6 | "scale" : "1x", 7 | "size" : "16x16" 8 | }, 9 | { 10 | "filename" : "RSDKv4 Decomp Icon-32.png", 11 | "idiom" : "mac", 12 | "scale" : "2x", 13 | "size" : "16x16" 14 | }, 15 | { 16 | "filename" : "RSDKv4 Decomp Icon-33.png", 17 | "idiom" : "mac", 18 | "scale" : "1x", 19 | "size" : "32x32" 20 | }, 21 | { 22 | "filename" : "RSDKv4 Decomp Icon-64.png", 23 | "idiom" : "mac", 24 | "scale" : "2x", 25 | "size" : "32x32" 26 | }, 27 | { 28 | "filename" : "RSDKv4 Decomp Icon-128.png", 29 | "idiom" : "mac", 30 | "scale" : "1x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "filename" : "RSDKv4 Decomp Icon-256.png", 35 | "idiom" : "mac", 36 | "scale" : "2x", 37 | "size" : "128x128" 38 | }, 39 | { 40 | "filename" : "RSDKv4 Decomp Icon-257.png", 41 | "idiom" : "mac", 42 | "scale" : "1x", 43 | "size" : "256x256" 44 | }, 45 | { 46 | "filename" : "RSDKv4 Decomp Icon-512.png", 47 | "idiom" : "mac", 48 | "scale" : "2x", 49 | "size" : "256x256" 50 | }, 51 | { 52 | "filename" : "RSDKv4 Decomp Icon-513.png", 53 | "idiom" : "mac", 54 | "scale" : "1x", 55 | "size" : "512x512" 56 | }, 57 | { 58 | "filename" : "RSDKv4 Decomp Icon-1024.png", 59 | "idiom" : "mac", 60 | "scale" : "2x", 61 | "size" : "512x512" 62 | } 63 | ], 64 | "info" : { 65 | "author" : "xcode", 66 | "version" : 1 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-1024.png -------------------------------------------------------------------------------- /dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-128.png -------------------------------------------------------------------------------- /dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-16.png -------------------------------------------------------------------------------- /dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-256.png -------------------------------------------------------------------------------- /dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-257.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-257.png -------------------------------------------------------------------------------- /dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-32.png -------------------------------------------------------------------------------- /dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-33.png -------------------------------------------------------------------------------- /dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-512.png -------------------------------------------------------------------------------- /dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-513.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-513.png -------------------------------------------------------------------------------- /dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/Assets.xcassets/AppIcon.appiconset/RSDKv4 Decomp Icon-64.png -------------------------------------------------------------------------------- /dependencies/mac/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /dependencies/mac/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 20C69 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | AppIcon.icns 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleSupportedPlatforms 22 | 23 | MacOSX 24 | 25 | DTCompiler 26 | com.apple.compilers.llvm.clang.1_0 27 | DTPlatformBuild 28 | 12C33 29 | DTPlatformName 30 | macosx 31 | DTPlatformVersion 32 | 11.1 33 | DTSDKBuild 34 | 20C63 35 | DTSDKName 36 | macosx11.1 37 | DTXcode 38 | 1230 39 | DTXcodeBuild 40 | 12C33 41 | LSApplicationCategoryType 42 | public.app-category.games 43 | LSMinimumSystemVersion 44 | 10.11 45 | NSHighResolutionCapable 46 | True 47 | NSHumanReadableCopyright 48 | Copyright © 1991, 1992, 2013 SEGA. Portions © 2021 Rubberduckycooly. All rights reserved. 49 | NSMainStoryboardFile 50 | Main 51 | NSPrincipalClass 52 | NSApplication 53 | NSSupportsAutomaticTermination 54 | 55 | NSSupportsSuddenTermination 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /dependencies/mac/RSDKv4.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.cs.disable-library-validation 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /dependencies/mac/cocoaHelpers.hpp: -------------------------------------------------------------------------------- 1 | #ifndef COCOA_HELPERS_H 2 | #define COCOA_HELPERS_H 3 | 4 | const char* getResourcesPath(void); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /dependencies/mac/cocoaHelpers.mm: -------------------------------------------------------------------------------- 1 | #ifdef __APPLE__ 2 | 3 | #import 4 | #include "cocoaHelpers.hpp" 5 | 6 | const char* getResourcesPath(void) 7 | { 8 | @autoreleasepool 9 | { 10 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES); 11 | NSString *applicationSupportDirectory = [paths firstObject]; 12 | 13 | return (char*)[applicationSupportDirectory UTF8String]; 14 | } 15 | } 16 | #endif 17 | -------------------------------------------------------------------------------- /dependencies/mac/dependencies.txt: -------------------------------------------------------------------------------- 1 | SDL2: https://www.libsdl.org/download-2.0.php 2 | just download the appropriate development library for your compiler and place it in "./SDL2/" 3 | 4 | libogg: https://xiph.org/downloads/ (libogg) 5 | download the libogg .zip file and unzip it in "./libogg/", then build the library as a framework, and include it in the xcode proj 6 | 7 | libvorbis: https://xiph.org/downloads/ (libvorbis) 8 | download the libogg .zip file and unzip it in "./libvorbis/", then build the library as a framework, and include it in the xcode projß -------------------------------------------------------------------------------- /dependencies/mac/icons/RSDKv4 Decomp Icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/icons/RSDKv4 Decomp Icon-1024.png -------------------------------------------------------------------------------- /dependencies/mac/icons/RSDKv4 Decomp Icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/icons/RSDKv4 Decomp Icon-128.png -------------------------------------------------------------------------------- /dependencies/mac/icons/RSDKv4 Decomp Icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/icons/RSDKv4 Decomp Icon-16.png -------------------------------------------------------------------------------- /dependencies/mac/icons/RSDKv4 Decomp Icon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/icons/RSDKv4 Decomp Icon-256.png -------------------------------------------------------------------------------- /dependencies/mac/icons/RSDKv4 Decomp Icon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/icons/RSDKv4 Decomp Icon-32.png -------------------------------------------------------------------------------- /dependencies/mac/icons/RSDKv4 Decomp Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/icons/RSDKv4 Decomp Icon-512.png -------------------------------------------------------------------------------- /dependencies/mac/icons/RSDKv4 Decomp Icon-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/dependencies/mac/icons/RSDKv4 Decomp Icon-64.png -------------------------------------------------------------------------------- /dependencies/windows-uwp/WinRTIncludes.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | inline char *getResourcesPath() 20 | { 21 | static char resourcePath[256] = { 0 }; 22 | 23 | if (strlen(resourcePath) == 0) { 24 | auto folder = winrt::Windows::Storage::ApplicationData::Current().LocalFolder(); 25 | auto path = to_string(folder.Path()); 26 | 27 | std::copy(path.begin(), path.end(), resourcePath); 28 | } 29 | 30 | return resourcePath; 31 | } 32 | 33 | inline uint UAP_GetRetroGamePlatform() 34 | { 35 | auto touchCaps = winrt::Windows::Devices::Input::TouchCapabilities(); 36 | return touchCaps.TouchPresent() ? RETRO_MOBILE : RETRO_STANDARD; 37 | } 38 | -------------------------------------------------------------------------------- /dependencies/windows-uwp/dependencies.txt: -------------------------------------------------------------------------------- 1 | SDL2: https://www.libsdl.org/download-2.0.php 2 | download the appropriate development library for your compiler and unzip it in "./SDL2/" 3 | 4 | SDL1 (optional, use SDL2 if you're unsure): https://libsdl.org/download-1.2.php 5 | download the appropriate development library for your compiler and unzip it in "./SDL1/" 6 | 7 | libogg: https://xiph.org/downloads/ (libogg) 8 | download libogg and unzip it in "./libogg/", then build the static library 9 | 10 | libvorbis: https://xiph.org/downloads/ (libvorbis) 11 | download libvorbis and unzip it in "./libvorbis/", then build the VS2010 static library (win32/VS2010/vorbis_static.sln) 12 | -------------------------------------------------------------------------------- /dependencies/windows/dependencies.txt: -------------------------------------------------------------------------------- 1 | SDL2: https://www.libsdl.org/download-2.0.php 2 | download the appropriate development library for your compiler and unzip it in "./SDL2/" 3 | 4 | SDL1 (optional, use SDL2 if you're unsure): https://libsdl.org/download-1.2.php 5 | download the appropriate development library for your compiler and unzip it in "./SDL1/" 6 | 7 | libogg: https://xiph.org/downloads/ (libogg) 8 | download libogg and unzip it in "./libogg/", then build the static library 9 | 10 | libvorbis: https://xiph.org/downloads/ (libvorbis) 11 | download libvorbis and unzip it in "./libvorbis/", then build the VS2010 static library (win32/VS2010/vorbis_static.sln) 12 | 13 | glew: http://glew.sourceforge.net/ download binaries, place the unzipped folder into "./" and rename it to "glew" -------------------------------------------------------------------------------- /flatpak/README.md: -------------------------------------------------------------------------------- 1 | # Flatpak 2 | 3 | You will need the FreeDesktop.org 20.08 SDK installed, if you don't have it, 4 | install [Flathub](https://flathub.org/) which provides it. 5 | 6 | # Sonic the Hedgehog Flatpak 7 | 8 | To build and install the Sonic the Hedgehog flatpak you first need the Android 9 | APK for the game. To buy one, visit https://www.sega.com/games/sonic-hedgehog. 10 | 11 | Once you have the APK file, rename it to `sonic1.apk` and put it in this 12 | directory. 13 | 14 | To build and install the flatpak, run: 15 | ``` 16 | $ sudo flatpak-builder --install --force-clean sonic1 com.sega.Sonic1.json 17 | ``` 18 | 19 | # Sonic the Hedgehog 2 Flatpak 20 | 21 | To build and install the Sonic the Hedgehog 2 flatpak you first need the Android 22 | APK for the game. To buy one, visit https://www.sega.com/games/sonic-hedgehog2. 23 | 24 | Once you have the APK file, rename it to `sonic2.apk` and put it in this 25 | directory. 26 | 27 | To build and install the flatpak, run: 28 | ``` 29 | $ sudo flatpak-builder --install --force-clean sonic2 com.sega.Sonic2.json 30 | ``` 31 | -------------------------------------------------------------------------------- /flatpak/com.sega.Sonic1.appdata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | com.sega.Sonic1 4 | Sonic the Hedgehog 5 | CC0-1.0 6 | Save the world from the evil Dr. Eggman! 7 | 8 |

Race at lightning speeds across seven classic zones as Sonic the Hedgehog. Run and spin through loop-de-loops as you collect rings and defeat enemies on your mission to save the world from the evil Dr. Eggman.

9 |
10 | https://www.sega.com/games/sonic-hedgehog 11 | 12 | https://cdn.sega.com/1.png 13 | https://cdn.sega.com/2.png 14 | https://cdn.sega.com/3.png 15 | https://cdn.sega.com/4.png 16 | https://cdn.sega.com/5.png 17 | https://cdn.sega.com/6.png 18 | 19 | com.sega.Sonic1.desktop 20 | LicenseRef-proprietary 21 | SEGA 22 | 23 | moderate 24 | none 25 | none 26 | none 27 | none 28 | none 29 | none 30 | none 31 | none 32 | none 33 | none 34 | none 35 | none 36 | intense 37 | none 38 | none 39 | none 40 | none 41 | none 42 | none 43 | 44 |
45 | -------------------------------------------------------------------------------- /flatpak/com.sega.Sonic1.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Sonic the Hedgehog 4 | Icon=com.sega.Sonic1 5 | Exec=sonic2013 6 | Categories=Game; 7 | -------------------------------------------------------------------------------- /flatpak/com.sega.Sonic1.json: -------------------------------------------------------------------------------- 1 | { 2 | "app-id" : "com.sega.Sonic1", 3 | "runtime" : "org.freedesktop.Platform", 4 | "runtime-version" : "20.08", 5 | "sdk" : "org.freedesktop.Sdk", 6 | "command" : "sonic2013", 7 | "finish-args" : [ 8 | "--share=ipc", 9 | "--socket=x11", 10 | "--socket=wayland", 11 | "--socket=pulseaudio", 12 | "--device=all" 13 | ], 14 | "modules" : [ 15 | { 16 | "name" : "sonic1", 17 | "no-autogen": true, 18 | "make-args": [ 19 | "prefix=/app", 20 | "BASE_PATH=/app/share/sonic1/" 21 | ], 22 | "make-install-args": [ 23 | "prefix=/app", 24 | "BASE_PATH=/app/share/sonic1/" 25 | ], 26 | "post-install": [ 27 | "unzip -j sonic1.apk assets/Data.rsdk.xmf", 28 | "install -Dp -m 644 Data.rsdk.xmf /app/share/sonic1/Data.rsdk", 29 | "install -Dp -m 644 com.sega.Sonic1.desktop /app/share/applications/com.sega.Sonic1.desktop", 30 | "install -Dp -m 644 com.sega.Sonic1.png /app/share/icons/hicolor/256x256/apps/com.sega.Sonic1.png", 31 | "install -Dp -m 644 com.sega.Sonic1.appdata.xml /app/share/appdata/com.sega.Sonic1.appdata.xml" 32 | ], 33 | "sources" : [ 34 | { 35 | "type" : "git", 36 | "url" : "https://github.com/Rubberduckycooly/Sonic-1-2-2013-Decompilation.git", 37 | "branch" : "main" 38 | }, 39 | { 40 | "type": "file", 41 | "path": "sonic1.apk" 42 | }, 43 | { 44 | "type": "file", 45 | "path": "com.sega.Sonic1.desktop" 46 | }, 47 | { 48 | "type": "file", 49 | "path": "com.sega.Sonic1.png" 50 | }, 51 | { 52 | "type": "file", 53 | "path": "com.sega.Sonic1.appdata.xml" 54 | } 55 | ] 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /flatpak/com.sega.Sonic1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/flatpak/com.sega.Sonic1.png -------------------------------------------------------------------------------- /flatpak/com.sega.Sonic2.appdata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | com.sega.Sonic2 4 | Sonic the Hedgehog 2 5 | CC0-1.0 6 | Speed back in time to destroy the devious Dr. Eggman! 7 | 8 |

Speed back in time and discover the game that first united Sonic the Hedgehog with his amazing flying sidekick Miles "Tails" Prower. Run through high speed levels packed with enemies and hazards as you zoom along loop de loops in your mission to destroy the devious Dr. Eggman.

9 |
10 | https://www.sega.com/games/sonic-hedgehog2 11 | 12 | https://cdn.sega.com/sonic2_1.png 13 | https://cdn.sega.com/sonic2_6.png 14 | https://cdn.sega.com/sonic2_9.png 15 | https://cdn.sega.com/sonic2_cnz_2.png 16 | https://cdn.sega.com/sonic2_cpz_1.png 17 | https://cdn.sega.com/sonic2_ehz_2.png 18 | https://cdn.sega.com/sonic2_hpz_4.png 19 | 20 | com.sega.Sonic2.desktop 21 | LicenseRef-proprietary 22 | SEGA 23 | 24 | moderate 25 | none 26 | none 27 | none 28 | none 29 | none 30 | none 31 | none 32 | none 33 | none 34 | none 35 | none 36 | none 37 | intense 38 | none 39 | none 40 | none 41 | none 42 | none 43 | none 44 | 45 |
46 | -------------------------------------------------------------------------------- /flatpak/com.sega.Sonic2.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Sonic the Hedgehog 2 4 | Icon=com.sega.Sonic2 5 | Exec=sonic2013 6 | Categories=Game; 7 | -------------------------------------------------------------------------------- /flatpak/com.sega.Sonic2.json: -------------------------------------------------------------------------------- 1 | { 2 | "app-id" : "com.sega.Sonic2", 3 | "runtime" : "org.freedesktop.Platform", 4 | "runtime-version" : "20.08", 5 | "sdk" : "org.freedesktop.Sdk", 6 | "command" : "sonic2013", 7 | "finish-args" : [ 8 | "--share=ipc", 9 | "--socket=x11", 10 | "--socket=wayland", 11 | "--socket=pulseaudio", 12 | "--device=all" 13 | ], 14 | "modules" : [ 15 | { 16 | "name" : "sonic2", 17 | "no-autogen": true, 18 | "make-args": [ 19 | "prefix=/app", 20 | "BASE_PATH=/app/share/sonic2/" 21 | ], 22 | "make-install-args": [ 23 | "prefix=/app", 24 | "BASE_PATH=/app/share/sonic2/" 25 | ], 26 | "post-install": [ 27 | "unzip -j sonic2.apk assets/Data.rsdk.xmf", 28 | "install -Dp -m 644 Data.rsdk.xmf /app/share/sonic2/Data.rsdk", 29 | "install -Dp -m 644 com.sega.Sonic2.desktop /app/share/applications/com.sega.Sonic2.desktop", 30 | "install -Dp -m 644 com.sega.Sonic2.png /app/share/icons/hicolor/256x256/apps/com.sega.Sonic2.png", 31 | "install -Dp -m 644 com.sega.Sonic2.appdata.xml /app/share/appdata/com.sega.Sonic2.appdata.xml" 32 | ], 33 | "sources" : [ 34 | { 35 | "type" : "git", 36 | "url" : "https://github.com/Rubberduckycooly/Sonic-1-2-2013-Decompilation.git", 37 | "branch" : "main" 38 | }, 39 | { 40 | "type": "file", 41 | "path": "sonic2.apk" 42 | }, 43 | { 44 | "type": "file", 45 | "path": "com.sega.Sonic2.desktop" 46 | }, 47 | { 48 | "type": "file", 49 | "path": "com.sega.Sonic2.png" 50 | }, 51 | { 52 | "type": "file", 53 | "path": "com.sega.Sonic2.appdata.xml" 54 | } 55 | ] 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /flatpak/com.sega.Sonic2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/flatpak/com.sega.Sonic2.png -------------------------------------------------------------------------------- /header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/header.png -------------------------------------------------------------------------------- /icon_s1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/icon_s1.jpg -------------------------------------------------------------------------------- /icon_s2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyjoeway/Sonic-1-2-2013-Decompilation/12cae9828aab6463f2957b318a6ad95595e0dcfa/icon_s2.jpg -------------------------------------------------------------------------------- /props/winactions.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | C:/vcpkg/installed/x86-windows-static-md/lib/;$(SolutionDir)dependencies/windows/SDL2/lib/$(PlatformTargetAsMSBuildArchitecture)/;$(SolutionDir)dependencies/windows/glew/lib/Release/$(Platform)/ 6 | SDL2.lib;SDL2main.lib;ogg.lib;vorbis.lib;vorbisfile.lib;Opengl32.lib;glu32.lib;glew32.lib;Shell32.lib;Advapi32.lib 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /props/winactions_x64.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | C:/vcpkg/installed/x64-windows-static-md/lib/;$(SolutionDir)dependencies/windows/SDL2/lib/$(PlatformTargetAsMSBuildArchitecture)/;$(SolutionDir)dependencies/windows/glew/lib/Release/$(Platform)/ 6 | SDL2.lib;SDL2main.lib;ogg.lib;vorbis.lib;vorbisfile.lib;Opengl32.lib;glu32.lib;glew32.lib;Shell32.lib;Advapi32.lib 7 | 8 | 9 | 10 | --------------------------------------------------------------------------------