mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 05:13:39 -07:00
Adds fast text option
Changes previous "fast text" option to "skip text", and adds a new "fast text" option, which makes text appear 5 times faster.
This commit is contained in:
parent
0ef2d0c750
commit
8faebc8647
4 changed files with 27 additions and 7 deletions
|
@ -49,6 +49,9 @@ namespace Game {
|
||||||
Settings.debug.n64mode = stob(Conf[ConfSection]["n64_mode"]);
|
Settings.debug.n64mode = stob(Conf[ConfSection]["n64_mode"]);
|
||||||
|
|
||||||
// Enhancements
|
// Enhancements
|
||||||
|
Settings.enhancements.skip_text = stob(Conf[EnhancementSection]["skip_text"]);
|
||||||
|
CVar_SetS32("gSkipText", Settings.enhancements.skip_text);
|
||||||
|
|
||||||
Settings.enhancements.fast_text = stob(Conf[EnhancementSection]["fast_text"]);
|
Settings.enhancements.fast_text = stob(Conf[EnhancementSection]["fast_text"]);
|
||||||
CVar_SetS32("gFastText", Settings.enhancements.fast_text);
|
CVar_SetS32("gFastText", Settings.enhancements.fast_text);
|
||||||
|
|
||||||
|
@ -148,6 +151,7 @@ namespace Game {
|
||||||
Conf[AudioSection]["fanfare"] = std::to_string(Settings.audio.fanfare);
|
Conf[AudioSection]["fanfare"] = std::to_string(Settings.audio.fanfare);
|
||||||
|
|
||||||
// Enhancements
|
// Enhancements
|
||||||
|
Conf[EnhancementSection]["skip_text"] = std::to_string(Settings.enhancements.skip_text);
|
||||||
Conf[EnhancementSection]["fast_text"] = std::to_string(Settings.enhancements.fast_text);
|
Conf[EnhancementSection]["fast_text"] = std::to_string(Settings.enhancements.fast_text);
|
||||||
Conf[EnhancementSection]["disable_lod"] = std::to_string(Settings.enhancements.disable_lod);
|
Conf[EnhancementSection]["disable_lod"] = std::to_string(Settings.enhancements.disable_lod);
|
||||||
Conf[EnhancementSection]["animated_pause_menu"] = std::to_string(Settings.enhancements.animated_pause_menu);
|
Conf[EnhancementSection]["animated_pause_menu"] = std::to_string(Settings.enhancements.animated_pause_menu);
|
||||||
|
|
|
@ -20,6 +20,7 @@ struct SoHConfigType {
|
||||||
|
|
||||||
// Enhancements
|
// Enhancements
|
||||||
struct {
|
struct {
|
||||||
|
bool skip_text = false;
|
||||||
bool fast_text = false;
|
bool fast_text = false;
|
||||||
bool disable_lod = false;
|
bool disable_lod = false;
|
||||||
bool animated_pause_menu = false;
|
bool animated_pause_menu = false;
|
||||||
|
|
|
@ -378,6 +378,11 @@ namespace SohImGui {
|
||||||
ImGui::Text("Gameplay");
|
ImGui::Text("Gameplay");
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
|
if (ImGui::Checkbox("Skip Text", &Game::Settings.enhancements.skip_text)) {
|
||||||
|
CVar_SetS32("gSkipText", Game::Settings.enhancements.skip_text);
|
||||||
|
needs_save = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui::Checkbox("Fast Text", &Game::Settings.enhancements.fast_text)) {
|
if (ImGui::Checkbox("Fast Text", &Game::Settings.enhancements.fast_text)) {
|
||||||
CVar_SetS32("gFastText", Game::Settings.enhancements.fast_text);
|
CVar_SetS32("gFastText", Game::Settings.enhancements.fast_text);
|
||||||
needs_save = true;
|
needs_save = true;
|
||||||
|
|
|
@ -37,6 +37,8 @@ MessageTableEntry* sStaffMessageEntryTablePtr;
|
||||||
|
|
||||||
char* _message_0xFFFC_nes;
|
char* _message_0xFFFC_nes;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//MessageTableEntry sNesMessageEntryTable[] = {
|
//MessageTableEntry sNesMessageEntryTable[] = {
|
||||||
//#define DEFINE_MESSAGE(textId, type, yPos, nesMessage, gerMessage, fraMessage) \
|
//#define DEFINE_MESSAGE(textId, type, yPos, nesMessage, gerMessage, fraMessage) \
|
||||||
// { textId, (_SHIFTL(type, 4, 8) | _SHIFTL(yPos, 0, 8)), _message_##textId##_nes },
|
// { textId, (_SHIFTL(type, 4, 8) | _SHIFTL(yPos, 0, 8)), _message_##textId##_nes },
|
||||||
|
@ -118,6 +120,8 @@ s16 sOcarinaNoteCEnvR;
|
||||||
s16 sOcarinaNoteCEnvB;
|
s16 sOcarinaNoteCEnvB;
|
||||||
s16 sOcarinaNoteCEnvG;
|
s16 sOcarinaNoteCEnvG;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Message_ResetOcarinaNoteState(void) {
|
void Message_ResetOcarinaNoteState(void) {
|
||||||
R_OCARINA_NOTES_YPOS(0) = 189;
|
R_OCARINA_NOTES_YPOS(0) = 189;
|
||||||
R_OCARINA_NOTES_YPOS(1) = 184;
|
R_OCARINA_NOTES_YPOS(1) = 184;
|
||||||
|
@ -166,7 +170,7 @@ void Message_UpdateOcarinaGame(GlobalContext* globalCtx) {
|
||||||
u8 Message_ShouldAdvance(GlobalContext* globalCtx) {
|
u8 Message_ShouldAdvance(GlobalContext* globalCtx) {
|
||||||
Input* input = &globalCtx->state.input[0];
|
Input* input = &globalCtx->state.input[0];
|
||||||
|
|
||||||
bool isB_Held = CVar_GetS32("gFastText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
|
bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
|
||||||
: CHECK_BTN_ALL(input->press.button, BTN_B);
|
: CHECK_BTN_ALL(input->press.button, BTN_B);
|
||||||
|
|
||||||
if (CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
|
if (CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
|
||||||
|
@ -178,7 +182,7 @@ u8 Message_ShouldAdvance(GlobalContext* globalCtx) {
|
||||||
u8 Message_ShouldAdvanceSilent(GlobalContext* globalCtx) {
|
u8 Message_ShouldAdvanceSilent(GlobalContext* globalCtx) {
|
||||||
Input* input = &globalCtx->state.input[0];
|
Input* input = &globalCtx->state.input[0];
|
||||||
|
|
||||||
bool isB_Held = CVar_GetS32("gFastText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
|
bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
|
||||||
: CHECK_BTN_ALL(input->press.button, BTN_B);
|
: CHECK_BTN_ALL(input->press.button, BTN_B);
|
||||||
|
|
||||||
return CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP);
|
return CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP);
|
||||||
|
@ -951,7 +955,10 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
i = j - 1;
|
i = j - 1;
|
||||||
msgCtx->textDrawPos = i + 1;
|
if (CVar_GetS32("gFastText", 0) !=0)
|
||||||
|
msgCtx->textDrawPos = i + 5;
|
||||||
|
else
|
||||||
|
msgCtx->textDrawPos = i + 1;
|
||||||
|
|
||||||
if (character) {}
|
if (character) {}
|
||||||
}
|
}
|
||||||
|
@ -1061,7 +1068,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
||||||
msgCtx->textDelay = msgCtx->msgBufDecoded[++i];
|
msgCtx->textDelay = msgCtx->msgBufDecoded[++i];
|
||||||
break;
|
break;
|
||||||
case MESSAGE_UNSKIPPABLE:
|
case MESSAGE_UNSKIPPABLE:
|
||||||
msgCtx->textUnskippable = CVar_GetS32("gFastText", 0) != 1;
|
msgCtx->textUnskippable = CVar_GetS32("gSkipText", 0) != 1;
|
||||||
break;
|
break;
|
||||||
case MESSAGE_TWO_CHOICE:
|
case MESSAGE_TWO_CHOICE:
|
||||||
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_2_CHOICE;
|
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_2_CHOICE;
|
||||||
|
@ -1144,7 +1151,10 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (msgCtx->textDelayTimer == 0) {
|
if (msgCtx->textDelayTimer == 0) {
|
||||||
msgCtx->textDrawPos = i + 1;
|
if (CVar_GetS32("gFastText", 0) !=0)
|
||||||
|
msgCtx->textDrawPos = i + 5;
|
||||||
|
else
|
||||||
|
msgCtx->textDrawPos = i + 1;
|
||||||
msgCtx->textDelayTimer = msgCtx->textDelay;
|
msgCtx->textDelayTimer = msgCtx->textDelay;
|
||||||
} else {
|
} else {
|
||||||
msgCtx->textDelayTimer--;
|
msgCtx->textDelayTimer--;
|
||||||
|
@ -2026,7 +2036,7 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
||||||
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
|
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
bool isB_Held = CVar_GetS32("gFastText", 0) != 0 ? CHECK_BTN_ALL(globalCtx->state.input[0].cur.button, BTN_B)
|
bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(globalCtx->state.input[0].cur.button, BTN_B)
|
||||||
: CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_B);
|
: CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_B);
|
||||||
|
|
||||||
switch (msgCtx->msgMode) {
|
switch (msgCtx->msgMode) {
|
||||||
|
@ -3067,7 +3077,7 @@ void Message_Update(GlobalContext* globalCtx) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isB_Held = CVar_GetS32("gFastText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B) && !sTextboxSkipped
|
bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B) && !sTextboxSkipped
|
||||||
: CHECK_BTN_ALL(input->press.button, BTN_B);
|
: CHECK_BTN_ALL(input->press.button, BTN_B);
|
||||||
|
|
||||||
switch (msgCtx->msgMode) {
|
switch (msgCtx->msgMode) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue