According to the C++ standard, regular operator new must always return a valid pointer, and allocation failure should throw an exception.
The original game did not use exceptions, and instead had its operator new return null on alloc failure.
Clang and GCC seem to be enforcing the standard here, and this is causing crashes on non-Windows platforms like https://sentry.twilitrealm.dev/organizations/twilitrealm/issues/952/, where a JAISe allocation failure (custom pooled operator new overload) crashes the game when it should be handled gracefully. MSVC seems to not make use of this opportunity, meaning the code works as intended.
Tagging the operators with noexcept seems to satisfy GCC, but I admit cppreference is very light on details here.
* Disable waitForTick and waitBlanking
* Initial frame interpolation implementation
* Initial batch of speed fixes
* Fix Iron Boots
* Strip dead code once used for debugging
* Interpolate shadows
* Revert overzealous/redundant lookups
* Fix JUTFader
* Fix field map cursor
* Fix various particle effects
* Fix Midna when riding Wolf Link
* Fix title logo
* Title Logo 2: Electric Boogaloo
* Fixed grass and flowers
* "Unlock Framerate" config option (WIP)
* Wrap more things in TARGET_PC
* Finish wrapping things in TARGET_PC
* Missed one
* Disable dComIfGd_drawXluListInvisible when interpolating
---------
Co-authored-by: Luke Street <luke@street.dev>
currently builds a "Metaforce" apk, will need to change name of course. Running the apk using Android Studio's emulator can get in game, however running on a samsung phone does not seem to work.
This fixes crashes when first entering North Faaron cave and
Renado's Sanctuary due to system heap exhaustion resulting from
multiple threads allocating on the heap at once.
There's some sort of weird contention going on - for some reason the
game gobbles up seemingly any amount of memory you throw at it when
the two threads are competing for heap space. Using a separate heap
in the async thread sidesteps the issue.