Compare commits

...

23 Commits

Author SHA1 Message Date
Dario 888f11e7f4 Update comment. 2025-03-13 19:12:05 -03:00
Dario cb4eaae9ff Remove waitIdle and only accept valid pointers on execute. 2025-03-13 19:11:02 -03:00
Dario 9b7625f03e Remove the need for waitIdle from Vulkan. 2025-03-13 19:08:35 -03:00
Hyper d0368665dd Update README FAQ (#1319) 2025-03-11 15:26:14 +00:00
João Moura cc1018a8fc Pass release path to upload-artifact step on Windows builds (#1151) 2025-03-10 15:18:37 +03:00
Skyth (Asilkan) 131427e017 Update version to v1.0.2. (#1149) 2025-03-07 18:52:49 +03:00
Hyper 45c0880145 Rename DisableDPadAsAnalogInput to DisableDPadMovement (#1146) 2025-03-07 13:52:42 +03:00
Skyth (Asilkan) 024c35c1fe Force WASAPI on Windows. (#1134) 2025-03-07 13:52:01 +03:00
Hyper a9e280e116 Fix Homing Attack on Jump not affecting Cool Edge Act 3 (Day) (#904) 2025-03-07 04:54:17 +03:00
Hyper c64ef1fe15 Added error message if included DirectX DLLs are missing (#998)
* Added error message if included DirectX DLLs are missing

* locale: added System_Win32_MissingDLLs localisation

Co-Authored-By: LJSTAR <31629427+LJSTARbird@users.noreply.github.com>
Co-Authored-By: Kitzuku <25226941+Kitzuku@users.noreply.github.com>
Co-Authored-By: NextinHKRY <38560522+NextinMono@users.noreply.github.com>
Co-Authored-By: brianuuu <38166666+brianuuu@users.noreply.github.com>
Co-Authored-By: Darío <538504+DarioSamo@users.noreply.github.com>

* Fix ifdefs

---------

Co-authored-by: LJSTAR <31629427+LJSTARbird@users.noreply.github.com>
Co-authored-by: Kitzuku <25226941+Kitzuku@users.noreply.github.com>
Co-authored-by: NextinHKRY <38560522+NextinMono@users.noreply.github.com>
Co-authored-by: brianuuu <38166666+brianuuu@users.noreply.github.com>
Co-authored-by: Darío <538504+DarioSamo@users.noreply.github.com>
2025-03-07 04:47:15 +03:00
Hyper c19a7b1e11 Added check for AVX on boot (#1067)
Co-authored-by: Wiseguy <68165316+mr-wiseguy@users.noreply.github.com>
2025-03-07 04:45:58 +03:00
Hyper 3c050887d8 Fix shoe upgrade hints patch breaking sequence flags (#1130) 2025-03-07 04:43:49 +03:00
Hyper 676c3f0ff4 Prevent game from closing whilst autosaving (#967) 2025-03-07 04:43:37 +03:00
Skyth (Asilkan) 3676c28114 Fix the unsafe base address assumption. (#1098) 2025-03-07 03:31:13 +03:00
Hyper df5e48f528 Increase FPS slider max to 241 (#1082) 2025-03-06 06:33:13 +00:00
Jérémy Francart c07a754f4f Add hidden DisableDPadAsAnalogInput option (#604)
This commit adds a configuration entry in the 'Codes' section named DisableDPadAsAnalogInput allowing someone to enable or disable the movement of Sonic / the world map cursor using the directional pad buttons.
2025-03-06 05:59:22 +00:00
NextinHKRY 8a80db141d code: Add Disable Boost Filter code (#999) 2025-03-06 05:46:45 +00:00
Michael 48458cb903 Update README.md (#1050)
- Added a tip regarding supported media players with Music Attenuation
- Added onto the mod support note, referring to the HMM wiki regarding the mod format
2025-03-05 23:16:04 +00:00
Nilton Perim Neto 1c225184a1 Updated build instructions for Linux (#914)
* Update BUILDING.md

updated building to describe for Arch to make the groundwork for making an AUR repo

* Update BUILDING.md

* Update BUILDING.md

* Removed vcpkg

removed vcpkg from the Arch command since its not needed

---------

Co-authored-by: Hyper <34012267+hyperbx@users.noreply.github.com>
2025-03-05 23:15:51 +00:00
JaceCear 6ef7789b17 Fix typo in German translation (#980) 2025-03-05 23:08:40 +00:00
Skyth (Asilkan) 756d001d35 Disable hardware resolve on Intel GPUs. (#853) 2025-03-06 01:53:36 +03:00
Isaac Marovitz 0866be0c3d Build all presets (#979)
* Build all presets

Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>

* Add preset to file name

Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>

* Upload PDB

Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>

Fix

Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>

* Cache by preset

Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>

---------

Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
2025-03-05 20:37:52 +03:00
got4n 4705ffddc2 Fixing typo in French translation. (#545)
"a échoué" is more correct than "a échouée"
2025-03-04 07:22:36 +00:00
26 changed files with 215 additions and 73 deletions
+21 -10
View File
@@ -14,9 +14,12 @@ jobs:
build-linux:
name: Build Linux
runs-on: ubuntu-24.04
strategy:
matrix:
preset: ["linux-debug", "linux-release", "linux-relwithdebinfo"]
env:
LLVM_VERSION: 18
CMAKE_PRESET: linux-release
CMAKE_PRESET: ${{ matrix.preset }}
steps:
- name: Checkout Repository
@@ -34,7 +37,7 @@ jobs:
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ccache-${{ runner.os }}
key: ccache-${{ runner.os }}-${{ matrix.preset }}
- name: Cache vcpkg
uses: actions/cache@v4
@@ -55,7 +58,7 @@ jobs:
uses: actions/cache@v4
with:
path: /tmp/ccache
key: ccache-${{ runner.os }}
key: ccache-${{ runner.os }}-${{ matrix.preset }}
- name: Prepare Project
run: cp ./private/* ./UnleashedRecompLib/private
@@ -73,13 +76,16 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: UnleashedRecomp-Linux
name: UnleashedRecomp-Linux-${{ env.CMAKE_PRESET }}
path: ./out/build/${{ env.CMAKE_PRESET }}/UnleashedRecomp/UnleashedRecomp
build-windows:
name: Build Windows
runs-on: windows-latest
strategy:
matrix:
preset: ["x64-Clang-Debug", "x64-Clang-Release", "x64-Clang-RelWithDebInfo"]
env:
CMAKE_PRESET: x64-Clang-Release
CMAKE_PRESET: ${{ matrix.preset }}
steps:
- name: Checkout repository
@@ -97,7 +103,7 @@ jobs:
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ccache-${{ runner.os }}
key: ccache-${{ runner.os }}-${{ matrix.preset }}
- name: Cache vcpkg
uses: actions/cache@v4
@@ -139,13 +145,18 @@ jobs:
Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\dxil.dll" -Destination ".\release\dxil.dll"
Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\UnleashedRecomp.exe" -Destination ".\release\UnleashedRecomp.exe"
Compress-Archive -Path .\release\* -DestinationPath .\UnleashedRecomp-Windows.zip
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: UnleashedRecomp-Windows
path: .\UnleashedRecomp-Windows.zip
name: UnleashedRecomp-Windows-${{ env.CMAKE_PRESET }}
path: .\release
- name: Upload PDB
uses: actions/upload-artifact@v4
if: ${{ matrix.preset != 'x64-Clang-Release' }}
with:
name: UnleashedRecomp-Windows-${{ env.CMAKE_PRESET }}-PDB
path: .\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\UnleashedRecomp.pdb
build-flatpak:
name: Build Flatpak
runs-on: ubuntu-24.04
+14 -2
View File
@@ -182,6 +182,9 @@ Many options have been integrated to address some common quality of life improve
- The day/night transformation cutscene in towns can use either the Xbox 360 or PlayStation 3 version, with the Xbox version artificially extending loading times for the full video play out, whilst the PlayStation version ends as soon as it's done loading.
- Music Attenuation is a feature that was originally present in the Xbox 360 version of the game, where it'd automatically mute the background music if the console's media player was in use. This feature has been implemented using information provided by the [Windows Media Control](https://learn.microsoft.com/en-us/uwp/api/windows.media.control?view=winrt-26100) APIs in [WinRT](https://en.wikipedia.org/wiki/Windows_Runtime). Applications that interface with Windows 10/11 to display media controls are supported.
> [!TIP]
> You may refer to Music Presence's [list of supported media players](https://github.com/ungive/discord-music-presence/blob/master/documentation/supported-media-players.md) for players that work with Music Attenuation out of the box.
> [!NOTE]
> Please note that Music Attenuation is not currently available on Linux. Support for this feature may be added in a future update.
@@ -206,6 +209,8 @@ Modded files for the Xbox 360 version of the game are compatible with Unleashed
> [!NOTE]
> Code modding is currently not possible and is [planned for a future update](#code-modding). As a workaround for the time being, some codes have been directly embedded into the game and can be accessed through Hedge Mod Manager's Codes tab.
>
> For information on the mod format, check out Hedge Mod Manager's [Basic Mod File Structure](https://github.com/thesupersonic16/HedgeModManager/wiki/Basic-Mod-File-Structure) wiki page.
## Update Roadmap
@@ -273,9 +278,16 @@ Simply booting at least once in Desktop Mode will enable the Deck to use the fil
## FAQ
### Do you have a Discord server?
### Do you have a website or Discord server?
Unleashed Recompiled is not associated with any Discord servers. Use the [Issues](https://github.com/hedge-dev/UnleashedRecomp/issues) page if you need support.
Unleashed Recompiled does not have an official website, nor is it affiliated with any Discord servers.
**Please link here when directing anyone to the project.**
> [!CAUTION]
> Do not download builds of Unleashed Recompiled from anywhere but our [Releases](https://github.com/hedge-dev/UnleashedRecomp/releases/latest) page.
>
> **We will never distribute builds on other websites, via Discord servers or via third-party update tools.**
### Why does the installer say my files are invalid?
+1 -1
View File
@@ -352,7 +352,7 @@ if (WIN32)
Synchronization
winmm
)
endif()
endif()
target_link_libraries(UnleashedRecomp PRIVATE
fmt::fmt
+1
View File
@@ -8,6 +8,7 @@ public:
static inline bool s_isInit;
static inline bool s_isMissingDLC;
static inline bool s_isLoading;
static inline bool s_isSaving;
static inline bool s_isWerehog;
static inline bool s_isSaveDataCorrupt;
@@ -38,6 +38,11 @@ static void CreateAudioDevice()
void XAudioInitializeSystem()
{
#ifdef _WIN32
// Force wasapi on Windows.
SDL_setenv("SDL_AUDIODRIVER", "wasapi", true);
#endif
SDL_SetHint(SDL_HINT_AUDIO_CATEGORY, "playback");
SDL_SetHint(SDL_HINT_AUDIO_DEVICE_APP_NAME, "Unleashed Recompiled");
+4 -7
View File
@@ -2285,6 +2285,9 @@ namespace plume {
}
void D3D12CommandQueue::executeCommandLists(const RenderCommandList **commandLists, uint32_t commandListCount, RenderCommandSemaphore **waitSemaphores, uint32_t waitSemaphoreCount, RenderCommandSemaphore **signalSemaphores, uint32_t signalSemaphoreCount, RenderCommandFence *signalFence) {
assert(commandLists != nullptr);
assert(commandListCount > 0);
for (uint32_t i = 0; i < waitSemaphoreCount; i++) {
D3D12CommandSemaphore *interfaceSemaphore = static_cast<D3D12CommandSemaphore *>(waitSemaphores[i]);
d3d->Wait(interfaceSemaphore->d3d, interfaceSemaphore->semaphoreValue);
@@ -2297,9 +2300,7 @@ namespace plume {
executionVector.emplace_back(static_cast<ID3D12CommandList *>(interfaceCommandList->d3d));
}
if (!executionVector.empty()) {
d3d->ExecuteCommandLists(UINT(executionVector.size()), executionVector.data());
}
d3d->ExecuteCommandLists(UINT(executionVector.size()), executionVector.data());
for (uint32_t i = 0; i < signalSemaphoreCount; i++) {
D3D12CommandSemaphore *interfaceSemaphore = static_cast<D3D12CommandSemaphore *>(signalSemaphores[i]);
@@ -3798,10 +3799,6 @@ namespace plume {
return countsSupported;
}
void D3D12Device::waitIdle() const {
assert(false && "Use fences to replicate wait idle behavior on D3D12.");
}
void D3D12Device::release() {
if (d3d != nullptr) {
d3d->Release();
-1
View File
@@ -459,7 +459,6 @@ namespace plume {
const RenderDeviceCapabilities &getCapabilities() const override;
const RenderDeviceDescription &getDescription() const override;
RenderSampleCounts getSampleCountsSupported(RenderFormat format) const override;
void waitIdle() const override;
void release();
bool isValid() const;
};
@@ -200,7 +200,7 @@ namespace plume {
// Concrete implementation shortcuts.
inline void executeCommandLists(const RenderCommandList *commandList, RenderCommandFence *signalFence = nullptr) {
executeCommandLists(commandList != nullptr ? &commandList : nullptr, commandList != nullptr ? 1 : 0, nullptr, 0, nullptr, 0, signalFence);
executeCommandLists(&commandList, 1, nullptr, 0, nullptr, 0, signalFence);
}
};
@@ -242,7 +242,6 @@ namespace plume {
virtual const RenderDeviceCapabilities &getCapabilities() const = 0;
virtual const RenderDeviceDescription &getDescription() const = 0;
virtual RenderSampleCounts getSampleCountsSupported(RenderFormat format) const = 0;
virtual void waitIdle() const = 0;
};
struct RenderInterface {
-4
View File
@@ -4190,10 +4190,6 @@ namespace plume {
}
}
void VulkanDevice::waitIdle() const {
vkDeviceWaitIdle(vk);
}
void VulkanDevice::release() {
if (allocator != VK_NULL_HANDLE) {
vmaDestroyAllocator(allocator);
-1
View File
@@ -430,7 +430,6 @@ namespace plume {
const RenderDeviceCapabilities &getCapabilities() const override;
const RenderDeviceDescription &getDescription() const override;
RenderSampleCounts getSampleCountsSupported(RenderFormat format) const override;
void waitIdle() const override;
void release();
bool isValid() const;
};
+19 -15
View File
@@ -287,8 +287,8 @@ static constexpr bool g_vulkan = true;
static bool g_triangleStripWorkaround = false;
static constexpr bool g_hardwareResolve = true;
static constexpr bool g_hardwareDepthResolve = true;
static bool g_hardwareResolve = true;
static bool g_hardwareDepthResolve = true;
static std::unique_ptr<RenderInterface> g_interface;
static std::unique_ptr<RenderDevice> g_device;
@@ -1698,6 +1698,10 @@ bool Video::CreateHostDevice(const char *sdlVideoDriver)
continue;
}
}
// Hardware resolve seems to be completely bugged on Intel D3D12 drivers.
g_hardwareResolve = (deviceDescription.vendor != RenderDeviceVendor::INTEL);
g_hardwareDepthResolve = (deviceDescription.vendor != RenderDeviceVendor::INTEL);
}
g_vulkan = (interfaceFunction == CreateVulkanInterfaceWrapper);
@@ -1969,23 +1973,21 @@ void Video::WaitForGPU()
{
g_waitForGPUCount++;
if (g_vulkan)
// Wait for all queued frames to finish.
for (size_t i = 0; i < NUM_FRAMES; i++)
{
g_device->waitIdle();
}
else
{
for (size_t i = 0; i < NUM_FRAMES; i++)
if (g_commandListStates[i])
{
if (g_commandListStates[i])
{
g_queue->waitForCommandFence(g_commandFences[i].get());
g_commandListStates[i] = false;
}
g_queue->waitForCommandFence(g_commandFences[i].get());
g_commandListStates[i] = false;
}
g_queue->executeCommandLists(nullptr, g_commandFences[0].get());
g_queue->waitForCommandFence(g_commandFences[0].get());
}
// Execute an empty command list and wait for it to end to guarantee that any remaining presentation has finished.
g_commandLists[0]->begin();
g_commandLists[0]->end();
g_queue->executeCommandLists(g_commandLists[0].get(), g_commandFences[0].get());
g_queue->waitForCommandFence(g_commandFences[0].get());
}
static uint32_t CreateDevice(uint32_t a1, uint32_t a2, uint32_t a3, uint32_t a4, uint32_t a5, be<uint32_t>* a6)
@@ -2326,6 +2328,8 @@ static void DrawProfiler()
ImGui::Text("Triangle Fan: %s", g_capabilities.triangleFan ? "Supported" : "Unsupported");
ImGui::Text("Dynamic Depth Bias: %s", g_capabilities.dynamicDepthBias ? "Supported" : "Unsupported");
ImGui::Text("Triangle Strip Workaround: %s", g_triangleStripWorkaround ? "Enabled" : "Disabled");
ImGui::Text("Hardware Resolve: %s", g_hardwareResolve ? "Enabled" : "Disabled");
ImGui::Text("Hardware Depth Resolve: %s", g_hardwareDepthResolve ? "Enabled" : "Disabled");
ImGui::NewLine();
ImGui::Text("API: %s", g_vulkan ? "Vulkan" : "D3D12");
+3 -3
View File
@@ -562,9 +562,9 @@ CONFIG_DEFINE_ENUM_LOCALE(EAspectRatio)
ELanguage::German,
{
{ EAspectRatio::Auto, { "AUTO", "Auto: Das Seitenverhältnis passt sich automatisch der Fenstergröße an." } },
{ EAspectRatio::Wide, { "16:9", "16:9: Stellt das Spiel in einem Breitbildschirm-Vormat dar." } },
{ EAspectRatio::Narrow, { "4:3", "4:3: Stellt das Spiel in einem Mittel-Vormat dar." } },
{ EAspectRatio::OriginalNarrow, { "ORIGINAL 4:3", "Original 4:3: Stellt das Spiel in einem Mittel-Vormat dar, was der ursprünglichen Implementation originalgetreut bleibt." } }
{ EAspectRatio::Wide, { "16:9", "16:9: Stellt das Spiel in einem Breitbildschirm-Format dar." } },
{ EAspectRatio::Narrow, { "4:3", "4:3: Stellt das Spiel in einem Mittel-Format dar." } },
{ EAspectRatio::OriginalNarrow, { "ORIGINAL 4:3", "Original 4:3: Stellt das Spiel in einem Mittel-Format dar, was der ursprünglichen Implementation originalgetreut bleibt." } }
}
},
{
+12 -1
View File
@@ -378,7 +378,7 @@ std::unordered_map<std::string_view, std::unordered_map<ELanguage, std::string>>
{ ELanguage::English, "Installation failed.\n\nError: " },
{ ELanguage::Japanese, "インストールに[失敗:しっぱい]しました\n\nエラー: " },
{ ELanguage::German, "Installation fehlgeschlagen.\n\nFehler: " },
{ ELanguage::French, "L'installation a échouée.\n\nErreur : " },
{ ELanguage::French, "L'installation a échoué.\n\nErreur : " },
{ ELanguage::Spanish, "La instalación falló.\n\nError: " },
{ ELanguage::Italian, "Installazione fallita.\n\nErrore: " }
}
@@ -692,6 +692,17 @@ std::unordered_map<std::string_view, std::unordered_map<ELanguage, std::string>>
{ ELanguage::Italian, "Impossibile creare un backend D3D12 (Windows) o Vulkan.\n\nAssicurati che:\n\n- Il tuo sistema soddisfi i requisiti minimi.\n- I driver della scheda grafica siano aggiornati.\n- Il tuo sistema operativo sia aggiornato." }
}
},
{
"System_Win32_MissingDLLs",
{
{ ELanguage::English, "The module \"%s\" could not be found.\n\nPlease make sure that:\n\n- You extracted this copy of Unleashed Recompiled fully and not just the *.exe file.\n- You are not running Unleashed Recompiled from a *.zip file." },
{ ELanguage::Japanese, "モジュール\"%s\"が見つかりませんでした\n\n次の点を確認してください:\n\n※Unleashed Recompiledの*.exeファイルだけを抽出していなく、 コピーを完全に抽出してること\n※Unleashed Recompiledを*.zipファイルから実行していないこと" },
{ ELanguage::German, "Das Modul \"%s\" konnte nicht gefunden werden.\n\nBitte stelle sicher, dass:\n\n- Diese Kopie von Unleashed Recompiled vollständig entpackt wurde und nicht nur die *.exe-Datei.\n- Unleashed Recompiled nicht direkt aus einer *.zip-Datei ausgeführt wird." },
{ ELanguage::French, "Le module \"%s\" n'a pas pu être trouvé.\n\nVeuillez vous assurer que :\n\n- Vous avez extrait Unleashed Recompiled dans son entièreté et pas seulement le fichier *.exe.\n- Vous n'exécutez pas Unleashed Recompiled à partir d'un fichier *.zip." },
{ ELanguage::Spanish, "No se pudo encontrar el módulo \"%s\".\n\nAsegúrese de que:\n\n- Ha extraido esta copia de Unleashed Recompiled por completo y no solo el archivo *.exe.\n- No está ejecutando Unleashed Recompiled desde un archivo *.zip." },
{ ELanguage::Italian, "Impossibile trovare il modulo \"%s\".\n\nAssicurati che:\n\n- Hai estratto questa copia di Unleashed Recompiled correttamente e non solo il file *.exe.\n- Non stai eseguendo Unleashed Recompiled da un file *.zip." }
}
},
{
"Common_On",
{
+47 -1
View File
@@ -1,4 +1,5 @@
#include <stdafx.h>
#include <cpuid.h>
#include <cpu/guest_thread.h>
#include <gpu/video.h>
#include <kernel/function.h>
@@ -27,6 +28,15 @@
#include <timeapi.h>
#endif
#if defined(_WIN32) && defined(UNLEASHED_RECOMP_D3D12)
static std::array<std::string_view, 3> g_D3D12RequiredModules =
{
"D3D12/D3D12Core.dll",
"dxcompiler.dll",
"dxil.dll"
};
#endif
const size_t XMAIOBegin = 0x7FEA0000;
const size_t XMAIOEnd = XMAIOBegin + 0x0000FFFF;
@@ -147,6 +157,29 @@ uint32_t LdrLoadModule(const std::filesystem::path &path)
return entry;
}
__attribute__((constructor(101), target("no-avx,no-avx2"), noinline))
void init()
{
#ifdef __x86_64__
uint32_t eax, ebx, ecx, edx;
// Execute CPUID for processor info and feature bits.
__get_cpuid(1, &eax, &ebx, &ecx, &edx);
// Check for AVX support.
if ((ecx & (1 << 28)) == 0)
{
printf("[*] CPU does not support the AVX instruction set.\n");
#ifdef _WIN32
MessageBoxA(nullptr, "Your CPU does not meet the minimum system requirements.", "Unleashed Recompiled", MB_ICONERROR);
#endif
std::_Exit(1);
}
#endif
}
int main(int argc, char *argv[])
{
#ifdef _WIN32
@@ -156,7 +189,7 @@ int main(int argc, char *argv[])
os::process::CheckConsole();
if (!os::registry::Init())
LOGN_WARNING("OS doesn't support registry");
LOGN_WARNING("OS does not support registry.");
os::logger::Init();
@@ -180,6 +213,19 @@ int main(int argc, char *argv[])
Config::Load();
#if defined(_WIN32) && defined(UNLEASHED_RECOMP_D3D12)
for (auto& dll : g_D3D12RequiredModules)
{
if (!std::filesystem::exists(g_executableRoot / dll))
{
char text[512];
snprintf(text, sizeof(text), Localise("System_Win32_MissingDLLs").c_str(), dll.data());
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, GameWindow::GetTitle(), text, GameWindow::s_pWindow);
std::_Exit(1);
}
}
#endif
// Check the time since the last time an update was checked. Store the new time if the difference is more than six hours.
constexpr double TimeBetweenUpdateChecksInSeconds = 6 * 60 * 60;
time_t timeNow = std::time(nullptr);
+41 -11
View File
@@ -212,6 +212,9 @@ g_sdlEventListenerForInputPatches;
static bool IsDPadThreshold(const SWA::SPadState* pPadState)
{
if (Config::DisableDPadMovement)
return false;
return pPadState->IsDown(SWA::eKeyState_DpadUp) ||
pPadState->IsDown(SWA::eKeyState_DpadDown) ||
pPadState->IsDown(SWA::eKeyState_DpadLeft) ||
@@ -237,6 +240,9 @@ static bool IsCursorThreshold(double deadzone = 0, bool isBelowThreshold = false
static void SetDPadAnalogDirectionX(PPCRegister& pPadState, PPCRegister& x, bool invert, float max = 1.0f)
{
if (Config::DisableDPadMovement)
return;
auto pGuestPadState = (SWA::SPadState*)g_memory.Translate(pPadState.u32);
if (pGuestPadState->IsDown(SWA::eKeyState_DpadLeft))
@@ -248,6 +254,9 @@ static void SetDPadAnalogDirectionX(PPCRegister& pPadState, PPCRegister& x, bool
static void SetDPadAnalogDirectionY(PPCRegister& pPadState, PPCRegister& y, bool invert, float max = 1.0f)
{
if (Config::DisableDPadMovement)
return;
auto pGuestPadState = (SWA::SPadState*)g_memory.Translate(pPadState.u32);
if (pGuestPadState->IsDown(SWA::eKeyState_DpadUp))
@@ -283,6 +292,9 @@ void PostureDPadSupportYMidAsmHook(PPCRegister& pPadState, PPCRegister& y)
void PostureSpaceHurrierDPadSupportXMidAsmHook(PPCRegister& pPadState, PPCVRegister& vector)
{
if (Config::DisableDPadMovement)
return;
auto pGuestPadState = (SWA::SPadState*)g_memory.Translate(pPadState.u32);
if (pGuestPadState->IsDown(SWA::eKeyState_DpadLeft))
@@ -294,6 +306,9 @@ void PostureSpaceHurrierDPadSupportXMidAsmHook(PPCRegister& pPadState, PPCVRegis
void PostureSpaceHurrierDPadSupportYMidAsmHook(PPCRegister& pPadState, PPCVRegister& vector)
{
if (Config::DisableDPadMovement)
return;
auto pGuestPadState = (SWA::SPadState*)g_memory.Translate(pPadState.u32);
if (pGuestPadState->IsDown(SWA::eKeyState_DpadUp))
@@ -303,6 +318,18 @@ void PostureSpaceHurrierDPadSupportYMidAsmHook(PPCRegister& pPadState, PPCVRegis
vector.f32[3] = -1.0f;
}
void SetXButtonHomingMidAsmHook(PPCRegister& r1)
{
auto pXButtonHoming = (bool*)(g_memory.base + r1.u32 + 0x63);
*pXButtonHoming = !Config::HomingAttackOnJump;
}
bool IsHomingAttackOnJump()
{
return Config::HomingAttackOnJump;
}
// ------------- WORLD MAP ------------- //
bool WorldMapDeadzoneMidAsmHook(PPCRegister& pPadState)
@@ -403,17 +430,20 @@ PPC_FUNC(sub_8256C938)
pWorldMapCursor->m_LeftStickVertical = rPadState.LeftStickVertical;
pWorldMapCursor->m_LeftStickHorizontal = rPadState.LeftStickHorizontal;
if (rPadState.IsDown(SWA::eKeyState_DpadUp))
pWorldMapCursor->m_LeftStickVertical = 1.0f;
if (rPadState.IsDown(SWA::eKeyState_DpadDown))
pWorldMapCursor->m_LeftStickVertical = -1.0f;
if (rPadState.IsDown(SWA::eKeyState_DpadLeft))
pWorldMapCursor->m_LeftStickHorizontal = -1.0f;
if (rPadState.IsDown(SWA::eKeyState_DpadRight))
pWorldMapCursor->m_LeftStickHorizontal = 1.0f;
if (!Config::DisableDPadMovement)
{
if (rPadState.IsDown(SWA::eKeyState_DpadUp))
pWorldMapCursor->m_LeftStickVertical = 1.0f;
if (rPadState.IsDown(SWA::eKeyState_DpadDown))
pWorldMapCursor->m_LeftStickVertical = -1.0f;
if (rPadState.IsDown(SWA::eKeyState_DpadLeft))
pWorldMapCursor->m_LeftStickHorizontal = -1.0f;
if (rPadState.IsDown(SWA::eKeyState_DpadRight))
pWorldMapCursor->m_LeftStickHorizontal = 1.0f;
}
if (sqrtl((pWorldMapCursor->m_LeftStickHorizontal * pWorldMapCursor->m_LeftStickHorizontal) +
(pWorldMapCursor->m_LeftStickVertical * pWorldMapCursor->m_LeftStickVertical)) > WORLD_MAP_ROTATE_DEADZONE)
+10
View File
@@ -146,3 +146,13 @@ PPC_FUNC(sub_824C1E60)
__imp__sub_824C1E60(ctx, base);
}
// Remove boost filter
void DisableBoostFilterMidAsmHook(PPCRegister& r11)
{
if (Config::DisableBoostFilter)
{
if (r11.u32 == 1)
r11.u32 = 0;
}
}
@@ -95,13 +95,6 @@ void PostUnleashMidAsmHook(PPCRegister& r30)
g_isUnleashCancelled = false;
}
void SetXButtonHomingMidAsmHook(PPCRegister& r1)
{
auto pXButtonHoming = (bool*)(g_memory.base + r1.u32 + 0x63);
*pXButtonHoming = !Config::HomingAttackOnJump;
}
// SWA::Player::CEvilSonicContext
PPC_FUNC_IMPL(__imp__sub_823B49D8);
PPC_FUNC(sub_823B49D8)
@@ -97,6 +97,8 @@ PPC_FUNC(sub_824E5170)
__imp__sub_824E5170(ctx, base);
App::s_isSaving = pSaveIcon->m_IsVisible;
if (pSaveIcon->m_IsVisible)
{
App::s_isSaveDataCorrupt = false;
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION_MILESTONE=""
VERSION_MAJOR=1
VERSION_MINOR=0
VERSION_REVISION=1
VERSION_REVISION=2
+6
View File
@@ -34,8 +34,14 @@ int Window_OnSDLEvent(void*, SDL_Event* event)
switch (event->type)
{
case SDL_QUIT:
{
if (App::s_isSaving)
break;
App::Exit();
break;
}
case SDL_KEYDOWN:
{
+1 -1
View File
@@ -95,7 +95,7 @@ enum class ETripleBuffering : uint32_t
};
static constexpr int32_t FPS_MIN = 15;
static constexpr int32_t FPS_MAX = 240;
static constexpr int32_t FPS_MAX = 241;
enum class EAntiAliasing : uint32_t
{
+3 -1
View File
@@ -77,8 +77,11 @@ CONFIG_DEFINE_ENUM_LOCALISED("Video", EUIAlignmentMode, UIAlignmentMode, EUIAlig
CONFIG_DEFINE_HIDDEN("Codes", bool, AllowCancellingUnleash, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableAutoSaveWarning, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableBoostFilter, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableDLCIcon, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableDPadMovement, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableDWMRoundedCorners, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableLowResolutionFontOnCustomUI, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, EnableEventCollisionDebugView, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, EnableGIMipLevelDebugView, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, EnableObjectCollisionDebugView, false);
@@ -91,6 +94,5 @@ CONFIG_DEFINE_HIDDEN("Codes", bool, SaveScoreAtCheckpoints, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, SkipIntroLogos, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, UseArrowsForTimeOfDayTransition, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, UseOfficialTitleOnTitleBar, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableLowResolutionFontOnCustomUI, false);
CONFIG_DEFINE("Update", time_t, LastChecked, 0);
+2
View File
@@ -8,6 +8,8 @@
#define GAME_INSTALL_DIRECTORY "."
#endif
extern std::filesystem::path g_executableRoot;
inline std::filesystem::path GetGamePath()
{
return GAME_INSTALL_DIRECTORY;
+14 -2
View File
@@ -181,8 +181,8 @@ jump_address_on_true = 0x829E40A0
# Disable Chip hints for shoe upgrades
[[midasm_hook]]
name = "DisableHintsMidAsmHook"
address = 0x82691CB0
jump_address_on_true = 0x82691E24
address = 0x82691DD0
jump_address_on_true = 0x82691DD4
# Disable navigation volumes
[[midasm_hook]]
@@ -197,11 +197,18 @@ address = 0x823A4FF0
registers = ["r4", "r5"]
return_on_false = true
# Set default value for XButtonHoming.
[[midasm_hook]]
name = "SetXButtonHomingMidAsmHook"
address = 0x8237AC90
registers = ["r1"]
# Disable XML reading for XButtonHoming.
[[midasm_hook]]
name = "IsHomingAttackOnJump"
address = 0x8237ACE4
jump_address_on_true = 0x8237ACE8
# Down force HFR fix
[[midasm_hook]]
name = "DownForceDeltaTimeFixMidAsmHook"
@@ -1093,3 +1100,8 @@ registers = ["r31", "r29", "r28"]
name = "ObjGrindDashPanelAllocMidAsmHook"
address = 0x82614948
registers = ["r3"]
[[midasm_hook]]
name = "DisableBoostFilterMidAsmHook"
address = 0x82B48C9C
registers = ["r11"]
+6 -1
View File
@@ -37,10 +37,15 @@ In the installer, you must select the following **Workloads** and **Individual c
- C++ CMake tools for Windows
### Linux
The following command will install the required dependencies on a distro that uses `apt` (such as Ubuntu), but you can find the equivalent packages for your preferred distro.
The following command will install the required dependencies on a distro that uses `apt` (such as Debian-based distros).
```bash
sudo apt install autoconf automake libtool pkg-config curl cmake ninja-build clang clang-tools libgtk-3-dev
```
The following command will install the required dependencies on a distro that uses `pacman` (such as Arch-based distros).
```bash
sudo pacman -S base-devel ninja lld clang gtk3
```
You can also find the equivalent packages for your preferred distro.
> [!NOTE]
> This list may not be comprehensive for your particular distro and you may be required to install additional packages, should an error occur during configuration.