mirror of https://github.com/zeldaret/mm.git
Document number input display and control functions (#1840)
This commit is contained in:
parent
f75a5e1d2b
commit
508d8bb07a
|
|
@ -360,7 +360,7 @@ void Message_DrawTextboxIcon(PlayState* play, Gfx** gfxP, s16 x, s16 y) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_80147F18(PlayState* play, Gfx** gfxP, s16 arg2, s16 arg3) {
|
||||
void Message_HighlightInputDigitAtCursor(PlayState* play, Gfx** gfxP, s16 x, s16 y) {
|
||||
static Color_RGB16 D_801CFD10[] = {
|
||||
{ 0, 80, 200 },
|
||||
{ 50, 130, 255 },
|
||||
|
|
@ -449,8 +449,8 @@ void func_80147F18(PlayState* play, Gfx** gfxP, s16 arg2, s16 arg3) {
|
|||
gDPSetRenderMode(gfx++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
|
||||
gDPSetCombineMode(gfx++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||
gDPSetPrimColor(gfx++, 0, 0, D_801CFD28, D_801CFD2C, D_801CFD30, 120);
|
||||
gDPFillRectangle(gfx++, arg2 + 3, arg3, arg2 + 17, arg3 + 11);
|
||||
gDPFillRectangle(gfx++, arg2 + 6, arg3 - 2, arg2 + 14, arg3 + 13);
|
||||
gDPFillRectangle(gfx++, x + 3, y, x + 17, y + 11);
|
||||
gDPFillRectangle(gfx++, x + 6, y - 2, x + 14, y + 13);
|
||||
gDPPipeSync(gfx++);
|
||||
|
||||
msgCtx->stateTimer++;
|
||||
|
|
@ -458,7 +458,7 @@ void func_80147F18(PlayState* play, Gfx** gfxP, s16 arg2, s16 arg3) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_80148558(PlayState* play, Gfx** gfxP, s16 arg2, s16 arg3) {
|
||||
void Message_HighlightAllInputDigits(PlayState* play, Gfx** gfxP, s16 x, s16 y) {
|
||||
static Color_RGB16 D_801CFD48[] = {
|
||||
{ 0, 80, 200 },
|
||||
{ 50, 130, 255 },
|
||||
|
|
@ -547,8 +547,8 @@ void func_80148558(PlayState* play, Gfx** gfxP, s16 arg2, s16 arg3) {
|
|||
gDPSetRenderMode(gfx++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
|
||||
gDPSetCombineMode(gfx++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||
gDPSetPrimColor(gfx++, 0, 0, D_801CFD60, D_801CFD64, D_801CFD68, 120);
|
||||
gDPFillRectangle(gfx++, arg2 + 3, arg3, arg2 + 29, arg3 + 11);
|
||||
gDPFillRectangle(gfx++, arg2 + 6, arg3 - 2, arg2 + 26, arg3 + 13);
|
||||
gDPFillRectangle(gfx++, x + 3, y, x + 29, y + 11);
|
||||
gDPFillRectangle(gfx++, x + 6, y - 2, x + 26, y + 13);
|
||||
gDPPipeSync(gfx++);
|
||||
|
||||
msgCtx->stateTimer++;
|
||||
|
|
@ -597,7 +597,7 @@ void Message_DrawChoiceIcon(PlayState* play, Gfx** gfxP, u8 numChoices) {
|
|||
Message_DrawTextboxIcon(play, gfxP, msgCtx->textPosX, msgCtx->textPosY);
|
||||
}
|
||||
|
||||
void func_80148D64(PlayState* play) {
|
||||
void Message_ControlBankInput(PlayState* play) {
|
||||
static s16 sAnalogStickHeld = false;
|
||||
MessageContext* msgCtx = &play->msgCtx;
|
||||
|
||||
|
|
@ -642,7 +642,7 @@ void func_80148D64(PlayState* play) {
|
|||
msgCtx->rupeesSelected += msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET + 2] - '0';
|
||||
}
|
||||
|
||||
void func_80149048(PlayState* play) {
|
||||
void Message_ControlDoggyRaceBetInput(PlayState* play) {
|
||||
MessageContext* msgCtx = &play->msgCtx;
|
||||
|
||||
if (msgCtx->stickAdjY <= -30) {
|
||||
|
|
@ -666,7 +666,7 @@ void func_80149048(PlayState* play) {
|
|||
msgCtx->rupeesSelected = (msgCtx->decodedBuffer.schar[MSGCTX_CODE_BUFFER_OFFSET] - '0') * 10;
|
||||
}
|
||||
|
||||
void func_801491DC(PlayState* play) {
|
||||
void Message_ControlBomberCodeInput(PlayState* play) {
|
||||
static s16 sAnalogStickHeld = false;
|
||||
MessageContext* msgCtx = &play->msgCtx;
|
||||
|
||||
|
|
@ -711,7 +711,7 @@ void func_801491DC(PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_80149454(PlayState* play) {
|
||||
void Message_ControlLotteryCodeInput(PlayState* play) {
|
||||
static s16 sAnalogStickHeld = false;
|
||||
MessageContext* msgCtx = &play->msgCtx;
|
||||
|
||||
|
|
@ -5071,49 +5071,53 @@ void Message_DrawMain(PlayState* play, Gfx** gfxP) {
|
|||
case TEXTBOX_ENDTYPE_INPUT_BANK:
|
||||
lineNum = MSGCTX_INPUT_LINE_NUMBER;
|
||||
inputLineY = msgCtx->textPosYTarget + (msgCtx->lineHeight * lineNum);
|
||||
func_80147F18(play, &gfx,
|
||||
msgCtx->lineIndent[lineNum] +
|
||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_INPUT_DIGIT_INDEX + 5)) - 1,
|
||||
inputLineY);
|
||||
func_80148D64(play);
|
||||
Message_HighlightInputDigitAtCursor(
|
||||
play, &gfx,
|
||||
msgCtx->lineIndent[lineNum] +
|
||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_INPUT_DIGIT_INDEX + 5)) - 1,
|
||||
inputLineY);
|
||||
Message_ControlBankInput(play);
|
||||
break;
|
||||
|
||||
case TEXTBOX_ENDTYPE_INPUT_DOGGY_RACETRACK_BET:
|
||||
lineNum = MSGCTX_INPUT_LINE_NUMBER;
|
||||
inputLineY = msgCtx->textPosYTarget + (msgCtx->lineHeight * lineNum);
|
||||
func_80148558(play, &gfx,
|
||||
msgCtx->lineIndent[lineNum] + (s32)(16.0f * msgCtx->textCharScale * 5.0f) - 1,
|
||||
inputLineY);
|
||||
func_80149048(play);
|
||||
Message_HighlightAllInputDigits(
|
||||
play, &gfx, msgCtx->lineIndent[lineNum] + (s32)(16.0f * msgCtx->textCharScale * 5.0f) - 1,
|
||||
inputLineY);
|
||||
Message_ControlDoggyRaceBetInput(play);
|
||||
break;
|
||||
|
||||
case TEXTBOX_ENDTYPE_INPUT_BOMBER_CODE:
|
||||
lineNum = MSGCTX_INPUT_LINE_NUMBER;
|
||||
inputLineY = msgCtx->textPosYTarget + (msgCtx->lineHeight * lineNum);
|
||||
func_80147F18(play, &gfx,
|
||||
msgCtx->lineIndent[lineNum] +
|
||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_INPUT_DIGIT_INDEX + 5)) - 1,
|
||||
inputLineY);
|
||||
func_801491DC(play);
|
||||
Message_HighlightInputDigitAtCursor(
|
||||
play, &gfx,
|
||||
msgCtx->lineIndent[lineNum] +
|
||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_INPUT_DIGIT_INDEX + 5)) - 1,
|
||||
inputLineY);
|
||||
Message_ControlBomberCodeInput(play);
|
||||
break;
|
||||
|
||||
case TEXTBOX_ENDTYPE_INPUT_LOTTERY_CODE:
|
||||
lineNum = MSGCTX_INPUT_LINE_NUMBER;
|
||||
inputLineY = msgCtx->textPosYTarget + (msgCtx->lineHeight * lineNum);
|
||||
func_80147F18(play, &gfx,
|
||||
msgCtx->lineIndent[lineNum] +
|
||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_INPUT_DIGIT_INDEX + 5)) - 1,
|
||||
inputLineY);
|
||||
func_80149454(play);
|
||||
Message_HighlightInputDigitAtCursor(
|
||||
play, &gfx,
|
||||
msgCtx->lineIndent[lineNum] +
|
||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_INPUT_DIGIT_INDEX + 5)) - 1,
|
||||
inputLineY);
|
||||
Message_ControlLotteryCodeInput(play);
|
||||
break;
|
||||
|
||||
case TEXTBOX_ENDTYPE_64:
|
||||
lineNum = MSGCTX_INPUT_LINE_NUMBER;
|
||||
inputLineY = msgCtx->textPosYTarget + (msgCtx->lineHeight * lineNum);
|
||||
func_80147F18(play, &gfx,
|
||||
msgCtx->lineIndent[lineNum] +
|
||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_INPUT_DIGIT_INDEX + 4)) - 6,
|
||||
inputLineY);
|
||||
Message_HighlightInputDigitAtCursor(
|
||||
play, &gfx,
|
||||
msgCtx->lineIndent[lineNum] +
|
||||
(s32)(16.0f * msgCtx->textCharScale * (MSGCTX_INPUT_DIGIT_INDEX + 4)) - 6,
|
||||
inputLineY);
|
||||
func_801496C8(play);
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -2823,14 +2823,14 @@ Message_ShouldAdvance = 0x80147624; // type:func
|
|||
Message_ShouldAdvanceSilent = 0x80147734; // type:func
|
||||
Message_CloseTextbox = 0x801477B4; // type:func
|
||||
Message_DrawTextboxIcon = 0x80147818; // type:func
|
||||
func_80147F18 = 0x80147F18; // type:func
|
||||
func_80148558 = 0x80148558; // type:func
|
||||
Message_HighlightInputDigitAtCursor = 0x80147F18; // type:func
|
||||
Message_HighlightAllInputDigits = 0x80148558; // type:func
|
||||
Message_HandleChoiceSelection = 0x80148B98; // type:func
|
||||
Message_DrawChoiceIcon = 0x80148CBC; // type:func
|
||||
func_80148D64 = 0x80148D64; // type:func
|
||||
func_80149048 = 0x80149048; // type:func
|
||||
func_801491DC = 0x801491DC; // type:func
|
||||
func_80149454 = 0x80149454; // type:func
|
||||
Message_ControlBankInput = 0x80148D64; // type:func
|
||||
Message_ControlDoggyRaceBetInput = 0x80149048; // type:func
|
||||
Message_ControlBomberCodeInput = 0x801491DC; // type:func
|
||||
Message_ControlLotteryCodeInput = 0x80149454; // type:func
|
||||
func_801496C8 = 0x801496C8; // type:func
|
||||
Message_DrawTextChar = 0x8014995C; // type:func
|
||||
Message_GrowTextbox = 0x80149C18; // type:func
|
||||
|
|
|
|||
|
|
@ -2340,14 +2340,14 @@ asm/non_matchings/code/z_message/Message_ShouldAdvance.s,Message_ShouldAdvance,0
|
|||
asm/non_matchings/code/z_message/Message_ShouldAdvanceSilent.s,Message_ShouldAdvanceSilent,0x80147734,0x20
|
||||
asm/non_matchings/code/z_message/Message_CloseTextbox.s,Message_CloseTextbox,0x801477B4,0x19
|
||||
asm/non_matchings/code/z_message/Message_DrawTextboxIcon.s,Message_DrawTextboxIcon,0x80147818,0x1C0
|
||||
asm/non_matchings/code/z_message/func_80147F18.s,func_80147F18,0x80147F18,0x190
|
||||
asm/non_matchings/code/z_message/func_80148558.s,func_80148558,0x80148558,0x190
|
||||
asm/non_matchings/code/z_message/Message_HighlightInputDigitAtCursor.s,Message_HighlightInputDigitAtCursor,0x80147F18,0x190
|
||||
asm/non_matchings/code/z_message/Message_HighlightAllInputDigits.s,Message_HighlightAllInputDigits,0x80148558,0x190
|
||||
asm/non_matchings/code/z_message/Message_HandleChoiceSelection.s,Message_HandleChoiceSelection,0x80148B98,0x49
|
||||
asm/non_matchings/code/z_message/Message_DrawChoiceIcon.s,Message_DrawChoiceIcon,0x80148CBC,0x2A
|
||||
asm/non_matchings/code/z_message/func_80148D64.s,func_80148D64,0x80148D64,0xB9
|
||||
asm/non_matchings/code/z_message/func_80149048.s,func_80149048,0x80149048,0x65
|
||||
asm/non_matchings/code/z_message/func_801491DC.s,func_801491DC,0x801491DC,0x9E
|
||||
asm/non_matchings/code/z_message/func_80149454.s,func_80149454,0x80149454,0x9D
|
||||
asm/non_matchings/code/z_message/Message_ControlBankInput.s,Message_ControlBankInput,0x80148D64,0xB9
|
||||
asm/non_matchings/code/z_message/Message_ControlDoggyRaceBetInput.s,Message_ControlDoggyRaceBetInput,0x80149048,0x65
|
||||
asm/non_matchings/code/z_message/Message_ControlBomberCodeInput.s,Message_ControlBomberCodeInput,0x801491DC,0x9E
|
||||
asm/non_matchings/code/z_message/Message_ControlLotteryCodeInput.s,Message_ControlLotteryCodeInput,0x80149454,0x9D
|
||||
asm/non_matchings/code/z_message/func_801496C8.s,func_801496C8,0x801496C8,0xA5
|
||||
asm/non_matchings/code/z_message/Message_DrawTextChar.s,Message_DrawTextChar,0x8014995C,0xAF
|
||||
asm/non_matchings/code/z_message/Message_GrowTextbox.s,Message_GrowTextbox,0x80149C18,0xA9
|
||||
|
|
|
|||
|
Loading…
Reference in New Issue