diff options
| author | cadmic <cadmic24@gmail.com> | 2024-10-03 19:50:06 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-03 22:50:06 -0400 |
| commit | 089a2c4c0bd7d66d8173a12841cc955dbe871426 (patch) | |
| tree | 92048f88ce07cb7dcaca9f77385324a12f4a61b6 /src/code | |
| parent | 801fe221531da30424f954cae7b9123ca3286443 (diff) | |
Add missing HS_FISHING constant (#2256)
* Add missing HS_FISHING constant
* It's actually doubly-bugged lol
* Format
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/z_message.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/code/z_message.c b/src/code/z_message.c index 9094f2580..fe60644dd 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -1915,7 +1915,7 @@ void Message_Decode(PlayState* play) { decodedBufPos--; } else if (curCharWide == MESSAGE_WIDE_HIGHSCORE) { value = HIGH_SCORE(font->msgBufWide[++msgCtx->msgBufPos] & 0xFF); - if ((font->msgBufWide[msgCtx->msgBufPos] & 0xFF) == 2) { + if ((font->msgBufWide[msgCtx->msgBufPos] & 0xFF) == HS_FISHING) { if (LINK_AGE_IN_YEARS == YEARS_CHILD) { value &= 0x7F; } else { @@ -2277,10 +2277,13 @@ void Message_Decode(PlayState* play) { } else if (curChar == MESSAGE_HIGHSCORE) { value = HIGH_SCORE((u8)font->msgBuf[++msgCtx->msgBufPos]); PRINTF(T("ランキング=%d\n", "Highscore=%d\n"), font->msgBuf[msgCtx->msgBufPos]); - if ((font->msgBuf[msgCtx->msgBufPos] & 0xFF) == 2) { + if ((font->msgBuf[msgCtx->msgBufPos] & 0xFF) == HS_FISHING) { if (LINK_AGE_IN_YEARS == YEARS_CHILD) { value &= 0x7F; } else { + //! @bug Should use msgBuf instead of msgBufWide (copy-paste error from Japanese text + //! handling?), and the mask is applied to the high score index instead of the high score value + //! so this always shows HIGH_SCORE(0). Only the PRINTF is wrong, the following line is correct. PRINTF("HI_SCORE( kanfont->mbuff.nes_mes_buf[message->rdp] & 0xff000000 ) = %x\n", HIGH_SCORE(font->msgBufWide[msgCtx->msgBufPos] & 0xFF000000)); value = ((HIGH_SCORE((u8)font->msgBuf[msgCtx->msgBufPos]) & 0xFF000000) >> 0x18) & 0x7F; |
