├── .clang-format ├── .github └── workflows │ └── build.yml ├── .gitignore ├── LICENSE.md ├── Makefile ├── README.md ├── 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 ├── Object.cpp ├── Object.hpp ├── Palette.cpp ├── Palette.hpp ├── PauseMenu.cpp ├── PauseMenu.hpp ├── RSDKv4 Decomp Icon.ico ├── RSDKv4.SDL1.vcxproj ├── RSDKv4.SDL1.vcxproj.filters ├── RSDKv4.rc ├── RSDKv4.vcxproj ├── RSDKv4.vcxproj.filters ├── Reader.cpp ├── Reader.hpp ├── RetroEngine.cpp ├── RetroEngine.hpp ├── RetroGameLoop.cpp ├── RetroGameLoop.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 ├── 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 ├── dependencies ├── 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 └── 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/build.yml: -------------------------------------------------------------------------------- 1 | name: Build RSDKv4 2 | on: 3 | push: 4 | branches: 5 | - master 6 | - main 7 | - win-actions 8 | - linux-actions 9 | 10 | jobs: 11 | v4-windows: 12 | runs-on: windows-latest 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v1 16 | - name: Setup MSBuild 17 | uses: microsoft/setup-msbuild@v1 18 | - name: Download libogg and libvorbis for easier includes 19 | run : | 20 | Invoke-WebRequest -Uri "https://downloads.xiph.org/releases/ogg/libogg-1.3.4.zip" -OutFile "libogg.zip" 21 | Expand-Archive -Path libogg.zip -DestinationPath ./dependencies/windows/ 22 | Rename-Item ./dependencies/windows/libogg-1.3.4 libogg 23 | Invoke-WebRequest -Uri "https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.zip" -OutFile "libvorbis.zip" 24 | Expand-Archive -Path libvorbis.zip -DestinationPath ./dependencies/windows/ 25 | Rename-Item ./dependencies/windows/libvorbis-1.3.7 libvorbis 26 | - name: Download SDL2 27 | run: | 28 | Invoke-WebRequest -Uri "https://libsdl.org/release/SDL2-devel-2.0.14-VC.zip" -OutFile "SDL2.zip" 29 | Expand-Archive -Path SDL2.zip -DestinationPath ./dependencies/windows/ 30 | Rename-Item ./dependencies/windows/SDL2-2.0.14 SDL2 31 | - name: Run vcpkg 32 | run: | 33 | vcpkg install libogg:x86-windows-static libvorbis:x86-windows-static 34 | vcpkg integrate install 35 | - name: Build RSDKv4 36 | run: | 37 | msbuild RSDKv4.sln /p:Configuration=Release /p:Platform=x86 /p:ForceImportBeforeCppTargets="$env:GITHUB_WORKSPACE/props/winactions.props" 38 | - name: Move artifacts 39 | run: | 40 | mkdir artifacts 41 | move ./build/Win32/Release/*.dll ./artifacts 42 | move ./build/Win32/Release/*.exe ./artifacts 43 | - name: Upload artifacts 44 | uses: actions/upload-artifact@v1.0.0 45 | with: 46 | name: v4-windows 47 | path: artifacts 48 | v4-windows-x64: 49 | runs-on: windows-latest 50 | steps: 51 | - name: Checkout 52 | uses: actions/checkout@v1 53 | - name: Setup MSBuild 54 | uses: microsoft/setup-msbuild@v1 55 | - name: Download libogg and libvorbis for easier includes 56 | run : | 57 | Invoke-WebRequest -Uri "https://downloads.xiph.org/releases/ogg/libogg-1.3.4.zip" -OutFile "libogg.zip" 58 | Expand-Archive -Path libogg.zip -DestinationPath ./dependencies/windows/ 59 | Rename-Item ./dependencies/windows/libogg-1.3.4 libogg 60 | Invoke-WebRequest -Uri "https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.zip" -OutFile "libvorbis.zip" 61 | Expand-Archive -Path libvorbis.zip -DestinationPath ./dependencies/windows/ 62 | Rename-Item ./dependencies/windows/libvorbis-1.3.7 libvorbis 63 | - name: Download SDL2 64 | run: | 65 | Invoke-WebRequest -Uri "https://libsdl.org/release/SDL2-devel-2.0.14-VC.zip" -OutFile "SDL2.zip" 66 | Expand-Archive -Path SDL2.zip -DestinationPath ./dependencies/windows/ 67 | Rename-Item ./dependencies/windows/SDL2-2.0.14 SDL2 68 | - name: Run vcpkg 69 | run: | 70 | vcpkg install libogg:x64-windows-static libvorbis:x64-windows-static 71 | vcpkg integrate install 72 | - name: Build RSDKv4 73 | run: | 74 | msbuild RSDKv4.sln /p:Configuration=Release /p:Platform=x64 /p:ForceImportBeforeCppTargets="$env:GITHUB_WORKSPACE/props/winactions_x64.props" 75 | - name: Move artifacts 76 | run: | 77 | mkdir artifacts 78 | move ./build/x64/Release/*.dll ./artifacts 79 | move ./build/x64/Release/*.exe ./artifacts 80 | - name: Upload artifacts 81 | uses: actions/upload-artifact@v1.0.0 82 | with: 83 | name: v4-windows-x64 84 | path: artifacts 85 | v4-linux: 86 | runs-on: ubuntu-latest 87 | steps: 88 | - name: Checkout repository 89 | uses: actions/checkout@v2 90 | - name: Install dependencies 91 | run: | 92 | sudo apt-get update 93 | sudo apt-get install libogg-dev libvorbis-dev libsdl2-dev 94 | - name: Build RSDKv4 95 | run: make 96 | - name: Upload artifact 97 | uses: actions/upload-artifact@v2 98 | with: 99 | name: v4-linux 100 | path: bin 101 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # CMake artifacts 5 | CMakeFiles/ 6 | cmake_install.cmake 7 | CMakeCache.txt 8 | 9 | # User-specific files 10 | *.suo 11 | *.user 12 | *.userosscache 13 | *.sln.docstates 14 | 15 | # User-specific files (MonoDevelop/Xamarin Studio) 16 | *.userprefs 17 | 18 | # Build results 19 | [Dd]ebug/ 20 | [Dd]ebugPublic/ 21 | [Rr]elease/ 22 | [Rr]eleases/ 23 | [Bb]uild/ 24 | x64/ 25 | x86/ 26 | bld/ 27 | bin/ 28 | [Bb]in/ 29 | [Oo]bj/ 30 | cmake/ 31 | wasm 32 | 33 | #dependencies 34 | [Dd]ependencies/windows-uwp/** 35 | [Dd]ependencies/windows/* 36 | [Dd]ependencies/mac/libogg/ 37 | [Dd]ependencies/mac/libvorbis/ 38 | [Dd]ependencies/mac/SDL2.framework/ 39 | [Dd]ependencies/all/* 40 | ![Dd]ependencies/all/dependencies.txt 41 | 42 | # UWP 43 | **/Generated Files 44 | **/BundleArtifacts 45 | **/AppPackages 46 | 47 | # safety 48 | *.rsdk 49 | 50 | #OSX files 51 | *.DS_Store 52 | .DS_Store 53 | *.xactivitylog 54 | *.xcuserstate 55 | *.dia 56 | *.xbuild 57 | *.db 58 | *.plist 59 | *.idx 60 | *.pcm 61 | *.timestamp 62 | *.xcbkptlist 63 | 64 | # Visual Studio 2015 cache/options directory 65 | .vs/ 66 | .vscode/ 67 | 68 | # MSTest test Results 69 | [Tt]est[Rr]esult*/ 70 | [Bb]uild[Ll]og.* 71 | 72 | # NUNIT 73 | *.VisualState.xml 74 | TestResult.xml 75 | 76 | # Build Results of an ATL Project 77 | [Dd]ebugPS/ 78 | [Rr]eleasePS/ 79 | dlldata.c 80 | 81 | # DNX 82 | project.lock.json 83 | artifacts/ 84 | 85 | *_i.c 86 | *_p.c 87 | *_i.h 88 | *.ilk 89 | *.meta 90 | *.obj 91 | *.pch 92 | *.pdb 93 | *.pgc 94 | *.pgd 95 | *.rsp 96 | *.sbr 97 | *.tlb 98 | *.tli 99 | *.tlh 100 | *.tmp 101 | *.tmp_proj 102 | *.log 103 | *.vspscc 104 | *.vssscc 105 | .builds 106 | *.pidb 107 | *.svclog 108 | *.scc 109 | 110 | # Chutzpah Test files 111 | _Chutzpah* 112 | 113 | # Visual C++ cache files 114 | ipch/ 115 | *.aps 116 | *.ncb 117 | *.opensdf 118 | *.sdf 119 | *.cachefile 120 | 121 | # Visual Studio profiler 122 | *.psess 123 | *.vsp 124 | *.vspx 125 | 126 | # TFS 2012 Local Workspace 127 | $tf/ 128 | 129 | # Guidance Automation Toolkit 130 | *.gpState 131 | 132 | # ReSharper is a .NET coding add-in 133 | _ReSharper*/ 134 | *.[Rr]e[Ss]harper 135 | *.DotSettings.user 136 | 137 | # JustCode is a .NET coding add-in 138 | .JustCode 139 | 140 | # TeamCity is a build add-in 141 | _TeamCity* 142 | 143 | # DotCover is a Code Coverage Tool 144 | *.dotCover 145 | 146 | # NCrunch 147 | _NCrunch_* 148 | .*crunch*.local.xml 149 | 150 | # MightyMoose 151 | *.mm.* 152 | AutoTest.Net/ 153 | 154 | # Web workbench (sass) 155 | .sass-cache/ 156 | 157 | # Installshield output folder 158 | [Ee]xpress/ 159 | 160 | # DocProject is a documentation generator add-in 161 | DocProject/buildhelp/ 162 | DocProject/Help/*.HxT 163 | DocProject/Help/*.HxC 164 | DocProject/Help/*.hhc 165 | DocProject/Help/*.hhk 166 | DocProject/Help/*.hhp 167 | DocProject/Help/Html2 168 | DocProject/Help/html 169 | 170 | # Click-Once directory 171 | publish/ 172 | 173 | # Publish Web Output 174 | *.[Pp]ublish.xml 175 | *.azurePubxml 176 | ## TODO: Comment the next line if you want to checkin your 177 | ## web deploy settings but do note that will include unencrypted 178 | ## passwords 179 | #*.pubxml 180 | 181 | *.publishproj 182 | 183 | # NuGet Packages 184 | *.nupkg 185 | # The packages folder can be ignored because of Package Restore 186 | **/packages/* 187 | # except build/, which is used as an MSBuild target. 188 | !**/packages/build/ 189 | # Uncomment if necessary however generally it will be regenerated when needed 190 | #!**/packages/repositories.config 191 | 192 | # Windows Azure Build Output 193 | csx/ 194 | *.build.csdef 195 | 196 | # Windows Store app package directory 197 | AppPackages/ 198 | 199 | # Visual Studio cache files 200 | # files ending in .cache can be ignored 201 | *.[Cc]ache 202 | # but keep track of directories ending in .cache 203 | !*.[Cc]ache/ 204 | 205 | # Others 206 | ClientBin/ 207 | [Ss]tyle[Cc]op.* 208 | ~$* 209 | *~ 210 | *.dbmdl 211 | *.dbproj.schemaview 212 | *.pfx 213 | *.publishsettings 214 | node_modules/ 215 | orleans.codegen.cs 216 | 217 | # RIA/Silverlight projects 218 | Generated_Code/ 219 | 220 | # Backup & report files from converting an old project file 221 | # to a newer Visual Studio version. Backup files are not needed, 222 | # because we have git ;-) 223 | _UpgradeReport_Files/ 224 | Backup*/ 225 | UpgradeLog*.XML 226 | UpgradeLog*.htm 227 | 228 | # SQL Server files 229 | *.mdf 230 | *.ldf 231 | 232 | # Business Intelligence projects 233 | *.rdl.data 234 | *.bim.layout 235 | *.bim_*.settings 236 | 237 | # Microsoft Fakes 238 | FakesAssemblies/ 239 | 240 | # Node.js Tools for Visual Studio 241 | .ntvs_analysis.dat 242 | 243 | # Visual Studio 6 build log 244 | *.plg 245 | 246 | # Visual Studio 6 workspace options file 247 | *.opt 248 | 249 | # LightSwitch generated files 250 | GeneratedArtifacts/ 251 | _Pvt_Extensions/ 252 | ModelManifest.xml 253 | 254 | Ignored/ 255 | 256 | # Compiled object files 257 | objects/ 258 | -------------------------------------------------------------------------------- /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: -------------------------------------------------------------------------------- 1 | CXXFLAGS_ALL = $(shell pkg-config --cflags --static sdl2 vorbisfile vorbis) $(CXXFLAGS) \ 2 | -DBASE_PATH='"$(BASE_PATH)"' 3 | 4 | LDFLAGS_ALL = $(LDFLAGS) 5 | LIBS_ALL = $(shell pkg-config --libs --static sdl2 vorbisfile vorbis) -pthread $(LIBS) 6 | 7 | SOURCES = RSDKv4/Animation.cpp \ 8 | RSDKv4/Audio.cpp \ 9 | RSDKv4/Collision.cpp \ 10 | RSDKv4/Debug.cpp \ 11 | RSDKv4/Drawing.cpp \ 12 | RSDKv4/Ini.cpp \ 13 | RSDKv4/Input.cpp \ 14 | RSDKv4/main.cpp \ 15 | RSDKv4/Math.cpp \ 16 | RSDKv4/Object.cpp \ 17 | RSDKv4/Palette.cpp \ 18 | RSDKv4/PauseMenu.cpp \ 19 | RSDKv4/Reader.cpp \ 20 | RSDKv4/RetroEngine.cpp \ 21 | RSDKv4/RetroGameLoop.cpp \ 22 | RSDKv4/Scene.cpp \ 23 | RSDKv4/Scene3D.cpp \ 24 | RSDKv4/Script.cpp \ 25 | RSDKv4/Sprite.cpp \ 26 | RSDKv4/String.cpp \ 27 | RSDKv4/Text.cpp \ 28 | RSDKv4/Userdata.cpp \ 29 | 30 | ifneq ($(FORCE_CASE_INSENSITIVE),) 31 | CXXFLAGS_ALL += -DFORCE_CASE_INSENSITIVE 32 | SOURCES += RSDKv4/fcaseopen.c 33 | endif 34 | 35 | objects/%.o: % 36 | mkdir -p $(@D) 37 | $(CXX) $(CXXFLAGS_ALL) -std=c++17 $^ -o $@ -c 38 | 39 | bin/RSDKv4: $(SOURCES:%=objects/%.o) 40 | mkdir -p $(@D) 41 | $(CXX) $(CXXFLAGS_ALL) $(LDFLAGS_ALL) $^ -o $@ $(LIBS_ALL) 42 | 43 | wasm: $(SOURCES) 44 | mkdir wasm; em++ -std=c++17 $^ -o wasm/index.html -g -lm --bind -s USE_SDL=2 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS='["png"]' -s USE_OGG=1 -s USE_VORBIS=1 -s TOTAL_MEMORY=60MB -s ALLOW_MEMORY_GROWTH=1 --preload-file Data.rsdk 45 | 46 | wasm-windows: $(SOURCES) 47 | mkdir wasm & em++ -std=c++17 $^ -o wasm/index.html -g -lm --bind -s USE_SDL=2 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS='["png"]' -s USE_OGG=1 -s USE_VORBIS=1 -s TOTAL_MEMORY=60MB -s ALLOW_MEMORY_GROWTH=1 --preload-file Data.rsdk 48 | 49 | install: bin/RSDKv4 50 | install -Dp -m755 bin/RSDKv4 $(prefix)/bin/RSDKv4 51 | 52 | clean: 53 | rm -r -f bin && rm -r -f objects 54 | [ -d wasm ] && rm -r wasm 55 | -------------------------------------------------------------------------------- /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", "RSDKv4\RSDKv4.SDL1.vcxproj", "{BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug|x64.ActiveCfg = Debug|x64 17 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug|x64.Build.0 = Debug|x64 18 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug|x86.ActiveCfg = Debug|Win32 19 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug|x86.Build.0 = Debug|Win32 20 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release|x64.ActiveCfg = Release|x64 21 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release|x64.Build.0 = Release|x64 22 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release|x86.ActiveCfg = Release|Win32 23 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {CEEC6B21-D41E-4C5C-8B97-9FAAD7974615} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /RSDKv4.UWP.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30804.86 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sonic1Decomp.UWP", "Sonic1Decomp.UWP\Sonic1Decomp.UWP.vcxproj", "{66189870-4C44-4BD1-A27B-D603EB13E7C1}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sonic2Decomp.UWP", "Sonic2Decomp.UWP\Sonic2Decomp.UWP.vcxproj", "{66189870-4C44-4BD1-A27B-D603EB13E7C4}" 9 | EndProject 10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencies", "{FB1C2759-B78A-48B3-8466-4BFD4BEAED6D}" 11 | ProjectSection(SolutionItems) = preProject 12 | dependencies\windows-uwp\dependencies.txt = dependencies\windows-uwp\dependencies.txt 13 | EndProjectSection 14 | EndProject 15 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2-UWP", "dependencies\windows-uwp\SDL2\VisualC-WinRT\UWP_VS2015\SDL-UWP.vcxproj", "{89E9B32E-A86A-47C3-A948-D2B1622925CE}" 16 | EndProject 17 | Global 18 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 19 | Debug|ARM = Debug|ARM 20 | Debug|ARM64 = Debug|ARM64 21 | Debug|x64 = Debug|x64 22 | Debug|x86 = Debug|x86 23 | Release|ARM = Release|ARM 24 | Release|ARM64 = Release|ARM64 25 | Release|x64 = Release|x64 26 | Release|x86 = Release|x86 27 | EndGlobalSection 28 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 29 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Debug|ARM.ActiveCfg = Debug|ARM 30 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Debug|ARM.Build.0 = Debug|ARM 31 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Debug|ARM.Deploy.0 = Debug|ARM 32 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Debug|ARM64.ActiveCfg = Debug|ARM64 33 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Debug|ARM64.Build.0 = Debug|ARM64 34 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Debug|ARM64.Deploy.0 = Debug|ARM64 35 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Debug|x64.ActiveCfg = Debug|x64 36 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Debug|x64.Build.0 = Debug|x64 37 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Debug|x64.Deploy.0 = Debug|x64 38 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Debug|x86.ActiveCfg = Debug|Win32 39 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Debug|x86.Build.0 = Debug|Win32 40 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Debug|x86.Deploy.0 = Debug|Win32 41 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Release|ARM.ActiveCfg = Release|ARM 42 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Release|ARM.Build.0 = Release|ARM 43 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Release|ARM.Deploy.0 = Release|ARM 44 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Release|ARM64.ActiveCfg = Release|ARM64 45 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Release|ARM64.Build.0 = Release|ARM64 46 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Release|ARM64.Deploy.0 = Release|ARM64 47 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Release|x64.ActiveCfg = Release|x64 48 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Release|x64.Build.0 = Release|x64 49 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Release|x64.Deploy.0 = Release|x64 50 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Release|x86.ActiveCfg = Release|Win32 51 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Release|x86.Build.0 = Release|Win32 52 | {66189870-4C44-4BD1-A27B-D603EB13E7C1}.Release|x86.Deploy.0 = Release|Win32 53 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Debug|ARM.ActiveCfg = Debug|ARM 54 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Debug|ARM.Build.0 = Debug|ARM 55 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Debug|ARM.Deploy.0 = Debug|ARM 56 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Debug|ARM64.ActiveCfg = Debug|ARM64 57 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Debug|ARM64.Build.0 = Debug|ARM64 58 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Debug|ARM64.Deploy.0 = Debug|ARM64 59 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Debug|x64.ActiveCfg = Debug|x64 60 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Debug|x64.Build.0 = Debug|x64 61 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Debug|x64.Deploy.0 = Debug|x64 62 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Debug|x86.ActiveCfg = Debug|Win32 63 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Debug|x86.Build.0 = Debug|Win32 64 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Debug|x86.Deploy.0 = Debug|Win32 65 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Release|ARM.ActiveCfg = Release|ARM 66 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Release|ARM.Build.0 = Release|ARM 67 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Release|ARM.Deploy.0 = Release|ARM 68 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Release|ARM64.ActiveCfg = Release|ARM64 69 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Release|ARM64.Build.0 = Release|ARM64 70 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Release|ARM64.Deploy.0 = Release|ARM64 71 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Release|x64.ActiveCfg = Release|x64 72 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Release|x64.Build.0 = Release|x64 73 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Release|x64.Deploy.0 = Release|x64 74 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Release|x86.ActiveCfg = Release|Win32 75 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Release|x86.Build.0 = Release|Win32 76 | {66189870-4C44-4BD1-A27B-D603EB13E7C4}.Release|x86.Deploy.0 = Release|Win32 77 | {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|ARM.ActiveCfg = Debug|ARM 78 | {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|ARM.Build.0 = Debug|ARM 79 | {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|ARM64.ActiveCfg = Debug|Win32 80 | {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|x64.ActiveCfg = Debug|x64 81 | {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|x64.Build.0 = Debug|x64 82 | {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|x86.ActiveCfg = Debug|Win32 83 | {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|x86.Build.0 = Debug|Win32 84 | {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|ARM.ActiveCfg = Release|ARM 85 | {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|ARM.Build.0 = Release|ARM 86 | {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|ARM64.ActiveCfg = Release|Win32 87 | {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|x64.ActiveCfg = Release|x64 88 | {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|x64.Build.0 = Release|x64 89 | {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|x86.ActiveCfg = Release|Win32 90 | {89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|x86.Build.0 = Release|Win32 91 | EndGlobalSection 92 | GlobalSection(SolutionProperties) = preSolution 93 | HideSolutionNode = FALSE 94 | EndGlobalSection 95 | GlobalSection(NestedProjects) = preSolution 96 | {89E9B32E-A86A-47C3-A948-D2B1622925CE} = {FB1C2759-B78A-48B3-8466-4BFD4BEAED6D} 97 | EndGlobalSection 98 | GlobalSection(ExtensibilityGlobals) = postSolution 99 | SolutionGuid = {A13C4F96-9CBE-42EF-96B6-7704CB49F692} 100 | EndGlobalSection 101 | EndGlobal 102 | -------------------------------------------------------------------------------- /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 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug_HW|x64 = Debug_HW|x64 11 | Debug_HW|x86 = Debug_HW|x86 12 | Debug|x64 = Debug|x64 13 | Debug|x86 = Debug|x86 14 | Release_HW|x64 = Release_HW|x64 15 | Release_HW|x86 = Release_HW|x86 16 | Release|x64 = Release|x64 17 | Release|x86 = Release|x86 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug_HW|x64.ActiveCfg = Debug_HW|x64 21 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug_HW|x64.Build.0 = Debug_HW|x64 22 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug_HW|x86.ActiveCfg = Debug_HW|Win32 23 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug_HW|x86.Build.0 = Debug_HW|Win32 24 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug|x64.ActiveCfg = Debug|x64 25 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug|x64.Build.0 = Debug|x64 26 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug|x86.ActiveCfg = Debug|Win32 27 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Debug|x86.Build.0 = Debug|Win32 28 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release_HW|x64.ActiveCfg = Release_HW|x64 29 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release_HW|x64.Build.0 = Release_HW|x64 30 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release_HW|x86.ActiveCfg = Release_HW|Win32 31 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release_HW|x86.Build.0 = Release_HW|Win32 32 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release|x64.ActiveCfg = Release|x64 33 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release|x64.Build.0 = Release|x64 34 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release|x86.ActiveCfg = Release|Win32 35 | {BD4A4266-8ED9-491E-B4CC-3F63F0D39C1B}.Release|x86.Build.0 = Release|Win32 36 | EndGlobalSection 37 | GlobalSection(SolutionProperties) = preSolution 38 | HideSolutionNode = FALSE 39 | EndGlobalSection 40 | GlobalSection(ExtensibilityGlobals) = postSolution 41 | SolutionGuid = {CEEC6B21-D41E-4C5C-8B97-9FAAD7974615} 42 | EndGlobalSection 43 | EndGlobal 44 | -------------------------------------------------------------------------------- /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.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | AnimationFile animationFileList[ANIFILE_COUNT]; 4 | int animationFileCount = 0; 5 | 6 | SpriteFrame scriptFrames[SPRITEFRAME_COUNT]; 7 | int scriptFrameCount = 0; 8 | 9 | SpriteFrame animFrames[SPRITEFRAME_COUNT]; 10 | int animFrameCount = 0; 11 | SpriteAnimation animationList[ANIMATION_COUNT]; 12 | int animationCount = 0; 13 | Hitbox hitboxList[HITBOX_COUNT]; 14 | int hitboxCount = 0; 15 | 16 | void LoadAnimationFile(char *filePath) 17 | { 18 | FileInfo info; 19 | if (LoadFile(filePath, &info)) { 20 | byte fileBuffer = 0; 21 | char strBuf[0x21]; 22 | byte sheetIDs[0x18]; 23 | sheetIDs[0] = 0; 24 | 25 | byte sheetCount = 0; 26 | FileRead(&sheetCount, 1); // Sheet Count 27 | 28 | for (int s = 0; s < sheetCount; ++s) { 29 | FileRead(&fileBuffer, 1); 30 | if (fileBuffer) { 31 | int i = 0; 32 | for (; i < fileBuffer; ++i) FileRead(&strBuf[i], 1); 33 | strBuf[i] = 0; 34 | GetFileInfo(&info); 35 | CloseFile(); 36 | sheetIDs[s] = AddGraphicsFile(strBuf); 37 | SetFileInfo(&info); 38 | } 39 | } 40 | 41 | byte animCount = 0; 42 | FileRead(&animCount, 1); 43 | AnimationFile *animFile = &animationFileList[animationFileCount]; 44 | animFile->animCount = animCount; 45 | animFile->aniListOffset = animationCount; 46 | 47 | for (int a = 0; a < animCount; ++a) { 48 | SpriteAnimation *anim = &animationList[animationCount++]; 49 | anim->frameListOffset = animFrameCount; 50 | FileRead(&fileBuffer, 1); 51 | FileRead(anim->name, fileBuffer); 52 | anim->name[fileBuffer] = 0; 53 | FileRead(&anim->frameCount, 1); 54 | FileRead(&anim->speed, 1); 55 | FileRead(&anim->loopPoint, 1); 56 | FileRead(&anim->rotationFlag, 1); 57 | 58 | for (int j = 0; j < anim->frameCount; ++j) { 59 | SpriteFrame *frame = &animFrames[animFrameCount++]; 60 | FileRead(&frame->sheetID, 1); 61 | frame->sheetID = sheetIDs[frame->sheetID]; 62 | FileRead(&frame->hitboxID, 1); 63 | FileRead(&fileBuffer, 1); 64 | frame->sprX = fileBuffer; 65 | FileRead(&fileBuffer, 1); 66 | frame->sprY = fileBuffer; 67 | FileRead(&fileBuffer, 1); 68 | frame->width = fileBuffer; 69 | FileRead(&fileBuffer, 1); 70 | frame->height = fileBuffer; 71 | 72 | sbyte buffer = 0; 73 | FileRead(&buffer, 1); 74 | frame->pivotX = buffer; 75 | FileRead(&buffer, 1); 76 | frame->pivotY = buffer; 77 | } 78 | // 90 Degree (Extra rotation Frames) rotation 79 | if (anim->rotationFlag == ROTFLAG_STATICFRAMES) 80 | anim->frameCount >>= 1; 81 | } 82 | 83 | animFile->hitboxListOffset = hitboxCount; 84 | FileRead(&fileBuffer, 1); 85 | for (int i = 0; i < fileBuffer; ++i) { 86 | Hitbox *hitbox = &hitboxList[hitboxCount++]; 87 | for (int d = 0; d < HITBOX_DIR_COUNT; ++d) { 88 | FileRead(&hitbox->left[d], 1); 89 | FileRead(&hitbox->top[d], 1); 90 | FileRead(&hitbox->right[d], 1); 91 | FileRead(&hitbox->bottom[d], 1); 92 | } 93 | } 94 | 95 | CloseFile(); 96 | } 97 | } 98 | void ClearAnimationData() 99 | { 100 | for (int f = 0; f < SPRITEFRAME_COUNT; ++f) MEM_ZERO(scriptFrames[f]); 101 | for (int f = 0; f < SPRITEFRAME_COUNT; ++f) MEM_ZERO(animFrames[f]); 102 | for (int h = 0; h < HITBOX_COUNT; ++h) MEM_ZERO(hitboxList[h]); 103 | for (int a = 0; a < ANIMATION_COUNT; ++a) MEM_ZERO(animationList[a]); 104 | for (int a = 0; a < ANIFILE_COUNT; ++a) MEM_ZERO(animationFileList[a]); 105 | 106 | scriptFrameCount = 0; 107 | animFrameCount = 0; 108 | animationCount = 0; 109 | animationFileCount = 0; 110 | hitboxCount = 0; 111 | 112 | //Used for pause menu 113 | LoadGIFFile("Data/Game/SystemText.gif", SURFACE_MAX - 1); 114 | StrCopy(gfxSurface[SURFACE_MAX - 1].fileName, "Data/Game/SystemText.gif"); 115 | } 116 | 117 | AnimationFile *AddAnimationFile(char *filePath) 118 | { 119 | char path[0x80]; 120 | StrCopy(path, "Data/Animations/"); 121 | StrAdd(path, filePath); 122 | 123 | for (int a = 0; a < 0x100; ++a) { 124 | if (StrLength(animationFileList[a].fileName) <= 0) { 125 | StrCopy(animationFileList[a].fileName, filePath); 126 | LoadAnimationFile(path); 127 | ++animationFileCount; 128 | return &animationFileList[a]; 129 | } 130 | if (StrComp(animationFileList[a].fileName, filePath)) 131 | return &animationFileList[a]; 132 | } 133 | return NULL; 134 | } 135 | 136 | void ProcessObjectAnimation(void *objScr, void *ent) 137 | { 138 | ObjectScript *objectScript = (ObjectScript *)objScr; 139 | Entity *entity = (Entity *)ent; 140 | SpriteAnimation *sprAnim = &animationList[objectScript->animFile->aniListOffset + entity->animation]; 141 | 142 | if (entity->animationSpeed <= 0) { 143 | entity->animationTimer += sprAnim->speed; 144 | } 145 | else { 146 | if (entity->animationSpeed > 0xF0) 147 | entity->animationSpeed = 0xF0; 148 | entity->animationTimer += entity->animationSpeed; 149 | } 150 | if (entity->animation != entity->prevAnimation) { 151 | entity->prevAnimation = entity->animation; 152 | entity->frame = 0; 153 | entity->animationTimer = 0; 154 | entity->animationSpeed = 0; 155 | } 156 | if (entity->animationTimer > 0xEF) { 157 | entity->animationTimer -= 0xF0; 158 | ++entity->frame; 159 | } 160 | 161 | if (entity->frame >= sprAnim->frameCount) 162 | entity->frame = sprAnim->loopPoint; 163 | } -------------------------------------------------------------------------------- /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/Audio.hpp: -------------------------------------------------------------------------------- 1 | #ifndef AUDIO_H 2 | #define AUDIO_H 3 | 4 | #define TRACK_COUNT (0x10) 5 | #define SFX_COUNT (0x100) 6 | #if !RETRO_USE_ORIGINAL_CODE 7 | #define CHANNEL_COUNT (0x10) // 4 in the original, 16 for convenience 8 | #else 9 | #define CHANNEL_COUNT (0x4) 10 | #endif 11 | 12 | #define MAX_VOLUME (100) 13 | 14 | struct TrackInfo { 15 | char fileName[0x40]; 16 | bool trackLoop; 17 | uint loopPoint; 18 | }; 19 | 20 | #if !RETRO_USE_ORIGINAL_CODE 21 | struct MusicPlaybackInfo { 22 | OggVorbis_File vorbisFile; 23 | int vorbBitstream; 24 | #if RETRO_USING_SDL1 25 | SDL_AudioSpec spec; 26 | #endif 27 | #if RETRO_USING_SDL2 28 | SDL_AudioStream *stream; 29 | #endif 30 | Sint16 *buffer; 31 | FileInfo fileInfo; 32 | bool trackLoop; 33 | uint loopPoint; 34 | bool loaded; 35 | }; 36 | #endif 37 | 38 | struct SFXInfo { 39 | char name[0x40]; 40 | Sint16 *buffer; 41 | size_t length; 42 | bool loaded; 43 | }; 44 | 45 | struct ChannelInfo { 46 | size_t sampleLength; 47 | Sint16 *samplePtr; 48 | int sfxID; 49 | byte loopSFX; 50 | sbyte pan; 51 | }; 52 | 53 | enum MusicStatuses { 54 | MUSIC_STOPPED = 0, 55 | MUSIC_PLAYING = 1, 56 | MUSIC_PAUSED = 2, 57 | MUSIC_LOADING = 3, 58 | MUSIC_READY = 4, 59 | }; 60 | 61 | extern int globalSFXCount; 62 | extern int stageSFXCount; 63 | 64 | extern int masterVolume; 65 | extern int trackID; 66 | extern int sfxVolume; 67 | extern int bgmVolume; 68 | extern bool audioEnabled; 69 | 70 | extern bool musicEnabled; 71 | extern int musicStatus; 72 | extern int musicStartPos; 73 | extern int musicPosition; 74 | extern int musicRatio; 75 | extern TrackInfo musicTracks[TRACK_COUNT]; 76 | 77 | extern SFXInfo sfxList[SFX_COUNT]; 78 | extern char sfxNames[SFX_COUNT][0x40]; 79 | 80 | extern ChannelInfo sfxChannels[CHANNEL_COUNT]; 81 | 82 | #if !RETRO_USE_ORIGINAL_CODE 83 | extern MusicPlaybackInfo musInfo; 84 | #endif 85 | 86 | #if RETRO_USING_SDL1 || RETRO_USING_SDL2 87 | extern SDL_AudioSpec audioDeviceFormat; 88 | #endif 89 | 90 | int InitAudioPlayback(); 91 | void LoadGlobalSfx(); 92 | 93 | #if RETRO_USING_SDL1 || RETRO_USING_SDL2 94 | #if !RETRO_USE_ORIGINAL_CODE 95 | // These functions did exist, but with different signatures 96 | void ProcessMusicStream(Sint32 *stream, size_t bytes_wanted); 97 | void ProcessAudioPlayback(void *data, Uint8 *stream, int len); 98 | void ProcessAudioMixing(Sint32 *dst, const Sint16 *src, int len, int volume, sbyte pan); 99 | #endif 100 | 101 | #if !RETRO_USE_ORIGINAL_CODE 102 | inline void freeMusInfo() 103 | { 104 | if (musInfo.loaded) { 105 | SDL_LockAudio(); 106 | 107 | if (musInfo.buffer) 108 | delete[] musInfo.buffer; 109 | #if RETRO_USING_SDL2 110 | if (musInfo.stream) 111 | SDL_FreeAudioStream(musInfo.stream); 112 | #endif 113 | ov_clear(&musInfo.vorbisFile); 114 | musInfo.buffer = nullptr; 115 | #if RETRO_USING_SDL2 116 | musInfo.stream = nullptr; 117 | #endif 118 | musInfo.trackLoop = false; 119 | musInfo.loopPoint = 0; 120 | musInfo.loaded = false; 121 | 122 | SDL_UnlockAudio(); 123 | } 124 | } 125 | #endif 126 | #else 127 | void ProcessMusicStream() {} 128 | void ProcessAudioPlayback() {} 129 | void ProcessAudioMixing() {} 130 | 131 | #if !RETRO_USE_ORIGINAL_CODE 132 | inline void freeMusInfo() 133 | { 134 | if (musInfo.loaded) { 135 | if (musInfo.musicFile) 136 | delete[] musInfo.musicFile; 137 | musInfo.musicFile = nullptr; 138 | musInfo.buffer = nullptr; 139 | musInfo.stream = nullptr; 140 | musInfo.pos = 0; 141 | musInfo.len = 0; 142 | musInfo.currentTrack = nullptr; 143 | musInfo.loaded = false; 144 | } 145 | } 146 | #endif 147 | #endif 148 | 149 | void SetMusicTrack(const char *filePath, byte trackID, bool loop, uint loopPoint); 150 | void SwapMusicTrack(const char *filePath, byte trackID, uint loopPoint, uint ratio); 151 | bool PlayMusic(int track, int musStartPos); 152 | inline void StopMusic() 153 | { 154 | musicStatus = MUSIC_STOPPED; 155 | #if !RETRO_USE_ORIGINAL_CODE 156 | SDL_LockAudio(); 157 | freeMusInfo(); 158 | SDL_UnlockAudio(); 159 | #endif 160 | } 161 | 162 | void LoadSfx(char *filePath, byte sfxID); 163 | void PlaySfx(int sfx, bool loop); 164 | inline void StopSfx(int sfx) 165 | { 166 | for (int i = 0; i < CHANNEL_COUNT; ++i) { 167 | if (sfxChannels[i].sfxID == sfx) { 168 | MEM_ZERO(sfxChannels[i]); 169 | sfxChannels[i].sfxID = -1; 170 | } 171 | } 172 | } 173 | void SetSfxAttributes(int sfx, int loopCount, sbyte pan); 174 | 175 | void SetSfxName(const char *sfxName, int sfxID); 176 | 177 | #if !RETRO_USE_ORIGINAL_CODE 178 | // Helper Funcs 179 | inline bool PlaySFXByName(const char *sfx, sbyte loopCnt) 180 | { 181 | for (int s = 0; s < globalSFXCount + stageSFXCount; ++s) { 182 | if (StrComp(sfxNames[s], sfx)) { 183 | PlaySfx(s, loopCnt); 184 | return true; 185 | } 186 | } 187 | return false; 188 | } 189 | inline bool StopSFXByName(const char *sfx) 190 | { 191 | for (int s = 0; s < globalSFXCount + stageSFXCount; ++s) { 192 | if (StrComp(sfxNames[s], sfx)) { 193 | StopSfx(s); 194 | return true; 195 | } 196 | } 197 | return false; 198 | } 199 | #endif 200 | 201 | inline void SetMusicVolume(int volume) 202 | { 203 | if (volume < 0) 204 | volume = 0; 205 | if (volume > MAX_VOLUME) 206 | volume = MAX_VOLUME; 207 | masterVolume = volume; 208 | } 209 | 210 | inline void SetGameVolumes(int bgmVolume, int sfxVolume) 211 | { 212 | // musicVolumeSetting = bgmVolume; 213 | SetMusicVolume(masterVolume); 214 | // sfxVolumeSetting = ((sfxVolume << 7) / 100); 215 | } 216 | 217 | inline void PauseSound() 218 | { 219 | if (musicStatus == MUSIC_PLAYING) 220 | musicStatus = MUSIC_PAUSED; 221 | } 222 | 223 | inline void ResumeSound() 224 | { 225 | if (musicStatus == MUSIC_PAUSED) 226 | musicStatus = MUSIC_PLAYING; 227 | } 228 | 229 | inline void StopAllSfx() 230 | { 231 | #if !RETRO_USE_ORIGINAL_CODE 232 | #if RETRO_USING_SDL1 || RETRO_USING_SDL2 233 | SDL_LockAudio(); 234 | #endif 235 | #endif 236 | for (int i = 0; i < CHANNEL_COUNT; ++i) sfxChannels[i].sfxID = -1; 237 | #if !RETRO_USE_ORIGINAL_CODE 238 | #if RETRO_USING_SDL1 || RETRO_USING_SDL2 239 | SDL_UnlockAudio(); 240 | #endif 241 | #endif 242 | } 243 | inline void ReleaseGlobalSfx() 244 | { 245 | for (int i = globalSFXCount - 1; i >= 0; --i) { 246 | if (sfxList[i].loaded) { 247 | StrCopy(sfxList[i].name, ""); 248 | StrCopy(sfxNames[i], ""); 249 | if (sfxList[i].buffer) 250 | free(sfxList[i].buffer); 251 | sfxList[i].buffer = NULL; 252 | sfxList[i].length = 0; 253 | sfxList[i].loaded = false; 254 | } 255 | } 256 | globalSFXCount = 0; 257 | } 258 | inline void ReleaseStageSfx() 259 | { 260 | for (int i = (stageSFXCount + globalSFXCount) - 1; i >= globalSFXCount; --i) { 261 | if (sfxList[i].loaded) { 262 | StrCopy(sfxList[i].name, ""); 263 | StrCopy(sfxNames[i], ""); 264 | if (sfxList[i].buffer) 265 | free(sfxList[i].buffer); 266 | sfxList[i].buffer = NULL; 267 | sfxList[i].length = 0; 268 | sfxList[i].loaded = false; 269 | } 270 | } 271 | stageSFXCount = 0; 272 | } 273 | 274 | inline void ReleaseAudioDevice() 275 | { 276 | StopMusic(); 277 | StopAllSfx(); 278 | ReleaseStageSfx(); 279 | ReleaseGlobalSfx(); 280 | } 281 | 282 | #endif // !AUDIO_H 283 | -------------------------------------------------------------------------------- /RSDKv4/Collision.hpp: -------------------------------------------------------------------------------- 1 | #ifndef COLLISION_H 2 | #define COLLISION_H 3 | 4 | enum CollisionSidess { 5 | CSIDE_FLOOR = 0, 6 | CSIDE_LWALL = 1, 7 | CSIDE_RWALL = 2, 8 | CSIDE_ROOF = 3, 9 | }; 10 | 11 | enum CollisionModes { 12 | CMODE_FLOOR = 0, 13 | CMODE_LWALL = 1, 14 | CMODE_ROOF = 2, 15 | CMODE_RWALL = 3, 16 | }; 17 | 18 | enum CollisionSolidity { 19 | SOLID_ALL = 0, 20 | SOLID_TOP = 1, 21 | SOLID_LRB = 2, 22 | SOLID_NONE = 3, 23 | SOLID_TOP_NOGRIP = 4, 24 | }; 25 | 26 | enum ObjectCollisionTypes { 27 | C_TOUCH = 0, 28 | C_BOX = 1, 29 | C_BOX2 = 2, 30 | C_PLATFORM = 3, 31 | }; 32 | 33 | struct CollisionSensor { 34 | int XPos; 35 | int YPos; 36 | int angle; 37 | bool collided; 38 | }; 39 | 40 | extern int collisionLeft; 41 | extern int collisionTop; 42 | extern int collisionRight; 43 | extern int collisionBottom; 44 | 45 | extern int collisionTolerance; 46 | 47 | extern CollisionSensor sensors[7]; 48 | 49 | void FindFloorPosition(Entity *player, CollisionSensor *sensor, int startYPos); 50 | void FindLWallPosition(Entity *player, CollisionSensor *sensor, int startXPos); 51 | void FindRoofPosition(Entity *player, CollisionSensor *sensor, int startYPos); 52 | void FindRWallPosition(Entity *player, CollisionSensor *sensor, int startXPos); 53 | 54 | void FloorCollision(Entity *player, CollisionSensor *sensor); 55 | void LWallCollision(Entity *player, CollisionSensor *sensor); 56 | void RoofCollision(Entity *player, CollisionSensor *sensor); 57 | void RWallCollision(Entity *player, CollisionSensor *sensor); 58 | 59 | void SetPathGripSensors(Entity *player); 60 | void ProcessPathGrip(Entity *player); 61 | void ProcessAirCollision(Entity *player); 62 | 63 | void ProcessPlayerTileCollisions(Entity *player); 64 | 65 | void TouchCollision(Entity *thisEntity, int thisLeft, int thisTop, int thisRight, int thisBottom, Entity *otherEntity, int otherLeft, int otherTop, 66 | int otherRight, int otherBottom); 67 | void BoxCollision(Entity *thisEntity, int thisLeft, int thisTop, int thisRight, int thisBottom, Entity *otherEntity, int otherLeft, int otherTop, 68 | int otherRight, int otherBottom); // Standard 69 | void BoxCollision2(Entity *thisEntity, int thisLeft, int thisTop, int thisRight, int thisBottom, Entity *otherEntity, int otherLeft, int otherTop, 70 | int otherRight, int otherBottom); // Updated (?) 71 | void PlatformCollision(Entity *thisEntity, int thisLeft, int thisTop, int thisRight, int thisBottom, Entity *otherEntity, int otherLeft, int otherTop, 72 | int otherRight, int otherBottom); 73 | 74 | void ObjectFloorCollision(int xOffset, int yOffset, int cPath); 75 | void ObjectLWallCollision(int xOffset, int yOffset, int cPath); 76 | void ObjectRoofCollision(int xOffset, int yOffset, int cPath); 77 | void ObjectRWallCollision(int xOffset, int yOffset, int cPath); 78 | 79 | void ObjectFloorGrip(int xOffset, int yOffset, int cPath); 80 | void ObjectLWallGrip(int xOffset, int yOffset, int cPath); 81 | void ObjectRoofGrip(int xOffset, int yOffset, int cPath); 82 | void ObjectRWallGrip(int xOffset, int yOffset, int cPath); 83 | 84 | #endif // !COLLISION_H 85 | -------------------------------------------------------------------------------- /RSDKv4/Debug.hpp: -------------------------------------------------------------------------------- 1 | #ifndef DEBUG_H 2 | #define DEBUG_H 3 | 4 | #ifdef __EMSCRIPTEN__ 5 | #include 6 | #endif 7 | 8 | extern bool endLine; 9 | inline void printLog(const char *msg, ...) 10 | { 11 | #ifndef RETRO_DISABLE_LOG 12 | if (engineDebugMode) { 13 | char buffer[0x100]; 14 | 15 | // make the full string 16 | va_list args; 17 | va_start(args, msg); 18 | vsprintf(buffer, msg, args); 19 | if (endLine) { 20 | printf("%s\n", buffer); 21 | sprintf(buffer, "%s\n", buffer); 22 | } 23 | else { 24 | printf("%s", buffer); 25 | sprintf(buffer, "%s", buffer); 26 | } 27 | 28 | char pathBuffer[0x100]; 29 | #if RETRO_PLATFORM == RETRO_UWP 30 | if (!usingCWD) 31 | sprintf(pathBuffer, "%s/log.txt", getResourcesPath()); 32 | else 33 | sprintf(pathBuffer, "log.txt"); 34 | #else 35 | sprintf(pathBuffer, BASE_PATH "log.txt"); 36 | #endif 37 | FileIO *file = fOpen(pathBuffer, "a"); 38 | if (file) { 39 | fWrite(&buffer, 1, StrLength(buffer), file); 40 | fClose(file); 41 | } 42 | } 43 | #endif 44 | } 45 | 46 | inline void printLog(const ushort *msg) 47 | { 48 | #ifndef RETRO_DISABLE_LOG 49 | if (engineDebugMode) { 50 | int mPos = 0; 51 | while (msg[mPos]) { 52 | printf("%lc", (wint_t)msg[mPos]); 53 | mPos++; 54 | } 55 | if (endLine) 56 | printf("\n"); 57 | 58 | char pathBuffer[0x100]; 59 | #if RETRO_PLATFORM == RETRO_UWP 60 | if (!usingCWD) 61 | sprintf(pathBuffer, "%s/log.txt", getResourcesPath()); 62 | else 63 | sprintf(pathBuffer, "log.txt"); 64 | #else 65 | sprintf(pathBuffer, BASE_PATH "log.txt"); 66 | #endif 67 | mPos = 0; 68 | FileIO *file = fOpen(pathBuffer, "a"); 69 | if (file) { 70 | while (msg[mPos]) { 71 | fWrite(&msg[mPos], 2, 1, file); 72 | mPos++; 73 | } 74 | 75 | ushort el = '\n'; 76 | if (endLine) 77 | fWrite(&el, 2, 1, file); 78 | fClose(file); 79 | } 80 | } 81 | #endif 82 | } 83 | 84 | enum DevMenuMenus { 85 | DEVMENU_MAIN, 86 | DEVMENU_PLAYERSEL, 87 | DEVMENU_STAGELISTSEL, 88 | DEVMENU_STAGESEL, 89 | DEVMENU_SCRIPTERROR, 90 | #if !RETRO_USE_ORIGINAL_CODE 91 | DEVMENU_MODMENU 92 | #endif 93 | }; 94 | 95 | enum StartMenuMenus { 96 | STARTMENU_MAIN = 6, 97 | STARTMENU_SAVESEL, 98 | STARTMENU_PLAYERSEL, 99 | STARTMENU_GAMEOPTS, 100 | STARTMENU_TASTAGESEL, 101 | STARTMENU_TACONFIRMSEL, 102 | STARTMENU_ACHIEVEMENTS, 103 | STARTMENU_LEADERBOARDS, 104 | #if RETRO_USE_MOD_LOADER 105 | STARTMENU_MODMENU 106 | #endif 107 | }; 108 | 109 | void initDevMenu(); 110 | void initErrorMessage(); 111 | void processStageSelect(); 112 | 113 | // Not in original, but the code was, and its cleaner this way 114 | void setTextMenu(int mode); 115 | #if !RETRO_USE_ORIGINAL_CODE 116 | // added due to lack of normal main menu 117 | void initStartMenu(int mode); 118 | void processStartMenu(); 119 | #endif 120 | 121 | #endif //! DEBUG_H 122 | -------------------------------------------------------------------------------- /RSDKv4/Drawing.hpp: -------------------------------------------------------------------------------- 1 | #ifndef DRAWING_H 2 | #define DRAWING_H 3 | 4 | #define SPRITESHEETS_MAX (16) 5 | #define SURFACE_MAX (24) 6 | #define GFXDATA_MAX (0x200000) 7 | 8 | #define BLENDTABLE_YSIZE (0x100) 9 | #define BLENDTABLE_XSIZE (0x20) 10 | #define BLENDTABLE_SIZE (BLENDTABLE_XSIZE * BLENDTABLE_YSIZE) 11 | #define TINTTABLE_SIZE (0x1000) 12 | 13 | #define DRAWLAYER_COUNT (0x7) 14 | 15 | enum FlipFlags { FLIP_NONE, FLIP_X, FLIP_Y, FLIP_XY }; 16 | enum InkFlags { INK_NONE, INK_BLEND, INK_ALPHA, INK_ADD, INK_SUB }; 17 | enum DrawFXFlags { FX_SCALE, FX_ROTATE, FX_ROTOZOOM, FX_INK, FX_TINT, FX_FLIP }; 18 | 19 | struct DrawListEntry 20 | { 21 | int entityRefs[ENTITY_COUNT]; 22 | int listSize; 23 | }; 24 | 25 | struct GFXSurface 26 | { 27 | char fileName[0x40]; 28 | int height; 29 | int width; 30 | #if RETRO_SOFTWARE_RENDER 31 | int widthShift; 32 | #endif 33 | #if RETRO_HARDWARE_RENDER 34 | int texStartX; 35 | int texStartY; 36 | #endif 37 | int depth; 38 | int dataPosition; 39 | }; 40 | 41 | extern ushort blendLookupTable[BLENDTABLE_SIZE]; 42 | extern ushort subtractLookupTable[BLENDTABLE_SIZE]; 43 | extern ushort tintLookupTable[TINTTABLE_SIZE]; 44 | 45 | extern int SCREEN_XSIZE; 46 | extern int SCREEN_CENTERX; 47 | 48 | extern int touchWidth; 49 | extern int touchHeight; 50 | 51 | extern DrawListEntry drawListEntries[DRAWLAYER_COUNT]; 52 | 53 | extern int gfxDataPosition; 54 | extern GFXSurface gfxSurface[SURFACE_MAX]; 55 | extern byte graphicData[GFXDATA_MAX]; 56 | 57 | #if RETRO_HARDWARE_RENDER 58 | #define INDEX_LIMIT (0xC000) 59 | #define VERTEX_LIMIT (0x2000) 60 | #define VERTEX3D_LIMIT (0x1904) 61 | #define TEXBUFFER_SIZE (0x100000) 62 | #define TILEUV_SIZE (0x1000) 63 | #define TEXTURE_LIMIT (6) 64 | #define TEXTURE_DATASIZE (1024 * 1024 * 2) 65 | #define TEXTURE_SIZE (1024) 66 | 67 | struct DrawVertex { 68 | short x; 69 | short y; 70 | short u; 71 | short v; 72 | 73 | Colour colour; 74 | }; 75 | 76 | struct DrawVertex3D { 77 | float x; 78 | float y; 79 | float z; 80 | short u; 81 | short v; 82 | 83 | Colour colour; 84 | }; 85 | 86 | extern DrawVertex gfxPolyList[VERTEX_LIMIT]; 87 | extern short gfxPolyListIndex[INDEX_LIMIT]; 88 | extern ushort gfxVertexSize; 89 | extern ushort gfxVertexSizeOpaque; 90 | extern ushort gfxIndexSize; 91 | extern ushort gfxIndexSizeOpaque; 92 | 93 | extern DrawVertex3D polyList3D[VERTEX3D_LIMIT]; 94 | 95 | extern ushort vertexSize3D; 96 | extern ushort indexSize3D; 97 | extern float tileUVArray[TILEUV_SIZE]; 98 | extern float floor3DXPos; 99 | extern float floor3DYPos; 100 | extern float floor3DZPos; 101 | extern float floor3DAngle; 102 | extern bool render3DEnabled; 103 | extern bool hq3DFloorEnabled; 104 | 105 | extern ushort texBuffer[TEXBUFFER_SIZE]; 106 | extern byte texBufferMode; 107 | 108 | extern int orthWidth; 109 | extern int viewWidth; 110 | extern int viewHeight; 111 | extern float viewAspect; 112 | extern int bufferWidth; 113 | extern int bufferHeight; 114 | extern int virtualX; 115 | extern int virtualY; 116 | extern int virtualWidth; 117 | extern int virtualHeight; 118 | 119 | #if RETRO_USING_OPENGL 120 | extern GLuint gfxTextureID[TEXTURE_LIMIT]; 121 | extern GLuint framebufferId; 122 | extern GLuint fbTextureId; 123 | #endif 124 | 125 | #endif 126 | 127 | int InitRenderDevice(); 128 | void FlipScreen(); 129 | void ReleaseRenderDevice(); 130 | 131 | void GenerateBlendLookupTable(); 132 | 133 | inline void ClearGraphicsData() 134 | { 135 | for (int i = 0; i < SURFACE_MAX; ++i) MEM_ZERO(gfxSurface[i]); 136 | gfxDataPosition = 0; 137 | } 138 | void ClearScreen(byte index); 139 | void SetScreenSize(int width, int height); 140 | 141 | void SetScreenSize(int width, int height); 142 | #if RETRO_SOFTWARE_RENDER 143 | void CopyFrameOverlay2x(); 144 | #endif 145 | 146 | #if RETRO_HARDWARE_RENDER 147 | inline bool CheckSurfaceSize(int size) 148 | { 149 | for (int cnt = 2; cnt < 2048; cnt <<= 1) { 150 | if (cnt == size) 151 | return true; 152 | } 153 | return false; 154 | } 155 | 156 | void UpdateHardwareTextures(); 157 | void SetScreenDimensions(int width, int height, int scale); 158 | void ScaleViewport(int width, int height); 159 | void CalcPerspective(float fov, float aspectRatio, float nearPlane, float farPlane); 160 | 161 | void SetupPolygonLists(); 162 | void UpdateTextureBufferWithTiles(); 163 | void UpdateTextureBufferWithSortedSprites(); 164 | void UpdateTextureBufferWithSprites(); 165 | 166 | #endif 167 | 168 | // Layer Drawing 169 | void DrawObjectList(int layer); 170 | void DrawStageGFX(); 171 | 172 | // TileLayer Drawing 173 | void DrawHLineScrollLayer(int layerID); 174 | void DrawVLineScrollLayer(int layerID); 175 | void Draw3DFloorLayer(int layerID); 176 | void Draw3DSkyLayer(int layerID); 177 | 178 | // Shape Drawing 179 | void DrawRectangle(int XPos, int YPos, int width, int height, int R, int G, int B, int A); 180 | void SetFadeHQ(int R, int G, int B, int A); 181 | void DrawTintRectangle(int XPos, int YPos, int width, int height); 182 | void DrawScaledTintMask(int direction, int XPos, int YPos, int pivotX, int pivotY, int scaleX, 183 | int scaleY, int width, int height, int sprX, int sprY, int sheetID); 184 | 185 | // Sprite Drawing 186 | void DrawSprite(int XPos, int YPos, int width, int height, int sprX, int sprY, int sheetID); 187 | void DrawSpriteFlipped(int XPos, int YPos, int width, int height, int sprX, int sprY, int direction, 188 | int sheetID); 189 | void DrawSpriteScaled(int direction, int XPos, int YPos, int pivotX, int pivotY, int scaleX, int scaleY, 190 | int width, int height, int sprX, int sprY, int sheetID); 191 | #if RETRO_REV01 192 | void DrawScaledChar(int direction, int XPos, int YPos, int pivotX, int pivotY, int scaleX, int scaleY, int width, int height, int sprX, int sprY, 193 | int sheetID); 194 | #endif 195 | void DrawSpriteRotated(int direction, int XPos, int YPos, int pivotX, int pivotY, int sprX, int sprY, 196 | int width, int height, int rotation, int sheetID); 197 | void DrawSpriteRotozoom(int direction, int XPos, int YPos, int pivotX, int pivotY, int sprX, int sprY, 198 | int width, int height, int rotation, int scale, int sheetID); 199 | 200 | void DrawBlendedSprite(int XPos, int YPos, int width, int height, int sprX, int sprY, int sheetID); 201 | void DrawAlphaBlendedSprite(int XPos, int YPos, int width, int height, int sprX, int sprY, int alpha, 202 | int sheetID); 203 | void DrawAdditiveBlendedSprite(int XPos, int YPos, int width, int height, int sprX, int sprY, int alpha, 204 | int sheetID); 205 | void DrawSubtractiveBlendedSprite(int XPos, int YPos, int width, int height, int sprX, int sprY, 206 | int alpha, int sheetID); 207 | 208 | void DrawObjectAnimation(void *objScr, void *ent, int XPos, int YPos); 209 | 210 | void DrawFace(void *v, uint colour); 211 | void DrawFadedFace(void *v, uint colour, uint fogColour, int alpha); 212 | void DrawTexturedFace(void *v, byte sheetID); 213 | void DrawTexturedFaceBlended(void *v, byte sheetID); 214 | 215 | #if RETRO_REV01 216 | void DrawBitmapText(void *menu, int XPos, int YPos, int scale, int spacing, int rowStart, int rowCount); 217 | #endif 218 | 219 | void DrawTextMenu(void *menu, int XPos, int YPos); 220 | void DrawTextMenuEntry(void *menu, int rowID, int XPos, int YPos, int textHighlight); 221 | void DrawStageTextEntry(void *menu, int rowID, int XPos, int YPos, int textHighlight); 222 | void DrawBlendedTextMenuEntry(void *menu, int rowID, int XPos, int YPos, int textHighlight); 223 | 224 | #endif // !DRAWING_H 225 | -------------------------------------------------------------------------------- /RSDKv4/Ini.hpp: -------------------------------------------------------------------------------- 1 | #ifndef INI_H 2 | #define INI_H 3 | 4 | class IniParser 5 | { 6 | public: 7 | enum ItemType { 8 | INI_ITEM_STRING, 9 | INI_ITEM_INT, 10 | INI_ITEM_FLOAT, 11 | INI_ITEM_BOOL, 12 | INI_ITEM_COMMENT, 13 | }; 14 | 15 | struct ConfigItem { 16 | ConfigItem() 17 | { 18 | sprintf(section, "%s", ""); 19 | sprintf(key, "%s", ""); 20 | sprintf(value, "%s", ""); 21 | hasSection = false; 22 | type = INI_ITEM_STRING; 23 | } 24 | char section[0x20]; 25 | bool hasSection = false; 26 | char key[0x40]; 27 | char value[0x100]; 28 | byte type = INI_ITEM_STRING; 29 | }; 30 | 31 | IniParser() { memset(items, 0, 0x80 * sizeof(ConfigItem)); } 32 | IniParser(const char *filename, bool addPath = true); 33 | 34 | int GetString(const char *section, const char *key, char *dest); 35 | int GetInteger(const char *section, const char *key, int *dest); 36 | int GetFloat(const char *section, const char *key, float *dest); 37 | int GetBool(const char *section, const char *key, bool *dest); 38 | int SetString(const char *section, const char *key, char *value); 39 | int SetInteger(const char *section, const char *key, int value); 40 | int SetFloat(const char *section, const char *key, float value); 41 | int SetBool(const char *section, const char *key, bool value); 42 | int SetComment(const char *section, const char *key, const char *comment); 43 | void Write(const char *filename, bool addPath = true); 44 | 45 | ConfigItem items[0x80]; 46 | 47 | int count = 0; 48 | }; 49 | #endif // !INI_H 50 | -------------------------------------------------------------------------------- /RSDKv4/Input.hpp: -------------------------------------------------------------------------------- 1 | #ifndef INPUT_H 2 | #define INPUT_H 3 | 4 | enum InputButtons { 5 | INPUT_UP, 6 | INPUT_DOWN, 7 | INPUT_LEFT, 8 | INPUT_RIGHT, 9 | INPUT_BUTTONA, 10 | INPUT_BUTTONB, 11 | INPUT_BUTTONC, 12 | INPUT_BUTTONX, 13 | INPUT_BUTTONY, 14 | INPUT_BUTTONZ, 15 | INPUT_BUTTONL, 16 | INPUT_BUTTONR, 17 | INPUT_START, 18 | INPUT_SELECT, 19 | INPUT_ANY, 20 | INPUT_MAX, 21 | }; 22 | 23 | struct InputData { 24 | bool up; 25 | bool down; 26 | bool left; 27 | bool right; 28 | bool A; 29 | bool B; 30 | bool C; 31 | bool X; 32 | bool Y; 33 | bool Z; 34 | bool L; 35 | bool R; 36 | bool start; 37 | bool select; 38 | }; 39 | 40 | struct InputButton { 41 | bool press, hold; 42 | int keyMappings, contMappings; 43 | 44 | inline void setHeld() 45 | { 46 | press = !hold; 47 | hold = true; 48 | } 49 | inline void setReleased() 50 | { 51 | press = false; 52 | hold = false; 53 | } 54 | 55 | inline bool down() { return (press || hold); } 56 | }; 57 | 58 | extern InputData keyPress; 59 | extern InputData keyDown; 60 | 61 | extern int touchDown[8]; 62 | extern int touchX[8]; 63 | extern int touchY[8]; 64 | extern int touchID[8]; 65 | extern int touches; 66 | 67 | #if !RETRO_USE_ORIGINAL_CODE 68 | extern InputButton inputDevice[INPUT_MAX]; 69 | extern int inputType; 70 | 71 | extern float LSTICK_DEADZONE; 72 | extern float RSTICK_DEADZONE; 73 | extern float LTRIGGER_DEADZONE; 74 | extern float RTRIGGER_DEADZONE; 75 | 76 | extern int mouseHideTimer; 77 | extern int lastMouseX; 78 | extern int lastMouseY; 79 | #endif 80 | 81 | #if !RETRO_USE_ORIGINAL_CODE 82 | #if RETRO_USING_SDL2 83 | // Easier this way 84 | enum ExtraSDLButtons { 85 | SDL_CONTROLLER_BUTTON_ZL = SDL_CONTROLLER_BUTTON_MAX + 1, 86 | SDL_CONTROLLER_BUTTON_ZR, 87 | SDL_CONTROLLER_BUTTON_LSTICK_UP, 88 | SDL_CONTROLLER_BUTTON_LSTICK_DOWN, 89 | SDL_CONTROLLER_BUTTON_LSTICK_LEFT, 90 | SDL_CONTROLLER_BUTTON_LSTICK_RIGHT, 91 | SDL_CONTROLLER_BUTTON_RSTICK_UP, 92 | SDL_CONTROLLER_BUTTON_RSTICK_DOWN, 93 | SDL_CONTROLLER_BUTTON_RSTICK_LEFT, 94 | SDL_CONTROLLER_BUTTON_RSTICK_RIGHT, 95 | SDL_CONTROLLER_BUTTON_MAX_EXTRA, 96 | }; 97 | 98 | void controllerInit(byte controllerID); 99 | void controllerClose(byte controllerID); 100 | #endif 101 | 102 | #if RETRO_USING_SDL1 103 | extern byte keyState[SDLK_LAST]; 104 | 105 | extern SDL_Joystick *controller; 106 | #endif 107 | 108 | void ProcessInput(); 109 | #endif 110 | 111 | void CheckKeyPress(InputData *input); 112 | void CheckKeyDown(InputData *input); 113 | 114 | #endif // !INPUT_H -------------------------------------------------------------------------------- /RSDKv4/Math.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | #include 3 | 4 | #ifndef M_PI 5 | #define M_PI 3.14159265358979323846264338327950288 6 | #endif 7 | 8 | int sinValM7[0x200]; 9 | int cosValM7[0x200]; 10 | 11 | int sinVal512[0x200]; 12 | int cosVal512[0x200]; 13 | 14 | int sinVal256[0x100]; 15 | int cosVal256[0x100]; 16 | 17 | byte atanVal256[0x100 * 0x100]; 18 | 19 | void CalculateTrigAngles() 20 | { 21 | for (int i = 0; i < 0x200; ++i) { 22 | sinValM7[i] = (sin((i / 256.0) * M_PI) * 4096.0); 23 | cosValM7[i] = (cos((i / 256.0) * M_PI) * 4096.0); 24 | } 25 | 26 | cosValM7[0] = 0x1000; 27 | cosValM7[128] = 0; 28 | cosValM7[256] = -0x1000; 29 | cosValM7[384] = 0; 30 | sinValM7[0] = 0; 31 | sinValM7[128] = 0x1000; 32 | sinValM7[256] = 0; 33 | sinValM7[384] = -0x1000; 34 | 35 | for (int i = 0; i < 0x200; ++i) { 36 | sinVal512[i] = (sinf((i / 256.0) * M_PI) * 512.0); 37 | cosVal512[i] = (cosf((i / 256.0) * M_PI) * 512.0); 38 | } 39 | 40 | cosVal512[0] = 0x200; 41 | cosVal512[128] = 0; 42 | cosVal512[256] = -0x200; 43 | cosVal512[384] = 0; 44 | sinVal512[0] = 0; 45 | sinVal512[128] = 0x200; 46 | sinVal512[256] = 0; 47 | sinVal512[384] = -0x200; 48 | 49 | for (int i = 0; i < 0x100; i++) { 50 | sinVal256[i] = (sinVal512[i * 2] >> 1); 51 | cosVal256[i] = (cosVal512[i * 2] >> 1); 52 | } 53 | 54 | for (int Y = 0; Y < 0x100; ++Y) { 55 | byte *ATan = (byte *)&atanVal256[Y]; 56 | for (int X = 0; X < 0x100; ++X) { 57 | float angle = atan2f(Y, X); 58 | *ATan = (angle * 40.743664f); 59 | ATan += 0x100; 60 | } 61 | } 62 | } 63 | 64 | byte ArcTanLookup(int X, int Y) 65 | { 66 | int x = 0; 67 | int y = 0; 68 | 69 | x = abs(X); 70 | y = abs(Y); 71 | 72 | if (x <= y) { 73 | while (y > 0xFF) { 74 | x >>= 4; 75 | y >>= 4; 76 | } 77 | } 78 | else { 79 | while (x > 0xFF) { 80 | x >>= 4; 81 | y >>= 4; 82 | } 83 | } 84 | if (X <= 0) { 85 | if (Y <= 0) 86 | return atanVal256[(x << 8) + y] + -0x80; 87 | else 88 | return -0x80 - atanVal256[(x << 8) + y]; 89 | } 90 | else if (Y <= 0) 91 | return -atanVal256[(x << 8) + y]; 92 | else 93 | return atanVal256[(x << 8) + y]; 94 | } 95 | -------------------------------------------------------------------------------- /RSDKv4/Math.hpp: -------------------------------------------------------------------------------- 1 | #ifndef MATH_H 2 | #define MATH_H 3 | 4 | //#define M_PI (3.1415927) 5 | 6 | #define MEM_ZERO(x) memset(&(x), 0, sizeof((x))) 7 | #define MEM_ZEROP(x) memset((x), 0, sizeof(*(x))) 8 | 9 | extern int sinValM7[0x200]; 10 | extern int cosValM7[0x200]; 11 | 12 | extern int sinVal512[0x200]; 13 | extern int cosVal512[0x200]; 14 | 15 | extern int sinVal256[0x100]; 16 | extern int cosVal256[0x100]; 17 | 18 | extern byte atanVal256[0x100 * 0x100]; 19 | 20 | // Setup Angles 21 | void CalculateTrigAngles(); 22 | 23 | inline int sin512(int angle) { 24 | if (angle < 0) 25 | angle = 0x200 - angle; 26 | angle &= 0x1FF; 27 | return sinVal512[angle]; 28 | } 29 | 30 | inline int cos512(int angle) 31 | { 32 | if (angle < 0) 33 | angle = 0x200 - angle; 34 | angle &= 0x1FF; 35 | return cosVal512[angle]; 36 | } 37 | 38 | inline int sin256(int angle) 39 | { 40 | if (angle < 0) 41 | angle = 0x100 - angle; 42 | angle &= 0xFF; 43 | return sinVal256[angle]; 44 | } 45 | 46 | inline int cos256(int angle) 47 | { 48 | if (angle < 0) 49 | angle = 0x100 - angle; 50 | angle &= 0xFF; 51 | return cosVal256[angle]; 52 | } 53 | 54 | // Get Arc Tan value 55 | byte ArcTanLookup(int X, int Y); 56 | 57 | #endif // !MATH_H 58 | -------------------------------------------------------------------------------- /RSDKv4/Object.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OBJECT_H 2 | #define OBJECT_H 3 | 4 | #define NATIVEENTITY_COUNT (0x100) 5 | 6 | #define ENTITY_COUNT (0x4A0) 7 | #define TEMPENTITY_START (ENTITY_COUNT - 0x80) 8 | #define OBJECT_COUNT (0x100) 9 | #define TYPEGROUP_COUNT (0x103) 10 | 11 | struct TypeGroupList { 12 | int entityRefs[ENTITY_COUNT]; 13 | int listSize; 14 | }; 15 | 16 | struct Entity { 17 | int XPos; 18 | int YPos; 19 | int XVelocity; 20 | int YVelocity; 21 | int speed; 22 | int values[48]; 23 | int state; 24 | int angle; 25 | int scale; 26 | int rotation; 27 | int alpha; 28 | int animationTimer; 29 | int animationSpeed; 30 | int camOffsetX; 31 | int lookPos; 32 | ushort typeGroup; 33 | byte type; 34 | byte propertyValue; 35 | byte priority; 36 | sbyte drawOrder; 37 | byte direction; 38 | byte inkEffect; 39 | byte animation; 40 | byte prevAnimation; 41 | byte frame; 42 | byte collisionMode; 43 | byte collisionPlane; 44 | sbyte controlMode; 45 | byte controlLock; 46 | byte pushing; 47 | byte visible; 48 | byte tileCollisions; 49 | byte objectInteractions; 50 | byte gravity; 51 | byte left; 52 | byte right; 53 | byte up; 54 | byte down; 55 | byte jumpPress; 56 | byte jumpHold; 57 | byte trackScroll; 58 | byte flailing[5]; 59 | }; 60 | 61 | struct NativeEntityBase { 62 | void (*createPtr)(void *objPtr); 63 | void (*mainPtr)(void *objPtr); 64 | int slotID; 65 | int objectID; 66 | }; 67 | 68 | struct NativeEntity { 69 | void (*createPtr)(void *objPtr); 70 | void (*mainPtr)(void *objPtr); 71 | int slotID; 72 | int objectID; 73 | byte extra[0x400]; 74 | }; 75 | 76 | enum ObjectTypes { 77 | OBJ_TYPE_BLANKOBJECT = 0 //0 is always blank obj 78 | }; 79 | 80 | enum ObjectPriority { 81 | PRIORITY_ACTIVE_BOUNDS, 82 | PRIORITY_ACTIVE, 83 | PRIORITY_ACTIVE_PAUSED, 84 | PRIORITY_ACTIVE_XBOUNDS, 85 | PRIORITY_ACTIVE_XBOUNDS_REMOVE, 86 | PRIORITY_INACTIVE, 87 | PRIORITY_ACTIVE_BOUNDS_SMALL, 88 | PRIORITY_ACTIVE2 89 | }; 90 | 91 | //Native Objects 92 | extern int nativeEntityPos; 93 | 94 | extern int activeEntityList[NATIVEENTITY_COUNT]; 95 | extern int objectRemoveFlag[NATIVEENTITY_COUNT]; 96 | extern NativeEntity objectEntityBank[NATIVEENTITY_COUNT]; 97 | extern int nativeEntityCount; 98 | 99 | extern int nativeEntityCountBackup; 100 | extern int backupEntityList[NATIVEENTITY_COUNT]; 101 | extern NativeEntity objectEntityBackup[NATIVEENTITY_COUNT]; 102 | 103 | extern int nativeEntityCountBackupS; 104 | extern int backupEntityListS[NATIVEENTITY_COUNT]; 105 | extern NativeEntity objectEntityBackupS[NATIVEENTITY_COUNT]; 106 | 107 | //Game Objects 108 | extern int objectEntityPos; 109 | extern int curObjectType; 110 | extern Entity objectEntityList[ENTITY_COUNT]; 111 | extern int processObjectFlag[ENTITY_COUNT]; 112 | extern TypeGroupList objectTypeGroupList[TYPEGROUP_COUNT]; 113 | 114 | extern char typeNames[OBJECT_COUNT][0x40]; 115 | 116 | extern int OBJECT_BORDER_X1; 117 | extern int OBJECT_BORDER_X2; 118 | extern int OBJECT_BORDER_X3; 119 | extern int OBJECT_BORDER_X4; 120 | extern const int OBJECT_BORDER_Y1; 121 | extern const int OBJECT_BORDER_Y2; 122 | extern const int OBJECT_BORDER_Y3; 123 | extern const int OBJECT_BORDER_Y4; 124 | 125 | void ProcessStartupObjects(); 126 | void ProcessObjects(); 127 | void ProcessPausedObjects(); 128 | void ProcessFrozenObjects(); 129 | void Process2PObjects(); 130 | 131 | void SetObjectTypeName(const char *objectName, int objectID); 132 | 133 | extern int playerListPos; 134 | 135 | void ProcessPlayerControl(Entity *player); 136 | 137 | void InitNativeObjectSystem(); 138 | NativeEntity *CreateNativeObject(void (*objCreate)(void *objPtr), void (*objMain)(void *objPtr)); 139 | void RemoveNativeObject(NativeEntityBase *NativeEntry); 140 | void ProcessNativeObjects(); 141 | inline void BackupNativeObjects() { 142 | memcpy(backupEntityList, activeEntityList, sizeof(int) * NATIVEENTITY_COUNT); 143 | memcpy(objectEntityBackup, objectEntityBank, sizeof(NativeEntity) * NATIVEENTITY_COUNT); 144 | nativeEntityCountBackup = nativeEntityCount; 145 | } 146 | inline void BackupNativeObjectsSettings() { 147 | memcpy(backupEntityListS, activeEntityList, sizeof(int) * NATIVEENTITY_COUNT); 148 | memcpy(objectEntityBackupS, objectEntityBank, sizeof(NativeEntity) * NATIVEENTITY_COUNT); 149 | nativeEntityCountBackupS = nativeEntityCount; 150 | } 151 | inline void RestoreNativeObjects() 152 | { 153 | memcpy(activeEntityList, backupEntityList, sizeof(int) * NATIVEENTITY_COUNT); 154 | nativeEntityCount = nativeEntityCountBackup; 155 | memcpy(objectEntityBank, objectEntityBackup, sizeof(NativeEntity) * NATIVEENTITY_COUNT); 156 | 157 | //ptr = CreateNativeObject(FadeScreen_Create, FadeScreen_Main); 158 | //ptr + 16 = 0; 159 | } 160 | inline void RestoreNativeObjectsNoFade() 161 | { 162 | memcpy(activeEntityList, backupEntityList, sizeof(int) * NATIVEENTITY_COUNT); 163 | nativeEntityCount = nativeEntityCountBackup; 164 | memcpy(objectEntityBank, objectEntityBackup, sizeof(NativeEntity) * NATIVEENTITY_COUNT); 165 | } 166 | inline void RestoreNativeObjectsSettings() 167 | { 168 | memcpy(activeEntityList, backupEntityListS, sizeof(int) * NATIVEENTITY_COUNT); 169 | nativeEntityCount = nativeEntityCountBackupS; 170 | memcpy(objectEntityBank, objectEntityBackupS, sizeof(NativeEntity) * NATIVEENTITY_COUNT); 171 | } 172 | inline void GetNativeObject(NativeEntity *obj, void (*newCreate)(void *objPtr), void (*newMain)(void *objPtr)) 173 | { 174 | int slotID = obj->slotID; 175 | int objID = obj->objectID; 176 | memset(&objectEntityBank[slotID], 0, sizeof(NativeEntity)); 177 | obj->slotID = slotID; 178 | obj->mainPtr = newMain; 179 | obj->createPtr = newCreate; 180 | obj->objectID = objID; 181 | if (obj->createPtr) 182 | obj->createPtr(obj); 183 | } 184 | inline NativeEntity *GetNativeObject(uint objID) 185 | { 186 | if (objID > 0xFF) 187 | return nullptr; 188 | else 189 | return &objectEntityBank[objID]; 190 | } 191 | 192 | //Custom, used for cleaning purposes 193 | inline void RemoveNativeObjectType(void (*objCreate)(void *objPtr), void (*objMain)(void *objPtr)) 194 | { 195 | for (int i = nativeEntityCount - 1; i >= 0; --i) { 196 | if (objectEntityBank[i].createPtr == objCreate && objectEntityBank[i].mainPtr == objMain) { 197 | RemoveNativeObject((NativeEntityBase *)&objectEntityBank[i]); 198 | } 199 | } 200 | } 201 | inline void ClearNativeObjects() { 202 | nativeEntityCount = 0; 203 | memset(objectEntityBank, 0, sizeof(NativeEntity) * NATIVEENTITY_COUNT); 204 | } 205 | 206 | #endif // !OBJECT_H 207 | -------------------------------------------------------------------------------- /RSDKv4/Palette.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | // Palettes (as RGB888 Colours) 4 | PaletteEntry fullPalette32[PALETTE_COUNT][PALETTE_SIZE]; 5 | PaletteEntry *activePalette32 = fullPalette32[0]; 6 | 7 | // Palettes (as RGB565 Colours) 8 | ushort fullPalette[PALETTE_COUNT][PALETTE_SIZE]; 9 | ushort *activePalette = fullPalette[0]; // Ptr to the 256 colour set thats active 10 | 11 | byte gfxLineBuffer[SCREEN_YSIZE]; // Pointers to active palette 12 | 13 | int fadeMode = 0; 14 | byte fadeA = 0; 15 | byte fadeR = 0; 16 | byte fadeG = 0; 17 | byte fadeB = 0; 18 | 19 | #if RETRO_HARDWARE_RENDER 20 | int texPaletteNum = 0; 21 | #endif 22 | 23 | void LoadPalette(const char *filePath, int paletteID, int startPaletteIndex, int startIndex, int endIndex) 24 | { 25 | FileInfo info; 26 | char fullPath[0x80]; 27 | 28 | StrCopy(fullPath, "Data/Palettes/"); 29 | StrAdd(fullPath, filePath); 30 | 31 | if (LoadFile(fullPath, &info)) { 32 | SetFilePosition(3 * startIndex); 33 | if (paletteID >= PALETTE_COUNT || paletteID < 0) 34 | paletteID = 0; 35 | 36 | byte colour[3]; 37 | if (paletteID) { 38 | for (int i = startIndex; i < endIndex; ++i) { 39 | FileRead(&colour, 3); 40 | SetPaletteEntry(paletteID, startPaletteIndex++, colour[0], colour[1], colour[2]); 41 | } 42 | } 43 | else { 44 | for (int i = startIndex; i < endIndex; ++i) { 45 | FileRead(&colour, 3); 46 | SetPaletteEntry(-1, startPaletteIndex++, colour[0], colour[1], colour[2]); 47 | } 48 | } 49 | CloseFile(); 50 | } 51 | } 52 | 53 | void SetPaletteFade(byte destPaletteID, byte srcPaletteA, byte srcPaletteB, ushort blendAmount, int startIndex, int endIndex) 54 | { 55 | if (destPaletteID >= PALETTE_COUNT || srcPaletteA >= PALETTE_COUNT || srcPaletteB >= PALETTE_COUNT) 56 | return; 57 | 58 | if (blendAmount >= PALETTE_SIZE) { 59 | blendAmount = PALETTE_SIZE - 1; 60 | } 61 | 62 | if (startIndex >= endIndex) 63 | return; 64 | 65 | uint blendA = 0xFF - blendAmount; 66 | ushort *dst = &fullPalette[destPaletteID][startIndex]; 67 | PaletteEntry *dst32 = &fullPalette32[destPaletteID][startIndex]; 68 | for (int l = startIndex; l < endIndex; ++l) { 69 | *dst = PACK_RGB888((byte)((ushort)(fullPalette32[srcPaletteB][l].r * blendAmount + blendA * fullPalette32[srcPaletteA][l].r) >> 8), 70 | (byte)((ushort)(fullPalette32[srcPaletteB][l].g * blendAmount + blendA * fullPalette32[srcPaletteA][l].g) >> 8), 71 | (byte)((ushort)(fullPalette32[srcPaletteB][l].b * blendAmount + blendA * fullPalette32[srcPaletteA][l].b) >> 8)); 72 | dst32->r = (byte)((ushort)(fullPalette32[srcPaletteB][l].r * blendAmount + blendA * fullPalette32[srcPaletteA][l].r) >> 8); 73 | dst32->g = (byte)((ushort)(fullPalette32[srcPaletteB][l].g * blendAmount + blendA * fullPalette32[srcPaletteA][l].g) >> 8); 74 | dst32->b = (byte)((ushort)(fullPalette32[srcPaletteB][l].b * blendAmount + blendA * fullPalette32[srcPaletteA][l].b) >> 8); 75 | #if RETRO_HARDWARE_RENDER 76 | *dst |= 1; 77 | #endif 78 | 79 | ++dst; 80 | ++dst32; 81 | } 82 | } -------------------------------------------------------------------------------- /RSDKv4/Palette.hpp: -------------------------------------------------------------------------------- 1 | #ifndef PALETTE_H 2 | #define PALETTE_H 3 | 4 | #define PALETTE_COUNT (0x8) 5 | #define PALETTE_SIZE (0x100) 6 | 7 | struct Colour { 8 | byte r; 9 | byte g; 10 | byte b; 11 | byte a; 12 | }; 13 | 14 | struct PaletteEntry { 15 | byte r; 16 | byte g; 17 | byte b; 18 | }; 19 | 20 | // Palettes (as RGB565 Colours) 21 | extern PaletteEntry fullPalette32[PALETTE_COUNT][PALETTE_SIZE]; 22 | extern ushort fullPalette[PALETTE_COUNT][PALETTE_SIZE]; 23 | extern ushort *activePalette; // Ptr to the 256 colour set thats active 24 | extern PaletteEntry *activePalette32; 25 | 26 | extern byte gfxLineBuffer[SCREEN_YSIZE]; // Pointers to active palette 27 | 28 | extern int fadeMode; 29 | extern byte fadeA; 30 | extern byte fadeR; 31 | extern byte fadeG; 32 | extern byte fadeB; 33 | 34 | extern int paletteMode; 35 | 36 | #if RETRO_HARDWARE_RENDER 37 | extern int texPaletteNum; 38 | #endif 39 | 40 | #define RGB888_TO_RGB5551(r, g, b) (2 * ((b) >> 3) | ((g) >> 3 << 6) | ((r) >> 3 << 11) | 0) // used in mobile vers 41 | #define RGB888_TO_RGB565(r, g, b) ((b) >> 3) | (((g) >> 2) << 5) | (((r) >> 3) << 11) // used in pc vers 42 | 43 | #if RETRO_SOFTWARE_RENDER 44 | #define PACK_RGB888(r, g, b) RGB888_TO_RGB565(r, g, b) 45 | #elif RETRO_HARDWARE_RENDER 46 | #define PACK_RGB888(r, g, b) RGB888_TO_RGB5551(r, g, b) 47 | #endif 48 | 49 | void LoadPalette(const char *filePath, int paletteID, int startPaletteIndex, int startIndex, int endIndex); 50 | 51 | inline void SetActivePalette(byte newActivePal, int startLine, int endLine) 52 | { 53 | #if RETRO_SOFTWARE_RENDER 54 | if (newActivePal < PALETTE_COUNT) 55 | for (int l = startLine; l < endLine && l < SCREEN_YSIZE; l++) gfxLineBuffer[l] = newActivePal; 56 | 57 | activePalette = fullPalette[gfxLineBuffer[0]]; 58 | activePalette32 = fullPalette32[gfxLineBuffer[0]]; 59 | #endif 60 | 61 | #if RETRO_HARDWARE_RENDER 62 | if (newActivePal < PALETTE_COUNT) 63 | texPaletteNum = newActivePal; 64 | #endif 65 | } 66 | 67 | inline void SetPaletteEntry(byte paletteIndex, byte index, byte r, byte g, byte b) 68 | { 69 | if (paletteIndex != 0xFF) { 70 | fullPalette[paletteIndex][index] = PACK_RGB888(r, g, b); 71 | fullPalette32[paletteIndex][index].r = r; 72 | fullPalette32[paletteIndex][index].g = g; 73 | fullPalette32[paletteIndex][index].b = b; 74 | #if RETRO_HARDWARE_RENDER 75 | if (index) 76 | fullPalette[paletteIndex][index] |= 1; 77 | #endif 78 | } 79 | else { 80 | activePalette[index] = PACK_RGB888(r, g, b); 81 | activePalette32[index].r = r; 82 | activePalette32[index].g = g; 83 | activePalette32[index].b = b; 84 | #if RETRO_HARDWARE_RENDER 85 | if (index) 86 | activePalette[index] |= 1; 87 | #endif 88 | } 89 | } 90 | 91 | inline void SetPaletteEntryPacked(byte paletteIndex, byte index, uint colour) 92 | { 93 | fullPalette[paletteIndex][index] = PACK_RGB888((byte)(colour >> 16), (byte)(colour >> 8), (byte)(colour >> 0)); 94 | #if RETRO_HARDWARE_RENDER 95 | if (index) 96 | fullPalette[paletteIndex][index] |= 1; 97 | #endif 98 | fullPalette32[paletteIndex][index].r = (byte)(colour >> 16); 99 | fullPalette32[paletteIndex][index].g = (byte)(colour >> 8); 100 | fullPalette32[paletteIndex][index].b = (byte)(colour >> 0); 101 | } 102 | 103 | inline uint GetPaletteEntryPacked(byte paletteIndex, byte index) 104 | { 105 | PaletteEntry clr = fullPalette32[paletteIndex][index]; 106 | return (clr.r << 16) | (clr.g << 8) | (clr.b); 107 | } 108 | 109 | inline void CopyPalette(byte sourcePalette, byte srcPaletteStart, byte destinationPalette, byte destPaletteStart, ushort count) 110 | { 111 | if (sourcePalette < PALETTE_COUNT && destinationPalette < PALETTE_COUNT) { 112 | for (int i = 0; i < count; ++i) { 113 | fullPalette[destinationPalette][destPaletteStart + i] = fullPalette[sourcePalette][srcPaletteStart + i]; 114 | fullPalette32[destinationPalette][destPaletteStart + i] = fullPalette32[sourcePalette][srcPaletteStart + i]; 115 | } 116 | } 117 | } 118 | 119 | inline void RotatePalette(int palID, byte startIndex, byte endIndex, bool right) 120 | { 121 | if (right) { 122 | ushort startClr = fullPalette[palID][endIndex]; 123 | PaletteEntry startClr32 = fullPalette32[palID][endIndex]; 124 | for (int i = endIndex; i > startIndex; --i) { 125 | fullPalette[palID][i] = fullPalette[palID][i - 1]; 126 | fullPalette32[palID][i] = fullPalette32[palID][i - 1]; 127 | } 128 | fullPalette[palID][startIndex] = startClr; 129 | fullPalette32[palID][startIndex] = startClr32; 130 | } 131 | else { 132 | ushort startClr = fullPalette[palID][startIndex]; 133 | PaletteEntry startClr32 = fullPalette32[palID][startIndex]; 134 | for (int i = startIndex; i < endIndex; ++i) { 135 | fullPalette[palID][i] = fullPalette[palID][i + 1]; 136 | fullPalette32[palID][i] = fullPalette32[palID][i + 1]; 137 | } 138 | fullPalette[palID][endIndex] = startClr; 139 | fullPalette32[palID][endIndex] = startClr32; 140 | } 141 | } 142 | 143 | inline void SetFade(byte R, byte G, byte B, ushort A) 144 | { 145 | fadeMode = 1; 146 | fadeR = R; 147 | fadeG = G; 148 | fadeB = B; 149 | fadeA = A > 0xFF ? 0xFF : A; 150 | } 151 | void SetPaletteFade(byte destPaletteID, byte srcPaletteA, byte srcPaletteB, ushort blendAmount, int startIndex, int endIndex); 152 | 153 | #endif // !PALETTE_H -------------------------------------------------------------------------------- /RSDKv4/PauseMenu.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_PAUSEMENU_H 2 | #define NATIVE_PAUSEMENU_H 3 | 4 | struct NativeEntity_PauseMenu : NativeEntityBase { 5 | byte state; 6 | int timer; 7 | int barPos; 8 | byte selectedOption; 9 | TextMenu *menu; 10 | byte touchControls; 11 | 12 | int lastSurfaceNo; 13 | }; 14 | 15 | void PauseMenu_Create(void *objPtr); 16 | void PauseMenu_Main(void *objPtr); 17 | 18 | #endif // NATIVE_PAUSEMENU_H -------------------------------------------------------------------------------- /RSDKv4/RSDKv4 Decomp Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/RSDKv4/RSDKv4 Decomp Icon.ico -------------------------------------------------------------------------------- /RSDKv4/RSDKv4.SDL1.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;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 | {1890ac66-74c7-48ee-b3f4-2b4280f370b4} 18 | 19 | 20 | {65197e20-a952-4014-93ca-c21e07885ac7} 21 | 22 | 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | Header Files 35 | 36 | 37 | Header Files 38 | 39 | 40 | Header Files 41 | 42 | 43 | Header Files 44 | 45 | 46 | Header Files 47 | 48 | 49 | Header Files 50 | 51 | 52 | Header Files 53 | 54 | 55 | Header Files 56 | 57 | 58 | Header Files 59 | 60 | 61 | Header Files 62 | 63 | 64 | Header Files 65 | 66 | 67 | Header Files 68 | 69 | 70 | Header Files 71 | 72 | 73 | Header Files 74 | 75 | 76 | Header Files 77 | 78 | 79 | Header Files 80 | 81 | 82 | Header Files 83 | 84 | 85 | Header Files\nativeEntities 86 | 87 | 88 | Header Files\nativeEntities 89 | 90 | 91 | Header Files 92 | 93 | 94 | 95 | 96 | Source Files 97 | 98 | 99 | Source Files 100 | 101 | 102 | Source Files 103 | 104 | 105 | Source Files 106 | 107 | 108 | Source Files 109 | 110 | 111 | Source Files 112 | 113 | 114 | Source Files 115 | 116 | 117 | Source Files 118 | 119 | 120 | Source Files 121 | 122 | 123 | Source Files 124 | 125 | 126 | Source Files 127 | 128 | 129 | Source Files 130 | 131 | 132 | Source Files 133 | 134 | 135 | Source Files 136 | 137 | 138 | Source Files 139 | 140 | 141 | Source Files 142 | 143 | 144 | Source Files 145 | 146 | 147 | Source Files 148 | 149 | 150 | Source Files 151 | 152 | 153 | Source Files 154 | 155 | 156 | Source Files\nativeEntities 157 | 158 | 159 | Source Files\nativeEntities 160 | 161 | 162 | Source Files 163 | 164 | 165 | Source Files\nativeEntities 166 | 167 | 168 | 169 | 170 | Resource Files 171 | 172 | 173 | -------------------------------------------------------------------------------- /RSDKv4/RSDKv4.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #include "winres.h" 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | #undef APSTUDIO_READONLY_SYMBOLS 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // English (United Kingdom) resources 17 | 18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) 19 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK 20 | #pragma code_page(1252) 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | #endif // English (United Kingdom) resources 48 | ///////////////////////////////////////////////////////////////////////////// 49 | 50 | 51 | ///////////////////////////////////////////////////////////////////////////// 52 | // English (Australia) resources 53 | 54 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA) 55 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS 56 | #pragma code_page(1252) 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | VS_VERSION_INFO VERSIONINFO 64 | FILEVERSION 1,0,0,0 65 | PRODUCTVERSION 1,0,0,0 66 | FILEFLAGSMASK 0x3fL 67 | #ifdef _DEBUG 68 | FILEFLAGS 0x1L 69 | #else 70 | FILEFLAGS 0x0L 71 | #endif 72 | FILEOS 0x40004L 73 | FILETYPE 0x1L 74 | FILESUBTYPE 0x0L 75 | BEGIN 76 | BLOCK "StringFileInfo" 77 | BEGIN 78 | BLOCK "0c0904b0" 79 | BEGIN 80 | VALUE "CompanyName", "RSDKv4/Sonic 1/2 (2013) By Christian 'The Taxman' Whitehead & Simon 'Stealth' Thomley, Decompilation By Rubberduckycooly/RMGRich" 81 | VALUE "FileDescription", "RSDKv4" 82 | VALUE "FileVersion", "1.0.0" 83 | VALUE "InternalName", "RSDKv4.exe" 84 | VALUE "OriginalFilename", "RSDKv4.exe" 85 | VALUE "ProductName", "RSDKv4" 86 | VALUE "ProductVersion", "1.0.0" 87 | END 88 | END 89 | BLOCK "VarFileInfo" 90 | BEGIN 91 | VALUE "Translation", 0xc09, 1200 92 | END 93 | END 94 | 95 | 96 | ///////////////////////////////////////////////////////////////////////////// 97 | // 98 | // Icon 99 | // 100 | 101 | // Icon with lowest ID value placed first to ensure application icon 102 | // remains consistent on all systems. 103 | IDI_ICON1 ICON "RSDKv4 Decomp Icon.ico" 104 | 105 | #endif // English (Australia) resources 106 | ///////////////////////////////////////////////////////////////////////////// 107 | 108 | 109 | 110 | #ifndef APSTUDIO_INVOKED 111 | ///////////////////////////////////////////////////////////////////////////// 112 | // 113 | // Generated from the TEXTINCLUDE 3 resource. 114 | // 115 | 116 | 117 | ///////////////////////////////////////////////////////////////////////////// 118 | #endif // not APSTUDIO_INVOKED 119 | 120 | -------------------------------------------------------------------------------- /RSDKv4/RSDKv4.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;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 | {1890ac66-74c7-48ee-b3f4-2b4280f370b4} 18 | 19 | 20 | {65197e20-a952-4014-93ca-c21e07885ac7} 21 | 22 | 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | Header Files 35 | 36 | 37 | Header Files 38 | 39 | 40 | Header Files 41 | 42 | 43 | Header Files 44 | 45 | 46 | Header Files 47 | 48 | 49 | Header Files 50 | 51 | 52 | Header Files 53 | 54 | 55 | Header Files 56 | 57 | 58 | Header Files 59 | 60 | 61 | Header Files 62 | 63 | 64 | Header Files 65 | 66 | 67 | Header Files 68 | 69 | 70 | Header Files 71 | 72 | 73 | Header Files 74 | 75 | 76 | Header Files 77 | 78 | 79 | Header Files 80 | 81 | 82 | Header Files 83 | 84 | 85 | Header Files\nativeEntities 86 | 87 | 88 | Header Files\nativeEntities 89 | 90 | 91 | 92 | 93 | Source Files 94 | 95 | 96 | Source Files 97 | 98 | 99 | Source Files 100 | 101 | 102 | Source Files 103 | 104 | 105 | Source Files 106 | 107 | 108 | Source Files 109 | 110 | 111 | Source Files 112 | 113 | 114 | Source Files 115 | 116 | 117 | Source Files 118 | 119 | 120 | Source Files 121 | 122 | 123 | Source Files 124 | 125 | 126 | Source Files 127 | 128 | 129 | Source Files 130 | 131 | 132 | Source Files 133 | 134 | 135 | Source Files 136 | 137 | 138 | Source Files 139 | 140 | 141 | Source Files 142 | 143 | 144 | Source Files 145 | 146 | 147 | Source Files 148 | 149 | 150 | Source Files 151 | 152 | 153 | Source Files\nativeEntities 154 | 155 | 156 | Source Files\nativeEntities 157 | 158 | 159 | 160 | 161 | Resource Files 162 | 163 | 164 | 165 | 166 | Resource Files 167 | 168 | 169 | -------------------------------------------------------------------------------- /RSDKv4/Reader.hpp: -------------------------------------------------------------------------------- 1 | #ifndef READER_H 2 | #define READER_H 3 | 4 | #ifdef FORCE_CASE_INSENSITIVE 5 | 6 | #include "fcaseopen.h" 7 | #define FileIO FILE 8 | #define fOpen(path, mode) fcaseopen(path, mode) 9 | #define fRead(buffer, elementSize, elementCount, file) fread(buffer, elementSize, elementCount, file) 10 | #define fSeek(file, offset, whence) fseek(file, offset, whence) 11 | #define fTell(file) ftell(file) 12 | #define fClose(file) fclose(file) 13 | #define fWrite(buffer, elementSize, elementCount, file) fwrite(buffer, elementSize, elementCount, file) 14 | 15 | #else 16 | 17 | #if RETRO_USING_SDL1 || RETRO_USING_SDL2 18 | #define FileIO SDL_RWops 19 | #define fOpen(path, mode) SDL_RWFromFile(path, mode) 20 | #define fRead(buffer, elementSize, elementCount, file) SDL_RWread(file, buffer, elementSize, elementCount) 21 | #define fSeek(file, offset, whence) SDL_RWseek(file, offset, whence) 22 | #define fTell(file) SDL_RWtell(file) 23 | #define fClose(file) SDL_RWclose(file) 24 | #define fWrite(buffer, elementSize, elementCount, file) SDL_RWwrite(file, buffer, elementSize, elementCount) 25 | #else 26 | #define FileIO FILE 27 | #define fOpen(path, mode) fopen(path, mode) 28 | #define fRead(buffer, elementSize, elementCount, file) fread(buffer, elementSize, elementCount, file) 29 | #define fSeek(file, offset, whence) fseek(file, offset, whence) 30 | #define fTell(file) ftell(file) 31 | #define fClose(file) fclose(file) 32 | #define fWrite(buffer, elementSize, elementCount, file) fwrite(buffer, elementSize, elementCount, file) 33 | #endif 34 | 35 | #endif 36 | 37 | #define RETRO_PACKFILE_COUNT (0x1000) 38 | #define RETRO_PACK_COUNT (0x4) 39 | 40 | struct FileInfo { 41 | char fileName[0x100]; 42 | int fileSize; 43 | int vfileSize; 44 | int readPos; 45 | int bufferPosition; 46 | int virtualFileOffset; 47 | byte eStringPosA; 48 | byte eStringPosB; 49 | byte eStringNo; 50 | byte eNybbleSwap; 51 | bool useEncryption; 52 | byte packID; 53 | byte encryptionStringA[0x10]; 54 | byte encryptionStringB[0x10]; 55 | #if !RETRO_USE_ORIGINAL_CODE 56 | FileIO *cFileHandle; 57 | bool usingDataPack; 58 | #endif 59 | }; 60 | 61 | struct RSDKFileInfo { 62 | byte hash[0x10]; 63 | int offset; 64 | int filesize; 65 | bool encrypted; 66 | byte packID; 67 | }; 68 | 69 | struct RSDKContainer { 70 | RSDKFileInfo files[RETRO_PACKFILE_COUNT]; 71 | char packNames[RETRO_PACK_COUNT][0x400]; 72 | int fileCount; 73 | int packCount; 74 | }; 75 | 76 | extern RSDKContainer rsdkContainer; 77 | 78 | extern char fileName[0x100]; 79 | extern byte fileBuffer[0x2000]; 80 | extern int fileSize; 81 | extern int vFileSize; 82 | extern int readPos; 83 | extern int readSize; 84 | extern int bufferPosition; 85 | extern int virtualFileOffset; 86 | extern bool useEncryption; 87 | extern byte packID; 88 | extern byte eStringPosA; 89 | extern byte eStringPosB; 90 | extern byte eStringNo; 91 | extern byte eNybbleSwap; 92 | extern byte encryptionStringA[0x10]; 93 | extern byte encryptionStringB[0x10]; 94 | 95 | extern FileIO *cFileHandle; 96 | 97 | inline void CopyFilePath(char *dest, const char *src) 98 | { 99 | strcpy(dest, src); 100 | for (int i = 0;; ++i) { 101 | if (i >= strlen(dest)) { 102 | break; 103 | } 104 | 105 | if (dest[i] == '/') 106 | dest[i] = '\\'; 107 | } 108 | } 109 | bool CheckRSDKFile(const char *filePath); 110 | inline void CloseRSDKContainers() 111 | { 112 | for (int i = 0; i < 4; ++i) { 113 | strcpy(rsdkContainer.packNames[i], ""); 114 | } 115 | rsdkContainer.packCount = 0; 116 | rsdkContainer.fileCount = 0; 117 | } 118 | 119 | bool LoadFile(const char *filePath, FileInfo *fileInfo); 120 | inline bool CloseFile() 121 | { 122 | int result = 0; 123 | if (cFileHandle) 124 | result = fClose(cFileHandle); 125 | 126 | cFileHandle = NULL; 127 | return result; 128 | } 129 | 130 | void GenerateELoadKeys(uint key1, uint key2); 131 | 132 | void FileRead(void *dest, int size); 133 | 134 | inline size_t FillFileBuffer() 135 | { 136 | if (readPos + 0x2000 <= fileSize) 137 | readSize = 0x2000; 138 | else 139 | readSize = fileSize - readPos; 140 | 141 | size_t result = fRead(fileBuffer, 1u, readSize, cFileHandle); 142 | readPos += readSize; 143 | bufferPosition = 0; 144 | return result; 145 | } 146 | 147 | void GetFileInfo(FileInfo *fileInfo); 148 | void SetFileInfo(FileInfo *fileInfo); 149 | size_t GetFilePosition(); 150 | void SetFilePosition(int newPos); 151 | bool ReachedEndOfFile(); 152 | 153 | #if !RETRO_USE_ORIGINAL_CODE 154 | bool LoadFile2(const char *filePath, FileInfo *fileInfo); 155 | size_t FileRead2(FileInfo *info, void *dest, int size); // For Music Streaming 156 | inline bool CloseFile2(FileInfo *info) 157 | { 158 | int result = 0; 159 | if (info->cFileHandle) 160 | result = fClose(info->cFileHandle); 161 | 162 | info->cFileHandle = NULL; 163 | return result; 164 | } 165 | size_t GetFilePosition2(FileInfo *info); 166 | void SetFilePosition2(FileInfo *info, int newPos); 167 | #endif 168 | 169 | #endif // !READER_H 170 | -------------------------------------------------------------------------------- /RSDKv4/RetroGameLoop.cpp: -------------------------------------------------------------------------------- 1 | #include "RetroEngine.hpp" 2 | 3 | void RetroGameLoop_Create(void *objPtr) 4 | { 5 | NativeEntity_RetroGameLoop *entity = (NativeEntity_RetroGameLoop *)objPtr; 6 | entity->pauseMenu = nullptr; 7 | } 8 | void RetroGameLoop_Main(void *objPtr) 9 | { 10 | NativeEntity_RetroGameLoop *entity = (NativeEntity_RetroGameLoop *)objPtr; 11 | 12 | switch (Engine.gameMode) { 13 | case ENGINE_DEVMENU: 14 | #if RETRO_HARDWARE_RENDER 15 | gfxIndexSize = 0; 16 | gfxVertexSize = 0; 17 | gfxIndexSizeOpaque = 0; 18 | gfxVertexSizeOpaque = 0; 19 | #endif 20 | #if !RETRO_USE_ORIGINAL_CODE 21 | if (entity->pauseMenu && nativeEntityCount > 1) // dumb fix but yknow how it is 22 | RemoveNativeObject(entity->pauseMenu); 23 | entity->pauseMenu = nullptr; 24 | #endif 25 | 26 | processStageSelect(); 27 | break; 28 | case ENGINE_MAINGAME: 29 | #if RETRO_HARDWARE_RENDER 30 | gfxIndexSize = 0; 31 | gfxVertexSize = 0; 32 | gfxIndexSizeOpaque = 0; 33 | gfxVertexSizeOpaque = 0; 34 | vertexSize3D = 0; 35 | indexSize3D = 0; 36 | render3DEnabled = false; 37 | #endif 38 | ProcessStage(); 39 | break; 40 | case ENGINE_INITDEVMENU: 41 | Engine.LoadGameConfig("Data/Game/GameConfig.bin"); 42 | initDevMenu(); 43 | ResetCurrentStageFolder(); 44 | break; 45 | case ENGINE_WAIT: break; 46 | case ENGINE_SCRIPTERROR: 47 | Engine.LoadGameConfig("Data/Game/GameConfig.bin"); 48 | initErrorMessage(); 49 | ResetCurrentStageFolder(); 50 | break; 51 | case ENGINE_INITPAUSE: 52 | #if !RETRO_USE_ORIGINAL_CODE 53 | if (nativeEntityCount > 1) { 54 | Engine.gameMode = ENGINE_MAINGAME; 55 | StopSFXByName("MenuBack"); 56 | break; 57 | } 58 | #endif 59 | PauseSound(); 60 | // ClearNativeObjects(); 61 | Engine.gameMode = ENGINE_WAIT; // temp (maybe?) so pause menu renders on top 62 | // CreateNativeObject(MenuBG_Create, MenuBG_Main); // temp until/if nativeObjs are fully complete 63 | #if !RETRO_USE_ORIGINAL_CODE 64 | entity->pauseMenu = (NativeEntity_PauseMenu *)CreateNativeObject(PauseMenu_Create, PauseMenu_Main); 65 | #endif 66 | break; 67 | case ENGINE_EXITPAUSE: 68 | Engine.gameMode = ENGINE_MAINGAME; 69 | ResumeSound(); 70 | // if (entity->pauseMenu) 71 | // RemoveNativeObject(entity->pauseMenu); 72 | // entity->pauseMenu = nullptr; 73 | break; 74 | case ENGINE_ENDGAME: 75 | ClearScreen(1); 76 | // RestoreNativeObjects(); 77 | Engine.LoadGameConfig("Data/Game/GameConfig.bin"); 78 | activeStageList = 0; 79 | stageListPosition = 0; 80 | #if !RETRO_USE_ORIGINAL_CODE 81 | initStartMenu(0); 82 | #endif 83 | break; 84 | case ENGINE_RESETGAME: // Also called when 2P VS disconnects 85 | ClearScreen(1); 86 | // RestoreNativeObjects(); 87 | #if !RETRO_USE_ORIGINAL_CODE 88 | initStartMenu(1); 89 | #endif 90 | break; 91 | #if !RETRO_USE_ORIGINAL_CODE 92 | case ENGINE_STARTMENU: processStartMenu(); break; 93 | case ENGINE_CONNECT2PVS: 94 | // connect screen goes here 95 | break; 96 | case ENGINE_INITMODMENU: 97 | Engine.LoadGameConfig("Data/Game/GameConfig.bin"); 98 | initStartMenu(0); 99 | ResetCurrentStageFolder(); 100 | 101 | #if RETRO_USE_MOD_LOADER 102 | SetupTextMenu(&gameMenu[0], 0); 103 | AddTextMenuEntry(&gameMenu[0], "MOD LIST"); 104 | SetupTextMenu(&gameMenu[1], 0); 105 | initMods(); // reload mods 106 | 107 | char buffer[0x100]; 108 | for (int m = 0; m < modCount; ++m) { 109 | StrCopy(buffer, modList[m].name.c_str()); 110 | StrAdd(buffer, ": "); 111 | StrAdd(buffer, modList[m].active ? " Active" : "Inactive"); 112 | AddTextMenuEntry(&gameMenu[1], buffer); 113 | } 114 | 115 | gameMenu[1].alignment = 1; 116 | gameMenu[1].selectionCount = 3; 117 | gameMenu[1].selection1 = 0; 118 | if (gameMenu[1].rowCount > 18) 119 | gameMenu[1].visibleRowCount = 18; 120 | else 121 | gameMenu[1].visibleRowCount = 0; 122 | 123 | gameMenu[0].alignment = 2; 124 | gameMenu[0].selectionCount = 1; 125 | gameMenu[1].timer = 0; 126 | gameMenu[1].visibleRowOffset = 0; 127 | stageMode = STARTMENU_MODMENU; 128 | #endif 129 | 130 | break; 131 | #endif 132 | default: 133 | printLog("GameMode '%d' Called", Engine.gameMode); 134 | activeStageList = 0; 135 | stageListPosition = 0; 136 | stageMode = STAGEMODE_LOAD; 137 | Engine.gameMode = ENGINE_MAINGAME; 138 | break; 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /RSDKv4/RetroGameLoop.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NATIVE_RETROGAMELOOP_H 2 | #define NATIVE_RETROGAMELOOP_H 3 | 4 | struct NativeEntity_RetroGameLoop : NativeEntityBase { 5 | // Nothin lol 6 | #if !RETRO_USE_ORIGINAL_CODE 7 | NativeEntity_PauseMenu *pauseMenu; 8 | #endif 9 | }; 10 | 11 | void RetroGameLoop_Create(void *objPtr); 12 | void RetroGameLoop_Main(void *objPtr); 13 | 14 | #endif // !NATIVE_RETROGAMELOOP_H 15 | -------------------------------------------------------------------------------- /RSDKv4/Scene.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SCENE_H 2 | #define SCENE_H 3 | 4 | #define LAYER_COUNT (9) 5 | #define DEFORM_STORE (0x100) 6 | #define DEFORM_SIZE (320) 7 | #define DEFORM_COUNT (DEFORM_STORE + DEFORM_SIZE) 8 | #define PARALLAX_COUNT (0x100) 9 | 10 | #define TILE_COUNT (0x400) 11 | #define TILE_SIZE (0x10) 12 | #define CHUNK_SIZE (0x80) 13 | #define TILE_DATASIZE (TILE_SIZE * TILE_SIZE) 14 | #define TILESET_SIZE (TILE_COUNT * TILE_DATASIZE) 15 | 16 | #define TILELAYER_CHUNK_W (0x100) 17 | #define TILELAYER_CHUNK_H (0x100) 18 | #define TILELAYER_CHUNK_MAX (TILELAYER_CHUNK_W * TILELAYER_CHUNK_H) 19 | #define TILELAYER_SCROLL_MAX (TILELAYER_CHUNK_H * CHUNK_SIZE) 20 | 21 | #define CHUNKTILE_COUNT (0x200 * (8 * 8)) 22 | 23 | #define CPATH_COUNT (2) 24 | 25 | enum StageListNames { 26 | STAGELIST_PRESENTATION = 0, 27 | STAGELIST_REGULAR = 1, 28 | STAGELIST_BONUS = 2, 29 | STAGELIST_SPECIAL = 3, 30 | STAGELIST_MAX, // StageList size 31 | }; 32 | 33 | enum TileLayerTypes { 34 | LAYER_NOSCROLL = 0, 35 | LAYER_HSCROLL = 1, 36 | LAYER_VSCROLL = 2, 37 | LAYER_3DFLOOR = 3, 38 | LAYER_3DSKY = 4, 39 | }; 40 | 41 | enum StageModes { 42 | STAGEMODE_LOAD = 0, 43 | STAGEMODE_NORMAL = 1, 44 | STAGEMODE_PAUSED = 2, 45 | STAGEMODE_FROZEN = 3, 46 | STAGEMODE_2P = 4, 47 | STAGEMODE_STEPOVER = 5, 48 | STAGEMODE_PAUSED_STEPOVER = 6, 49 | STAGEMODE_FROZEN_PAUSED = 7, 50 | STAGEMODE_2P_PAUSED = 8 51 | }; 52 | 53 | enum TileInfo { 54 | TILEINFO_INDEX = 0, 55 | TILEINFO_DIRECTION = 1, 56 | TILEINFO_VISUALPLANE = 2, 57 | TILEINFO_SOLIDITYA = 3, 58 | TILEINFO_SOLIDITYB = 4, 59 | TILEINFO_FLAGSA = 5, 60 | TILEINFO_ANGLEA = 6, 61 | TILEINFO_FLAGSB = 7, 62 | TILEINFO_ANGLEB = 8, 63 | }; 64 | 65 | enum DeformationModes { 66 | DEFORM_FG = 0, 67 | DEFORM_FG_WATER = 1, 68 | DEFORM_BG = 2, 69 | DEFORM_BG_WATER = 3, 70 | }; 71 | 72 | struct SceneInfo { 73 | char name[0x40]; 74 | char folder[0x40]; 75 | char id[0x40]; 76 | bool highlighted; 77 | }; 78 | 79 | struct CollisionMasks { 80 | sbyte floorMasks[TILE_COUNT * TILE_SIZE]; 81 | sbyte lWallMasks[TILE_COUNT * TILE_SIZE]; 82 | sbyte rWallMasks[TILE_COUNT * TILE_SIZE]; 83 | sbyte roofMasks[TILE_COUNT * TILE_SIZE]; 84 | uint angles[TILE_COUNT]; 85 | byte flags[TILE_COUNT]; 86 | }; 87 | 88 | struct TileLayer { 89 | ushort tiles[TILELAYER_CHUNK_MAX]; 90 | byte lineScroll[TILELAYER_SCROLL_MAX]; 91 | int parallaxFactor; 92 | int scrollSpeed; 93 | int scrollPos; 94 | int angle; 95 | int XPos; 96 | int YPos; 97 | int ZPos; 98 | int deformationOffset; 99 | int deformationOffsetW; 100 | byte type; 101 | byte width; 102 | byte height; 103 | }; 104 | 105 | struct LineScroll { 106 | int parallaxFactor[PARALLAX_COUNT]; 107 | int scrollSpeed[PARALLAX_COUNT]; 108 | int scrollPos[PARALLAX_COUNT]; 109 | int linePos[PARALLAX_COUNT]; 110 | int deform[PARALLAX_COUNT]; 111 | byte entryCount; 112 | }; 113 | 114 | struct Tiles128x128 { 115 | int gfxDataPos[CHUNKTILE_COUNT]; 116 | ushort tileIndex[CHUNKTILE_COUNT]; 117 | byte direction[CHUNKTILE_COUNT]; 118 | byte visualPlane[CHUNKTILE_COUNT]; 119 | byte collisionFlags[CPATH_COUNT][CHUNKTILE_COUNT]; 120 | }; 121 | 122 | extern int stageListCount[STAGELIST_MAX]; 123 | extern char stageListNames[STAGELIST_MAX][0x20]; 124 | extern SceneInfo stageList[STAGELIST_MAX][0x100]; 125 | 126 | extern int stageMode; 127 | 128 | extern int cameraTarget; 129 | extern int cameraStyle; 130 | extern int cameraEnabled; 131 | extern int cameraAdjustY; 132 | extern int xScrollOffset; 133 | extern int yScrollOffset; 134 | extern int cameraXPos; 135 | extern int cameraYPos; 136 | extern int cameraShift; 137 | extern int cameraLockedY; 138 | extern int cameraShakeX; 139 | extern int cameraShakeY; 140 | extern int cameraLag; 141 | extern int cameraLagStyle; 142 | 143 | extern int curXBoundary1; 144 | extern int newXBoundary1; 145 | extern int curYBoundary1; 146 | extern int newYBoundary1; 147 | extern int curXBoundary2; 148 | extern int curYBoundary2; 149 | extern int waterLevel; 150 | extern int waterDrawPos; 151 | extern int newXBoundary2; 152 | extern int newYBoundary2; 153 | 154 | extern int SCREEN_SCROLL_LEFT; 155 | extern int SCREEN_SCROLL_RIGHT; 156 | #define SCREEN_SCROLL_UP ((SCREEN_YSIZE / 2) - 16) 157 | #define SCREEN_SCROLL_DOWN ((SCREEN_YSIZE / 2) + 16) 158 | 159 | extern int lastXSize; 160 | extern int lastYSize; 161 | 162 | extern bool pauseEnabled; 163 | extern bool timeEnabled; 164 | extern bool debugMode; 165 | extern int frameCounter; 166 | extern int stageMilliseconds; 167 | extern int stageSeconds; 168 | extern int stageMinutes; 169 | 170 | // Category and Scene IDs 171 | extern int activeStageList; 172 | extern int stageListPosition; 173 | extern char currentStageFolder[0x100]; 174 | extern int actID; 175 | 176 | extern char titleCardText[0x100]; 177 | extern byte titleCardWord2; 178 | 179 | extern byte activeTileLayers[4]; 180 | extern byte tLayerMidPoint; 181 | extern TileLayer stageLayouts[LAYER_COUNT]; 182 | 183 | extern int bgDeformationData0[DEFORM_COUNT]; 184 | extern int bgDeformationData1[DEFORM_COUNT]; 185 | extern int bgDeformationData2[DEFORM_COUNT]; 186 | extern int bgDeformationData3[DEFORM_COUNT]; 187 | 188 | extern LineScroll hParallax; 189 | extern LineScroll vParallax; 190 | 191 | extern Tiles128x128 tiles128x128; 192 | extern CollisionMasks collisionMasks[2]; 193 | 194 | extern byte tilesetGFXData[TILESET_SIZE]; 195 | 196 | extern ushort tile3DFloorBuffer[0x13334]; 197 | extern bool drawStageGFXHQ; 198 | 199 | void InitFirstStage(); 200 | void InitStartingStage(int list, int stage, int player); 201 | void ProcessStage(); 202 | 203 | void ProcessParallaxAutoScroll(); 204 | 205 | void ResetBackgroundSettings(); 206 | inline void ResetCurrentStageFolder() { strcpy(currentStageFolder, ""); } 207 | inline bool CheckCurrentStageFolder(int stage) 208 | { 209 | if (strcmp(currentStageFolder, stageList[activeStageList][stage].folder) == 0) { 210 | return true; 211 | } 212 | else { 213 | strcpy(currentStageFolder, stageList[activeStageList][stage].folder); 214 | return false; 215 | } 216 | } 217 | 218 | void LoadStageFiles(); 219 | int LoadActFile(const char *ext, int stageID, FileInfo *info); 220 | int LoadStageFile(const char *filePath, int stageID, FileInfo *info); 221 | 222 | void LoadActLayout(); 223 | void LoadStageBackground(); 224 | void LoadStageChunks(); 225 | void LoadStageCollisions(); 226 | void LoadStageGIFFile(int stageID); 227 | 228 | inline void Init3DFloorBuffer(int layerID) 229 | { 230 | for (int y = 0; y < TILELAYER_CHUNK_H; ++y) { 231 | for (int x = 0; x < TILELAYER_CHUNK_W; ++x) { 232 | int c = stageLayouts[layerID].tiles[(x >> 3) + (y >> 3 << 8)] << 6; 233 | int tx = x & 7; 234 | tile3DFloorBuffer[x + (y << 8)] = c + tx + ((y & 7) << 3); 235 | } 236 | } 237 | } 238 | 239 | inline void Copy16x16Tile(ushort dest, ushort src) 240 | { 241 | byte *destPtr = &tilesetGFXData[TILELAYER_CHUNK_W * dest]; 242 | byte *srcPtr = &tilesetGFXData[TILELAYER_CHUNK_W * src]; 243 | int cnt = TILE_DATASIZE; 244 | while (cnt--) *destPtr++ = *srcPtr++; 245 | } 246 | 247 | void SetLayerDeformation(int selectedDef, int waveLength, int waveWidth, int waveType, int YPos, int waveSize); 248 | 249 | void SetPlayerScreenPosition(Entity *target); 250 | void SetPlayerScreenPositionCDStyle(Entity *target); 251 | void SetPlayerHLockedScreenPosition(Entity *target); 252 | void SetPlayerLockedScreenPosition(Entity *target); 253 | void SetPlayerScreenPositionFixed(Entity *target); 254 | 255 | #endif // !SCENE_H 256 | -------------------------------------------------------------------------------- /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/Script.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SCRIPT_H 2 | #define SCRIPT_H 3 | 4 | #define SCRIPTDATA_COUNT (0x100000) 5 | #define JUMPTABLE_COUNT (0x10000) 6 | #define FUNCTION_COUNT (0x200) 7 | 8 | #define JUMPSTACK_COUNT (0x400) 9 | #define FUNCSTACK_COUNT (0x400) 10 | #define FORSTACK_COUNT (0x400) 11 | 12 | struct ScriptPtr { 13 | int scriptCodePtr; 14 | int jumpTablePtr; 15 | }; 16 | 17 | struct ObjectScript { 18 | int frameCount; 19 | int spriteSheetID; 20 | ScriptPtr eventMain; 21 | ScriptPtr eventDraw; 22 | ScriptPtr eventStartup; 23 | int frameListOffset; 24 | AnimationFile *animFile; 25 | }; 26 | 27 | struct ScriptEngine { 28 | int operands[0x10]; 29 | int tempValue[8]; 30 | int arrayPosition[9]; 31 | // int currentPlayer; // ArrayPos[6] 32 | // int playerCount; // ArrayPos[7] 33 | // int tempObjectPos; // ArrayPos[8] 34 | int checkResult; 35 | }; 36 | 37 | #define TABLE_COUNT (0x200) 38 | #define TABLE_ENTRY_COUNT (0x400) 39 | 40 | struct StaticInfo { 41 | StaticInfo() 42 | { 43 | StrCopy(name, ""); 44 | value = 0; 45 | dataPos = SCRIPTDATA_COUNT - 1; 46 | } 47 | StaticInfo(const char *aliasName, int val) 48 | { 49 | StrCopy(name, aliasName); 50 | value = val; 51 | dataPos = SCRIPTDATA_COUNT - 1; 52 | } 53 | 54 | char name[0x20]; 55 | int value; 56 | int dataPos; 57 | }; 58 | 59 | struct TableInfo { 60 | TableInfo() 61 | { 62 | StrCopy(name, ""); 63 | valueCount = 0; 64 | dataPos = SCRIPTDATA_COUNT - 1; 65 | } 66 | TableInfo(const char *aliasName, int valCnt) 67 | { 68 | StrCopy(name, aliasName); 69 | valueCount = valCnt; 70 | dataPos = SCRIPTDATA_COUNT - 1; 71 | } 72 | 73 | char name[0x20]; 74 | int valueCount; 75 | StaticInfo values[TABLE_ENTRY_COUNT]; 76 | int dataPos; 77 | }; 78 | 79 | enum ScriptSubs { EVENT_MAIN = 0, EVENT_DRAW = 1, EVENT_SETUP = 2 }; 80 | 81 | extern ObjectScript objectScriptList[OBJECT_COUNT]; 82 | extern ScriptPtr functionScriptList[FUNCTION_COUNT]; 83 | 84 | extern int scriptData[SCRIPTDATA_COUNT]; 85 | extern int jumpTableData[JUMPTABLE_COUNT]; 86 | 87 | extern int jumpTableStack[JUMPSTACK_COUNT]; 88 | extern int functionStack[FUNCSTACK_COUNT]; 89 | extern int foreachStack[FORSTACK_COUNT]; 90 | 91 | extern int scriptCodePos; // Bytecode reading offset 92 | extern int jumpTablePos; // Bytecode reading offset 93 | extern int jumpTableStackPos; 94 | extern int functionStackPos; 95 | extern int foreachStackPos; 96 | 97 | extern ScriptEngine scriptEng; 98 | extern char scriptText[0x4000]; 99 | 100 | extern int scriptDataPos; 101 | extern int scriptDataOffset; 102 | extern int jumpTableDataPos; 103 | extern int jumpTableDataOffset; 104 | 105 | extern int scriptFunctionCount; 106 | extern char scriptFunctionNames[FUNCTION_COUNT][0x40]; 107 | 108 | extern int lineID; 109 | 110 | void CheckAliasText(char *text); 111 | void CheckStaticText(char *text); 112 | TableInfo *CheckTableText(char *text); 113 | void ConvertArithmaticSyntax(char *text); 114 | void ConvertIfWhileStatement(char *text); 115 | void ConvertForeachStatement(char *text); 116 | bool ConvertSwitchStatement(char *text); 117 | void ConvertFunctionText(char *text); 118 | void CheckCaseNumber(char *text); 119 | bool ReadSwitchCase(char *text); 120 | void ReadTableValues(char *text); 121 | void AppendIntegerToString(char *text, int value); 122 | void AppendIntegerToStringW(ushort *text, int value); 123 | bool ConvertStringToInteger(const char *text, int *value); 124 | void CopyAliasStr(char *dest, char *text, bool arrayIndex); 125 | bool CheckOpcodeType(char *text); // Never actually used 126 | 127 | void ParseScriptFile(char *scriptName, int scriptID); 128 | void LoadBytecode(int stageListID, int scriptID); 129 | 130 | void ProcessScript(int scriptCodePtr, int jumpTablePtr, byte scriptSub); 131 | 132 | void ClearScriptData(void); 133 | 134 | #endif // !SCRIPT_H -------------------------------------------------------------------------------- /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 | enum TextInfoTypes { TEXTINFO_TEXTDATA = 0, TEXTINFO_TEXTSIZE = 1, TEXTINFO_ROWCOUNT = 2 }; 9 | 10 | struct TextMenu { 11 | ushort textData[TEXTDATA_COUNT]; 12 | int entryStart[TEXTENTRY_COUNT]; 13 | int entrySize[TEXTENTRY_COUNT]; 14 | byte entryHighlight[TEXTENTRY_COUNT]; 15 | int textDataPos; 16 | int selection1; 17 | int selection2; 18 | ushort rowCount; 19 | ushort visibleRowCount; 20 | ushort visibleRowOffset; 21 | byte alignment; 22 | byte selectionCount; 23 | sbyte timer; 24 | }; 25 | 26 | #if RETRO_REV01 27 | #define FONTCHAR_COUNT (0x400) 28 | 29 | struct FontCharacter 30 | { 31 | int id; 32 | short srcX; 33 | short srcY; 34 | short width; 35 | short height; 36 | short pivotX; 37 | short pivotY; 38 | short xAdvance; 39 | }; 40 | #endif 41 | 42 | enum TextMenuAlignments { 43 | MENU_ALIGN_LEFT, 44 | MENU_ALIGN_RIGHT, 45 | MENU_ALIGN_CENTER, 46 | }; 47 | 48 | extern TextMenu gameMenu[TEXTMENU_COUNT]; 49 | extern int textMenuSurfaceNo; 50 | 51 | extern char playerListText[0x80][0x20]; 52 | 53 | #if RETRO_REV01 54 | extern FontCharacter fontCharacterList[FONTCHAR_COUNT]; 55 | 56 | void LoadFontFile(const char *filePath); 57 | #endif 58 | 59 | void LoadTextFile(TextMenu *menu, const char *filePath, byte mapCode); 60 | void LoadConfigListText(TextMenu *menu, int listNo); 61 | 62 | void SetupTextMenu(TextMenu *menu, int rowCount); 63 | void AddTextMenuEntry(TextMenu *menu, const char *text); 64 | void AddTextMenuEntryW(TextMenu *menu, const ushort *text); 65 | void SetTextMenuEntry(TextMenu *menu, const char *text, int rowID); 66 | void SetTextMenuEntryW(TextMenu *menu, const ushort *text, int rowID); 67 | void EditTextMenuEntry(TextMenu *menu, const char *text, int rowID); 68 | 69 | #endif // !TEXTSYSTEM_H 70 | -------------------------------------------------------------------------------- /RSDKv4/Userdata.hpp: -------------------------------------------------------------------------------- 1 | #ifndef USERDATA_H 2 | #define USERDATA_H 3 | 4 | #define GLOBALVAR_COUNT (0x100) 5 | 6 | #define ACHIEVEMENT_MAX (0x40) 7 | #define LEADERBOARD_MAX (0x80) 8 | 9 | #define SAVEDATA_MAX (0x2000) 10 | 11 | #if RETRO_USE_MOD_LOADER 12 | #include 13 | #include 14 | #include 15 | 16 | #define MOD_MAX (0x100) 17 | #endif 18 | 19 | 20 | enum OnlineMenuTypes { 21 | ONLINEMENU_ACHIEVEMENTS = 0, 22 | ONLINEMENU_LEADERBOARDS = 1, 23 | }; 24 | 25 | struct Achievement { 26 | char name[0x40]; 27 | int status; 28 | }; 29 | 30 | struct LeaderboardEntry { 31 | int status; 32 | }; 33 | 34 | struct MultiplayerData { 35 | int type; 36 | int data[0x1FF]; 37 | }; 38 | 39 | #if RETRO_USE_MOD_LOADER 40 | struct ModInfo { 41 | std::string name; 42 | std::string desc; 43 | std::string author; 44 | std::string version; 45 | std::map fileMap; 46 | std::string folder; 47 | int iconTexture; 48 | bool useScripts; 49 | bool skipStartMenu; 50 | bool active; 51 | }; 52 | #endif 53 | 54 | extern int (*nativeFunction[16])(int, void *); 55 | extern int nativeFunctionCount; 56 | 57 | extern int globalVariablesCount; 58 | extern int globalVariables[GLOBALVAR_COUNT]; 59 | extern char globalVariableNames[GLOBALVAR_COUNT][0x20]; 60 | 61 | extern char gamePath[0x100]; 62 | extern int saveRAM[SAVEDATA_MAX]; 63 | extern Achievement achievements[ACHIEVEMENT_MAX]; 64 | extern LeaderboardEntry leaderboard[LEADERBOARD_MAX]; 65 | 66 | extern MultiplayerData multiplayerDataIN; 67 | extern MultiplayerData multiplayerDataOUT; 68 | extern int matchValueData[0x100]; 69 | extern int matchValueReadPos; 70 | extern int matchValueWritePos; 71 | 72 | extern int sendDataMethod; 73 | extern int sendCounter; 74 | 75 | #if RETRO_USE_MOD_LOADER 76 | extern ModInfo modList[MOD_MAX]; 77 | extern int modCount; 78 | #endif 79 | 80 | #if !RETRO_USE_ORIGINAL_CODE 81 | extern bool forceUseScripts; 82 | extern bool skipStartMenu; 83 | #endif 84 | 85 | inline int GetGlobalVariableByName(const char *name) 86 | { 87 | for (int v = 0; v < globalVariablesCount; ++v) { 88 | if (StrComp(name, globalVariableNames[v])) 89 | return globalVariables[v]; 90 | } 91 | return 0; 92 | } 93 | 94 | inline void SetGlobalVariableByName(const char *name, int value) 95 | { 96 | for (int v = 0; v < globalVariablesCount; ++v) { 97 | if (StrComp(name, globalVariableNames[v])) { 98 | globalVariables[v] = value; 99 | break; 100 | } 101 | } 102 | } 103 | inline int GetGlobalVariableID(const char *name) 104 | { 105 | for (int v = 0; v < globalVariablesCount; ++v) { 106 | if (StrComp(name, globalVariableNames[v])) 107 | return v; 108 | } 109 | return 0; 110 | } 111 | 112 | inline void AddNativeFunction(const char *name, int (*funcPtr)(int, void *)) 113 | { 114 | if (nativeFunctionCount > 0xF) 115 | return; 116 | SetGlobalVariableByName(name, nativeFunctionCount); 117 | nativeFunction[nativeFunctionCount++] = funcPtr; 118 | } 119 | 120 | inline bool ReadSaveRAMData() 121 | { 122 | char buffer[0x100]; 123 | #if RETRO_PLATFORM == RETRO_UWP 124 | if (!usingCWD) 125 | sprintf(buffer, "%s/SData.bin", getResourcesPath()); 126 | else 127 | sprintf(buffer, "%sSData.bin", gamePath); 128 | #elif RETRO_PLATFORM == RETRO_OSX 129 | sprintf(buffer, "%s/SData.bin", gamePath); 130 | #else 131 | sprintf(buffer, "%sSData.bin", gamePath); 132 | #endif 133 | FileIO *saveFile = fOpen(buffer, "rb"); 134 | if (!saveFile) 135 | return false; 136 | fRead(saveRAM, 4u, SAVEDATA_MAX, saveFile); 137 | fClose(saveFile); 138 | return true; 139 | } 140 | 141 | inline bool WriteSaveRAMData() 142 | { 143 | char buffer[0x100]; 144 | #if RETRO_PLATFORM == RETRO_UWP 145 | if (!usingCWD) 146 | sprintf(buffer, "%s/SData.bin", getResourcesPath()); 147 | else 148 | sprintf(buffer, "%sSData.bin", gamePath); 149 | #elif RETRO_PLATFORM == RETRO_OSX 150 | sprintf(buffer, "%s/SData.bin", gamePath); 151 | #else 152 | sprintf(buffer, "%sSData.bin", gamePath); 153 | #endif 154 | 155 | FileIO *saveFile = fOpen(buffer, "wb"); 156 | if (!saveFile) 157 | return false; 158 | fWrite(saveRAM, 4u, SAVEDATA_MAX, saveFile); 159 | fClose(saveFile); 160 | return true; 161 | } 162 | 163 | #if !RETRO_USE_ORIGINAL_CODE 164 | void InitUserdata(); 165 | void writeSettings(); 166 | void ReadUserdata(); 167 | void WriteUserdata(); 168 | #endif 169 | 170 | void AwardAchievement(int id, int status); 171 | 172 | int SetAchievement(int achievementID, void *achDone); 173 | int SetLeaderboard(int leaderboardID, void *res); 174 | inline void LoadAchievementsMenu() 175 | { 176 | #if !RETRO_USE_ORIGINAL_CODE 177 | ReadUserdata(); 178 | #endif 179 | } 180 | inline void LoadLeaderboardsMenu() 181 | { 182 | #if !RETRO_USE_ORIGINAL_CODE 183 | ReadUserdata(); 184 | #endif 185 | } 186 | 187 | int Connect2PVS(int a1, void *a2); 188 | int Disconnect2PVS(int a1, void *a2); 189 | int SendEntity(int a1, void *a2); 190 | int SendValue(int a1, void *a2); 191 | int ReceiveEntity(int a1, void *a2); 192 | int ReceiveValue(int a1, void *a2); 193 | int TransmitGlobal(int a1, void *a2); 194 | 195 | void receive2PVSData(MultiplayerData *data); 196 | void receive2PVSMatchCode(int code); 197 | 198 | int ShowPromoPopup(int a1, void *a2); 199 | 200 | int ExitGame(int val, void *name); 201 | int OpenModMenu(int val, void *name); 202 | 203 | #if RETRO_USE_MOD_LOADER 204 | void initMods(); 205 | void saveMods(); 206 | #endif 207 | 208 | #endif //! USERDATA_H 209 | -------------------------------------------------------------------------------- /RSDKv4/fcaseopen.c: -------------------------------------------------------------------------------- 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 | #include "fcaseopen.h" 24 | 25 | #if !defined(_WIN32) 26 | #include 27 | #include 28 | 29 | #include 30 | #include 31 | #include 32 | 33 | // r must have strlen(path) + 2 bytes 34 | static int casepath(char const *path, char *r) 35 | { 36 | size_t l = strlen(path); 37 | char *p = (char*)alloca(l + 1); 38 | strcpy(p, path); 39 | size_t rl = 0; 40 | 41 | DIR *d; 42 | if (p[0] == '/') 43 | { 44 | d = opendir("/"); 45 | p = p + 1; 46 | } 47 | else 48 | { 49 | d = opendir("."); 50 | r[0] = '.'; 51 | r[1] = 0; 52 | rl = 1; 53 | } 54 | 55 | int last = 0; 56 | char *c = strsep(&p, "/"); 57 | while (c) 58 | { 59 | if (!d) 60 | { 61 | return 0; 62 | } 63 | 64 | if (last) 65 | { 66 | closedir(d); 67 | return 0; 68 | } 69 | 70 | r[rl] = '/'; 71 | rl += 1; 72 | r[rl] = 0; 73 | 74 | struct dirent *e = readdir(d); 75 | while (e) 76 | { 77 | if (strcasecmp(c, e->d_name) == 0) 78 | { 79 | strcpy(r + rl, e->d_name); 80 | rl += strlen(e->d_name); 81 | 82 | closedir(d); 83 | d = opendir(r); 84 | 85 | break; 86 | } 87 | 88 | e = readdir(d); 89 | } 90 | 91 | if (!e) 92 | { 93 | strcpy(r + rl, c); 94 | rl += strlen(c); 95 | last = 1; 96 | } 97 | 98 | c = strsep(&p, "/"); 99 | } 100 | 101 | if (d) closedir(d); 102 | return 1; 103 | } 104 | #endif 105 | 106 | FILE *fcaseopen(char const *path, char const *mode) 107 | { 108 | FILE *f = fopen(path, mode); 109 | #if !defined(_WIN32) 110 | if (!f) 111 | { 112 | char *r = (char*)alloca(strlen(path) + 2); 113 | if (casepath(path, r)) 114 | { 115 | f = fopen(r, mode); 116 | } 117 | } 118 | #endif 119 | return f; 120 | } 121 | 122 | void casechdir(char const *path) 123 | { 124 | #if !defined(_WIN32) 125 | char *r = (char*)alloca(strlen(path) + 2); 126 | if (casepath(path, r)) 127 | { 128 | chdir(r); 129 | } 130 | else 131 | { 132 | errno = ENOENT; 133 | } 134 | #else 135 | chdir(path); 136 | #endif 137 | } 138 | -------------------------------------------------------------------------------- /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 __EMSCRIPTEN__ 4 | #include "emscripten.h" 5 | 6 | void main_loop() 7 | { 8 | Engine.Run(); 9 | } 10 | #endif 11 | 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | for (int i = 0; i < argc; ++i) { 16 | if (StrComp(argv[i], "UsingCWD")) 17 | usingCWD = true; 18 | } 19 | 20 | SDL_SetHint(SDL_HINT_WINRT_HANDLE_BACK_BUTTON, "1"); 21 | Engine.Init(); 22 | #ifdef __EMSCRIPTEN__ 23 | emscripten_set_main_loop(main_loop, 0, 1); 24 | #endif 25 | 26 | #ifndef __EMSCRIPTEN__ 27 | Engine.Run(); 28 | #endif 29 | 30 | return 0; 31 | } 32 | 33 | #if RETRO_PLATFORM == RETRO_UWP 34 | int __stdcall wWinMain(HINSTANCE, HINSTANCE, PWSTR, int) { return SDL_WinRTRunApp(main, NULL); } 35 | #endif 36 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/LargeTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/LargeTile.scale-100.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/LargeTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/LargeTile.scale-125.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/LargeTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/LargeTile.scale-150.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/LargeTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/LargeTile.scale-200.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/LargeTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/LargeTile.scale-400.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SmallTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/SmallTile.scale-100.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SmallTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/SmallTile.scale-125.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SmallTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/SmallTile.scale-150.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SmallTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/SmallTile.scale-200.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SmallTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/SmallTile.scale-400.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SplashScreen.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/SplashScreen.scale-125.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SplashScreen.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/SplashScreen.scale-150.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-125.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-150.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-24.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-32.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-125.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-150.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.scale-400.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-16.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-24.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-256.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-32.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/Square44x44Logo.targetsize-48.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/StoreLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/StoreLogo.scale-125.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/StoreLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/StoreLogo.scale-150.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/StoreLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/StoreLogo.scale-200.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/StoreLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/StoreLogo.scale-400.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/WideTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/WideTile.scale-100.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/WideTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/WideTile.scale-125.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/WideTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/WideTile.scale-150.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/WideTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic1Decomp.UWP/Assets/WideTile.scale-200.png -------------------------------------------------------------------------------- /Sonic1Decomp.UWP/Assets/WideTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/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/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/LargeTile.scale-100.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/LargeTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/LargeTile.scale-125.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/LargeTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/LargeTile.scale-150.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/LargeTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/LargeTile.scale-200.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/LargeTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/LargeTile.scale-400.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SmallTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/SmallTile.scale-100.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SmallTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/SmallTile.scale-125.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SmallTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/SmallTile.scale-150.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SmallTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/SmallTile.scale-200.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SmallTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/SmallTile.scale-400.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SplashScreen.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/SplashScreen.scale-125.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SplashScreen.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/SplashScreen.scale-150.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-125.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-150.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-32.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-125.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-150.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.scale-400.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-16.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-24.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-256.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-32.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/Square44x44Logo.targetsize-48.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/StoreLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/StoreLogo.scale-125.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/StoreLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/StoreLogo.scale-150.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/StoreLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/StoreLogo.scale-200.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/StoreLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/StoreLogo.scale-400.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/WideTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/WideTile.scale-100.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/WideTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/WideTile.scale-125.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/WideTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/WideTile.scale-150.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/WideTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/Sonic2Decomp.UWP/Assets/WideTile.scale-200.png -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Assets/WideTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/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/Sonic12Decomp.UWP.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Assets 12 | 13 | 14 | Assets 15 | 16 | 17 | Assets 18 | 19 | 20 | Assets 21 | 22 | 23 | Assets 24 | 25 | 26 | Assets 27 | 28 | 29 | Assets 30 | 31 | 32 | Assets 33 | 34 | 35 | Assets 36 | 37 | 38 | Assets 39 | 40 | 41 | Assets 42 | 43 | 44 | Assets 45 | 46 | 47 | Assets 48 | 49 | 50 | Assets 51 | 52 | 53 | Assets 54 | 55 | 56 | Assets 57 | 58 | 59 | Assets 60 | 61 | 62 | Assets 63 | 64 | 65 | Assets 66 | 67 | 68 | Assets 69 | 70 | 71 | Assets 72 | 73 | 74 | Assets 75 | 76 | 77 | Assets 78 | 79 | 80 | Assets 81 | 82 | 83 | Assets 84 | 85 | 86 | Assets 87 | 88 | 89 | Assets 90 | 91 | 92 | Assets 93 | 94 | 95 | Assets 96 | 97 | 98 | Assets 99 | 100 | 101 | Assets 102 | 103 | 104 | Assets 105 | 106 | 107 | Assets 108 | 109 | 110 | Assets 111 | 112 | 113 | Assets 114 | 115 | 116 | Assets 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | {45b5e605-d3f8-408f-b0d3-6f2e07679dc9} 131 | 132 | 133 | -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/Sonic2Decomp.UWP.vcxproj.filters: -------------------------------------------------------------------------------- 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 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /Sonic2Decomp.UWP/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /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/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/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/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/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/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/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/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/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/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/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/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/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/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/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/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/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/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/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/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/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/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/dependencies/mac/icons/RSDKv4 Decomp Icon-1024.png -------------------------------------------------------------------------------- /dependencies/mac/icons/RSDKv4 Decomp Icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/dependencies/mac/icons/RSDKv4 Decomp Icon-128.png -------------------------------------------------------------------------------- /dependencies/mac/icons/RSDKv4 Decomp Icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/dependencies/mac/icons/RSDKv4 Decomp Icon-16.png -------------------------------------------------------------------------------- /dependencies/mac/icons/RSDKv4 Decomp Icon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/dependencies/mac/icons/RSDKv4 Decomp Icon-256.png -------------------------------------------------------------------------------- /dependencies/mac/icons/RSDKv4 Decomp Icon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/dependencies/mac/icons/RSDKv4 Decomp Icon-32.png -------------------------------------------------------------------------------- /dependencies/mac/icons/RSDKv4 Decomp Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/dependencies/mac/icons/RSDKv4 Decomp Icon-512.png -------------------------------------------------------------------------------- /dependencies/mac/icons/RSDKv4 Decomp Icon-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/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) -------------------------------------------------------------------------------- /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/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/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/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/flatpak/com.sega.Sonic2.png -------------------------------------------------------------------------------- /header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattConn/Sonic-Decompilation-WASM/c4f5dfb19b92a19609f838696c88f51d5a403bff/header.png -------------------------------------------------------------------------------- /props/winactions.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | C:/vcpkg/installed/x86-windows-static/lib/;$(SolutionDir)dependencies/windows/SDL2/lib/$(PlatformTargetAsMSBuildArchitecture)/ 6 | SDL2.lib;SDL2main.lib;ogg.lib;vorbis.lib;vorbisfile.lib;Shell32.lib 7 | 8 | 9 | -------------------------------------------------------------------------------- /props/winactions_x64.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | C:/vcpkg/installed/x64-windows-static/lib/;$(SolutionDir)dependencies/windows/SDL2/lib/$(PlatformTargetAsMSBuildArchitecture)/ 6 | SDL2.lib;SDL2main.lib;ogg.lib;vorbis.lib;vorbisfile.lib;Shell32.lib 7 | 8 | 9 | --------------------------------------------------------------------------------