diff --git a/docs/cheats-and-assists.md b/docs/cheats-and-assists.md index a95eff957..6f5f25dff 100644 --- a/docs/cheats-and-assists.md +++ b/docs/cheats-and-assists.md @@ -39,6 +39,7 @@ your settings. |---|---| | God mode | Link takes no damage. | | One-hit kill | Enemies go down in one hit. | +| Silent Link | Link stays quiet, so enemies do not hear him. | | Damage taken | How much damage Link takes: 25% to 400%. 100% is the game's own. | | Damage dealt | How much damage enemies take: 25% to 400%. 100% is the game's own. | | Weapon wear | How fast weapons, bows and shields wear out: Fairy (never), Peter Pan (0.5x), Hylian (1x, the game's own), Hero (1.5x), Master (2x), Legend (2.5x), Dude, are you ok? (3x). | diff --git a/runtime/assists.c b/runtime/assists.c index 4462ab578..edd197b9c 100644 --- a/runtime/assists.c +++ b/runtime/assists.c @@ -5,6 +5,7 @@ #include #include "settings.h" +#include "rt.h" // The damage multipliers: d percent of a loss, rounded, and at least 1 while there is a loss static int32_t scaled(int32_t d, int pct) { @@ -54,3 +55,14 @@ uint32_t rt_stamina(uint32_t oldv, uint32_t newv) { // Infinite arrows: the bow's shot takes its arrows off the pouch through one function, which returns before taking // any (tools/patches.py _remove_arrows). One arrow is still needed to shoot. int rt_infinite_arrows(void) { return g_settings.infinite_arrows; } + +// Silent Link: the game's noise setter, called with (object, channel, value) for one of an actor's four noise channels +// (tools/patches.py _silent_link). Channel 1 is the one whistling and the sounds like it go through; the HUD's sound +// wave and the enemies' hearing both read it, so keeping it at zero is what makes Link quiet. The other channels and +// the other actors are left alone. +int rt_silent_link(uint64_t object, uint32_t channel) { + if (!g_settings.silent_link || channel != 1) return 0; + if (object < GUEST_LO || object >= GUEST_HI) return 0; + *(volatile float *)(uintptr_t)(object + 0x1c) = 0.0f; // (+0x18: the four channels, one float each) + return 1; +} diff --git a/runtime/control_settings.c b/runtime/control_settings.c index b03cc77d8..f714f8fac 100644 --- a/runtime/control_settings.c +++ b/runtime/control_settings.c @@ -63,7 +63,7 @@ static const Setting settings[] = { I(weapon_wear, WEAPON_WEAR_MIN, WEAPON_WEAR_MAX, NULL), B(infinite_arrows), B(infinite_stamina), B(infinite_rupees), I(item_multiplier, 1, 8, NULL), B(free_sprint), B(sure_footed), I(weather, 0, WEATHER_COUNT - 1, "game|no_rain|no_storms|clear|cloudy|rain|heavy_rain|snow|heavy_snow|thunderstorm|thunder_rain|sun_shower"), - B(god_mode), B(one_hit_kill), I(damage_taken, 25, 400, NULL), I(damage_dealt, 25, 400, NULL), + B(god_mode), B(one_hit_kill), B(silent_link), I(damage_taken, 25, 400, NULL), I(damage_dealt, 25, 400, NULL), I(text_language, 0, 0, NULL), I(voice_language, 0, 0, NULL), B(save_backups), B(stick_cam_on), I(stick_cam_x, STICK_CAM_MIN, STICK_CAM_MAX, NULL), I(stick_cam_y, STICK_CAM_MIN, STICK_CAM_MAX, NULL), B(toggle_zl), B(toggle_zr), I(menu_text_size, 80, 150, NULL), B(auto_continue), B(menu_tip_seen), diff --git a/runtime/game_sites.h b/runtime/game_sites.h index 41bdd8ff5..60c7944e1 100644 --- a/runtime/game_sites.h +++ b/runtime/game_sites.h @@ -28,6 +28,7 @@ X(frame_loop_interval_ret) /* the frame loop's return address from setting the present interval */ \ X(title_version_format) /* "Ver.%s": the title screen's version line */ \ X(player_info) /* uking::act::PlayerInfo * (test tools) */ \ + X(silent_link) /* the noise setter: (object, channel, value) (runtime/assists.c) */ \ X(world_mgr) /* ksys::world::Manager * (test tools, weather.c)*/ \ X(main_data) /* main's .data (then .bss, up to main_end) */ \ X(main_end) diff --git a/runtime/settings.c b/runtime/settings.c index 3e9efadbf..34085a317 100644 --- a/runtime/settings.c +++ b/runtime/settings.c @@ -641,6 +641,7 @@ void settings_load(void) { else if (!strcmp(key, "colour_vision_strength")) g_settings.colour_vision_strength = atoi(val); // (percent) else if (!strcmp(key, "god_mode")) g_settings.god_mode = atoi(val) != 0; else if (!strcmp(key, "one_hit_kill")) g_settings.one_hit_kill = atoi(val) != 0; + else if (!strcmp(key, "silent_link")) g_settings.silent_link = atoi(val) != 0; else if (!strcmp(key, "damage_taken")) g_settings.damage_taken = atoi(val); // (percent) else if (!strcmp(key, "damage_dealt")) g_settings.damage_dealt = atoi(val); else if (!strcmp(key, "toggle_zl")) g_settings.toggle_zl = atoi(val) != 0; @@ -918,6 +919,7 @@ bool settings_save_to(const char *path) { fprintf(f, "colour_vision_strength = %d\n", g_settings.colour_vision_strength); fprintf(f, "god_mode = %d\n", g_settings.god_mode); fprintf(f, "one_hit_kill = %d\n", g_settings.one_hit_kill); + fprintf(f, "silent_link = %d\n", g_settings.silent_link); fprintf(f, "damage_taken = %d\n", g_settings.damage_taken); fprintf(f, "damage_dealt = %d\n", g_settings.damage_dealt); fprintf(f, "toggle_zl = %d\n", g_settings.toggle_zl ? 1 : 0); diff --git a/runtime/settings.h b/runtime/settings.h index 8ddd3702c..619414b66 100644 --- a/runtime/settings.h +++ b/runtime/settings.h @@ -229,6 +229,7 @@ typedef struct { int weather; // WEATHER_COUNT: the game's, rain or thunderstorms kept out, or one weather held (weather.c) bool god_mode; // Link takes no damage bool one_hit_kill; // whatever else takes damage loses all its life at once + bool silent_link; // Link's noise channel 1 (whistling and the sounds like it) stays at zero (silent_link.c) int damage_taken; // percent of the damage Link takes (DAMAGE_CHOICES) int damage_dealt; // percent of the damage everything else takes (DAMAGE_CHOICES) bool toggle_zl; // press ZL once in play to hold shield / focus; press again to release (hle/input.c) diff --git a/runtime/ui/i18n/de.inc b/runtime/ui/i18n/de.inc index 9e5386972..6ec1c4970 100644 --- a/runtime/ui/i18n/de.inc +++ b/runtime/ui/i18n/de.inc @@ -1261,3 +1261,5 @@ T("Downloading Intel XeSS", "Intel XeSS wird heruntergeladen") T("Dynamic: renders the 3D scene smaller when frames are slow, sharper when they aren't; stays full size where that gains nothing.", "Dynamisch: rendert die 3D-Szene kleiner, wenn Frames langsam sind, und wieder schärfer, wenn nicht; bleibt in voller Größe, wo das nichts bringt.") T("About mods", "Über Mods") T("Mods are made by other people, not by Savage Wind. We don't check, test or support them, and we aren't responsible for what they do, including if they break the game or your saves. Back up your saves before trying one, and turn mods off before reporting a bug: a report of a bug a mod causes is closed right away. Savage Wind releases never include mods; in the future we may suggest some we've found to play well with Savage Wind.", "Mods stammen von anderen Leuten, nicht von Savage Wind. Wir prüfen, testen und unterstützen sie nicht und sind nicht verantwortlich für das, was sie tun, auch wenn sie das Spiel oder deine Spielstände beschädigen. Sichere deine Spielstände, bevor du einen ausprobierst, und schalte Mods aus, bevor du einen Fehler meldest: Eine Meldung zu einem Fehler, den ein Mod verursacht, wird sofort geschlossen. Savage-Wind-Versionen enthalten nie Mods; künftig empfehlen wir vielleicht einige, die gut mit Savage Wind laufen.") +T("Silent Link", "Stiller Link") +T("Link stays quiet, so enemies do not hear him.", "Link bleibt leise, sodass Gegner ihn nicht hören.") diff --git a/runtime/ui/i18n/es.inc b/runtime/ui/i18n/es.inc index 7cfb7cbb7..1fe901c3d 100644 --- a/runtime/ui/i18n/es.inc +++ b/runtime/ui/i18n/es.inc @@ -1260,3 +1260,5 @@ T("Downloading Intel XeSS", "Descargando Intel XeSS") T("Dynamic: renders the 3D scene smaller when frames are slow, sharper when they aren't; stays full size where that gains nothing.", "Dinámico: renderiza la escena 3D más pequeña cuando los fotogramas van lentos y más nítida cuando no; se queda a tamaño completo donde eso no gana nada.") T("About mods", "Sobre los mods") T("Mods are made by other people, not by Savage Wind. We don't check, test or support them, and we aren't responsible for what they do, including if they break the game or your saves. Back up your saves before trying one, and turn mods off before reporting a bug: a report of a bug a mod causes is closed right away. Savage Wind releases never include mods; in the future we may suggest some we've found to play well with Savage Wind.", "Los mods los hacen otras personas, no Savage Wind. No los revisamos, probamos ni damos soporte, y no nos hacemos responsables de lo que hagan, incluso si rompen el juego o tus partidas. Haz una copia de tus partidas antes de probar uno y desactiva los mods antes de reportar un error: un reporte de un error causado por un mod se cierra de inmediato. Las versiones de Savage Wind nunca incluyen mods; en el futuro quizá recomendemos algunos que funcionen bien con Savage Wind.") +T("Silent Link", "Link silencioso") +T("Link stays quiet, so enemies do not hear him.", "Link permanece en silencio, así los enemigos no lo oyen.") diff --git a/runtime/ui/i18n/fr.inc b/runtime/ui/i18n/fr.inc index 89adbc608..5897596d9 100644 --- a/runtime/ui/i18n/fr.inc +++ b/runtime/ui/i18n/fr.inc @@ -1261,3 +1261,5 @@ T("Downloading Intel XeSS", "Téléchargement de Intel XeSS") T("Dynamic: renders the 3D scene smaller when frames are slow, sharper when they aren't; stays full size where that gains nothing.", "Dynamique : rend la scène 3D plus petite quand les images sont lentes, plus nette quand elles ne le sont pas ; reste en pleine taille là où ça n'apporte rien.") T("About mods", "À propos des mods") T("Mods are made by other people, not by Savage Wind. We don't check, test or support them, and we aren't responsible for what they do, including if they break the game or your saves. Back up your saves before trying one, and turn mods off before reporting a bug: a report of a bug a mod causes is closed right away. Savage Wind releases never include mods; in the future we may suggest some we've found to play well with Savage Wind.", "Les mods sont faits par d'autres personnes, pas par Savage Wind. Nous ne les vérifions pas, ne les testons pas et ne les prenons pas en charge, et nous ne sommes pas responsables de ce qu'ils font, y compris s'ils cassent le jeu ou vos sauvegardes. Sauvegardez vos parties avant d'en essayer un, et désactivez les mods avant de signaler un bug : le signalement d'un bug causé par un mod est fermé immédiatement. Les versions de Savage Wind n'incluent jamais de mods ; à l'avenir, nous pourrons en recommander certains qui fonctionnent bien avec Savage Wind.") +T("Silent Link", "Link silencieux") +T("Link stays quiet, so enemies do not hear him.", "Link reste silencieux : les ennemis ne l'entendent pas.") diff --git a/runtime/ui/i18n/he.inc b/runtime/ui/i18n/he.inc index d23da92b4..da6d6fa43 100644 --- a/runtime/ui/i18n/he.inc +++ b/runtime/ui/i18n/he.inc @@ -1260,3 +1260,5 @@ T("Downloading Intel XeSS", "מוריד את Intel XeSS") T("Dynamic: renders the 3D scene smaller when frames are slow, sharper when they aren't; stays full size where that gains nothing.", "דינמי: מרנדר את סצנת ה-3D קטנה יותר כשהפריימים איטיים וחדה יותר כשלא; נשארת בגודל מלא כשאין בכך תועלת.") T("About mods", "על מודים") T("Mods are made by other people, not by Savage Wind. We don't check, test or support them, and we aren't responsible for what they do, including if they break the game or your saves. Back up your saves before trying one, and turn mods off before reporting a bug: a report of a bug a mod causes is closed right away. Savage Wind releases never include mods; in the future we may suggest some we've found to play well with Savage Wind.", "המודים נוצרים על ידי אנשים אחרים, לא על ידי Savage Wind. איננו בודקים, מנסים או תומכים בהם, ואיננו אחראים למה שהם עושים, כולל אם הם שוברים את המשחק או את השמירות שלך. גבה את השמירות לפני שאתה מנסה מוד, וכבה את המודים לפני דיווח על באג: דיווח על באג שנגרם על ידי מוד ייסגר מיד. גרסאות Savage Wind לעולם אינן כוללות מודים; בעתיד אולי נמליץ על כמה שעובדים טוב עם Savage Wind.") +T("Silent Link", "לינק שקט") +T("Link stays quiet, so enemies do not hear him.", "לינק נשאר שקט, כך שהאויבים לא שומעים אותו.") diff --git a/runtime/ui/i18n/it.inc b/runtime/ui/i18n/it.inc index 075f46d38..59176c635 100644 --- a/runtime/ui/i18n/it.inc +++ b/runtime/ui/i18n/it.inc @@ -1261,3 +1261,5 @@ T("Downloading Intel XeSS", "Download di Intel XeSS") T("Dynamic: renders the 3D scene smaller when frames are slow, sharper when they aren't; stays full size where that gains nothing.", "Dinamico: rende la scena 3D più piccola quando i frame sono lenti, più nitida quando non lo sono; resta a piena dimensione dove non serve.") T("About mods", "Informazioni sulle mod") T("Mods are made by other people, not by Savage Wind. We don't check, test or support them, and we aren't responsible for what they do, including if they break the game or your saves. Back up your saves before trying one, and turn mods off before reporting a bug: a report of a bug a mod causes is closed right away. Savage Wind releases never include mods; in the future we may suggest some we've found to play well with Savage Wind.", "Le mod sono fatte da altre persone, non da Savage Wind. Non le controlliamo, non le testiamo e non le supportiamo, e non siamo responsabili di ciò che fanno, anche se rompono il gioco o i tuoi salvataggi. Fai una copia dei salvataggi prima di provarne una e disattiva le mod prima di segnalare un bug: la segnalazione di un bug causato da una mod viene chiusa subito. Le versioni di Savage Wind non includono mai mod; in futuro potremmo consigliarne alcune che funzionano bene con Savage Wind.") +T("Silent Link", "Link silenzioso") +T("Link stays quiet, so enemies do not hear him.", "Link resta silenzioso, così i nemici non lo sentono.") diff --git a/runtime/ui/i18n/ja.inc b/runtime/ui/i18n/ja.inc index 7f8bed7e3..282f50845 100644 --- a/runtime/ui/i18n/ja.inc +++ b/runtime/ui/i18n/ja.inc @@ -1261,3 +1261,5 @@ T("Downloading Intel XeSS", "Intel XeSS をダウンロード中") T("Dynamic: renders the 3D scene smaller when frames are slow, sharper when they aren't; stays full size where that gains nothing.", "動的:フレームが遅いときは 3D シーンを小さく、速いときは鮮明にレンダリングします。効果がない環境ではフルサイズのままです。") T("About mods", "MOD について") T("Mods are made by other people, not by Savage Wind. We don't check, test or support them, and we aren't responsible for what they do, including if they break the game or your saves. Back up your saves before trying one, and turn mods off before reporting a bug: a report of a bug a mod causes is closed right away. Savage Wind releases never include mods; in the future we may suggest some we've found to play well with Savage Wind.", "MOD は Savage Wind ではなく、ほかの人が作ったものです。私たちは MOD の確認・テスト・サポートを行わず、ゲームやセーブデータが壊れた場合も含め、MOD の動作について責任を負いません。試す前にセーブデータをバックアップし、不具合を報告する前には MOD をオフにしてください。MOD が原因の不具合の報告はすぐにクローズされます。Savage Wind のリリースに MOD が含まれることはありません。今後、Savage Wind でよく動く MOD を紹介することはあるかもしれません。") +T("Silent Link", "無音のリンク") +T("Link stays quiet, so enemies do not hear him.", "リンクは静かなままで、敵に気づかれません。") diff --git a/runtime/ui/i18n/ko.inc b/runtime/ui/i18n/ko.inc index 18346ad05..641d6ea23 100644 --- a/runtime/ui/i18n/ko.inc +++ b/runtime/ui/i18n/ko.inc @@ -1261,3 +1261,5 @@ T("Downloading Intel XeSS", "Intel XeSS 다운로드 중") T("Dynamic: renders the 3D scene smaller when frames are slow, sharper when they aren't; stays full size where that gains nothing.", "동적: 프레임이 느릴 때 3D 장면을 더 작게, 빠를 때 더 선명하게 렌더링합니다. 이득이 없는 환경에서는 전체 크기를 유지합니다.") T("About mods", "모드 안내") T("Mods are made by other people, not by Savage Wind. We don't check, test or support them, and we aren't responsible for what they do, including if they break the game or your saves. Back up your saves before trying one, and turn mods off before reporting a bug: a report of a bug a mod causes is closed right away. Savage Wind releases never include mods; in the future we may suggest some we've found to play well with Savage Wind.", "모드는 Savage Wind가 아니라 다른 사람들이 만든 것입니다. 저희는 모드를 확인하거나 테스트하거나 지원하지 않으며, 게임이나 세이브가 망가지는 경우를 포함해 모드가 하는 일에 책임지지 않습니다. 모드를 써 보기 전에 세이브를 백업하고, 버그를 신고하기 전에는 모드를 꺼 주세요. 모드 때문에 생긴 버그 신고는 바로 닫힙니다. Savage Wind 릴리스에는 모드가 포함되지 않습니다. 앞으로 Savage Wind에서 잘 작동하는 모드를 추천할 수는 있습니다.") +T("Silent Link", "조용한 링크") +T("Link stays quiet, so enemies do not hear him.", "링크는 조용히 있으므로 적이 그를 듣지 못합니다.") diff --git a/runtime/ui/i18n/nl.inc b/runtime/ui/i18n/nl.inc index 36361d27e..4bcfbcebb 100644 --- a/runtime/ui/i18n/nl.inc +++ b/runtime/ui/i18n/nl.inc @@ -1261,3 +1261,5 @@ T("Downloading Intel XeSS", "Intel XeSS wordt gedownload") T("Dynamic: renders the 3D scene smaller when frames are slow, sharper when they aren't; stays full size where that gains nothing.", "Dynamisch: rendert de 3D-scène kleiner als frames traag zijn, scherper als dat niet zo is; blijft op volle grootte waar het niets oplevert.") T("About mods", "Over mods") T("Mods are made by other people, not by Savage Wind. We don't check, test or support them, and we aren't responsible for what they do, including if they break the game or your saves. Back up your saves before trying one, and turn mods off before reporting a bug: a report of a bug a mod causes is closed right away. Savage Wind releases never include mods; in the future we may suggest some we've found to play well with Savage Wind.", "Mods worden door anderen gemaakt, niet door Savage Wind. We controleren, testen en ondersteunen ze niet en zijn niet verantwoordelijk voor wat ze doen, ook niet als ze het spel of je saves breken. Maak een back-up van je saves voordat je er een probeert, en zet mods uit voordat je een bug meldt: een melding van een bug die een mod veroorzaakt, wordt meteen gesloten. Savage Wind-releases bevatten nooit mods; in de toekomst raden we misschien een paar aan die goed werken met Savage Wind.") +T("Silent Link", "Stille Link") +T("Link stays quiet, so enemies do not hear him.", "Link blijft stil, zodat vijanden hem niet horen.") diff --git a/runtime/ui/i18n/pt.inc b/runtime/ui/i18n/pt.inc index b63277b21..db26f13ca 100644 --- a/runtime/ui/i18n/pt.inc +++ b/runtime/ui/i18n/pt.inc @@ -1261,3 +1261,5 @@ T("Downloading Intel XeSS", "Baixando Intel XeSS") T("Dynamic: renders the 3D scene smaller when frames are slow, sharper when they aren't; stays full size where that gains nothing.", "Dinâmico: renderiza a cena 3D menor quando os quadros ficam lentos e mais nítida quando não; mantém o tamanho cheio onde isso não ganha nada.") T("About mods", "Sobre os mods") T("Mods are made by other people, not by Savage Wind. We don't check, test or support them, and we aren't responsible for what they do, including if they break the game or your saves. Back up your saves before trying one, and turn mods off before reporting a bug: a report of a bug a mod causes is closed right away. Savage Wind releases never include mods; in the future we may suggest some we've found to play well with Savage Wind.", "Os mods são feitos por outras pessoas, não pelo Savage Wind. Não os verificamos, testamos nem damos suporte, e não somos responsáveis pelo que fazem, incluindo se estragarem o jogo ou os seus saves. Faça uma cópia dos seus saves antes de experimentar um e desative os mods antes de reportar um erro: um relatório de um erro causado por um mod é fechado de imediato. As versões do Savage Wind nunca incluem mods; no futuro talvez recomendemos alguns que funcionem bem com o Savage Wind.") +T("Silent Link", "Link silencioso") +T("Link stays quiet, so enemies do not hear him.", "O Link fica em silêncio, por isso os inimigos não o ouvem.") diff --git a/runtime/ui/i18n/ru.inc b/runtime/ui/i18n/ru.inc index e1c0c123f..b7013681d 100644 --- a/runtime/ui/i18n/ru.inc +++ b/runtime/ui/i18n/ru.inc @@ -1261,3 +1261,5 @@ T("Downloading Intel XeSS", "Загрузка Intel XeSS") T("Dynamic: renders the 3D scene smaller when frames are slow, sharper when they aren't; stays full size where that gains nothing.", "Динамический: рендерит 3D-сцену меньше, когда кадры идут медленно, и резче, когда нет; остаётся в полном размере там, где это ничего не даёт.") T("About mods", "О модах") T("Mods are made by other people, not by Savage Wind. We don't check, test or support them, and we aren't responsible for what they do, including if they break the game or your saves. Back up your saves before trying one, and turn mods off before reporting a bug: a report of a bug a mod causes is closed right away. Savage Wind releases never include mods; in the future we may suggest some we've found to play well with Savage Wind.", "Моды делают другие люди, а не Savage Wind. Мы их не проверяем, не тестируем и не поддерживаем и не отвечаем за то, что они делают, в том числе если они ломают игру или ваши сохранения. Сделайте копию сохранений, прежде чем пробовать мод, и выключите моды, прежде чем сообщать об ошибке: сообщение об ошибке, которую вызвал мод, сразу закрывается. Релизы Savage Wind никогда не включают моды; в будущем мы, возможно, порекомендуем некоторые, которые хорошо работают с Savage Wind.") +T("Silent Link", "Тихий Линк") +T("Link stays quiet, so enemies do not hear him.", "Линк остаётся тихим, поэтому враги его не слышат.") diff --git a/runtime/ui/i18n/th.inc b/runtime/ui/i18n/th.inc index 0dc5f99c1..2aad07ee5 100644 --- a/runtime/ui/i18n/th.inc +++ b/runtime/ui/i18n/th.inc @@ -1261,3 +1261,5 @@ T("Downloading Intel XeSS", "กำลังดาวน์โหลด Intel Xe T("Dynamic: renders the 3D scene smaller when frames are slow, sharper when they aren't; stays full size where that gains nothing.", "ไดนามิก: เรนเดอร์ฉาก 3D เล็กลงเมื่อเฟรมช้า และคมขึ้นเมื่อเร็ว คงขนาดเต็มเมื่อไม่ได้ประโยชน์") T("About mods", "เกี่ยวกับม็อด") T("Mods are made by other people, not by Savage Wind. We don't check, test or support them, and we aren't responsible for what they do, including if they break the game or your saves. Back up your saves before trying one, and turn mods off before reporting a bug: a report of a bug a mod causes is closed right away. Savage Wind releases never include mods; in the future we may suggest some we've found to play well with Savage Wind.", "ม็อดสร้างโดยผู้อื่น ไม่ใช่ Savage Wind เราไม่ได้ตรวจสอบ ทดสอบ หรือดูแลม็อด และไม่รับผิดชอบต่อสิ่งที่ม็อดทำ รวมถึงหากม็อดทำให้เกมหรือเซฟเสียหาย สำรองเซฟก่อนลองม็อด และปิดม็อดก่อนรายงานบั๊ก รายงานบั๊กที่เกิดจากม็อดจะถูกปิดทันที รุ่นเผยแพร่ของ Savage Wind จะไม่รวมม็อดใด ๆ ในอนาคตเราอาจแนะนำม็อดบางตัวที่เล่นกับ Savage Wind ได้ดี") +T("Silent Link", "ลิงก์เงียบ") +T("Link stays quiet, so enemies do not hear him.", "ลิงก์เงียบจนศัตรูไม่ได้ยินเขา") diff --git a/runtime/ui/i18n/zh-Hans.inc b/runtime/ui/i18n/zh-Hans.inc index 5022f2c0b..1a6dc50ee 100644 --- a/runtime/ui/i18n/zh-Hans.inc +++ b/runtime/ui/i18n/zh-Hans.inc @@ -1261,3 +1261,5 @@ T("Downloading Intel XeSS", "正在下载 Intel XeSS") T("Dynamic: renders the 3D scene smaller when frames are slow, sharper when they aren't; stays full size where that gains nothing.", "动态:帧率低时缩小 3D 场景,帧率够时恢复清晰;降档无收益的环境保持原生尺寸。") T("About mods", "关于模组") T("Mods are made by other people, not by Savage Wind. We don't check, test or support them, and we aren't responsible for what they do, including if they break the game or your saves. Back up your saves before trying one, and turn mods off before reporting a bug: a report of a bug a mod causes is closed right away. Savage Wind releases never include mods; in the future we may suggest some we've found to play well with Savage Wind.", "模组由其他人制作,而非 Savage Wind。我们不检查、不测试也不支持模组,对模组造成的任何后果概不负责,包括游戏或存档损坏。试用模组前请备份存档,报告错误前请先关闭模组;由模组导致的错误报告会被立即关闭。Savage Wind 的发布版本绝不包含模组;将来我们可能会推荐一些与 Savage Wind 配合良好的模组。") +T("Silent Link", "无声林克") +T("Link stays quiet, so enemies do not hear him.", "让林克保持安静,敌人听不到他。") diff --git a/runtime/ui/i18n/zh-Hant.inc b/runtime/ui/i18n/zh-Hant.inc index e36752bc0..a82d8c90c 100644 --- a/runtime/ui/i18n/zh-Hant.inc +++ b/runtime/ui/i18n/zh-Hant.inc @@ -1261,3 +1261,5 @@ T("Downloading Intel XeSS", "正在下載 Intel XeSS") T("Dynamic: renders the 3D scene smaller when frames are slow, sharper when they aren't; stays full size where that gains nothing.", "動態:幀率低時縮小 3D 場景,幀率足夠時恢復清晰;降檔無收益的環境保持原生尺寸。") T("About mods", "關於模組") T("Mods are made by other people, not by Savage Wind. We don't check, test or support them, and we aren't responsible for what they do, including if they break the game or your saves. Back up your saves before trying one, and turn mods off before reporting a bug: a report of a bug a mod causes is closed right away. Savage Wind releases never include mods; in the future we may suggest some we've found to play well with Savage Wind.", "模組由其他人製作,而非 Savage Wind。我們不檢查、不測試也不支援模組,對模組造成的任何後果概不負責,包括遊戲或存檔損壞。試用模組前請備份存檔,回報錯誤前請先關閉模組;由模組導致的錯誤回報會被立即關閉。Savage Wind 的發行版本絕不包含模組;將來我們可能會推薦一些與 Savage Wind 搭配良好的模組。") +T("Silent Link", "無聲林克") +T("Link stays quiet, so enemies do not hear him.", "讓林克保持安靜,敵人聽不到他。") diff --git a/runtime/ui/menu.mm b/runtime/ui/menu.mm index 0f3df0ef5..d84578fec 100644 --- a/runtime/ui/menu.mm +++ b/runtime/ui/menu.mm @@ -1411,6 +1411,8 @@ static void cheats_options(void) { opt_toggle("Infinite stamina", &g_settings.infinite_stamina, false, "The stamina wheel never runs out."); opt_toggle("One-hit kill", &g_settings.one_hit_kill, false, "Enemies go down in one hit."); + opt_toggle("Silent Link", &g_settings.silent_link, false, + "Link stays quiet, so enemies do not hear him."); opt_toggle("Infinite arrows", &g_settings.infinite_arrows, false, "Shooting a bow uses up no arrows. You still need one to shoot."); { // (Accessibility's rows: game_options.mm k_wear and DAMAGE_CHOICES) diff --git a/tools/game_sites.py b/tools/game_sites.py index 5ef248299..2a52d56cd 100644 --- a/tools/game_sites.py +++ b/tools/game_sites.py @@ -217,6 +217,10 @@ '7100001f 5400000c/ff00001f 91314260', 1), Site('world_mgr', 'ref', '90000008/9f00001f 91000108/ffc003ff f9400108 b4000008/ff00001f b946b908 7100051f ' '54000001/ff00001f a9bf7bfd', 1), + # the noise setter (tools/patches.py _silent_link; runtime/assists.c): a (object, channel, value) for one of + # an actor's four noise channels, channel 1 being the one whistling and the sounds like it go through + Site('silent_link', 'code', '51000429 91006008 7100053f 540000c8/ff00001f 8b214908 bd400101 1e202020 ' + '540000a4/ff00001f', 0), # the mouse camera (tools/patches.py _cam_stick, _cam_pitch, _cam_pitch_aim; runtime/hle/input.c): the camera's # stick input, which every camera action reads, and the square that the chase-like cameras apply to its vertical # part @@ -691,6 +695,7 @@ 'controller_step': 0x7001dad0e0, 'player_info': 0x7001e13ed0, 'world_mgr': 0x7001e57580, + 'silent_link': 0x70010d7e1c, 'cam_stick': 0x7000d57fe0, 'cam_stick_end': 0x7000d5801c, 'horse_cam_lr': 0x7000c29000, diff --git a/tools/patches.py b/tools/patches.py index 2f13427ae..64965a1fe 100644 --- a/tools/patches.py +++ b/tools/patches.py @@ -759,6 +759,17 @@ def _cam_stick_end(gen, a): f' /* {a:#x}: ldr d8, [sp, #0x10] (camera stick input: its end) */') +def _silent_link(gen, a): + # The game's noise setter (object = x0, channel = w1, value = s0). With the option on, channel 1 stays at zero: the + # setter returns before storing anything, and the runtime puts the zero in the channel (runtime/assists.c). The + # other channels (and every other actor) go through the setter as before. + assert _word(gen, a) == 0x51000429, hex(_word(gen, a)) # sub w9, w1, #1 + return ('{ extern int rt_silent_link(uint64_t, uint32_t); ' + 'if (rt_silent_link(c->x[0], (uint32_t)c->x[1])) return; ' + 'c->x[9] = (uint32_t)((uint32_t)c->x[1] - 1u); }' + f' /* {a:#x}: sub w9, w1, #1 (the noise setter: (object, channel, value)) */') + + def _cam_pitch(gen, a): # fmul s1, s0, s0 just above, fnmul s3, s0, s0 here: the vertical part kept its sign squared, s1 or s3 by s0's sign assert _word(gen, a) == 0x1e208803 and _word(gen, a - 4) == 0x1e200801, hex(_word(gen, a)) @@ -1181,6 +1192,7 @@ def _tp_gate(gen, a): PATCHES = { + 'silent_link': _silent_link, 'ui_layout_draw': _ui_layout_draw, 'ui_layout_pane': _ui_layout_pane, 'replace_tick_call': _replace_tick_call,