-
Notifications
You must be signed in to change notification settings - Fork 108
Add ambient and noise subtitle options #853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,7 +57,9 @@ DialogMenu::~DialogMenu() { | |
| void DialogMenu::setupSettings() { | ||
| dlgAnimation = Gothic::settingsGetI("GAME","animatedWindows"); | ||
| showSubtitles = Gothic::settingsGetI("GAME","subTitles"); | ||
| showSubtitlesAmbient = Gothic::settingsGetI("GAME","subTitlesAmbient"); | ||
| showSubtitlesPlayer = Gothic::settingsGetI("GAME","subTitlesPlayer"); | ||
| showSubtitlesNoise = Gothic::settingsGetI("GAME","subTitlesNoise"); | ||
| } | ||
|
|
||
| void DialogMenu::tick(uint64_t dt) { | ||
|
|
@@ -374,7 +376,30 @@ bool DialogMenu::haveToWaitOutput() const { | |
| } | ||
|
|
||
| bool DialogMenu::haveToShowSubtitles(bool isPl) const { | ||
| return showSubtitles && (showSubtitlesPlayer || !isPl); | ||
| if(!showSubtitles){ | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. code-style: |
||
| return false; | ||
| } | ||
| if(isPl){ | ||
| return showSubtitlesPlayer; | ||
| } else if(other != nullptr) { | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So should I set a variable in the |
||
| switch (other->processPolicy()) { | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you check on how those option are function in vanilla?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was not sure how to check that. Using the processPolicy was my best guess, since I did not see any other flag that would distinguish Also I just realized in the Issue you wrote: and I implemented it the other way around (0 is off, 1 is on). Should I change this behavior? It just feels weird that this one is the only one where 1 means off.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
You need to check how this option affect the base game. Intuitively, it probably about npc-to-npc dialogs. Maybe also about throw-away phrases, such as "Thief!!", "I shall get you!!" and such.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ?? |
||
| case(NpcProcessPolicy::AiNormal): | ||
| return showSubtitlesAmbient; | ||
|
|
||
| case(NpcProcessPolicy::AiFar): | ||
| case(NpcProcessPolicy::AiFar2): | ||
| return showSubtitlesNoise; | ||
|
|
||
| case(NpcProcessPolicy::Player): | ||
| // since other is the player, this is considered player subtitles again | ||
| return showSubtitlesPlayer; | ||
|
|
||
| default: | ||
| return false; | ||
| } | ||
| } else { | ||
| return false; | ||
| } | ||
| } | ||
|
|
||
| void DialogMenu::startTrade() { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing alignment for both lines in this function