mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-26 16:15:19 -07:00
Merge branch 'actor-accessibility-experiments' of https://www.github.com/caturria/shipwright into actor-accessibility-experiments
This commit is contained in:
commit
d8ec5ff94e
2 changed files with 31 additions and 10 deletions
|
@ -164,6 +164,7 @@ void accessible_maruta(AccessibleActor* actor) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void accessible_area_change(AccessibleActor* actor) {
|
void accessible_area_change(AccessibleActor* actor) {
|
||||||
|
Player* player = GET_PLAYER(actor->play);
|
||||||
if (actor->yDistToPlayer > 300.0) {
|
if (actor->yDistToPlayer > 300.0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -175,9 +176,22 @@ void accessible_area_change(AccessibleActor* actor) {
|
||||||
case 0:
|
case 0:
|
||||||
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EV_FANTOM_WARP_L, false);
|
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EV_FANTOM_WARP_L, false);
|
||||||
}*/
|
}*/
|
||||||
|
if (actor->play->sceneNum == 81) {
|
||||||
|
actor->policy.distance = 4000;
|
||||||
|
}
|
||||||
|
if (actor->play->sceneNum <= 11) {
|
||||||
|
actor->policy.distance = 500;
|
||||||
|
}
|
||||||
|
|
||||||
if (actor->sceneIndex == 85 || actor->sceneIndex == 91) {
|
if (actor->sceneIndex == 85 || actor->sceneIndex == 91) {
|
||||||
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EV_SARIA_MELODY, false);
|
if (actor->play->sceneNum == 91 && gSaveContext.entranceIndex != 1504 && gSaveContext.entranceIndex != 1246) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (actor->play->sceneNum == 85 && actor->world.pos.y < 0) {
|
||||||
|
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EV_HORSE_RUN_LEVEL, false);
|
||||||
|
} else {
|
||||||
|
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EV_SARIA_MELODY, false);
|
||||||
|
}
|
||||||
//kokiri forest and lost woods
|
//kokiri forest and lost woods
|
||||||
} else if (actor->play->sceneNum >= 17 && actor->play->sceneNum <= 25) {
|
} else if (actor->play->sceneNum >= 17 && actor->play->sceneNum <= 25) {
|
||||||
return; // dont check for entrances while in boss rooms
|
return; // dont check for entrances while in boss rooms
|
||||||
|
@ -232,6 +246,7 @@ void accessible_area_change(AccessibleActor* actor) {
|
||||||
return;//boss rooms
|
return;//boss rooms
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
actor->policy.distance = 500;
|
||||||
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_OC_DOOR_OPEN, false);
|
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_OC_DOOR_OPEN, false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -524,7 +539,7 @@ void accessible_audio_compass(AccessibleActor* actor) {
|
||||||
ActorAccessibility_AddSupportedActor(VA_DOOR, policy);
|
ActorAccessibility_AddSupportedActor(VA_DOOR, policy);
|
||||||
ActorAccessibility_InitPolicy(&policy, "Area Change", accessible_area_change, 0);
|
ActorAccessibility_InitPolicy(&policy, "Area Change", accessible_area_change, 0);
|
||||||
policy.n = 60;
|
policy.n = 60;
|
||||||
//policy.distance = 2000;
|
policy.distance = 2000;
|
||||||
ActorAccessibility_AddSupportedActor(VA_AREA_CHANGE, policy);
|
ActorAccessibility_AddSupportedActor(VA_AREA_CHANGE, policy);
|
||||||
//ActorAccessibility_InitPolicy(&policy, "marker", NULL,
|
//ActorAccessibility_InitPolicy(&policy, "marker", NULL,
|
||||||
// NA_SE_EV_DIAMOND_SWITCH);
|
// NA_SE_EV_DIAMOND_SWITCH);
|
||||||
|
|
|
@ -849,16 +849,22 @@ class Climable : protected TerrainCueSound {
|
||||||
(fabs(pos.y - (player->actor.world.pos.y + player->actor.yDistToWater)) > 30.0)) {
|
(fabs(pos.y - (player->actor.world.pos.y + player->actor.yDistToWater)) > 30.0)) {
|
||||||
discoverLedge(pos);
|
discoverLedge(pos);
|
||||||
}
|
}
|
||||||
if (pos.y > prevPos.y && fabs(pos.y - prevPos.y) < 20 && fabs(pos.y - prevPos.y) > 2 &&
|
if (pos.y > prevPos.y && fabs(pos.y - prevPos.y) < 20 && fabs(pos.y - prevPos.y) > 1.2 &&
|
||||||
player->stateFlags1 != PLAYER_STATE1_CLIMBING_LADDER) {
|
player->stateFlags1 != PLAYER_STATE1_CLIMBING_LADDER) {
|
||||||
// This is an incline.
|
// This is an incline.
|
||||||
Vec3f_ bottom = pos;
|
Vec3f_ bottom = pos;
|
||||||
|
f32 ogStep = step;
|
||||||
while ((pos.y > prevPos.y && fabs(pos.y - prevPos.y) < 20 && fabs(pos.y - prevPos.y) > 2 &&
|
step = 1.0;
|
||||||
|
move();
|
||||||
|
if (fabs(pos.y - bottom.y) > 3.5) {
|
||||||
|
discoverWall(pos);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
while ((pos.y > prevPos.y && fabs(pos.y - prevPos.y) < 20 && fabs(pos.y - prevPos.y) > 1.2 &&
|
||||||
player->stateFlags1 != PLAYER_STATE1_CLIMBING_LADDER)) {
|
player->stateFlags1 != PLAYER_STATE1_CLIMBING_LADDER)) {
|
||||||
prevPos = pos;
|
prevPos = pos;
|
||||||
if (!move()) {
|
if (!move()) {
|
||||||
destroyCurrentSound();
|
//destroyCurrentSound();
|
||||||
break; // Probe is out of bounds.
|
break; // Probe is out of bounds.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -872,17 +878,17 @@ class Climable : protected TerrainCueSound {
|
||||||
discoverIncline(bottom, pitchModifier);
|
discoverIncline(bottom, pitchModifier);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (pos.y < prevPos.y && fabs(pos.y - prevPos.y) < 20 && fabs(pos.y - prevPos.y) > 2 &&
|
if (pos.y < prevPos.y && fabs(pos.y - prevPos.y) < 20 && fabs(pos.y - prevPos.y) > 1.2 &&
|
||||||
player->stateFlags1 != PLAYER_STATE1_CLIMBING_LADDER) {
|
player->stateFlags1 != PLAYER_STATE1_CLIMBING_LADDER) {
|
||||||
// This is a decline.
|
// This is a decline.
|
||||||
// discorver top
|
// discorver top
|
||||||
Vec3f_ top = pos;
|
Vec3f_ top = pos;
|
||||||
|
|
||||||
while ((pos.y < prevPos.y && fabs(pos.y - prevPos.y) < 20 && fabs(pos.y - prevPos.y) > 2 &&
|
while ((pos.y < prevPos.y && fabs(pos.y - prevPos.y) < 20 && fabs(pos.y - prevPos.y) > 1.2 &&
|
||||||
player->stateFlags1 != PLAYER_STATE1_CLIMBING_LADDER)) {
|
player->stateFlags1 != PLAYER_STATE1_CLIMBING_LADDER)) {
|
||||||
prevPos = pos;
|
prevPos = pos;
|
||||||
if (!move()) {
|
if (!move()) {
|
||||||
destroyCurrentSound();
|
//destroyCurrentSound();
|
||||||
break; // Probe is out of bounds.
|
break; // Probe is out of bounds.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue