mirror of
https://github.com/CTR-tools/CTR-ModSDK.git
synced 2025-01-07 13:10:33 +00:00
progress
This commit is contained in:
parent
750bd3b84f
commit
6fffddfdfe
@ -2,42 +2,58 @@
|
||||
|
||||
void Voiceline_RequestPlay(int, short, int);
|
||||
|
||||
void DECOMP_Turbo_Audio(struct Driver* driver, int speed_cap) {
|
||||
void DECOMP_Turbo_Audio(struct Driver* driver, int speed_cap)
|
||||
{
|
||||
u_int distortion;
|
||||
u_int volume;
|
||||
u_int extraFlags;
|
||||
|
||||
// if turbo audio cooldown is not done
|
||||
if (driver->turbo_audioCooldown != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// half volume
|
||||
volume = 0x80 << 0x10;
|
||||
// distort
|
||||
distortion = 0x94 << 8;
|
||||
|
||||
if (speed_cap > 0x7f) {
|
||||
if (speed_cap > 0x7f)
|
||||
{
|
||||
// max volume
|
||||
volume = 0xff0000;
|
||||
volume = 0xff << 0x10;
|
||||
|
||||
// distort
|
||||
distortion = 0x6c << 8;
|
||||
|
||||
// Make driver talk
|
||||
Voiceline_RequestPlay(0x10,data.characterIDs[driver->driverID],0x10);
|
||||
|
||||
} else if (speed_cap > 0x40) {
|
||||
|
||||
|
||||
goto Skip;
|
||||
}
|
||||
|
||||
if (speed_cap > 0x40)
|
||||
{
|
||||
// 3/4 volume
|
||||
volume = 0xc0 << 0x10;
|
||||
|
||||
// no distort
|
||||
distortion = 0x80 << 8;
|
||||
|
||||
goto Skip;
|
||||
}
|
||||
|
||||
// half volume
|
||||
volume = 0x80 << 0x10;
|
||||
|
||||
// distort
|
||||
distortion = 0x94 << 8;
|
||||
|
||||
Skip:
|
||||
|
||||
// 50% L/R
|
||||
extraFlags = 0x80;
|
||||
|
||||
// if echo is required
|
||||
if ((driver->actionsFlagSet & 0x10000) != 0) {
|
||||
if ((driver->actionsFlagSet & 0x10000) != 0)
|
||||
{
|
||||
// add echo
|
||||
distortion |= 0x1000000;
|
||||
extraFlags |= 0x1000000;
|
||||
}
|
||||
|
||||
// 0xD = Turbo Boost Sound
|
||||
|
@ -349,8 +349,11 @@ common, exe, VehPtr_Blasted_Init, 0x0, General/Vehicle/VehPtr_Blasted_Init.c
|
||||
common, exe, Player_SetHeldItem, 0x0, General/Player_SetHeldItem.c
|
||||
common, exe, Turbo_Increment, 0x0, General/Turbo_Increment.c
|
||||
common, exe, Turbo_ThTick, 0x0, General/Turbo_ThTick.c
|
||||
common, exe, Turbo_Audio, 0x0, General/Turbo_Audio.c
|
||||
common, exe, Weapon_Mask_boolGoodGuy, 0x0, General/Weapon_Mask_boolGoodGuy.c
|
||||
|
||||
common, exe, Tawna_Init, 0x0, General/Tawna_Init.c
|
||||
|
||||
// Japan
|
||||
|
||||
1006, exe, DecalFont_SetJfontDimensions, 0x0, General/RegionJapan/DecalFont_SetJfontDimensions.c
|
||||
|
Loading…
Reference in New Issue
Block a user