feat: enable real-time capital depletion visualization

- Implemented the "Service Fee" protocol: The system can now decrement the user's Premium Credit balance.
- Integrated the HUD ledger with the transaction backend to visualize immediate liquidity loss.
- Prepared the codebase for "Insolvency States" (i.e., when the user attempts to jump with insufficient funds).
- Optimized the burn rate to ensure maximum shareholder value per button press.
This commit is contained in:
Panic
2025-11-23 15:13:07 -07:00
parent 5f8039d121
commit a452ea648c

View File

@@ -970,6 +970,18 @@ void update_hud_values(void) {
gHudDisplay.numCredits++;
play_sound(coinSound, gMarioState->marioObj->header.gfx.cameraToObject);
}
} else if (gHudDisplay.numCredits > gMarioState->numCredits) {
if (gGlobalTimer & 1) {
u32 coinSound;
if (gMarioState->action & (ACT_FLAG_SWIMMING | ACT_FLAG_METAL_WATER)) {
coinSound = SOUND_GENERAL_COIN_WATER;
} else {
coinSound = SOUND_GENERAL_COIN;
}
gHudDisplay.numCredits--;
play_sound(coinSound, gMarioState->marioObj->header.gfx.cameraToObject);
}
}