mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
Changes fast text option to skip text, and makes text speed adjustable via a slider (#173)
* 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. * Fixes magic numbers * Changes text speed to a slider (unfinished) Got most of the code working, but only works upon reloading the game, unsure of how to fix this. * Makes text speed adjustable via a slider * Cleans up changes to z_message_PAL.c
This commit is contained in:
parent
f5a3d3c4bf
commit
ffeb2afcb7
4 changed files with 24 additions and 13 deletions
|
@ -166,7 +166,7 @@ void Message_UpdateOcarinaGame(GlobalContext* globalCtx) {
|
|||
u8 Message_ShouldAdvance(GlobalContext* globalCtx) {
|
||||
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);
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
|
||||
|
@ -178,7 +178,7 @@ u8 Message_ShouldAdvance(GlobalContext* globalCtx) {
|
|||
u8 Message_ShouldAdvanceSilent(GlobalContext* globalCtx) {
|
||||
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);
|
||||
|
||||
return CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP);
|
||||
|
@ -951,7 +951,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
|||
}
|
||||
}
|
||||
i = j - 1;
|
||||
msgCtx->textDrawPos = i + 1;
|
||||
msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1);
|
||||
|
||||
if (character) {}
|
||||
}
|
||||
|
@ -1061,7 +1061,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
|||
msgCtx->textDelay = msgCtx->msgBufDecoded[++i];
|
||||
break;
|
||||
case MESSAGE_UNSKIPPABLE:
|
||||
msgCtx->textUnskippable = CVar_GetS32("gFastText", 0) != 1;
|
||||
msgCtx->textUnskippable = CVar_GetS32("gSkipText", 0) != 1;
|
||||
break;
|
||||
case MESSAGE_TWO_CHOICE:
|
||||
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_2_CHOICE;
|
||||
|
@ -1144,7 +1144,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
|||
}
|
||||
}
|
||||
if (msgCtx->textDelayTimer == 0) {
|
||||
msgCtx->textDrawPos = i + 1;
|
||||
msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1);
|
||||
msgCtx->textDelayTimer = msgCtx->textDelay;
|
||||
} else {
|
||||
msgCtx->textDelayTimer--;
|
||||
|
@ -2026,7 +2026,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,
|
||||
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);
|
||||
|
||||
switch (msgCtx->msgMode) {
|
||||
|
@ -3067,7 +3067,7 @@ void Message_Update(GlobalContext* globalCtx) {
|
|||
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);
|
||||
|
||||
switch (msgCtx->msgMode) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue