mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 22:33:43 -07:00
reduce to 8 slots
This commit is contained in:
parent
69d86681cd
commit
deabd6844b
3 changed files with 6 additions and 6 deletions
|
@ -11,7 +11,7 @@
|
||||||
#include "soh/Enhancements/audio/miniaudio.h"
|
#include "soh/Enhancements/audio/miniaudio.h"
|
||||||
|
|
||||||
#define AAE_SOUND_ACTION_BATCH_SIZE 64
|
#define AAE_SOUND_ACTION_BATCH_SIZE 64
|
||||||
#define AAE_SLOTS_PER_HANDLE 16
|
#define AAE_SLOTS_PER_HANDLE 8
|
||||||
class IResource;
|
class IResource;
|
||||||
struct DecodedSample {
|
struct DecodedSample {
|
||||||
void* data; // A wav file.
|
void* data; // A wav file.
|
||||||
|
|
|
@ -383,15 +383,15 @@ void ActorAccessibility_RunAccessibilityForActor(PlayState* play, AccessibleActo
|
||||||
if (player->stateFlags1 & PLAYER_STATE1_FIRST_PERSON &&
|
if (player->stateFlags1 & PLAYER_STATE1_FIRST_PERSON &&
|
||||||
(player->stateFlags1 & PLAYER_STATE1_USING_BOOMERANG || player->stateFlags1 & PLAYER_STATE1_ITEM_IN_HAND)) {
|
(player->stateFlags1 & PLAYER_STATE1_USING_BOOMERANG || player->stateFlags1 & PLAYER_STATE1_ITEM_IN_HAND)) {
|
||||||
auto aimAssistProps = ActorAccessibility_ProvideAimAssistForActor(actor);
|
auto aimAssistProps = ActorAccessibility_ProvideAimAssistForActor(actor);
|
||||||
ActorAccessibility_SetSoundPitch(actor, 9, aimAssistProps.pitch);
|
ActorAccessibility_SetSoundPitch(actor, 7, aimAssistProps.pitch);
|
||||||
ActorAccessibility_SetSoundVolume(actor, 9, aimAssistProps.volume);
|
ActorAccessibility_SetSoundVolume(actor, 7, aimAssistProps.volume);
|
||||||
ActorAccessibility_SetSoundPan(actor, 9, aimAssistProps.pan);
|
ActorAccessibility_SetSoundPan(actor, 7, aimAssistProps.pan);
|
||||||
|
|
||||||
// The above will have taken care of setting the appropriate frequency and pitch, so we'll take care of the
|
// The above will have taken care of setting the appropriate frequency and pitch, so we'll take care of the
|
||||||
// audio here based on those results.
|
// audio here based on those results.
|
||||||
if (++actor->aimAssist.framesSinceAimAssist >= actor->aimAssist.frequency) {
|
if (++actor->aimAssist.framesSinceAimAssist >= actor->aimAssist.frequency) {
|
||||||
actor->aimAssist.framesSinceAimAssist = 0;
|
actor->aimAssist.framesSinceAimAssist = 0;
|
||||||
ActorAccessibility_PlaySoundForActor(actor, 9, actor->policy.aimAssist.sfx, false);
|
ActorAccessibility_PlaySoundForActor(actor, 7, actor->policy.aimAssist.sfx, false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Make sure there's no delay the next time you draw your bow or whatever.
|
// Make sure there's no delay the next time you draw your bow or whatever.
|
||||||
|
|
|
@ -65,7 +65,7 @@ struct AccessibleActor {
|
||||||
f32 currentPitch;
|
f32 currentPitch;
|
||||||
s16 sceneIndex; // If this actor represents a scene transition, then this will contain the destination scene index.
|
s16 sceneIndex; // If this actor represents a scene transition, then this will contain the destination scene index.
|
||||||
// Zero otherwise.
|
// Zero otherwise.
|
||||||
u16 managedSoundSlots; // These have their attenuation and panning parameters updated every frame automatically.
|
u8 managedSoundSlots; // These have their attenuation and panning parameters updated every frame automatically.
|
||||||
struct {
|
struct {
|
||||||
u16 framesSinceAimAssist; // Allows rate-based vertical aim assist. Incremented every frame for aim assist
|
u16 framesSinceAimAssist; // Allows rate-based vertical aim assist. Incremented every frame for aim assist
|
||||||
// actors. Manually reset by aim assist provider.
|
// actors. Manually reset by aim assist provider.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue